diff --git a/.changeset/inline-string-and-npmrc-key-utils.md b/.changeset/inline-string-and-npmrc-key-utils.md new file mode 100644 index 0000000000..b692c04dd5 --- /dev/null +++ b/.changeset/inline-string-and-npmrc-key-utils.md @@ -0,0 +1,7 @@ +--- +"@pnpm/text.ordinal-comparator": patch +"@pnpm/config.registry-auth-key": patch +"pnpm": patch +--- + +`lexCompare` and `nerfDart` are now published as `@pnpm/text.ordinal-comparator` and `@pnpm/config.registry-auth-key`. Use these instead of `@pnpm/util.lex-comparator` and `@pnpm/config.nerf-dart`. diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 67d62e4399..ccf95862bb 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -168,9 +168,6 @@ catalogs: '@pnpm/config.env-replace': specifier: ^4.1.0 version: 4.1.0 - '@pnpm/config.nerf-dart': - specifier: ^2.0.1 - version: 2.0.1 '@pnpm/exec': specifier: ^4.0.0 version: 4.0.0 @@ -207,9 +204,6 @@ catalogs: '@pnpm/tgz-fixtures': specifier: 0.0.0 version: 0.0.0 - '@pnpm/util.lex-comparator': - specifier: ^4.0.1 - version: 4.0.1 '@reflink/reflink': specifier: 0.1.19 version: 0.1.19 @@ -1395,7 +1389,7 @@ importers: dependencies: '@inquirer/prompts': specifier: 'catalog:' - version: 8.5.2(@types/node@26.1.2) + version: 8.5.2(@types/node@22.20.1) '@pnpm/cli.utils': specifier: workspace:* version: link:../../cli/utils @@ -1688,7 +1682,7 @@ importers: dependencies: '@inquirer/prompts': specifier: 'catalog:' - version: 8.5.2(@types/node@26.1.2) + version: 8.5.2(@types/node@22.20.1) '@pnpm/building.after-install': specifier: workspace:* version: link:../after-install @@ -1728,12 +1722,12 @@ importers: '@pnpm/store.connection-manager': specifier: workspace:* version: link:../../store/connection-manager + '@pnpm/text.ordinal-comparator': + specifier: workspace:* + version: link:../../text/ordinal-comparator '@pnpm/types': specifier: workspace:* version: link:../../core/types - '@pnpm/util.lex-comparator': - specifier: 'catalog:' - version: 4.0.1 '@pnpm/workspace.projects-sorter': specifier: workspace:* version: link:../../workspace/projects-sorter @@ -2137,12 +2131,12 @@ importers: '@pnpm/installing.dedupe.types': specifier: workspace:* version: link:../../installing/dedupe/types + '@pnpm/text.ordinal-comparator': + specifier: workspace:* + version: link:../../text/ordinal-comparator '@pnpm/types': specifier: workspace:* version: link:../../core/types - '@pnpm/util.lex-comparator': - specifier: 'catalog:' - version: 4.0.1 ansi-diff: specifier: 'catalog:' version: 1.2.0 @@ -2483,9 +2477,9 @@ importers: '@pnpm/config.matcher': specifier: workspace:* version: link:../matcher - '@pnpm/config.nerf-dart': - specifier: 'catalog:' - version: 2.0.1 + '@pnpm/config.registry-auth-key': + specifier: workspace:* + version: link:../registry-auth-key '@pnpm/constants': specifier: workspace:* version: link:../../core/constants @@ -2593,6 +2587,15 @@ importers: specifier: 'catalog:' version: 6.0.0 + pnpm11/config/registry-auth-key: + devDependencies: + '@jest/globals': + specifier: 'catalog:' + version: 30.4.1(supports-color@10.2.2) + '@pnpm/config.registry-auth-key': + specifier: workspace:* + version: 'link:' + pnpm11/config/version-policy: dependencies: '@pnpm/config.matcher': @@ -2761,14 +2764,14 @@ importers: version: link:../../fetching/types openpgp: specifier: 'catalog:' - version: 6.3.1(@openpgp/web-stream-tools@0.3.1(@types/node@26.1.2)(typescript@6.0.3)) + version: 6.3.1(@openpgp/web-stream-tools@0.3.1(@types/node@22.20.1)(typescript@6.0.3)) devDependencies: '@jest/globals': specifier: 'catalog:' version: 30.4.1(supports-color@10.2.2) '@openpgp/web-stream-tools': specifier: 'catalog:' - version: 0.3.1(@types/node@26.1.2)(typescript@6.0.3) + version: 0.3.1(@types/node@22.20.1)(typescript@6.0.3) '@pnpm/crypto.shasums-file': specifier: workspace:* version: 'link:' @@ -2835,7 +2838,7 @@ importers: dependencies: '@inquirer/prompts': specifier: 'catalog:' - version: 8.5.2(@types/node@26.1.2) + version: 8.5.2(@types/node@22.20.1) '@pnpm/cli.command': specifier: workspace:* version: link:../../../cli/command @@ -3431,15 +3434,15 @@ importers: '@pnpm/pkg-manifest.reader': specifier: workspace:* version: link:../../../pkg-manifest/reader + '@pnpm/text.ordinal-comparator': + specifier: workspace:* + version: link:../../../text/ordinal-comparator '@pnpm/text.tree-renderer': specifier: workspace:* version: link:../../../text/tree-renderer '@pnpm/types': specifier: workspace:* version: link:../../../core/types - '@pnpm/util.lex-comparator': - specifier: 'catalog:' - version: 4.0.1 '@pnpm/workspace.project-manifest-reader': specifier: workspace:* version: link:../../../workspace/project-manifest-reader @@ -3639,12 +3642,12 @@ importers: '@pnpm/store.index': specifier: workspace:* version: link:../../../store/index + '@pnpm/text.ordinal-comparator': + specifier: workspace:* + version: link:../../../text/ordinal-comparator '@pnpm/types': specifier: workspace:* version: link:../../../core/types - '@pnpm/util.lex-comparator': - specifier: 'catalog:' - version: 4.0.1 load-json-file: specifier: 'catalog:' version: 7.0.1 @@ -3826,7 +3829,7 @@ importers: dependencies: '@inquirer/prompts': specifier: 'catalog:' - version: 8.5.2(@types/node@26.1.2) + version: 8.5.2(@types/node@22.20.1) '@pnpm/bins.linker': specifier: workspace:* version: link:../../../bins/linker @@ -3981,12 +3984,12 @@ importers: '@pnpm/resolving.resolver-base': specifier: workspace:* version: link:../../../resolving/resolver-base + '@pnpm/text.ordinal-comparator': + specifier: workspace:* + version: link:../../../text/ordinal-comparator '@pnpm/types': specifier: workspace:* version: link:../../../core/types - '@pnpm/util.lex-comparator': - specifier: 'catalog:' - version: 4.0.1 '@pnpm/worker': specifier: workspace:^ version: link:../../../worker @@ -4064,12 +4067,12 @@ importers: '@pnpm/resolving.resolver-base': specifier: workspace:* version: link:../../../resolving/resolver-base + '@pnpm/text.ordinal-comparator': + specifier: workspace:* + version: link:../../../text/ordinal-comparator '@pnpm/types': specifier: workspace:* version: link:../../../core/types - '@pnpm/util.lex-comparator': - specifier: 'catalog:' - version: 4.0.1 '@pnpm/worker': specifier: workspace:^ version: link:../../../worker @@ -4150,7 +4153,7 @@ importers: dependencies: '@inquirer/prompts': specifier: 'catalog:' - version: 8.5.2(@types/node@26.1.2) + version: 8.5.2(@types/node@22.20.1) '@pnpm/bins.resolver': specifier: workspace:* version: link:../../bins/resolver @@ -4217,12 +4220,12 @@ importers: '@pnpm/store.path': specifier: workspace:* version: link:../../store/path + '@pnpm/text.ordinal-comparator': + specifier: workspace:* + version: link:../../text/ordinal-comparator '@pnpm/types': specifier: workspace:* version: link:../../core/types - '@pnpm/util.lex-comparator': - specifier: 'catalog:' - version: 4.0.1 '@pnpm/workspace.injected-deps-syncer': specifier: workspace:* version: link:../../workspace/injected-deps-syncer @@ -4517,9 +4520,9 @@ importers: '@pnpm/test-fixtures': specifier: workspace:* version: link:../../__utils__/test-fixtures - '@pnpm/util.lex-comparator': - specifier: 'catalog:' - version: 4.0.1 + '@pnpm/text.ordinal-comparator': + specifier: workspace:* + version: link:../../text/ordinal-comparator '@zkochan/rimraf': specifier: 'catalog:' version: 4.0.0 @@ -4588,12 +4591,12 @@ importers: '@pnpm/store.create-cafs-store': specifier: workspace:* version: link:../../store/create-cafs-store + '@pnpm/text.ordinal-comparator': + specifier: workspace:* + version: link:../../text/ordinal-comparator '@pnpm/types': specifier: workspace:* version: link:../../core/types - '@pnpm/util.lex-comparator': - specifier: 'catalog:' - version: 4.0.1 tempy: specifier: 'catalog:' version: 3.0.0 @@ -4710,9 +4713,9 @@ importers: '@pnpm/test-fixtures': specifier: workspace:* version: link:../../__utils__/test-fixtures - '@pnpm/util.lex-comparator': - specifier: 'catalog:' - version: 4.0.1 + '@pnpm/text.ordinal-comparator': + specifier: workspace:* + version: link:../../text/ordinal-comparator '@types/lodash.throttle': specifier: 'catalog:' version: 4.1.9 @@ -4948,12 +4951,12 @@ importers: '@pnpm/store.connection-manager': specifier: workspace:* version: link:../../store/connection-manager + '@pnpm/text.ordinal-comparator': + specifier: workspace:* + version: link:../../text/ordinal-comparator '@pnpm/types': specifier: workspace:* version: link:../../core/types - '@pnpm/util.lex-comparator': - specifier: 'catalog:' - version: 4.0.1 is-subdir: specifier: 'catalog:' version: 2.0.0 @@ -4979,12 +4982,12 @@ importers: '@pnpm/pkg-manifest.reader': specifier: workspace:* version: link:../../pkg-manifest/reader + '@pnpm/text.ordinal-comparator': + specifier: workspace:* + version: link:../../text/ordinal-comparator '@pnpm/types': specifier: workspace:* version: link:../../core/types - '@pnpm/util.lex-comparator': - specifier: 'catalog:' - version: 4.0.1 devDependencies: '@pnpm/global.packages': specifier: workspace:* @@ -5181,7 +5184,7 @@ importers: dependencies: '@inquirer/prompts': specifier: 'catalog:' - version: 8.5.2(@types/node@26.1.2) + version: 8.5.2(@types/node@22.20.1) '@pnpm/building.after-install': specifier: workspace:* version: link:../../building/after-install @@ -5311,12 +5314,12 @@ importers: '@pnpm/store.controller': specifier: workspace:* version: link:../../store/controller + '@pnpm/text.ordinal-comparator': + specifier: workspace:* + version: link:../../text/ordinal-comparator '@pnpm/types': specifier: workspace:* version: link:../../core/types - '@pnpm/util.lex-comparator': - specifier: 'catalog:' - version: 4.0.1 '@pnpm/workspace.project-manifest-reader': specifier: workspace:* version: link:../../workspace/project-manifest-reader @@ -5587,7 +5590,7 @@ importers: dependencies: '@inquirer/prompts': specifier: 'catalog:' - version: 8.5.2(@types/node@26.1.2) + version: 8.5.2(@types/node@22.20.1) '@pnpm/bins.linker': specifier: workspace:* version: link:../../bins/linker @@ -5744,12 +5747,12 @@ importers: '@pnpm/store.index': specifier: workspace:* version: link:../../store/index + '@pnpm/text.ordinal-comparator': + specifier: workspace:* + version: link:../../text/ordinal-comparator '@pnpm/types': specifier: workspace:* version: link:../../core/types - '@pnpm/util.lex-comparator': - specifier: 'catalog:' - version: 4.0.1 '@pnpm/worker': specifier: workspace:^ version: link:../../worker @@ -5967,12 +5970,12 @@ importers: '@pnpm/store.controller-types': specifier: workspace:* version: link:../../store/controller-types + '@pnpm/text.ordinal-comparator': + specifier: workspace:* + version: link:../../text/ordinal-comparator '@pnpm/types': specifier: workspace:* version: link:../../core/types - '@pnpm/util.lex-comparator': - specifier: 'catalog:' - version: 4.0.1 '@pnpm/workspace.spec-parser': specifier: workspace:* version: link:../../workspace/spec-parser @@ -6367,12 +6370,12 @@ importers: '@pnpm/core-loggers': specifier: workspace:* version: link:../../../core/core-loggers + '@pnpm/text.ordinal-comparator': + specifier: workspace:* + version: link:../../../text/ordinal-comparator '@pnpm/types': specifier: workspace:* version: link:../../../core/types - '@pnpm/util.lex-comparator': - specifier: 'catalog:' - version: 4.0.1 is-subdir: specifier: 'catalog:' version: 2.0.0 @@ -7252,9 +7255,9 @@ importers: pnpm11/network/auth-header: dependencies: - '@pnpm/config.nerf-dart': - specifier: 'catalog:' - version: 2.0.1 + '@pnpm/config.registry-auth-key': + specifier: workspace:* + version: link:../../config/registry-auth-key '@pnpm/error': specifier: workspace:* version: link:../../core/error @@ -7274,9 +7277,9 @@ importers: pnpm11/network/fetch: dependencies: - '@pnpm/config.nerf-dart': - specifier: 'catalog:' - version: 2.0.1 + '@pnpm/config.registry-auth-key': + specifier: workspace:* + version: link:../../config/registry-auth-key '@pnpm/core-loggers': specifier: workspace:* version: link:../../core/core-loggers @@ -7355,9 +7358,9 @@ importers: pnpm11/object/key-sorting: dependencies: - '@pnpm/util.lex-comparator': - specifier: 'catalog:' - version: 4.0.1 + '@pnpm/text.ordinal-comparator': + specifier: workspace:* + version: link:../../text/ordinal-comparator sort-keys: specifier: 'catalog:' version: 6.0.1 @@ -7411,7 +7414,7 @@ importers: dependencies: '@inquirer/prompts': specifier: 'catalog:' - version: 8.5.2(@types/node@26.1.2) + version: 8.5.2(@types/node@22.20.1) '@pnpm/cli.utils': specifier: workspace:* version: link:../../cli/utils @@ -7844,12 +7847,12 @@ importers: '@pnpm/testing.registry-mock': specifier: workspace:* version: link:../testing/registry-mock + '@pnpm/text.ordinal-comparator': + specifier: workspace:* + version: link:../text/ordinal-comparator '@pnpm/types': specifier: workspace:* version: link:../core/types - '@pnpm/util.lex-comparator': - specifier: 'catalog:' - version: 4.0.1 '@pnpm/worker': specifier: workspace:* version: link:../worker @@ -8138,7 +8141,7 @@ importers: dependencies: '@inquirer/prompts': specifier: 'catalog:' - version: 8.5.2(@types/node@26.1.2) + version: 8.5.2(@types/node@22.20.1) '@pnpm/cli.utils': specifier: workspace:* version: link:../../cli/utils @@ -8223,7 +8226,7 @@ importers: dependencies: '@inquirer/prompts': specifier: 'catalog:' - version: 8.5.2(@types/node@26.1.2) + version: 8.5.2(@types/node@22.20.1) '@pnpm/bins.resolver': specifier: workspace:* version: link:../../bins/resolver @@ -9118,12 +9121,12 @@ importers: '@pnpm/store.path': specifier: workspace:* version: link:../path + '@pnpm/text.ordinal-comparator': + specifier: workspace:* + version: link:../../text/ordinal-comparator '@pnpm/types': specifier: workspace:* version: link:../../core/types - '@pnpm/util.lex-comparator': - specifier: 'catalog:' - version: 4.0.1 archy: specifier: 'catalog:' version: 1.0.0 @@ -9552,6 +9555,15 @@ importers: specifier: workspace:* version: 'link:' + pnpm11/text/ordinal-comparator: + devDependencies: + '@jest/globals': + specifier: 'catalog:' + version: 30.4.1(supports-color@10.2.2) + '@pnpm/text.ordinal-comparator': + specifier: workspace:* + version: 'link:' + pnpm11/text/tree-renderer: devDependencies: '@jest/globals': @@ -9595,7 +9607,7 @@ importers: version: link:../store/index '@rushstack/worker-pool': specifier: 'catalog:' - version: 0.7.22(@types/node@26.1.2) + version: 0.7.22(@types/node@22.20.1) is-windows: specifier: 'catalog:' version: 1.0.2 @@ -9694,12 +9706,12 @@ importers: '@pnpm/pkg-manifest.reader': specifier: workspace:* version: link:../../pkg-manifest/reader + '@pnpm/text.ordinal-comparator': + specifier: workspace:* + version: link:../../text/ordinal-comparator '@pnpm/types': specifier: workspace:* version: link:../../core/types - '@pnpm/util.lex-comparator': - specifier: 'catalog:' - version: 4.0.1 '@pnpm/workspace.projects-reader': specifier: workspace:* version: link:../projects-reader @@ -9927,12 +9939,12 @@ importers: '@pnpm/constants': specifier: workspace:* version: link:../../core/constants + '@pnpm/text.ordinal-comparator': + specifier: workspace:* + version: link:../../text/ordinal-comparator '@pnpm/types': specifier: workspace:* version: link:../../core/types - '@pnpm/util.lex-comparator': - specifier: 'catalog:' - version: 4.0.1 '@pnpm/workspace.project-manifest-reader': specifier: workspace:* version: link:../project-manifest-reader @@ -10089,12 +10101,12 @@ importers: '@pnpm/lockfile.types': specifier: workspace:* version: link:../../lockfile/types + '@pnpm/text.ordinal-comparator': + specifier: workspace:* + version: link:../../text/ordinal-comparator '@pnpm/types': specifier: workspace:* version: link:../../core/types - '@pnpm/util.lex-comparator': - specifier: 'catalog:' - version: 4.0.1 '@pnpm/workspace.workspace-manifest-reader': specifier: workspace:* version: link:../workspace-manifest-reader @@ -11397,10 +11409,6 @@ packages: resolution: {integrity: sha512-03d2l21gAyzGVr9SR6rS5pvCTnZ4HaNdi8jB2Y/UGvszzrNbA+AJVObVw6SulNQ1Eah3SHB9wCezJwtP+jYIcA==} engines: {node: '>=18.12'} - '@pnpm/config.nerf-dart@2.0.1': - resolution: {integrity: sha512-4jAXyUB1PyY6eETXojxYrXL2NWtcZVxQx8nHTkJjyy0aEx1quMxlIqwnlh8YZRaXcfiqM6VCIEc+BLZWwQq6yg==} - engines: {node: '>=22.13'} - '@pnpm/config@1004.11.0': resolution: {integrity: sha512-NuiUOC00Vjfy7oAbj2xBKwlTJysXVLjuT0FoCYtrvhf1z62xKZOWY+uSHUtvjdx7G73JDoShEAYd0tDLxvg1WQ==} engines: {node: '>=18.12'} @@ -11905,10 +11913,6 @@ packages: resolution: {integrity: sha512-blFO4Ws97tWv/SNE6N39ZdGmZBrocXnBOfVp0ln4kELmns4pGPZizqyRtR8EjfOLMLstbmNCTReBoDvLz1isVg==} engines: {node: '>=18.12'} - '@pnpm/util.lex-comparator@4.0.1': - resolution: {integrity: sha512-EZ3aWU7ThppE3Xgq7/ftxq8J/nit6z8I2/wZbC/acea2Zw7KJ1k/fLkGBgyyVAE37CULFsOSmPl3EjYM18cB2Q==} - engines: {node: '>=22.13'} - '@pnpm/which@3.0.1': resolution: {integrity: sha512-4ivtS12Oni9axgGefaq+gTPD+7N0VPCFdxFH8izCaWfnxLQblX3iVxba+25ZoagStlzUs8sQg8OMKlCVhyGWTw==} engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} @@ -17884,48 +17888,48 @@ snapshots: '@inquirer/ansi@2.0.7': {} - '@inquirer/checkbox@5.2.1(@types/node@26.1.2)': + '@inquirer/checkbox@5.2.1(@types/node@22.20.1)': dependencies: '@inquirer/ansi': 2.0.7 - '@inquirer/core': 11.2.1(@types/node@26.1.2) + '@inquirer/core': 11.2.1(@types/node@22.20.1) '@inquirer/figures': 2.0.7 - '@inquirer/type': 4.0.7(@types/node@26.1.2) + '@inquirer/type': 4.0.7(@types/node@22.20.1) optionalDependencies: - '@types/node': 26.1.2 + '@types/node': 22.20.1 - '@inquirer/confirm@6.1.1(@types/node@26.1.2)': + '@inquirer/confirm@6.1.1(@types/node@22.20.1)': dependencies: - '@inquirer/core': 11.2.1(@types/node@26.1.2) - '@inquirer/type': 4.0.7(@types/node@26.1.2) + '@inquirer/core': 11.2.1(@types/node@22.20.1) + '@inquirer/type': 4.0.7(@types/node@22.20.1) optionalDependencies: - '@types/node': 26.1.2 + '@types/node': 22.20.1 - '@inquirer/core@11.2.1(@types/node@26.1.2)': + '@inquirer/core@11.2.1(@types/node@22.20.1)': dependencies: '@inquirer/ansi': 2.0.7 '@inquirer/figures': 2.0.7 - '@inquirer/type': 4.0.7(@types/node@26.1.2) + '@inquirer/type': 4.0.7(@types/node@22.20.1) cli-width: 4.1.0 fast-wrap-ansi: 0.2.2 mute-stream: 3.0.0 signal-exit: 4.1.0 optionalDependencies: - '@types/node': 26.1.2 + '@types/node': 22.20.1 - '@inquirer/editor@5.2.2(@types/node@26.1.2)': + '@inquirer/editor@5.2.2(@types/node@22.20.1)': dependencies: - '@inquirer/core': 11.2.1(@types/node@26.1.2) - '@inquirer/external-editor': 3.0.3(@types/node@26.1.2) - '@inquirer/type': 4.0.7(@types/node@26.1.2) + '@inquirer/core': 11.2.1(@types/node@22.20.1) + '@inquirer/external-editor': 3.0.3(@types/node@22.20.1) + '@inquirer/type': 4.0.7(@types/node@22.20.1) optionalDependencies: - '@types/node': 26.1.2 + '@types/node': 22.20.1 - '@inquirer/expand@5.1.1(@types/node@26.1.2)': + '@inquirer/expand@5.1.1(@types/node@22.20.1)': dependencies: - '@inquirer/core': 11.2.1(@types/node@26.1.2) - '@inquirer/type': 4.0.7(@types/node@26.1.2) + '@inquirer/core': 11.2.1(@types/node@22.20.1) + '@inquirer/type': 4.0.7(@types/node@22.20.1) optionalDependencies: - '@types/node': 26.1.2 + '@types/node': 22.20.1 '@inquirer/external-editor@1.0.3(@types/node@22.20.1)': dependencies: @@ -17934,81 +17938,81 @@ snapshots: optionalDependencies: '@types/node': 22.20.1 - '@inquirer/external-editor@3.0.3(@types/node@26.1.2)': + '@inquirer/external-editor@3.0.3(@types/node@22.20.1)': dependencies: chardet: 2.2.0 iconv-lite: 0.7.3 optionalDependencies: - '@types/node': 26.1.2 + '@types/node': 22.20.1 '@inquirer/figures@1.0.15': {} '@inquirer/figures@2.0.7': {} - '@inquirer/input@5.1.2(@types/node@26.1.2)': + '@inquirer/input@5.1.2(@types/node@22.20.1)': dependencies: - '@inquirer/core': 11.2.1(@types/node@26.1.2) - '@inquirer/type': 4.0.7(@types/node@26.1.2) + '@inquirer/core': 11.2.1(@types/node@22.20.1) + '@inquirer/type': 4.0.7(@types/node@22.20.1) optionalDependencies: - '@types/node': 26.1.2 + '@types/node': 22.20.1 - '@inquirer/number@4.1.1(@types/node@26.1.2)': + '@inquirer/number@4.1.1(@types/node@22.20.1)': dependencies: - '@inquirer/core': 11.2.1(@types/node@26.1.2) - '@inquirer/type': 4.0.7(@types/node@26.1.2) + '@inquirer/core': 11.2.1(@types/node@22.20.1) + '@inquirer/type': 4.0.7(@types/node@22.20.1) optionalDependencies: - '@types/node': 26.1.2 + '@types/node': 22.20.1 - '@inquirer/password@5.1.1(@types/node@26.1.2)': + '@inquirer/password@5.1.1(@types/node@22.20.1)': dependencies: '@inquirer/ansi': 2.0.7 - '@inquirer/core': 11.2.1(@types/node@26.1.2) - '@inquirer/type': 4.0.7(@types/node@26.1.2) + '@inquirer/core': 11.2.1(@types/node@22.20.1) + '@inquirer/type': 4.0.7(@types/node@22.20.1) optionalDependencies: - '@types/node': 26.1.2 + '@types/node': 22.20.1 - '@inquirer/prompts@8.5.2(@types/node@26.1.2)': + '@inquirer/prompts@8.5.2(@types/node@22.20.1)': dependencies: - '@inquirer/checkbox': 5.2.1(@types/node@26.1.2) - '@inquirer/confirm': 6.1.1(@types/node@26.1.2) - '@inquirer/editor': 5.2.2(@types/node@26.1.2) - '@inquirer/expand': 5.1.1(@types/node@26.1.2) - '@inquirer/input': 5.1.2(@types/node@26.1.2) - '@inquirer/number': 4.1.1(@types/node@26.1.2) - '@inquirer/password': 5.1.1(@types/node@26.1.2) - '@inquirer/rawlist': 5.3.1(@types/node@26.1.2) - '@inquirer/search': 4.2.1(@types/node@26.1.2) - '@inquirer/select': 5.2.1(@types/node@26.1.2) + '@inquirer/checkbox': 5.2.1(@types/node@22.20.1) + '@inquirer/confirm': 6.1.1(@types/node@22.20.1) + '@inquirer/editor': 5.2.2(@types/node@22.20.1) + '@inquirer/expand': 5.1.1(@types/node@22.20.1) + '@inquirer/input': 5.1.2(@types/node@22.20.1) + '@inquirer/number': 4.1.1(@types/node@22.20.1) + '@inquirer/password': 5.1.1(@types/node@22.20.1) + '@inquirer/rawlist': 5.3.1(@types/node@22.20.1) + '@inquirer/search': 4.2.1(@types/node@22.20.1) + '@inquirer/select': 5.2.1(@types/node@22.20.1) optionalDependencies: - '@types/node': 26.1.2 + '@types/node': 22.20.1 - '@inquirer/rawlist@5.3.1(@types/node@26.1.2)': + '@inquirer/rawlist@5.3.1(@types/node@22.20.1)': dependencies: - '@inquirer/core': 11.2.1(@types/node@26.1.2) - '@inquirer/type': 4.0.7(@types/node@26.1.2) + '@inquirer/core': 11.2.1(@types/node@22.20.1) + '@inquirer/type': 4.0.7(@types/node@22.20.1) optionalDependencies: - '@types/node': 26.1.2 + '@types/node': 22.20.1 - '@inquirer/search@4.2.1(@types/node@26.1.2)': + '@inquirer/search@4.2.1(@types/node@22.20.1)': dependencies: - '@inquirer/core': 11.2.1(@types/node@26.1.2) + '@inquirer/core': 11.2.1(@types/node@22.20.1) '@inquirer/figures': 2.0.7 - '@inquirer/type': 4.0.7(@types/node@26.1.2) + '@inquirer/type': 4.0.7(@types/node@22.20.1) optionalDependencies: - '@types/node': 26.1.2 + '@types/node': 22.20.1 - '@inquirer/select@5.2.1(@types/node@26.1.2)': + '@inquirer/select@5.2.1(@types/node@22.20.1)': dependencies: '@inquirer/ansi': 2.0.7 - '@inquirer/core': 11.2.1(@types/node@26.1.2) + '@inquirer/core': 11.2.1(@types/node@22.20.1) '@inquirer/figures': 2.0.7 - '@inquirer/type': 4.0.7(@types/node@26.1.2) + '@inquirer/type': 4.0.7(@types/node@22.20.1) optionalDependencies: - '@types/node': 26.1.2 + '@types/node': 22.20.1 - '@inquirer/type@4.0.7(@types/node@26.1.2)': + '@inquirer/type@4.0.7(@types/node@22.20.1)': optionalDependencies: - '@types/node': 26.1.2 + '@types/node': 22.20.1 '@isaacs/cliui@9.0.0': {} @@ -18029,7 +18033,7 @@ snapshots: '@jest/console@30.4.1': dependencies: '@jest/types': 30.4.1 - '@types/node': 22.20.1 + '@types/node': 26.1.2 chalk: 4.1.2 jest-message-util: 30.4.1 jest-util: 30.4.1 @@ -18043,7 +18047,7 @@ snapshots: '@jest/test-result': 30.4.1 '@jest/transform': 30.4.1(@babel/types@7.29.7)(supports-color@10.2.2) '@jest/types': 30.4.1 - '@types/node': 22.20.1 + '@types/node': 26.1.2 ansi-escapes: 4.3.2 chalk: 4.1.2 ci-info: 4.4.0 @@ -18051,7 +18055,7 @@ snapshots: fast-json-stable-stringify: 2.1.0 graceful-fs: 4.2.11(patch_hash=68ebc232025360cb3dcd3081f4067f4e9fc022ab6b6f71a3230e86c7a5b337d1) jest-changed-files: 30.4.1 - jest-config: 30.4.2(@babel/types@7.29.7)(@types/node@22.20.1)(supports-color@10.2.2) + jest-config: 30.4.2(@babel/types@7.29.7)(@types/node@26.1.2)(supports-color@10.2.2) jest-haste-map: 30.4.1 jest-message-util: 30.4.1 jest-regex-util: 30.4.0 @@ -18078,7 +18082,7 @@ snapshots: dependencies: '@jest/fake-timers': 30.4.1 '@jest/types': 30.4.1 - '@types/node': 22.20.1 + '@types/node': 26.1.2 jest-mock: 30.4.1 '@jest/expect-utils@30.4.1': @@ -18096,7 +18100,7 @@ snapshots: dependencies: '@jest/types': 30.4.1 '@sinonjs/fake-timers': 15.4.0 - '@types/node': 22.20.1 + '@types/node': 26.1.2 jest-message-util: 30.4.1 jest-mock: 30.4.1 jest-util: 30.4.1 @@ -18114,7 +18118,7 @@ snapshots: '@jest/pattern@30.4.0': dependencies: - '@types/node': 22.20.1 + '@types/node': 26.1.2 jest-regex-util: 30.4.0 '@jest/reporters@30.4.1(@babel/types@7.29.7)(supports-color@10.2.2)': @@ -18125,7 +18129,7 @@ snapshots: '@jest/transform': 30.4.1(@babel/types@7.29.7)(supports-color@10.2.2) '@jest/types': 30.4.1 '@jridgewell/trace-mapping': 0.3.31 - '@types/node': 22.20.1 + '@types/node': 26.1.2 chalk: 4.1.2 collect-v8-coverage: 1.0.3 exit-x: 0.2.2 @@ -18216,7 +18220,7 @@ snapshots: '@jest/schemas': 30.4.1 '@types/istanbul-lib-coverage': 2.0.6 '@types/istanbul-reports': 3.0.4 - '@types/node': 22.20.1 + '@types/node': 26.1.2 '@types/yargs': 17.0.35 chalk: 4.1.2 @@ -18345,9 +18349,9 @@ snapshots: '@npmcli/redact@4.0.0': {} - '@openpgp/web-stream-tools@0.3.1(@types/node@26.1.2)(typescript@6.0.3)': + '@openpgp/web-stream-tools@0.3.1(@types/node@22.20.1)(typescript@6.0.3)': optionalDependencies: - '@types/node': 26.1.2 + '@types/node': 22.20.1 typescript: 6.0.3 '@pkgr/core@0.3.6': {} @@ -18454,8 +18458,6 @@ snapshots: '@pnpm/config.nerf-dart@1.0.1': {} - '@pnpm/config.nerf-dart@2.0.1': {} - '@pnpm/config@1004.11.0(@pnpm/logger@1001.0.1)': dependencies: '@pnpm/catalogs.config': 1000.0.6 @@ -19431,8 +19433,6 @@ snapshots: '@pnpm/util.lex-comparator@3.0.2': {} - '@pnpm/util.lex-comparator@4.0.1': {} - '@pnpm/which@3.0.1': dependencies: isexe: 2.0.0 @@ -19527,9 +19527,9 @@ snapshots: optionalDependencies: '@types/node': 22.20.1 - '@rushstack/worker-pool@0.7.22(@types/node@26.1.2)': + '@rushstack/worker-pool@0.7.22(@types/node@22.20.1)': optionalDependencies: - '@types/node': 26.1.2 + '@types/node': 22.20.1 '@sec-ant/readable-stream@0.4.1': {} @@ -19694,7 +19694,7 @@ snapshots: '@types/isexe@2.0.4': dependencies: - '@types/node': 22.20.1 + '@types/node': 26.1.2 '@types/istanbul-lib-coverage@2.0.6': {} @@ -19828,7 +19828,7 @@ snapshots: '@types/touch@3.1.5': dependencies: - '@types/node': 22.20.1 + '@types/node': 26.1.2 '@types/treeify@1.0.3': {} @@ -22365,7 +22365,7 @@ snapshots: '@jest/expect': 30.4.1(supports-color@10.2.2) '@jest/test-result': 30.4.1 '@jest/types': 30.4.1 - '@types/node': 22.20.1 + '@types/node': 26.1.2 chalk: 4.1.2 co: 4.6.0 dedent: 1.7.2 @@ -22438,6 +22438,38 @@ snapshots: - babel-plugin-macros - supports-color + jest-config@30.4.2(@babel/types@7.29.7)(@types/node@26.1.2)(supports-color@10.2.2): + dependencies: + '@babel/core': 7.29.7(supports-color@10.2.2) + '@jest/get-type': 30.1.0 + '@jest/pattern': 30.4.0 + '@jest/test-sequencer': 30.4.1 + '@jest/types': 30.4.1 + babel-jest: 30.4.1(@babel/core@7.29.7(supports-color@10.2.2))(@babel/types@7.29.7)(supports-color@10.2.2) + chalk: 4.1.2 + ci-info: 4.4.0 + deepmerge: 4.3.1 + glob: 11.1.0 + graceful-fs: 4.2.11(patch_hash=68ebc232025360cb3dcd3081f4067f4e9fc022ab6b6f71a3230e86c7a5b337d1) + jest-circus: 30.4.2(@babel/types@7.29.7)(supports-color@10.2.2) + jest-docblock: 30.4.0 + jest-environment-node: 30.4.1 + jest-regex-util: 30.4.0 + jest-resolve: 30.4.1 + jest-runner: 30.4.2(@babel/types@7.29.7)(supports-color@10.2.2) + jest-util: 30.4.1 + jest-validate: 30.4.1 + parse-json: 5.2.0 + pretty-format: 30.4.1 + slash: 3.0.0 + strip-json-comments: 3.1.1 + optionalDependencies: + '@types/node': 26.1.2 + transitivePeerDependencies: + - '@babel/types' + - babel-plugin-macros + - supports-color + jest-diff@30.4.1: dependencies: '@jest/diff-sequences': 30.4.0 @@ -22462,7 +22494,7 @@ snapshots: '@jest/environment': 30.4.1 '@jest/fake-timers': 30.4.1 '@jest/types': 30.4.1 - '@types/node': 22.20.1 + '@types/node': 26.1.2 jest-mock: 30.4.1 jest-util: 30.4.1 jest-validate: 30.4.1 @@ -22488,7 +22520,7 @@ snapshots: jest-haste-map@30.4.1: dependencies: '@jest/types': 30.4.1 - '@types/node': 22.20.1 + '@types/node': 26.1.2 anymatch: 3.1.3 fb-watchman: 2.0.2 graceful-fs: 4.2.11(patch_hash=68ebc232025360cb3dcd3081f4067f4e9fc022ab6b6f71a3230e86c7a5b337d1) @@ -22528,7 +22560,7 @@ snapshots: jest-mock@30.4.1: dependencies: '@jest/types': 30.4.1 - '@types/node': 22.20.1 + '@types/node': 26.1.2 jest-util: 30.4.1 jest-pnp-resolver@1.2.3(jest-resolve@29.7.0): @@ -22580,7 +22612,7 @@ snapshots: '@jest/test-result': 30.4.1 '@jest/transform': 30.4.1(@babel/types@7.29.7)(supports-color@10.2.2) '@jest/types': 30.4.1 - '@types/node': 22.20.1 + '@types/node': 26.1.2 chalk: 4.1.2 emittery: 0.13.1 exit-x: 0.2.2 @@ -22610,7 +22642,7 @@ snapshots: '@jest/test-result': 30.4.1 '@jest/transform': 30.4.1(@babel/types@7.29.7)(supports-color@10.2.2) '@jest/types': 30.4.1 - '@types/node': 22.20.1 + '@types/node': 26.1.2 chalk: 4.1.2 cjs-module-lexer: 2.2.0 collect-v8-coverage: 1.0.3 @@ -22667,7 +22699,7 @@ snapshots: jest-util@30.4.1: dependencies: '@jest/types': 30.4.1 - '@types/node': 22.20.1 + '@types/node': 26.1.2 chalk: 4.1.2 ci-info: 4.4.0 graceful-fs: 4.2.11(patch_hash=68ebc232025360cb3dcd3081f4067f4e9fc022ab6b6f71a3230e86c7a5b337d1) @@ -22695,7 +22727,7 @@ snapshots: dependencies: '@jest/test-result': 30.4.1 '@jest/types': 30.4.1 - '@types/node': 22.20.1 + '@types/node': 26.1.2 ansi-escapes: 4.3.2 chalk: 4.1.2 emittery: 0.13.1 @@ -22711,7 +22743,7 @@ snapshots: jest-worker@30.4.1: dependencies: - '@types/node': 22.20.1 + '@types/node': 26.1.2 '@ungap/structured-clone': 1.3.3 jest-util: 30.4.1 merge-stream: 2.0.0 @@ -23541,9 +23573,9 @@ snapshots: is-docker: 2.2.1 is-wsl: 2.2.0 - openpgp@6.3.1(@openpgp/web-stream-tools@0.3.1(@types/node@26.1.2)(typescript@6.0.3)): + openpgp@6.3.1(@openpgp/web-stream-tools@0.3.1(@types/node@22.20.1)(typescript@6.0.3)): optionalDependencies: - '@openpgp/web-stream-tools': 0.3.1(@types/node@26.1.2)(typescript@6.0.3) + '@openpgp/web-stream-tools': 0.3.1(@types/node@22.20.1)(typescript@6.0.3) opt-cli@1.5.1: dependencies: diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index 466e8ca92d..67f3c4e5dd 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -118,7 +118,6 @@ catalog: '@pnpm/byline': ^1.0.0 '@pnpm/colorize-semver-diff': ^2.0.0 '@pnpm/config.env-replace': ^4.1.0 - '@pnpm/config.nerf-dart': ^2.0.1 '@pnpm/exec': ^4.0.0 '@pnpm/log.group': 4.0.1 '@pnpm/logger': '^1100.0.0' @@ -131,7 +130,6 @@ catalog: '@pnpm/semver-diff': ^2.0.0 '@pnpm/tabtab': ^0.5.4 '@pnpm/tgz-fixtures': 0.0.0 - '@pnpm/util.lex-comparator': ^4.0.1 '@reflink/reflink': 0.1.19 '@rushstack/worker-pool': 0.7.22 '@stylistic/eslint-plugin': ^5.10.0 diff --git a/pnpm11/building/commands/package.json b/pnpm11/building/commands/package.json index 9900a3a6c8..7995648680 100644 --- a/pnpm11/building/commands/package.json +++ b/pnpm11/building/commands/package.json @@ -46,8 +46,8 @@ "@pnpm/installing.modules-yaml": "workspace:*", "@pnpm/prepare-temp-dir": "workspace:*", "@pnpm/store.connection-manager": "workspace:*", + "@pnpm/text.ordinal-comparator": "workspace:*", "@pnpm/types": "workspace:*", - "@pnpm/util.lex-comparator": "catalog:", "@pnpm/workspace.projects-sorter": "workspace:*", "chalk": "catalog:", "p-limit": "catalog:", diff --git a/pnpm11/building/commands/src/policy/approveBuilds.ts b/pnpm11/building/commands/src/policy/approveBuilds.ts index 8cfd096a6d..61776f665c 100644 --- a/pnpm11/building/commands/src/policy/approveBuilds.ts +++ b/pnpm11/building/commands/src/policy/approveBuilds.ts @@ -7,7 +7,7 @@ import { PnpmError } from '@pnpm/error' import { install } from '@pnpm/installing.commands' import { type StrictModules, writeModulesManifest } from '@pnpm/installing.modules-yaml' import { globalInfo } from '@pnpm/logger' -import { lexCompare } from '@pnpm/util.lex-comparator' +import { lexCompare } from '@pnpm/text.ordinal-comparator' import chalk from 'chalk' import { renderHelp } from 'render-help' diff --git a/pnpm11/building/commands/tsconfig.json b/pnpm11/building/commands/tsconfig.json index d9f2b9b990..ac9a736075 100644 --- a/pnpm11/building/commands/tsconfig.json +++ b/pnpm11/building/commands/tsconfig.json @@ -78,6 +78,9 @@ { "path": "../../testing/registry-mock" }, + { + "path": "../../text/ordinal-comparator" + }, { "path": "../../workspace/projects-filter" }, diff --git a/pnpm11/cli/default-reporter/package.json b/pnpm11/cli/default-reporter/package.json index 3d90b78533..ed0bf251fc 100644 --- a/pnpm11/cli/default-reporter/package.json +++ b/pnpm11/cli/default-reporter/package.json @@ -43,8 +43,8 @@ "@pnpm/error": "workspace:*", "@pnpm/installing.dedupe.issues-renderer": "workspace:*", "@pnpm/installing.dedupe.types": "workspace:*", + "@pnpm/text.ordinal-comparator": "workspace:*", "@pnpm/types": "workspace:*", - "@pnpm/util.lex-comparator": "catalog:", "ansi-diff": "catalog:", "boxen": "catalog:", "chalk": "catalog:", diff --git a/pnpm11/cli/default-reporter/src/reporterForClient/reportIgnoredBuilds.ts b/pnpm11/cli/default-reporter/src/reporterForClient/reportIgnoredBuilds.ts index e7329d8a52..1bdae8b53e 100644 --- a/pnpm11/cli/default-reporter/src/reporterForClient/reportIgnoredBuilds.ts +++ b/pnpm11/cli/default-reporter/src/reporterForClient/reportIgnoredBuilds.ts @@ -1,5 +1,5 @@ import type { IgnoredScriptsLog } from '@pnpm/core-loggers' -import { lexCompare } from '@pnpm/util.lex-comparator' +import { lexCompare } from '@pnpm/text.ordinal-comparator' import boxen from 'boxen' import * as Rx from 'rxjs' import { map } from 'rxjs/operators' diff --git a/pnpm11/cli/default-reporter/tsconfig.json b/pnpm11/cli/default-reporter/tsconfig.json index 981ec6b418..d7fbea3112 100644 --- a/pnpm11/cli/default-reporter/tsconfig.json +++ b/pnpm11/cli/default-reporter/tsconfig.json @@ -31,6 +31,9 @@ { "path": "../../installing/dedupe/types" }, + { + "path": "../../text/ordinal-comparator" + }, { "path": "../meta" } diff --git a/pnpm11/config/reader/package.json b/pnpm11/config/reader/package.json index 10b8442d13..740a546ba6 100644 --- a/pnpm11/config/reader/package.json +++ b/pnpm11/config/reader/package.json @@ -37,7 +37,7 @@ "@pnpm/catalogs.types": "workspace:*", "@pnpm/config.env-replace": "catalog:", "@pnpm/config.matcher": "workspace:*", - "@pnpm/config.nerf-dart": "catalog:", + "@pnpm/config.registry-auth-key": "workspace:*", "@pnpm/constants": "workspace:*", "@pnpm/error": "workspace:*", "@pnpm/hooks.pnpmfile": "workspace:*", diff --git a/pnpm11/config/reader/src/loadNpmrcFiles.ts b/pnpm11/config/reader/src/loadNpmrcFiles.ts index 5432b35b75..808bafdc9a 100644 --- a/pnpm11/config/reader/src/loadNpmrcFiles.ts +++ b/pnpm11/config/reader/src/loadNpmrcFiles.ts @@ -3,7 +3,7 @@ import os from 'node:os' import path from 'node:path' import { envReplaceLossy } from '@pnpm/config.env-replace' -import { nerfDart } from '@pnpm/config.nerf-dart' +import { nerfDart } from '@pnpm/config.registry-auth-key' import { PnpmError } from '@pnpm/error' import normalizeRegistryUrl from 'normalize-registry-url' import { readIniFileSync } from 'read-ini-file' diff --git a/pnpm11/config/reader/tsconfig.json b/pnpm11/config/reader/tsconfig.json index 2784082b86..2e52fc2574 100644 --- a/pnpm11/config/reader/tsconfig.json +++ b/pnpm11/config/reader/tsconfig.json @@ -50,6 +50,9 @@ }, { "path": "../matcher" + }, + { + "path": "../registry-auth-key" } ] } diff --git a/pnpm11/config/registry-auth-key/README.md b/pnpm11/config/registry-auth-key/README.md new file mode 100644 index 0000000000..73a91c4afc --- /dev/null +++ b/pnpm11/config/registry-auth-key/README.md @@ -0,0 +1,3 @@ +# @pnpm/config.registry-auth-key + +> Maps a registry URL to the key that its settings are stored under in .npmrc diff --git a/pnpm11/config/registry-auth-key/package.json b/pnpm11/config/registry-auth-key/package.json new file mode 100644 index 0000000000..35268e925b --- /dev/null +++ b/pnpm11/config/registry-auth-key/package.json @@ -0,0 +1,44 @@ +{ + "name": "@pnpm/config.registry-auth-key", + "version": "1100.0.0", + "description": "Maps a registry URL to the key that its settings are stored under in .npmrc", + "keywords": [ + "pnpm", + "pnpm11", + "npmrc" + ], + "license": "MIT", + "funding": "https://opencollective.com/pnpm", + "repository": "https://github.com/pnpm/pnpm/tree/main/pnpm11/config/registry-auth-key", + "homepage": "https://github.com/pnpm/pnpm/tree/main/pnpm11/config/registry-auth-key#readme", + "bugs": { + "url": "https://github.com/pnpm/pnpm/issues" + }, + "type": "module", + "main": "lib/index.js", + "types": "lib/index.d.ts", + "exports": { + ".": "./lib/index.js" + }, + "files": [ + "lib", + "!*.map" + ], + "scripts": { + "lint": "eslint \"src/**/*.ts\" \"test/**/*.ts\"", + "test": "pn compile && pn .test", + "prepublishOnly": "tsgo --build", + "compile": "tsgo --build && pn lint --fix", + ".test": "cross-env NODE_OPTIONS=\"$NODE_OPTIONS --experimental-vm-modules --disable-warning=ExperimentalWarning --disable-warning=DEP0169\" jest" + }, + "devDependencies": { + "@jest/globals": "catalog:", + "@pnpm/config.registry-auth-key": "workspace:*" + }, + "engines": { + "node": ">=22.13" + }, + "jest": { + "preset": "@pnpm/jest-config" + } +} diff --git a/pnpm11/config/registry-auth-key/src/index.ts b/pnpm11/config/registry-auth-key/src/index.ts new file mode 100644 index 0000000000..ade7a0fe73 --- /dev/null +++ b/pnpm11/config/registry-auth-key/src/index.ts @@ -0,0 +1,14 @@ +/** + * Maps a registry URL to the key that its settings (`_authToken`, `certfile`, + * and so on) are stored under in `.npmrc`. For instance, + * `https://registry.npmjs.org/some-pkg` maps to `//registry.npmjs.org/`. + * + * npm calls this key a "nerf dart" and derives it the same way: + * https://github.com/npm/cli/blob/latest/workspaces/config/lib/nerf-dart.js + */ +export function nerfDart (url: string): string { + const parsed = new URL(url) + const from = `${parsed.protocol}//${parsed.host}${parsed.pathname}` + const rel = new URL('.', from) + return `//${rel.host}${rel.pathname}` +} diff --git a/pnpm11/config/registry-auth-key/test/index.test.ts b/pnpm11/config/registry-auth-key/test/index.test.ts new file mode 100644 index 0000000000..2522e2364c --- /dev/null +++ b/pnpm11/config/registry-auth-key/test/index.test.ts @@ -0,0 +1,42 @@ +import { expect, test } from '@jest/globals' +import { nerfDart } from '@pnpm/config.registry-auth-key' + +test.each([ + ['//registry.npmjs.org/', [ + 'https://registry.npmjs.org', + 'https://registry.npmjs.org/package-name', + 'https://registry.npmjs.org/package-name?write=true', + 'https://registry.npmjs.org/@scope%2fpackage-name', + 'https://registry.npmjs.org/@scope%2fpackage-name?write=true', + 'https://username:password@registry.npmjs.org/package-name?write=true', + 'https://registry.npmjs.org/#hash', + 'https://registry.npmjs.org/?write=true#hash', + 'https://registry.npmjs.org/package-name?write=true#hash', + 'https://registry.npmjs.org/package-name#hash', + 'https://registry.npmjs.org/@scope%2fpackage-name?write=true#hash', + 'https://registry.npmjs.org/@scope%2fpackage-name#hash', + ]], + ['//my-couch:5984/registry/_design/app/rewrite/', [ + 'https://my-couch:5984/registry/_design/app/rewrite/', + 'https://my-couch:5984/registry/_design/app/rewrite/package-name', + 'https://my-couch:5984/registry/_design/app/rewrite/package-name?write=true', + 'https://my-couch:5984/registry/_design/app/rewrite/@scope%2fpackage-name', + 'https://my-couch:5984/registry/_design/app/rewrite/@scope%2fpackage-name?write=true', + 'https://username:password@my-couch:5984/registry/_design/app/rewrite/package-name?write=true', + 'https://my-couch:5984/registry/_design/app/rewrite/#hash', + 'https://my-couch:5984/registry/_design/app/rewrite/?write=true#hash', + 'https://my-couch:5984/registry/_design/app/rewrite/package-name?write=true#hash', + 'https://my-couch:5984/registry/_design/app/rewrite/package-name#hash', + 'https://my-couch:5984/registry/_design/app/rewrite/@scope%2fpackage-name?write=true#hash', + 'https://my-couch:5984/registry/_design/app/rewrite/@scope%2fpackage-name#hash', + ]], +])('nerfDart() returns %s', (key, urls) => { + expect.assertions(urls.length) + for (const url of urls) { + expect(nerfDart(url)).toBe(key) + } +}) + +test('nerfDart() throws on an invalid URL', () => { + expect(() => nerfDart('not a valid url')).toThrow() +}) diff --git a/pnpm11/config/registry-auth-key/test/tsconfig.json b/pnpm11/config/registry-auth-key/test/tsconfig.json new file mode 100644 index 0000000000..67ce5e1d0e --- /dev/null +++ b/pnpm11/config/registry-auth-key/test/tsconfig.json @@ -0,0 +1,18 @@ +{ + "extends": "../tsconfig.json", + "compilerOptions": { + "noEmit": false, + "outDir": "../node_modules/.test.lib", + "rootDir": "..", + "isolatedModules": true + }, + "include": [ + "**/*.ts", + "../../../__typings__/**/*.d.ts" + ], + "references": [ + { + "path": ".." + } + ] +} diff --git a/pnpm11/config/registry-auth-key/tsconfig.json b/pnpm11/config/registry-auth-key/tsconfig.json new file mode 100644 index 0000000000..c6f0399f60 --- /dev/null +++ b/pnpm11/config/registry-auth-key/tsconfig.json @@ -0,0 +1,12 @@ +{ + "extends": "@pnpm/tsconfig", + "compilerOptions": { + "outDir": "lib", + "rootDir": "src" + }, + "include": [ + "src/**/*.ts", + "../../__typings__/**/*.d.ts" + ], + "references": [] +} diff --git a/pnpm11/config/registry-auth-key/tsconfig.lint.json b/pnpm11/config/registry-auth-key/tsconfig.lint.json new file mode 100644 index 0000000000..1bbe711971 --- /dev/null +++ b/pnpm11/config/registry-auth-key/tsconfig.lint.json @@ -0,0 +1,8 @@ +{ + "extends": "./tsconfig.json", + "include": [ + "src/**/*.ts", + "test/**/*.ts", + "../../__typings__/**/*.d.ts" + ] +} diff --git a/pnpm11/deps/inspection/list/package.json b/pnpm11/deps/inspection/list/package.json index 5f0ae7e1ce..d207d41172 100644 --- a/pnpm11/deps/inspection/list/package.json +++ b/pnpm11/deps/inspection/list/package.json @@ -39,9 +39,9 @@ "@pnpm/deps.inspection.tree-builder": "workspace:*", "@pnpm/lockfile.fs": "workspace:*", "@pnpm/pkg-manifest.reader": "workspace:*", + "@pnpm/text.ordinal-comparator": "workspace:*", "@pnpm/text.tree-renderer": "workspace:*", "@pnpm/types": "workspace:*", - "@pnpm/util.lex-comparator": "catalog:", "@pnpm/workspace.project-manifest-reader": "workspace:*", "chalk": "catalog:", "p-limit": "catalog:", diff --git a/pnpm11/deps/inspection/list/src/renderTree.ts b/pnpm11/deps/inspection/list/src/renderTree.ts index 1c5ecac6cb..6c0f109afa 100644 --- a/pnpm11/deps/inspection/list/src/renderTree.ts +++ b/pnpm11/deps/inspection/list/src/renderTree.ts @@ -1,9 +1,9 @@ import path from 'node:path' import type { DependencyNode } from '@pnpm/deps.inspection.tree-builder' +import { lexCompare } from '@pnpm/text.ordinal-comparator' import { renderTree as renderArchyTree, type TreeNode, type TreeNodeGroup } from '@pnpm/text.tree-renderer' import { DEPENDENCIES_FIELDS, type DependenciesField } from '@pnpm/types' -import { lexCompare } from '@pnpm/util.lex-comparator' import chalk from 'chalk' import { getPkgInfo } from './getPkgInfo.js' diff --git a/pnpm11/deps/inspection/list/tsconfig.json b/pnpm11/deps/inspection/list/tsconfig.json index 1aaff4716d..d565690753 100644 --- a/pnpm11/deps/inspection/list/tsconfig.json +++ b/pnpm11/deps/inspection/list/tsconfig.json @@ -21,6 +21,9 @@ { "path": "../../../pkg-manifest/reader" }, + { + "path": "../../../text/ordinal-comparator" + }, { "path": "../../../text/tree-renderer" }, diff --git a/pnpm11/deps/inspection/tree-builder/package.json b/pnpm11/deps/inspection/tree-builder/package.json index f359b50eb3..090fdfd14e 100644 --- a/pnpm11/deps/inspection/tree-builder/package.json +++ b/pnpm11/deps/inspection/tree-builder/package.json @@ -46,8 +46,8 @@ "@pnpm/pkg-manifest.reader": "workspace:*", "@pnpm/store.cafs": "workspace:*", "@pnpm/store.index": "workspace:*", + "@pnpm/text.ordinal-comparator": "workspace:*", "@pnpm/types": "workspace:*", - "@pnpm/util.lex-comparator": "catalog:", "load-json-file": "catalog:", "normalize-path": "catalog:", "p-limit": "catalog:", diff --git a/pnpm11/deps/inspection/tree-builder/src/buildDependentsTree.ts b/pnpm11/deps/inspection/tree-builder/src/buildDependentsTree.ts index 21a8cb7b77..eaf829ebf3 100644 --- a/pnpm11/deps/inspection/tree-builder/src/buildDependentsTree.ts +++ b/pnpm11/deps/inspection/tree-builder/src/buildDependentsTree.ts @@ -10,8 +10,8 @@ import { } from '@pnpm/lockfile.fs' import { nameVerFromPkgSnapshot } from '@pnpm/lockfile.utils' import { StoreIndex } from '@pnpm/store.index' +import { lexCompare } from '@pnpm/text.ordinal-comparator' import type { DependenciesField, DependencyManifest, Finder, Registries } from '@pnpm/types' -import { lexCompare } from '@pnpm/util.lex-comparator' import { realpathMissing } from 'realpath-missing' import semver from 'semver' diff --git a/pnpm11/deps/inspection/tree-builder/src/getTree.ts b/pnpm11/deps/inspection/tree-builder/src/getTree.ts index 9a17a69c0c..52619de084 100644 --- a/pnpm11/deps/inspection/tree-builder/src/getTree.ts +++ b/pnpm11/deps/inspection/tree-builder/src/getTree.ts @@ -3,8 +3,8 @@ import path from 'node:path' import type { DepTypes } from '@pnpm/lockfile.detect-dep-types' import type { PackageSnapshots, ProjectSnapshot } from '@pnpm/lockfile.fs' import type { StoreIndex } from '@pnpm/store.index' +import { lexCompare } from '@pnpm/text.ordinal-comparator' import type { Finder, Registries } from '@pnpm/types' -import { lexCompare } from '@pnpm/util.lex-comparator' import type { DependencyGraph } from './buildDependencyGraph.js' import type { DependencyNode } from './DependencyNode.js' diff --git a/pnpm11/deps/inspection/tree-builder/tsconfig.json b/pnpm11/deps/inspection/tree-builder/tsconfig.json index fa3e3fb447..5f3566cced 100644 --- a/pnpm11/deps/inspection/tree-builder/tsconfig.json +++ b/pnpm11/deps/inspection/tree-builder/tsconfig.json @@ -48,6 +48,9 @@ { "path": "../../../store/index" }, + { + "path": "../../../text/ordinal-comparator" + }, { "path": "../../path" } diff --git a/pnpm11/engine/runtime/bun-resolver/package.json b/pnpm11/engine/runtime/bun-resolver/package.json index f8f6eb4a63..bb187e6406 100644 --- a/pnpm11/engine/runtime/bun-resolver/package.json +++ b/pnpm11/engine/runtime/bun-resolver/package.json @@ -39,8 +39,8 @@ "@pnpm/fetching.types": "workspace:*", "@pnpm/resolving.npm-resolver": "workspace:*", "@pnpm/resolving.resolver-base": "workspace:*", + "@pnpm/text.ordinal-comparator": "workspace:*", "@pnpm/types": "workspace:*", - "@pnpm/util.lex-comparator": "catalog:", "semver": "catalog:" }, "peerDependencies": { diff --git a/pnpm11/engine/runtime/bun-resolver/src/index.ts b/pnpm11/engine/runtime/bun-resolver/src/index.ts index a7bf2cd008..816030867a 100644 --- a/pnpm11/engine/runtime/bun-resolver/src/index.ts +++ b/pnpm11/engine/runtime/bun-resolver/src/index.ts @@ -13,8 +13,8 @@ import type { VariationsResolution, WantedDependency, } from '@pnpm/resolving.resolver-base' +import { lexCompare } from '@pnpm/text.ordinal-comparator' import type { PkgResolutionId } from '@pnpm/types' -import { lexCompare } from '@pnpm/util.lex-comparator' export interface BunRuntimeResolveResult extends ResolveResult { resolution: VariationsResolution diff --git a/pnpm11/engine/runtime/bun-resolver/tsconfig.json b/pnpm11/engine/runtime/bun-resolver/tsconfig.json index 2ff9483efa..bcddc919e9 100644 --- a/pnpm11/engine/runtime/bun-resolver/tsconfig.json +++ b/pnpm11/engine/runtime/bun-resolver/tsconfig.json @@ -33,6 +33,9 @@ { "path": "../../../resolving/resolver-base" }, + { + "path": "../../../text/ordinal-comparator" + }, { "path": "../../../worker" } diff --git a/pnpm11/engine/runtime/deno-resolver/package.json b/pnpm11/engine/runtime/deno-resolver/package.json index 61ef38fc1c..e153650485 100644 --- a/pnpm11/engine/runtime/deno-resolver/package.json +++ b/pnpm11/engine/runtime/deno-resolver/package.json @@ -39,8 +39,8 @@ "@pnpm/fetching.types": "workspace:*", "@pnpm/resolving.npm-resolver": "workspace:*", "@pnpm/resolving.resolver-base": "workspace:*", + "@pnpm/text.ordinal-comparator": "workspace:*", "@pnpm/types": "workspace:*", - "@pnpm/util.lex-comparator": "catalog:", "semver": "catalog:" }, "peerDependencies": { diff --git a/pnpm11/engine/runtime/deno-resolver/src/index.ts b/pnpm11/engine/runtime/deno-resolver/src/index.ts index 582cdf6dd0..4af28a90ea 100644 --- a/pnpm11/engine/runtime/deno-resolver/src/index.ts +++ b/pnpm11/engine/runtime/deno-resolver/src/index.ts @@ -12,8 +12,8 @@ import type { VariationsResolution, WantedDependency, } from '@pnpm/resolving.resolver-base' +import { lexCompare } from '@pnpm/text.ordinal-comparator' import type { PkgResolutionId } from '@pnpm/types' -import { lexCompare } from '@pnpm/util.lex-comparator' const ASSET_REGEX = /^deno-(?aarch64|x86_64)-(?apple-darwin|unknown-linux-gnu|pc-windows-msvc)\.zip\.sha256sum$/ const OS_MAP = { diff --git a/pnpm11/engine/runtime/deno-resolver/tsconfig.json b/pnpm11/engine/runtime/deno-resolver/tsconfig.json index 2ff9483efa..bcddc919e9 100644 --- a/pnpm11/engine/runtime/deno-resolver/tsconfig.json +++ b/pnpm11/engine/runtime/deno-resolver/tsconfig.json @@ -33,6 +33,9 @@ { "path": "../../../resolving/resolver-base" }, + { + "path": "../../../text/ordinal-comparator" + }, { "path": "../../../worker" } diff --git a/pnpm11/exec/commands/package.json b/pnpm11/exec/commands/package.json index 5ee6255645..7e9dfc3341 100644 --- a/pnpm11/exec/commands/package.json +++ b/pnpm11/exec/commands/package.json @@ -56,8 +56,8 @@ "@pnpm/resolving.parse-wanted-dependency": "workspace:*", "@pnpm/shell.path": "workspace:*", "@pnpm/store.path": "workspace:*", + "@pnpm/text.ordinal-comparator": "workspace:*", "@pnpm/types": "workspace:*", - "@pnpm/util.lex-comparator": "catalog:", "@pnpm/workspace.injected-deps-syncer": "workspace:*", "@pnpm/workspace.project-manifest-reader": "workspace:*", "@pnpm/workspace.projects-sorter": "workspace:*", diff --git a/pnpm11/exec/commands/src/dlx.ts b/pnpm11/exec/commands/src/dlx.ts index 6712668dff..e5897939b5 100644 --- a/pnpm11/exec/commands/src/dlx.ts +++ b/pnpm11/exec/commands/src/dlx.ts @@ -20,8 +20,8 @@ import { add } from '@pnpm/installing.commands' import { logger } from '@pnpm/logger' import { readPackageJsonFromDir } from '@pnpm/pkg-manifest.reader' import { parseWantedDependency } from '@pnpm/resolving.parse-wanted-dependency' +import { lexCompare } from '@pnpm/text.ordinal-comparator' import type { PackageManifest, PnpmSettings, SupportedArchitectures } from '@pnpm/types' -import { lexCompare } from '@pnpm/util.lex-comparator' import { pick } from 'ramda' import { renderHelp } from 'render-help' import { symlinkDir } from 'symlink-dir' diff --git a/pnpm11/exec/commands/tsconfig.json b/pnpm11/exec/commands/tsconfig.json index 4cf7c3da27..5d8041877b 100644 --- a/pnpm11/exec/commands/tsconfig.json +++ b/pnpm11/exec/commands/tsconfig.json @@ -84,6 +84,9 @@ { "path": "../../testing/command-defaults" }, + { + "path": "../../text/ordinal-comparator" + }, { "path": "../../workspace/injected-deps-syncer" }, diff --git a/pnpm11/fetching/directory-fetcher/package.json b/pnpm11/fetching/directory-fetcher/package.json index bf67c44ed5..dcea656aab 100644 --- a/pnpm11/fetching/directory-fetcher/package.json +++ b/pnpm11/fetching/directory-fetcher/package.json @@ -48,7 +48,7 @@ "@pnpm/fetching.directory-fetcher": "workspace:*", "@pnpm/logger": "workspace:*", "@pnpm/test-fixtures": "workspace:*", - "@pnpm/util.lex-comparator": "catalog:", + "@pnpm/text.ordinal-comparator": "workspace:*", "@zkochan/rimraf": "catalog:" }, "engines": { diff --git a/pnpm11/fetching/directory-fetcher/test/index.ts b/pnpm11/fetching/directory-fetcher/test/index.ts index f6e68efff5..e5cf4d9915 100644 --- a/pnpm11/fetching/directory-fetcher/test/index.ts +++ b/pnpm11/fetching/directory-fetcher/test/index.ts @@ -4,7 +4,7 @@ import path from 'node:path' import { beforeAll, describe, expect, jest, test } from '@jest/globals' import { fixtures } from '@pnpm/test-fixtures' -import { lexCompare } from '@pnpm/util.lex-comparator' +import { lexCompare } from '@pnpm/text.ordinal-comparator' import { rimrafSync } from '@zkochan/rimraf' const debug = jest.fn() diff --git a/pnpm11/fetching/directory-fetcher/tsconfig.json b/pnpm11/fetching/directory-fetcher/tsconfig.json index fa1fa79c9e..05e8c8036b 100644 --- a/pnpm11/fetching/directory-fetcher/tsconfig.json +++ b/pnpm11/fetching/directory-fetcher/tsconfig.json @@ -30,6 +30,9 @@ { "path": "../../store/cafs-types" }, + { + "path": "../../text/ordinal-comparator" + }, { "path": "../../workspace/project-manifest-reader" }, diff --git a/pnpm11/fetching/git-fetcher/package.json b/pnpm11/fetching/git-fetcher/package.json index e71651e477..852a335b2e 100644 --- a/pnpm11/fetching/git-fetcher/package.json +++ b/pnpm11/fetching/git-fetcher/package.json @@ -51,8 +51,8 @@ "@pnpm/logger": "workspace:*", "@pnpm/store.cafs": "workspace:*", "@pnpm/store.create-cafs-store": "workspace:*", + "@pnpm/text.ordinal-comparator": "workspace:*", "@pnpm/types": "workspace:*", - "@pnpm/util.lex-comparator": "catalog:", "tempy": "catalog:" }, "engines": { diff --git a/pnpm11/fetching/git-fetcher/test/index.ts b/pnpm11/fetching/git-fetcher/test/index.ts index 62f42436da..2f8e3079e7 100644 --- a/pnpm11/fetching/git-fetcher/test/index.ts +++ b/pnpm11/fetching/git-fetcher/test/index.ts @@ -4,7 +4,7 @@ import path from 'node:path' import { afterAll, beforeEach, expect, jest, test } from '@jest/globals' import { createCafsStore } from '@pnpm/store.create-cafs-store' import { StoreIndex } from '@pnpm/store.index' -import { lexCompare } from '@pnpm/util.lex-comparator' +import { lexCompare } from '@pnpm/text.ordinal-comparator' import { temporaryDirectory } from 'tempy' { diff --git a/pnpm11/fetching/git-fetcher/tsconfig.json b/pnpm11/fetching/git-fetcher/tsconfig.json index 49299dbc1b..d98e0657ad 100644 --- a/pnpm11/fetching/git-fetcher/tsconfig.json +++ b/pnpm11/fetching/git-fetcher/tsconfig.json @@ -36,6 +36,9 @@ { "path": "../../store/index" }, + { + "path": "../../text/ordinal-comparator" + }, { "path": "../../worker" }, diff --git a/pnpm11/fetching/tarball-fetcher/package.json b/pnpm11/fetching/tarball-fetcher/package.json index bea5fe0464..b081ad6dc5 100644 --- a/pnpm11/fetching/tarball-fetcher/package.json +++ b/pnpm11/fetching/tarball-fetcher/package.json @@ -59,8 +59,8 @@ "@pnpm/store.cafs-types": "workspace:*", "@pnpm/store.create-cafs-store": "workspace:*", "@pnpm/test-fixtures": "workspace:*", + "@pnpm/text.ordinal-comparator": "workspace:*", "@pnpm/types": "workspace:*", - "@pnpm/util.lex-comparator": "catalog:", "@types/lodash.throttle": "catalog:", "@types/ramda": "catalog:", "@types/retry": "catalog:", diff --git a/pnpm11/fetching/tarball-fetcher/test/fetch.ts b/pnpm11/fetching/tarball-fetcher/test/fetch.ts index 1f841d8ce6..7b97ff0d41 100644 --- a/pnpm11/fetching/tarball-fetcher/test/fetch.ts +++ b/pnpm11/fetching/tarball-fetcher/test/fetch.ts @@ -8,7 +8,7 @@ import { createFetchFromRegistry } from '@pnpm/network.fetch' import { createCafsStore } from '@pnpm/store.create-cafs-store' import { StoreIndex } from '@pnpm/store.index' import { fixtures } from '@pnpm/test-fixtures' -import { lexCompare } from '@pnpm/util.lex-comparator' +import { lexCompare } from '@pnpm/text.ordinal-comparator' import ssri from 'ssri' import { temporaryDirectory } from 'tempy' import { type Dispatcher, getGlobalDispatcher, MockAgent, setGlobalDispatcher } from 'undici' diff --git a/pnpm11/fetching/tarball-fetcher/tsconfig.json b/pnpm11/fetching/tarball-fetcher/tsconfig.json index 1fc527ca14..5408916ded 100644 --- a/pnpm11/fetching/tarball-fetcher/tsconfig.json +++ b/pnpm11/fetching/tarball-fetcher/tsconfig.json @@ -45,6 +45,9 @@ { "path": "../../store/index" }, + { + "path": "../../text/ordinal-comparator" + }, { "path": "../../worker" }, diff --git a/pnpm11/global/commands/package.json b/pnpm11/global/commands/package.json index 2140537633..be1e9e25b3 100644 --- a/pnpm11/global/commands/package.json +++ b/pnpm11/global/commands/package.json @@ -47,8 +47,8 @@ "@pnpm/pkg-manifest.reader": "workspace:*", "@pnpm/pkg-manifest.utils": "workspace:*", "@pnpm/store.connection-manager": "workspace:*", + "@pnpm/text.ordinal-comparator": "workspace:*", "@pnpm/types": "workspace:*", - "@pnpm/util.lex-comparator": "catalog:", "is-subdir": "catalog:", "symlink-dir": "catalog:" }, diff --git a/pnpm11/global/commands/src/listGlobalPackages.ts b/pnpm11/global/commands/src/listGlobalPackages.ts index 3ded2feb57..376fb618fe 100644 --- a/pnpm11/global/commands/src/listGlobalPackages.ts +++ b/pnpm11/global/commands/src/listGlobalPackages.ts @@ -6,7 +6,7 @@ import { getGlobalPackageDetails, scanGlobalPackages, } from '@pnpm/global.packages' -import { lexCompare } from '@pnpm/util.lex-comparator' +import { lexCompare } from '@pnpm/text.ordinal-comparator' export function findGlobalInstallDirs (globalPkgDir: string, params: string[]): string[] { const packages = scanGlobalPackages(globalPkgDir) diff --git a/pnpm11/global/commands/tsconfig.json b/pnpm11/global/commands/tsconfig.json index 809041f46c..ee7c0cd80e 100644 --- a/pnpm11/global/commands/tsconfig.json +++ b/pnpm11/global/commands/tsconfig.json @@ -54,6 +54,9 @@ { "path": "../../store/connection-manager" }, + { + "path": "../../text/ordinal-comparator" + }, { "path": "../packages" } diff --git a/pnpm11/global/packages/package.json b/pnpm11/global/packages/package.json index 9aaa5be6aa..d8ff9b5845 100644 --- a/pnpm11/global/packages/package.json +++ b/pnpm11/global/packages/package.json @@ -34,8 +34,8 @@ "@pnpm/bins.resolver": "workspace:*", "@pnpm/crypto.hash": "workspace:*", "@pnpm/pkg-manifest.reader": "workspace:*", - "@pnpm/types": "workspace:*", - "@pnpm/util.lex-comparator": "catalog:" + "@pnpm/text.ordinal-comparator": "workspace:*", + "@pnpm/types": "workspace:*" }, "devDependencies": { "@pnpm/global.packages": "workspace:*" diff --git a/pnpm11/global/packages/src/cacheKey.ts b/pnpm11/global/packages/src/cacheKey.ts index e0bc1d7221..fc8d381483 100644 --- a/pnpm11/global/packages/src/cacheKey.ts +++ b/pnpm11/global/packages/src/cacheKey.ts @@ -1,5 +1,5 @@ import { createHexHash } from '@pnpm/crypto.hash' -import { lexCompare } from '@pnpm/util.lex-comparator' +import { lexCompare } from '@pnpm/text.ordinal-comparator' export function createGlobalCacheKey (opts: { aliases: string[] diff --git a/pnpm11/global/packages/tsconfig.json b/pnpm11/global/packages/tsconfig.json index 8d633fb053..1e93ad049f 100644 --- a/pnpm11/global/packages/tsconfig.json +++ b/pnpm11/global/packages/tsconfig.json @@ -20,6 +20,9 @@ }, { "path": "../../pkg-manifest/reader" + }, + { + "path": "../../text/ordinal-comparator" } ] } diff --git a/pnpm11/installing/commands/package.json b/pnpm11/installing/commands/package.json index e06a9b4fd6..97160f231f 100644 --- a/pnpm11/installing/commands/package.json +++ b/pnpm11/installing/commands/package.json @@ -76,8 +76,8 @@ "@pnpm/semver-diff": "catalog:", "@pnpm/store.connection-manager": "workspace:*", "@pnpm/store.controller": "workspace:*", + "@pnpm/text.ordinal-comparator": "workspace:*", "@pnpm/types": "workspace:*", - "@pnpm/util.lex-comparator": "catalog:", "@pnpm/workspace.project-manifest-reader": "workspace:*", "@pnpm/workspace.project-manifest-writer": "workspace:*", "@pnpm/workspace.projects-filter": "workspace:*", diff --git a/pnpm11/installing/commands/src/handleIgnoredBuilds.ts b/pnpm11/installing/commands/src/handleIgnoredBuilds.ts index 207d4442b6..82faf9f228 100644 --- a/pnpm11/installing/commands/src/handleIgnoredBuilds.ts +++ b/pnpm11/installing/commands/src/handleIgnoredBuilds.ts @@ -3,8 +3,8 @@ import { writeSettings } from '@pnpm/config.writer' import { IgnoredBuildsError, } from '@pnpm/installing.deps-installer' +import { lexCompare } from '@pnpm/text.ordinal-comparator' import type { IgnoredBuilds } from '@pnpm/types' -import { lexCompare } from '@pnpm/util.lex-comparator' export interface HandleIgnoredBuildsOpts { allowBuilds?: Record diff --git a/pnpm11/installing/commands/src/update/generateUpdateChangeset.ts b/pnpm11/installing/commands/src/update/generateUpdateChangeset.ts index 16280c0719..618d8c8c75 100644 --- a/pnpm11/installing/commands/src/update/generateUpdateChangeset.ts +++ b/pnpm11/installing/commands/src/update/generateUpdateChangeset.ts @@ -9,8 +9,8 @@ import type { Catalogs } from '@pnpm/catalogs.types' import { createMatcher } from '@pnpm/config.matcher' import { PnpmError } from '@pnpm/error' import { globalInfo, globalWarn } from '@pnpm/logger' +import { lexCompare } from '@pnpm/text.ordinal-comparator' import type { Project, ProjectManifest, ProjectRootDir } from '@pnpm/types' -import { lexCompare } from '@pnpm/util.lex-comparator' import { safeReadProjectManifestOnly } from '@pnpm/workspace.project-manifest-reader' import { findWorkspaceProjects } from '@pnpm/workspace.projects-reader' import { readWorkspaceManifest } from '@pnpm/workspace.workspace-manifest-reader' diff --git a/pnpm11/installing/commands/tsconfig.json b/pnpm11/installing/commands/tsconfig.json index 2653a1f855..48e76a47eb 100644 --- a/pnpm11/installing/commands/tsconfig.json +++ b/pnpm11/installing/commands/tsconfig.json @@ -147,6 +147,9 @@ { "path": "../../testing/registry-mock" }, + { + "path": "../../text/ordinal-comparator" + }, { "path": "../../worker" }, diff --git a/pnpm11/installing/deps-installer/package.json b/pnpm11/installing/deps-installer/package.json index 5fb2b1fa71..447a8d74fe 100644 --- a/pnpm11/installing/deps-installer/package.json +++ b/pnpm11/installing/deps-installer/package.json @@ -111,8 +111,8 @@ "@pnpm/resolving.resolver-base": "workspace:*", "@pnpm/store.controller-types": "workspace:*", "@pnpm/store.index": "workspace:*", + "@pnpm/text.ordinal-comparator": "workspace:*", "@pnpm/types": "workspace:*", - "@pnpm/util.lex-comparator": "catalog:", "@pnpm/workspace.project-manifest-reader": "workspace:*", "@zkochan/rimraf": "catalog:", "is-inner-link": "catalog:", diff --git a/pnpm11/installing/deps-installer/src/install/index.ts b/pnpm11/installing/deps-installer/src/install/index.ts index f1ac385856..2fc2b8ee3c 100644 --- a/pnpm11/installing/deps-installer/src/install/index.ts +++ b/pnpm11/installing/deps-installer/src/install/index.ts @@ -77,6 +77,7 @@ import type { PreferredVersions, ResolutionPolicyViolation, } from '@pnpm/resolving.resolver-base' +import { lexCompare } from '@pnpm/text.ordinal-comparator' import type { AllowBuild, DependenciesField, @@ -89,7 +90,6 @@ import type { ProjectRootDir, ReadPackageHook, } from '@pnpm/types' -import { lexCompare } from '@pnpm/util.lex-comparator' import { safeReadProjectManifestOnly } from '@pnpm/workspace.project-manifest-reader' import { isSubdir } from 'is-subdir' import pLimit from 'p-limit' diff --git a/pnpm11/installing/deps-installer/tsconfig.json b/pnpm11/installing/deps-installer/tsconfig.json index 6ce7d54a70..1d8352da03 100644 --- a/pnpm11/installing/deps-installer/tsconfig.json +++ b/pnpm11/installing/deps-installer/tsconfig.json @@ -186,6 +186,9 @@ { "path": "../../testing/temp-store" }, + { + "path": "../../text/ordinal-comparator" + }, { "path": "../../worker" }, diff --git a/pnpm11/installing/deps-resolver/package.json b/pnpm11/installing/deps-resolver/package.json index 9e23e15c83..1ff0e78998 100644 --- a/pnpm11/installing/deps-resolver/package.json +++ b/pnpm11/installing/deps-resolver/package.json @@ -55,8 +55,8 @@ "@pnpm/resolving.npm-resolver": "workspace:*", "@pnpm/resolving.resolver-base": "workspace:*", "@pnpm/store.controller-types": "workspace:*", + "@pnpm/text.ordinal-comparator": "workspace:*", "@pnpm/types": "workspace:*", - "@pnpm/util.lex-comparator": "catalog:", "@pnpm/workspace.spec-parser": "workspace:*", "@yarnpkg/core": "catalog:", "graph-cycles": "catalog:", diff --git a/pnpm11/installing/deps-resolver/src/hoistPeers.ts b/pnpm11/installing/deps-resolver/src/hoistPeers.ts index 5767170528..9759427d80 100644 --- a/pnpm11/installing/deps-resolver/src/hoistPeers.ts +++ b/pnpm11/installing/deps-resolver/src/hoistPeers.ts @@ -1,6 +1,6 @@ import { getPeerVersionRange } from '@pnpm/deps.peer-range' import type { PreferredVersions } from '@pnpm/resolving.resolver-base' -import { lexCompare } from '@pnpm/util.lex-comparator' +import { lexCompare } from '@pnpm/text.ordinal-comparator' import semver from 'semver' /** One workspace-root dependency that a missing peer can be satisfied with. */ diff --git a/pnpm11/installing/deps-resolver/src/resolveDependencies.ts b/pnpm11/installing/deps-resolver/src/resolveDependencies.ts index d4193e0eda..899f11deab 100644 --- a/pnpm11/installing/deps-resolver/src/resolveDependencies.ts +++ b/pnpm11/installing/deps-resolver/src/resolveDependencies.ts @@ -40,6 +40,7 @@ import type { PkgRequestFetchResult, StoreController, } from '@pnpm/store.controller-types' +import { lexCompare } from '@pnpm/text.ordinal-comparator' import type { AllowBuild, AllowedDeprecatedVersions, @@ -53,7 +54,6 @@ import type { SupportedArchitectures, TrustPolicy, } from '@pnpm/types' -import { lexCompare } from '@pnpm/util.lex-comparator' import normalizePath from 'normalize-path' import pDefer from 'p-defer' import { pathExists } from 'path-exists' diff --git a/pnpm11/installing/deps-resolver/tsconfig.json b/pnpm11/installing/deps-resolver/tsconfig.json index bc5546a55e..02f8bde496 100644 --- a/pnpm11/installing/deps-resolver/tsconfig.json +++ b/pnpm11/installing/deps-resolver/tsconfig.json @@ -84,6 +84,9 @@ { "path": "../../store/controller-types" }, + { + "path": "../../text/ordinal-comparator" + }, { "path": "../../workspace/spec-parser" } diff --git a/pnpm11/installing/linking/hoist/package.json b/pnpm11/installing/linking/hoist/package.json index 7d7b7ab20b..c5c778a2a8 100644 --- a/pnpm11/installing/linking/hoist/package.json +++ b/pnpm11/installing/linking/hoist/package.json @@ -38,8 +38,8 @@ "@pnpm/config.matcher": "workspace:*", "@pnpm/constants": "workspace:*", "@pnpm/core-loggers": "workspace:*", + "@pnpm/text.ordinal-comparator": "workspace:*", "@pnpm/types": "workspace:*", - "@pnpm/util.lex-comparator": "catalog:", "is-subdir": "catalog:", "ramda": "catalog:", "resolve-link-target": "catalog:", diff --git a/pnpm11/installing/linking/hoist/src/index.ts b/pnpm11/installing/linking/hoist/src/index.ts index e1941c1d32..87125c3b5b 100644 --- a/pnpm11/installing/linking/hoist/src/index.ts +++ b/pnpm11/installing/linking/hoist/src/index.ts @@ -6,8 +6,8 @@ import { createMatcher } from '@pnpm/config.matcher' import { WANTED_LOCKFILE } from '@pnpm/constants' import { linkLogger } from '@pnpm/core-loggers' import { logger } from '@pnpm/logger' +import { lexCompare } from '@pnpm/text.ordinal-comparator' import type { DependenciesField, DepPath, HoistedDependencies, ProjectId } from '@pnpm/types' -import { lexCompare } from '@pnpm/util.lex-comparator' import { isSubdir } from 'is-subdir' import { resolveLinkTarget } from 'resolve-link-target' import { symlinkDir } from 'symlink-dir' diff --git a/pnpm11/installing/linking/hoist/tsconfig.json b/pnpm11/installing/linking/hoist/tsconfig.json index 7d5a3925e0..8c3fae1015 100644 --- a/pnpm11/installing/linking/hoist/tsconfig.json +++ b/pnpm11/installing/linking/hoist/tsconfig.json @@ -26,6 +26,9 @@ }, { "path": "../../../core/types" + }, + { + "path": "../../../text/ordinal-comparator" } ] } diff --git a/pnpm11/network/auth-header/package.json b/pnpm11/network/auth-header/package.json index 4afe5da755..8b1f14c9d2 100644 --- a/pnpm11/network/auth-header/package.json +++ b/pnpm11/network/auth-header/package.json @@ -32,7 +32,7 @@ ".test": "cross-env NODE_OPTIONS=\"$NODE_OPTIONS --experimental-vm-modules --disable-warning=ExperimentalWarning --disable-warning=DEP0169\" jest" }, "dependencies": { - "@pnpm/config.nerf-dart": "catalog:", + "@pnpm/config.registry-auth-key": "workspace:*", "@pnpm/error": "workspace:*", "@pnpm/types": "workspace:*" }, diff --git a/pnpm11/network/auth-header/src/index.ts b/pnpm11/network/auth-header/src/index.ts index 4228587b02..e29038d134 100644 --- a/pnpm11/network/auth-header/src/index.ts +++ b/pnpm11/network/auth-header/src/index.ts @@ -1,4 +1,4 @@ -import { nerfDart } from '@pnpm/config.nerf-dart' +import { nerfDart } from '@pnpm/config.registry-auth-key' import type { RegistryConfig } from '@pnpm/types' import { type AuthHeaders, type AuthHeadersByScope, getAuthHeadersByScope, getAuthHeadersFromCreds } from './getAuthHeadersFromConfig.js' diff --git a/pnpm11/network/auth-header/tsconfig.json b/pnpm11/network/auth-header/tsconfig.json index dbf37d88ad..c8c6049bf1 100644 --- a/pnpm11/network/auth-header/tsconfig.json +++ b/pnpm11/network/auth-header/tsconfig.json @@ -9,6 +9,9 @@ "../../__typings__/**/*.d.ts" ], "references": [ + { + "path": "../../config/registry-auth-key" + }, { "path": "../../core/error" }, diff --git a/pnpm11/network/fetch/package.json b/pnpm11/network/fetch/package.json index 28a195c6ff..9a39d2a948 100644 --- a/pnpm11/network/fetch/package.json +++ b/pnpm11/network/fetch/package.json @@ -33,7 +33,7 @@ ".test": "cross-env NODE_OPTIONS=\"$NODE_OPTIONS --experimental-vm-modules --disable-warning=ExperimentalWarning --disable-warning=DEP0169\" jest" }, "dependencies": { - "@pnpm/config.nerf-dart": "catalog:", + "@pnpm/config.registry-auth-key": "workspace:*", "@pnpm/core-loggers": "workspace:*", "@pnpm/error": "workspace:*", "@pnpm/fetching.types": "workspace:*", diff --git a/pnpm11/network/fetch/src/dispatcher.ts b/pnpm11/network/fetch/src/dispatcher.ts index 9299193b1e..2045cffadf 100644 --- a/pnpm11/network/fetch/src/dispatcher.ts +++ b/pnpm11/network/fetch/src/dispatcher.ts @@ -2,7 +2,7 @@ import net from 'node:net' import tls from 'node:tls' import { URL } from 'node:url' -import { nerfDart } from '@pnpm/config.nerf-dart' +import { nerfDart } from '@pnpm/config.registry-auth-key' import { PnpmError } from '@pnpm/error' import type { TlsConfig } from '@pnpm/types' import { LRUCache } from 'lru-cache' diff --git a/pnpm11/network/fetch/tsconfig.json b/pnpm11/network/fetch/tsconfig.json index 0cd246e1f6..d61a4391de 100644 --- a/pnpm11/network/fetch/tsconfig.json +++ b/pnpm11/network/fetch/tsconfig.json @@ -9,6 +9,9 @@ "../../__typings__/**/*.d.ts" ], "references": [ + { + "path": "../../config/registry-auth-key" + }, { "path": "../../core/core-loggers" }, diff --git a/pnpm11/object/key-sorting/package.json b/pnpm11/object/key-sorting/package.json index 08933c489b..ca3fd5d490 100644 --- a/pnpm11/object/key-sorting/package.json +++ b/pnpm11/object/key-sorting/package.json @@ -32,7 +32,7 @@ ".test": "cross-env NODE_OPTIONS=\"$NODE_OPTIONS --experimental-vm-modules --disable-warning=ExperimentalWarning --disable-warning=DEP0169\" jest" }, "dependencies": { - "@pnpm/util.lex-comparator": "catalog:", + "@pnpm/text.ordinal-comparator": "workspace:*", "sort-keys": "catalog:" }, "devDependencies": { diff --git a/pnpm11/object/key-sorting/src/index.ts b/pnpm11/object/key-sorting/src/index.ts index 6864d81b4d..f6dbc2a326 100644 --- a/pnpm11/object/key-sorting/src/index.ts +++ b/pnpm11/object/key-sorting/src/index.ts @@ -1,4 +1,4 @@ -import { lexCompare } from '@pnpm/util.lex-comparator' +import { lexCompare } from '@pnpm/text.ordinal-comparator' import _sortKeys from 'sort-keys' // eslint-disable-next-line @typescript-eslint/no-explicit-any diff --git a/pnpm11/object/key-sorting/tsconfig.json b/pnpm11/object/key-sorting/tsconfig.json index c6f0399f60..f8568697c4 100644 --- a/pnpm11/object/key-sorting/tsconfig.json +++ b/pnpm11/object/key-sorting/tsconfig.json @@ -8,5 +8,9 @@ "src/**/*.ts", "../../__typings__/**/*.d.ts" ], - "references": [] + "references": [ + { + "path": "../../text/ordinal-comparator" + } + ] } diff --git a/pnpm11/pnpm/package.json b/pnpm11/pnpm/package.json index 7e45ceb64e..9ce7d4bda0 100644 --- a/pnpm11/pnpm/package.json +++ b/pnpm11/pnpm/package.json @@ -132,7 +132,7 @@ "@pnpm/test-ipc-server": "workspace:*", "@pnpm/testing.registry-mock": "workspace:*", "@pnpm/types": "workspace:*", - "@pnpm/util.lex-comparator": "catalog:", + "@pnpm/text.ordinal-comparator": "workspace:*", "@pnpm/worker": "workspace:*", "@pnpm/workspace.commands": "workspace:*", "@pnpm/workspace.project-manifest-reader": "workspace:*", diff --git a/pnpm11/pnpm/src/getConfig.ts b/pnpm11/pnpm/src/getConfig.ts index 66c1b3af80..8bd29d3b2d 100644 --- a/pnpm11/pnpm/src/getConfig.ts +++ b/pnpm11/pnpm/src/getConfig.ts @@ -9,8 +9,8 @@ import { requireHooks } from '@pnpm/hooks.pnpmfile' import { resolveAndInstallConfigDeps } from '@pnpm/installing.env-installer' import { logger } from '@pnpm/logger' import { createStoreController } from '@pnpm/store.connection-manager' +import { lexCompare } from '@pnpm/text.ordinal-comparator' import type { ConfigDependencies } from '@pnpm/types' -import { lexCompare } from '@pnpm/util.lex-comparator' export async function getConfig ( cliOptions: CliOptions, diff --git a/pnpm11/pnpm/test/install/misc.ts b/pnpm11/pnpm/test/install/misc.ts index cd90291095..ff87c4a768 100644 --- a/pnpm11/pnpm/test/install/misc.ts +++ b/pnpm11/pnpm/test/install/misc.ts @@ -10,7 +10,7 @@ import type { PackageFilesIndex } from '@pnpm/store.cafs' import { StoreIndex, storeIndexKey } from '@pnpm/store.index' import { fixtures } from '@pnpm/test-fixtures' import { getIntegrity } from '@pnpm/testing.registry-mock' -import { lexCompare } from '@pnpm/util.lex-comparator' +import { lexCompare } from '@pnpm/text.ordinal-comparator' import { readProjectManifest } from '@pnpm/workspace.project-manifest-reader' import { writeProjectManifest } from '@pnpm/workspace.project-manifest-writer' import { rimrafSync } from '@zkochan/rimraf' diff --git a/pnpm11/pnpm/tsconfig.json b/pnpm11/pnpm/tsconfig.json index 759bdd7e15..b9ea98b126 100644 --- a/pnpm11/pnpm/tsconfig.json +++ b/pnpm11/pnpm/tsconfig.json @@ -164,6 +164,9 @@ { "path": "../testing/registry-mock" }, + { + "path": "../text/ordinal-comparator" + }, { "path": "../worker" }, diff --git a/pnpm11/store/commands/package.json b/pnpm11/store/commands/package.json index d39299e10b..1ca92ebeab 100644 --- a/pnpm11/store/commands/package.json +++ b/pnpm11/store/commands/package.json @@ -51,8 +51,8 @@ "@pnpm/store.controller-types": "workspace:*", "@pnpm/store.index": "workspace:*", "@pnpm/store.path": "workspace:*", + "@pnpm/text.ordinal-comparator": "workspace:*", "@pnpm/types": "workspace:*", - "@pnpm/util.lex-comparator": "catalog:", "archy": "catalog:", "chalk": "catalog:", "dint": "catalog:", diff --git a/pnpm11/store/commands/src/inspecting/catIndex.ts b/pnpm11/store/commands/src/inspecting/catIndex.ts index 93e88c8575..e53ddd252c 100644 --- a/pnpm11/store/commands/src/inspecting/catIndex.ts +++ b/pnpm11/store/commands/src/inspecting/catIndex.ts @@ -9,7 +9,7 @@ import { parseWantedDependency } from '@pnpm/resolving.parse-wanted-dependency' import type { PackageFilesIndex } from '@pnpm/store.cafs' import { StoreIndex, storeIndexKey } from '@pnpm/store.index' import { getStorePath } from '@pnpm/store.path' -import { lexCompare } from '@pnpm/util.lex-comparator' +import { lexCompare } from '@pnpm/text.ordinal-comparator' import { renderHelp } from 'render-help' export const skipPackageManagerCheck = true diff --git a/pnpm11/store/commands/tsconfig.json b/pnpm11/store/commands/tsconfig.json index d4eea2c52c..59c4675804 100644 --- a/pnpm11/store/commands/tsconfig.json +++ b/pnpm11/store/commands/tsconfig.json @@ -75,6 +75,9 @@ { "path": "../../testing/registry-mock" }, + { + "path": "../../text/ordinal-comparator" + }, { "path": "../cafs" }, diff --git a/pnpm11/text/ordinal-comparator/README.md b/pnpm11/text/ordinal-comparator/README.md new file mode 100644 index 0000000000..ecf7b99dfb --- /dev/null +++ b/pnpm11/text/ordinal-comparator/README.md @@ -0,0 +1,3 @@ +# @pnpm/text.ordinal-comparator + +> A string comparator that sorts in lexicographical order diff --git a/pnpm11/text/ordinal-comparator/package.json b/pnpm11/text/ordinal-comparator/package.json new file mode 100644 index 0000000000..d17f6d3d45 --- /dev/null +++ b/pnpm11/text/ordinal-comparator/package.json @@ -0,0 +1,44 @@ +{ + "name": "@pnpm/text.ordinal-comparator", + "version": "1100.0.0", + "description": "A string comparator that sorts in lexicographical order", + "keywords": [ + "pnpm", + "pnpm11", + "comparator" + ], + "license": "MIT", + "funding": "https://opencollective.com/pnpm", + "repository": "https://github.com/pnpm/pnpm/tree/main/pnpm11/text/ordinal-comparator", + "homepage": "https://github.com/pnpm/pnpm/tree/main/pnpm11/text/ordinal-comparator#readme", + "bugs": { + "url": "https://github.com/pnpm/pnpm/issues" + }, + "type": "module", + "main": "lib/index.js", + "types": "lib/index.d.ts", + "exports": { + ".": "./lib/index.js" + }, + "files": [ + "lib", + "!*.map" + ], + "scripts": { + "lint": "eslint \"src/**/*.ts\" \"test/**/*.ts\"", + "test": "pn compile && pn .test", + "prepublishOnly": "tsgo --build", + "compile": "tsgo --build && pn lint --fix", + ".test": "cross-env NODE_OPTIONS=\"$NODE_OPTIONS --experimental-vm-modules --disable-warning=ExperimentalWarning --disable-warning=DEP0169\" jest" + }, + "devDependencies": { + "@jest/globals": "catalog:", + "@pnpm/text.ordinal-comparator": "workspace:*" + }, + "engines": { + "node": ">=22.13" + }, + "jest": { + "preset": "@pnpm/jest-config" + } +} diff --git a/pnpm11/text/ordinal-comparator/src/index.ts b/pnpm11/text/ordinal-comparator/src/index.ts new file mode 100644 index 0000000000..6f849bcddd --- /dev/null +++ b/pnpm11/text/ordinal-comparator/src/index.ts @@ -0,0 +1,9 @@ +/** + * Compares two strings by code unit, so that the sort order is the same on + * every machine. `String.prototype.localeCompare` must not be used for + * anything that ends up in a lockfile or any other file we compare across + * machines, as its result depends on the current locale. + */ +export function lexCompare (a: string, b: string): number { + return a > b ? 1 : a < b ? -1 : 0 +} diff --git a/pnpm11/text/ordinal-comparator/test/index.test.ts b/pnpm11/text/ordinal-comparator/test/index.test.ts new file mode 100644 index 0000000000..06fd580f45 --- /dev/null +++ b/pnpm11/text/ordinal-comparator/test/index.test.ts @@ -0,0 +1,12 @@ +import { expect, test } from '@jest/globals' +import { lexCompare } from '@pnpm/text.ordinal-comparator' + +test('lexCompare', () => { + expect(lexCompare('a', 'b')).toBe(-1) + expect(lexCompare('a', 'a')).toBe(0) + expect(lexCompare('b', 'a')).toBe(1) +}) + +test('lexCompare sorts uppercase letters before lowercase ones', () => { + expect(['b', 'A', 'a', 'B'].sort(lexCompare)).toStrictEqual(['A', 'B', 'a', 'b']) +}) diff --git a/pnpm11/text/ordinal-comparator/test/tsconfig.json b/pnpm11/text/ordinal-comparator/test/tsconfig.json new file mode 100644 index 0000000000..67ce5e1d0e --- /dev/null +++ b/pnpm11/text/ordinal-comparator/test/tsconfig.json @@ -0,0 +1,18 @@ +{ + "extends": "../tsconfig.json", + "compilerOptions": { + "noEmit": false, + "outDir": "../node_modules/.test.lib", + "rootDir": "..", + "isolatedModules": true + }, + "include": [ + "**/*.ts", + "../../../__typings__/**/*.d.ts" + ], + "references": [ + { + "path": ".." + } + ] +} diff --git a/pnpm11/text/ordinal-comparator/tsconfig.json b/pnpm11/text/ordinal-comparator/tsconfig.json new file mode 100644 index 0000000000..c6f0399f60 --- /dev/null +++ b/pnpm11/text/ordinal-comparator/tsconfig.json @@ -0,0 +1,12 @@ +{ + "extends": "@pnpm/tsconfig", + "compilerOptions": { + "outDir": "lib", + "rootDir": "src" + }, + "include": [ + "src/**/*.ts", + "../../__typings__/**/*.d.ts" + ], + "references": [] +} diff --git a/pnpm11/text/ordinal-comparator/tsconfig.lint.json b/pnpm11/text/ordinal-comparator/tsconfig.lint.json new file mode 100644 index 0000000000..1bbe711971 --- /dev/null +++ b/pnpm11/text/ordinal-comparator/tsconfig.lint.json @@ -0,0 +1,8 @@ +{ + "extends": "./tsconfig.json", + "include": [ + "src/**/*.ts", + "test/**/*.ts", + "../../__typings__/**/*.d.ts" + ] +} diff --git a/pnpm11/workspace/injected-deps-syncer/package.json b/pnpm11/workspace/injected-deps-syncer/package.json index 99fb6502e1..bf2de18458 100644 --- a/pnpm11/workspace/injected-deps-syncer/package.json +++ b/pnpm11/workspace/injected-deps-syncer/package.json @@ -36,8 +36,8 @@ "@pnpm/fetching.directory-fetcher": "workspace:*", "@pnpm/installing.modules-yaml": "workspace:*", "@pnpm/pkg-manifest.reader": "workspace:*", + "@pnpm/text.ordinal-comparator": "workspace:*", "@pnpm/types": "workspace:*", - "@pnpm/util.lex-comparator": "catalog:", "@pnpm/workspace.projects-reader": "workspace:*", "@types/normalize-path": "catalog:", "normalize-path": "catalog:" diff --git a/pnpm11/workspace/injected-deps-syncer/test/DirPatcher.test.ts b/pnpm11/workspace/injected-deps-syncer/test/DirPatcher.test.ts index eb146ae7a5..9e22e74c8e 100644 --- a/pnpm11/workspace/injected-deps-syncer/test/DirPatcher.test.ts +++ b/pnpm11/workspace/injected-deps-syncer/test/DirPatcher.test.ts @@ -4,7 +4,7 @@ import path from 'node:path' import { afterEach, expect, jest, test } from '@jest/globals' import { fetchFromDir } from '@pnpm/fetching.directory-fetcher' import { prepareEmpty } from '@pnpm/prepare' -import { lexCompare } from '@pnpm/util.lex-comparator' +import { lexCompare } from '@pnpm/text.ordinal-comparator' import { DirPatcher } from '../src/DirPatcher.js' diff --git a/pnpm11/workspace/injected-deps-syncer/test/applyPatch.test.ts b/pnpm11/workspace/injected-deps-syncer/test/applyPatch.test.ts index 14ee67e02b..51fe6b45d4 100644 --- a/pnpm11/workspace/injected-deps-syncer/test/applyPatch.test.ts +++ b/pnpm11/workspace/injected-deps-syncer/test/applyPatch.test.ts @@ -4,7 +4,7 @@ import path from 'node:path' import { afterEach, expect, jest, test } from '@jest/globals' import { fetchFromDir } from '@pnpm/fetching.directory-fetcher' import { prepareEmpty } from '@pnpm/prepare' -import { lexCompare } from '@pnpm/util.lex-comparator' +import { lexCompare } from '@pnpm/text.ordinal-comparator' import { applyPatch, DIR, type DirDiff } from '../src/DirPatcher.js' diff --git a/pnpm11/workspace/injected-deps-syncer/tsconfig.json b/pnpm11/workspace/injected-deps-syncer/tsconfig.json index f9081783fc..a255b7bea6 100644 --- a/pnpm11/workspace/injected-deps-syncer/tsconfig.json +++ b/pnpm11/workspace/injected-deps-syncer/tsconfig.json @@ -33,6 +33,9 @@ { "path": "../../pkg-manifest/reader" }, + { + "path": "../../text/ordinal-comparator" + }, { "path": "../projects-reader" } diff --git a/pnpm11/workspace/projects-reader/package.json b/pnpm11/workspace/projects-reader/package.json index d9049672e8..d3835ef80c 100644 --- a/pnpm11/workspace/projects-reader/package.json +++ b/pnpm11/workspace/projects-reader/package.json @@ -33,8 +33,8 @@ "dependencies": { "@pnpm/cli.utils": "workspace:*", "@pnpm/constants": "workspace:*", + "@pnpm/text.ordinal-comparator": "workspace:*", "@pnpm/types": "workspace:*", - "@pnpm/util.lex-comparator": "catalog:", "@pnpm/workspace.project-manifest-reader": "workspace:*", "p-filter": "catalog:", "tinyglobby": "catalog:" diff --git a/pnpm11/workspace/projects-reader/src/findPackages.ts b/pnpm11/workspace/projects-reader/src/findPackages.ts index eaa8530e17..65fc6533d1 100644 --- a/pnpm11/workspace/projects-reader/src/findPackages.ts +++ b/pnpm11/workspace/projects-reader/src/findPackages.ts @@ -2,8 +2,8 @@ import { promises as fs } from 'node:fs' import path from 'node:path' import util from 'node:util' +import { lexCompare } from '@pnpm/text.ordinal-comparator' import type { Project, ProjectRootDir, ProjectRootDirRealPath } from '@pnpm/types' -import { lexCompare } from '@pnpm/util.lex-comparator' import { readExactProjectManifest } from '@pnpm/workspace.project-manifest-reader' import pFilter from 'p-filter' import { glob } from 'tinyglobby' diff --git a/pnpm11/workspace/projects-reader/src/index.ts b/pnpm11/workspace/projects-reader/src/index.ts index a07bfa6367..a54934034e 100644 --- a/pnpm11/workspace/projects-reader/src/index.ts +++ b/pnpm11/workspace/projects-reader/src/index.ts @@ -1,7 +1,7 @@ import { packageIsInstallable } from '@pnpm/cli.utils' import { logger } from '@pnpm/logger' +import { lexCompare } from '@pnpm/text.ordinal-comparator' import type { Project, ProjectManifest, SupportedArchitectures } from '@pnpm/types' -import { lexCompare } from '@pnpm/util.lex-comparator' import { findPackages } from './findPackages.js' diff --git a/pnpm11/workspace/projects-reader/tsconfig.json b/pnpm11/workspace/projects-reader/tsconfig.json index f5054773ca..efa1d1d9d5 100644 --- a/pnpm11/workspace/projects-reader/tsconfig.json +++ b/pnpm11/workspace/projects-reader/tsconfig.json @@ -21,6 +21,9 @@ { "path": "../../core/types" }, + { + "path": "../../text/ordinal-comparator" + }, { "path": "../project-manifest-reader" }, diff --git a/pnpm11/workspace/workspace-manifest-writer/package.json b/pnpm11/workspace/workspace-manifest-writer/package.json index 8ef4abb2af..5f55d8b087 100644 --- a/pnpm11/workspace/workspace-manifest-writer/package.json +++ b/pnpm11/workspace/workspace-manifest-writer/package.json @@ -36,8 +36,8 @@ "@pnpm/config.version-policy": "workspace:*", "@pnpm/constants": "workspace:*", "@pnpm/lockfile.types": "workspace:*", + "@pnpm/text.ordinal-comparator": "workspace:*", "@pnpm/types": "workspace:*", - "@pnpm/util.lex-comparator": "catalog:", "@pnpm/workspace.workspace-manifest-reader": "workspace:*", "@pnpm/yaml.document-sync": "workspace:*", "ramda": "catalog:", diff --git a/pnpm11/workspace/workspace-manifest-writer/src/index.ts b/pnpm11/workspace/workspace-manifest-writer/src/index.ts index 4373f1757c..78176b9178 100644 --- a/pnpm11/workspace/workspace-manifest-writer/src/index.ts +++ b/pnpm11/workspace/workspace-manifest-writer/src/index.ts @@ -7,10 +7,10 @@ import { parsePkgAndParentSelector } from '@pnpm/config.parse-overrides' import { mergePackageVersionSpecs } from '@pnpm/config.version-policy' import { type GLOBAL_CONFIG_YAML_FILENAME, WORKSPACE_MANIFEST_FILENAME } from '@pnpm/constants' import type { ResolvedCatalogEntry } from '@pnpm/lockfile.types' +import { lexCompare } from '@pnpm/text.ordinal-comparator' import type { Project, } from '@pnpm/types' -import { lexCompare } from '@pnpm/util.lex-comparator' import { validateWorkspaceManifest, type WorkspaceManifest } from '@pnpm/workspace.workspace-manifest-reader' import { patchDocument } from '@pnpm/yaml.document-sync' import { equals } from 'ramda' diff --git a/pnpm11/workspace/workspace-manifest-writer/tsconfig.json b/pnpm11/workspace/workspace-manifest-writer/tsconfig.json index 62703a657c..be80172363 100644 --- a/pnpm11/workspace/workspace-manifest-writer/tsconfig.json +++ b/pnpm11/workspace/workspace-manifest-writer/tsconfig.json @@ -33,6 +33,9 @@ { "path": "../../lockfile/types" }, + { + "path": "../../text/ordinal-comparator" + }, { "path": "../../yaml/document-sync" },