-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix circular dependencies on @parcel/types (#9610)
* Fix all circular dependencies * Fix circular dependencies between packages and `@parcel/types` * Use generic WorkerFarm type parameter to avoid having to move/duplicate the class * Don't do deep imports to types * Fix accidental changes to package.json * Revert turbo related changes to package.json * Fix typescript errors * Fix more typescript errors * Move packages into a types-internal pkg This allows for there to be no API changes from the circular dependencies fix. There is now a `@parcel/types` package with the same API as before and a new `@parcel/types-internal` package, which is consumed by `@parcel/workers` while avoiding it. * Fix typescript issues * Fix eslint errors * Fix typescript errors * Add back fs dependency on parcel/types * Add missing exports * Fix dependency cycle * Fix package-manager breaking changes * Fix import duplication in ts declaration file --------- Co-authored-by: Pedro Yamada <[email protected]>
- Loading branch information
1 parent
2a75be0
commit 119f186
Showing
51 changed files
with
310 additions
and
143 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,4 @@ | ||
// @flow | ||
import type {Readable} from 'stream'; | ||
import type {Cache} from '@parcel/types'; | ||
|
||
export interface Cache { | ||
ensure(): Promise<void>; | ||
has(key: string): Promise<boolean>; | ||
get<T>(key: string): Promise<?T>; | ||
set(key: string, value: mixed): Promise<void>; | ||
getStream(key: string): Readable; | ||
setStream(key: string, stream: Readable): Promise<void>; | ||
getBlob(key: string): Promise<Buffer>; | ||
setBlob(key: string, contents: Buffer | string): Promise<void>; | ||
hasLargeBlob(key: string): Promise<boolean>; | ||
getLargeBlob(key: string): Promise<Buffer>; | ||
setLargeBlob( | ||
key: string, | ||
contents: Buffer | string, | ||
options?: {|signal?: AbortSignal|}, | ||
): Promise<void>; | ||
getBuffer(key: string): Promise<?Buffer>; | ||
/** | ||
* In a multi-threaded environment, where there are potentially multiple Cache | ||
* instances writing to the cache, ensure that this instance has the latest view | ||
* of the changes that may have been written to the cache in other threads. | ||
*/ | ||
refresh(): void; | ||
} | ||
export type {Cache}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,19 @@ | ||
// @flow | ||
export type * from './types'; | ||
|
||
import type {PackageManagerResolveResult} from '@parcel/types'; | ||
|
||
export type { | ||
PackageManager, | ||
Invalidations, | ||
PackageInstaller, | ||
ModuleRequest, | ||
} from '@parcel/types'; | ||
export * from './Npm'; | ||
export * from './Pnpm'; | ||
export * from './Yarn'; | ||
export * from './MockPackageInstaller'; | ||
export * from './NodePackageManager'; | ||
export {_addToInstallQueue} from './installPackage'; | ||
|
||
export type {PackageManagerResolveResult}; | ||
export type {PackageManagerResolveResult as ResolveResult}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.