isolate-package 1.24.0-1 → 1.24.0-2

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/dist/index.mjs CHANGED
@@ -1,12 +1,12 @@
1
1
  // src/isolate.ts
2
2
  import fs15 from "fs-extra";
3
- import assert6 from "node:assert";
4
- import path20 from "node:path";
3
+ import assert6 from "assert";
4
+ import path20 from "path";
5
5
  import { unique as unique2 } from "remeda";
6
6
 
7
7
  // src/lib/config.ts
8
8
  import fs8 from "fs-extra";
9
- import path6 from "node:path";
9
+ import path6 from "path";
10
10
  import { isEmpty } from "remeda";
11
11
 
12
12
  // src/lib/logger.ts
@@ -77,14 +77,14 @@ function toErrorWithMessage(maybeError) {
77
77
  }
78
78
 
79
79
  // src/lib/utils/inspect-value.ts
80
- import { inspect } from "node:util";
80
+ import { inspect } from "util";
81
81
  function inspectValue(value) {
82
82
  return inspect(value, false, 16, true);
83
83
  }
84
84
 
85
85
  // src/lib/utils/is-rush-workspace.ts
86
- import fs from "node:fs";
87
- import path from "node:path";
86
+ import fs from "fs";
87
+ import path from "path";
88
88
  function isRushWorkspace(workspaceRootDir) {
89
89
  return fs.existsSync(path.join(workspaceRootDir, "rush.json"));
90
90
  }
@@ -120,7 +120,7 @@ async function readTypedJson(filePath) {
120
120
  }
121
121
 
122
122
  // src/lib/utils/log-paths.ts
123
- import { join } from "node:path";
123
+ import { join } from "path";
124
124
  function getRootRelativeLogPath(path21, rootPath) {
125
125
  const strippedPath = path21.replace(rootPath, "");
126
126
  return join("(root)", strippedPath);
@@ -131,18 +131,18 @@ function getIsolateRelativeLogPath(path21, isolatePath) {
131
131
  }
132
132
 
133
133
  // src/lib/utils/pack.ts
134
- import assert2 from "node:assert";
135
- import { exec } from "node:child_process";
136
- import fs5 from "node:fs";
137
- import path5 from "node:path";
134
+ import assert2 from "assert";
135
+ import { exec } from "child_process";
136
+ import fs5 from "fs";
137
+ import path5 from "path";
138
138
 
139
139
  // src/lib/package-manager/index.ts
140
- import path4 from "node:path";
140
+ import path4 from "path";
141
141
 
142
142
  // src/lib/package-manager/helpers/infer-from-files.ts
143
143
  import fs3 from "fs-extra";
144
- import { execSync } from "node:child_process";
145
- import path2 from "node:path";
144
+ import { execSync } from "child_process";
145
+ import path2 from "path";
146
146
 
147
147
  // src/lib/utils/get-major-version.ts
148
148
  function getMajorVersion(version) {
@@ -197,8 +197,8 @@ function getVersion(packageManagerName) {
197
197
 
198
198
  // src/lib/package-manager/helpers/infer-from-manifest.ts
199
199
  import fs4 from "fs-extra";
200
- import assert from "node:assert";
201
- import path3 from "node:path";
200
+ import assert from "assert";
201
+ import path3 from "path";
202
202
  function inferFromManifest(workspaceRoot) {
203
203
  const log = useLogger();
204
204
  const { packageManager: packageManagerString } = readTypedJsonSync(
@@ -382,7 +382,7 @@ function resolveConfig(initialConfig) {
382
382
  // src/lib/lockfile/helpers/generate-npm-lockfile.ts
383
383
  import Arborist from "@npmcli/arborist";
384
384
  import fs9 from "fs-extra";
385
- import path7 from "node:path";
385
+ import path7 from "path";
386
386
 
387
387
  // src/lib/lockfile/helpers/load-npm-config.ts
388
388
  import Config from "@npmcli/config";
@@ -427,8 +427,8 @@ async function generateNpmLockfile({
427
427
  }
428
428
 
429
429
  // src/lib/lockfile/helpers/generate-pnpm-lockfile.ts
430
- import assert3 from "node:assert";
431
- import path9 from "node:path";
430
+ import assert3 from "assert";
431
+ import path9 from "path";
432
432
  import {
433
433
  getLockfileImporterId as getLockfileImporterId_v8,
434
434
  readWantedLockfile as readWantedLockfile_v8,
@@ -444,7 +444,7 @@ import { pruneLockfile as pruneLockfile_v9 } from "pnpm_prune_lockfile_v9";
444
444
  import { pick } from "remeda";
445
445
 
446
446
  // src/lib/lockfile/helpers/pnpm-map-importer.ts
447
- import path8 from "node:path";
447
+ import path8 from "path";
448
448
  import { mapValues } from "remeda";
449
449
  function pnpmMapImporter(importerPath, { dependencies, devDependencies, ...rest }, {
450
450
  includeDevDependencies,
@@ -583,8 +583,8 @@ async function generatePnpmLockfile({
583
583
 
584
584
  // src/lib/lockfile/helpers/generate-yarn-lockfile.ts
585
585
  import fs10 from "fs-extra";
586
- import { execSync as execSync2 } from "node:child_process";
587
- import path10 from "node:path";
586
+ import { execSync as execSync2 } from "child_process";
587
+ import path10 from "path";
588
588
  async function generateYarnLockfile({
589
589
  workspaceRootDir,
590
590
  isolateDir
@@ -695,12 +695,12 @@ async function processLockfile({
695
695
  import { omit as omit2, pick as pick2 } from "remeda";
696
696
 
697
697
  // src/lib/manifest/helpers/adapt-internal-package-manifests.ts
698
- import path13 from "node:path";
698
+ import path13 from "path";
699
699
  import { omit } from "remeda";
700
700
 
701
701
  // src/lib/manifest/io.ts
702
702
  import fs11 from "fs-extra";
703
- import path11 from "node:path";
703
+ import path11 from "path";
704
704
  async function readManifest(packageDir) {
705
705
  return readTypedJson(path11.join(packageDir, "package.json"));
706
706
  }
@@ -712,7 +712,7 @@ async function writeManifest(outputDir, manifest) {
712
712
  }
713
713
 
714
714
  // src/lib/manifest/helpers/patch-internal-entries.ts
715
- import path12 from "node:path";
715
+ import path12 from "path";
716
716
  function patchInternalEntries(dependencies, packagesRegistry, parentRootRelativeDir) {
717
717
  const log = useLogger();
718
718
  const allWorkspacePackageNames = Object.keys(packagesRegistry);
@@ -882,7 +882,7 @@ function validateManifestMandatoryFields(manifest, packagePath) {
882
882
 
883
883
  // src/lib/output/get-build-output-dir.ts
884
884
  import { getTsconfig } from "get-tsconfig";
885
- import path15 from "node:path";
885
+ import path15 from "path";
886
886
  import outdent from "outdent";
887
887
  async function getBuildOutputDir({
888
888
  targetPackageDir,
@@ -915,7 +915,7 @@ async function getBuildOutputDir({
915
915
  }
916
916
 
917
917
  // src/lib/output/pack-dependencies.ts
918
- import assert4 from "node:assert";
918
+ import assert4 from "assert";
919
919
  async function packDependencies({
920
920
  /** All packages found in the monorepo by workspaces declaration */
921
921
  packagesRegistry,
@@ -946,7 +946,7 @@ async function packDependencies({
946
946
 
947
947
  // src/lib/output/process-build-output-files.ts
948
948
  import fs12 from "fs-extra";
949
- import path16 from "node:path";
949
+ import path16 from "path";
950
950
  var TIMEOUT_MS = 5e3;
951
951
  async function processBuildOutputFiles({
952
952
  targetPackageDir,
@@ -971,7 +971,7 @@ async function processBuildOutputFiles({
971
971
 
972
972
  // src/lib/output/unpack-dependencies.ts
973
973
  import fs13 from "fs-extra";
974
- import path17, { join as join2 } from "node:path";
974
+ import path17, { join as join2 } from "path";
975
975
  async function unpackDependencies(packedFilesByName, packagesRegistry, tmpDir, isolateDir) {
976
976
  const log = useLogger();
977
977
  await Promise.all(
@@ -998,11 +998,11 @@ async function unpackDependencies(packedFilesByName, packagesRegistry, tmpDir, i
998
998
  // src/lib/registry/create-packages-registry.ts
999
999
  import fs14 from "fs-extra";
1000
1000
  import { globSync } from "glob";
1001
- import path19 from "node:path";
1001
+ import path19 from "path";
1002
1002
 
1003
1003
  // src/lib/registry/helpers/find-packages-globs.ts
1004
- import assert5 from "node:assert";
1005
- import path18 from "node:path";
1004
+ import assert5 from "assert";
1005
+ import path18 from "path";
1006
1006
  function findPackagesGlobs(workspaceRootDir) {
1007
1007
  const log = useLogger();
1008
1008
  const packageManager2 = usePackageManager();
@@ -1,18 +1,18 @@
1
1
  #!/usr/bin/env node
2
2
 
3
3
  // src/isolate-bin.ts
4
- import console2 from "node:console";
4
+ import console2 from "console";
5
5
  import sourceMaps from "source-map-support";
6
6
 
7
7
  // src/isolate.ts
8
8
  import fs15 from "fs-extra";
9
- import assert6 from "node:assert";
10
- import path20 from "node:path";
9
+ import assert6 from "assert";
10
+ import path20 from "path";
11
11
  import { unique as unique2 } from "remeda";
12
12
 
13
13
  // src/lib/config.ts
14
14
  import fs8 from "fs-extra";
15
- import path6 from "node:path";
15
+ import path6 from "path";
16
16
  import { isEmpty } from "remeda";
17
17
 
18
18
  // src/lib/logger.ts
@@ -83,14 +83,14 @@ function toErrorWithMessage(maybeError) {
83
83
  }
84
84
 
85
85
  // src/lib/utils/inspect-value.ts
86
- import { inspect } from "node:util";
86
+ import { inspect } from "util";
87
87
  function inspectValue(value) {
88
88
  return inspect(value, false, 16, true);
89
89
  }
90
90
 
91
91
  // src/lib/utils/is-rush-workspace.ts
92
- import fs from "node:fs";
93
- import path from "node:path";
92
+ import fs from "fs";
93
+ import path from "path";
94
94
  function isRushWorkspace(workspaceRootDir) {
95
95
  return fs.existsSync(path.join(workspaceRootDir, "rush.json"));
96
96
  }
@@ -126,7 +126,7 @@ async function readTypedJson(filePath) {
126
126
  }
127
127
 
128
128
  // src/lib/utils/log-paths.ts
129
- import { join } from "node:path";
129
+ import { join } from "path";
130
130
  function getRootRelativeLogPath(path21, rootPath) {
131
131
  const strippedPath = path21.replace(rootPath, "");
132
132
  return join("(root)", strippedPath);
@@ -137,18 +137,18 @@ function getIsolateRelativeLogPath(path21, isolatePath) {
137
137
  }
138
138
 
139
139
  // src/lib/utils/pack.ts
140
- import assert2 from "node:assert";
141
- import { exec } from "node:child_process";
142
- import fs5 from "node:fs";
143
- import path5 from "node:path";
140
+ import assert2 from "assert";
141
+ import { exec } from "child_process";
142
+ import fs5 from "fs";
143
+ import path5 from "path";
144
144
 
145
145
  // src/lib/package-manager/index.ts
146
- import path4 from "node:path";
146
+ import path4 from "path";
147
147
 
148
148
  // src/lib/package-manager/helpers/infer-from-files.ts
149
149
  import fs3 from "fs-extra";
150
- import { execSync } from "node:child_process";
151
- import path2 from "node:path";
150
+ import { execSync } from "child_process";
151
+ import path2 from "path";
152
152
 
153
153
  // src/lib/utils/get-major-version.ts
154
154
  function getMajorVersion(version) {
@@ -203,8 +203,8 @@ function getVersion(packageManagerName) {
203
203
 
204
204
  // src/lib/package-manager/helpers/infer-from-manifest.ts
205
205
  import fs4 from "fs-extra";
206
- import assert from "node:assert";
207
- import path3 from "node:path";
206
+ import assert from "assert";
207
+ import path3 from "path";
208
208
  function inferFromManifest(workspaceRoot) {
209
209
  const log = useLogger();
210
210
  const { packageManager: packageManagerString } = readTypedJsonSync(
@@ -388,7 +388,7 @@ function resolveConfig(initialConfig) {
388
388
  // src/lib/lockfile/helpers/generate-npm-lockfile.ts
389
389
  import Arborist from "@npmcli/arborist";
390
390
  import fs9 from "fs-extra";
391
- import path7 from "node:path";
391
+ import path7 from "path";
392
392
 
393
393
  // src/lib/lockfile/helpers/load-npm-config.ts
394
394
  import Config from "@npmcli/config";
@@ -433,8 +433,8 @@ async function generateNpmLockfile({
433
433
  }
434
434
 
435
435
  // src/lib/lockfile/helpers/generate-pnpm-lockfile.ts
436
- import assert3 from "node:assert";
437
- import path9 from "node:path";
436
+ import assert3 from "assert";
437
+ import path9 from "path";
438
438
  import {
439
439
  getLockfileImporterId as getLockfileImporterId_v8,
440
440
  readWantedLockfile as readWantedLockfile_v8,
@@ -450,7 +450,7 @@ import { pruneLockfile as pruneLockfile_v9 } from "pnpm_prune_lockfile_v9";
450
450
  import { pick } from "remeda";
451
451
 
452
452
  // src/lib/lockfile/helpers/pnpm-map-importer.ts
453
- import path8 from "node:path";
453
+ import path8 from "path";
454
454
  import { mapValues } from "remeda";
455
455
  function pnpmMapImporter(importerPath, { dependencies, devDependencies, ...rest }, {
456
456
  includeDevDependencies,
@@ -589,8 +589,8 @@ async function generatePnpmLockfile({
589
589
 
590
590
  // src/lib/lockfile/helpers/generate-yarn-lockfile.ts
591
591
  import fs10 from "fs-extra";
592
- import { execSync as execSync2 } from "node:child_process";
593
- import path10 from "node:path";
592
+ import { execSync as execSync2 } from "child_process";
593
+ import path10 from "path";
594
594
  async function generateYarnLockfile({
595
595
  workspaceRootDir,
596
596
  isolateDir
@@ -701,12 +701,12 @@ async function processLockfile({
701
701
  import { omit as omit2, pick as pick2 } from "remeda";
702
702
 
703
703
  // src/lib/manifest/helpers/adapt-internal-package-manifests.ts
704
- import path13 from "node:path";
704
+ import path13 from "path";
705
705
  import { omit } from "remeda";
706
706
 
707
707
  // src/lib/manifest/io.ts
708
708
  import fs11 from "fs-extra";
709
- import path11 from "node:path";
709
+ import path11 from "path";
710
710
  async function readManifest(packageDir) {
711
711
  return readTypedJson(path11.join(packageDir, "package.json"));
712
712
  }
@@ -718,7 +718,7 @@ async function writeManifest(outputDir, manifest) {
718
718
  }
719
719
 
720
720
  // src/lib/manifest/helpers/patch-internal-entries.ts
721
- import path12 from "node:path";
721
+ import path12 from "path";
722
722
  function patchInternalEntries(dependencies, packagesRegistry, parentRootRelativeDir) {
723
723
  const log = useLogger();
724
724
  const allWorkspacePackageNames = Object.keys(packagesRegistry);
@@ -888,7 +888,7 @@ function validateManifestMandatoryFields(manifest, packagePath) {
888
888
 
889
889
  // src/lib/output/get-build-output-dir.ts
890
890
  import { getTsconfig } from "get-tsconfig";
891
- import path15 from "node:path";
891
+ import path15 from "path";
892
892
  import outdent from "outdent";
893
893
  async function getBuildOutputDir({
894
894
  targetPackageDir,
@@ -921,7 +921,7 @@ async function getBuildOutputDir({
921
921
  }
922
922
 
923
923
  // src/lib/output/pack-dependencies.ts
924
- import assert4 from "node:assert";
924
+ import assert4 from "assert";
925
925
  async function packDependencies({
926
926
  /** All packages found in the monorepo by workspaces declaration */
927
927
  packagesRegistry,
@@ -952,7 +952,7 @@ async function packDependencies({
952
952
 
953
953
  // src/lib/output/process-build-output-files.ts
954
954
  import fs12 from "fs-extra";
955
- import path16 from "node:path";
955
+ import path16 from "path";
956
956
  var TIMEOUT_MS = 5e3;
957
957
  async function processBuildOutputFiles({
958
958
  targetPackageDir,
@@ -977,7 +977,7 @@ async function processBuildOutputFiles({
977
977
 
978
978
  // src/lib/output/unpack-dependencies.ts
979
979
  import fs13 from "fs-extra";
980
- import path17, { join as join2 } from "node:path";
980
+ import path17, { join as join2 } from "path";
981
981
  async function unpackDependencies(packedFilesByName, packagesRegistry, tmpDir, isolateDir) {
982
982
  const log = useLogger();
983
983
  await Promise.all(
@@ -1004,11 +1004,11 @@ async function unpackDependencies(packedFilesByName, packagesRegistry, tmpDir, i
1004
1004
  // src/lib/registry/create-packages-registry.ts
1005
1005
  import fs14 from "fs-extra";
1006
1006
  import { globSync } from "glob";
1007
- import path19 from "node:path";
1007
+ import path19 from "path";
1008
1008
 
1009
1009
  // src/lib/registry/helpers/find-packages-globs.ts
1010
- import assert5 from "node:assert";
1011
- import path18 from "node:path";
1010
+ import assert5 from "assert";
1011
+ import path18 from "path";
1012
1012
  function findPackagesGlobs(workspaceRootDir) {
1013
1013
  const log = useLogger();
1014
1014
  const packageManager2 = usePackageManager();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "isolate-package",
3
- "version": "1.24.0-1",
3
+ "version": "1.24.0-2",
4
4
  "description": "Isolate a monorepo package with its shared dependencies to form a self-contained directory, compatible with Firebase deploy",
5
5
  "author": "Thijs Koerselman",
6
6
  "license": "MIT",
@@ -74,7 +74,7 @@
74
74
  "test": "vitest --run",
75
75
  "format": "prettier --write .",
76
76
  "lint": "eslint . --max-warnings 0",
77
- "lint:format": "prettier --check .",
78
- "compile": "tsc --noEmit"
77
+ "check-format": "prettier --check .",
78
+ "check-types": "tsc --noEmit"
79
79
  }
80
80
  }