@preventive/deptree 1.5.2 → 1.5.4

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.
Files changed (80) hide show
  1. package/bin/compare.js +10 -21
  2. package/bin/deptree.js +5 -10
  3. package/cargo.d.ts +139 -195
  4. package/cargo.js +0 -2
  5. package/cocoapods.d.ts +211 -381
  6. package/cocoapods.js +0 -2
  7. package/npm.d.ts +245 -369
  8. package/npm.js +4 -6
  9. package/package.json +1 -1
  10. package/pnpm.d.ts +258 -667
  11. package/pnpm.js +2 -4
  12. package/soldeer.d.ts +144 -215
  13. package/soldeer.js +0 -2
  14. package/src/cargo/crate.js +21 -46
  15. package/src/cargo/inputs.js +5 -8
  16. package/src/cargo/members.js +6 -12
  17. package/src/cargo/registry.js +5 -9
  18. package/src/cargo/tree.js +8 -13
  19. package/src/cargo/workspace.js +13 -26
  20. package/src/cocoapods/archive.js +19 -40
  21. package/src/cocoapods/clean.js +21 -45
  22. package/src/cocoapods/fnmatch.js +12 -27
  23. package/src/cocoapods/inputs.js +5 -11
  24. package/src/cocoapods/install.js +11 -24
  25. package/src/cocoapods/podspec.js +19 -40
  26. package/src/cocoapods/podtree.js +10 -19
  27. package/src/cocoapods/source.js +13 -30
  28. package/src/cocoapods/tree.js +17 -39
  29. package/src/cocoapods/unicode.js +3 -9
  30. package/src/github.js +12 -24
  31. package/src/glob.js +2 -4
  32. package/src/lazy.js +2 -4
  33. package/src/manifest.js +2 -4
  34. package/src/matcher.js +3 -5
  35. package/src/mount.js +7 -14
  36. package/src/npm/bins.js +3 -5
  37. package/src/npm/compat.js +3 -5
  38. package/src/npm/package.js +13 -14
  39. package/src/npm/ratio.js +3 -5
  40. package/src/npm/settings.js +3 -5
  41. package/src/npm/tree.js +6 -11
  42. package/src/npm/versions.js +3 -4
  43. package/src/npmrc.js +2 -4
  44. package/src/patch.js +8 -14
  45. package/src/pnpm/bins.js +16 -42
  46. package/src/pnpm/filename.js +2 -4
  47. package/src/pnpm/gitignore.js +2 -4
  48. package/src/pnpm/glob.js +3 -5
  49. package/src/pnpm/hoist.js +8 -16
  50. package/src/pnpm/hoisted.js +15 -44
  51. package/src/pnpm/hook.js +2 -4
  52. package/src/pnpm/install.js +5 -10
  53. package/src/pnpm/lazy.js +8 -23
  54. package/src/pnpm/local.js +2 -4
  55. package/src/pnpm/minimatch.js +8 -15
  56. package/src/pnpm/nm-hoist.js +5 -11
  57. package/src/pnpm/npm-packlist.js +3 -6
  58. package/src/pnpm/overrides.js +2 -4
  59. package/src/pnpm/package.js +10 -16
  60. package/src/pnpm/packlist.js +3 -7
  61. package/src/pnpm/patches.js +3 -4
  62. package/src/pnpm/production.js +9 -28
  63. package/src/pnpm/projects.js +2 -6
  64. package/src/pnpm/readers.js +2 -4
  65. package/src/pnpm/settings.js +2 -5
  66. package/src/pnpm/tree.js +14 -37
  67. package/src/pnpm/workspace.js +4 -7
  68. package/src/pnpm/write.js +1 -1
  69. package/src/soldeer/config.js +5 -9
  70. package/src/soldeer/tree.js +2 -4
  71. package/src/soldeer/zip.js +8 -17
  72. package/src/tarball.js +12 -29
  73. package/src/yarn1/compat.js +2 -4
  74. package/src/yarn1/hoist.js +3 -8
  75. package/src/yarn1/package.js +12 -23
  76. package/src/yarn1/resolve.js +6 -11
  77. package/src/yarn1/settings.js +5 -10
  78. package/src/yarn1/tree.js +9 -18
  79. package/yarn1.d.ts +203 -360
  80. package/yarn1.js +4 -6
@@ -1,8 +1,5 @@
1
- // A registry zip as Soldeer 0.12 extracts it (download.rs's
2
- // extract_dependency_archive, zip crate 8.6); what the archive reader takes
3
- // and the two would read otherwise is refused. As a 0o022 umask leaves them,
4
- // every directory is 0o755, and a file's mode its Unix mode as the zip crate
5
- // reads it, or 0o644 where it reads none; a symlink is a file of its target.
1
+ // A registry zip as Soldeer 0.12 extracts it (download.rs's extract_dependency_archive, zip crate 8.6),
2
+ // under a 0o022 umask; what the archive reader takes and the two would read otherwise is refused
6
3
 
7
4
  import { utf8fromStringLoose } from '@exodus/bytes/utf8.js'
8
5
  import { ArchiveError, unzip } from '@preventive/archive/zip.js'
@@ -41,24 +38,18 @@ function unixMode({ system, attributes }) {
41
38
  return attributes & 0x01 ? mode & ~0o222 : mode
42
39
  }
43
40
 
44
- // What str::trim_end_matches(['.', ' ']) and eq_ignore_ascii_case make of
45
- // a component Soldeer holds to `.git`; git's verify_path refuses to check
46
- // one out, with core.protectNTFS, on by default.
41
+ // A component Soldeer holds to `.git` (trim_end_matches(['.', ' ']), eq_ignore_ascii_case), which git's
42
+ // verify_path refuses to check out with core.protectNTFS, on by default
47
43
  export const isGit = (component) => component.replace(/[. ]+$/u, '').replace(/[A-Z]/gu, (char) => char.toLowerCase()) === '.git'
48
44
 
49
- // getZip has held the zip to its checksum; it is held to it again where it
50
- // is unpacked.
45
+ // getZip has held the zip to its checksum; it is held to it again where it is unpacked
51
46
  export async function extractZip(bytes, checksum, where) {
52
47
  if (await bytesSha256Hex(bytes) !== checksum) throw new DeptreeError(`its zip's sha256 is not ${checksum}`, where)
53
- let entries
54
- try {
55
- entries = await unzip(bytes, { limit: MAX_BYTES })
56
- } catch (error) {
48
+ const entries = await unzip(bytes, { limit: MAX_BYTES }).catch((error) => {
57
49
  if (error instanceof ArchiveError) throw new DeptreeError(`its zip cannot be read: ${error.message}`, where, { cause: error })
58
50
  throw error
59
- }
60
- // The zip crate keys entries by their names' bytes, here the stored names:
61
- // of two of one name, the later is extracted where the first was.
51
+ })
52
+ // The zip crate keys entries by their stored names: of two of one name, the later is extracted where the first was
62
53
  const last = new Map()
63
54
  for (const [index, entry] of entries.entries()) {
64
55
  const here = `${where}: ${quote(entry.storedName)}`
package/src/tarball.js CHANGED
@@ -1,7 +1,5 @@
1
- // A registry tarball, fetched through @preventive/upstream, which checks the
2
- // integrity it is given, and checked again here, as that is the lockfile's;
3
- // and its version's document from the registry, where asked for, for what
4
- // it says of where the package comes from, or alone, for its size.
1
+ // A registry tarball through @preventive/upstream, its integrity checked again here as the lockfile's,
2
+ // and where asked for its version's document, for where the package comes from or for its size
5
3
 
6
4
  import { decompress } from '@preventive/archive/compression.js'
7
5
  import { unpack } from '@preventive/archive/tar.js'
@@ -20,10 +18,8 @@ export const REGISTRY = 'https://registry.npmjs.org/'
20
18
  // The registry's own URL for a version's tarball, as npm and pnpm spell it.
21
19
  export const tarballUrl = (name, version) => `${REGISTRY}${name}/-/${name.split('/').at(-1)}-${version}.tgz`
22
20
 
23
- // A name and a version that URL holds as they are: ASCII a URL takes
24
- // unescaped, no part of the name `.` or `..`, and nothing that would end the
25
- // path. The lockfile reader holds both to more; the URL fetched is held to
26
- // this whatever reached here.
21
+ // A name and version the URL holds as they are: unescaped ASCII, no part `.` or `..`, nothing that ends
22
+ // the path. The lockfile reader holds both to more; the URL fetched is held to this whatever got here.
27
23
  const NAME = /^(?:@[\w~-][\w.~-]*\/)?[\w~-][\w.~-]*$/u
28
24
  const VERSION = /^[\dA-Za-z][\dA-Za-z.+-]*$/u
29
25
 
@@ -87,14 +83,9 @@ export function withDirs(files, where, dirs = new Set()) {
87
83
  const aboutOf = ({ gitHead, repository, homepage, bugs }) => ({ commit: gitHead, repository, homepage, bugs })
88
84
  export const NO_ABOUT = Object.freeze(aboutOf({}))
89
85
 
90
- // What a tree's options say of what it fetches from npm's registry:
91
- // `metadata`, true unless given false; `cache`, as upstream's CacheOptions
92
- // take it, which keeps each version's document and tarball;
93
- // `sizeEstimateOnly`, false unless given true, for each version's document
94
- // alone (fetchSize); and `lazy`, false unless given true, for nothing until a
95
- // package is unpacked, and then its tarball, as without it. The two are
96
- // refused together: a tree is laid out with sizes alone, or to be unpacked.
97
- // Each is refused with `into`, a Vfs given to mount the tree's files into.
86
+ // What a tree fetches from the registry: `sizeEstimateOnly` the documents alone (fetchSize), `lazy` a
87
+ // tarball as its package is unpacked. The two are refused together, and each with `into`, a Vfs to mount
88
+ // the files into.
98
89
  export function fetchingOf({ metadata = true, cache, sizeEstimateOnly = false, lazy = false }, into) {
99
90
  if (typeof metadata !== 'boolean') throw new TypeError('metadata must be a boolean, or left out')
100
91
  if (cache !== undefined && cache !== false && (typeof cache?.read !== 'function' || typeof cache?.write !== 'function')) {
@@ -110,13 +101,9 @@ export function fetchingOf({ metadata = true, cache, sizeEstimateOnly = false, l
110
101
 
111
102
  const SHA512 = /^sha512-[\d+/A-Za-z]{86}==$/u
112
103
 
113
- // Kept as `cache` says. Without a `given` integrity, as ownTarball lets one
114
- // through unpinned, the registry's is taken from the version document, which
115
- // getMeta holds to the registry's own tarball, and `about` is what that
116
- // says, whatever `metadata` is. Else, with `metadata`, the document is asked
117
- // for beside the tarball, given the dist the tarball is fetched by, which
118
- // getMeta holds the document's to as text, the registry's being the one a
119
- // lockfile copies, so nothing is hashed again. Else NO_ABOUT.
104
+ // Without a `given` integrity, as ownTarball lets one through unpinned, the version document's is taken,
105
+ // and `about` is what it says. Else with `metadata` the document is asked for beside the tarball, held by
106
+ // getMeta to the dist the tarball is fetched by, so nothing is hashed again.
120
107
  export async function fetchTarball(name, version, given, where, { metadata, cache }) {
121
108
  checkId(name, version, where)
122
109
  const meta = given === undefined ? await getMeta(name, version, { cache }) : undefined
@@ -131,12 +118,8 @@ export async function fetchTarball(name, version, given, where, { metadata, cach
131
118
  return { bytes, tar, entries: unpack(tar), inflated: tar.length, integrity, about: said }
132
119
  }
133
120
 
134
- // The version's document alone, asked for as fetchTarball asks for it with
135
- // `metadata` and the lockfile's integrity, which getMeta holds the
136
- // registry's to; no tarball is fetched. `size` is the document's
137
- // unpackedSize, the bytes of the tarball's files as the registry counted
138
- // them, or undefined where it has none; `about` what it says of where the
139
- // package comes from.
121
+ // The version's document alone, asked for as fetchTarball asks for it: `size` its unpackedSize, the
122
+ // bytes of the files as the registry counted them, or undefined
140
123
  export async function fetchSize(name, version, integrity, where, { cache }) {
141
124
  checkId(name, version, where)
142
125
  if (!SHA512.test(integrity)) throw new DeptreeError('a tarball with no sha512 integrity is not supported', where)
@@ -1,7 +1,5 @@
1
- // yarn 1's package-compatibility.js, engines checked against host.node and
2
- // host.yarn; one yarn knows no version of is passed over, as yarn does. A
3
- // Node unknown (host.node left out) takes every range of its own, and of
4
- // what it reports in process.versions.
1
+ // yarn 1's package-compatibility.js against host.node and host.yarn: an engine yarn knows no version of
2
+ // is passed over, as yarn does, and a Node unknown takes every range of its own and its process.versions
5
3
 
6
4
  import { compareVersions, major, satisfies, valid } from '@preventive/upstream/semver.js'
7
5
  import { DeptreeError, quote } from '../error.js'
@@ -1,11 +1,6 @@
1
- // yarn 1's PackageHoister (package-hoister.js), quirks and all: a prepass
2
- // seeds at the top, of several versions of a package, the one most others
3
- // depend on, and a level's requests go by pattern, then those with peers,
4
- // which a check meant to put them after their peers always puts last.
5
- // Departs from yarn only in leaving out nohoist, --focus and --flat, refused
6
- // before it runs, and yarn's record of each step; in comparing `loc` where
7
- // yarn compares cache paths, and references where it compares manifests;
8
- // and in reachedBut, its own.
1
+ // yarn 1's PackageHoister (package-hoister.js), quirks and all: a level's requests go by pattern, then
2
+ // those with peers, which a check meant to put them after their peers puts last. It departs from yarn in
3
+ // comparing `loc` for cache paths and references for manifests, and in reachedBut, its own.
9
4
 
10
5
  import { DeptreeError, quote } from '../error.js'
11
6
 
@@ -1,9 +1,6 @@
1
- // A registry package as yarn 1 installs it, each mode given 0o644 and masked
2
- // by a 0o022 umask as yarn's tarball fetcher does with tar-fs. Held to more
3
- // than yarn holds it to: what npm packs, every entry under one directory,
4
- // none in its own node_modules (npm packs those only for bundled
5
- // dependencies), and a package.json of the lockfile's name and version.
6
- // And a directory by `file:`, as yarn's copy fetcher installs it.
1
+ // A registry package as yarn 1 installs it, each mode given 0o644 and masked by a 0o022 umask as tar-fs
2
+ // does for yarn's fetcher, and held to what npm packs; and a directory by `file:`, as yarn's copy fetcher
3
+ // installs it
7
4
 
8
5
  import { fromBase64 } from '@exodus/bytes/base64.js'
9
6
  import { toHex } from '@exodus/bytes/hex.js'
@@ -47,12 +44,9 @@ function entriesOf(entries, where) {
47
44
 
48
45
  const decoder = new TextDecoder('utf-8', { fatal: true })
49
46
 
50
- // yarn writes the registry's sha512 where it has one, and else a sha1 of its
51
- // shasum. Since this time the registry has made one for every version as it
52
- // was published, by any client: firebase-tools@4.0.3, published then by npm
53
- // 3.10.8, is the first it signed over one it made, and superstatic@6.0.0, at
54
- // 2018-08-03T20:22:28.120Z, the last over none. It has since made one for
55
- // every version published before too.
47
+ // yarn writes a sha1 alone where the registry has no sha512, which it has made for every version as it
48
+ // was published since then: firebase-tools@4.0.3, by npm 3.10.8, is the first it signed over one it made,
49
+ // and superstatic@6.0.0 the last over none
56
50
  const SHA512_SINCE = '2018-08-05T14:58:16.253Z'
57
51
 
58
52
  // The hex of an integrity that is a sha1 alone.
@@ -61,11 +55,9 @@ function sha1Of(integrity) {
61
55
  return toHex(fromBase64(integrity.slice(5)))
62
56
  }
63
57
 
64
- // `name` is the one fetched, as an `npm:` alias asks for it. yarn writes no
65
- // integrity for a pattern that names the tarball's URL, but the sha1 after
66
- // its `#`: the tarball is held to that, and to the registry's sha512. One
67
- // with a sha1 integrity alone is held to it, and to the registry's sha512,
68
- // where it was published before SHA512_SINCE.
58
+ // `name` is the one fetched, as an `npm:` alias asks for it. A pattern naming the tarball's URL has no
59
+ // integrity but the sha1 after its `#`, and one with a sha1 integrity alone has to be published before
60
+ // SHA512_SINCE: each is held to its sha1 and to the registry's sha512.
69
61
  export function registryTarball(entry, name, where) {
70
62
  const { resolution } = entry
71
63
  if (resolution === undefined) throw new DeptreeError('a directory, by file: or link:, is not supported', where)
@@ -117,12 +109,9 @@ export async function fetchYarnPackage({ name, version, integrity, sha1: pinned
117
109
  return { ...withBins({ files, dirs }, manifest, where), sha1, integrity: fetched.integrity, about: fetched.about }
118
110
  }
119
111
 
120
- // A directory by `file:`, as yarn's copy fetcher installs it: all in it, each
121
- // file's mode as it is, but what yarn's copy passes over (tree.js); read from
122
- // the project, as yarn reads it again at every install. Held to more than
123
- // yarn holds it to: no link, device or node_modules of its own in it, and a
124
- // package.json of the name, version and lists its lockfile entry has, which
125
- // yarn reads anew, installing whatever they are.
112
+ // All in the directory, modes as they are, read from the project as yarn reads it at every install. No
113
+ // link, device or node_modules of its own in it, and a package.json of the name, version and lists its
114
+ // lockfile entry has, which yarn would install whatever they are.
126
115
  export function readYarnDirectory(project, { name, version, entry, dir }, where) {
127
116
  if (typeOf(project, `/${dir}`, false) !== 'directory') throw new DeptreeError(`${quote(dir)} is not a directory of the project`, where)
128
117
  const files = new Map()
@@ -6,12 +6,9 @@ import { satisfies, validRange } from '@preventive/upstream/semver.js'
6
6
  import { DeptreeError, quote } from '../error.js'
7
7
  import { matchesGlob } from '../glob.js'
8
8
 
9
- // Beneath a top-level request, all run at once, each taking these microtask
10
- // turns, by its resolver, before it checks for a package of its version: a
11
- // tarball URL as many as the registry. A directory is read at the top level
12
- // alone, where nothing runs beside it; beneath, only one read already is
13
- // asked for again, which yarn reads once all else has run, and takes the
14
- // first's package for.
9
+ // The microtask turns each request beneath a top-level one takes, all at once, before it checks for a
10
+ // package of its version, a tarball URL as many as the registry. A directory is read at the top level
11
+ // alone; beneath, only one read already, which yarn reads once all else has run, taking the first's.
15
12
  const TURNS = { registry: 5, workspace: 3, directory: 1 }
16
13
 
17
14
  // yarn's normalizePattern.
@@ -22,11 +19,9 @@ export function splitPattern(pattern) {
22
19
  return { name: scoped ? `@${name}` : name, range: parts.length === 0 ? 'latest' : version || '*', hasVersion: version !== '' }
23
20
  }
24
21
 
25
- // yarn's normalizeRange: any range but a semver range or one with a `:`,
26
- // such as an `npm:` alias, is a tag. Of the sources getExoticResolver takes,
27
- // in its order, a tarball first, where a path ends in .tgz: the registry's
28
- // own tarball by its URL, on npm's registry or yarn's mirror; and a
29
- // directory, by `file:` or a path.
22
+ // yarn's normalizeRange: a range neither semver nor with a `:`, as an `npm:` alias has, is a tag. Of
23
+ // getExoticResolver's sources, in its order: a tarball where a path ends in .tgz, the registry's own
24
+ // alone, then a directory by `file:` or a path.
30
25
  const TAG = /^[\w~-][\w.~-]*$/u
31
26
  const TARBALL = /^https?:\/\/|^[^@]*\.(?:tgz|tar\.gz)$/u
32
27
  const REGISTRY_TARBALL = /^https:\/\/registry\.(?:npmjs\.org|yarnpkg\.com)\/[^#?]+\.tgz$/u
@@ -1,9 +1,6 @@
1
- // The project's .yarnrc and .npmrc, as far as yarn 1 reads them for an
2
- // install, the .yarnrc's options over the .npmrc's. ignore-platform is
3
- // followed only as a flag, as yarn reads the option and does not act on it.
4
- // Options that change the tree are refused; the rest are for where and how
5
- // yarn fetches, and the tree is held to the lockfile's integrities. A `--`
6
- // line of .yarnrc is a flag yarn adds to its command line.
1
+ // The project's .yarnrc and .npmrc as yarn 1 reads them for an install, the .yarnrc's over the .npmrc's,
2
+ // and a `--` line of the .yarnrc as a flag. What changes the tree is refused; the rest is where and how
3
+ // yarn fetches, and the tree is held to the lockfile's integrities.
7
4
 
8
5
  import { DeptreeError, quote } from '../error.js'
9
6
  import { parseNpmrc } from '../npmrc.js'
@@ -16,10 +13,8 @@ const PASSED = new Set([
16
13
  'check-files', 'pure-lockfile', 'frozen-lockfile', 'audit', 'disable-pnp',
17
14
  ])
18
15
 
19
- // Of the options yarn 1.22 reads by config.getOption, those that change the
20
- // tree, and yarn-path, which runs another yarn. global-folder may be the
21
- // project's directory, where yarn reads no package.json with validate(),
22
- // which drops a name listed twice from all but one of its lists.
16
+ // Of the options config.getOption reads, those that change the tree, and yarn-path, which runs another
17
+ // yarn; global-folder as the project's directory has yarn drop a name listed twice from all but one list
23
18
  const REFUSED = new Set([
24
19
  'ignore-optional', 'production', 'bin-links', 'workspaces-experimental', 'workspaces-nohoist-experimental', 'plugnplay-override',
25
20
  'yarn-link-file-dependencies', 'enable-meta-folder', 'experimental-pack-script-packages-in-mirror', 'global-folder', 'yarn-path',
package/src/yarn1/tree.js CHANGED
@@ -1,7 +1,5 @@
1
- // A node_modules tree as `yarn install --frozen-lockfile --ignore-scripts`
2
- // makes it in a directory with no node_modules yet, and with `production`, as
3
- // --production does too. Not written: node_modules/.bin, yarn's
4
- // .yarn-integrity, and anything a script builds.
1
+ // The tree `yarn install --frozen-lockfile --ignore-scripts` makes in a directory with no node_modules,
2
+ // with `production` --production too: no .bin, .yarn-integrity or anything a script builds
5
3
 
6
4
  import { parseYarn1Lockfile } from '@preventive/lockfile/yarn1.js'
7
5
  import { Vfs } from '@preventive/vfs'
@@ -68,10 +66,8 @@ function locationOf(names, workspaces) {
68
66
  return `node_modules/${names.join('/node_modules/')}`
69
67
  }
70
68
 
71
- // With --production yarn asks for the root's devDependencies all the same,
72
- // fetches and checks them, and hoists them, but marks each as ignored
73
- // (install.js's markIgnored): it is installed only where something else
74
- // needs it.
69
+ // With --production yarn still asks for, fetches, checks and hoists the root's devDependencies, but marks
70
+ // each ignored (install.js's markIgnored), installed only where something else needs it
75
71
  function resolveProject(inputs, host, production) {
76
72
  const lockfile = parseYarn1Lockfile(inputs.lockfile, { manifests: Object.fromEntries(inputs.manifests), semver: { clean, satisfies, valid, validRange } })
77
73
  const manifests = new Map([...inputs.manifests].map(([dir, manifest]) => [dir, fixLists(manifest)]))
@@ -89,11 +85,9 @@ function resolveProject(inputs, host, production) {
89
85
  return { workspaces, asked, resolved }
90
86
  }
91
87
 
92
- // As in yarn, every package is fetched before any is checked, in the order
93
- // its resolver hands them over. Of two its cache keeps in one place, only the
94
- // first is fetched; the rest keep their lockfile entry as package.json, with
95
- // no peers, bins, platforms or engines, and the first's files, and their
96
- // hashes are held to the first's tarball.
88
+ // Every package fetched before any is checked, in yarn's resolver's order. Of two its cache keeps in one
89
+ // place only the first is fetched; the rest have their lockfile entry for package.json, with no peers,
90
+ // bins, platforms or engines, and are held to the first's tarball.
97
91
  async function fetchChecked(resolved, host, settings, project, fetching) {
98
92
  const order = [...new Set(resolved.patterns.values())]
99
93
  const registry = order.filter((ref) => ref.kind === 'registry')
@@ -175,11 +169,8 @@ function writeTree(placed, fetched) {
175
169
  }
176
170
  const pkg = fetched.get(ref)
177
171
  const earlier = copies.get(dest)
178
- if (earlier?.[0].ref === ref) {
179
- earlier.push(info)
180
- } else {
181
- copies.set(dest, [info])
182
- }
172
+ if (earlier?.[0].ref === ref) earlier.push(info)
173
+ else copies.set(dest, [info])
183
174
  writeFiles(vfs, dest, pkg, counted, skipped)
184
175
  left.set(pkg, left.get(pkg) - 1)
185
176
  if (left.get(pkg) === 0) letGo(pkg)