@atlaspack/package-manager 2.14.20 → 2.14.21-typescript-08dcc1c9b.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +201 -0
- package/lib/JSONParseStream.js +1 -2
- package/lib/NodePackageManager.js +44 -24
- package/lib/Npm.js +2 -1
- package/lib/Pnpm.js +18 -4
- package/lib/Yarn.js +17 -3
- package/lib/getCurrentPackageManager.js +3 -1
- package/lib/installPackage.js +1 -0
- package/lib/nodejsConditions.js +6 -0
- package/lib/promiseFromProcess.js +2 -0
- package/package.json +15 -15
- package/src/{JSONParseStream.js → JSONParseStream.ts} +8 -7
- package/src/{MockPackageInstaller.js → MockPackageInstaller.ts} +4 -6
- package/src/{NodePackageManager.js → NodePackageManager.ts} +72 -51
- package/src/{Npm.js → Npm.ts} +9 -9
- package/src/{Pnpm.js → Pnpm.ts} +68 -50
- package/src/{Yarn.js → Yarn.ts} +38 -25
- package/src/{getCurrentPackageManager.js → getCurrentPackageManager.ts} +9 -4
- package/src/{index.js → index.ts} +0 -2
- package/src/{installPackage.js → installPackage.ts} +5 -6
- package/src/{nodejsConditions.js → nodejsConditions.ts} +6 -3
- package/src/promiseFromProcess.ts +23 -0
- package/src/{utils.js → utils.ts} +21 -11
- package/src/{validateModuleSpecifier.js → validateModuleSpecifier.ts} +0 -2
- package/test/{NodePackageManager.test.js → NodePackageManager.test.ts} +13 -15
- package/test/{getCurrentPackageManager.test.js → getCurrentPackageManager.test.ts} +0 -1
- package/test/{validateModuleSpecifiers.test.js → validateModuleSpecifiers.test.ts} +2 -3
- package/tsconfig.json +4 -0
- package/lib/index.d.ts +0 -10
- package/src/promiseFromProcess.js +0 -19
package/lib/index.d.ts
DELETED
@@ -1,10 +0,0 @@
|
|
1
|
-
import type { PackageManagerResolveResult } from "@atlaspack/types";
|
2
|
-
export type { PackageManager, Invalidations, PackageInstaller, ModuleRequest } from "@atlaspack/types";
|
3
|
-
export * from "./Npm";
|
4
|
-
export * from "./Pnpm";
|
5
|
-
export * from "./Yarn";
|
6
|
-
export * from "./MockPackageInstaller";
|
7
|
-
export * from "./NodePackageManager";
|
8
|
-
export { _addToInstallQueue } from "./installPackage";
|
9
|
-
export type { PackageManagerResolveResult };
|
10
|
-
export type { PackageManagerResolveResult as ResolveResult };
|
@@ -1,19 +0,0 @@
|
|
1
|
-
// @flow strict-local
|
2
|
-
|
3
|
-
import type {ChildProcess} from 'child_process';
|
4
|
-
|
5
|
-
export default function promiseFromProcess(
|
6
|
-
childProcess: ChildProcess,
|
7
|
-
): Promise<void> {
|
8
|
-
return new Promise((resolve, reject) => {
|
9
|
-
childProcess.on('error', reject);
|
10
|
-
childProcess.on('close', (code) => {
|
11
|
-
if (code !== 0) {
|
12
|
-
reject(new Error('Child process failed'));
|
13
|
-
return;
|
14
|
-
}
|
15
|
-
|
16
|
-
resolve();
|
17
|
-
});
|
18
|
-
});
|
19
|
-
}
|