isolated-deps 0.1.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.
@@ -0,0 +1 @@
1
+ export declare function resolvePackageFromInstallRoot(dependencyId: string, installRoot: string): string | undefined;
@@ -0,0 +1,11 @@
1
+ import { type OptionalDependencySpec } from './package-specs';
2
+ export type InstallOptionalDependenciesOptions = {
3
+ index?: number;
4
+ total?: number;
5
+ forceRecreateInstallRoot?: boolean;
6
+ };
7
+ export declare function installOptionalDependencies(integration: string, dependencySpecs: OptionalDependencySpec[], options?: InstallOptionalDependenciesOptions): Promise<boolean | undefined>;
8
+ export declare function installOptionalDependenciesBatch(plans: Array<{
9
+ integration: string;
10
+ dependencySpecs: OptionalDependencySpec[];
11
+ }>): Promise<boolean | undefined>;
@@ -0,0 +1,5 @@
1
+ export declare function optionalToolingSetup(integrations: string[] | undefined, fallback: string, isAuthor: boolean): string[];
2
+ export declare function optionalToolingRootInstall(integration: string): string;
3
+ export declare function optionalToolingReady(integration: string): string;
4
+ export declare function optionalInstallFailed(integration: string, error: unknown, isAuthor: boolean): string;
5
+ export declare function optionalInstallManagerMissing(integration: string): string;
@@ -0,0 +1,31 @@
1
+ export type PackageManagerName = 'pnpm' | 'yarn' | 'npm' | 'bun';
2
+ export type PackageManagerResolution = {
3
+ name: PackageManagerName;
4
+ execPath?: string;
5
+ runnerCommand?: string;
6
+ runnerArgs?: string[];
7
+ };
8
+ type ExecOptions = {
9
+ cwd?: string;
10
+ env?: NodeJS.ProcessEnv;
11
+ stdio?: 'inherit' | 'ignore' | 'pipe';
12
+ };
13
+ export declare function resolvePackageManager(opts?: {
14
+ cwd?: string;
15
+ }): PackageManagerResolution;
16
+ export declare function buildExecEnv(): NodeJS.ProcessEnv | undefined;
17
+ export declare function buildInstallCommand(pm: PackageManagerResolution, args: string[]): {
18
+ command: string;
19
+ args: string[];
20
+ };
21
+ export declare function buildNpmCliFallback(args: string[]): {
22
+ command: string;
23
+ args: string[];
24
+ } | undefined;
25
+ export declare function buildSpawnInvocation(command: string, args: string[]): {
26
+ command: string;
27
+ args: string[];
28
+ };
29
+ export declare function execInstallCommand(command: string, args: string[], options?: ExecOptions): Promise<void>;
30
+ export declare function getInstallCommandForPath(cwd: string): PackageManagerName;
31
+ export {};
@@ -0,0 +1,9 @@
1
+ export type OptionalDependencySpec = string;
2
+ type ParsedOptionalDependencySpec = {
3
+ packageId: string;
4
+ versionSpecifier: string;
5
+ };
6
+ export declare function parseOptionalDependencySpec(spec: OptionalDependencySpec): ParsedOptionalDependencySpec;
7
+ export declare function getPackageIdFromSpec(spec: OptionalDependencySpec): string;
8
+ export declare function getVersionSpecifierFromSpec(spec: OptionalDependencySpec): string;
9
+ export {};
@@ -0,0 +1,3 @@
1
+ export declare function resolveDevelopInstallRoot(): string | undefined;
2
+ export declare function resolveOptionalInstallRoot(): string;
3
+ export declare function hasDependency(projectPath: string, dependency: string): boolean;
package/package.json ADDED
@@ -0,0 +1,66 @@
1
+ {
2
+ "name": "isolated-deps",
3
+ "version": "0.1.0",
4
+ "description": "Deterministically install dependencies into an isolated cache root.",
5
+ "license": "MIT",
6
+ "repository": {
7
+ "type": "git",
8
+ "url": "https://github.com/cezaraugusto/isolated-deps.git"
9
+ },
10
+ "type": "module",
11
+ "engines": {
12
+ "node": ">=18"
13
+ },
14
+ "exports": {
15
+ ".": {
16
+ "types": "./dist/index.d.ts",
17
+ "import": "./dist/index.js",
18
+ "require": "./dist/index.cjs"
19
+ }
20
+ },
21
+ "main": "./dist/index.cjs",
22
+ "types": "./dist/index.d.ts",
23
+ "files": [
24
+ "dist"
25
+ ],
26
+ "author": {
27
+ "name": "Cezar Augusto",
28
+ "email": "boss@cezaraugusto.net",
29
+ "url": "https://cezaraugusto.net"
30
+ },
31
+ "homepage": "https://www.npmjs.com/package/isolated-deps",
32
+ "scripts": {
33
+ "build": "node -e \"require('fs').rmSync('dist', { recursive: true, force: true })\" && rslib build",
34
+ "dev": "rslib build --watch",
35
+ "test": "vitest run",
36
+ "test:integration": "vitest run __spec__/manager-integration.spec.ts",
37
+ "prepublishOnly": "npm run build && npm test",
38
+ "publish:provenance": "np patch --no-tests --any-branch --yolo --message 'release: %s' --provenance"
39
+ },
40
+ "keywords": [
41
+ "isolated-dependencies",
42
+ "package-installation",
43
+ "package-manager",
44
+ "deterministic-installs",
45
+ "npm",
46
+ "pnpm",
47
+ "yarn",
48
+ "bun",
49
+ "cache"
50
+ ],
51
+ "dependencies": {
52
+ "pintor": "0.3.0"
53
+ },
54
+ "devDependencies": {
55
+ "@rslib/core": "^0.6.9",
56
+ "@types/node": "^22.8.1",
57
+ "np": "^10.2.0",
58
+ "typescript": "^5.8.3",
59
+ "vitest": "^3.1.3"
60
+ },
61
+ "publishConfig": {
62
+ "access": "public",
63
+ "provenance": true
64
+ },
65
+ "packageManager": "pnpm@9.9.0+sha512.60c18acd138bff695d339be6ad13f7e936eea6745660d4cc4a776d5247c540d0edee1a563695c183a66eb917ef88f2b4feb1fc25f32a7adcadc7aaf3438e99c1"
66
+ }