@antongolub/lockfile 0.0.0-snapshot.62 → 0.0.0-snapshot.63
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/{_npm-flat-types-CNIJpuMe.d.ts → _npm-flat-types-CR16JZFS.d.ts} +1 -1
- package/dist/{_pnpm-flat-core-Bx_-WTrC.d.ts → _pnpm-flat-core-DmGs4UQu.d.ts} +1 -1
- package/dist/{_yarn-berry-core-B56PpQ7F.d.ts → _yarn-berry-core-BhE-AhmX.d.ts} +1 -1
- package/dist/complete.d.ts +2 -2
- package/dist/formats/bun-text.d.ts +1 -1
- package/dist/formats/npm-1.d.ts +1 -1
- package/dist/formats/npm-1.js +30 -2
- package/dist/formats/npm-2.d.ts +2 -2
- package/dist/formats/npm-2.js +30 -2
- package/dist/formats/npm-3.d.ts +2 -2
- package/dist/formats/npm-3.js +30 -2
- package/dist/formats/pnpm-v5.d.ts +1 -1
- package/dist/formats/pnpm-v5.js +27 -2
- package/dist/formats/pnpm-v6.d.ts +2 -2
- package/dist/formats/pnpm-v6.js +27 -2
- package/dist/formats/pnpm-v9.d.ts +2 -2
- package/dist/formats/pnpm-v9.js +27 -2
- package/dist/formats/yarn-berry-v10.d.ts +2 -2
- package/dist/formats/yarn-berry-v10.js +34 -3
- package/dist/formats/yarn-berry-v4.d.ts +2 -2
- package/dist/formats/yarn-berry-v4.js +34 -3
- package/dist/formats/yarn-berry-v5.d.ts +2 -2
- package/dist/formats/yarn-berry-v5.js +34 -3
- package/dist/formats/yarn-berry-v6.d.ts +2 -2
- package/dist/formats/yarn-berry-v6.js +34 -3
- package/dist/formats/yarn-berry-v7.d.ts +2 -2
- package/dist/formats/yarn-berry-v7.js +34 -3
- package/dist/formats/yarn-berry-v8.d.ts +2 -2
- package/dist/formats/yarn-berry-v8.js +34 -3
- package/dist/formats/yarn-berry-v9.d.ts +2 -2
- package/dist/formats/yarn-berry-v9.js +34 -3
- package/dist/formats/yarn-classic.d.ts +1 -1
- package/dist/formats/yarn-classic.js +30 -2
- package/dist/{graph-1poNzYjw.d.ts → graph-CPo-SvS2.d.ts} +1 -0
- package/dist/index.d.ts +5 -5
- package/dist/index.js +39 -7
- package/dist/{modify-BwXRiMLu.d.ts → modify-DuBV5-5V.d.ts} +2 -2
- package/dist/modify.d.ts +3 -3
- package/dist/{optimize-D3h1vGSq.d.ts → optimize-B6TOjYyj.d.ts} +1 -1
- package/dist/optimize.d.ts +2 -2
- package/dist/registry.d.ts +6 -6
- package/dist/registry.js +2 -2
- package/dist/{types-DC8j2G_4.d.ts → types-BPMSHpCF.d.ts} +1 -1
- package/package.json +1 -1
package/dist/complete.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { N as NodeId, D as Diagnostic, G as Graph, E as EdgeTriple, a as Node, b as EdgeKind } from './graph-
|
|
2
|
-
import { R as RegistryAdapter } from './types-
|
|
1
|
+
import { N as NodeId, D as Diagnostic, G as Graph, E as EdgeTriple, a as Node, b as EdgeKind } from './graph-CPo-SvS2.js';
|
|
2
|
+
import { R as RegistryAdapter } from './types-BPMSHpCF.js';
|
|
3
3
|
|
|
4
4
|
interface CompletionSeed {
|
|
5
5
|
/** NodeIds the modifier added in the just-completed mutate phase. */
|
package/dist/formats/npm-1.d.ts
CHANGED
package/dist/formats/npm-1.js
CHANGED
|
@@ -737,8 +737,19 @@ function parse(raw, options = {}) {
|
|
|
737
737
|
}
|
|
738
738
|
function parseInner(protocol, spec, raw, options) {
|
|
739
739
|
switch (protocol) {
|
|
740
|
-
case "npm":
|
|
741
|
-
|
|
740
|
+
case "npm": {
|
|
741
|
+
const bindIdx = spec.indexOf("::");
|
|
742
|
+
const version = bindIdx >= 0 ? spec.slice(0, bindIdx) : spec;
|
|
743
|
+
const bindSuffix = bindIdx >= 0 ? spec.slice(bindIdx + 2) : void 0;
|
|
744
|
+
if (bindSuffix !== void 0) {
|
|
745
|
+
const archiveUrl = archiveUrlOfBind(bindSuffix);
|
|
746
|
+
if (archiveUrl !== void 0) {
|
|
747
|
+
return { type: "tarball", url: archiveUrl };
|
|
748
|
+
}
|
|
749
|
+
return { type: "tarball", url: deriveRegistryUrl(options.name, version), bind: bindSuffix };
|
|
750
|
+
}
|
|
751
|
+
return { type: "tarball", url: deriveRegistryUrl(options.name, version) };
|
|
752
|
+
}
|
|
742
753
|
case "portal":
|
|
743
754
|
return { type: "directory", path: normaliseDirectoryPath(spec) };
|
|
744
755
|
case "file":
|
|
@@ -767,6 +778,20 @@ function deriveRegistryUrl(name, spec) {
|
|
|
767
778
|
function looksLikeNpmName(s) {
|
|
768
779
|
return /^(?:@[a-z0-9][\w.-]*\/)?[a-z0-9][\w.-]*$/i.test(s);
|
|
769
780
|
}
|
|
781
|
+
function archiveUrlOfBind(bindSuffix) {
|
|
782
|
+
for (const pair of bindSuffix.split("&")) {
|
|
783
|
+
const eq = pair.indexOf("=");
|
|
784
|
+
if (eq < 0) continue;
|
|
785
|
+
if (pair.slice(0, eq) !== "__archiveUrl") continue;
|
|
786
|
+
const enc = pair.slice(eq + 1);
|
|
787
|
+
try {
|
|
788
|
+
return decodeURIComponent(enc);
|
|
789
|
+
} catch {
|
|
790
|
+
return void 0;
|
|
791
|
+
}
|
|
792
|
+
}
|
|
793
|
+
return void 0;
|
|
794
|
+
}
|
|
770
795
|
function registryUrlOf(name, version) {
|
|
771
796
|
const tail = name.startsWith("@") ? name.split("/").slice(1).join("/") : name;
|
|
772
797
|
return `https://registry.npmjs.org/${name}/-/${tail}-${version}.tgz`;
|
|
@@ -923,6 +948,9 @@ function canonicalSourceStringOf(resolution) {
|
|
|
923
948
|
return `git\0${resolution.url}\0${resolution.sha}`;
|
|
924
949
|
case "tarball": {
|
|
925
950
|
const host = hostOfTarballUrl(resolution.url);
|
|
951
|
+
if (resolution.bind !== void 0) {
|
|
952
|
+
return `tarball\0${host ?? resolution.url}\0bind=${resolution.bind}`;
|
|
953
|
+
}
|
|
926
954
|
return host !== void 0 && REGISTRY_HOSTS.has(host) ? void 0 : `tarball\0${host ?? resolution.url}`;
|
|
927
955
|
}
|
|
928
956
|
case "directory":
|
package/dist/formats/npm-2.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { G as Graph, D as Diagnostic } from '../graph-
|
|
2
|
-
import { N as NpmFamilyEnrichOptions, a as NpmFamilyOptimizeOptions, b as NpmFamilyParseOptions, c as NpmFamilyStringifyOptions } from '../_npm-flat-types-
|
|
1
|
+
import { G as Graph, D as Diagnostic } from '../graph-CPo-SvS2.js';
|
|
2
|
+
import { N as NpmFamilyEnrichOptions, a as NpmFamilyOptimizeOptions, b as NpmFamilyParseOptions, c as NpmFamilyStringifyOptions } from '../_npm-flat-types-CR16JZFS.js';
|
|
3
3
|
|
|
4
4
|
interface Npm2ParseOptions extends NpmFamilyParseOptions {
|
|
5
5
|
}
|
package/dist/formats/npm-2.js
CHANGED
|
@@ -791,8 +791,19 @@ function parse(raw, options = {}) {
|
|
|
791
791
|
}
|
|
792
792
|
function parseInner(protocol, spec, raw, options) {
|
|
793
793
|
switch (protocol) {
|
|
794
|
-
case "npm":
|
|
795
|
-
|
|
794
|
+
case "npm": {
|
|
795
|
+
const bindIdx = spec.indexOf("::");
|
|
796
|
+
const version = bindIdx >= 0 ? spec.slice(0, bindIdx) : spec;
|
|
797
|
+
const bindSuffix = bindIdx >= 0 ? spec.slice(bindIdx + 2) : void 0;
|
|
798
|
+
if (bindSuffix !== void 0) {
|
|
799
|
+
const archiveUrl = archiveUrlOfBind(bindSuffix);
|
|
800
|
+
if (archiveUrl !== void 0) {
|
|
801
|
+
return { type: "tarball", url: archiveUrl };
|
|
802
|
+
}
|
|
803
|
+
return { type: "tarball", url: deriveRegistryUrl(options.name, version), bind: bindSuffix };
|
|
804
|
+
}
|
|
805
|
+
return { type: "tarball", url: deriveRegistryUrl(options.name, version) };
|
|
806
|
+
}
|
|
796
807
|
case "portal":
|
|
797
808
|
return { type: "directory", path: normaliseDirectoryPath(spec) };
|
|
798
809
|
case "file":
|
|
@@ -821,6 +832,20 @@ function deriveRegistryUrl(name, spec) {
|
|
|
821
832
|
function looksLikeNpmName(s) {
|
|
822
833
|
return /^(?:@[a-z0-9][\w.-]*\/)?[a-z0-9][\w.-]*$/i.test(s);
|
|
823
834
|
}
|
|
835
|
+
function archiveUrlOfBind(bindSuffix) {
|
|
836
|
+
for (const pair of bindSuffix.split("&")) {
|
|
837
|
+
const eq = pair.indexOf("=");
|
|
838
|
+
if (eq < 0) continue;
|
|
839
|
+
if (pair.slice(0, eq) !== "__archiveUrl") continue;
|
|
840
|
+
const enc = pair.slice(eq + 1);
|
|
841
|
+
try {
|
|
842
|
+
return decodeURIComponent(enc);
|
|
843
|
+
} catch {
|
|
844
|
+
return void 0;
|
|
845
|
+
}
|
|
846
|
+
}
|
|
847
|
+
return void 0;
|
|
848
|
+
}
|
|
824
849
|
function registryUrlOf(name, version) {
|
|
825
850
|
const tail = name.startsWith("@") ? name.split("/").slice(1).join("/") : name;
|
|
826
851
|
return `https://registry.npmjs.org/${name}/-/${tail}-${version}.tgz`;
|
|
@@ -977,6 +1002,9 @@ function canonicalSourceStringOf(resolution) {
|
|
|
977
1002
|
return `git\0${resolution.url}\0${resolution.sha}`;
|
|
978
1003
|
case "tarball": {
|
|
979
1004
|
const host = hostOfTarballUrl(resolution.url);
|
|
1005
|
+
if (resolution.bind !== void 0) {
|
|
1006
|
+
return `tarball\0${host ?? resolution.url}\0bind=${resolution.bind}`;
|
|
1007
|
+
}
|
|
980
1008
|
return host !== void 0 && REGISTRY_HOSTS.has(host) ? void 0 : `tarball\0${host ?? resolution.url}`;
|
|
981
1009
|
}
|
|
982
1010
|
case "directory":
|
package/dist/formats/npm-3.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { G as Graph, D as Diagnostic } from '../graph-
|
|
2
|
-
import { N as NpmFamilyEnrichOptions, a as NpmFamilyOptimizeOptions, b as NpmFamilyParseOptions, c as NpmFamilyStringifyOptions } from '../_npm-flat-types-
|
|
1
|
+
import { G as Graph, D as Diagnostic } from '../graph-CPo-SvS2.js';
|
|
2
|
+
import { N as NpmFamilyEnrichOptions, a as NpmFamilyOptimizeOptions, b as NpmFamilyParseOptions, c as NpmFamilyStringifyOptions } from '../_npm-flat-types-CR16JZFS.js';
|
|
3
3
|
|
|
4
4
|
interface Npm3ParseOptions extends NpmFamilyParseOptions {
|
|
5
5
|
}
|
package/dist/formats/npm-3.js
CHANGED
|
@@ -791,8 +791,19 @@ function parse(raw, options = {}) {
|
|
|
791
791
|
}
|
|
792
792
|
function parseInner(protocol, spec, raw, options) {
|
|
793
793
|
switch (protocol) {
|
|
794
|
-
case "npm":
|
|
795
|
-
|
|
794
|
+
case "npm": {
|
|
795
|
+
const bindIdx = spec.indexOf("::");
|
|
796
|
+
const version = bindIdx >= 0 ? spec.slice(0, bindIdx) : spec;
|
|
797
|
+
const bindSuffix = bindIdx >= 0 ? spec.slice(bindIdx + 2) : void 0;
|
|
798
|
+
if (bindSuffix !== void 0) {
|
|
799
|
+
const archiveUrl = archiveUrlOfBind(bindSuffix);
|
|
800
|
+
if (archiveUrl !== void 0) {
|
|
801
|
+
return { type: "tarball", url: archiveUrl };
|
|
802
|
+
}
|
|
803
|
+
return { type: "tarball", url: deriveRegistryUrl(options.name, version), bind: bindSuffix };
|
|
804
|
+
}
|
|
805
|
+
return { type: "tarball", url: deriveRegistryUrl(options.name, version) };
|
|
806
|
+
}
|
|
796
807
|
case "portal":
|
|
797
808
|
return { type: "directory", path: normaliseDirectoryPath(spec) };
|
|
798
809
|
case "file":
|
|
@@ -821,6 +832,20 @@ function deriveRegistryUrl(name, spec) {
|
|
|
821
832
|
function looksLikeNpmName(s) {
|
|
822
833
|
return /^(?:@[a-z0-9][\w.-]*\/)?[a-z0-9][\w.-]*$/i.test(s);
|
|
823
834
|
}
|
|
835
|
+
function archiveUrlOfBind(bindSuffix) {
|
|
836
|
+
for (const pair of bindSuffix.split("&")) {
|
|
837
|
+
const eq = pair.indexOf("=");
|
|
838
|
+
if (eq < 0) continue;
|
|
839
|
+
if (pair.slice(0, eq) !== "__archiveUrl") continue;
|
|
840
|
+
const enc = pair.slice(eq + 1);
|
|
841
|
+
try {
|
|
842
|
+
return decodeURIComponent(enc);
|
|
843
|
+
} catch {
|
|
844
|
+
return void 0;
|
|
845
|
+
}
|
|
846
|
+
}
|
|
847
|
+
return void 0;
|
|
848
|
+
}
|
|
824
849
|
function registryUrlOf(name, version) {
|
|
825
850
|
const tail = name.startsWith("@") ? name.split("/").slice(1).join("/") : name;
|
|
826
851
|
return `https://registry.npmjs.org/${name}/-/${tail}-${version}.tgz`;
|
|
@@ -977,6 +1002,9 @@ function canonicalSourceStringOf(resolution) {
|
|
|
977
1002
|
return `git\0${resolution.url}\0${resolution.sha}`;
|
|
978
1003
|
case "tarball": {
|
|
979
1004
|
const host = hostOfTarballUrl(resolution.url);
|
|
1005
|
+
if (resolution.bind !== void 0) {
|
|
1006
|
+
return `tarball\0${host ?? resolution.url}\0bind=${resolution.bind}`;
|
|
1007
|
+
}
|
|
980
1008
|
return host !== void 0 && REGISTRY_HOSTS.has(host) ? void 0 : `tarball\0${host ?? resolution.url}`;
|
|
981
1009
|
}
|
|
982
1010
|
case "directory":
|
package/dist/formats/pnpm-v5.js
CHANGED
|
@@ -757,8 +757,19 @@ function parse(raw, options = {}) {
|
|
|
757
757
|
}
|
|
758
758
|
function parseInner(protocol, spec, raw, options) {
|
|
759
759
|
switch (protocol) {
|
|
760
|
-
case "npm":
|
|
761
|
-
|
|
760
|
+
case "npm": {
|
|
761
|
+
const bindIdx = spec.indexOf("::");
|
|
762
|
+
const version = bindIdx >= 0 ? spec.slice(0, bindIdx) : spec;
|
|
763
|
+
const bindSuffix = bindIdx >= 0 ? spec.slice(bindIdx + 2) : void 0;
|
|
764
|
+
if (bindSuffix !== void 0) {
|
|
765
|
+
const archiveUrl = archiveUrlOfBind(bindSuffix);
|
|
766
|
+
if (archiveUrl !== void 0) {
|
|
767
|
+
return { type: "tarball", url: archiveUrl };
|
|
768
|
+
}
|
|
769
|
+
return { type: "tarball", url: deriveRegistryUrl(options.name, version), bind: bindSuffix };
|
|
770
|
+
}
|
|
771
|
+
return { type: "tarball", url: deriveRegistryUrl(options.name, version) };
|
|
772
|
+
}
|
|
762
773
|
case "portal":
|
|
763
774
|
return { type: "directory", path: normaliseDirectoryPath(spec) };
|
|
764
775
|
case "file":
|
|
@@ -787,6 +798,20 @@ function deriveRegistryUrl(name, spec) {
|
|
|
787
798
|
function looksLikeNpmName(s) {
|
|
788
799
|
return /^(?:@[a-z0-9][\w.-]*\/)?[a-z0-9][\w.-]*$/i.test(s);
|
|
789
800
|
}
|
|
801
|
+
function archiveUrlOfBind(bindSuffix) {
|
|
802
|
+
for (const pair of bindSuffix.split("&")) {
|
|
803
|
+
const eq = pair.indexOf("=");
|
|
804
|
+
if (eq < 0) continue;
|
|
805
|
+
if (pair.slice(0, eq) !== "__archiveUrl") continue;
|
|
806
|
+
const enc = pair.slice(eq + 1);
|
|
807
|
+
try {
|
|
808
|
+
return decodeURIComponent(enc);
|
|
809
|
+
} catch {
|
|
810
|
+
return void 0;
|
|
811
|
+
}
|
|
812
|
+
}
|
|
813
|
+
return void 0;
|
|
814
|
+
}
|
|
790
815
|
function registryUrlOf(name, version) {
|
|
791
816
|
const tail = name.startsWith("@") ? name.split("/").slice(1).join("/") : name;
|
|
792
817
|
return `https://registry.npmjs.org/${name}/-/${tail}-${version}.tgz`;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { G as Graph, D as Diagnostic } from '../graph-
|
|
2
|
-
import { P as PnpmFamilyEnrichOptions, a as PnpmManifest, b as PnpmFamilyOptimizeOptions, c as PnpmFamilyParseOptions, d as PnpmSettings, e as PnpmFamilyStringifyOptions } from '../_pnpm-flat-core-
|
|
1
|
+
import { G as Graph, D as Diagnostic } from '../graph-CPo-SvS2.js';
|
|
2
|
+
import { P as PnpmFamilyEnrichOptions, a as PnpmManifest, b as PnpmFamilyOptimizeOptions, c as PnpmFamilyParseOptions, d as PnpmSettings, e as PnpmFamilyStringifyOptions } from '../_pnpm-flat-core-DmGs4UQu.js';
|
|
3
3
|
|
|
4
4
|
interface PnpmV6ParseOptions extends PnpmFamilyParseOptions {
|
|
5
5
|
}
|
package/dist/formats/pnpm-v6.js
CHANGED
|
@@ -816,8 +816,19 @@ function parse(raw, options = {}) {
|
|
|
816
816
|
}
|
|
817
817
|
function parseInner(protocol, spec, raw, options) {
|
|
818
818
|
switch (protocol) {
|
|
819
|
-
case "npm":
|
|
820
|
-
|
|
819
|
+
case "npm": {
|
|
820
|
+
const bindIdx = spec.indexOf("::");
|
|
821
|
+
const version = bindIdx >= 0 ? spec.slice(0, bindIdx) : spec;
|
|
822
|
+
const bindSuffix = bindIdx >= 0 ? spec.slice(bindIdx + 2) : void 0;
|
|
823
|
+
if (bindSuffix !== void 0) {
|
|
824
|
+
const archiveUrl = archiveUrlOfBind(bindSuffix);
|
|
825
|
+
if (archiveUrl !== void 0) {
|
|
826
|
+
return { type: "tarball", url: archiveUrl };
|
|
827
|
+
}
|
|
828
|
+
return { type: "tarball", url: deriveRegistryUrl(options.name, version), bind: bindSuffix };
|
|
829
|
+
}
|
|
830
|
+
return { type: "tarball", url: deriveRegistryUrl(options.name, version) };
|
|
831
|
+
}
|
|
821
832
|
case "portal":
|
|
822
833
|
return { type: "directory", path: normaliseDirectoryPath(spec) };
|
|
823
834
|
case "file":
|
|
@@ -846,6 +857,20 @@ function deriveRegistryUrl(name, spec) {
|
|
|
846
857
|
function looksLikeNpmName(s) {
|
|
847
858
|
return /^(?:@[a-z0-9][\w.-]*\/)?[a-z0-9][\w.-]*$/i.test(s);
|
|
848
859
|
}
|
|
860
|
+
function archiveUrlOfBind(bindSuffix) {
|
|
861
|
+
for (const pair of bindSuffix.split("&")) {
|
|
862
|
+
const eq = pair.indexOf("=");
|
|
863
|
+
if (eq < 0) continue;
|
|
864
|
+
if (pair.slice(0, eq) !== "__archiveUrl") continue;
|
|
865
|
+
const enc = pair.slice(eq + 1);
|
|
866
|
+
try {
|
|
867
|
+
return decodeURIComponent(enc);
|
|
868
|
+
} catch {
|
|
869
|
+
return void 0;
|
|
870
|
+
}
|
|
871
|
+
}
|
|
872
|
+
return void 0;
|
|
873
|
+
}
|
|
849
874
|
function registryUrlOf(name, version) {
|
|
850
875
|
const tail = name.startsWith("@") ? name.split("/").slice(1).join("/") : name;
|
|
851
876
|
return `https://registry.npmjs.org/${name}/-/${tail}-${version}.tgz`;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { G as Graph, D as Diagnostic } from '../graph-
|
|
2
|
-
import { P as PnpmFamilyEnrichOptions, a as PnpmManifest, b as PnpmFamilyOptimizeOptions, c as PnpmFamilyParseOptions, d as PnpmSettings, e as PnpmFamilyStringifyOptions } from '../_pnpm-flat-core-
|
|
1
|
+
import { G as Graph, D as Diagnostic } from '../graph-CPo-SvS2.js';
|
|
2
|
+
import { P as PnpmFamilyEnrichOptions, a as PnpmManifest, b as PnpmFamilyOptimizeOptions, c as PnpmFamilyParseOptions, d as PnpmSettings, e as PnpmFamilyStringifyOptions } from '../_pnpm-flat-core-DmGs4UQu.js';
|
|
3
3
|
|
|
4
4
|
interface PnpmV9ParseOptions extends PnpmFamilyParseOptions {
|
|
5
5
|
}
|
package/dist/formats/pnpm-v9.js
CHANGED
|
@@ -816,8 +816,19 @@ function parse(raw, options = {}) {
|
|
|
816
816
|
}
|
|
817
817
|
function parseInner(protocol, spec, raw, options) {
|
|
818
818
|
switch (protocol) {
|
|
819
|
-
case "npm":
|
|
820
|
-
|
|
819
|
+
case "npm": {
|
|
820
|
+
const bindIdx = spec.indexOf("::");
|
|
821
|
+
const version = bindIdx >= 0 ? spec.slice(0, bindIdx) : spec;
|
|
822
|
+
const bindSuffix = bindIdx >= 0 ? spec.slice(bindIdx + 2) : void 0;
|
|
823
|
+
if (bindSuffix !== void 0) {
|
|
824
|
+
const archiveUrl = archiveUrlOfBind(bindSuffix);
|
|
825
|
+
if (archiveUrl !== void 0) {
|
|
826
|
+
return { type: "tarball", url: archiveUrl };
|
|
827
|
+
}
|
|
828
|
+
return { type: "tarball", url: deriveRegistryUrl(options.name, version), bind: bindSuffix };
|
|
829
|
+
}
|
|
830
|
+
return { type: "tarball", url: deriveRegistryUrl(options.name, version) };
|
|
831
|
+
}
|
|
821
832
|
case "portal":
|
|
822
833
|
return { type: "directory", path: normaliseDirectoryPath(spec) };
|
|
823
834
|
case "file":
|
|
@@ -846,6 +857,20 @@ function deriveRegistryUrl(name, spec) {
|
|
|
846
857
|
function looksLikeNpmName(s) {
|
|
847
858
|
return /^(?:@[a-z0-9][\w.-]*\/)?[a-z0-9][\w.-]*$/i.test(s);
|
|
848
859
|
}
|
|
860
|
+
function archiveUrlOfBind(bindSuffix) {
|
|
861
|
+
for (const pair of bindSuffix.split("&")) {
|
|
862
|
+
const eq = pair.indexOf("=");
|
|
863
|
+
if (eq < 0) continue;
|
|
864
|
+
if (pair.slice(0, eq) !== "__archiveUrl") continue;
|
|
865
|
+
const enc = pair.slice(eq + 1);
|
|
866
|
+
try {
|
|
867
|
+
return decodeURIComponent(enc);
|
|
868
|
+
} catch {
|
|
869
|
+
return void 0;
|
|
870
|
+
}
|
|
871
|
+
}
|
|
872
|
+
return void 0;
|
|
873
|
+
}
|
|
849
874
|
function registryUrlOf(name, version) {
|
|
850
875
|
const tail = name.startsWith("@") ? name.split("/").slice(1).join("/") : name;
|
|
851
876
|
return `https://registry.npmjs.org/${name}/-/${tail}-${version}.tgz`;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { G as Graph, D as Diagnostic } from '../graph-
|
|
2
|
-
import { Y as YarnBerryFamilyEnrichOptions, a as YarnBerryFamilyOptimizeOptions, b as YarnBerryFamilyParseOptions, c as YarnBerryFamilyStringifyOptions } from '../_yarn-berry-core-
|
|
1
|
+
import { G as Graph, D as Diagnostic } from '../graph-CPo-SvS2.js';
|
|
2
|
+
import { Y as YarnBerryFamilyEnrichOptions, a as YarnBerryFamilyOptimizeOptions, b as YarnBerryFamilyParseOptions, c as YarnBerryFamilyStringifyOptions } from '../_yarn-berry-core-BhE-AhmX.js';
|
|
3
3
|
|
|
4
4
|
interface YarnBerryParseOptions extends YarnBerryFamilyParseOptions {
|
|
5
5
|
}
|
|
@@ -1113,8 +1113,19 @@ function parse2(raw, options = {}) {
|
|
|
1113
1113
|
}
|
|
1114
1114
|
function parseInner(protocol, spec, raw, options) {
|
|
1115
1115
|
switch (protocol) {
|
|
1116
|
-
case "npm":
|
|
1117
|
-
|
|
1116
|
+
case "npm": {
|
|
1117
|
+
const bindIdx = spec.indexOf("::");
|
|
1118
|
+
const version = bindIdx >= 0 ? spec.slice(0, bindIdx) : spec;
|
|
1119
|
+
const bindSuffix = bindIdx >= 0 ? spec.slice(bindIdx + 2) : void 0;
|
|
1120
|
+
if (bindSuffix !== void 0) {
|
|
1121
|
+
const archiveUrl = archiveUrlOfBind(bindSuffix);
|
|
1122
|
+
if (archiveUrl !== void 0) {
|
|
1123
|
+
return { type: "tarball", url: archiveUrl };
|
|
1124
|
+
}
|
|
1125
|
+
return { type: "tarball", url: deriveRegistryUrl(options.name, version), bind: bindSuffix };
|
|
1126
|
+
}
|
|
1127
|
+
return { type: "tarball", url: deriveRegistryUrl(options.name, version) };
|
|
1128
|
+
}
|
|
1118
1129
|
case "portal":
|
|
1119
1130
|
return { type: "directory", path: normaliseDirectoryPath(spec) };
|
|
1120
1131
|
case "file":
|
|
@@ -1143,6 +1154,20 @@ function deriveRegistryUrl(name, spec) {
|
|
|
1143
1154
|
function looksLikeNpmName(s) {
|
|
1144
1155
|
return /^(?:@[a-z0-9][\w.-]*\/)?[a-z0-9][\w.-]*$/i.test(s);
|
|
1145
1156
|
}
|
|
1157
|
+
function archiveUrlOfBind(bindSuffix) {
|
|
1158
|
+
for (const pair of bindSuffix.split("&")) {
|
|
1159
|
+
const eq = pair.indexOf("=");
|
|
1160
|
+
if (eq < 0) continue;
|
|
1161
|
+
if (pair.slice(0, eq) !== "__archiveUrl") continue;
|
|
1162
|
+
const enc = pair.slice(eq + 1);
|
|
1163
|
+
try {
|
|
1164
|
+
return decodeURIComponent(enc);
|
|
1165
|
+
} catch {
|
|
1166
|
+
return void 0;
|
|
1167
|
+
}
|
|
1168
|
+
}
|
|
1169
|
+
return void 0;
|
|
1170
|
+
}
|
|
1146
1171
|
function registryUrlOf(name, version) {
|
|
1147
1172
|
const tail = name.startsWith("@") ? name.split("/").slice(1).join("/") : name;
|
|
1148
1173
|
return `https://registry.npmjs.org/${name}/-/${tail}-${version}.tgz`;
|
|
@@ -1299,6 +1324,9 @@ function canonicalSourceStringOf(resolution) {
|
|
|
1299
1324
|
return `git\0${resolution.url}\0${resolution.sha}`;
|
|
1300
1325
|
case "tarball": {
|
|
1301
1326
|
const host = hostOfTarballUrl(resolution.url);
|
|
1327
|
+
if (resolution.bind !== void 0) {
|
|
1328
|
+
return `tarball\0${host ?? resolution.url}\0bind=${resolution.bind}`;
|
|
1329
|
+
}
|
|
1302
1330
|
return host !== void 0 && REGISTRY_HOSTS.has(host) ? void 0 : `tarball\0${host ?? resolution.url}`;
|
|
1303
1331
|
}
|
|
1304
1332
|
case "directory":
|
|
@@ -2578,11 +2606,14 @@ function irreducibleCollisionMessage(id, currentKey, priorEntries) {
|
|
|
2578
2606
|
const priorResolution = priorEntry !== void 0 ? asString(priorEntry.value["resolution"]) : void 0;
|
|
2579
2607
|
const isLink = (r) => r !== void 0 && (r.includes("@link:") || r.includes("@portal:"));
|
|
2580
2608
|
const isPatch = (r) => r !== void 0 && r.includes("@patch:");
|
|
2581
|
-
|
|
2609
|
+
const isBind = (r) => r !== void 0 && r.includes("::");
|
|
2610
|
+
let hint = "likely npm: alias, patch: collision, workspace link: locator collision, or a `::` bind modifier (`::__archiveUrl=` / `::version=` / `::hash=`)";
|
|
2582
2611
|
if (isLink(currentResolution) || isLink(priorResolution)) {
|
|
2583
2612
|
hint = "likely workspace link: / portal: locator collision (yarn `::locator=` qualifier was lost)";
|
|
2584
2613
|
} else if (isPatch(currentResolution) || isPatch(priorResolution)) {
|
|
2585
2614
|
hint = "likely patch: collision";
|
|
2615
|
+
} else if (isBind(currentResolution) || isBind(priorResolution)) {
|
|
2616
|
+
hint = "likely a `::` bind modifier collision (`::__archiveUrl=` private-registry mirror, `::version=`, or `::hash=` \u2014 the bind was lost from the NodeId)";
|
|
2586
2617
|
}
|
|
2587
2618
|
const resolutions = [priorResolution, currentResolution].filter((r) => typeof r === "string");
|
|
2588
2619
|
const tail = resolutions.length > 0 ? ` \u2014 resolutions: [${resolutions.map((r) => JSON.stringify(r)).join(", ")}]` : "";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { G as Graph, D as Diagnostic } from '../graph-
|
|
2
|
-
import { Y as YarnBerryFamilyEnrichOptions, a as YarnBerryFamilyOptimizeOptions, b as YarnBerryFamilyParseOptions, c as YarnBerryFamilyStringifyOptions } from '../_yarn-berry-core-
|
|
1
|
+
import { G as Graph, D as Diagnostic } from '../graph-CPo-SvS2.js';
|
|
2
|
+
import { Y as YarnBerryFamilyEnrichOptions, a as YarnBerryFamilyOptimizeOptions, b as YarnBerryFamilyParseOptions, c as YarnBerryFamilyStringifyOptions } from '../_yarn-berry-core-BhE-AhmX.js';
|
|
3
3
|
|
|
4
4
|
interface YarnBerryParseOptions extends YarnBerryFamilyParseOptions {
|
|
5
5
|
}
|
|
@@ -1113,8 +1113,19 @@ function parse2(raw, options = {}) {
|
|
|
1113
1113
|
}
|
|
1114
1114
|
function parseInner(protocol, spec, raw, options) {
|
|
1115
1115
|
switch (protocol) {
|
|
1116
|
-
case "npm":
|
|
1117
|
-
|
|
1116
|
+
case "npm": {
|
|
1117
|
+
const bindIdx = spec.indexOf("::");
|
|
1118
|
+
const version = bindIdx >= 0 ? spec.slice(0, bindIdx) : spec;
|
|
1119
|
+
const bindSuffix = bindIdx >= 0 ? spec.slice(bindIdx + 2) : void 0;
|
|
1120
|
+
if (bindSuffix !== void 0) {
|
|
1121
|
+
const archiveUrl = archiveUrlOfBind(bindSuffix);
|
|
1122
|
+
if (archiveUrl !== void 0) {
|
|
1123
|
+
return { type: "tarball", url: archiveUrl };
|
|
1124
|
+
}
|
|
1125
|
+
return { type: "tarball", url: deriveRegistryUrl(options.name, version), bind: bindSuffix };
|
|
1126
|
+
}
|
|
1127
|
+
return { type: "tarball", url: deriveRegistryUrl(options.name, version) };
|
|
1128
|
+
}
|
|
1118
1129
|
case "portal":
|
|
1119
1130
|
return { type: "directory", path: normaliseDirectoryPath(spec) };
|
|
1120
1131
|
case "file":
|
|
@@ -1143,6 +1154,20 @@ function deriveRegistryUrl(name, spec) {
|
|
|
1143
1154
|
function looksLikeNpmName(s) {
|
|
1144
1155
|
return /^(?:@[a-z0-9][\w.-]*\/)?[a-z0-9][\w.-]*$/i.test(s);
|
|
1145
1156
|
}
|
|
1157
|
+
function archiveUrlOfBind(bindSuffix) {
|
|
1158
|
+
for (const pair of bindSuffix.split("&")) {
|
|
1159
|
+
const eq = pair.indexOf("=");
|
|
1160
|
+
if (eq < 0) continue;
|
|
1161
|
+
if (pair.slice(0, eq) !== "__archiveUrl") continue;
|
|
1162
|
+
const enc = pair.slice(eq + 1);
|
|
1163
|
+
try {
|
|
1164
|
+
return decodeURIComponent(enc);
|
|
1165
|
+
} catch {
|
|
1166
|
+
return void 0;
|
|
1167
|
+
}
|
|
1168
|
+
}
|
|
1169
|
+
return void 0;
|
|
1170
|
+
}
|
|
1146
1171
|
function registryUrlOf(name, version) {
|
|
1147
1172
|
const tail = name.startsWith("@") ? name.split("/").slice(1).join("/") : name;
|
|
1148
1173
|
return `https://registry.npmjs.org/${name}/-/${tail}-${version}.tgz`;
|
|
@@ -1299,6 +1324,9 @@ function canonicalSourceStringOf(resolution) {
|
|
|
1299
1324
|
return `git\0${resolution.url}\0${resolution.sha}`;
|
|
1300
1325
|
case "tarball": {
|
|
1301
1326
|
const host = hostOfTarballUrl(resolution.url);
|
|
1327
|
+
if (resolution.bind !== void 0) {
|
|
1328
|
+
return `tarball\0${host ?? resolution.url}\0bind=${resolution.bind}`;
|
|
1329
|
+
}
|
|
1302
1330
|
return host !== void 0 && REGISTRY_HOSTS.has(host) ? void 0 : `tarball\0${host ?? resolution.url}`;
|
|
1303
1331
|
}
|
|
1304
1332
|
case "directory":
|
|
@@ -2582,11 +2610,14 @@ function irreducibleCollisionMessage(id, currentKey, priorEntries) {
|
|
|
2582
2610
|
const priorResolution = priorEntry !== void 0 ? asString(priorEntry.value["resolution"]) : void 0;
|
|
2583
2611
|
const isLink = (r) => r !== void 0 && (r.includes("@link:") || r.includes("@portal:"));
|
|
2584
2612
|
const isPatch = (r) => r !== void 0 && r.includes("@patch:");
|
|
2585
|
-
|
|
2613
|
+
const isBind = (r) => r !== void 0 && r.includes("::");
|
|
2614
|
+
let hint = "likely npm: alias, patch: collision, workspace link: locator collision, or a `::` bind modifier (`::__archiveUrl=` / `::version=` / `::hash=`)";
|
|
2586
2615
|
if (isLink(currentResolution) || isLink(priorResolution)) {
|
|
2587
2616
|
hint = "likely workspace link: / portal: locator collision (yarn `::locator=` qualifier was lost)";
|
|
2588
2617
|
} else if (isPatch(currentResolution) || isPatch(priorResolution)) {
|
|
2589
2618
|
hint = "likely patch: collision";
|
|
2619
|
+
} else if (isBind(currentResolution) || isBind(priorResolution)) {
|
|
2620
|
+
hint = "likely a `::` bind modifier collision (`::__archiveUrl=` private-registry mirror, `::version=`, or `::hash=` \u2014 the bind was lost from the NodeId)";
|
|
2590
2621
|
}
|
|
2591
2622
|
const resolutions = [priorResolution, currentResolution].filter((r) => typeof r === "string");
|
|
2592
2623
|
const tail = resolutions.length > 0 ? ` \u2014 resolutions: [${resolutions.map((r) => JSON.stringify(r)).join(", ")}]` : "";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { G as Graph, D as Diagnostic } from '../graph-
|
|
2
|
-
import { Y as YarnBerryFamilyEnrichOptions, a as YarnBerryFamilyOptimizeOptions, b as YarnBerryFamilyParseOptions, c as YarnBerryFamilyStringifyOptions } from '../_yarn-berry-core-
|
|
1
|
+
import { G as Graph, D as Diagnostic } from '../graph-CPo-SvS2.js';
|
|
2
|
+
import { Y as YarnBerryFamilyEnrichOptions, a as YarnBerryFamilyOptimizeOptions, b as YarnBerryFamilyParseOptions, c as YarnBerryFamilyStringifyOptions } from '../_yarn-berry-core-BhE-AhmX.js';
|
|
3
3
|
|
|
4
4
|
interface YarnBerryParseOptions extends YarnBerryFamilyParseOptions {
|
|
5
5
|
}
|
|
@@ -1113,8 +1113,19 @@ function parse2(raw, options = {}) {
|
|
|
1113
1113
|
}
|
|
1114
1114
|
function parseInner(protocol, spec, raw, options) {
|
|
1115
1115
|
switch (protocol) {
|
|
1116
|
-
case "npm":
|
|
1117
|
-
|
|
1116
|
+
case "npm": {
|
|
1117
|
+
const bindIdx = spec.indexOf("::");
|
|
1118
|
+
const version = bindIdx >= 0 ? spec.slice(0, bindIdx) : spec;
|
|
1119
|
+
const bindSuffix = bindIdx >= 0 ? spec.slice(bindIdx + 2) : void 0;
|
|
1120
|
+
if (bindSuffix !== void 0) {
|
|
1121
|
+
const archiveUrl = archiveUrlOfBind(bindSuffix);
|
|
1122
|
+
if (archiveUrl !== void 0) {
|
|
1123
|
+
return { type: "tarball", url: archiveUrl };
|
|
1124
|
+
}
|
|
1125
|
+
return { type: "tarball", url: deriveRegistryUrl(options.name, version), bind: bindSuffix };
|
|
1126
|
+
}
|
|
1127
|
+
return { type: "tarball", url: deriveRegistryUrl(options.name, version) };
|
|
1128
|
+
}
|
|
1118
1129
|
case "portal":
|
|
1119
1130
|
return { type: "directory", path: normaliseDirectoryPath(spec) };
|
|
1120
1131
|
case "file":
|
|
@@ -1143,6 +1154,20 @@ function deriveRegistryUrl(name, spec) {
|
|
|
1143
1154
|
function looksLikeNpmName(s) {
|
|
1144
1155
|
return /^(?:@[a-z0-9][\w.-]*\/)?[a-z0-9][\w.-]*$/i.test(s);
|
|
1145
1156
|
}
|
|
1157
|
+
function archiveUrlOfBind(bindSuffix) {
|
|
1158
|
+
for (const pair of bindSuffix.split("&")) {
|
|
1159
|
+
const eq = pair.indexOf("=");
|
|
1160
|
+
if (eq < 0) continue;
|
|
1161
|
+
if (pair.slice(0, eq) !== "__archiveUrl") continue;
|
|
1162
|
+
const enc = pair.slice(eq + 1);
|
|
1163
|
+
try {
|
|
1164
|
+
return decodeURIComponent(enc);
|
|
1165
|
+
} catch {
|
|
1166
|
+
return void 0;
|
|
1167
|
+
}
|
|
1168
|
+
}
|
|
1169
|
+
return void 0;
|
|
1170
|
+
}
|
|
1146
1171
|
function registryUrlOf(name, version) {
|
|
1147
1172
|
const tail = name.startsWith("@") ? name.split("/").slice(1).join("/") : name;
|
|
1148
1173
|
return `https://registry.npmjs.org/${name}/-/${tail}-${version}.tgz`;
|
|
@@ -1299,6 +1324,9 @@ function canonicalSourceStringOf(resolution) {
|
|
|
1299
1324
|
return `git\0${resolution.url}\0${resolution.sha}`;
|
|
1300
1325
|
case "tarball": {
|
|
1301
1326
|
const host = hostOfTarballUrl(resolution.url);
|
|
1327
|
+
if (resolution.bind !== void 0) {
|
|
1328
|
+
return `tarball\0${host ?? resolution.url}\0bind=${resolution.bind}`;
|
|
1329
|
+
}
|
|
1302
1330
|
return host !== void 0 && REGISTRY_HOSTS.has(host) ? void 0 : `tarball\0${host ?? resolution.url}`;
|
|
1303
1331
|
}
|
|
1304
1332
|
case "directory":
|
|
@@ -2577,11 +2605,14 @@ function irreducibleCollisionMessage(id, currentKey, priorEntries) {
|
|
|
2577
2605
|
const priorResolution = priorEntry !== void 0 ? asString(priorEntry.value["resolution"]) : void 0;
|
|
2578
2606
|
const isLink = (r) => r !== void 0 && (r.includes("@link:") || r.includes("@portal:"));
|
|
2579
2607
|
const isPatch = (r) => r !== void 0 && r.includes("@patch:");
|
|
2580
|
-
|
|
2608
|
+
const isBind = (r) => r !== void 0 && r.includes("::");
|
|
2609
|
+
let hint = "likely npm: alias, patch: collision, workspace link: locator collision, or a `::` bind modifier (`::__archiveUrl=` / `::version=` / `::hash=`)";
|
|
2581
2610
|
if (isLink(currentResolution) || isLink(priorResolution)) {
|
|
2582
2611
|
hint = "likely workspace link: / portal: locator collision (yarn `::locator=` qualifier was lost)";
|
|
2583
2612
|
} else if (isPatch(currentResolution) || isPatch(priorResolution)) {
|
|
2584
2613
|
hint = "likely patch: collision";
|
|
2614
|
+
} else if (isBind(currentResolution) || isBind(priorResolution)) {
|
|
2615
|
+
hint = "likely a `::` bind modifier collision (`::__archiveUrl=` private-registry mirror, `::version=`, or `::hash=` \u2014 the bind was lost from the NodeId)";
|
|
2585
2616
|
}
|
|
2586
2617
|
const resolutions = [priorResolution, currentResolution].filter((r) => typeof r === "string");
|
|
2587
2618
|
const tail = resolutions.length > 0 ? ` \u2014 resolutions: [${resolutions.map((r) => JSON.stringify(r)).join(", ")}]` : "";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { G as Graph, D as Diagnostic } from '../graph-
|
|
2
|
-
import { Y as YarnBerryFamilyEnrichOptions, a as YarnBerryFamilyOptimizeOptions, b as YarnBerryFamilyParseOptions, c as YarnBerryFamilyStringifyOptions } from '../_yarn-berry-core-
|
|
1
|
+
import { G as Graph, D as Diagnostic } from '../graph-CPo-SvS2.js';
|
|
2
|
+
import { Y as YarnBerryFamilyEnrichOptions, a as YarnBerryFamilyOptimizeOptions, b as YarnBerryFamilyParseOptions, c as YarnBerryFamilyStringifyOptions } from '../_yarn-berry-core-BhE-AhmX.js';
|
|
3
3
|
|
|
4
4
|
interface YarnBerryParseOptions extends YarnBerryFamilyParseOptions {
|
|
5
5
|
}
|