@atlaspack/package-manager 2.14.21-typescript-b27501580.0 → 2.14.21-typescript-e99c742e9.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/lib/JSONParseStream.d.ts +6 -0
- package/lib/MockPackageInstaller.d.ts +14 -0
- package/lib/NodePackageManager.d.ts +36 -0
- package/lib/Npm.d.ts +4 -0
- package/lib/Pnpm.d.ts +5 -0
- package/lib/Yarn.d.ts +5 -0
- package/lib/getCurrentPackageManager.d.ts +4 -0
- package/lib/index.d.ts +10 -0
- package/lib/installPackage.d.ts +5 -0
- package/lib/nodejsConditions.d.ts +3 -0
- package/lib/promiseFromProcess.d.ts +2 -0
- package/lib/utils.d.ts +15 -0
- package/lib/validateModuleSpecifier.d.ts +1 -0
- package/package.json +10 -10
@@ -0,0 +1,6 @@
|
|
1
|
+
import type { JSONObject } from '@atlaspack/types';
|
2
|
+
import { Transform } from 'stream';
|
3
|
+
export default class JSONParseStream extends Transform {
|
4
|
+
constructor(options: unknown);
|
5
|
+
_transform(chunk: Buffer | string, encoding: string, callback: (err?: Error | null | undefined, parsed?: JSONObject | null | undefined) => unknown): void;
|
6
|
+
}
|
@@ -0,0 +1,14 @@
|
|
1
|
+
import type { ModuleRequest, PackageInstaller, InstallerOptions } from '@atlaspack/types';
|
2
|
+
import type { FileSystem } from '@atlaspack/fs';
|
3
|
+
import type { FilePath } from '@atlaspack/types';
|
4
|
+
type Package = {
|
5
|
+
fs: FileSystem;
|
6
|
+
packagePath: FilePath;
|
7
|
+
};
|
8
|
+
export declare class MockPackageInstaller implements PackageInstaller {
|
9
|
+
packages: Map<string, Package>;
|
10
|
+
register(packageName: string, fs: FileSystem, packagePath: FilePath): void;
|
11
|
+
install({ modules, fs, cwd, packagePath, saveDev, }: InstallerOptions): Promise<void>;
|
12
|
+
installPackage(moduleRequest: ModuleRequest, fs: FileSystem, packagePath: FilePath): Promise<any>;
|
13
|
+
}
|
14
|
+
export {};
|
@@ -0,0 +1,36 @@
|
|
1
|
+
import type { FilePath, DependencySpecifier, SemverRange } from '@atlaspack/types';
|
2
|
+
import type { FileSystem } from '@atlaspack/fs';
|
3
|
+
import type { ModuleRequest, PackageManager, PackageInstaller, InstallOptions, Invalidations, PackageManagerResolveResult } from '@atlaspack/types';
|
4
|
+
export declare class NodePackageManager implements PackageManager {
|
5
|
+
fs: FileSystem;
|
6
|
+
projectRoot: FilePath;
|
7
|
+
installer: PackageInstaller | null | undefined;
|
8
|
+
resolver: ResolverBase;
|
9
|
+
currentExtensions: Array<string>;
|
10
|
+
constructor(fs: FileSystem, projectRoot: FilePath, installer?: PackageInstaller | null);
|
11
|
+
_createResolver(): ResolverBase;
|
12
|
+
static deserialize(opts: any): NodePackageManager;
|
13
|
+
serialize(): {
|
14
|
+
$$raw: boolean;
|
15
|
+
fs: FileSystem;
|
16
|
+
projectRoot: FilePath;
|
17
|
+
installer: PackageInstaller | null | undefined;
|
18
|
+
};
|
19
|
+
require(name: DependencySpecifier, from: FilePath, opts?: {
|
20
|
+
range?: SemverRange | null | undefined;
|
21
|
+
shouldAutoInstall?: boolean;
|
22
|
+
saveDev?: boolean;
|
23
|
+
} | null): Promise<any>;
|
24
|
+
requireSync(name: DependencySpecifier, from: FilePath): any;
|
25
|
+
load(filePath: FilePath, from: FilePath): any;
|
26
|
+
resolve(id: DependencySpecifier, from: FilePath, options?: {
|
27
|
+
range?: SemverRange | null | undefined;
|
28
|
+
shouldAutoInstall?: boolean;
|
29
|
+
saveDev?: boolean;
|
30
|
+
} | null): Promise<PackageManagerResolveResult>;
|
31
|
+
resolveSync(name: DependencySpecifier, from: FilePath): PackageManagerResolveResult;
|
32
|
+
install(modules: Array<ModuleRequest>, from: FilePath, opts?: InstallOptions): Promise<void>;
|
33
|
+
getInvalidations(name: DependencySpecifier, from: FilePath): Invalidations;
|
34
|
+
invalidate(name: DependencySpecifier, from: FilePath): void;
|
35
|
+
resolveInternal(name: string, from: string): PackageManagerResolveResult;
|
36
|
+
}
|
package/lib/Npm.d.ts
ADDED
package/lib/Pnpm.d.ts
ADDED
package/lib/Yarn.d.ts
ADDED
package/lib/index.d.ts
ADDED
@@ -0,0 +1,10 @@
|
|
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 };
|
@@ -0,0 +1,5 @@
|
|
1
|
+
import type { FilePath } from '@atlaspack/types';
|
2
|
+
import type { ModuleRequest, PackageManager, InstallOptions } from '@atlaspack/types';
|
3
|
+
import type { FileSystem } from '@atlaspack/fs';
|
4
|
+
export declare function _addToInstallQueue(fs: FileSystem, packageManager: PackageManager, modules: Array<ModuleRequest>, filePath: FilePath, projectRoot: FilePath, options?: InstallOptions): Promise<unknown>;
|
5
|
+
export declare function installPackage(fs: FileSystem, packageManager: PackageManager, modules: Array<ModuleRequest>, filePath: FilePath, projectRoot: FilePath, options?: InstallOptions): Promise<unknown>;
|
package/lib/utils.d.ts
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
import type { FilePath, ModuleRequest } from '@atlaspack/types';
|
2
|
+
import type { FileSystem } from '@atlaspack/fs';
|
3
|
+
export declare const exec: (command: string, options?: child_process.execOpts) => Promise<{
|
4
|
+
stdout: string | Buffer;
|
5
|
+
stderr: string | Buffer;
|
6
|
+
}>;
|
7
|
+
export declare function npmSpecifierFromModuleRequest(moduleRequest: ModuleRequest): string;
|
8
|
+
export declare function moduleRequestsFromDependencyMap(dependencyMap: {
|
9
|
+
[key: string]: string;
|
10
|
+
}): Array<ModuleRequest>;
|
11
|
+
export declare function getConflictingLocalDependencies(fs: FileSystem, name: string, local: FilePath, projectRoot: FilePath): Promise<{
|
12
|
+
json: string;
|
13
|
+
filePath: FilePath;
|
14
|
+
fields: Array<string>;
|
15
|
+
} | null | undefined>;
|
@@ -0,0 +1 @@
|
|
1
|
+
export default function validateModuleSpecifier(moduleName: string): string;
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@atlaspack/package-manager",
|
3
|
-
"version": "2.14.21-typescript-
|
3
|
+
"version": "2.14.21-typescript-e99c742e9.0",
|
4
4
|
"description": "Blazing fast, zero configuration web application bundler",
|
5
5
|
"license": "(MIT OR Apache-2.0)",
|
6
6
|
"publishConfig": {
|
@@ -38,14 +38,14 @@
|
|
38
38
|
}
|
39
39
|
},
|
40
40
|
"dependencies": {
|
41
|
-
"@atlaspack/build-cache": "2.13.4-typescript-
|
42
|
-
"@atlaspack/diagnostic": "2.14.2-typescript-
|
43
|
-
"@atlaspack/fs": "2.15.16-typescript-
|
44
|
-
"@atlaspack/logger": "2.14.14-typescript-
|
45
|
-
"@atlaspack/node-resolver-core": "3.5.21-typescript-
|
46
|
-
"@atlaspack/types": "2.15.11-typescript-
|
47
|
-
"@atlaspack/utils": "2.17.3-typescript-
|
48
|
-
"@atlaspack/workers": "2.14.21-typescript-
|
41
|
+
"@atlaspack/build-cache": "2.13.4-typescript-e99c742e9.0",
|
42
|
+
"@atlaspack/diagnostic": "2.14.2-typescript-e99c742e9.0",
|
43
|
+
"@atlaspack/fs": "2.15.16-typescript-e99c742e9.0",
|
44
|
+
"@atlaspack/logger": "2.14.14-typescript-e99c742e9.0",
|
45
|
+
"@atlaspack/node-resolver-core": "3.5.21-typescript-e99c742e9.0",
|
46
|
+
"@atlaspack/types": "2.15.11-typescript-e99c742e9.0",
|
47
|
+
"@atlaspack/utils": "2.17.3-typescript-e99c742e9.0",
|
48
|
+
"@atlaspack/workers": "2.14.21-typescript-e99c742e9.0",
|
49
49
|
"@swc/core": "^1.10.0",
|
50
50
|
"command-exists": "^1.2.6",
|
51
51
|
"cross-spawn": "^6.0.4",
|
@@ -60,5 +60,5 @@
|
|
60
60
|
"./src/Yarn.js": false
|
61
61
|
},
|
62
62
|
"type": "commonjs",
|
63
|
-
"gitHead": "
|
63
|
+
"gitHead": "e99c742e92175ac411d807daf2ba45d5bacebb58"
|
64
64
|
}
|