diff --git a/.meta-updater/CHANGELOG.md b/.meta-updater/CHANGELOG.md index 9665302d83b..22fd34d9ebc 100644 --- a/.meta-updater/CHANGELOG.md +++ b/.meta-updater/CHANGELOG.md @@ -1,5 +1,12 @@ # @pnpm-private/updater +## 0.3.3 + +### Patch Changes + +- Updated dependencies [52b0576af] + - @pnpm/lockfile-file@5.0.3 + ## 0.3.2 ### Patch Changes diff --git a/.meta-updater/package.json b/.meta-updater/package.json index 2187da1ef32..c513443f37c 100644 --- a/.meta-updater/package.json +++ b/.meta-updater/package.json @@ -1,13 +1,13 @@ { "name": "@pnpm-private/updater", - "version": "0.3.2", + "version": "0.3.3", "private": true, "type": "module", "scripts": { "compile": "tsc --build" }, "dependencies": { - "@pnpm/lockfile-file": "workspace:5.0.2", + "@pnpm/lockfile-file": "workspace:5.0.3", "@pnpm/types": "workspace:8.0.1", "@types/normalize-path": "^3.0.0", "is-subdir": "^1.1.1", diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 4a7db916ddc..27d6cf2392e 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -18,9 +18,10 @@ ## Setting Up the Environment 1. Run `pnpm install` in the root of the repository to install all dependencies. -2. Change any source code file and run `node /packages/pnpm/spnpm [command] [flags]` to run `pnpm` directly from the source code by compiling all the files without typechecking in memory. -3. Alternatively, for compiling all the projects with typechecking, run `pnpm run compile` in the root of the repository. To run a task that will recompile the projects on change, run `pnpm run watch`. -4. In order to run all the tests in the repository, run `pnpm run test-main`. You may also run tests of specific projects by running `pnpm test` inside a project's directory or using `pnpm --filter test`. +1. Run `pnpm dev-setup` to make pnpm from the repository available in the command line via the `pd` command. +1. Change any source code file and run `pd [command] [flags]` to run `pnpm` directly from the source code by compiling all the files without typechecking in memory. +1. Alternatively, for compiling all the projects with typechecking, run `pnpm run compile` in the root of the repository. To run a task that will recompile the projects on change, run `pnpm run watch`. +1. In order to run all the tests in the repository, run `pnpm run test-main`. You may also run tests of specific projects by running `pnpm test` inside a project's directory or using `pnpm --filter test`. Some of the e2e tests run node-gyp, so you might need to install some build-essentials on your system for those tests to pass. On Fedora, install these: diff --git a/package.json b/package.json index 6b3a6cec9d9..f313684ed46 100644 --- a/package.json +++ b/package.json @@ -23,7 +23,8 @@ "lint:meta": "pnpm run meta-updater --test", "copy-artifacts": "ts-node utils/scripts/src/copy-artifacts.ts", "make-release-description": "pnpm --filter=@pnpm/get-release-text run write-release-text", - "release": "pnpm --filter=@pnpm/exe publish --tag=next-7 --access=public && pnpm publish --filter=!pnpm --filter=!@pnpm/exe --access=public && pnpm publish --filter=pnpm --tag=next-7 --access=public" + "release": "pnpm --filter=@pnpm/exe publish --tag=next-7 --access=public && pnpm publish --filter=!pnpm --filter=!@pnpm/exe --access=public && pnpm publish --filter=pnpm --tag=next-7 --access=public", + "dev-setup": "pnpm -C=./packages/pnpm/dev link -g" }, "devDependencies": { "@babel/core": "^7.16.7", @@ -58,7 +59,7 @@ "verdaccio": "^5.7.0" }, "engines": { - "pnpm": ">=7" + "pnpm": ">=7.0.1" }, "packageManager": "pnpm@7.0.0-alpha.1", "pnpm": { @@ -70,7 +71,7 @@ "hosted-git-info@4": "npm:@zkochan/hosted-git-info@^4.0.2", "http-errors": "^1.7.3", "istanbul-reports": "npm:@zkochan/istanbul-reports", - "js-yaml@^4.0.0": "npm:@zkochan/js-yaml@0.0.5", + "js-yaml@^4.0.0": "npm:@zkochan/js-yaml@0.0.6", "lodash@<4.17.19": "^4.17.9", "nopt@5": "npm:@pnpm/nopt@^0.2.1", "pkg-fetch": "3.1.1", diff --git a/packages/artifacts/linux-arm64/package.json b/packages/artifacts/linux-arm64/package.json index 0a75e8b77d6..74ea307b55c 100644 --- a/packages/artifacts/linux-arm64/package.json +++ b/packages/artifacts/linux-arm64/package.json @@ -1,6 +1,6 @@ { "name": "@pnpm/linux-arm64", - "version": "7.0.1", + "version": "7.1.0", "license": "MIT", "publishConfig": { "bin": { @@ -23,6 +23,6 @@ "pnpm7" ], "devDependencies": { - "@pnpm/linux-arm64": "workspace:7.0.1" + "@pnpm/linux-arm64": "workspace:7.1.0" } } diff --git a/packages/artifacts/linux-x64/package.json b/packages/artifacts/linux-x64/package.json index cf3854c0077..3021824f572 100644 --- a/packages/artifacts/linux-x64/package.json +++ b/packages/artifacts/linux-x64/package.json @@ -1,6 +1,6 @@ { "name": "@pnpm/linux-x64", - "version": "7.0.1", + "version": "7.1.0", "license": "MIT", "publishConfig": { "bin": { @@ -23,6 +23,6 @@ "pnpm7" ], "devDependencies": { - "@pnpm/linux-x64": "workspace:7.0.1" + "@pnpm/linux-x64": "workspace:7.1.0" } } diff --git a/packages/artifacts/macos-arm64/package.json b/packages/artifacts/macos-arm64/package.json index 2d905a0fe24..70d5f825fee 100644 --- a/packages/artifacts/macos-arm64/package.json +++ b/packages/artifacts/macos-arm64/package.json @@ -1,6 +1,6 @@ { "name": "@pnpm/macos-arm64", - "version": "7.0.1", + "version": "7.1.0", "license": "MIT", "publishConfig": { "bin": { @@ -23,6 +23,6 @@ "pnpm7" ], "devDependencies": { - "@pnpm/macos-arm64": "workspace:7.0.1" + "@pnpm/macos-arm64": "workspace:7.1.0" } } diff --git a/packages/artifacts/macos-x64/package.json b/packages/artifacts/macos-x64/package.json index 4074e236147..23af7c95738 100644 --- a/packages/artifacts/macos-x64/package.json +++ b/packages/artifacts/macos-x64/package.json @@ -1,6 +1,6 @@ { "name": "@pnpm/macos-x64", - "version": "7.0.1", + "version": "7.1.0", "license": "MIT", "publishConfig": { "bin": { @@ -23,6 +23,6 @@ "pnpm7" ], "devDependencies": { - "@pnpm/macos-x64": "workspace:7.0.1" + "@pnpm/macos-x64": "workspace:7.1.0" } } diff --git a/packages/artifacts/win-x64/package.json b/packages/artifacts/win-x64/package.json index 857fbb98447..aa2df2cdacb 100644 --- a/packages/artifacts/win-x64/package.json +++ b/packages/artifacts/win-x64/package.json @@ -1,6 +1,6 @@ { "name": "@pnpm/win-x64", - "version": "7.0.1", + "version": "7.1.0", "license": "MIT", "publishConfig": { "bin": { @@ -23,6 +23,6 @@ "pnpm7" ], "devDependencies": { - "@pnpm/win-x64": "workspace:7.0.1" + "@pnpm/win-x64": "workspace:7.1.0" } } diff --git a/packages/audit/package.json b/packages/audit/package.json index 374aaead678..89cf57174af 100644 --- a/packages/audit/package.json +++ b/packages/audit/package.json @@ -32,7 +32,7 @@ "devDependencies": { "@pnpm/audit": "workspace:3.0.2", "@pnpm/constants": "workspace:6.1.0", - "@pnpm/lockfile-file": "workspace:5.0.2", + "@pnpm/lockfile-file": "workspace:5.0.3", "nock": "12.0.3" }, "dependencies": { diff --git a/packages/cli-utils/CHANGELOG.md b/packages/cli-utils/CHANGELOG.md index 8a0a3cd5fa9..9d5c7e0149d 100644 --- a/packages/cli-utils/CHANGELOG.md +++ b/packages/cli-utils/CHANGELOG.md @@ -1,5 +1,13 @@ # @pnpm/cli-utils +## 0.7.5 + +### Patch Changes + +- 52b0576af: feat: support libc filed +- Updated dependencies [52b0576af] + - @pnpm/package-is-installable@6.0.3 + ## 0.7.4 ### Patch Changes diff --git a/packages/cli-utils/package.json b/packages/cli-utils/package.json index 61a77556936..e325bcb9643 100644 --- a/packages/cli-utils/package.json +++ b/packages/cli-utils/package.json @@ -1,6 +1,6 @@ { "name": "@pnpm/cli-utils", - "version": "0.7.4", + "version": "0.7.5", "description": "Utils for pnpm commands", "main": "lib/index.js", "types": "lib/index.d.ts", @@ -28,7 +28,7 @@ }, "homepage": "https://github.com/pnpm/pnpm/blob/main/packages/cli-utils#readme", "devDependencies": { - "@pnpm/cli-utils": "workspace:0.7.4", + "@pnpm/cli-utils": "workspace:0.7.5", "@pnpm/logger": "^4.0.0", "@types/ramda": "0.27.39" }, @@ -38,7 +38,7 @@ "@pnpm/default-reporter": "workspace:9.0.4", "@pnpm/error": "workspace:3.0.1", "@pnpm/manifest-utils": "workspace:3.0.2", - "@pnpm/package-is-installable": "workspace:6.0.2", + "@pnpm/package-is-installable": "workspace:6.0.3", "@pnpm/read-project-manifest": "workspace:3.0.2", "@pnpm/types": "workspace:8.0.1", "chalk": "^4.1.0", diff --git a/packages/cli-utils/src/packageIsInstallable.ts b/packages/cli-utils/src/packageIsInstallable.ts index fd45b46191b..86154899c1a 100644 --- a/packages/cli-utils/src/packageIsInstallable.ts +++ b/packages/cli-utils/src/packageIsInstallable.ts @@ -8,6 +8,7 @@ export function packageIsInstallable ( engines?: WantedEngine cpu?: string[] os?: string[] + libc?: string[] }, opts: { engineStrict?: boolean diff --git a/packages/core/CHANGELOG.md b/packages/core/CHANGELOG.md index 97ab010cb31..708e45ffa8d 100644 --- a/packages/core/CHANGELOG.md +++ b/packages/core/CHANGELOG.md @@ -1,5 +1,19 @@ # @pnpm/core +## 5.1.1 + +### Patch Changes + +- Updated dependencies [52b0576af] + - @pnpm/filter-lockfile@6.0.3 + - @pnpm/lockfile-file@5.0.3 + - @pnpm/resolve-dependencies@27.0.3 + - @pnpm/headless@18.1.4 + - @pnpm/modules-cleaner@12.0.4 + - @pnpm/get-context@6.1.2 + - @pnpm/lockfile-to-pnp@0.5.4 + - @pnpm/package-requester@18.0.4 + ## 5.1.0 ### Minor Changes diff --git a/packages/core/package.json b/packages/core/package.json index c1f2cee470e..2e4dafadd7d 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -1,7 +1,7 @@ { "name": "@pnpm/core", "description": "Fast, disk space efficient installation engine", - "version": "5.1.0", + "version": "5.1.1", "bugs": { "url": "https://github.com/pnpm/pnpm/issues" }, @@ -20,22 +20,22 @@ "@pnpm/constants": "workspace:6.1.0", "@pnpm/core-loggers": "workspace:7.0.1", "@pnpm/error": "workspace:3.0.1", - "@pnpm/filter-lockfile": "workspace:6.0.2", - "@pnpm/get-context": "workspace:6.1.1", + "@pnpm/filter-lockfile": "workspace:6.0.3", + "@pnpm/get-context": "workspace:6.1.2", "@pnpm/graph-sequencer": "1.0.0", - "@pnpm/headless": "workspace:18.1.3", + "@pnpm/headless": "workspace:18.1.4", "@pnpm/hoist": "workspace:6.1.1", "@pnpm/lifecycle": "workspace:13.0.2", "@pnpm/link-bins": "workspace:7.1.1", - "@pnpm/lockfile-file": "workspace:5.0.2", - "@pnpm/lockfile-to-pnp": "workspace:0.5.3", + "@pnpm/lockfile-file": "workspace:5.0.3", + "@pnpm/lockfile-to-pnp": "workspace:0.5.4", "@pnpm/lockfile-utils": "workspace:4.0.2", "@pnpm/lockfile-walker": "workspace:5.0.2", "@pnpm/manifest-utils": "workspace:3.0.2", - "@pnpm/modules-cleaner": "workspace:12.0.3", + "@pnpm/modules-cleaner": "workspace:12.0.4", "@pnpm/modules-yaml": "workspace:10.0.1", "@pnpm/normalize-registries": "workspace:3.0.1", - "@pnpm/package-requester": "workspace:18.0.3", + "@pnpm/package-requester": "workspace:18.0.4", "@pnpm/parse-overrides": "workspace:2.0.1", "@pnpm/parse-wanted-dependency": "workspace:3.0.0", "@pnpm/prune-lockfile": "workspace:4.0.2", @@ -43,13 +43,13 @@ "@pnpm/read-package-json": "workspace:6.0.2", "@pnpm/read-project-manifest": "workspace:3.0.2", "@pnpm/remove-bins": "workspace:3.0.2", - "@pnpm/resolve-dependencies": "workspace:27.0.2", + "@pnpm/resolve-dependencies": "workspace:27.0.3", "@pnpm/resolver-base": "workspace:9.0.1", "@pnpm/store-controller-types": "workspace:13.0.1", "@pnpm/symlink-dependency": "workspace:5.0.1", "@pnpm/types": "workspace:8.0.1", "@pnpm/which-version-is-pinned": "workspace:2.0.0", - "@yarnpkg/plugin-compat": "4.0.0-rc.4", + "@yarnpkg/extensions": "1.1.0-rc.1", "@zkochan/npm-package-arg": "^2.0.1", "@zkochan/rimraf": "^2.1.2", "dependency-path": "workspace:9.1.1", @@ -70,9 +70,9 @@ "@pnpm/assert-store": "workspace:*", "@pnpm/cafs": "workspace:4.0.2", "@pnpm/client": "workspace:7.1.1", - "@pnpm/core": "workspace:5.1.0", + "@pnpm/core": "workspace:5.1.1", "@pnpm/logger": "^4.0.0", - "@pnpm/package-store": "workspace:13.0.3", + "@pnpm/package-store": "workspace:13.0.4", "@pnpm/prepare": "workspace:*", "@pnpm/registry-mock": "2.16.0", "@pnpm/store-path": "workspace:6.0.0", diff --git a/packages/core/src/install/index.ts b/packages/core/src/install/index.ts index 5e5dbed256c..84977a5ceb4 100644 --- a/packages/core/src/install/index.ts +++ b/packages/core/src/install/index.ts @@ -53,7 +53,7 @@ import { ProjectManifest, ReadPackageHook, } from '@pnpm/types' -import { packageExtensions as compatPackageExtensions } from '@yarnpkg/plugin-compat/lib/extensions' +import { packageExtensions as compatPackageExtensions } from '@yarnpkg/extensions' import rimraf from '@zkochan/rimraf' import isInnerLink from 'is-inner-link' import pFilter from 'p-filter' diff --git a/packages/dependencies-hierarchy/CHANGELOG.md b/packages/dependencies-hierarchy/CHANGELOG.md index 3a3f83c7165..c977ad04952 100644 --- a/packages/dependencies-hierarchy/CHANGELOG.md +++ b/packages/dependencies-hierarchy/CHANGELOG.md @@ -1,5 +1,12 @@ # dependencies-hierarchy +## 11.0.3 + +### Patch Changes + +- Updated dependencies [52b0576af] + - @pnpm/lockfile-file@5.0.3 + ## 11.0.2 ### Patch Changes diff --git a/packages/dependencies-hierarchy/package.json b/packages/dependencies-hierarchy/package.json index 7308adcc3a5..ec5fce735af 100644 --- a/packages/dependencies-hierarchy/package.json +++ b/packages/dependencies-hierarchy/package.json @@ -1,6 +1,6 @@ { "name": "dependencies-hierarchy", - "version": "11.0.2", + "version": "11.0.3", "description": "Creates a dependencies hierarchy for a symlinked `node_modules`", "main": "lib/index.js", "types": "lib/index.d.ts", @@ -32,7 +32,7 @@ }, "homepage": "https://github.com/pnpm/pnpm/blob/main/packages/dependencies-hierarchy#readme", "dependencies": { - "@pnpm/lockfile-file": "workspace:5.0.2", + "@pnpm/lockfile-file": "workspace:5.0.3", "@pnpm/lockfile-utils": "workspace:4.0.2", "@pnpm/modules-yaml": "workspace:10.0.1", "@pnpm/normalize-registries": "workspace:3.0.1", @@ -48,7 +48,7 @@ "@pnpm/constants": "workspace:6.1.0", "@pnpm/logger": "^4.0.0", "@types/normalize-path": "^3.0.0", - "dependencies-hierarchy": "workspace:11.0.2" + "dependencies-hierarchy": "workspace:11.0.3" }, "funding": "https://opencollective.com/pnpm", "exports": { diff --git a/packages/exe/package.json b/packages/exe/package.json index 39e338c2906..3b553e995fb 100644 --- a/packages/exe/package.json +++ b/packages/exe/package.json @@ -1,7 +1,7 @@ { "name": "@pnpm/exe", "description": "Fast, disk space efficient package manager", - "version": "7.0.1", + "version": "7.1.0", "publishConfig": { "bin": { "pnpm": "pnpm" @@ -11,14 +11,14 @@ "url": "https://github.com/pnpm/pnpm/issues" }, "optionalDependencies": { - "@pnpm/linux-arm64": "workspace:7.0.1", - "@pnpm/linux-x64": "workspace:7.0.1", - "@pnpm/macos-arm64": "workspace:7.0.1", - "@pnpm/macos-x64": "workspace:7.0.1", - "@pnpm/win-x64": "workspace:7.0.1" + "@pnpm/linux-arm64": "workspace:7.1.0", + "@pnpm/linux-x64": "workspace:7.1.0", + "@pnpm/macos-arm64": "workspace:7.1.0", + "@pnpm/macos-x64": "workspace:7.1.0", + "@pnpm/win-x64": "workspace:7.1.0" }, "devDependencies": { - "@pnpm/exe": "workspace:7.0.1", + "@pnpm/exe": "workspace:7.1.0", "@zkochan/pkg": "0.0.0-2", "execa": "npm:safe-execa@^0.1.1" }, diff --git a/packages/exportable-manifest/src/overridePublishConfig.ts b/packages/exportable-manifest/src/overridePublishConfig.ts index 8335258e722..f5a38dc0862 100644 --- a/packages/exportable-manifest/src/overridePublishConfig.ts +++ b/packages/exportable-manifest/src/overridePublishConfig.ts @@ -21,6 +21,7 @@ const PUBLISH_CONFIG_WHITELIST = new Set([ // These are useful to hide in order to avoid warnings during local development 'os', 'cpu', + 'libc', // https://www.typescriptlang.org/docs/handbook/declaration-files/publishing.html#version-selection-with-typesversions 'typesVersions', ]) diff --git a/packages/filter-lockfile/CHANGELOG.md b/packages/filter-lockfile/CHANGELOG.md index b279a3a81bb..4c7ce690bf0 100644 --- a/packages/filter-lockfile/CHANGELOG.md +++ b/packages/filter-lockfile/CHANGELOG.md @@ -1,5 +1,13 @@ # @pnpm/filter-lockfile +## 6.0.3 + +### Patch Changes + +- 52b0576af: feat: support libc filed +- Updated dependencies [52b0576af] + - @pnpm/package-is-installable@6.0.3 + ## 6.0.2 ### Patch Changes diff --git a/packages/filter-lockfile/package.json b/packages/filter-lockfile/package.json index f365c106f5b..a0aaea0ad98 100644 --- a/packages/filter-lockfile/package.json +++ b/packages/filter-lockfile/package.json @@ -1,6 +1,6 @@ { "name": "@pnpm/filter-lockfile", - "version": "6.0.2", + "version": "6.0.3", "description": "Filters a lockfile", "main": "lib/index.js", "types": "lib/index.d.ts", @@ -34,12 +34,13 @@ "@pnpm/logger": "^4.0.0" }, "devDependencies": { - "@pnpm/filter-lockfile": "workspace:6.0.2", + "@pnpm/filter-lockfile": "workspace:6.0.3", "@pnpm/logger": "^4.0.0", "@types/ramda": "0.27.39", "tempy": "^1.0.0", "write-yaml-file": "^4.2.0", - "yaml-tag": "1.1.0" + "yaml-tag": "1.1.0", + "detect-libc": "^2.0.1" }, "dependencies": { "@pnpm/constants": "workspace:6.1.0", @@ -47,7 +48,7 @@ "@pnpm/lockfile-types": "workspace:4.0.1", "@pnpm/lockfile-utils": "workspace:4.0.2", "@pnpm/lockfile-walker": "workspace:5.0.2", - "@pnpm/package-is-installable": "workspace:6.0.2", + "@pnpm/package-is-installable": "workspace:6.0.3", "@pnpm/types": "workspace:8.0.1", "dependency-path": "workspace:9.1.1", "ramda": "^0.27.1" diff --git a/packages/filter-lockfile/src/filterLockfileByImportersAndEngine.ts b/packages/filter-lockfile/src/filterLockfileByImportersAndEngine.ts index 72e14298af8..6a7313710d9 100644 --- a/packages/filter-lockfile/src/filterLockfileByImportersAndEngine.ts +++ b/packages/filter-lockfile/src/filterLockfileByImportersAndEngine.ts @@ -137,6 +137,7 @@ function pkgAllDeps ( cpu: pkgSnapshot.cpu, engines: pkgSnapshot.engines, os: pkgSnapshot.os, + libc: pkgSnapshot.libc, } // TODO: depPath is not the package ID. Should be fixed installable = opts.includeIncompatiblePackages || packageIsInstallable(pkgSnapshot.id ?? depPath, pkg, { diff --git a/packages/filter-lockfile/test/filterByImportersAndEngine.ts b/packages/filter-lockfile/test/filterByImportersAndEngine.ts index a9d1ecc63fa..5a10af816d9 100644 --- a/packages/filter-lockfile/test/filterByImportersAndEngine.ts +++ b/packages/filter-lockfile/test/filterByImportersAndEngine.ts @@ -1,6 +1,28 @@ import { LOCKFILE_VERSION } from '@pnpm/constants' import { filterLockfileByImportersAndEngine } from '@pnpm/filter-lockfile' +const REGIONAL_ARCH = Object.assign({}, process.arch) +const REGIONAL_CPU = Object.assign({}, process.platform) + +jest.mock('detect-libc', () => { + const orginal = jest.requireActual('detect-libc') + return { + ...orginal, + familySync: () => 'musl', + } +}) + +afterEach(() => { + Object.defineProperties(process, { + platform: { + value: REGIONAL_CPU, + }, + arch: { + value: REGIONAL_ARCH, + }, + }) +}) + test('filterByImportersAndEngine(): skip packages that are not installable', () => { const skippedPackages = new Set(['/preserve-existing-skipped/1.0.0']) const filteredLockfile = filterLockfileByImportersAndEngine( @@ -171,3 +193,348 @@ test('filterByImportersAndEngine(): skip packages that are not installable', () }) expect(Array.from(skippedPackages)).toStrictEqual(['/preserve-existing-skipped/1.0.0', '/optional-dep/1.0.0', '/foo/1.0.0']) }) + +test('filterByImportersAndEngine(): filter the packages that set os and cpu', () => { + Object.defineProperties(process, { + platform: { + value: 'darwin', + }, + arch: { + value: 'x64', + }, + }) + + const skippedPackages = new Set(['/preserve-existing-skipped/1.0.0']) + const filteredLockfile = filterLockfileByImportersAndEngine( + { + importers: { + 'project-1': { + dependencies: { + 'prod-dep': '1.0.0', + }, + devDependencies: { + 'dev-dep': '1.0.0', + }, + optionalDependencies: { + 'not-skipped-optional': '1.0.0', + 'optional-dep': '1.0.0', + }, + specifiers: { + 'dev-dep': '^1.0.0', + 'not-skipped-optional': '^1.0.0', + 'optional-dep': '^1.0.0', + 'prod-dep': '^1.0.0', + }, + }, + 'project-2': { + dependencies: { + 'project-2-prod-dep': '1.0.0', + }, + specifiers: { + 'project-2-prod-dep': '^1.0.0', + }, + }, + }, + lockfileVersion: LOCKFILE_VERSION, + packages: { + '/bar/1.0.0': { + resolution: { integrity: '' }, + }, + '/dev-dep/1.0.0': { + dev: true, + resolution: { integrity: '' }, + }, + '/foo/1.0.0': { + optional: true, + resolution: { integrity: '' }, + }, + '/not-skipped-optional/1.0.0': { + optional: true, + resolution: { integrity: '' }, + }, + '/optional-dep/1.0.0': { + dependencies: { + bar: '1.0.0', + foo: '1.0.0', + }, + os: ['linux'], + cpu: ['x64'], + optional: true, + resolution: { integrity: '' }, + }, + '/prod-dep-dep/1.0.0': { + resolution: { integrity: '' }, + }, + '/prod-dep/1.0.0': { + dependencies: { + bar: '1.0.0', + 'prod-dep-dep': '1.0.0', + }, + optionalDependencies: { + 'optional-dep': '1.0.0', + }, + resolution: { integrity: '' }, + }, + '/project-2-prod-dep/1.0.0': { + resolution: { integrity: '' }, + }, + }, + }, + ['project-1'], + { + currentEngine: { + nodeVersion: '10.0.0', + pnpmVersion: '2.0.0', + }, + engineStrict: true, + failOnMissingDependencies: true, + include: { + dependencies: true, + devDependencies: true, + optionalDependencies: true, + }, + lockfileDir: process.cwd(), + skipped: skippedPackages, + } + ) + + expect(filteredLockfile).toStrictEqual({ + importers: { + 'project-1': { + dependencies: { + 'prod-dep': '1.0.0', + }, + devDependencies: { + 'dev-dep': '1.0.0', + }, + optionalDependencies: { + 'not-skipped-optional': '1.0.0', + 'optional-dep': '1.0.0', + }, + specifiers: { + 'dev-dep': '^1.0.0', + 'not-skipped-optional': '^1.0.0', + 'optional-dep': '^1.0.0', + 'prod-dep': '^1.0.0', + }, + }, + 'project-2': { + dependencies: { + 'project-2-prod-dep': '1.0.0', + }, + specifiers: { + 'project-2-prod-dep': '^1.0.0', + }, + }, + }, + lockfileVersion: LOCKFILE_VERSION, + packages: { + '/bar/1.0.0': { + resolution: { integrity: '' }, + }, + '/dev-dep/1.0.0': { + dev: true, + resolution: { integrity: '' }, + }, + '/foo/1.0.0': { + optional: true, + resolution: { integrity: '' }, + }, + '/not-skipped-optional/1.0.0': { + optional: true, + resolution: { integrity: '' }, + }, + '/optional-dep/1.0.0': { + dependencies: { + bar: '1.0.0', + foo: '1.0.0', + }, + os: ['linux'], + cpu: ['x64'], + optional: true, + resolution: { integrity: '' }, + }, + '/prod-dep-dep/1.0.0': { + resolution: { integrity: '' }, + }, + '/prod-dep/1.0.0': { + dependencies: { + bar: '1.0.0', + 'prod-dep-dep': '1.0.0', + }, + optionalDependencies: { + 'optional-dep': '1.0.0', + }, + resolution: { integrity: '' }, + }, + }, + }) + expect(Array.from(skippedPackages)).toStrictEqual(['/preserve-existing-skipped/1.0.0', '/optional-dep/1.0.0', '/foo/1.0.0']) +}) + +test('filterByImportersAndEngine(): filter the packages that set libc', () => { + const skippedPackages = new Set(['/preserve-existing-skipped/1.0.0']) + const filteredLockfile = filterLockfileByImportersAndEngine( + { + importers: { + 'project-1': { + dependencies: { + 'prod-dep': '1.0.0', + }, + devDependencies: { + 'dev-dep': '1.0.0', + }, + optionalDependencies: { + 'not-skipped-optional': '1.0.0', + 'optional-dep': '1.0.0', + }, + specifiers: { + 'dev-dep': '^1.0.0', + 'not-skipped-optional': '^1.0.0', + 'optional-dep': '^1.0.0', + 'prod-dep': '^1.0.0', + }, + }, + 'project-2': { + dependencies: { + 'project-2-prod-dep': '1.0.0', + }, + specifiers: { + 'project-2-prod-dep': '^1.0.0', + }, + }, + }, + lockfileVersion: LOCKFILE_VERSION, + packages: { + '/bar/1.0.0': { + resolution: { integrity: '' }, + }, + '/dev-dep/1.0.0': { + dev: true, + resolution: { integrity: '' }, + }, + '/foo/1.0.0': { + optional: true, + resolution: { integrity: '' }, + }, + '/not-skipped-optional/1.0.0': { + optional: true, + resolution: { integrity: '' }, + }, + '/optional-dep/1.0.0': { + dependencies: { + bar: '1.0.0', + foo: '1.0.0', + }, + libc: ['glibc'], + optional: true, + resolution: { integrity: '' }, + }, + '/prod-dep-dep/1.0.0': { + resolution: { integrity: '' }, + }, + '/prod-dep/1.0.0': { + dependencies: { + bar: '1.0.0', + 'prod-dep-dep': '1.0.0', + }, + optionalDependencies: { + 'optional-dep': '1.0.0', + }, + resolution: { integrity: '' }, + }, + '/project-2-prod-dep/1.0.0': { + resolution: { integrity: '' }, + }, + }, + }, + ['project-1'], + { + currentEngine: { + nodeVersion: '10.0.0', + pnpmVersion: '2.0.0', + }, + engineStrict: true, + failOnMissingDependencies: true, + include: { + dependencies: true, + devDependencies: true, + optionalDependencies: true, + }, + lockfileDir: process.cwd(), + skipped: skippedPackages, + } + ) + + expect(filteredLockfile).toStrictEqual({ + importers: { + 'project-1': { + dependencies: { + 'prod-dep': '1.0.0', + }, + devDependencies: { + 'dev-dep': '1.0.0', + }, + optionalDependencies: { + 'not-skipped-optional': '1.0.0', + 'optional-dep': '1.0.0', + }, + specifiers: { + 'dev-dep': '^1.0.0', + 'not-skipped-optional': '^1.0.0', + 'optional-dep': '^1.0.0', + 'prod-dep': '^1.0.0', + }, + }, + 'project-2': { + dependencies: { + 'project-2-prod-dep': '1.0.0', + }, + specifiers: { + 'project-2-prod-dep': '^1.0.0', + }, + }, + }, + lockfileVersion: LOCKFILE_VERSION, + packages: { + '/bar/1.0.0': { + resolution: { integrity: '' }, + }, + '/dev-dep/1.0.0': { + dev: true, + resolution: { integrity: '' }, + }, + '/foo/1.0.0': { + optional: true, + resolution: { integrity: '' }, + }, + '/not-skipped-optional/1.0.0': { + optional: true, + resolution: { integrity: '' }, + }, + '/optional-dep/1.0.0': { + dependencies: { + bar: '1.0.0', + foo: '1.0.0', + }, + libc: ['glibc'], + optional: true, + resolution: { integrity: '' }, + }, + '/prod-dep-dep/1.0.0': { + resolution: { integrity: '' }, + }, + '/prod-dep/1.0.0': { + dependencies: { + bar: '1.0.0', + 'prod-dep-dep': '1.0.0', + }, + optionalDependencies: { + 'optional-dep': '1.0.0', + }, + resolution: { integrity: '' }, + }, + }, + }) + expect(Array.from(skippedPackages)).toStrictEqual(['/preserve-existing-skipped/1.0.0', '/optional-dep/1.0.0', '/foo/1.0.0']) +}) \ No newline at end of file diff --git a/packages/filter-lockfile/test/index.ts b/packages/filter-lockfile/test/index.ts deleted file mode 100644 index c4756985a4d..00000000000 --- a/packages/filter-lockfile/test/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -/// -import './filterByImporters' -import './filterByImportersAndEngine' diff --git a/packages/filter-workspace-packages/CHANGELOG.md b/packages/filter-workspace-packages/CHANGELOG.md index 3e25a353cb3..7d1bb9632d5 100644 --- a/packages/filter-workspace-packages/CHANGELOG.md +++ b/packages/filter-workspace-packages/CHANGELOG.md @@ -1,5 +1,11 @@ # @pnpm/filter-workspace-packages +## 5.0.5 + +### Patch Changes + +- @pnpm/find-workspace-packages@4.0.5 + ## 5.0.4 ### Patch Changes diff --git a/packages/filter-workspace-packages/package.json b/packages/filter-workspace-packages/package.json index 42d3939dedd..9af0868da11 100644 --- a/packages/filter-workspace-packages/package.json +++ b/packages/filter-workspace-packages/package.json @@ -1,6 +1,6 @@ { "name": "@pnpm/filter-workspace-packages", - "version": "5.0.4", + "version": "5.0.5", "description": "Filters packages in a workspace", "main": "lib/index.js", "types": "lib/index.d.ts", @@ -30,7 +30,7 @@ "homepage": "https://github.com/pnpm/pnpm/blob/main/packages/filter-workspace-packages#readme", "dependencies": { "@pnpm/error": "workspace:3.0.1", - "@pnpm/find-workspace-packages": "workspace:4.0.4", + "@pnpm/find-workspace-packages": "workspace:4.0.5", "@pnpm/matcher": "workspace:3.0.0", "execa": "npm:safe-execa@^0.1.1", "find-up": "^5.0.0", @@ -40,7 +40,7 @@ "ramda": "^0.27.1" }, "devDependencies": { - "@pnpm/filter-workspace-packages": "workspace:5.0.4", + "@pnpm/filter-workspace-packages": "workspace:5.0.5", "@types/is-ci": "^3.0.0", "@types/is-windows": "^1.0.0", "@types/micromatch": "^4.0.1", diff --git a/packages/find-workspace-packages/CHANGELOG.md b/packages/find-workspace-packages/CHANGELOG.md index dac0703ae30..e0b8acda7d3 100644 --- a/packages/find-workspace-packages/CHANGELOG.md +++ b/packages/find-workspace-packages/CHANGELOG.md @@ -1,5 +1,12 @@ # @pnpm/find-workspace-packages +## 4.0.5 + +### Patch Changes + +- Updated dependencies [52b0576af] + - @pnpm/cli-utils@0.7.5 + ## 4.0.4 ### Patch Changes diff --git a/packages/find-workspace-packages/package.json b/packages/find-workspace-packages/package.json index 41c1d4aec03..f3a274e9539 100644 --- a/packages/find-workspace-packages/package.json +++ b/packages/find-workspace-packages/package.json @@ -1,6 +1,6 @@ { "name": "@pnpm/find-workspace-packages", - "version": "4.0.4", + "version": "4.0.5", "description": "Finds packages inside a workspace", "main": "lib/index.js", "types": "lib/index.d.ts", @@ -29,7 +29,7 @@ }, "homepage": "https://github.com/pnpm/pnpm/blob/main/packages/find-workspace-packages#readme", "dependencies": { - "@pnpm/cli-utils": "workspace:0.7.4", + "@pnpm/cli-utils": "workspace:0.7.5", "@pnpm/constants": "workspace:6.1.0", "@pnpm/types": "workspace:8.0.1", "find-packages": "workspace:9.0.2", @@ -37,7 +37,7 @@ }, "funding": "https://opencollective.com/pnpm", "devDependencies": { - "@pnpm/find-workspace-packages": "workspace:4.0.4" + "@pnpm/find-workspace-packages": "workspace:4.0.5" }, "exports": { ".": "./lib/index.js" diff --git a/packages/get-context/CHANGELOG.md b/packages/get-context/CHANGELOG.md index 00eb2554e99..f9f34a0664e 100644 --- a/packages/get-context/CHANGELOG.md +++ b/packages/get-context/CHANGELOG.md @@ -1,5 +1,13 @@ # @pnpm/get-context +## 6.1.2 + +### Patch Changes + +- Updated dependencies [52b0576af] + - @pnpm/lockfile-file@5.0.3 + - @pnpm/read-projects-context@6.0.3 + ## 6.1.1 ### Patch Changes diff --git a/packages/get-context/package.json b/packages/get-context/package.json index 1a94ce0b6cc..88ca9bc95d3 100644 --- a/packages/get-context/package.json +++ b/packages/get-context/package.json @@ -1,6 +1,6 @@ { "name": "@pnpm/get-context", - "version": "6.1.1", + "version": "6.1.2", "description": "Gets context information about a project", "main": "lib/index.js", "types": "lib/index.d.ts", @@ -29,7 +29,7 @@ }, "homepage": "https://github.com/pnpm/pnpm/blob/main/packages/get-context#readme", "devDependencies": { - "@pnpm/get-context": "workspace:6.1.1", + "@pnpm/get-context": "workspace:6.1.2", "@pnpm/logger": "^4.0.0", "@types/is-ci": "^3.0.0", "@types/ramda": "0.27.39" @@ -41,9 +41,9 @@ "@pnpm/constants": "workspace:6.1.0", "@pnpm/core-loggers": "workspace:7.0.1", "@pnpm/error": "workspace:3.0.1", - "@pnpm/lockfile-file": "workspace:5.0.2", + "@pnpm/lockfile-file": "workspace:5.0.3", "@pnpm/modules-yaml": "workspace:10.0.1", - "@pnpm/read-projects-context": "workspace:6.0.2", + "@pnpm/read-projects-context": "workspace:6.0.3", "@pnpm/types": "workspace:8.0.1", "@zkochan/rimraf": "^2.1.2", "is-ci": "^3.0.0", diff --git a/packages/headless/CHANGELOG.md b/packages/headless/CHANGELOG.md index 69110ebb4aa..c808bc2c8e8 100644 --- a/packages/headless/CHANGELOG.md +++ b/packages/headless/CHANGELOG.md @@ -1,5 +1,18 @@ # @pnpm/headless +## 18.1.4 + +### Patch Changes + +- Updated dependencies [52b0576af] + - @pnpm/filter-lockfile@6.0.3 + - @pnpm/lockfile-file@5.0.3 + - @pnpm/package-is-installable@6.0.3 + - @pnpm/modules-cleaner@12.0.4 + - @pnpm/lockfile-to-pnp@0.5.4 + - @pnpm/real-hoist@0.2.2 + - @pnpm/package-requester@18.0.4 + ## 18.1.3 ### Patch Changes diff --git a/packages/headless/package.json b/packages/headless/package.json index 4a4b91f30b9..f72df6f3d63 100644 --- a/packages/headless/package.json +++ b/packages/headless/package.json @@ -1,7 +1,7 @@ { "name": "@pnpm/headless", "description": "Fast installation using only pnpm-lock.yaml", - "version": "18.1.3", + "version": "18.1.4", "bugs": { "url": "https://github.com/pnpm/pnpm/issues" }, @@ -17,11 +17,11 @@ "devDependencies": { "@pnpm/assert-project": "workspace:*", "@pnpm/client": "workspace:7.1.1", - "@pnpm/headless": "workspace:18.1.3", + "@pnpm/headless": "workspace:18.1.4", "@pnpm/logger": "^4.0.0", - "@pnpm/package-store": "workspace:13.0.3", + "@pnpm/package-store": "workspace:13.0.4", "@pnpm/prepare": "workspace:*", - "@pnpm/read-projects-context": "workspace:6.0.2", + "@pnpm/read-projects-context": "workspace:6.0.3", "@pnpm/registry-mock": "2.16.0", "@pnpm/store-path": "workspace:6.0.0", "@pnpm/test-fixtures": "workspace:*", @@ -72,17 +72,17 @@ "@pnpm/constants": "workspace:6.1.0", "@pnpm/core-loggers": "workspace:7.0.1", "@pnpm/error": "workspace:3.0.1", - "@pnpm/filter-lockfile": "workspace:6.0.2", + "@pnpm/filter-lockfile": "workspace:6.0.3", "@pnpm/hoist": "workspace:6.1.1", "@pnpm/lifecycle": "workspace:13.0.2", "@pnpm/link-bins": "workspace:7.1.1", - "@pnpm/lockfile-file": "workspace:5.0.2", - "@pnpm/lockfile-to-pnp": "workspace:0.5.3", + "@pnpm/lockfile-file": "workspace:5.0.3", + "@pnpm/lockfile-to-pnp": "workspace:0.5.4", "@pnpm/lockfile-utils": "workspace:4.0.2", - "@pnpm/modules-cleaner": "workspace:12.0.3", + "@pnpm/modules-cleaner": "workspace:12.0.4", "@pnpm/modules-yaml": "workspace:10.0.1", - "@pnpm/package-is-installable": "workspace:6.0.2", - "@pnpm/package-requester": "workspace:18.0.3", + "@pnpm/package-is-installable": "workspace:6.0.3", + "@pnpm/package-requester": "workspace:18.0.4", "@pnpm/read-package-json": "workspace:6.0.2", "@pnpm/read-project-manifest": "workspace:3.0.2", "@pnpm/real-hoist": "workspace:0.2.2", diff --git a/packages/headless/src/lockfileToDepGraph.ts b/packages/headless/src/lockfileToDepGraph.ts index e9c18d8b4d2..c5d0e94099b 100644 --- a/packages/headless/src/lockfileToDepGraph.ts +++ b/packages/headless/src/lockfileToDepGraph.ts @@ -108,6 +108,7 @@ export default async function lockfileToDepGraph ( engines: pkgSnapshot.engines, cpu: pkgSnapshot.cpu, os: pkgSnapshot.os, + libc: pkgSnapshot.libc, } if (!opts.force && packageIsInstallable(packageId, pkg, { diff --git a/packages/headless/src/lockfileToHoistedDepGraph.ts b/packages/headless/src/lockfileToHoistedDepGraph.ts index 4cd7b480a87..fdea99699d9 100644 --- a/packages/headless/src/lockfileToHoistedDepGraph.ts +++ b/packages/headless/src/lockfileToHoistedDepGraph.ts @@ -157,6 +157,7 @@ async function fetchDeps ( engines: pkgSnapshot.engines, cpu: pkgSnapshot.cpu, os: pkgSnapshot.os, + libc: pkgSnapshot.libc, } if (!opts.force && packageIsInstallable(packageId, pkg, { diff --git a/packages/list/CHANGELOG.md b/packages/list/CHANGELOG.md index 2c91581e87f..2d29dcd10f4 100644 --- a/packages/list/CHANGELOG.md +++ b/packages/list/CHANGELOG.md @@ -1,5 +1,11 @@ # @pnpm/list +## 7.0.3 + +### Patch Changes + +- dependencies-hierarchy@11.0.3 + ## 7.0.2 ### Patch Changes diff --git a/packages/list/package.json b/packages/list/package.json index fcd16427bce..62fa9edd73f 100644 --- a/packages/list/package.json +++ b/packages/list/package.json @@ -1,6 +1,6 @@ { "name": "@pnpm/list", - "version": "7.0.2", + "version": "7.0.3", "description": "List installed packages in a symlinked `node_modules`", "main": "lib/index.js", "types": "lib/index.d.ts", @@ -42,13 +42,13 @@ "archy": "^1.0.0", "chalk": "^4.1.0", "cli-columns": "^4.0.0", - "dependencies-hierarchy": "workspace:11.0.2", + "dependencies-hierarchy": "workspace:11.0.3", "p-limit": "^3.1.0", "ramda": "^0.27.1", "semver": "^7.3.4" }, "devDependencies": { - "@pnpm/list": "workspace:7.0.2", + "@pnpm/list": "workspace:7.0.3", "@pnpm/logger": "^4.0.0", "@types/archy": "0.0.31", "@types/ramda": "0.27.39", diff --git a/packages/lockfile-file/CHANGELOG.md b/packages/lockfile-file/CHANGELOG.md index 284953c4cf5..1ed5a93e134 100644 --- a/packages/lockfile-file/CHANGELOG.md +++ b/packages/lockfile-file/CHANGELOG.md @@ -1,5 +1,11 @@ # @pnpm/lockfile-file +## 5.0.3 + +### Patch Changes + +- 52b0576af: feat: support libc filed + ## 5.0.2 ### Patch Changes diff --git a/packages/lockfile-file/package.json b/packages/lockfile-file/package.json index 4cba602c1e3..1ba661f9228 100644 --- a/packages/lockfile-file/package.json +++ b/packages/lockfile-file/package.json @@ -1,6 +1,6 @@ { "name": "@pnpm/lockfile-file", - "version": "5.0.2", + "version": "5.0.3", "description": "Read/write pnpm-lock.yaml files", "main": "lib/index.js", "types": "lib/index.d.ts", @@ -16,7 +16,8 @@ "_test": "jest", "test": "pnpm run compile && pnpm run _test", "prepublishOnly": "pnpm run compile", - "compile": "tsc --build && pnpm run lint --fix" + "compile": "tsc --build && pnpm run lint --fix", + "start": "tsc --watch" }, "repository": "https://github.com/pnpm/pnpm/blob/main/packages/lockfile-file", "keywords": [ @@ -34,7 +35,7 @@ "@pnpm/logger": "^4.0.0" }, "devDependencies": { - "@pnpm/lockfile-file": "workspace:5.0.2", + "@pnpm/lockfile-file": "workspace:5.0.3", "@pnpm/logger": "^4.0.0", "@types/js-yaml": "^4.0.0", "@types/normalize-path": "^3.0.0", @@ -53,7 +54,7 @@ "@pnpm/types": "workspace:8.0.1", "@zkochan/rimraf": "^2.1.2", "comver-to-semver": "^1.0.0", - "js-yaml": "npm:@zkochan/js-yaml@0.0.5", + "js-yaml": "npm:@zkochan/js-yaml@0.0.6", "normalize-path": "^3.0.0", "ramda": "^0.27.1", "semver": "^7.3.4", diff --git a/packages/lockfile-file/src/sortLockfileKeys.ts b/packages/lockfile-file/src/sortLockfileKeys.ts index ea5533e7b13..15e65b7c073 100644 --- a/packages/lockfile-file/src/sortLockfileKeys.ts +++ b/packages/lockfile-file/src/sortLockfileKeys.ts @@ -11,22 +11,23 @@ const ORDERED_KEYS = { engines: 5, cpu: 6, os: 7, + libc: 8, - deprecated: 8, - hasBin: 9, - prepare: 10, - requiresBuild: 11, + deprecated: 9, + hasBin: 10, + prepare: 11, + requiresBuild: 12, - bundleDependencies: 12, - peerDependencies: 13, - peerDependenciesMeta: 14, + bundleDependencies: 13, + peerDependencies: 14, + peerDependenciesMeta: 15, - dependencies: 15, - optionalDependencies: 16, + dependencies: 16, + optionalDependencies: 17, - transitivePeerDependencies: 17, - dev: 18, - optional: 19, + transitivePeerDependencies: 18, + dev: 19, + optional: 20, } const ROOT_KEYS_ORDER = { diff --git a/packages/lockfile-file/test/__snapshots__/write.test.ts.snap b/packages/lockfile-file/test/__snapshots__/write.test.ts.snap index 8219b4f0458..a2bb8ce94e4 100644 --- a/packages/lockfile-file/test/__snapshots__/write.test.ts.snap +++ b/packages/lockfile-file/test/__snapshots__/write.test.ts.snap @@ -18,6 +18,7 @@ packages: engines: {node: '>=10', npm: \\"\\\\nfoo\\\\n\\"} cpu: [x86] os: [darwin] + libc: [glibc] dependencies: is-positive: 2.0.0 diff --git a/packages/lockfile-file/test/write.test.ts b/packages/lockfile-file/test/write.test.ts index 4b256fec55b..b25fcda23aa 100644 --- a/packages/lockfile-file/test/write.test.ts +++ b/packages/lockfile-file/test/write.test.ts @@ -32,6 +32,7 @@ test('writeLockfiles()', async () => { 'is-positive': '2.0.0', }, cpu: ['x86'], + libc: ['glibc'], engines: { node: '>=10', npm: '\nfoo\n', diff --git a/packages/lockfile-to-pnp/CHANGELOG.md b/packages/lockfile-to-pnp/CHANGELOG.md index 902177d9159..0fb4b211acd 100644 --- a/packages/lockfile-to-pnp/CHANGELOG.md +++ b/packages/lockfile-to-pnp/CHANGELOG.md @@ -1,5 +1,12 @@ # @pnpm/lockfile-to-pnp +## 0.5.4 + +### Patch Changes + +- Updated dependencies [52b0576af] + - @pnpm/lockfile-file@5.0.3 + ## 0.5.3 ### Patch Changes diff --git a/packages/lockfile-to-pnp/package.json b/packages/lockfile-to-pnp/package.json index b8ac1ae9d53..3e67a550b7e 100644 --- a/packages/lockfile-to-pnp/package.json +++ b/packages/lockfile-to-pnp/package.json @@ -1,6 +1,6 @@ { "name": "@pnpm/lockfile-to-pnp", - "version": "0.5.3", + "version": "0.5.4", "description": "Creates a Plug'n'Play file from a pnpm-lock.yaml", "main": "lib/index.js", "types": "lib/index.d.ts", @@ -34,7 +34,7 @@ "@pnpm/logger": "^4.0.0" }, "devDependencies": { - "@pnpm/lockfile-to-pnp": "workspace:0.5.3", + "@pnpm/lockfile-to-pnp": "workspace:0.5.4", "@pnpm/logger": "^4.0.0", "@types/normalize-path": "^3.0.0", "@types/ramda": "0.27.39", @@ -42,7 +42,7 @@ }, "dependencies": { "@pnpm/config": "workspace:15.1.1", - "@pnpm/lockfile-file": "workspace:5.0.2", + "@pnpm/lockfile-file": "workspace:5.0.3", "@pnpm/lockfile-utils": "workspace:4.0.2", "@pnpm/read-project-manifest": "workspace:3.0.2", "@pnpm/types": "workspace:8.0.1", diff --git a/packages/lockfile-types/src/index.ts b/packages/lockfile-types/src/index.ts index 92c6d14a90f..832d7c03e99 100644 --- a/packages/lockfile-types/src/index.ts +++ b/packages/lockfile-types/src/index.ts @@ -90,6 +90,7 @@ export interface PackageSnapshot { } os?: string[] cpu?: string[] + libc?: string[] deprecated?: string } diff --git a/packages/make-dedicated-lockfile/CHANGELOG.md b/packages/make-dedicated-lockfile/CHANGELOG.md index 9c59282a99c..756286ff261 100644 --- a/packages/make-dedicated-lockfile/CHANGELOG.md +++ b/packages/make-dedicated-lockfile/CHANGELOG.md @@ -1,5 +1,12 @@ # @pnpm/make-dedicated-lockfile +## 0.3.3 + +### Patch Changes + +- Updated dependencies [52b0576af] + - @pnpm/lockfile-file@5.0.3 + ## 0.3.2 ### Patch Changes diff --git a/packages/make-dedicated-lockfile/package.json b/packages/make-dedicated-lockfile/package.json index b91d36ac022..6ddf2530792 100644 --- a/packages/make-dedicated-lockfile/package.json +++ b/packages/make-dedicated-lockfile/package.json @@ -1,6 +1,6 @@ { "name": "@pnpm/make-dedicated-lockfile", - "version": "0.3.2", + "version": "0.3.3", "description": "Creates a dedicated lockfile for a subset of workspace projects", "main": "lib/index.js", "types": "lib/index.d.ts", @@ -36,7 +36,7 @@ "@pnpm/exec": "^2.0.0", "@pnpm/exportable-manifest": "workspace:3.0.2", "@pnpm/find-workspace-dir": "workspace:4.0.1", - "@pnpm/lockfile-file": "workspace:5.0.2", + "@pnpm/lockfile-file": "workspace:5.0.3", "@pnpm/logger": "^4.0.0", "@pnpm/prune-lockfile": "workspace:4.0.2", "@pnpm/read-project-manifest": "workspace:3.0.2", @@ -46,7 +46,7 @@ }, "funding": "https://opencollective.com/pnpm", "devDependencies": { - "@pnpm/make-dedicated-lockfile": "workspace:0.3.2", + "@pnpm/make-dedicated-lockfile": "workspace:0.3.3", "@pnpm/test-fixtures": "workspace:*", "@types/ramda": "0.27.39" }, diff --git a/packages/modules-cleaner/CHANGELOG.md b/packages/modules-cleaner/CHANGELOG.md index 17fc4facff6..759eea092ca 100644 --- a/packages/modules-cleaner/CHANGELOG.md +++ b/packages/modules-cleaner/CHANGELOG.md @@ -1,5 +1,12 @@ # @pnpm/modules-cleaner +## 12.0.4 + +### Patch Changes + +- Updated dependencies [52b0576af] + - @pnpm/filter-lockfile@6.0.3 + ## 12.0.3 ### Patch Changes diff --git a/packages/modules-cleaner/package.json b/packages/modules-cleaner/package.json index 8c85416401d..a7d1ff70e31 100644 --- a/packages/modules-cleaner/package.json +++ b/packages/modules-cleaner/package.json @@ -1,6 +1,6 @@ { "name": "@pnpm/modules-cleaner", - "version": "12.0.3", + "version": "12.0.4", "description": "Exports util functions to clean up node_modules", "main": "lib/index.js", "types": "lib/index.d.ts", @@ -29,7 +29,7 @@ }, "dependencies": { "@pnpm/core-loggers": "workspace:7.0.1", - "@pnpm/filter-lockfile": "workspace:6.0.2", + "@pnpm/filter-lockfile": "workspace:6.0.3", "@pnpm/lockfile-types": "workspace:4.0.1", "@pnpm/lockfile-utils": "workspace:4.0.2", "@pnpm/read-modules-dir": "workspace:4.0.0", @@ -42,7 +42,7 @@ }, "devDependencies": { "@pnpm/logger": "^4.0.0", - "@pnpm/modules-cleaner": "workspace:12.0.3", + "@pnpm/modules-cleaner": "workspace:12.0.4", "@types/ramda": "0.27.39" }, "bugs": { diff --git a/packages/mount-modules/CHANGELOG.md b/packages/mount-modules/CHANGELOG.md index 4cb884c7b5f..b81f1074155 100644 --- a/packages/mount-modules/CHANGELOG.md +++ b/packages/mount-modules/CHANGELOG.md @@ -1,5 +1,12 @@ # @pnpm/mount-modules +## 0.2.5 + +### Patch Changes + +- Updated dependencies [52b0576af] + - @pnpm/lockfile-file@5.0.3 + ## 0.2.4 ### Patch Changes diff --git a/packages/mount-modules/package.json b/packages/mount-modules/package.json index a5205783f0b..3350ebc9632 100644 --- a/packages/mount-modules/package.json +++ b/packages/mount-modules/package.json @@ -1,6 +1,6 @@ { "name": "@pnpm/mount-modules", - "version": "0.2.4", + "version": "0.2.5", "description": "Mounts a node_modules directory with FUSE", "main": "lib/index.js", "bin": "bin/mount-modules.js", @@ -38,14 +38,14 @@ }, "devDependencies": { "@pnpm/logger": "^4.0.0", - "@pnpm/mount-modules": "workspace:0.2.4", + "@pnpm/mount-modules": "workspace:0.2.5", "@types/normalize-path": "^3.0.0", "rimraf": "^3.0.2" }, "dependencies": { "@pnpm/cafs": "workspace:4.0.2", "@pnpm/config": "workspace:15.1.1", - "@pnpm/lockfile-file": "workspace:5.0.2", + "@pnpm/lockfile-file": "workspace:5.0.3", "@pnpm/lockfile-utils": "workspace:4.0.2", "@pnpm/store-path": "workspace:6.0.0", "@pnpm/types": "workspace:8.0.1", diff --git a/packages/outdated/CHANGELOG.md b/packages/outdated/CHANGELOG.md index 926a8efa2f5..98537121af5 100644 --- a/packages/outdated/CHANGELOG.md +++ b/packages/outdated/CHANGELOG.md @@ -1,5 +1,12 @@ # @pnpm/outdated +## 10.0.3 + +### Patch Changes + +- Updated dependencies [52b0576af] + - @pnpm/lockfile-file@5.0.3 + ## 10.0.2 ### Patch Changes diff --git a/packages/outdated/package.json b/packages/outdated/package.json index e6212d5b6ff..ef8ea1bd171 100644 --- a/packages/outdated/package.json +++ b/packages/outdated/package.json @@ -1,6 +1,6 @@ { "name": "@pnpm/outdated", - "version": "10.0.2", + "version": "10.0.3", "description": "Check for outdated packages", "main": "lib/index.js", "types": "lib/index.d.ts", @@ -39,7 +39,7 @@ "@pnpm/client": "workspace:7.1.1", "@pnpm/constants": "workspace:6.1.0", "@pnpm/error": "workspace:3.0.1", - "@pnpm/lockfile-file": "workspace:5.0.2", + "@pnpm/lockfile-file": "workspace:5.0.3", "@pnpm/lockfile-utils": "workspace:4.0.2", "@pnpm/manifest-utils": "workspace:3.0.2", "@pnpm/matcher": "workspace:3.0.0", @@ -52,7 +52,7 @@ }, "devDependencies": { "@pnpm/logger": "^4.0.0", - "@pnpm/outdated": "workspace:10.0.2", + "@pnpm/outdated": "workspace:10.0.3", "@types/ramda": "0.27.39", "@types/semver": "^7.3.4", "npm-run-all": "^4.1.5" diff --git a/packages/package-is-installable/CHANGELOG.md b/packages/package-is-installable/CHANGELOG.md index 6ece7801478..3e91c0aaffa 100644 --- a/packages/package-is-installable/CHANGELOG.md +++ b/packages/package-is-installable/CHANGELOG.md @@ -1,5 +1,11 @@ # @pnpm/package-is-installable +## 6.0.3 + +### Patch Changes + +- 52b0576af: feat: support libc filed + ## 6.0.2 ### Patch Changes diff --git a/packages/package-is-installable/package.json b/packages/package-is-installable/package.json index 188e7ed07b1..ede74aec5fe 100644 --- a/packages/package-is-installable/package.json +++ b/packages/package-is-installable/package.json @@ -1,6 +1,6 @@ { "name": "@pnpm/package-is-installable", - "version": "6.0.2", + "version": "6.0.3", "description": "Checks if a package is installable on the current system", "main": "lib/index.js", "types": "lib/index.d.ts", @@ -32,13 +32,14 @@ "@pnpm/core-loggers": "workspace:7.0.1", "@pnpm/error": "workspace:3.0.1", "@pnpm/types": "workspace:8.0.1", + "detect-libc": "^2.0.1", "execa": "npm:safe-execa@^0.1.1", "mem": "^8.0.0", "semver": "^7.3.4" }, "devDependencies": { "@pnpm/logger": "^4.0.0", - "@pnpm/package-is-installable": "workspace:6.0.2", + "@pnpm/package-is-installable": "workspace:6.0.3", "@types/semver": "^7.3.4" }, "bugs": { diff --git a/packages/package-is-installable/src/checkPlatform.ts b/packages/package-is-installable/src/checkPlatform.ts index 7a56d9342a5..62e59ff224c 100644 --- a/packages/package-is-installable/src/checkPlatform.ts +++ b/packages/package-is-installable/src/checkPlatform.ts @@ -1,4 +1,7 @@ import PnpmError from '@pnpm/error' +import { familySync as getLibcFamilySync } from 'detect-libc' + +const currentLibc = getLibcFamilySync() ?? 'unknown' export class UnsupportedPlatformError extends PnpmError { public wanted: WantedPlatform @@ -15,10 +18,8 @@ export default function checkPlatform ( packageId: string, wantedPlatform: WantedPlatform ) { - const platform = process.platform - const arch = process.arch - let osOk = true - let cpuOk = true + const { platform, arch } = process + let osOk = true; let cpuOk = true; let libcOk = true if (wantedPlatform.os) { osOk = checkList(platform, wantedPlatform.os) @@ -26,8 +27,12 @@ export default function checkPlatform ( if (wantedPlatform.cpu) { cpuOk = checkList(arch, wantedPlatform.cpu) } - if (!osOk || !cpuOk) { - return new UnsupportedPlatformError(packageId, wantedPlatform, { os: platform, cpu: arch }) + if (wantedPlatform.libc && currentLibc !== 'unknown') { + libcOk = checkList(currentLibc, wantedPlatform.libc) + } + + if (!osOk || !cpuOk || !libcOk) { + return new UnsupportedPlatformError(packageId, wantedPlatform, { os: platform, cpu: arch, libc: currentLibc }) } return null } @@ -35,14 +40,13 @@ export default function checkPlatform ( export interface Platform { cpu: string | string[] os: string | string[] + libc: string | string[] } export type WantedPlatform = Partial function checkList (value: string, list: string | string[]) { - let tmp - let match = false - let blc = 0 + let tmp; let match = false; let blc = 0 if (typeof list === 'string') { list = [list] } diff --git a/packages/package-is-installable/src/index.ts b/packages/package-is-installable/src/index.ts index cd537e911b0..d3a9be02165 100644 --- a/packages/package-is-installable/src/index.ts +++ b/packages/package-is-installable/src/index.ts @@ -23,6 +23,7 @@ export default function packageIsInstallable ( engines?: WantedEngine cpu?: string[] os?: string[] + libc?: string[] }, options: { engineStrict?: boolean @@ -67,6 +68,7 @@ export function checkPackage ( engines?: WantedEngine cpu?: string[] os?: string[] + libc?: string[] }, options: { nodeVersion?: string @@ -76,6 +78,7 @@ export function checkPackage ( return checkPlatform(pkgId, { cpu: manifest.cpu ?? ['any'], os: manifest.os ?? ['any'], + libc: manifest.libc ?? ['any'], }) ?? ( (manifest.engines == null) ? null diff --git a/packages/package-is-installable/test/checkPlatform.ts b/packages/package-is-installable/test/checkPlatform.ts index 2cde1292db3..0d8594bad12 100644 --- a/packages/package-is-installable/test/checkPlatform.ts +++ b/packages/package-is-installable/test/checkPlatform.ts @@ -2,10 +2,19 @@ import checkPlatform from '../lib/checkPlatform' const packageId = 'registry.npmjs.org/foo/1.0.0' +jest.mock('detect-libc', () => { + const orginal = jest.requireActual('detect-libc') + return { + ...orginal, + familySync: () => 'musl', + } +}) + test('target cpu wrong', () => { const target = { cpu: 'enten-cpu', os: 'any', + libc: 'any', } const err = checkPlatform(packageId, target) expect(err).toBeTruthy() @@ -16,6 +25,18 @@ test('os wrong', () => { const target = { cpu: 'any', os: 'enten-os', + libc: 'any', + } + const err = checkPlatform(packageId, target) + expect(err).toBeTruthy() + expect(err?.code).toBe('ERR_PNPM_UNSUPPORTED_PLATFORM') +}) + +test('libc wrong', () => { + const target = { + cpu: 'any', + os: 'any', + libc: 'enten-libc', } const err = checkPlatform(packageId, target) expect(err).toBeTruthy() @@ -26,34 +47,35 @@ test('nothing wrong', () => { const target = { cpu: 'any', os: 'any', + libc: 'any', } expect(checkPlatform(packageId, target)).toBeFalsy() }) test('only target cpu wrong', () => { - const err = checkPlatform(packageId, { cpu: 'enten-cpu', os: 'any' }) + const err = checkPlatform(packageId, { cpu: 'enten-cpu', os: 'any', libc: 'any' }) expect(err).toBeTruthy() expect(err?.code).toBe('ERR_PNPM_UNSUPPORTED_PLATFORM') }) test('only os wrong', () => { - const err = checkPlatform(packageId, { cpu: 'any', os: 'enten-os' }) + const err = checkPlatform(packageId, { cpu: 'any', os: 'enten-os', libc: 'any' }) expect(err).toBeTruthy() expect(err?.code).toBe('ERR_PNPM_UNSUPPORTED_PLATFORM') }) test('everything wrong w/arrays', () => { - const err = checkPlatform(packageId, { cpu: ['enten-cpu'], os: ['enten-os'] }) + const err = checkPlatform(packageId, { cpu: ['enten-cpu'], os: ['enten-os'], libc: ['enten-libc'] }) expect(err).toBeTruthy() expect(err?.code).toBe('ERR_PNPM_UNSUPPORTED_PLATFORM') }) test('os wrong (negation)', () => { - const err = checkPlatform(packageId, { cpu: 'any', os: `!${process.platform}` }) + const err = checkPlatform(packageId, { cpu: 'any', os: `!${process.platform}`, libc: 'any' }) expect(err).toBeTruthy() expect(err?.code).toBe('ERR_PNPM_UNSUPPORTED_PLATFORM') }) test('nothing wrong (negation)', () => { - expect(checkPlatform(packageId, { cpu: '!enten-cpu', os: '!enten-os' })).toBe(null) + expect(checkPlatform(packageId, { cpu: '!enten-cpu', os: '!enten-os', libc: '!enten-libc' })).toBe(null) }) diff --git a/packages/package-requester/CHANGELOG.md b/packages/package-requester/CHANGELOG.md index ad7baf6e60f..0e5287e2daf 100644 --- a/packages/package-requester/CHANGELOG.md +++ b/packages/package-requester/CHANGELOG.md @@ -1,5 +1,12 @@ # @pnpm/package-requester +## 18.0.4 + +### Patch Changes + +- Updated dependencies [52b0576af] + - @pnpm/package-is-installable@6.0.3 + ## 18.0.3 ### Patch Changes diff --git a/packages/package-requester/package.json b/packages/package-requester/package.json index d44d26ea5c9..038969bf5e5 100644 --- a/packages/package-requester/package.json +++ b/packages/package-requester/package.json @@ -1,6 +1,6 @@ { "name": "@pnpm/package-requester", - "version": "18.0.3", + "version": "18.0.4", "description": "Concurrent downloader of npm-compatible packages", "main": "lib/index.js", "types": "lib/index.d.ts", @@ -43,7 +43,7 @@ "@pnpm/error": "workspace:3.0.1", "@pnpm/fetcher-base": "workspace:12.0.1", "@pnpm/graceful-fs": "workspace:2.0.0", - "@pnpm/package-is-installable": "workspace:6.0.2", + "@pnpm/package-is-installable": "workspace:6.0.3", "@pnpm/read-package-json": "workspace:6.0.2", "@pnpm/resolver-base": "workspace:9.0.1", "@pnpm/store-controller-types": "workspace:13.0.1", @@ -64,7 +64,7 @@ "@pnpm/client": "workspace:7.1.1", "@pnpm/create-cafs-store": "workspace:1.0.1", "@pnpm/logger": "^4.0.0", - "@pnpm/package-requester": "workspace:18.0.3", + "@pnpm/package-requester": "workspace:18.0.4", "@pnpm/registry-mock": "2.16.0", "@pnpm/test-fixtures": "workspace:*", "@types/normalize-path": "^3.0.0", diff --git a/packages/package-store/CHANGELOG.md b/packages/package-store/CHANGELOG.md index 4e2d1bddee4..58b63ef20e9 100644 --- a/packages/package-store/CHANGELOG.md +++ b/packages/package-store/CHANGELOG.md @@ -1,5 +1,11 @@ # @pnpm/package-store +## 13.0.4 + +### Patch Changes + +- @pnpm/package-requester@18.0.4 + ## 13.0.3 ### Patch Changes diff --git a/packages/package-store/package.json b/packages/package-store/package.json index 5ea6d4c7084..eb5c42b4d7b 100644 --- a/packages/package-store/package.json +++ b/packages/package-store/package.json @@ -1,7 +1,7 @@ { "name": "@pnpm/package-store", "description": "A storage for packages", - "version": "13.0.3", + "version": "13.0.4", "bugs": { "url": "https://github.com/pnpm/pnpm/issues" }, @@ -18,7 +18,7 @@ "@pnpm/cafs": "workspace:4.0.2", "@pnpm/create-cafs-store": "workspace:1.0.1", "@pnpm/fetcher-base": "workspace:12.0.1", - "@pnpm/package-requester": "workspace:18.0.3", + "@pnpm/package-requester": "workspace:18.0.4", "@pnpm/resolver-base": "workspace:9.0.1", "@pnpm/store-controller-types": "workspace:13.0.1", "@pnpm/types": "workspace:8.0.1", @@ -31,7 +31,7 @@ "devDependencies": { "@pnpm/client": "workspace:7.1.1", "@pnpm/logger": "^4.0.0", - "@pnpm/package-store": "workspace:13.0.3", + "@pnpm/package-store": "workspace:13.0.4", "@pnpm/prepare": "workspace:*", "@types/ramda": "0.27.39", "@types/ssri": "^7.1.0", diff --git a/packages/plugin-commands-audit/CHANGELOG.md b/packages/plugin-commands-audit/CHANGELOG.md index d8346b08cc8..e66643b0a5e 100644 --- a/packages/plugin-commands-audit/CHANGELOG.md +++ b/packages/plugin-commands-audit/CHANGELOG.md @@ -1,5 +1,14 @@ # @pnpm/plugin-commands-audit +## 6.0.5 + +### Patch Changes + +- Updated dependencies [52b0576af] + - @pnpm/cli-utils@0.7.5 + - @pnpm/lockfile-file@5.0.3 + - @pnpm/audit@3.0.2 + ## 6.0.4 ### Patch Changes diff --git a/packages/plugin-commands-audit/package.json b/packages/plugin-commands-audit/package.json index bf2a6fc6386..89dddd50c7e 100644 --- a/packages/plugin-commands-audit/package.json +++ b/packages/plugin-commands-audit/package.json @@ -1,6 +1,6 @@ { "name": "@pnpm/plugin-commands-audit", - "version": "6.0.4", + "version": "6.0.5", "description": "pnpm commands for dependencies audit", "main": "lib/index.js", "types": "lib/index.d.ts", @@ -31,7 +31,7 @@ }, "homepage": "https://github.com/pnpm/pnpm/blob/main/packages/plugin-commands-audit#readme", "devDependencies": { - "@pnpm/plugin-commands-audit": "workspace:6.0.4", + "@pnpm/plugin-commands-audit": "workspace:6.0.5", "@pnpm/test-fixtures": "workspace:*", "@types/ramda": "0.27.39", "@types/zkochan__table": "npm:@types/table@6.0.0", @@ -42,11 +42,11 @@ }, "dependencies": { "@pnpm/audit": "workspace:3.0.2", - "@pnpm/cli-utils": "workspace:0.7.4", + "@pnpm/cli-utils": "workspace:0.7.5", "@pnpm/config": "workspace:15.1.1", "@pnpm/constants": "workspace:6.1.0", "@pnpm/error": "workspace:3.0.1", - "@pnpm/lockfile-file": "workspace:5.0.2", + "@pnpm/lockfile-file": "workspace:5.0.3", "@pnpm/read-project-manifest": "workspace:3.0.2", "@pnpm/types": "workspace:8.0.1", "@zkochan/table": "^1.0.0", diff --git a/packages/plugin-commands-env/CHANGELOG.md b/packages/plugin-commands-env/CHANGELOG.md index dfbf6a2c7e6..5028a0ee54c 100644 --- a/packages/plugin-commands-env/CHANGELOG.md +++ b/packages/plugin-commands-env/CHANGELOG.md @@ -1,5 +1,12 @@ # @pnpm/plugin-commands-env +## 2.1.4 + +### Patch Changes + +- Updated dependencies [52b0576af] + - @pnpm/cli-utils@0.7.5 + ## 2.1.3 ### Patch Changes diff --git a/packages/plugin-commands-env/package.json b/packages/plugin-commands-env/package.json index b730581b7a2..0f817ea1515 100644 --- a/packages/plugin-commands-env/package.json +++ b/packages/plugin-commands-env/package.json @@ -1,6 +1,6 @@ { "name": "@pnpm/plugin-commands-env", - "version": "2.1.3", + "version": "2.1.4", "description": "pnpm commands for managing Node.js", "main": "lib/index.js", "types": "lib/index.d.ts", @@ -30,7 +30,7 @@ }, "homepage": "https://github.com/pnpm/pnpm/blob/main/packages/plugin-commands-env#readme", "dependencies": { - "@pnpm/cli-utils": "workspace:0.7.4", + "@pnpm/cli-utils": "workspace:0.7.5", "@pnpm/config": "workspace:15.1.1", "@pnpm/error": "workspace:3.0.1", "@pnpm/fetch": "workspace:5.0.1", @@ -50,7 +50,7 @@ }, "funding": "https://opencollective.com/pnpm", "devDependencies": { - "@pnpm/plugin-commands-env": "workspace:2.1.3", + "@pnpm/plugin-commands-env": "workspace:2.1.4", "@pnpm/prepare": "workspace:*", "@types/adm-zip": "^0.4.34", "@types/semver": "^7.3.4", diff --git a/packages/plugin-commands-init/CHANGELOG.md b/packages/plugin-commands-init/CHANGELOG.md index 9f80397ddc3..25da8253161 100644 --- a/packages/plugin-commands-init/CHANGELOG.md +++ b/packages/plugin-commands-init/CHANGELOG.md @@ -1,5 +1,12 @@ # @pnpm/plugin-commands-init +## 1.0.5 + +### Patch Changes + +- Updated dependencies [52b0576af] + - @pnpm/cli-utils@0.7.5 + ## 1.0.4 ### Patch Changes diff --git a/packages/plugin-commands-init/package.json b/packages/plugin-commands-init/package.json index 90a4e3ec10e..fc6ef15b223 100644 --- a/packages/plugin-commands-init/package.json +++ b/packages/plugin-commands-init/package.json @@ -1,6 +1,6 @@ { "name": "@pnpm/plugin-commands-init", - "version": "1.0.4", + "version": "1.0.5", "description": "Create a package.json file", "main": "lib/index.js", "types": "lib/index.d.ts", @@ -31,13 +31,13 @@ }, "homepage": "https://github.com/pnpm/pnpm/blob/main/packages/plugin-commands-init#readme", "devDependencies": { - "@pnpm/plugin-commands-init": "workspace:1.0.4", + "@pnpm/plugin-commands-init": "workspace:1.0.5", "@pnpm/prepare": "workspace:*", "@pnpm/test-fixtures": "workspace:*", "load-json-file": "^6.2.0" }, "dependencies": { - "@pnpm/cli-utils": "workspace:0.7.4", + "@pnpm/cli-utils": "workspace:0.7.5", "@pnpm/config": "workspace:15.1.1", "@pnpm/error": "workspace:3.0.1", "@pnpm/write-project-manifest": "workspace:3.0.1", diff --git a/packages/plugin-commands-installation/CHANGELOG.md b/packages/plugin-commands-installation/CHANGELOG.md index b4be2748210..ed8cbed8646 100644 --- a/packages/plugin-commands-installation/CHANGELOG.md +++ b/packages/plugin-commands-installation/CHANGELOG.md @@ -1,5 +1,19 @@ # @pnpm/plugin-commands-installation +## 10.0.5 + +### Patch Changes + +- Updated dependencies [52b0576af] + - @pnpm/cli-utils@0.7.5 + - @pnpm/find-workspace-packages@4.0.5 + - @pnpm/plugin-commands-rebuild@6.1.4 + - @pnpm/core@5.1.1 + - @pnpm/outdated@10.0.3 + - @pnpm/filter-workspace-packages@5.0.5 + - @pnpm/package-store@13.0.4 + - @pnpm/store-connection-manager@4.1.4 + ## 10.0.4 ### Patch Changes diff --git a/packages/plugin-commands-installation/package.json b/packages/plugin-commands-installation/package.json index e5b854d7f58..7fadf89e70e 100644 --- a/packages/plugin-commands-installation/package.json +++ b/packages/plugin-commands-installation/package.json @@ -1,6 +1,6 @@ { "name": "@pnpm/plugin-commands-installation", - "version": "10.0.4", + "version": "10.0.5", "description": "Commands for installation", "main": "lib/index.js", "types": "lib/index.d.ts", @@ -37,7 +37,7 @@ "@pnpm/lockfile-types": "workspace:4.0.1", "@pnpm/logger": "^4.0.0", "@pnpm/modules-yaml": "workspace:10.0.1", - "@pnpm/plugin-commands-installation": "workspace:10.0.4", + "@pnpm/plugin-commands-installation": "workspace:10.0.5", "@pnpm/prepare": "workspace:*", "@pnpm/registry-mock": "2.16.0", "@pnpm/test-fixtures": "workspace:*", @@ -58,30 +58,30 @@ "write-yaml-file": "^4.2.0" }, "dependencies": { - "@pnpm/cli-utils": "workspace:0.7.4", + "@pnpm/cli-utils": "workspace:0.7.5", "@pnpm/colorize-semver-diff": "^1.0.1", "@pnpm/command": "workspace:3.0.0", "@pnpm/common-cli-options-help": "workspace:0.9.0", "@pnpm/config": "workspace:15.1.1", "@pnpm/constants": "workspace:6.1.0", - "@pnpm/core": "workspace:5.1.0", + "@pnpm/core": "workspace:5.1.1", "@pnpm/error": "workspace:3.0.1", - "@pnpm/filter-workspace-packages": "workspace:5.0.4", + "@pnpm/filter-workspace-packages": "workspace:5.0.5", "@pnpm/find-workspace-dir": "workspace:4.0.1", - "@pnpm/find-workspace-packages": "workspace:4.0.4", + "@pnpm/find-workspace-packages": "workspace:4.0.5", "@pnpm/graceful-fs": "workspace:2.0.0", "@pnpm/manifest-utils": "workspace:3.0.2", "@pnpm/matcher": "workspace:3.0.0", - "@pnpm/outdated": "workspace:10.0.2", - "@pnpm/package-store": "workspace:13.0.3", + "@pnpm/outdated": "workspace:10.0.3", + "@pnpm/package-store": "workspace:13.0.4", "@pnpm/parse-wanted-dependency": "workspace:3.0.0", - "@pnpm/plugin-commands-rebuild": "workspace:6.1.3", + "@pnpm/plugin-commands-rebuild": "workspace:6.1.4", "@pnpm/pnpmfile": "workspace:2.0.2", "@pnpm/read-project-manifest": "workspace:3.0.2", "@pnpm/resolver-base": "workspace:9.0.1", "@pnpm/semver-diff": "^1.0.2", "@pnpm/sort-packages": "workspace:3.0.2", - "@pnpm/store-connection-manager": "workspace:4.1.3", + "@pnpm/store-connection-manager": "workspace:4.1.4", "@pnpm/types": "workspace:8.0.1", "@yarnpkg/core": "3.2.0", "@yarnpkg/lockfile": "^1.1.0", diff --git a/packages/plugin-commands-listing/CHANGELOG.md b/packages/plugin-commands-listing/CHANGELOG.md index eca3e584bcf..6b3cfcbfeed 100644 --- a/packages/plugin-commands-listing/CHANGELOG.md +++ b/packages/plugin-commands-listing/CHANGELOG.md @@ -1,5 +1,13 @@ # @pnpm/plugin-commands-listing +## 5.0.5 + +### Patch Changes + +- Updated dependencies [52b0576af] + - @pnpm/cli-utils@0.7.5 + - @pnpm/list@7.0.3 + ## 5.0.4 ### Patch Changes diff --git a/packages/plugin-commands-listing/package.json b/packages/plugin-commands-listing/package.json index 98122f157c2..31712269c74 100644 --- a/packages/plugin-commands-listing/package.json +++ b/packages/plugin-commands-listing/package.json @@ -1,6 +1,6 @@ { "name": "@pnpm/plugin-commands-listing", - "version": "5.0.4", + "version": "5.0.5", "description": "The list and why commands of pnpm", "main": "lib/index.js", "types": "lib/index.d.ts", @@ -33,10 +33,10 @@ "homepage": "https://github.com/pnpm/pnpm/blob/main/packages/plugin-commands-listing#readme", "devDependencies": { "@pnpm/constants": "workspace:6.1.0", - "@pnpm/filter-workspace-packages": "workspace:5.0.4", + "@pnpm/filter-workspace-packages": "workspace:5.0.5", "@pnpm/logger": "^4.0.0", - "@pnpm/plugin-commands-installation": "workspace:10.0.4", - "@pnpm/plugin-commands-listing": "workspace:5.0.4", + "@pnpm/plugin-commands-installation": "workspace:10.0.5", + "@pnpm/plugin-commands-listing": "workspace:5.0.5", "@pnpm/prepare": "workspace:*", "@pnpm/registry-mock": "2.16.0", "@types/ramda": "0.27.39", @@ -45,11 +45,11 @@ "write-yaml-file": "^4.2.0" }, "dependencies": { - "@pnpm/cli-utils": "workspace:0.7.4", + "@pnpm/cli-utils": "workspace:0.7.5", "@pnpm/common-cli-options-help": "workspace:0.9.0", "@pnpm/config": "workspace:15.1.1", "@pnpm/error": "workspace:3.0.1", - "@pnpm/list": "workspace:7.0.2", + "@pnpm/list": "workspace:7.0.3", "@pnpm/types": "workspace:8.0.1", "ramda": "^0.27.1", "render-help": "^1.0.1" diff --git a/packages/plugin-commands-outdated/CHANGELOG.md b/packages/plugin-commands-outdated/CHANGELOG.md index a9ab71eb2b2..a3cbb2ffc35 100644 --- a/packages/plugin-commands-outdated/CHANGELOG.md +++ b/packages/plugin-commands-outdated/CHANGELOG.md @@ -1,5 +1,14 @@ # @pnpm/plugin-commands-outdated +## 6.0.5 + +### Patch Changes + +- Updated dependencies [52b0576af] + - @pnpm/cli-utils@0.7.5 + - @pnpm/lockfile-file@5.0.3 + - @pnpm/outdated@10.0.3 + ## 6.0.4 ### Patch Changes diff --git a/packages/plugin-commands-outdated/package.json b/packages/plugin-commands-outdated/package.json index f8ae03d9ba6..dad8c42f425 100644 --- a/packages/plugin-commands-outdated/package.json +++ b/packages/plugin-commands-outdated/package.json @@ -1,6 +1,6 @@ { "name": "@pnpm/plugin-commands-outdated", - "version": "6.0.4", + "version": "6.0.5", "description": "The outdated command of pnpm", "main": "lib/index.js", "types": "lib/index.d.ts", @@ -34,9 +34,9 @@ "homepage": "https://github.com/pnpm/pnpm/blob/main/packages/plugin-commands-outdated#readme", "devDependencies": { "@pnpm/constants": "workspace:6.1.0", - "@pnpm/filter-workspace-packages": "workspace:5.0.4", - "@pnpm/plugin-commands-installation": "workspace:10.0.4", - "@pnpm/plugin-commands-outdated": "workspace:6.0.4", + "@pnpm/filter-workspace-packages": "workspace:5.0.5", + "@pnpm/plugin-commands-installation": "workspace:10.0.5", + "@pnpm/plugin-commands-outdated": "workspace:6.0.5", "@pnpm/prepare": "workspace:*", "@pnpm/registry-mock": "2.16.0", "@types/lru-cache": "^5.1.0", @@ -45,17 +45,17 @@ "@types/zkochan__table": "npm:@types/table@6.0.0" }, "dependencies": { - "@pnpm/cli-utils": "workspace:0.7.4", + "@pnpm/cli-utils": "workspace:0.7.5", "@pnpm/colorize-semver-diff": "^1.0.1", "@pnpm/command": "workspace:3.0.0", "@pnpm/common-cli-options-help": "workspace:0.9.0", "@pnpm/config": "workspace:15.1.1", "@pnpm/default-resolver": "workspace:15.0.2", "@pnpm/error": "workspace:3.0.1", - "@pnpm/lockfile-file": "workspace:5.0.2", + "@pnpm/lockfile-file": "workspace:5.0.3", "@pnpm/matcher": "workspace:3.0.0", "@pnpm/modules-yaml": "workspace:10.0.1", - "@pnpm/outdated": "workspace:10.0.2", + "@pnpm/outdated": "workspace:10.0.3", "@pnpm/semver-diff": "^1.0.2", "@pnpm/store-path": "workspace:6.0.0", "@pnpm/types": "workspace:8.0.1", diff --git a/packages/plugin-commands-publishing/CHANGELOG.md b/packages/plugin-commands-publishing/CHANGELOG.md index f6cce71ef1c..92b2a4d16aa 100644 --- a/packages/plugin-commands-publishing/CHANGELOG.md +++ b/packages/plugin-commands-publishing/CHANGELOG.md @@ -1,5 +1,12 @@ # @pnpm/plugin-commands-publishing +## 5.0.6 + +### Patch Changes + +- Updated dependencies [52b0576af] + - @pnpm/cli-utils@0.7.5 + ## 5.0.5 ### Patch Changes diff --git a/packages/plugin-commands-publishing/package.json b/packages/plugin-commands-publishing/package.json index d8402a9f26f..b9b14f121ad 100644 --- a/packages/plugin-commands-publishing/package.json +++ b/packages/plugin-commands-publishing/package.json @@ -1,6 +1,6 @@ { "name": "@pnpm/plugin-commands-publishing", - "version": "5.0.5", + "version": "5.0.6", "description": "The pack and publish commands of pnpm", "main": "lib/index.js", "types": "lib/index.d.ts", @@ -35,9 +35,9 @@ }, "homepage": "https://github.com/pnpm/pnpm/blob/main/packages/plugin-commands-publishing#readme", "devDependencies": { - "@pnpm/filter-workspace-packages": "workspace:5.0.4", + "@pnpm/filter-workspace-packages": "workspace:5.0.5", "@pnpm/logger": "^4.0.0", - "@pnpm/plugin-commands-publishing": "workspace:5.0.5", + "@pnpm/plugin-commands-publishing": "workspace:5.0.6", "@pnpm/prepare": "workspace:*", "@pnpm/registry-mock": "2.16.0", "@types/cross-spawn": "^6.0.2", @@ -58,7 +58,7 @@ "write-yaml-file": "^4.2.0" }, "dependencies": { - "@pnpm/cli-utils": "workspace:0.7.4", + "@pnpm/cli-utils": "workspace:0.7.5", "@pnpm/client": "workspace:7.1.1", "@pnpm/config": "workspace:15.1.1", "@pnpm/error": "workspace:3.0.1", diff --git a/packages/plugin-commands-rebuild/CHANGELOG.md b/packages/plugin-commands-rebuild/CHANGELOG.md index 7d5c61b1b2a..fe6c344dc1e 100644 --- a/packages/plugin-commands-rebuild/CHANGELOG.md +++ b/packages/plugin-commands-rebuild/CHANGELOG.md @@ -1,5 +1,15 @@ # @pnpm/plugin-commands-rebuild +## 6.1.4 + +### Patch Changes + +- Updated dependencies [52b0576af] + - @pnpm/cli-utils@0.7.5 + - @pnpm/find-workspace-packages@4.0.5 + - @pnpm/get-context@6.1.2 + - @pnpm/store-connection-manager@4.1.4 + ## 6.1.3 ### Patch Changes diff --git a/packages/plugin-commands-rebuild/package.json b/packages/plugin-commands-rebuild/package.json index 40aaf2f2ec9..a712f4ac4af 100644 --- a/packages/plugin-commands-rebuild/package.json +++ b/packages/plugin-commands-rebuild/package.json @@ -1,6 +1,6 @@ { "name": "@pnpm/plugin-commands-rebuild", - "version": "6.1.3", + "version": "6.1.4", "description": "Commands for rebuilding dependencies", "main": "lib/index.js", "types": "lib/index.d.ts", @@ -33,9 +33,9 @@ }, "homepage": "https://github.com/pnpm/pnpm/blob/main/packages/plugin-commands-rebuild#readme", "devDependencies": { - "@pnpm/filter-workspace-packages": "workspace:5.0.4", + "@pnpm/filter-workspace-packages": "workspace:5.0.5", "@pnpm/logger": "^4.0.0", - "@pnpm/plugin-commands-rebuild": "workspace:6.1.3", + "@pnpm/plugin-commands-rebuild": "workspace:6.1.4", "@pnpm/prepare": "workspace:*", "@pnpm/registry-mock": "2.16.0", "@pnpm/test-fixtures": "workspace:*", @@ -48,13 +48,13 @@ "write-yaml-file": "^4.2.0" }, "dependencies": { - "@pnpm/cli-utils": "workspace:0.7.4", + "@pnpm/cli-utils": "workspace:0.7.5", "@pnpm/common-cli-options-help": "workspace:0.9.0", "@pnpm/config": "workspace:15.1.1", "@pnpm/constants": "workspace:6.1.0", "@pnpm/core-loggers": "workspace:7.0.1", - "@pnpm/find-workspace-packages": "workspace:4.0.4", - "@pnpm/get-context": "workspace:6.1.1", + "@pnpm/find-workspace-packages": "workspace:4.0.5", + "@pnpm/get-context": "workspace:6.1.2", "@pnpm/graph-sequencer": "1.0.0", "@pnpm/lifecycle": "workspace:13.0.2", "@pnpm/link-bins": "workspace:7.1.1", @@ -63,7 +63,7 @@ "@pnpm/modules-yaml": "workspace:10.0.1", "@pnpm/normalize-registries": "workspace:3.0.1", "@pnpm/sort-packages": "workspace:3.0.2", - "@pnpm/store-connection-manager": "workspace:4.1.3", + "@pnpm/store-connection-manager": "workspace:4.1.4", "@pnpm/store-controller-types": "workspace:13.0.1", "@pnpm/types": "workspace:8.0.1", "@zkochan/npm-package-arg": "^2.0.1", diff --git a/packages/plugin-commands-script-runners/CHANGELOG.md b/packages/plugin-commands-script-runners/CHANGELOG.md index b9010ee866a..8af2b21aff7 100644 --- a/packages/plugin-commands-script-runners/CHANGELOG.md +++ b/packages/plugin-commands-script-runners/CHANGELOG.md @@ -1,5 +1,15 @@ # @pnpm/plugin-commands-script-runners +## 5.0.5 + +### Patch Changes + +- 53f653340: `pnpm dlx` should work with git-hosted packages. For example: `pnpm dlx gengjiawen/envinfo` [#4714](https://github.com/pnpm/pnpm/issues/4714). +- 325ed5cba: fix(plugin-commands-script-runner): run --stream should prefix with dir name +- Updated dependencies [52b0576af] + - @pnpm/cli-utils@0.7.5 + - @pnpm/plugin-commands-installation@10.0.5 + ## 5.0.4 ### Patch Changes diff --git a/packages/plugin-commands-script-runners/package.json b/packages/plugin-commands-script-runners/package.json index b3aea858f59..2b20811d8b8 100644 --- a/packages/plugin-commands-script-runners/package.json +++ b/packages/plugin-commands-script-runners/package.json @@ -1,6 +1,6 @@ { "name": "@pnpm/plugin-commands-script-runners", - "version": "5.0.4", + "version": "5.0.5", "description": "Commands for running scripts", "main": "lib/index.js", "types": "lib/index.d.ts", @@ -34,9 +34,9 @@ }, "homepage": "https://github.com/pnpm/pnpm/blob/main/packages/plugin-commands-script-runners#readme", "devDependencies": { - "@pnpm/filter-workspace-packages": "workspace:5.0.4", + "@pnpm/filter-workspace-packages": "workspace:5.0.5", "@pnpm/logger": "^4.0.0", - "@pnpm/plugin-commands-script-runners": "workspace:5.0.4", + "@pnpm/plugin-commands-script-runners": "workspace:5.0.5", "@pnpm/prepare": "workspace:*", "@pnpm/registry-mock": "2.16.0", "@types/is-windows": "^1.0.0", @@ -45,14 +45,14 @@ "write-yaml-file": "^4.2.0" }, "dependencies": { - "@pnpm/cli-utils": "workspace:0.7.4", + "@pnpm/cli-utils": "workspace:0.7.5", "@pnpm/command": "workspace:3.0.0", "@pnpm/common-cli-options-help": "workspace:0.9.0", "@pnpm/config": "workspace:15.1.1", "@pnpm/error": "workspace:3.0.1", "@pnpm/lifecycle": "workspace:13.0.2", "@pnpm/package-bins": "workspace:6.0.1", - "@pnpm/plugin-commands-installation": "workspace:10.0.4", + "@pnpm/plugin-commands-installation": "workspace:10.0.5", "@pnpm/read-package-json": "workspace:6.0.2", "@pnpm/read-project-manifest": "workspace:3.0.2", "@pnpm/sort-packages": "workspace:3.0.2", diff --git a/packages/plugin-commands-script-runners/src/dlx.ts b/packages/plugin-commands-script-runners/src/dlx.ts index dc717efaca8..822cd0694c5 100644 --- a/packages/plugin-commands-script-runners/src/dlx.ts +++ b/packages/plugin-commands-script-runners/src/dlx.ts @@ -77,13 +77,18 @@ export async function handler ( }, pkgs) const binName = opts.package ? command - : await getBinName(modulesDir, versionless(command)) + : await getBinName(modulesDir, await getPkgName(prefix)) await execa(binName, args, { env, stdio: 'inherit', }) } +async function getPkgName (pkgDir: string) { + const manifest = await readPkgFromDir(pkgDir) + return Object.keys(manifest.dependencies ?? {})[0] +} + async function getBinName (modulesDir: string, pkgName: string): Promise { const pkgDir = path.join(modulesDir, pkgName) const manifest = await readPkgFromDir(pkgDir) @@ -112,12 +117,6 @@ function scopeless (pkgName: string) { return pkgName } -function versionless (pkgName: string) { - const index = pkgName.indexOf('@', 1) - if (index === -1) return pkgName - return pkgName.substring(0, index) -} - async function getDlxDir ( opts: { dir: string diff --git a/packages/plugin-commands-script-runners/src/runRecursive.ts b/packages/plugin-commands-script-runners/src/runRecursive.ts index d3718f8145b..6122028888f 100644 --- a/packages/plugin-commands-script-runners/src/runRecursive.ts +++ b/packages/plugin-commands-script-runners/src/runRecursive.ts @@ -19,6 +19,7 @@ export type RecursiveRunOpts = Pick & Required> & Partial> & { @@ -46,12 +47,12 @@ export default async ( } as RecursiveSummary const limitRun = pLimit(opts.workspaceConcurrency ?? 4) - const stdio = ( - opts.workspaceConcurrency === 1 || - packageChunks.length === 1 && packageChunks[0].length === 1 - ) - ? 'inherit' - : 'pipe' + const stdio = + !opts.stream && + (opts.workspaceConcurrency === 1 || + (packageChunks.length === 1 && packageChunks[0].length === 1)) + ? 'inherit' + : 'pipe' const existsPnp = existsInDir.bind(null, '.pnp.cjs') const workspacePnpPath = opts.workspaceDir && await existsPnp(opts.workspaceDir) diff --git a/packages/plugin-commands-script-runners/test/dlx.e2e.ts b/packages/plugin-commands-script-runners/test/dlx.e2e.ts index 30d98724713..60e7aa097b7 100644 --- a/packages/plugin-commands-script-runners/test/dlx.e2e.ts +++ b/packages/plugin-commands-script-runners/test/dlx.e2e.ts @@ -1,4 +1,5 @@ import fs from 'fs' +import path from 'path' import { dlx } from '@pnpm/plugin-commands-script-runners' import { prepareEmpty } from '@pnpm/prepare' import { DLX_DEFAULT_OPTS as DEFAULT_OPTS } from './utils' @@ -8,18 +9,31 @@ test('dlx', async () => { await dlx.handler({ ...DEFAULT_OPTS, - dir: process.cwd(), + dir: path.resolve('project'), + storeDir: path.resolve('store'), }, ['shx', 'touch', 'foo']) expect(fs.existsSync('foo')).toBeTruthy() }) -test('dlx should work when the package name differs from the bin name', async () => { +test('dlx install from git', async () => { prepareEmpty() await dlx.handler({ ...DEFAULT_OPTS, dir: process.cwd(), + }, ['shelljs/shx#61aca968cd7afc712ca61a4fc4ec3201e3770dc7', 'touch', 'foo']) + + expect(fs.existsSync('foo')).toBeTruthy() +}) + +test('dlx should work when the package name differs from the bin name', async () => { + prepareEmpty() + + await dlx.handler({ + ...DEFAULT_OPTS, + dir: path.resolve('project'), + storeDir: path.resolve('store'), }, ['touch-file-one-bin']) expect(fs.existsSync('touch.txt')).toBeTruthy() @@ -31,7 +45,8 @@ test('dlx should fail when the installed package has many commands and none equa await expect( dlx.handler({ ...DEFAULT_OPTS, - dir: process.cwd(), + dir: path.resolve('project'), + storeDir: path.resolve('store'), }, ['touch-file-many-bins']) ).rejects.toThrow('Could not determine executable to run. touch-file-many-bins has multiple binaries: t, tt') }) @@ -41,7 +56,8 @@ test('dlx should not fail when the installed package has many commands and one e await dlx.handler({ ...DEFAULT_OPTS, - dir: process.cwd(), + dir: path.resolve('project'), + storeDir: path.resolve('store'), }, ['touch-file-good-bin-name']) expect(fs.existsSync('touch.txt')).toBeTruthy() @@ -52,7 +68,8 @@ test('dlx --package [--package ]', async () => { await dlx.handler({ ...DEFAULT_OPTS, - dir: process.cwd(), + dir: path.resolve('project'), + storeDir: path.resolve('store'), package: [ 'zkochan/for-testing-pnpm-dlx', 'is-positive', @@ -68,7 +85,8 @@ test('dlx should fail when the package has no bins', async () => { await expect( dlx.handler({ ...DEFAULT_OPTS, - dir: process.cwd(), + dir: path.resolve('project'), + storeDir: path.resolve('store'), }, ['is-positive']) ).rejects.toThrow(/No binaries found in is-positive/) }) diff --git a/packages/plugin-commands-script-runners/test/dlx.ts b/packages/plugin-commands-script-runners/test/dlx.ts index 86e61ebbd88..fe0ceed8627 100644 --- a/packages/plugin-commands-script-runners/test/dlx.ts +++ b/packages/plugin-commands-script-runners/test/dlx.ts @@ -1,3 +1,4 @@ +import path from 'path' import execa from 'execa' import { dlx } from '@pnpm/plugin-commands-script-runners' import { prepareEmpty } from '@pnpm/prepare' @@ -13,7 +14,8 @@ test('dlx should work with scoped packages', async () => { await dlx.handler({ ...DEFAULT_OPTS, - dir: process.cwd(), + dir: path.resolve('project'), + storeDir: path.resolve('store'), userAgent, }, ['@foo/touch-file-one-bin']) @@ -29,7 +31,8 @@ test('dlx should work with versioned packages', async () => { await dlx.handler({ ...DEFAULT_OPTS, - dir: process.cwd(), + dir: path.resolve('project'), + storeDir: path.resolve('store'), }, ['@foo/touch-file-one-bin@latest']) expect(execa).toBeCalledWith('touch-file-one-bin', [], expect.anything()) diff --git a/packages/plugin-commands-server/CHANGELOG.md b/packages/plugin-commands-server/CHANGELOG.md index 9b9a9e2a4ca..044b4992967 100644 --- a/packages/plugin-commands-server/CHANGELOG.md +++ b/packages/plugin-commands-server/CHANGELOG.md @@ -1,5 +1,14 @@ # @pnpm/plugin-commands-server +## 4.0.5 + +### Patch Changes + +- Updated dependencies [52b0576af] + - @pnpm/cli-utils@0.7.5 + - @pnpm/server@12.0.1 + - @pnpm/store-connection-manager@4.1.4 + ## 4.0.4 ### Patch Changes diff --git a/packages/plugin-commands-server/package.json b/packages/plugin-commands-server/package.json index ee04a5734d7..075e2cd3bec 100644 --- a/packages/plugin-commands-server/package.json +++ b/packages/plugin-commands-server/package.json @@ -1,6 +1,6 @@ { "name": "@pnpm/plugin-commands-server", - "version": "4.0.4", + "version": "4.0.5", "description": "Commands for controlling the store server", "main": "lib/index.js", "types": "lib/index.d.ts", @@ -30,19 +30,19 @@ "homepage": "https://github.com/pnpm/pnpm/blob/main/packages/plugin-commands-server#readme", "devDependencies": { "@pnpm/logger": "^4.0.0", - "@pnpm/plugin-commands-server": "workspace:4.0.4", + "@pnpm/plugin-commands-server": "workspace:4.0.5", "@types/is-windows": "^1.0.0", "@types/ramda": "0.27.39", "@types/signal-exit": "^3.0.0" }, "dependencies": { "@pnpm/cli-meta": "workspace:3.0.1", - "@pnpm/cli-utils": "workspace:0.7.4", + "@pnpm/cli-utils": "workspace:0.7.5", "@pnpm/common-cli-options-help": "workspace:0.9.0", "@pnpm/config": "workspace:15.1.1", "@pnpm/error": "workspace:3.0.1", "@pnpm/server": "workspace:12.0.1", - "@pnpm/store-connection-manager": "workspace:4.1.3", + "@pnpm/store-connection-manager": "workspace:4.1.4", "@pnpm/store-path": "workspace:6.0.0", "@zkochan/diable": "^1.0.2", "delay": "^5.0.0", diff --git a/packages/plugin-commands-setup/CHANGELOG.md b/packages/plugin-commands-setup/CHANGELOG.md index 54cb197eabf..d4060ebe1c5 100644 --- a/packages/plugin-commands-setup/CHANGELOG.md +++ b/packages/plugin-commands-setup/CHANGELOG.md @@ -1,5 +1,16 @@ # @pnpm/plugin-commands-setup +## 2.0.5 + +### Patch Changes + +- 71c7ed998: `pnpm setup` should update the config of the current shell, not the preferred shell. +- 460ccf60e: fix: make `pnpm setup` free of garbled characters. +- 61d102a99: `pnpm setup` should not override the PNPM_HOME env variable on Windows, unless `--force` is used. +- 7c9362d3d: fix `pnpm setup` breaks %PATH% with non-ascii characters [#4698](https://github.com/pnpm/pnpm/issues/4698) +- Updated dependencies [52b0576af] + - @pnpm/cli-utils@0.7.5 + ## 2.0.4 ### Patch Changes diff --git a/packages/plugin-commands-setup/package.json b/packages/plugin-commands-setup/package.json index 81c1f4efffe..c1725edadeb 100644 --- a/packages/plugin-commands-setup/package.json +++ b/packages/plugin-commands-setup/package.json @@ -1,6 +1,6 @@ { "name": "@pnpm/plugin-commands-setup", - "version": "2.0.4", + "version": "2.0.5", "description": "pnpm commands for setting up pnpm", "main": "lib/index.js", "types": "lib/index.d.ts", @@ -30,7 +30,8 @@ }, "homepage": "https://github.com/pnpm/pnpm/blob/main/packages/plugin-commands-setup#readme", "dependencies": { - "@pnpm/cli-utils": "workspace:0.7.4", + "@pnpm/cli-utils": "workspace:0.7.5", + "@pnpm/error": "workspace:3.0.1", "execa": "npm:safe-execa@^0.1.1", "render-help": "^1.0.1" }, @@ -40,7 +41,7 @@ }, "devDependencies": { "@pnpm/logger": "^4.0.0", - "@pnpm/plugin-commands-setup": "workspace:2.0.4", + "@pnpm/plugin-commands-setup": "workspace:2.0.5", "@pnpm/prepare": "workspace:*" }, "exports": { diff --git a/packages/plugin-commands-setup/src/BadHomeDirError.ts b/packages/plugin-commands-setup/src/BadHomeDirError.ts new file mode 100644 index 00000000000..80a8e40e38a --- /dev/null +++ b/packages/plugin-commands-setup/src/BadHomeDirError.ts @@ -0,0 +1,9 @@ +import PnpmError from '@pnpm/error' + +export class BadHomeDirError extends PnpmError { + constructor ({ wantedDir, currentDir }: { wantedDir: string, currentDir: string }) { + super('DIFFERENT_HOME_DIR_IS_SET', `Currently 'PNPM_HOME' is set to '${currentDir}'`, { + hint: 'If you want to override the existing PNPM_HOME env variable, use the --force option', + }) + } +} diff --git a/packages/plugin-commands-setup/src/setup.ts b/packages/plugin-commands-setup/src/setup.ts index a505c881c24..09e43c5873e 100644 --- a/packages/plugin-commands-setup/src/setup.ts +++ b/packages/plugin-commands-setup/src/setup.ts @@ -5,10 +5,13 @@ import { docsUrl } from '@pnpm/cli-utils' import logger from '@pnpm/logger' import renderHelp from 'render-help' import { setupWindowsEnvironmentPath } from './setupOnWindows' +import { BadHomeDirError } from './BadHomeDirError' export const rcOptionsTypes = () => ({}) -export const cliOptionsTypes = () => ({}) +export const cliOptionsTypes = () => ({ + force: Boolean, +}) export const shorthands = {} @@ -18,6 +21,17 @@ export function help () { return renderHelp({ description: 'Sets up pnpm', descriptionLists: [ + { + title: 'Options', + + list: [ + { + description: 'Override the PNPM_HOME env variable in case it already exists', + name: '--force', + shortAlias: '-f', + }, + ], + }, ], url: docsUrl('setup'), usages: ['pnpm setup'], @@ -47,71 +61,109 @@ function copyCli (currentLocation: string, targetDir: string) { export async function handler ( opts: { + force?: boolean pnpmHomeDir: string } ) { - const currentShell = typeof process.env.SHELL === 'string' ? path.basename(process.env.SHELL) : null + const currentShell = detectCurrentShell() const execPath = getExecPath() if (execPath.match(/\.[cm]?js$/) == null) { copyCli(execPath, opts.pnpmHomeDir) } - const updateOutput = await updateShell(currentShell, opts.pnpmHomeDir) + const updateOutput = await updateShell(currentShell, opts.pnpmHomeDir, { force: opts.force ?? false }) return `${updateOutput} Setup complete. Open a new terminal to start using pnpm.` } -async function updateShell (currentShell: string | null, pnpmHomeDir: string): Promise { +function detectCurrentShell () { + if (process.env.ZSH_VERSION) return 'zsh' + if (process.env.BASH_VERSION) return 'bash' + if (process.env.FISH_VERSION) return 'fish' + return typeof process.env.SHELL === 'string' ? path.basename(process.env.SHELL) : null +} + +async function updateShell ( + currentShell: string | null, + pnpmHomeDir: string, + opts: { force: boolean } +): Promise { switch (currentShell) { case 'bash': { const configFile = path.join(os.homedir(), '.bashrc') - return setupShell(configFile, pnpmHomeDir) + return setupShell(configFile, pnpmHomeDir, opts) } case 'zsh': { const configFile = path.join(os.homedir(), '.zshrc') - return setupShell(configFile, pnpmHomeDir) + return setupShell(configFile, pnpmHomeDir, opts) } case 'fish': { - return setupFishShell(pnpmHomeDir) + return setupFishShell(pnpmHomeDir, opts) } } if (process.platform === 'win32') { - return setupWindowsEnvironmentPath(pnpmHomeDir) + return setupWindowsEnvironmentPath(pnpmHomeDir, opts) } return 'Could not infer shell type.' } -async function setupShell (configFile: string, pnpmHomeDir: string): Promise { - const content = `export PNPM_HOME="${pnpmHomeDir}" +async function setupShell (configFile: string, pnpmHomeDir: string, opts: { force: boolean }): Promise { + const content = `# pnpm +export PNPM_HOME="${pnpmHomeDir}" export PATH="$PNPM_HOME:$PATH" +# pnpm end ` if (!fs.existsSync(configFile)) { await fs.promises.writeFile(configFile, content, 'utf8') return `Created ${configFile}` } const configContent = await fs.promises.readFile(configFile, 'utf8') - if (configContent.includes('PNPM_HOME')) { - return `PNPM_HOME is already in ${configFile}` + if (!configContent.includes('PNPM_HOME')) { + await fs.promises.appendFile(configFile, `\n${content}`, 'utf8') + return `Updated ${configFile}` + } + const match = configContent.match(/export PNPM_HOME="(.*)"/) + if (match && match[1] !== pnpmHomeDir) { + if (!opts.force) { + throw new BadHomeDirError({ currentDir: match[1], wantedDir: pnpmHomeDir }) + } + const newConfigContent = replaceSection(configContent, content) + await fs.promises.writeFile(configFile, newConfigContent, 'utf8') + return `Updated ${configFile}` } - await fs.promises.appendFile(configFile, `\n${content}`, 'utf8') - return `Updated ${configFile}` + return `PNPM_HOME is already in ${configFile}` } -async function setupFishShell (pnpmHomeDir: string): Promise { +async function setupFishShell (pnpmHomeDir: string, opts: { force: boolean }): Promise { const configFile = path.join(os.homedir(), '.config/fish/config.fish') - const content = `set -gx PNPM_HOME "${pnpmHomeDir}" + const content = `# pnpm +set -gx PNPM_HOME "${pnpmHomeDir}" set -gx PATH "$PNPM_HOME" $PATH +# pnpm end ` if (!fs.existsSync(configFile)) { await fs.promises.writeFile(configFile, content, 'utf8') return `Created ${configFile}` } const configContent = await fs.promises.readFile(configFile, 'utf8') - if (configContent.includes('PNPM_HOME')) { - return `PNPM_HOME is already in ${configFile}` + if (!configContent.includes('PNPM_HOME')) { + await fs.promises.appendFile(configFile, `\n${content}`, 'utf8') + return `Updated ${configFile}` } - await fs.promises.appendFile(configFile, `\n${content}`, 'utf8') - return `Updated ${configFile}` + const match = configContent.match(/set -gx PNPM_HOME "(.*)"/) + if (match && match[1] !== pnpmHomeDir) { + if (!opts.force) { + throw new BadHomeDirError({ currentDir: match[1], wantedDir: pnpmHomeDir }) + } + const newConfigContent = replaceSection(configContent, content) + await fs.promises.writeFile(configFile, newConfigContent, 'utf8') + return `Updated ${configFile}` + } + return `PNPM_HOME is already in ${configFile}` +} + +function replaceSection (originalContent: string, newSection: string): string { + return originalContent.replace(/# pnpm[\s\S]*# pnpm end/g, newSection) } diff --git a/packages/plugin-commands-setup/src/setupOnWindows.ts b/packages/plugin-commands-setup/src/setupOnWindows.ts index 1b3361a45dc..4d2df0d0508 100644 --- a/packages/plugin-commands-setup/src/setupOnWindows.ts +++ b/packages/plugin-commands-setup/src/setupOnWindows.ts @@ -1,33 +1,71 @@ import { win32 as path } from 'path' import execa from 'execa' +import { BadHomeDirError } from './BadHomeDirError' type IEnvironmentValueMatch = { groups: { name: string, type: string, data: string } } & RegExpMatchArray -export async function setupWindowsEnvironmentPath (pnpmHomeDir: string): Promise { - const pathRegex = /^ {4}(?PATH) {4}(?\w+) {4}(?.*)$/gim - const pnpmHomeRegex = /^ {4}(?PNPM_HOME) {4}(?\w+) {4}(?.*)$/gim - const regKey = 'HKEY_CURRENT_USER\\Environment' +const REG_KEY = 'HKEY_CURRENT_USER\\Environment' - const queryResult = await execa('reg', ['query', regKey]) +function findEnvValuesInRegistry (regEntries: string, envVarName: string): IEnvironmentValueMatch[] { + const regexp = new RegExp(`^ {4}(?${envVarName}) {4}(?\\w+) {4}(?.*)$`, 'gim') + return Array.from(regEntries.matchAll(regexp)) as IEnvironmentValueMatch[] +} + +function setEnvVarInRegistry (envVarName: string, envVarValue: string) { + // `windowsHide` in `execa` is true by default, which will cause `chcp` to have no effect. + return execa('reg', ['add', REG_KEY, '/v', envVarName, '/t', 'REG_EXPAND_SZ', '/d', envVarValue, '/f'], { windowsHide: false }) +} + +function pathIncludesDir (pathValue: string, dir: string): boolean { + const dirPath = path.parse(path.normalize(dir)) + return pathValue + .split(path.delimiter) + .map(p => path.normalize(p)) + .map(p => path.parse(p)) + .map(p => `${p.dir}${path.sep}${p.base}`.toUpperCase()) + .filter(p => p !== '') + .includes(`${dirPath.dir}${path.sep}${dirPath.base}`.toUpperCase()) +} + +export async function setupWindowsEnvironmentPath (pnpmHomeDir: string, opts: { force: boolean }): Promise { + // Use `chcp` to make `reg` use utf8 encoding for output. + // Otherwise, the non-ascii characters in the environment variables will become garbled characters. + const chcpResult = await execa('chcp') + const cpMatch = /\d+/.exec(chcpResult.stdout) ?? [] + const cpBak = parseInt(cpMatch[0]) + if (chcpResult.failed || !(cpBak > 0)) { + return `exec chcp failed: ${cpBak}, ${chcpResult.stderr}` + } + await execa('chcp', ['65001']) + try { + return await _setupWindowsEnvironmentPath(path.normalize(pnpmHomeDir), opts) + } finally { + await execa('chcp', [cpBak.toString()]) + } +} + +async function _setupWindowsEnvironmentPath (pnpmHomeDir: string, opts: { force: boolean }): Promise { + const queryResult = await execa('reg', ['query', REG_KEY], { windowsHide: false }) if (queryResult.failed) { return 'Win32 registry environment values could not be retrieved' } const queryOutput = queryResult.stdout - const pathValueMatch = [...queryOutput.matchAll(pathRegex)] as IEnvironmentValueMatch[] - const homeValueMatch = [...queryOutput.matchAll(pnpmHomeRegex)] as IEnvironmentValueMatch[] + const pathValueMatch = findEnvValuesInRegistry(queryOutput, 'PATH') + const homeValueMatch = findEnvValuesInRegistry(queryOutput, 'PNPM_HOME') let commitNeeded = false - let homeDir = pnpmHomeDir const logger = [] - if (homeValueMatch.length === 1) { - homeDir = homeValueMatch[0].groups.data - logger.push(`Currently 'PNPM_HOME' is set to '${homeDir}'`) + if (homeValueMatch.length === 1 && !opts.force) { + const currentHomeDir = homeValueMatch[0].groups.data + if (currentHomeDir !== pnpmHomeDir) { + throw new BadHomeDirError({ currentDir: currentHomeDir, wantedDir: pnpmHomeDir }) + } } else { - logger.push(`Setting 'PNPM_HOME' to value '${homeDir}'`) - const addResult = await execa('reg', ['add', regKey, '/v', 'PNPM_HOME', '/t', 'REG_EXPAND_SZ', '/d', homeDir, '/f']) + logger.push(`Setting 'PNPM_HOME' to value '${pnpmHomeDir}'`) + const addResult = await setEnvVarInRegistry('PNPM_HOME', pnpmHomeDir) if (addResult.failed) { logger.push(`\t${addResult.stderr}`) } else { @@ -36,38 +74,27 @@ export async function setupWindowsEnvironmentPath (pnpmHomeDir: string): Promise } } - if (pathValueMatch.length === 1) { - const pathData = pathValueMatch[0].groups.data - if (pathData == null || pathData.trim() === '') { - logger.push('Current PATH is empty. No changes to this environment variable are applied') + const pathData = pathValueMatch[0]?.groups.data + if (pathData === undefined) { + logger.push('Current PATH is not set. No changes to this environment variable are applied') + } else if (pathData == null || pathData.trim() === '') { + logger.push('Current PATH is empty. No changes to this environment variable are applied') + } else if (pathIncludesDir(pathData, pnpmHomeDir) || pathData.split(path.delimiter).includes('%PNPM_HOME%')) { + logger.push('PATH already contains PNPM_HOME') + } else { + logger.push('Updating PATH') + const newPathValue = `%PNPM_HOME%${path.delimiter}${pathData}` + const addResult = await setEnvVarInRegistry(pathValueMatch[0].groups.name, newPathValue) + if (addResult.failed) { + logger.push(`\t${addResult.stderr}`) } else { - const homeDirPath = path.parse(path.normalize(homeDir)) - - if (pathData - .split(path.delimiter) - .map(p => path.normalize(p)) - .map(p => path.parse(p)) - .map(p => `${p.dir}${path.sep}${p.base}`.toUpperCase()) - .filter(p => p !== '') - .includes(`${homeDirPath.dir}${path.sep}${homeDirPath.base}`.toUpperCase())) { - logger.push('PATH already contains PNPM_HOME') - } else { - logger.push('Updating PATH') - const addResult = await execa('reg', ['add', regKey, '/v', pathValueMatch[0].groups.name, '/t', 'REG_EXPAND_SZ', '/d', `${homeDir}${path.delimiter}${pathData}`, '/f']) - if (addResult.failed) { - logger.push(`\t${addResult.stderr}`) - } else { - commitNeeded = true - logger.push(`\t${addResult.stdout}`) - } - } + commitNeeded = true + logger.push(`\t${addResult.stdout}`) } - } else { - logger.push('Current PATH is not set. No changes to this environment variable are applied') } if (commitNeeded) { - await execa('setx', ['PNPM_HOME', homeDir]) + await execa('setx', ['PNPM_HOME', pnpmHomeDir]) } return logger.join('\n') diff --git a/packages/plugin-commands-setup/test/setup.test.ts b/packages/plugin-commands-setup/test/setup.test.ts index a3bc21cefae..6da1be5e6b1 100644 --- a/packages/plugin-commands-setup/test/setup.test.ts +++ b/packages/plugin-commands-setup/test/setup.test.ts @@ -1,4 +1,5 @@ import fs from 'fs' +import path from 'path' import { homedir } from 'os' import { tempDir } from '@pnpm/prepare' @@ -12,138 +13,179 @@ jest.mock('os', () => { } }) -test('PNPM_HOME is added to ~/.bashrc', async () => { - process.env.SHELL = '/bin/bash' - tempDir() - fs.writeFileSync('.bashrc', '', 'utf8') - homedir['mockReturnValue'](process.cwd()) - const output = await setup.handler({ - pnpmHomeDir: __dirname, +let homeDir!: string +let pnpmHomeDir!: string + +beforeEach(() => { + homeDir = tempDir() + pnpmHomeDir = path.join(homeDir, '.pnpm') + homedir['mockReturnValue'](homeDir) +}) + +describe('Bash', () => { + beforeAll(() => { + process.env.SHELL = '/bin/bash' }) - expect(output).toMatch(/^Updated /) - const bashRCContent = fs.readFileSync('.bashrc', 'utf8') - expect(bashRCContent).toEqual(` -export PNPM_HOME="${__dirname}" + it('should append to empty shell script', async () => { + fs.writeFileSync('.bashrc', '', 'utf8') + const output = await setup.handler({ pnpmHomeDir }) + expect(output).toMatch(/^Updated /) + const bashRCContent = fs.readFileSync('.bashrc', 'utf8') + expect(bashRCContent).toEqual(` +# pnpm +export PNPM_HOME="${pnpmHomeDir}" export PATH="$PNPM_HOME:$PATH" +# pnpm end `) -}) - -test('PNPM_HOME is added to ~/.bashrc and .bashrc file created', async () => { - process.env.SHELL = '/bin/bash' - tempDir() - homedir['mockReturnValue'](process.cwd()) - const output = await setup.handler({ - pnpmHomeDir: __dirname, }) - expect(output).toMatch(/^Created /) - const bashRCContent = fs.readFileSync('.bashrc', 'utf8') - expect(bashRCContent).toEqual(`export PNPM_HOME="${__dirname}" + it('should create a shell script', async () => { + const output = await setup.handler({ pnpmHomeDir }) + expect(output).toMatch(/^Created /) + const bashRCContent = fs.readFileSync('.bashrc', 'utf8') + expect(bashRCContent).toEqual(`# pnpm +export PNPM_HOME="${pnpmHomeDir}" export PATH="$PNPM_HOME:$PATH" +# pnpm end `) -}) - -test('PNPM_HOME is not added to ~/.bashrc if already present', async () => { - process.env.SHELL = '/bin/bash' - tempDir() - fs.writeFileSync('.bashrc', ` + }) + it('should make no changes to a shell script that already has the necessary configurations', async () => { + fs.writeFileSync('.bashrc', ` +export PNPM_HOME="${pnpmHomeDir}" +export PATH="$PNPM_HOME:$PATH" +`, 'utf8') + const output = await setup.handler({ pnpmHomeDir }) + expect(output).toMatch(/^PNPM_HOME is already in /) + const bashRCContent = fs.readFileSync('.bashrc', 'utf8') + expect(bashRCContent).toEqual(` +export PNPM_HOME="${pnpmHomeDir}" +export PATH="$PNPM_HOME:$PATH" +`) + }) + it('should fail if the shell already has PNPM_HOME set to a different directory', async () => { + fs.writeFileSync('.bashrc', ` export PNPM_HOME="pnpm_home" export PATH="$PNPM_HOME:$PATH" `, 'utf8') - homedir['mockReturnValue'](process.cwd()) - const output = await setup.handler({ - pnpmHomeDir: __dirname, + await expect( + setup.handler({ pnpmHomeDir }) + ).rejects.toThrowError(/Currently 'PNPM_HOME' is set to/) }) - expect(output).toMatch(/^PNPM_HOME is already in /) - const bashRCContent = fs.readFileSync('.bashrc', 'utf8') - expect(bashRCContent).toEqual(` + it('should not fail if setup is forced', async () => { + fs.writeFileSync('.bashrc', ` +# pnpm export PNPM_HOME="pnpm_home" export PATH="$PNPM_HOME:$PATH" +# pnpm end`, 'utf8') + const output = await setup.handler({ force: true, pnpmHomeDir }) + expect(output).toMatch(/^Updated /) + const bashRCContent = fs.readFileSync('.bashrc', 'utf8') + expect(bashRCContent).toEqual(` +# pnpm +export PNPM_HOME="${pnpmHomeDir}" +export PATH="$PNPM_HOME:$PATH" +# pnpm end `) + }) }) -test('PNPM_HOME is added to ~/.zshrc', async () => { - process.env.SHELL = '/bin/zsh' - tempDir() - fs.writeFileSync('.zshrc', '', 'utf8') - homedir['mockReturnValue'](process.cwd()) - const output = await setup.handler({ - pnpmHomeDir: __dirname, +describe('Zsh', () => { + beforeAll(() => { + process.env.SHELL = '/bin/zsh' }) - expect(output).toMatch(/^Updated /) - const bashRCContent = fs.readFileSync('.zshrc', 'utf8') - expect(bashRCContent).toEqual(` -export PNPM_HOME="${__dirname}" + it('should append to empty shell script', async () => { + fs.writeFileSync('.zshrc', '', 'utf8') + const output = await setup.handler({ pnpmHomeDir }) + expect(output).toMatch(/^Updated /) + const bashRCContent = fs.readFileSync('.zshrc', 'utf8') + expect(bashRCContent).toEqual(` +# pnpm +export PNPM_HOME="${pnpmHomeDir}" export PATH="$PNPM_HOME:$PATH" +# pnpm end `) -}) - -test('PNPM_HOME is not added to ~/.zshrc if already present', async () => { - process.env.SHELL = '/bin/zsh' - tempDir() - fs.writeFileSync('.zshrc', ` -export PNPM_HOME="pnpm_home" + }) + it('should make no changes to a shell script that already has the necessary configurations', async () => { + fs.writeFileSync('.zshrc', ` +export PNPM_HOME="${pnpmHomeDir}" export PATH="$PNPM_HOME:$PATH" `, 'utf8') - homedir['mockReturnValue'](process.cwd()) - const output = await setup.handler({ - pnpmHomeDir: __dirname, - }) - expect(output).toMatch(/^PNPM_HOME is already in /) - const bashRCContent = fs.readFileSync('.zshrc', 'utf8') - expect(bashRCContent).toEqual(` -export PNPM_HOME="pnpm_home" + const output = await setup.handler({ pnpmHomeDir }) + expect(output).toMatch(/^PNPM_HOME is already in /) + const bashRCContent = fs.readFileSync('.zshrc', 'utf8') + expect(bashRCContent).toEqual(` +export PNPM_HOME="${pnpmHomeDir}" export PATH="$PNPM_HOME:$PATH" `) + }) }) -test('PNPM_HOME is added to ~/.config/fish/config.fish', async () => { - process.env.SHELL = '/bin/fish' - tempDir() - fs.mkdirSync('.config/fish', { recursive: true }) - fs.writeFileSync('.config/fish/config.fish', '', 'utf8') - homedir['mockReturnValue'](process.cwd()) - const output = await setup.handler({ - pnpmHomeDir: __dirname, +describe('Fish', () => { + beforeAll(() => { + process.env.SHELL = '/bin/fish' }) - expect(output).toMatch(/^Updated /) - const bashRCContent = fs.readFileSync('.config/fish/config.fish', 'utf8') - expect(bashRCContent).toEqual(` -set -gx PNPM_HOME "${__dirname}" + it('should append to empty shell script', async () => { + fs.mkdirSync('.config/fish', { recursive: true }) + fs.writeFileSync('.config/fish/config.fish', '', 'utf8') + const output = await setup.handler({ pnpmHomeDir }) + expect(output).toMatch(/^Updated /) + const bashRCContent = fs.readFileSync('.config/fish/config.fish', 'utf8') + expect(bashRCContent).toEqual(` +# pnpm +set -gx PNPM_HOME "${pnpmHomeDir}" set -gx PATH "$PNPM_HOME" $PATH +# pnpm end `) -}) - -test('PNPM_HOME is added to ~/.config/fish/config.fish and config.fish file created', async () => { - process.env.SHELL = '/bin/fish' - tempDir() - fs.mkdirSync('.config/fish', { recursive: true }) - homedir['mockReturnValue'](process.cwd()) - const output = await setup.handler({ - pnpmHomeDir: __dirname, }) - expect(output).toMatch(/^Created /) - const bashRCContent = fs.readFileSync('.config/fish/config.fish', 'utf8') - expect(bashRCContent).toEqual(`set -gx PNPM_HOME "${__dirname}" + it('should create a shell script', async () => { + fs.mkdirSync('.config/fish', { recursive: true }) + const output = await setup.handler({ pnpmHomeDir }) + expect(output).toMatch(/^Created /) + const bashRCContent = fs.readFileSync('.config/fish/config.fish', 'utf8') + expect(bashRCContent).toEqual(`# pnpm +set -gx PNPM_HOME "${pnpmHomeDir}" set -gx PATH "$PNPM_HOME" $PATH +# pnpm end `) -}) - -test('PNPM_HOME is not added to ~/.config/fish/config.fish if already present', async () => { - process.env.SHELL = '/bin/fish' - tempDir() - fs.mkdirSync('.config/fish', { recursive: true }) - fs.writeFileSync('.config/fish/config.fish', ` + }) + it('should make no changes to a shell script that already has the necessary configurations', async () => { + fs.mkdirSync('.config/fish', { recursive: true }) + fs.writeFileSync('.config/fish/config.fish', ` +set -gx PNPM_HOME "${pnpmHomeDir}" +set -gx PATH "$PNPM_HOME" $PATH +`, 'utf8') + const output = await setup.handler({ pnpmHomeDir }) + expect(output).toMatch(/^PNPM_HOME is already in /) + const bashRCContent = fs.readFileSync('.config/fish/config.fish', 'utf8') + expect(bashRCContent).toEqual(` +set -gx PNPM_HOME "${pnpmHomeDir}" +set -gx PATH "$PNPM_HOME" $PATH +`) + }) + it('should fail if the shell already has PNPM_HOME set to a different directory', async () => { + fs.mkdirSync('.config/fish', { recursive: true }) + fs.writeFileSync('.config/fish/config.fish', ` set -gx PNPM_HOME "pnpm_home" set -gx PATH "$PNPM_HOME" $PATH `, 'utf8') - homedir['mockReturnValue'](process.cwd()) - const output = await setup.handler({ - pnpmHomeDir: __dirname, + await expect( + setup.handler({ pnpmHomeDir }) + ).rejects.toThrowError(/Currently 'PNPM_HOME' is set to/) }) - expect(output).toMatch(/^PNPM_HOME is already in /) - const bashRCContent = fs.readFileSync('.config/fish/config.fish', 'utf8') - expect(bashRCContent).toEqual(` + it('should not fail if setup is forced', async () => { + fs.mkdirSync('.config/fish', { recursive: true }) + fs.writeFileSync('.config/fish/config.fish', ` +# pnpm set -gx PNPM_HOME "pnpm_home" set -gx PATH "$PNPM_HOME" $PATH +# pnpm end`, 'utf8') + const output = await setup.handler({ force: true, pnpmHomeDir }) + expect(output).toMatch(/^Updated /) + const bashRCContent = fs.readFileSync('.config/fish/config.fish', 'utf8') + expect(bashRCContent).toEqual(` +# pnpm +set -gx PNPM_HOME "${pnpmHomeDir}" +set -gx PATH "$PNPM_HOME" $PATH +# pnpm end `) + }) }) diff --git a/packages/plugin-commands-setup/test/setupOnWindows/01.test.ts b/packages/plugin-commands-setup/test/setupOnWindows/01.test.ts index 8f8fb6d4a42..6dccee8eee0 100644 --- a/packages/plugin-commands-setup/test/setupOnWindows/01.test.ts +++ b/packages/plugin-commands-setup/test/setupOnWindows/01.test.ts @@ -1,5 +1,6 @@ import execa from 'execa' import { setup } from '@pnpm/plugin-commands-setup' +import { tempDir } from '@pnpm/prepare' jest.mock('execa') @@ -26,14 +27,20 @@ afterAll(() => { const regKey = 'HKEY_CURRENT_USER\\Environment' test('Win32 registry environment values could not be retrieved', async () => { - execa['mockResolvedValue']({ + execa['mockResolvedValueOnce']({ + failed: false, + stdout: '活动代码页: 936', + }).mockResolvedValueOnce({ + failed: false, + stdout: '', + }).mockResolvedValue({ failed: true, }) const output = await setup.handler({ - pnpmHomeDir: __dirname, + pnpmHomeDir: tempDir(false), }) - expect(execa).toHaveBeenNthCalledWith(1, 'reg', ['query', regKey]) + expect(execa).toHaveBeenNthCalledWith(3, 'reg', ['query', regKey], { windowsHide: false }) expect(output).toContain('Win32 registry environment values could not be retrieved') }) diff --git a/packages/plugin-commands-setup/test/setupOnWindows/02.test.ts b/packages/plugin-commands-setup/test/setupOnWindows/02.test.ts index 1131a7362ef..3a06b774822 100644 --- a/packages/plugin-commands-setup/test/setupOnWindows/02.test.ts +++ b/packages/plugin-commands-setup/test/setupOnWindows/02.test.ts @@ -1,5 +1,6 @@ import execa from 'execa' import { setup } from '@pnpm/plugin-commands-setup' +import { tempDir } from '@pnpm/prepare' jest.mock('execa') @@ -27,6 +28,12 @@ const regKey = 'HKEY_CURRENT_USER\\Environment' test('Environment PATH is not configured correctly', async () => { execa['mockResolvedValueOnce']({ + failed: false, + stdout: '活动代码页: 936', + }).mockResolvedValueOnce({ + failed: false, + stdout: '', + }).mockResolvedValueOnce({ failed: false, stdout: 'SOME KIND OF ERROR OR UNSUPPORTED RESPONSE FORMAT', }).mockResolvedValue({ @@ -34,9 +41,9 @@ test('Environment PATH is not configured correctly', async () => { }) const output = await setup.handler({ - pnpmHomeDir: __dirname, + pnpmHomeDir: tempDir(false), }) - expect(execa).toHaveBeenNthCalledWith(1, 'reg', ['query', regKey]) + expect(execa).toHaveBeenNthCalledWith(3, 'reg', ['query', regKey], { windowsHide: false }) expect(output).toContain('Current PATH is not set. No changes to this environment variable are applied') }) diff --git a/packages/plugin-commands-setup/test/setupOnWindows/03.test.ts b/packages/plugin-commands-setup/test/setupOnWindows/03.test.ts index b96d9654d9e..2edacd45518 100644 --- a/packages/plugin-commands-setup/test/setupOnWindows/03.test.ts +++ b/packages/plugin-commands-setup/test/setupOnWindows/03.test.ts @@ -1,5 +1,6 @@ import execa from 'execa' import { setup } from '@pnpm/plugin-commands-setup' +import { tempDir } from '@pnpm/prepare' jest.mock('execa') @@ -27,19 +28,25 @@ const regKey = 'HKEY_CURRENT_USER\\Environment' test('Environment PATH is empty', async () => { execa['mockResolvedValueOnce']({ + failed: false, + stdout: '活动代码页: 936', + }).mockResolvedValueOnce({ + failed: false, + stdout: '', + }).mockResolvedValueOnce({ failed: false, stdout: ` HKEY_CURRENT_USER\\Environment Path REG_EXPAND_SZ -`, + `, }).mockResolvedValue({ failed: false, }) const output = await setup.handler({ - pnpmHomeDir: __dirname, + pnpmHomeDir: tempDir(false), }) - expect(execa).toHaveBeenNthCalledWith(1, 'reg', ['query', regKey]) + expect(execa).toHaveBeenNthCalledWith(3, 'reg', ['query', regKey], { windowsHide: false }) expect(output).toContain('Current PATH is empty. No changes to this environment variable are applied') }) diff --git a/packages/plugin-commands-setup/test/setupOnWindows/04.test.ts b/packages/plugin-commands-setup/test/setupOnWindows/04.test.ts index 76a251c408b..441e917a417 100644 --- a/packages/plugin-commands-setup/test/setupOnWindows/04.test.ts +++ b/packages/plugin-commands-setup/test/setupOnWindows/04.test.ts @@ -1,5 +1,7 @@ +import { win32 as path } from 'path' import execa from 'execa' import { setup } from '@pnpm/plugin-commands-setup' +import { tempDir } from '@pnpm/prepare' jest.mock('execa') @@ -29,6 +31,12 @@ test('Successful first time installation', async () => { const currentPathInRegistry = '%USERPROFILE%\\AppData\\Local\\Microsoft\\WindowsApps;%USERPROFILE%\\.config\\etc;' execa['mockResolvedValueOnce']({ + failed: false, + stdout: '活动代码页: 936', + }).mockResolvedValueOnce({ + failed: false, + stdout: '', + }).mockResolvedValueOnce({ failed: false, stdout: ` HKEY_CURRENT_USER\\Environment @@ -45,15 +53,15 @@ HKEY_CURRENT_USER\\Environment stderr: 'UNEXPECTED', }) - const output = await setup.handler({ - pnpmHomeDir: __dirname, - }) + const pnpmHomeDir = tempDir(false) + const pnpmHomeDirNormalized = path.normalize(pnpmHomeDir) + const output = await setup.handler({ pnpmHomeDir }) - expect(execa).toHaveBeenNthCalledWith(1, 'reg', ['query', regKey]) - expect(execa).toHaveBeenNthCalledWith(2, 'reg', ['add', regKey, '/v', 'PNPM_HOME', '/t', 'REG_EXPAND_SZ', '/d', __dirname, '/f']) - expect(execa).toHaveBeenNthCalledWith(3, 'reg', ['add', regKey, '/v', 'Path', '/t', 'REG_EXPAND_SZ', '/d', `${__dirname};${currentPathInRegistry}`, '/f']) - expect(execa).toHaveBeenNthCalledWith(4, 'setx', ['PNPM_HOME', __dirname]) - expect(output).toContain(`Setting 'PNPM_HOME' to value '${__dirname}`) + expect(execa).toHaveBeenNthCalledWith(3, 'reg', ['query', regKey], { windowsHide: false }) + expect(execa).toHaveBeenNthCalledWith(4, 'reg', ['add', regKey, '/v', 'PNPM_HOME', '/t', 'REG_EXPAND_SZ', '/d', pnpmHomeDirNormalized, '/f'], { windowsHide: false }) + expect(execa).toHaveBeenNthCalledWith(5, 'reg', ['add', regKey, '/v', 'Path', '/t', 'REG_EXPAND_SZ', '/d', `%PNPM_HOME%;${currentPathInRegistry}`, '/f'], { windowsHide: false }) + expect(execa).toHaveBeenNthCalledWith(6, 'setx', ['PNPM_HOME', pnpmHomeDirNormalized]) + expect(output).toContain(`Setting 'PNPM_HOME' to value '${pnpmHomeDirNormalized}`) expect(output).toContain('Updating PATH') expect(output).toContain('PNPM_HOME ENV VAR SET') expect(output).toContain('PATH UPDATED') diff --git a/packages/plugin-commands-setup/test/setupOnWindows/05.test.ts b/packages/plugin-commands-setup/test/setupOnWindows/05.test.ts index 6c85847a795..32dafea4ce9 100644 --- a/packages/plugin-commands-setup/test/setupOnWindows/05.test.ts +++ b/packages/plugin-commands-setup/test/setupOnWindows/05.test.ts @@ -1,5 +1,7 @@ +import { win32 as path } from 'path' import execa from 'execa' import { setup } from '@pnpm/plugin-commands-setup' +import { tempDir } from '@pnpm/prepare' jest.mock('execa') @@ -27,11 +29,19 @@ const regKey = 'HKEY_CURRENT_USER\\Environment' test('PNPM_HOME is already set, but path is updated', async () => { const currentPathInRegistry = '%USERPROFILE%\\AppData\\Local\\Microsoft\\WindowsApps;%USERPROFILE%\\.config\\etc;' + const pnpmHomeDir = tempDir(false) + const pnpmHomeDirNormalized = path.normalize(pnpmHomeDir) execa['mockResolvedValueOnce']({ + failed: false, + stdout: '活动代码页: 936', + }).mockResolvedValueOnce({ + failed: false, + stdout: '', + }).mockResolvedValueOnce({ failed: false, stdout: ` HKEY_CURRENT_USER\\Environment - PNPM_HOME REG_EXPAND_SZ .pnpm\\home + PNPM_HOME REG_EXPAND_SZ ${pnpmHomeDirNormalized} Path REG_EXPAND_SZ ${currentPathInRegistry} `, }).mockResolvedValueOnce({ @@ -42,14 +52,11 @@ HKEY_CURRENT_USER\\Environment stderr: 'UNEXPECTED', }) - const output = await setup.handler({ - pnpmHomeDir: __dirname, - }) + const output = await setup.handler({ pnpmHomeDir }) - expect(execa).toHaveBeenNthCalledWith(1, 'reg', ['query', regKey]) - expect(execa).toHaveBeenNthCalledWith(2, 'reg', ['add', regKey, '/v', 'Path', '/t', 'REG_EXPAND_SZ', '/d', `${'.pnpm\\home'};${currentPathInRegistry}`, '/f']) - expect(execa).toHaveBeenNthCalledWith(3, 'setx', ['PNPM_HOME', '.pnpm\\home']) - expect(output).toContain(`Currently 'PNPM_HOME' is set to '${'.pnpm\\home'}'`) + expect(execa).toHaveBeenNthCalledWith(3, 'reg', ['query', regKey], { windowsHide: false }) + expect(execa).toHaveBeenNthCalledWith(4, 'reg', ['add', regKey, '/v', 'Path', '/t', 'REG_EXPAND_SZ', '/d', `%PNPM_HOME%;${currentPathInRegistry}`, '/f'], { windowsHide: false }) + expect(execa).toHaveBeenNthCalledWith(5, 'setx', ['PNPM_HOME', pnpmHomeDirNormalized]) expect(output).toContain('Updating PATH') expect(output).toContain('PATH UPDATED') }) diff --git a/packages/plugin-commands-setup/test/setupOnWindows/06.test.ts b/packages/plugin-commands-setup/test/setupOnWindows/06.test.ts index 0a4339257e9..3c74784edde 100644 --- a/packages/plugin-commands-setup/test/setupOnWindows/06.test.ts +++ b/packages/plugin-commands-setup/test/setupOnWindows/06.test.ts @@ -1,5 +1,7 @@ +import { win32 as path } from 'path' import execa from 'execa' import { setup } from '@pnpm/plugin-commands-setup' +import { tempDir } from '@pnpm/prepare' jest.mock('execa') @@ -25,8 +27,39 @@ afterAll(() => { const regKey = 'HKEY_CURRENT_USER\\Environment' -test('Existing installation', async () => { +test('setup throws an error if PNPM_HOME is already set to a different directory', async () => { execa['mockResolvedValueOnce']({ + failed: false, + stdout: '活动代码页: 936', + }).mockResolvedValueOnce({ + failed: false, + stdout: '', + }).mockResolvedValueOnce({ + failed: false, + stdout: ` +HKEY_CURRENT_USER\\Environment + PNPM_HOME REG_EXPAND_SZ .pnpm\\home + Path REG_EXPAND_SZ %USERPROFILE%\\AppData\\Local\\Microsoft\\WindowsApps;%USERPROFILE%\\.config\\etc;.pnpm\\home;C:\\Windows; +`, + }).mockResolvedValue({ + failed: true, + stderr: 'UNEXPECTED', + }) + + const pnpmHomeDir = tempDir(false) + await expect( + setup.handler({ pnpmHomeDir }) + ).rejects.toThrowError(/Currently 'PNPM_HOME' is set to/) +}) + +test('setup overrides PNPM_HOME, when setup is forced', async () => { + execa['mockResolvedValueOnce']({ + failed: false, + stdout: '活动代码页: 936', + }).mockResolvedValueOnce({ + failed: false, + stdout: '', + }).mockResolvedValueOnce({ failed: false, stdout: ` HKEY_CURRENT_USER\\Environment @@ -38,11 +71,13 @@ HKEY_CURRENT_USER\\Environment stderr: 'UNEXPECTED', }) + const pnpmHomeDir = tempDir(false) + const pnpmHomeDirNormalized = path.normalize(pnpmHomeDir) const output = await setup.handler({ - pnpmHomeDir: __dirname, + force: true, + pnpmHomeDir, }) - expect(execa).toHaveBeenNthCalledWith(1, 'reg', ['query', regKey]) - expect(output).toContain(`Currently 'PNPM_HOME' is set to '${'.pnpm\\home'}'`) - expect(output).toContain('PATH already contains PNPM_HOME') + expect(execa).toHaveBeenNthCalledWith(3, 'reg', ['query', regKey], { windowsHide: false }) + expect(output).toContain(`Setting 'PNPM_HOME' to value '${pnpmHomeDirNormalized}'`) }) diff --git a/packages/plugin-commands-setup/test/setupOnWindows/07.test.ts b/packages/plugin-commands-setup/test/setupOnWindows/07.test.ts index f7e384468e1..8cbcd801b32 100644 --- a/packages/plugin-commands-setup/test/setupOnWindows/07.test.ts +++ b/packages/plugin-commands-setup/test/setupOnWindows/07.test.ts @@ -1,5 +1,7 @@ +import { win32 as path } from 'path' import execa from 'execa' import { setup } from '@pnpm/plugin-commands-setup' +import { tempDir } from '@pnpm/prepare' jest.mock('execa') @@ -29,6 +31,12 @@ test('Failure to install', async () => { const currentPathInRegistry = '%USERPROFILE%\\AppData\\Local\\Microsoft\\WindowsApps;%USERPROFILE%\\.config\\etc;' execa['mockResolvedValueOnce']({ + failed: false, + stdout: '活动代码页: 936', + }).mockResolvedValueOnce({ + failed: false, + stdout: '', + }).mockResolvedValueOnce({ failed: false, stdout: ` HKEY_CURRENT_USER\\Environment @@ -45,15 +53,15 @@ HKEY_CURRENT_USER\\Environment stderr: 'UNEXPECTED', }) - const output = await setup.handler({ - pnpmHomeDir: __dirname, - }) + const pnpmHomeDir = tempDir(false) + const pnpmHomeDirNormalized = path.normalize(pnpmHomeDir) + const output = await setup.handler({ pnpmHomeDir }) - expect(execa).toHaveBeenNthCalledWith(1, 'reg', ['query', regKey]) - expect(execa).toHaveBeenNthCalledWith(2, 'reg', ['add', regKey, '/v', 'PNPM_HOME', '/t', 'REG_EXPAND_SZ', '/d', __dirname, '/f']) - expect(execa).toHaveBeenNthCalledWith(3, 'reg', ['add', regKey, '/v', 'Path', '/t', 'REG_EXPAND_SZ', '/d', `${__dirname};${currentPathInRegistry}`, '/f']) - expect(output).toContain(`Setting 'PNPM_HOME' to value '${__dirname}`) + expect(execa).toHaveBeenNthCalledWith(3, 'reg', ['query', regKey], { windowsHide: false }) + expect(execa).toHaveBeenNthCalledWith(4, 'reg', ['add', regKey, '/v', 'PNPM_HOME', '/t', 'REG_EXPAND_SZ', '/d', pnpmHomeDirNormalized, '/f'], { windowsHide: false }) + expect(execa).toHaveBeenNthCalledWith(5, 'reg', ['add', regKey, '/v', 'Path', '/t', 'REG_EXPAND_SZ', '/d', `%PNPM_HOME%;${currentPathInRegistry}`, '/f'], { windowsHide: false }) + expect(output).toContain(`Setting 'PNPM_HOME' to value '${pnpmHomeDirNormalized}`) expect(output).toContain('FAILED TO SET PNPM_HOME') expect(output).toContain('Updating PATH') expect(output).toContain('FAILED TO UPDATE PATH') -}) \ No newline at end of file +}) diff --git a/packages/plugin-commands-setup/tsconfig.json b/packages/plugin-commands-setup/tsconfig.json index 2d50b285e58..f136214d285 100644 --- a/packages/plugin-commands-setup/tsconfig.json +++ b/packages/plugin-commands-setup/tsconfig.json @@ -15,6 +15,9 @@ }, { "path": "../cli-utils" + }, + { + "path": "../error" } ] } diff --git a/packages/plugin-commands-store/CHANGELOG.md b/packages/plugin-commands-store/CHANGELOG.md index fe28f42ce64..e9ab9d6f857 100644 --- a/packages/plugin-commands-store/CHANGELOG.md +++ b/packages/plugin-commands-store/CHANGELOG.md @@ -1,5 +1,14 @@ # @pnpm/plugin-commands-store +## 5.1.4 + +### Patch Changes + +- Updated dependencies [52b0576af] + - @pnpm/cli-utils@0.7.5 + - @pnpm/get-context@6.1.2 + - @pnpm/store-connection-manager@4.1.4 + ## 5.1.3 ### Patch Changes diff --git a/packages/plugin-commands-store/package.json b/packages/plugin-commands-store/package.json index ae61b401f07..fcc56a9b206 100644 --- a/packages/plugin-commands-store/package.json +++ b/packages/plugin-commands-store/package.json @@ -1,6 +1,6 @@ { "name": "@pnpm/plugin-commands-store", - "version": "5.1.3", + "version": "5.1.4", "description": "Commands for controlling the store", "main": "lib/index.js", "types": "lib/index.d.ts", @@ -34,9 +34,9 @@ "homepage": "https://github.com/pnpm/pnpm/blob/main/packages/plugin-commands-store#readme", "devDependencies": { "@pnpm/assert-store": "workspace:*", - "@pnpm/lockfile-file": "workspace:5.0.2", + "@pnpm/lockfile-file": "workspace:5.0.3", "@pnpm/logger": "^4.0.0", - "@pnpm/plugin-commands-store": "workspace:5.1.3", + "@pnpm/plugin-commands-store": "workspace:5.1.4", "@pnpm/prepare": "workspace:*", "@pnpm/registry-mock": "2.16.0", "@types/archy": "0.0.31", @@ -50,15 +50,15 @@ }, "dependencies": { "@pnpm/cafs": "workspace:4.0.2", - "@pnpm/cli-utils": "workspace:0.7.4", + "@pnpm/cli-utils": "workspace:0.7.5", "@pnpm/config": "workspace:15.1.1", "@pnpm/error": "workspace:3.0.1", - "@pnpm/get-context": "workspace:6.1.1", + "@pnpm/get-context": "workspace:6.1.2", "@pnpm/lockfile-utils": "workspace:4.0.2", "@pnpm/normalize-registries": "workspace:3.0.1", "@pnpm/parse-wanted-dependency": "workspace:3.0.0", "@pnpm/pick-registry-for-package": "workspace:3.0.1", - "@pnpm/store-connection-manager": "workspace:4.1.3", + "@pnpm/store-connection-manager": "workspace:4.1.4", "@pnpm/store-controller-types": "workspace:13.0.1", "@pnpm/store-path": "workspace:6.0.0", "@pnpm/types": "workspace:8.0.1", diff --git a/packages/pnpm/.npmrc b/packages/pnpm/.npmrc deleted file mode 100644 index 2c92d8470a1..00000000000 --- a/packages/pnpm/.npmrc +++ /dev/null @@ -1,5 +0,0 @@ -; This npmrc is only needed at the moment -; because npm is used to publish a bundled version of pnpm -; Otherwise, the .npmrc in the root of the repo would be enough -global-style = false -registry = https://registry.npmjs.org/ diff --git a/packages/pnpm/CHANGELOG.md b/packages/pnpm/CHANGELOG.md index 0478c41780b..62f3da5dba5 100644 --- a/packages/pnpm/CHANGELOG.md +++ b/packages/pnpm/CHANGELOG.md @@ -1,5 +1,19 @@ # pnpm +## 7.1.0 + +### Minor Changes + +- Added support for `libc` field in `package.json` [#4454](https://github.com/pnpm/pnpm/issues/4454). + +### Patch Changes + +- `pnpm setup` should update the config of the current shell, not the preferred shell. +- `pnpm setup` should not override the PNPM_HOME env variable, unless `--force` is used. +- `pnpm dlx` should print messages about installation to stderr [#1698](https://github.com/pnpm/pnpm/issues/1698). +- `pnpm dlx` should work with git-hosted packages. For example: `pnpm dlx gengjiawen/envinfo` [#4714](https://github.com/pnpm/pnpm/issues/4714). +- `pnpm run --stream` should prefix the output with directory [#4702](https://github.com/pnpm/pnpm/issues/4702) + ## 7.0.1 ### Patch Changes diff --git a/packages/pnpm/dev/package.json b/packages/pnpm/dev/package.json new file mode 100644 index 00000000000..bd4080553eb --- /dev/null +++ b/packages/pnpm/dev/package.json @@ -0,0 +1,6 @@ +{ + "name": "pd", + "version": "1.0.0", + "bin": "pd.js", + "private": true +} diff --git a/packages/pnpm/spnpm.js b/packages/pnpm/dev/pd.js old mode 100644 new mode 100755 similarity index 89% rename from packages/pnpm/spnpm.js rename to packages/pnpm/dev/pd.js index c77d7e47602..ddf09cb403f --- a/packages/pnpm/spnpm.js +++ b/packages/pnpm/dev/pd.js @@ -1,7 +1,8 @@ +#!/usr/bin/env node const fs = require('fs') const esbuild = require('esbuild') const pathLib = require('path') -const packagesDir = pathLib.resolve(__dirname, '..') +const packagesDir = pathLib.resolve(__dirname, '../..') const localPackages = fs.readdirSync(packagesDir) @@ -41,8 +42,8 @@ const spnpmImportsPlugin = { bundle: true, platform: 'node', target: 'node14', - entryPoints: [pathLib.resolve(__dirname, 'lib/pnpm.js')], - outfile: pathLib.resolve(__dirname, 'dist-spnpm/spnpm.cjs'), + entryPoints: [pathLib.resolve(__dirname, '../lib/pnpm.js')], + outfile: pathLib.resolve(__dirname, 'dist/pnpm.cjs'), external: [ 'node-gyp', './get-uid-gid.js', // traces back to: https://github.com/npm/uid-number/blob/6e9bdb302ae4799d05abf12e922ccdb4bd9ea023/uid-number.js#L31 @@ -57,5 +58,5 @@ const spnpmImportsPlugin = { }) // Require the file just built by esbuild - require('./dist-spnpm/spnpm.cjs') + require('./dist/pnpm.cjs') })() diff --git a/packages/pnpm/package.json b/packages/pnpm/package.json index fb4d101a865..4954bbdde35 100644 --- a/packages/pnpm/package.json +++ b/packages/pnpm/package.json @@ -1,7 +1,7 @@ { "name": "pnpm", "description": "Fast, disk space efficient package manager", - "version": "7.0.1", + "version": "7.1.0", "bin": { "pnpm": "bin/pnpm.cjs", "pnpx": "bin/pnpx.cjs" @@ -22,7 +22,7 @@ "@pnpm/assert-project": "workspace:*", "@pnpm/byline": "^1.0.0", "@pnpm/cli-meta": "workspace:3.0.1", - "@pnpm/cli-utils": "workspace:0.7.4", + "@pnpm/cli-utils": "workspace:0.7.5", "@pnpm/client": "workspace:7.1.1", "@pnpm/command": "workspace:3.0.0", "@pnpm/common-cli-options-help": "workspace:0.9.0", @@ -31,34 +31,33 @@ "@pnpm/core-loggers": "workspace:7.0.1", "@pnpm/default-reporter": "workspace:9.0.4", "@pnpm/file-reporter": "workspace:3.0.0", - "@pnpm/filter-workspace-packages": "workspace:5.0.4", + "@pnpm/filter-workspace-packages": "workspace:5.0.5", "@pnpm/find-workspace-dir": "workspace:4.0.1", - "@pnpm/find-workspace-packages": "workspace:4.0.4", + "@pnpm/find-workspace-packages": "workspace:4.0.5", "@pnpm/lockfile-types": "workspace:4.0.1", "@pnpm/logger": "^4.0.0", "@pnpm/modules-yaml": "workspace:10.0.1", "@pnpm/nopt": "^0.2.1", "@pnpm/parse-cli-args": "workspace:5.0.1", "@pnpm/pick-registry-for-package": "workspace:3.0.1", - "@pnpm/plugin-commands-audit": "workspace:6.0.4", - "@pnpm/plugin-commands-env": "workspace:2.1.3", - "@pnpm/plugin-commands-init": "workspace:1.0.4", - "@pnpm/plugin-commands-installation": "workspace:10.0.4", - "@pnpm/plugin-commands-listing": "workspace:5.0.4", - "@pnpm/plugin-commands-outdated": "workspace:6.0.4", - "@pnpm/plugin-commands-publishing": "workspace:5.0.5", - "@pnpm/plugin-commands-rebuild": "workspace:6.1.3", - "@pnpm/plugin-commands-script-runners": "workspace:5.0.4", - "@pnpm/plugin-commands-server": "workspace:4.0.4", - "@pnpm/plugin-commands-setup": "workspace:2.0.4", - "@pnpm/plugin-commands-store": "workspace:5.1.3", + "@pnpm/plugin-commands-audit": "workspace:6.0.5", + "@pnpm/plugin-commands-env": "workspace:2.1.4", + "@pnpm/plugin-commands-init": "workspace:1.0.5", + "@pnpm/plugin-commands-installation": "workspace:10.0.5", + "@pnpm/plugin-commands-listing": "workspace:5.0.5", + "@pnpm/plugin-commands-outdated": "workspace:6.0.5", + "@pnpm/plugin-commands-publishing": "workspace:5.0.6", + "@pnpm/plugin-commands-rebuild": "workspace:6.1.4", + "@pnpm/plugin-commands-script-runners": "workspace:5.0.5", + "@pnpm/plugin-commands-server": "workspace:4.0.5", + "@pnpm/plugin-commands-setup": "workspace:2.0.5", + "@pnpm/plugin-commands-store": "workspace:5.1.4", "@pnpm/prepare": "workspace:*", "@pnpm/read-package-json": "workspace:6.0.2", "@pnpm/read-project-manifest": "workspace:3.0.2", "@pnpm/registry-mock": "2.16.0", "@pnpm/run-npm": "workspace:4.0.1", "@pnpm/tabtab": "^0.1.2", - "@pnpm/ts-execution-runtime": "workspace:*", "@pnpm/types": "workspace:8.0.1", "@pnpm/write-project-manifest": "workspace:3.0.1", "@types/cross-spawn": "^6.0.2", diff --git a/packages/pnpm/spnpx.js b/packages/pnpm/spnpx.js deleted file mode 100644 index 195b50bd078..00000000000 --- a/packages/pnpm/spnpx.js +++ /dev/null @@ -1,3 +0,0 @@ -require('@pnpm/ts-execution-runtime') - -require('./src/pnpx.ts') diff --git a/packages/pnpm/src/main.ts b/packages/pnpm/src/main.ts index 5626c0efb3b..aaaff22bca5 100644 --- a/packages/pnpm/src/main.ts +++ b/packages/pnpm/src/main.ts @@ -98,6 +98,9 @@ export default async function run (inputArgv: string[]) { workspaceDir, checkUnknownSetting: false, }) as typeof config + if (cmd === 'dlx') { + config.useStderr = true + } config.forceSharedLockfile = typeof config.workspaceDir === 'string' && config.sharedWorkspaceLockfile === true config.argv = argv config.fallbackCommandUsed = fallbackCommandUsed diff --git a/packages/pnpm/test/cli.ts b/packages/pnpm/test/cli.ts index 6b71c585642..2c9efda51f0 100644 --- a/packages/pnpm/test/cli.ts +++ b/packages/pnpm/test/cli.ts @@ -136,7 +136,7 @@ test('pnpx works', () => { const result = execPnpxSync(['hello-world-js-bin'], { env }) - expect(result.stdout.toString()).toMatch(/Hello world!/) + expect(result.stdout.toString()).toEqual('Hello world!\n') expect(result.status).toBe(0) }) diff --git a/packages/pnpm/test/monorepo/index.ts b/packages/pnpm/test/monorepo/index.ts index 18d0f53517c..490fa2c5a3c 100644 --- a/packages/pnpm/test/monorepo/index.ts +++ b/packages/pnpm/test/monorepo/index.ts @@ -1559,3 +1559,84 @@ test('directory filtering', async () => { expect(output).toContain('project-2') } }) + +test('run --stream should prefix with dir name', async () => { + preparePackages([ + { + location: '.', + package: { + name: 'root', + version: '0.0.0', + private: true, + }, + }, + { + location: 'packages/alfa', + package: { + name: 'alfa', + version: '1.0.0', + scripts: { + test: "node -e \"console.log('OK')\"", + }, + }, + }, + { + location: 'packages/beta', + package: { + name: 'beta', + version: '1.0.0', + scripts: { + test: "node -e \"console.log('OK')\"", + }, + }, + }, + ]) + + process.chdir('..') + await writeYamlFile('pnpm-workspace.yaml', { packages: ['**', '!store/**'] }) + + const result = execPnpmSync([ + '--stream', + '--filter', + 'alfa', + '--filter', + 'beta', + 'run', + 'test', + ]) + expect( + result.stdout + .toString() + .trim() + .split('\n') + .sort() + .join('\n') + ).toBe( + `Scope: 2 of 3 workspace projects +packages/alfa test$ node -e "console.log('OK')" +packages/alfa test: Done +packages/alfa test: OK +packages/beta test$ node -e "console.log('OK')" +packages/beta test: Done +packages/beta test: OK` + ) + const singleResult = execPnpmSync([ + '--stream', + '--filter', + 'alfa', + 'run', + 'test', + ]) + expect( + singleResult.stdout + .toString() + .trim() + .split('\n') + .sort() + .join('\n') + ).toBe( + `packages/alfa test$ node -e "console.log('OK')" +packages/alfa test: Done +packages/alfa test: OK` + ) +}) diff --git a/packages/read-projects-context/CHANGELOG.md b/packages/read-projects-context/CHANGELOG.md index 44eb9492190..e2adde7ddef 100644 --- a/packages/read-projects-context/CHANGELOG.md +++ b/packages/read-projects-context/CHANGELOG.md @@ -1,5 +1,12 @@ # @pnpm/read-projects-context +## 6.0.3 + +### Patch Changes + +- Updated dependencies [52b0576af] + - @pnpm/lockfile-file@5.0.3 + ## 6.0.2 ### Patch Changes diff --git a/packages/read-projects-context/package.json b/packages/read-projects-context/package.json index 0bf23cceb68..bc039be8967 100644 --- a/packages/read-projects-context/package.json +++ b/packages/read-projects-context/package.json @@ -1,6 +1,6 @@ { "name": "@pnpm/read-projects-context", - "version": "6.0.2", + "version": "6.0.3", "description": "Reads the current state of projects from modules manifest", "main": "lib/index.js", "types": "lib/index.d.ts", @@ -28,7 +28,7 @@ "compile": "tsc --build && pnpm run lint --fix" }, "dependencies": { - "@pnpm/lockfile-file": "workspace:5.0.2", + "@pnpm/lockfile-file": "workspace:5.0.3", "@pnpm/modules-yaml": "workspace:10.0.1", "@pnpm/normalize-registries": "workspace:3.0.1", "@pnpm/types": "workspace:8.0.1", @@ -36,7 +36,7 @@ }, "devDependencies": { "@pnpm/logger": "^4.0.0", - "@pnpm/read-projects-context": "workspace:6.0.2" + "@pnpm/read-projects-context": "workspace:6.0.3" }, "bugs": { "url": "https://github.com/pnpm/pnpm/issues" diff --git a/packages/real-hoist/package.json b/packages/real-hoist/package.json index e0c6f1b337f..285e451fa4e 100644 --- a/packages/real-hoist/package.json +++ b/packages/real-hoist/package.json @@ -37,7 +37,7 @@ }, "funding": "https://opencollective.com/pnpm", "devDependencies": { - "@pnpm/lockfile-file": "workspace:5.0.2", + "@pnpm/lockfile-file": "workspace:5.0.3", "@pnpm/logger": "^4.0.0", "@pnpm/real-hoist": "workspace:0.2.2" }, diff --git a/packages/resolve-dependencies/CHANGELOG.md b/packages/resolve-dependencies/CHANGELOG.md index 43259288687..9c288296fd1 100644 --- a/packages/resolve-dependencies/CHANGELOG.md +++ b/packages/resolve-dependencies/CHANGELOG.md @@ -1,5 +1,11 @@ # @pnpm/resolve-dependencies +## 27.0.3 + +### Patch Changes + +- 52b0576af: feat: support libc filed + ## 27.0.2 ### Patch Changes diff --git a/packages/resolve-dependencies/package.json b/packages/resolve-dependencies/package.json index 137941a2c81..0cfe0203b9e 100644 --- a/packages/resolve-dependencies/package.json +++ b/packages/resolve-dependencies/package.json @@ -1,6 +1,6 @@ { "name": "@pnpm/resolve-dependencies", - "version": "27.0.2", + "version": "27.0.3", "description": "Resolves dependency graph of a package", "main": "lib/index.js", "types": "lib/index.d.ts", @@ -60,7 +60,7 @@ }, "devDependencies": { "@pnpm/logger": "^4.0.0", - "@pnpm/resolve-dependencies": "workspace:27.0.2", + "@pnpm/resolve-dependencies": "workspace:27.0.3", "@types/ramda": "0.27.39", "@types/semver": "^7.3.4" }, diff --git a/packages/resolve-dependencies/src/resolveDependencies.ts b/packages/resolve-dependencies/src/resolveDependencies.ts index 98df169c1ed..97e35789cb3 100644 --- a/packages/resolve-dependencies/src/resolveDependencies.ts +++ b/packages/resolve-dependencies/src/resolveDependencies.ts @@ -197,6 +197,7 @@ export interface ResolvedPackage { } cpu?: string[] os?: string[] + libc?: string[] } } @@ -878,6 +879,7 @@ function getResolvedPackage ( deprecated: options.pkg.deprecated, engines: options.pkg.engines, os: options.pkg.os, + libc: options.pkg.libc, }, depPath: options.depPath, dev: options.wantedDependency.dev, diff --git a/packages/resolve-dependencies/src/updateLockfile.ts b/packages/resolve-dependencies/src/updateLockfile.ts index d2b3f4855a0..2290f9f4b73 100644 --- a/packages/resolve-dependencies/src/updateLockfile.ts +++ b/packages/resolve-dependencies/src/updateLockfile.ts @@ -144,6 +144,9 @@ function toLockfileDependency ( if (pkg.additionalInfo.os != null) { result['os'] = pkg.additionalInfo.os } + if (pkg.additionalInfo.libc != null) { + result['libc'] = pkg.additionalInfo.libc + } if (Array.isArray(pkg.additionalInfo.bundledDependencies) || Array.isArray(pkg.additionalInfo.bundleDependencies)) { result['bundledDependencies'] = pkg.additionalInfo.bundledDependencies ?? pkg.additionalInfo.bundleDependencies } diff --git a/packages/server/package.json b/packages/server/package.json index 5f77119454a..8dbd84bc494 100644 --- a/packages/server/package.json +++ b/packages/server/package.json @@ -35,8 +35,8 @@ "devDependencies": { "@pnpm/client": "workspace:7.1.1", "@pnpm/logger": "^4.0.0", - "@pnpm/package-requester": "workspace:18.0.3", - "@pnpm/package-store": "workspace:13.0.3", + "@pnpm/package-requester": "workspace:18.0.4", + "@pnpm/package-store": "workspace:13.0.4", "@pnpm/server": "workspace:12.0.1", "@types/mz": "^2.7.3", "@types/uuid": "^8.3.0", diff --git a/packages/store-connection-manager/CHANGELOG.md b/packages/store-connection-manager/CHANGELOG.md index de682ad3353..ec2af119a79 100644 --- a/packages/store-connection-manager/CHANGELOG.md +++ b/packages/store-connection-manager/CHANGELOG.md @@ -1,5 +1,12 @@ # @pnpm/store-connection-manager +## 4.1.4 + +### Patch Changes + +- @pnpm/package-store@13.0.4 +- @pnpm/server@12.0.1 + ## 4.1.3 ### Patch Changes diff --git a/packages/store-connection-manager/package.json b/packages/store-connection-manager/package.json index 83a297528c2..0c530ddfa37 100644 --- a/packages/store-connection-manager/package.json +++ b/packages/store-connection-manager/package.json @@ -1,6 +1,6 @@ { "name": "@pnpm/store-connection-manager", - "version": "4.1.3", + "version": "4.1.4", "description": "Create a direct pnpm store controller or connect to a running store server", "main": "lib/index.js", "types": "lib/index.d.ts", @@ -30,14 +30,14 @@ "homepage": "https://github.com/pnpm/pnpm/blob/main/packages/store-connection-manager#readme", "devDependencies": { "@pnpm/logger": "^4.0.0", - "@pnpm/store-connection-manager": "workspace:4.1.3" + "@pnpm/store-connection-manager": "workspace:4.1.4" }, "dependencies": { "@pnpm/cli-meta": "workspace:3.0.1", "@pnpm/client": "workspace:7.1.1", "@pnpm/config": "workspace:15.1.1", "@pnpm/error": "workspace:3.0.1", - "@pnpm/package-store": "workspace:13.0.3", + "@pnpm/package-store": "workspace:13.0.4", "@pnpm/server": "workspace:12.0.1", "@pnpm/store-path": "workspace:6.0.0", "@zkochan/diable": "^1.0.2", diff --git a/packages/types/src/package.ts b/packages/types/src/package.ts index 66ea249d7a8..4d1bb00b41c 100644 --- a/packages/types/src/package.ts +++ b/packages/types/src/package.ts @@ -93,6 +93,7 @@ export interface BaseManifest { } cpu?: string[] os?: string[] + libc?: string[] main?: string module?: string typings?: string diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index d40c0b2380d..d06bf084688 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -12,7 +12,7 @@ overrides: hosted-git-info@4: npm:@zkochan/hosted-git-info@^4.0.2 http-errors: ^1.7.3 istanbul-reports: npm:@zkochan/istanbul-reports - js-yaml@^4.0.0: npm:@zkochan/js-yaml@0.0.5 + js-yaml@^4.0.0: npm:@zkochan/js-yaml@0.0.6 lodash@<4.17.19: ^4.17.9 nopt@5: npm:@pnpm/nopt@^0.2.1 pkg-fetch: 3.1.1 @@ -80,7 +80,7 @@ importers: cross-env: 7.0.3 eslint: 8.15.0 husky: 7.0.4 - jest: 27.5.1_o6s2m2xtd45l6w6tzwuiksf67y + jest: 27.5.1_ts-node@10.7.0 lcov-result-merger: 3.1.0 npm-run-all: 4.1.5 publish-packed: 4.1.1 @@ -95,7 +95,7 @@ importers: .meta-updater: specifiers: '@pnpm-private/updater': workspace:* - '@pnpm/lockfile-file': workspace:5.0.2 + '@pnpm/lockfile-file': workspace:5.0.3 '@pnpm/types': workspace:8.0.1 '@types/normalize-path': ^3.0.0 is-subdir: ^1.1.1 @@ -117,31 +117,31 @@ importers: packages/artifacts/linux-arm64: specifiers: - '@pnpm/linux-arm64': workspace:7.0.1 + '@pnpm/linux-arm64': workspace:7.1.0 devDependencies: '@pnpm/linux-arm64': 'link:' packages/artifacts/linux-x64: specifiers: - '@pnpm/linux-x64': workspace:7.0.1 + '@pnpm/linux-x64': workspace:7.1.0 devDependencies: '@pnpm/linux-x64': 'link:' packages/artifacts/macos-arm64: specifiers: - '@pnpm/macos-arm64': workspace:7.0.1 + '@pnpm/macos-arm64': workspace:7.1.0 devDependencies: '@pnpm/macos-arm64': 'link:' packages/artifacts/macos-x64: specifiers: - '@pnpm/macos-x64': workspace:7.0.1 + '@pnpm/macos-x64': workspace:7.1.0 devDependencies: '@pnpm/macos-x64': 'link:' packages/artifacts/win-x64: specifiers: - '@pnpm/win-x64': workspace:7.0.1 + '@pnpm/win-x64': workspace:7.1.0 devDependencies: '@pnpm/win-x64': 'link:' @@ -151,7 +151,7 @@ importers: '@pnpm/constants': workspace:6.1.0 '@pnpm/error': workspace:3.0.1 '@pnpm/fetch': workspace:5.0.1 - '@pnpm/lockfile-file': workspace:5.0.2 + '@pnpm/lockfile-file': workspace:5.0.3 '@pnpm/lockfile-types': workspace:4.0.1 '@pnpm/lockfile-utils': workspace:4.0.2 '@pnpm/lockfile-walker': workspace:5.0.2 @@ -269,13 +269,13 @@ importers: packages/cli-utils: specifiers: '@pnpm/cli-meta': workspace:3.0.1 - '@pnpm/cli-utils': workspace:0.7.4 + '@pnpm/cli-utils': workspace:0.7.5 '@pnpm/config': workspace:15.1.1 '@pnpm/default-reporter': workspace:9.0.4 '@pnpm/error': workspace:3.0.1 '@pnpm/logger': ^4.0.0 '@pnpm/manifest-utils': workspace:3.0.2 - '@pnpm/package-is-installable': workspace:6.0.2 + '@pnpm/package-is-installable': workspace:6.0.3 '@pnpm/read-project-manifest': workspace:3.0.2 '@pnpm/types': workspace:8.0.1 '@types/ramda': 0.27.39 @@ -394,27 +394,27 @@ importers: '@pnpm/calc-dep-state': workspace:2.0.1 '@pnpm/client': workspace:7.1.1 '@pnpm/constants': workspace:6.1.0 - '@pnpm/core': workspace:5.1.0 + '@pnpm/core': workspace:5.1.1 '@pnpm/core-loggers': workspace:7.0.1 '@pnpm/error': workspace:3.0.1 - '@pnpm/filter-lockfile': workspace:6.0.2 - '@pnpm/get-context': workspace:6.1.1 + '@pnpm/filter-lockfile': workspace:6.0.3 + '@pnpm/get-context': workspace:6.1.2 '@pnpm/graph-sequencer': 1.0.0 - '@pnpm/headless': workspace:18.1.3 + '@pnpm/headless': workspace:18.1.4 '@pnpm/hoist': workspace:6.1.1 '@pnpm/lifecycle': workspace:13.0.2 '@pnpm/link-bins': workspace:7.1.1 - '@pnpm/lockfile-file': workspace:5.0.2 - '@pnpm/lockfile-to-pnp': workspace:0.5.3 + '@pnpm/lockfile-file': workspace:5.0.3 + '@pnpm/lockfile-to-pnp': workspace:0.5.4 '@pnpm/lockfile-utils': workspace:4.0.2 '@pnpm/lockfile-walker': workspace:5.0.2 '@pnpm/logger': ^4.0.0 '@pnpm/manifest-utils': workspace:3.0.2 - '@pnpm/modules-cleaner': workspace:12.0.3 + '@pnpm/modules-cleaner': workspace:12.0.4 '@pnpm/modules-yaml': workspace:10.0.1 '@pnpm/normalize-registries': workspace:3.0.1 - '@pnpm/package-requester': workspace:18.0.3 - '@pnpm/package-store': workspace:13.0.3 + '@pnpm/package-requester': workspace:18.0.4 + '@pnpm/package-store': workspace:13.0.4 '@pnpm/parse-overrides': workspace:2.0.1 '@pnpm/parse-wanted-dependency': workspace:3.0.0 '@pnpm/prepare': workspace:* @@ -424,7 +424,7 @@ importers: '@pnpm/read-project-manifest': workspace:3.0.2 '@pnpm/registry-mock': 2.16.0 '@pnpm/remove-bins': workspace:3.0.2 - '@pnpm/resolve-dependencies': workspace:27.0.2 + '@pnpm/resolve-dependencies': workspace:27.0.3 '@pnpm/resolver-base': workspace:9.0.1 '@pnpm/store-controller-types': workspace:13.0.1 '@pnpm/store-path': workspace:6.0.0 @@ -440,7 +440,7 @@ importers: '@types/semver': ^7.3.4 '@types/sinon': ^10.0.6 '@yarnpkg/core': 3.2.0 - '@yarnpkg/plugin-compat': 4.0.0-rc.4 + '@yarnpkg/extensions': 1.1.0-rc.1 '@zkochan/npm-package-arg': ^2.0.1 '@zkochan/rimraf': ^2.1.2 deep-require-cwd: 1.0.0 @@ -503,7 +503,7 @@ importers: '@pnpm/symlink-dependency': link:../symlink-dependency '@pnpm/types': link:../types '@pnpm/which-version-is-pinned': link:../which-version-is-pinned - '@yarnpkg/plugin-compat': 4.0.0-rc.4_@yarnpkg+core@3.2.0 + '@yarnpkg/extensions': 1.1.0-rc.1_@yarnpkg+core@3.2.0 '@zkochan/npm-package-arg': 2.0.1 '@zkochan/rimraf': 2.1.2 dependency-path: link:../dependency-path @@ -683,7 +683,7 @@ importers: packages/dependencies-hierarchy: specifiers: '@pnpm/constants': workspace:6.1.0 - '@pnpm/lockfile-file': workspace:5.0.2 + '@pnpm/lockfile-file': workspace:5.0.3 '@pnpm/lockfile-utils': workspace:4.0.2 '@pnpm/logger': ^4.0.0 '@pnpm/modules-yaml': workspace:10.0.1 @@ -692,7 +692,7 @@ importers: '@pnpm/read-package-json': workspace:6.0.2 '@pnpm/types': workspace:8.0.1 '@types/normalize-path': ^3.0.0 - dependencies-hierarchy: workspace:11.0.2 + dependencies-hierarchy: workspace:11.0.3 dependency-path: workspace:9.1.1 normalize-path: ^3.0.0 realpath-missing: ^1.1.0 @@ -766,12 +766,12 @@ importers: packages/exe: specifiers: - '@pnpm/exe': workspace:7.0.1 - '@pnpm/linux-arm64': workspace:7.0.1 - '@pnpm/linux-x64': workspace:7.0.1 - '@pnpm/macos-arm64': workspace:7.0.1 - '@pnpm/macos-x64': workspace:7.0.1 - '@pnpm/win-x64': workspace:7.0.1 + '@pnpm/exe': workspace:7.1.0 + '@pnpm/linux-arm64': workspace:7.1.0 + '@pnpm/linux-x64': workspace:7.1.0 + '@pnpm/macos-arm64': workspace:7.1.0 + '@pnpm/macos-x64': workspace:7.1.0 + '@pnpm/win-x64': workspace:7.1.0 '@zkochan/pkg': 0.0.0-2 execa: npm:safe-execa@^0.1.1 optionalDependencies: @@ -870,15 +870,16 @@ importers: specifiers: '@pnpm/constants': workspace:6.1.0 '@pnpm/error': workspace:3.0.1 - '@pnpm/filter-lockfile': workspace:6.0.2 + '@pnpm/filter-lockfile': workspace:6.0.3 '@pnpm/lockfile-types': workspace:4.0.1 '@pnpm/lockfile-utils': workspace:4.0.2 '@pnpm/lockfile-walker': workspace:5.0.2 '@pnpm/logger': ^4.0.0 - '@pnpm/package-is-installable': workspace:6.0.2 + '@pnpm/package-is-installable': workspace:6.0.3 '@pnpm/types': workspace:8.0.1 '@types/ramda': 0.27.39 dependency-path: workspace:9.1.1 + detect-libc: ^2.0.1 ramda: ^0.27.1 tempy: ^1.0.0 write-yaml-file: ^4.2.0 @@ -897,6 +898,7 @@ importers: '@pnpm/filter-lockfile': 'link:' '@pnpm/logger': 4.0.0 '@types/ramda': 0.27.39 + detect-libc: 2.0.1 tempy: 1.0.1 write-yaml-file: 4.2.0 yaml-tag: 1.1.0 @@ -904,8 +906,8 @@ importers: packages/filter-workspace-packages: specifiers: '@pnpm/error': workspace:3.0.1 - '@pnpm/filter-workspace-packages': workspace:5.0.4 - '@pnpm/find-workspace-packages': workspace:4.0.4 + '@pnpm/filter-workspace-packages': workspace:5.0.5 + '@pnpm/find-workspace-packages': workspace:4.0.5 '@pnpm/matcher': workspace:3.0.0 '@types/is-ci': ^3.0.0 '@types/is-windows': ^1.0.0 @@ -972,9 +974,9 @@ importers: packages/find-workspace-packages: specifiers: - '@pnpm/cli-utils': workspace:0.7.4 + '@pnpm/cli-utils': workspace:0.7.5 '@pnpm/constants': workspace:6.1.0 - '@pnpm/find-workspace-packages': workspace:4.0.4 + '@pnpm/find-workspace-packages': workspace:4.0.5 '@pnpm/types': workspace:8.0.1 find-packages: workspace:9.0.2 read-yaml-file: ^2.1.0 @@ -992,11 +994,11 @@ importers: '@pnpm/constants': workspace:6.1.0 '@pnpm/core-loggers': workspace:7.0.1 '@pnpm/error': workspace:3.0.1 - '@pnpm/get-context': workspace:6.1.1 - '@pnpm/lockfile-file': workspace:5.0.2 + '@pnpm/get-context': workspace:6.1.2 + '@pnpm/lockfile-file': workspace:5.0.3 '@pnpm/logger': ^4.0.0 '@pnpm/modules-yaml': workspace:10.0.1 - '@pnpm/read-projects-context': workspace:6.0.2 + '@pnpm/read-projects-context': workspace:6.0.3 '@pnpm/types': workspace:8.0.1 '@types/is-ci': ^3.0.0 '@types/ramda': 0.27.39 @@ -1092,24 +1094,24 @@ importers: '@pnpm/constants': workspace:6.1.0 '@pnpm/core-loggers': workspace:7.0.1 '@pnpm/error': workspace:3.0.1 - '@pnpm/filter-lockfile': workspace:6.0.2 - '@pnpm/headless': workspace:18.1.3 + '@pnpm/filter-lockfile': workspace:6.0.3 + '@pnpm/headless': workspace:18.1.4 '@pnpm/hoist': workspace:6.1.1 '@pnpm/lifecycle': workspace:13.0.2 '@pnpm/link-bins': workspace:7.1.1 - '@pnpm/lockfile-file': workspace:5.0.2 - '@pnpm/lockfile-to-pnp': workspace:0.5.3 + '@pnpm/lockfile-file': workspace:5.0.3 + '@pnpm/lockfile-to-pnp': workspace:0.5.4 '@pnpm/lockfile-utils': workspace:4.0.2 '@pnpm/logger': ^4.0.0 - '@pnpm/modules-cleaner': workspace:12.0.3 + '@pnpm/modules-cleaner': workspace:12.0.4 '@pnpm/modules-yaml': workspace:10.0.1 - '@pnpm/package-is-installable': workspace:6.0.2 - '@pnpm/package-requester': workspace:18.0.3 - '@pnpm/package-store': workspace:13.0.3 + '@pnpm/package-is-installable': workspace:6.0.3 + '@pnpm/package-requester': workspace:18.0.4 + '@pnpm/package-store': workspace:13.0.4 '@pnpm/prepare': workspace:* '@pnpm/read-package-json': workspace:6.0.2 '@pnpm/read-project-manifest': workspace:3.0.2 - '@pnpm/read-projects-context': workspace:6.0.2 + '@pnpm/read-projects-context': workspace:6.0.3 '@pnpm/real-hoist': workspace:0.2.2 '@pnpm/registry-mock': 2.16.0 '@pnpm/store-controller-types': workspace:13.0.1 @@ -1305,7 +1307,7 @@ importers: packages/list: specifiers: - '@pnpm/list': workspace:7.0.2 + '@pnpm/list': workspace:7.0.3 '@pnpm/logger': ^4.0.0 '@pnpm/matcher': workspace:3.0.0 '@pnpm/read-package-json': workspace:6.0.2 @@ -1318,7 +1320,7 @@ importers: archy: ^1.0.0 chalk: ^4.1.0 cli-columns: ^4.0.0 - dependencies-hierarchy: workspace:11.0.2 + dependencies-hierarchy: workspace:11.0.3 p-limit: ^3.1.0 ramda: ^0.27.1 semver: ^7.3.4 @@ -1371,7 +1373,7 @@ importers: specifiers: '@pnpm/constants': workspace:6.1.0 '@pnpm/error': workspace:3.0.1 - '@pnpm/lockfile-file': workspace:5.0.2 + '@pnpm/lockfile-file': workspace:5.0.3 '@pnpm/lockfile-types': workspace:4.0.1 '@pnpm/logger': ^4.0.0 '@pnpm/merge-lockfile-changes': workspace:3.0.1 @@ -1383,7 +1385,7 @@ importers: '@types/write-file-atomic': ^3.0.1 '@zkochan/rimraf': ^2.1.2 comver-to-semver: ^1.0.0 - js-yaml: npm:@zkochan/js-yaml@0.0.5 + js-yaml: npm:@zkochan/js-yaml@0.0.6 normalize-path: ^3.0.0 ramda: ^0.27.1 semver: ^7.3.4 @@ -1401,7 +1403,7 @@ importers: '@pnpm/types': link:../types '@zkochan/rimraf': 2.1.2 comver-to-semver: 1.0.0 - js-yaml: /@zkochan/js-yaml/0.0.5 + js-yaml: /@zkochan/js-yaml/0.0.6 normalize-path: 3.0.0 ramda: 0.27.2 semver: 7.3.7 @@ -1423,8 +1425,8 @@ importers: packages/lockfile-to-pnp: specifiers: '@pnpm/config': workspace:15.1.1 - '@pnpm/lockfile-file': workspace:5.0.2 - '@pnpm/lockfile-to-pnp': workspace:0.5.3 + '@pnpm/lockfile-file': workspace:5.0.3 + '@pnpm/lockfile-to-pnp': workspace:0.5.4 '@pnpm/lockfile-utils': workspace:4.0.2 '@pnpm/logger': ^4.0.0 '@pnpm/read-project-manifest': workspace:3.0.2 @@ -1516,9 +1518,9 @@ importers: '@pnpm/exec': ^2.0.0 '@pnpm/exportable-manifest': workspace:3.0.2 '@pnpm/find-workspace-dir': workspace:4.0.1 - '@pnpm/lockfile-file': workspace:5.0.2 + '@pnpm/lockfile-file': workspace:5.0.3 '@pnpm/logger': ^4.0.0 - '@pnpm/make-dedicated-lockfile': workspace:0.3.2 + '@pnpm/make-dedicated-lockfile': workspace:0.3.3 '@pnpm/prune-lockfile': workspace:4.0.2 '@pnpm/read-project-manifest': workspace:3.0.2 '@pnpm/test-fixtures': workspace:* @@ -1587,11 +1589,11 @@ importers: packages/modules-cleaner: specifiers: '@pnpm/core-loggers': workspace:7.0.1 - '@pnpm/filter-lockfile': workspace:6.0.2 + '@pnpm/filter-lockfile': workspace:6.0.3 '@pnpm/lockfile-types': workspace:4.0.1 '@pnpm/lockfile-utils': workspace:4.0.2 '@pnpm/logger': ^4.0.0 - '@pnpm/modules-cleaner': workspace:12.0.3 + '@pnpm/modules-cleaner': workspace:12.0.4 '@pnpm/read-modules-dir': workspace:4.0.0 '@pnpm/remove-bins': workspace:3.0.2 '@pnpm/store-controller-types': workspace:13.0.1 @@ -1640,10 +1642,10 @@ importers: specifiers: '@pnpm/cafs': workspace:4.0.2 '@pnpm/config': workspace:15.1.1 - '@pnpm/lockfile-file': workspace:5.0.2 + '@pnpm/lockfile-file': workspace:5.0.3 '@pnpm/lockfile-utils': workspace:4.0.2 '@pnpm/logger': ^4.0.0 - '@pnpm/mount-modules': workspace:0.2.4 + '@pnpm/mount-modules': workspace:0.2.5 '@pnpm/store-path': workspace:6.0.0 '@pnpm/types': workspace:8.0.1 '@types/normalize-path': ^3.0.0 @@ -1776,13 +1778,13 @@ importers: '@pnpm/client': workspace:7.1.1 '@pnpm/constants': workspace:6.1.0 '@pnpm/error': workspace:3.0.1 - '@pnpm/lockfile-file': workspace:5.0.2 + '@pnpm/lockfile-file': workspace:5.0.3 '@pnpm/lockfile-utils': workspace:4.0.2 '@pnpm/logger': ^4.0.0 '@pnpm/manifest-utils': workspace:3.0.2 '@pnpm/matcher': workspace:3.0.0 '@pnpm/modules-yaml': workspace:10.0.1 - '@pnpm/outdated': workspace:10.0.2 + '@pnpm/outdated': workspace:10.0.3 '@pnpm/pick-registry-for-package': workspace:3.0.1 '@pnpm/types': workspace:8.0.1 '@types/ramda': 0.27.39 @@ -1832,9 +1834,10 @@ importers: '@pnpm/core-loggers': workspace:7.0.1 '@pnpm/error': workspace:3.0.1 '@pnpm/logger': ^4.0.0 - '@pnpm/package-is-installable': workspace:6.0.2 + '@pnpm/package-is-installable': workspace:6.0.3 '@pnpm/types': workspace:8.0.1 '@types/semver': ^7.3.4 + detect-libc: ^2.0.1 execa: npm:safe-execa@^0.1.1 mem: ^8.0.0 semver: ^7.3.4 @@ -1842,6 +1845,7 @@ importers: '@pnpm/core-loggers': link:../core-loggers '@pnpm/error': link:../error '@pnpm/types': link:../types + detect-libc: 2.0.1 execa: /safe-execa/0.1.1 mem: 8.1.1 semver: 7.3.7 @@ -1860,8 +1864,8 @@ importers: '@pnpm/fetcher-base': workspace:12.0.1 '@pnpm/graceful-fs': workspace:2.0.0 '@pnpm/logger': ^4.0.0 - '@pnpm/package-is-installable': workspace:6.0.2 - '@pnpm/package-requester': workspace:18.0.3 + '@pnpm/package-is-installable': workspace:6.0.3 + '@pnpm/package-requester': workspace:18.0.4 '@pnpm/read-package-json': workspace:6.0.2 '@pnpm/registry-mock': 2.16.0 '@pnpm/resolver-base': workspace:9.0.1 @@ -1932,8 +1936,8 @@ importers: '@pnpm/create-cafs-store': workspace:1.0.1 '@pnpm/fetcher-base': workspace:12.0.1 '@pnpm/logger': ^4.0.0 - '@pnpm/package-requester': workspace:18.0.3 - '@pnpm/package-store': workspace:13.0.3 + '@pnpm/package-requester': workspace:18.0.4 + '@pnpm/package-store': workspace:13.0.4 '@pnpm/prepare': workspace:* '@pnpm/resolver-base': workspace:9.0.1 '@pnpm/store-controller-types': workspace:13.0.1 @@ -2036,12 +2040,12 @@ importers: packages/plugin-commands-audit: specifiers: '@pnpm/audit': workspace:3.0.2 - '@pnpm/cli-utils': workspace:0.7.4 + '@pnpm/cli-utils': workspace:0.7.5 '@pnpm/config': workspace:15.1.1 '@pnpm/constants': workspace:6.1.0 '@pnpm/error': workspace:3.0.1 - '@pnpm/lockfile-file': workspace:5.0.2 - '@pnpm/plugin-commands-audit': workspace:6.0.4 + '@pnpm/lockfile-file': workspace:5.0.3 + '@pnpm/plugin-commands-audit': workspace:6.0.5 '@pnpm/read-project-manifest': workspace:3.0.2 '@pnpm/test-fixtures': workspace:* '@pnpm/types': workspace:8.0.1 @@ -2080,13 +2084,13 @@ importers: packages/plugin-commands-env: specifiers: - '@pnpm/cli-utils': workspace:0.7.4 + '@pnpm/cli-utils': workspace:0.7.5 '@pnpm/config': workspace:15.1.1 '@pnpm/create-cafs-store': workspace:1.0.1 '@pnpm/error': workspace:3.0.1 '@pnpm/fetch': workspace:5.0.1 '@pnpm/fetcher-base': workspace:12.0.1 - '@pnpm/plugin-commands-env': workspace:2.1.3 + '@pnpm/plugin-commands-env': workspace:2.1.4 '@pnpm/prepare': workspace:* '@pnpm/store-path': workspace:6.0.0 '@pnpm/tarball-fetcher': workspace:10.0.2 @@ -2135,10 +2139,10 @@ importers: packages/plugin-commands-init: specifiers: - '@pnpm/cli-utils': workspace:0.7.4 + '@pnpm/cli-utils': workspace:0.7.5 '@pnpm/config': workspace:15.1.1 '@pnpm/error': workspace:3.0.1 - '@pnpm/plugin-commands-init': workspace:1.0.4 + '@pnpm/plugin-commands-init': workspace:1.0.5 '@pnpm/prepare': workspace:* '@pnpm/test-fixtures': workspace:* '@pnpm/write-project-manifest': workspace:3.0.1 @@ -2161,28 +2165,28 @@ importers: packages/plugin-commands-installation: specifiers: '@pnpm/assert-project': workspace:* - '@pnpm/cli-utils': workspace:0.7.4 + '@pnpm/cli-utils': workspace:0.7.5 '@pnpm/colorize-semver-diff': ^1.0.1 '@pnpm/command': workspace:3.0.0 '@pnpm/common-cli-options-help': workspace:0.9.0 '@pnpm/config': workspace:15.1.1 '@pnpm/constants': workspace:6.1.0 - '@pnpm/core': workspace:5.1.0 + '@pnpm/core': workspace:5.1.1 '@pnpm/error': workspace:3.0.1 - '@pnpm/filter-workspace-packages': workspace:5.0.4 + '@pnpm/filter-workspace-packages': workspace:5.0.5 '@pnpm/find-workspace-dir': workspace:4.0.1 - '@pnpm/find-workspace-packages': workspace:4.0.4 + '@pnpm/find-workspace-packages': workspace:4.0.5 '@pnpm/graceful-fs': workspace:2.0.0 '@pnpm/lockfile-types': workspace:4.0.1 '@pnpm/logger': ^4.0.0 '@pnpm/manifest-utils': workspace:3.0.2 '@pnpm/matcher': workspace:3.0.0 '@pnpm/modules-yaml': workspace:10.0.1 - '@pnpm/outdated': workspace:10.0.2 - '@pnpm/package-store': workspace:13.0.3 + '@pnpm/outdated': workspace:10.0.3 + '@pnpm/package-store': workspace:13.0.4 '@pnpm/parse-wanted-dependency': workspace:3.0.0 - '@pnpm/plugin-commands-installation': workspace:10.0.4 - '@pnpm/plugin-commands-rebuild': workspace:6.1.3 + '@pnpm/plugin-commands-installation': workspace:10.0.5 + '@pnpm/plugin-commands-rebuild': workspace:6.1.4 '@pnpm/pnpmfile': workspace:2.0.2 '@pnpm/prepare': workspace:* '@pnpm/read-project-manifest': workspace:3.0.2 @@ -2190,7 +2194,7 @@ importers: '@pnpm/resolver-base': workspace:9.0.1 '@pnpm/semver-diff': ^1.0.2 '@pnpm/sort-packages': workspace:3.0.2 - '@pnpm/store-connection-manager': workspace:4.1.3 + '@pnpm/store-connection-manager': workspace:4.1.4 '@pnpm/test-fixtures': workspace:* '@pnpm/types': workspace:8.0.1 '@types/is-ci': ^3.0.0 @@ -2303,16 +2307,16 @@ importers: packages/plugin-commands-listing: specifiers: - '@pnpm/cli-utils': workspace:0.7.4 + '@pnpm/cli-utils': workspace:0.7.5 '@pnpm/common-cli-options-help': workspace:0.9.0 '@pnpm/config': workspace:15.1.1 '@pnpm/constants': workspace:6.1.0 '@pnpm/error': workspace:3.0.1 - '@pnpm/filter-workspace-packages': workspace:5.0.4 - '@pnpm/list': workspace:7.0.2 + '@pnpm/filter-workspace-packages': workspace:5.0.5 + '@pnpm/list': workspace:7.0.3 '@pnpm/logger': ^4.0.0 - '@pnpm/plugin-commands-installation': workspace:10.0.4 - '@pnpm/plugin-commands-listing': workspace:5.0.4 + '@pnpm/plugin-commands-installation': workspace:10.0.5 + '@pnpm/plugin-commands-listing': workspace:5.0.5 '@pnpm/prepare': workspace:* '@pnpm/registry-mock': 2.16.0 '@pnpm/types': workspace:8.0.1 @@ -2346,7 +2350,7 @@ importers: packages/plugin-commands-outdated: specifiers: - '@pnpm/cli-utils': workspace:0.7.4 + '@pnpm/cli-utils': workspace:0.7.5 '@pnpm/colorize-semver-diff': ^1.0.1 '@pnpm/command': workspace:3.0.0 '@pnpm/common-cli-options-help': workspace:0.9.0 @@ -2354,13 +2358,13 @@ importers: '@pnpm/constants': workspace:6.1.0 '@pnpm/default-resolver': workspace:15.0.2 '@pnpm/error': workspace:3.0.1 - '@pnpm/filter-workspace-packages': workspace:5.0.4 - '@pnpm/lockfile-file': workspace:5.0.2 + '@pnpm/filter-workspace-packages': workspace:5.0.5 + '@pnpm/lockfile-file': workspace:5.0.3 '@pnpm/matcher': workspace:3.0.0 '@pnpm/modules-yaml': workspace:10.0.1 - '@pnpm/outdated': workspace:10.0.2 - '@pnpm/plugin-commands-installation': workspace:10.0.4 - '@pnpm/plugin-commands-outdated': workspace:6.0.4 + '@pnpm/outdated': workspace:10.0.3 + '@pnpm/plugin-commands-installation': workspace:10.0.5 + '@pnpm/plugin-commands-outdated': workspace:6.0.5 '@pnpm/prepare': workspace:* '@pnpm/registry-mock': 2.16.0 '@pnpm/semver-diff': ^1.0.2 @@ -2413,17 +2417,17 @@ importers: packages/plugin-commands-publishing: specifiers: - '@pnpm/cli-utils': workspace:0.7.4 + '@pnpm/cli-utils': workspace:0.7.5 '@pnpm/client': workspace:7.1.1 '@pnpm/config': workspace:15.1.1 '@pnpm/error': workspace:3.0.1 '@pnpm/exportable-manifest': workspace:3.0.2 - '@pnpm/filter-workspace-packages': workspace:5.0.4 + '@pnpm/filter-workspace-packages': workspace:5.0.5 '@pnpm/lifecycle': workspace:13.0.2 '@pnpm/logger': ^4.0.0 '@pnpm/package-bins': workspace:6.0.1 '@pnpm/pick-registry-for-package': workspace:3.0.1 - '@pnpm/plugin-commands-publishing': workspace:5.0.5 + '@pnpm/plugin-commands-publishing': workspace:5.0.6 '@pnpm/prepare': workspace:* '@pnpm/registry-mock': 2.16.0 '@pnpm/resolver-base': workspace:9.0.1 @@ -2508,14 +2512,14 @@ importers: packages/plugin-commands-rebuild: specifiers: - '@pnpm/cli-utils': workspace:0.7.4 + '@pnpm/cli-utils': workspace:0.7.5 '@pnpm/common-cli-options-help': workspace:0.9.0 '@pnpm/config': workspace:15.1.1 '@pnpm/constants': workspace:6.1.0 '@pnpm/core-loggers': workspace:7.0.1 - '@pnpm/filter-workspace-packages': workspace:5.0.4 - '@pnpm/find-workspace-packages': workspace:4.0.4 - '@pnpm/get-context': workspace:6.1.1 + '@pnpm/filter-workspace-packages': workspace:5.0.5 + '@pnpm/find-workspace-packages': workspace:4.0.5 + '@pnpm/get-context': workspace:6.1.2 '@pnpm/graph-sequencer': 1.0.0 '@pnpm/lifecycle': workspace:13.0.2 '@pnpm/link-bins': workspace:7.1.1 @@ -2524,11 +2528,11 @@ importers: '@pnpm/logger': ^4.0.0 '@pnpm/modules-yaml': workspace:10.0.1 '@pnpm/normalize-registries': workspace:3.0.1 - '@pnpm/plugin-commands-rebuild': workspace:6.1.3 + '@pnpm/plugin-commands-rebuild': workspace:6.1.4 '@pnpm/prepare': workspace:* '@pnpm/registry-mock': 2.16.0 '@pnpm/sort-packages': workspace:3.0.2 - '@pnpm/store-connection-manager': workspace:4.1.3 + '@pnpm/store-connection-manager': workspace:4.1.4 '@pnpm/store-controller-types': workspace:13.0.1 '@pnpm/test-fixtures': workspace:* '@pnpm/types': workspace:8.0.1 @@ -2597,17 +2601,17 @@ importers: packages/plugin-commands-script-runners: specifiers: - '@pnpm/cli-utils': workspace:0.7.4 + '@pnpm/cli-utils': workspace:0.7.5 '@pnpm/command': workspace:3.0.0 '@pnpm/common-cli-options-help': workspace:0.9.0 '@pnpm/config': workspace:15.1.1 '@pnpm/error': workspace:3.0.1 - '@pnpm/filter-workspace-packages': workspace:5.0.4 + '@pnpm/filter-workspace-packages': workspace:5.0.5 '@pnpm/lifecycle': workspace:13.0.2 '@pnpm/logger': ^4.0.0 '@pnpm/package-bins': workspace:6.0.1 - '@pnpm/plugin-commands-installation': workspace:10.0.4 - '@pnpm/plugin-commands-script-runners': workspace:5.0.4 + '@pnpm/plugin-commands-installation': workspace:10.0.5 + '@pnpm/plugin-commands-script-runners': workspace:5.0.5 '@pnpm/prepare': workspace:* '@pnpm/read-package-json': workspace:6.0.2 '@pnpm/read-project-manifest': workspace:3.0.2 @@ -2663,14 +2667,14 @@ importers: packages/plugin-commands-server: specifiers: '@pnpm/cli-meta': workspace:3.0.1 - '@pnpm/cli-utils': workspace:0.7.4 + '@pnpm/cli-utils': workspace:0.7.5 '@pnpm/common-cli-options-help': workspace:0.9.0 '@pnpm/config': workspace:15.1.1 '@pnpm/error': workspace:3.0.1 '@pnpm/logger': ^4.0.0 - '@pnpm/plugin-commands-server': workspace:4.0.4 + '@pnpm/plugin-commands-server': workspace:4.0.5 '@pnpm/server': workspace:12.0.1 - '@pnpm/store-connection-manager': workspace:4.1.3 + '@pnpm/store-connection-manager': workspace:4.1.4 '@pnpm/store-path': workspace:6.0.0 '@types/is-windows': ^1.0.0 '@types/ramda': 0.27.39 @@ -2711,14 +2715,16 @@ importers: packages/plugin-commands-setup: specifiers: - '@pnpm/cli-utils': workspace:0.7.4 + '@pnpm/cli-utils': workspace:0.7.5 + '@pnpm/error': workspace:3.0.1 '@pnpm/logger': ^4.0.0 - '@pnpm/plugin-commands-setup': workspace:2.0.4 + '@pnpm/plugin-commands-setup': workspace:2.0.5 '@pnpm/prepare': workspace:* execa: npm:safe-execa@^0.1.1 render-help: ^1.0.1 dependencies: '@pnpm/cli-utils': link:../cli-utils + '@pnpm/error': link:../error execa: /safe-execa/0.1.1 render-help: 1.0.2 devDependencies: @@ -2730,20 +2736,20 @@ importers: specifiers: '@pnpm/assert-store': workspace:* '@pnpm/cafs': workspace:4.0.2 - '@pnpm/cli-utils': workspace:0.7.4 + '@pnpm/cli-utils': workspace:0.7.5 '@pnpm/config': workspace:15.1.1 '@pnpm/error': workspace:3.0.1 - '@pnpm/get-context': workspace:6.1.1 - '@pnpm/lockfile-file': workspace:5.0.2 + '@pnpm/get-context': workspace:6.1.2 + '@pnpm/lockfile-file': workspace:5.0.3 '@pnpm/lockfile-utils': workspace:4.0.2 '@pnpm/logger': ^4.0.0 '@pnpm/normalize-registries': workspace:3.0.1 '@pnpm/parse-wanted-dependency': workspace:3.0.0 '@pnpm/pick-registry-for-package': workspace:3.0.1 - '@pnpm/plugin-commands-store': workspace:5.1.3 + '@pnpm/plugin-commands-store': workspace:5.1.4 '@pnpm/prepare': workspace:* '@pnpm/registry-mock': 2.16.0 - '@pnpm/store-connection-manager': workspace:4.1.3 + '@pnpm/store-connection-manager': workspace:4.1.4 '@pnpm/store-controller-types': workspace:13.0.1 '@pnpm/store-path': workspace:6.0.0 '@pnpm/types': workspace:8.0.1 @@ -2804,7 +2810,7 @@ importers: '@pnpm/assert-project': workspace:* '@pnpm/byline': ^1.0.0 '@pnpm/cli-meta': workspace:3.0.1 - '@pnpm/cli-utils': workspace:0.7.4 + '@pnpm/cli-utils': workspace:0.7.5 '@pnpm/client': workspace:7.1.1 '@pnpm/command': workspace:3.0.0 '@pnpm/common-cli-options-help': workspace:0.9.0 @@ -2813,34 +2819,33 @@ importers: '@pnpm/core-loggers': workspace:7.0.1 '@pnpm/default-reporter': workspace:9.0.4 '@pnpm/file-reporter': workspace:3.0.0 - '@pnpm/filter-workspace-packages': workspace:5.0.4 + '@pnpm/filter-workspace-packages': workspace:5.0.5 '@pnpm/find-workspace-dir': workspace:4.0.1 - '@pnpm/find-workspace-packages': workspace:4.0.4 + '@pnpm/find-workspace-packages': workspace:4.0.5 '@pnpm/lockfile-types': workspace:4.0.1 '@pnpm/logger': ^4.0.0 '@pnpm/modules-yaml': workspace:10.0.1 '@pnpm/nopt': ^0.2.1 '@pnpm/parse-cli-args': workspace:5.0.1 '@pnpm/pick-registry-for-package': workspace:3.0.1 - '@pnpm/plugin-commands-audit': workspace:6.0.4 - '@pnpm/plugin-commands-env': workspace:2.1.3 - '@pnpm/plugin-commands-init': workspace:1.0.4 - '@pnpm/plugin-commands-installation': workspace:10.0.4 - '@pnpm/plugin-commands-listing': workspace:5.0.4 - '@pnpm/plugin-commands-outdated': workspace:6.0.4 - '@pnpm/plugin-commands-publishing': workspace:5.0.5 - '@pnpm/plugin-commands-rebuild': workspace:6.1.3 - '@pnpm/plugin-commands-script-runners': workspace:5.0.4 - '@pnpm/plugin-commands-server': workspace:4.0.4 - '@pnpm/plugin-commands-setup': workspace:2.0.4 - '@pnpm/plugin-commands-store': workspace:5.1.3 + '@pnpm/plugin-commands-audit': workspace:6.0.5 + '@pnpm/plugin-commands-env': workspace:2.1.4 + '@pnpm/plugin-commands-init': workspace:1.0.5 + '@pnpm/plugin-commands-installation': workspace:10.0.5 + '@pnpm/plugin-commands-listing': workspace:5.0.5 + '@pnpm/plugin-commands-outdated': workspace:6.0.5 + '@pnpm/plugin-commands-publishing': workspace:5.0.6 + '@pnpm/plugin-commands-rebuild': workspace:6.1.4 + '@pnpm/plugin-commands-script-runners': workspace:5.0.5 + '@pnpm/plugin-commands-server': workspace:4.0.5 + '@pnpm/plugin-commands-setup': workspace:2.0.5 + '@pnpm/plugin-commands-store': workspace:5.1.4 '@pnpm/prepare': workspace:* '@pnpm/read-package-json': workspace:6.0.2 '@pnpm/read-project-manifest': workspace:3.0.2 '@pnpm/registry-mock': 2.16.0 '@pnpm/run-npm': workspace:4.0.1 '@pnpm/tabtab': ^0.1.2 - '@pnpm/ts-execution-runtime': workspace:* '@pnpm/types': workspace:8.0.1 '@pnpm/write-project-manifest': workspace:3.0.1 '@types/cross-spawn': ^6.0.2 @@ -2929,7 +2934,6 @@ importers: '@pnpm/registry-mock': 2.16.0 '@pnpm/run-npm': link:../run-npm '@pnpm/tabtab': 0.1.2 - '@pnpm/ts-execution-runtime': link:../../utils/ts-execution-runtime '@pnpm/types': link:../types '@pnpm/write-project-manifest': link:../write-project-manifest '@types/cross-spawn': 6.0.2 @@ -3104,11 +3108,11 @@ importers: packages/read-projects-context: specifiers: - '@pnpm/lockfile-file': workspace:5.0.2 + '@pnpm/lockfile-file': workspace:5.0.3 '@pnpm/logger': ^4.0.0 '@pnpm/modules-yaml': workspace:10.0.1 '@pnpm/normalize-registries': workspace:3.0.1 - '@pnpm/read-projects-context': workspace:6.0.2 + '@pnpm/read-projects-context': workspace:6.0.3 '@pnpm/types': workspace:8.0.1 realpath-missing: ^1.1.0 dependencies: @@ -3124,7 +3128,7 @@ importers: packages/real-hoist: specifiers: '@pnpm/error': workspace:3.0.1 - '@pnpm/lockfile-file': workspace:5.0.2 + '@pnpm/lockfile-file': workspace:5.0.3 '@pnpm/lockfile-utils': workspace:4.0.2 '@pnpm/logger': ^4.0.0 '@pnpm/real-hoist': workspace:0.2.2 @@ -3199,7 +3203,7 @@ importers: '@pnpm/pick-registry-for-package': workspace:3.0.1 '@pnpm/prune-lockfile': workspace:4.0.2 '@pnpm/read-package-json': workspace:6.0.2 - '@pnpm/resolve-dependencies': workspace:27.0.2 + '@pnpm/resolve-dependencies': workspace:27.0.3 '@pnpm/resolver-base': workspace:9.0.1 '@pnpm/store-controller-types': workspace:13.0.1 '@pnpm/types': workspace:8.0.1 @@ -3293,8 +3297,8 @@ importers: '@pnpm/client': workspace:7.1.1 '@pnpm/fetch': workspace:5.0.1 '@pnpm/logger': ^4.0.0 - '@pnpm/package-requester': workspace:18.0.3 - '@pnpm/package-store': workspace:13.0.3 + '@pnpm/package-requester': workspace:18.0.4 + '@pnpm/package-store': workspace:13.0.4 '@pnpm/server': workspace:12.0.1 '@pnpm/store-controller-types': workspace:13.0.1 '@pnpm/types': workspace:8.0.1 @@ -3349,9 +3353,9 @@ importers: '@pnpm/config': workspace:15.1.1 '@pnpm/error': workspace:3.0.1 '@pnpm/logger': ^4.0.0 - '@pnpm/package-store': workspace:13.0.3 + '@pnpm/package-store': workspace:13.0.4 '@pnpm/server': workspace:12.0.1 - '@pnpm/store-connection-manager': workspace:4.1.3 + '@pnpm/store-connection-manager': workspace:4.1.4 '@pnpm/store-path': workspace:6.0.0 '@zkochan/diable': ^1.0.2 delay: ^5.0.0 @@ -3633,7 +3637,7 @@ importers: '@typescript-eslint/parser': 5.22.0_hcfsmds2fshutdssjqluwm76uu eslint: 8.15.0 eslint-config-standard-with-typescript: 21.0.1_sir3mr4da2wt2w5lvb3dpyvzbi - eslint-plugin-import: 2.26.0_eslint@8.15.0 + eslint-plugin-import: 2.26.0_6nacgdzqm4zbhelsxkmd2vkvxy eslint-plugin-node: 11.1.0_eslint@8.15.0 eslint-plugin-promise: 5.2.0_eslint@8.15.0 typescript: 4.6.4 @@ -3666,16 +3670,6 @@ importers: devDependencies: '@pnpm/scripts': 'link:' - utils/ts-execution-runtime: - specifiers: - '@babel/core': ^7.16.7 - '@babel/register': ^7.13.16 - '@pnpm/ts-execution-runtime': workspace:* - devDependencies: - '@babel/core': 7.17.10 - '@babel/register': 7.17.7_@babel+core@7.17.10 - '@pnpm/ts-execution-runtime': 'link:' - utils/tsconfig: specifiers: '@pnpm/tsconfig': workspace:* @@ -3718,7 +3712,7 @@ packages: '@babel/helper-compilation-targets': 7.17.10_@babel+core@7.17.10 '@babel/helper-module-transforms': 7.17.7 '@babel/helpers': 7.17.9 - '@babel/parser': 7.17.10_@babel+types@7.17.10 + '@babel/parser': 7.17.10 '@babel/template': 7.16.7 '@babel/traverse': 7.17.10 '@babel/types': 7.17.10 @@ -3897,22 +3891,18 @@ packages: chalk: 2.4.2 js-tokens: 4.0.0 - /@babel/parser/7.13.13_@babel+types@7.13.12: + /@babel/parser/7.13.13: resolution: {integrity: sha512-OhsyMrqygfk5v8HmWwOzlYjJrtLaFhF34MrfG/Z73DgYCI6ojNUTUp2TYbtnjo8PegeJp12eamsNettCQjKjVw==} engines: {node: '>=6.0.0'} hasBin: true - peerDependencies: - '@babel/types': '*' dependencies: '@babel/types': 7.13.12 dev: true - /@babel/parser/7.17.10_@babel+types@7.17.10: + /@babel/parser/7.17.10: resolution: {integrity: sha512-n2Q6i+fnJqzOaq2VkdXxy2TCPCWQZHiCo0XqmrCvDWcZQKRyZzYi4Z0yxlBuN0w+r2ZHmre+Q087DSrw3pbJDQ==} engines: {node: '>=6.0.0'} hasBin: true - peerDependencies: - '@babel/types': '*' dependencies: '@babel/types': 7.17.10 dev: true @@ -4099,20 +4089,6 @@ packages: - supports-color dev: true - /@babel/register/7.17.7_@babel+core@7.17.10: - resolution: {integrity: sha512-fg56SwvXRifootQEDQAu1mKdjh5uthPzdO0N6t358FktfL4XjAVXuH58ULoiW8mesxiOgNIrxiImqEwv0+hRRA==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - dependencies: - '@babel/core': 7.17.10 - clone-deep: 4.0.1 - find-cache-dir: 2.1.0 - make-dir: 2.1.0 - pirates: 4.0.5 - source-map-support: 0.5.21 - dev: true - /@babel/runtime/7.17.9: resolution: {integrity: sha512-lSiBBvodq29uShpWGNbgFdKYNiFDo5/HIYsaCEY9ff4sb10x9jizo2+pRrSyF4jKZCXqgzuqBOQKbUm90gQwJg==} engines: {node: '>=6.9.0'} @@ -4124,7 +4100,7 @@ packages: engines: {node: '>=6.9.0'} dependencies: '@babel/code-frame': 7.16.7 - '@babel/parser': 7.17.10_@babel+types@7.17.10 + '@babel/parser': 7.17.10 '@babel/types': 7.17.10 dev: true @@ -4138,7 +4114,7 @@ packages: '@babel/helper-function-name': 7.17.9 '@babel/helper-hoist-variables': 7.16.7 '@babel/helper-split-export-declaration': 7.16.7 - '@babel/parser': 7.17.10_@babel+types@7.17.10 + '@babel/parser': 7.17.10 '@babel/types': 7.17.10 debug: 4.3.4 globals: 11.12.0 @@ -4563,7 +4539,7 @@ packages: globals: 13.13.0 ignore: 5.2.0 import-fresh: 3.3.0 - js-yaml: /@zkochan/js-yaml/0.0.5 + js-yaml: /@zkochan/js-yaml/0.0.6 minimatch: 3.1.2 strip-json-comments: 3.1.1 transitivePeerDependencies: @@ -4614,7 +4590,7 @@ packages: slash: 3.0.0 dev: true - /@jest/core/27.5.1_o6s2m2xtd45l6w6tzwuiksf67y: + /@jest/core/27.5.1_ts-node@10.7.0: resolution: {integrity: sha512-AK6/UTrvQD0Cd24NSqmIA6rKsu0tKIxfiCducZvqxYdmMisOYAsdItspT+fQDQYARPf8XgjAFZi0ogW2agH5nQ==} engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0} peerDependencies: @@ -4624,9 +4600,9 @@ packages: optional: true dependencies: '@jest/console': 27.5.1 - '@jest/reporters': 27.5.1_@babel+types@7.17.10 + '@jest/reporters': 27.5.1 '@jest/test-result': 27.5.1 - '@jest/transform': 27.5.1_@babel+types@7.17.10 + '@jest/transform': 27.5.1 '@jest/types': 27.5.1 '@types/node': 14.18.16 ansi-escapes: 4.3.2 @@ -4635,14 +4611,14 @@ packages: exit: 0.1.2 graceful-fs: 4.2.10 jest-changed-files: 27.5.1 - jest-config: 27.5.1_o6s2m2xtd45l6w6tzwuiksf67y + jest-config: 27.5.1_ts-node@10.7.0 jest-haste-map: 27.5.1 jest-message-util: 27.5.1 jest-regex-util: 27.5.1 jest-resolve: 27.5.1 jest-resolve-dependencies: 27.5.1 - jest-runner: 27.5.1_@babel+types@7.17.10 - jest-runtime: 27.5.1_@babel+types@7.17.10 + jest-runner: 27.5.1 + jest-runtime: 27.5.1 jest-snapshot: 27.5.1 jest-util: 27.5.1 jest-validate: 27.5.1 @@ -4652,7 +4628,6 @@ packages: slash: 3.0.0 strip-ansi: 6.0.1 transitivePeerDependencies: - - '@babel/types' - bufferutil - canvas - supports-color @@ -4691,7 +4666,7 @@ packages: expect: 27.5.1 dev: true - /@jest/reporters/27.5.1_@babel+types@7.17.10: + /@jest/reporters/27.5.1: resolution: {integrity: sha512-cPXh9hWIlVJMQkVk84aIvXuBB4uQQmFqZiacloFuGiP3ah1sbCxCosidXFDfqG8+6fO1oR2dTJTlsOy4VFmUfw==} engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0} peerDependencies: @@ -4703,7 +4678,7 @@ packages: '@bcoe/v8-coverage': 0.2.3 '@jest/console': 27.5.1 '@jest/test-result': 27.5.1 - '@jest/transform': 27.5.1_@babel+types@7.17.10 + '@jest/transform': 27.5.1 '@jest/types': 27.5.1 '@types/node': 14.18.16 chalk: 4.1.2 @@ -4712,7 +4687,7 @@ packages: glob: 7.2.0 graceful-fs: 4.2.10 istanbul-lib-coverage: 3.2.0 - istanbul-lib-instrument: 5.2.0_@babel+types@7.17.10 + istanbul-lib-instrument: 5.2.0 istanbul-lib-report: 3.0.0 istanbul-lib-source-maps: 4.0.1 istanbul-reports: /@zkochan/istanbul-reports/3.0.2 @@ -4726,7 +4701,6 @@ packages: terminal-link: 2.1.1 v8-to-istanbul: 8.1.1 transitivePeerDependencies: - - '@babel/types' - supports-color dev: true @@ -4749,26 +4723,25 @@ packages: collect-v8-coverage: 1.0.1 dev: true - /@jest/test-sequencer/27.5.1_@babel+types@7.17.10: + /@jest/test-sequencer/27.5.1: resolution: {integrity: sha512-LCheJF7WB2+9JuCS7VB/EmGIdQuhtqjRNI9A43idHv3E4KltCTsPsLxvdaubFHSYwY/fNjMWjl6vNRhDiN7vpQ==} engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0} dependencies: '@jest/test-result': 27.5.1 graceful-fs: 4.2.10 jest-haste-map: 27.5.1 - jest-runtime: 27.5.1_@babel+types@7.17.10 + jest-runtime: 27.5.1 transitivePeerDependencies: - - '@babel/types' - supports-color dev: true - /@jest/transform/27.5.1_@babel+types@7.17.10: + /@jest/transform/27.5.1: resolution: {integrity: sha512-ipON6WtYgl/1329g5AIJVbUuEh0wZVbdpGwC99Jw4LwuoBNS95MVphU6zOeD9pDkon+LLbFL7lOQRapbB8SCHw==} engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0} dependencies: '@babel/core': 7.17.10 '@jest/types': 27.5.1 - babel-plugin-istanbul: 6.1.1_@babel+types@7.17.10 + babel-plugin-istanbul: 6.1.1 chalk: 4.1.2 convert-source-map: 1.8.0 fast-json-stable-stringify: 2.1.0 @@ -4782,7 +4755,6 @@ packages: source-map: 0.6.1 write-file-atomic: 3.0.3 transitivePeerDependencies: - - '@babel/types' - supports-color dev: true @@ -5110,6 +5082,7 @@ packages: umask: 1.1.0 which: 2.0.2 transitivePeerDependencies: + - bluebird - supports-color dev: false @@ -5306,7 +5279,7 @@ packages: /@types/babel__core/7.1.19: resolution: {integrity: sha512-WEOTgRsbYkvA/KCsDwVEGkd7WAr1e3g31VHQ8zy5gul/V1qKullU/BU5I68X5v7V3GnB9eotmom4v5a5gjxorw==} dependencies: - '@babel/parser': 7.17.10_@babel+types@7.17.10 + '@babel/parser': 7.17.10 '@babel/types': 7.17.10 '@types/babel__generator': 7.6.4 '@types/babel__template': 7.4.1 @@ -5322,7 +5295,7 @@ packages: /@types/babel__template/7.4.1: resolution: {integrity: sha512-azBFKemX6kMg5Io+/rdGT0dkGreboUVR0Cdm3fz9QJWpaQGJRQXl7C+6hOTCZcMll7KFyEQpgbYI2lHdsS4U7g==} dependencies: - '@babel/parser': 7.17.10_@babel+types@7.17.10 + '@babel/parser': 7.17.10 '@babel/types': 7.17.10 dev: true @@ -5925,6 +5898,15 @@ packages: tslib: 1.14.1 tunnel: 0.0.6 + /@yarnpkg/extensions/1.1.0-rc.1_@yarnpkg+core@3.2.0: + resolution: {integrity: sha512-qQF7VrEteDam8AbDSXibLRzjIHfrvfuLxDyscmW9z8HrQfJHrVythuz4ihv5KoOKEq0bChNgwMle0kJXt2BTaw==} + engines: {node: '>=14.15.0'} + peerDependencies: + '@yarnpkg/core': '*' + dependencies: + '@yarnpkg/core': 3.2.0 + dev: false + /@yarnpkg/fslib/2.6.1: resolution: {integrity: sha512-OtxwAUeBUt0ba/YnakcEw90YtYwQH+kT8wwHTP46HR8KuvVFawFLT6kwS18l5PARTIwKbqC1QaFyOrLn9xYfKg==} engines: {node: '>=12 <14 || 14.2 - 14.9 || >14.10.0'} @@ -5965,19 +5947,6 @@ packages: js-yaml: 3.14.1 tslib: 1.14.1 - /@yarnpkg/plugin-compat/4.0.0-rc.4_@yarnpkg+core@3.2.0: - resolution: {integrity: sha512-yle1mg4xJttDOnsuKzuFbXmhEE0rg4HM+PoXNNkr9fMy5LmI5xLo/nzzmzkBgg6gQ3VsvnYEvjG2V09tHp/YEg==} - engines: {node: '>=14.15.0'} - peerDependencies: - '@yarnpkg/core': '*' - '@yarnpkg/plugin-patch': ^4.0.0-rc.4 - peerDependenciesMeta: - '@yarnpkg/plugin-patch': - optional: true - dependencies: - '@yarnpkg/core': 3.2.0 - dev: false - /@yarnpkg/pnp/2.3.2: resolution: {integrity: sha512-JdwHu1WBCISqJEhIwx6Hbpe8MYsYbkGMxoxolkDiAeJ9IGEe08mQcbX1YmUDV1ozSWlm9JZE90nMylcDsXRFpA==} engines: {node: '>=10.19.0'} @@ -6053,8 +6022,8 @@ packages: istanbul-lib-report: 3.0.0 dev: true - /@zkochan/js-yaml/0.0.5: - resolution: {integrity: sha512-/uaB1kf+t+UATNUSyzHSzy4JqKOh2Y77gdCnhQEKTX/vrpQp8qjvohvC6eG9X4spQf0a8TKL0qF5LiFNj+GrJw==} + /@zkochan/js-yaml/0.0.6: + resolution: {integrity: sha512-nzvgl3VfhcELQ8LyVrYOru+UtAy1nrygk2+AGbTm8a5YcO6o8lSjAT+pfg3vJWxIoZKOUhrK6UU7xW/+00kQrg==} hasBin: true dependencies: argparse: 2.0.1 @@ -6083,7 +6052,7 @@ packages: node-notifier: optional: true dependencies: - '@babel/parser': 7.13.13_@babel+types@7.13.12 + '@babel/parser': 7.13.13 '@babel/types': 7.13.12 chalk: 4.1.2 escodegen: 2.0.0 @@ -6512,23 +6481,22 @@ packages: /aws4/1.11.0: resolution: {integrity: sha512-xh1Rl34h6Fi1DC2WWKfxUTVqRsNnr6LsKz2+hfwDxQJWmrx8+c7ylaqBMcHfl1U1r2dsifOvKX3LQuLNZ+XSvA==} - /babel-jest/27.5.1_cczbc4p27buikwd6hspbpc45fe: + /babel-jest/27.5.1_@babel+core@7.17.10: resolution: {integrity: sha512-cdQ5dXjGRd0IBRATiQ4mZGlGlRE8kJpjPOixdNRdT+m3UcNqmYWN6rK6nvtXYfY3D76cb8s/O1Ss8ea24PIwcg==} engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0} peerDependencies: '@babel/core': ^7.8.0 dependencies: '@babel/core': 7.17.10 - '@jest/transform': 27.5.1_@babel+types@7.17.10 + '@jest/transform': 27.5.1 '@jest/types': 27.5.1 '@types/babel__core': 7.1.19 - babel-plugin-istanbul: 6.1.1_@babel+types@7.17.10 + babel-plugin-istanbul: 6.1.1 babel-preset-jest: 27.5.1_@babel+core@7.17.10 chalk: 4.1.2 graceful-fs: 4.2.10 slash: 3.0.0 transitivePeerDependencies: - - '@babel/types' - supports-color dev: true @@ -6538,17 +6506,16 @@ packages: object.assign: 4.1.2 dev: true - /babel-plugin-istanbul/6.1.1_@babel+types@7.17.10: + /babel-plugin-istanbul/6.1.1: resolution: {integrity: sha512-Y1IQok9821cC9onCx5otgFfRm7Lm+I+wwxOx738M/WLPZ9Q42m4IG5W0FNX8WLL2gYMZo3JkuXIH2DOpWM+qwA==} engines: {node: '>=8'} dependencies: '@babel/helper-plugin-utils': 7.16.7 '@istanbuljs/load-nyc-config': 1.1.0 '@istanbuljs/schema': 0.1.3 - istanbul-lib-instrument: 5.2.0_@babel+types@7.17.10 + istanbul-lib-instrument: 5.2.0 test-exclude: 6.0.0 transitivePeerDependencies: - - '@babel/types' - supports-color dev: true @@ -6663,6 +6630,8 @@ packages: qs: 6.9.7 raw-body: 2.4.3 type-is: 1.6.18 + transitivePeerDependencies: + - supports-color /body-parser/1.20.0: resolution: {integrity: sha512-DfJ+q6EPcGKZD1QWUjSpqp+Q7bDQTsQIF4zfUAtZ6qk+H/3/QRhg9CEp39ss+/T2vw0+HaidC0ecJj/DRLIaKg==} @@ -6680,6 +6649,8 @@ packages: raw-body: 2.5.1 type-is: 1.6.18 unpipe: 1.0.0 + transitivePeerDependencies: + - supports-color /bole/4.0.0: resolution: {integrity: sha512-Bk/2qoyOSlwU1dnDFk/oPM2FCNKAlYlBHfpAgwGX+K9HUtxSvmIAQCmMWMOvE6BlHHRCwsH1MxJe/r1ieodxqQ==} @@ -6725,6 +6696,8 @@ packages: snapdragon-node: 2.1.1 split-string: 3.1.0 to-regex: 3.0.2 + transitivePeerDependencies: + - supports-color dev: true /braces/3.0.2: @@ -6754,7 +6727,7 @@ packages: hasBin: true dependencies: caniuse-lite: 1.0.30001338 - electron-to-chromium: 1.4.136 + electron-to-chromium: 1.4.137 escalade: 3.1.1 node-releases: 2.0.4 picocolors: 1.0.0 @@ -6853,6 +6826,8 @@ packages: ssri: 8.0.1 tar: 6.1.11 unique-filename: 1.1.1 + transitivePeerDependencies: + - bluebird dev: false /cache-base/1.0.1: @@ -7086,15 +7061,6 @@ packages: engines: {node: '>= 0.10'} dev: true - /clone-deep/4.0.1: - resolution: {integrity: sha512-neHB9xuzh/wk0dIHweyAXv2aPGZIVk3pLMe+/RNzINf17fe0OG96QroktYAUm7SM1PBnzTabaLboqqxDyMU+SQ==} - engines: {node: '>=6'} - dependencies: - is-plain-object: 2.0.4 - kind-of: 6.0.3 - shallow-clone: 3.0.1 - dev: true - /clone-response/1.0.2: resolution: {integrity: sha1-0dyXOSAxTfZ/vrlCI7TuNQI56Ws=} dependencies: @@ -7212,10 +7178,6 @@ packages: engines: {node: '>= 12'} dev: true - /commondir/1.0.1: - resolution: {integrity: sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs=} - dev: true - /compare-func/2.0.0: resolution: {integrity: sha512-zHig5N+tPWARooBnb0Zx1MFcdfpyJrfTJ3Y5L+IFvUm8rM74hHz66z0gw0x4tijh5CorKkKUCnW82R2vmpeCRA==} dependencies: @@ -7251,6 +7213,8 @@ packages: on-headers: 1.0.2 safe-buffer: 5.1.2 vary: 1.1.2 + transitivePeerDependencies: + - supports-color /comver-to-semver/1.0.0: resolution: {integrity: sha512-gcGtbRxjwROQOdXLUWH1fQAXqThUVRZ219aAwgtX3KfYw429/Zv6EIJRf5TBSzWdAGwePmqH7w70WTaX4MDqag==} @@ -7423,6 +7387,8 @@ packages: dependencies: cpy: 8.1.2 meow: 6.1.1 + transitivePeerDependencies: + - supports-color dev: true /cpy/8.1.2: @@ -7438,6 +7404,8 @@ packages: p-all: 2.1.0 p-filter: 2.1.0 p-map: 3.0.0 + transitivePeerDependencies: + - supports-color dev: true /create-require/1.1.1: @@ -7585,11 +7553,21 @@ packages: /debug/2.6.9: resolution: {integrity: sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==} + peerDependencies: + supports-color: '*' + peerDependenciesMeta: + supports-color: + optional: true dependencies: ms: 2.0.0 /debug/3.2.7: resolution: {integrity: sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==} + peerDependencies: + supports-color: '*' + peerDependenciesMeta: + supports-color: + optional: true dependencies: ms: 2.1.3 @@ -7779,6 +7757,10 @@ packages: hasBin: true dev: true + /detect-libc/2.0.1: + resolution: {integrity: sha512-463v3ZeIrcWtdgIg6vI6XUncguvr2TnGl4SzDXinkt9mSLpBJKXT3mW6xT3VQdDN11+WVs29pgvivTc4Lp8v+w==} + engines: {node: '>=8'} + /detect-newline/3.1.0: resolution: {integrity: sha512-TLz+x/vEXm/Y7P7wn1EJFNLxYpUD4TgMosxY6fAVJUnJMbupHBOncxyWUG9OpTaH9EBD7uFI5LfEgmMOc54DsA==} engines: {node: '>=8'} @@ -7896,8 +7878,8 @@ packages: /ee-first/1.1.1: resolution: {integrity: sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=} - /electron-to-chromium/1.4.136: - resolution: {integrity: sha512-GnITX8rHnUrIVnTxU9UlsTnSemHUA2iF+6QrRqxFbp/mf0vfuSc/goEyyQhUX3TUUCE3mv/4BNuXOtaJ4ur0eA==} + /electron-to-chromium/1.4.137: + resolution: {integrity: sha512-0Rcpald12O11BUogJagX3HsCN3FE83DSqWjgXoHo5a72KUKMSfI39XBgJpgNNxS9fuGzytaFjE06kZkiVFy2qA==} dev: true /emittery/0.8.1: @@ -8302,7 +8284,7 @@ packages: '@typescript-eslint/parser': 4.33.0_hcfsmds2fshutdssjqluwm76uu eslint: 8.15.0 eslint-config-standard: 16.0.3_jwuvtusguqz34i7dpzsn4hqiay - eslint-plugin-import: 2.26.0_eslint@8.15.0 + eslint-plugin-import: 2.26.0_6nacgdzqm4zbhelsxkmd2vkvxy eslint-plugin-node: 11.1.0_eslint@8.15.0 eslint-plugin-promise: 5.2.0_eslint@8.15.0 typescript: 4.6.4 @@ -8319,7 +8301,7 @@ packages: eslint-plugin-promise: ^4.2.1 || ^5.0.0 dependencies: eslint: 8.15.0 - eslint-plugin-import: 2.26.0_eslint@8.15.0 + eslint-plugin-import: 2.26.0_6nacgdzqm4zbhelsxkmd2vkvxy eslint-plugin-node: 11.1.0_eslint@8.15.0 eslint-plugin-promise: 5.2.0_eslint@8.15.0 dev: false @@ -8329,13 +8311,33 @@ packages: dependencies: debug: 3.2.7 resolve: 1.22.0 + transitivePeerDependencies: + - supports-color - /eslint-module-utils/2.7.3: + /eslint-module-utils/2.7.3_wex3ustmkv4ospy3s77r6ihlwq: resolution: {integrity: sha512-088JEC7O3lDZM9xGe0RerkOMd0EjFl+Yvd1jPWIkMT5u3H9+HC34mWWPnqPrN13gieT9pBOO+Qt07Nb/6TresQ==} engines: {node: '>=4'} + peerDependencies: + '@typescript-eslint/parser': '*' + eslint-import-resolver-node: '*' + eslint-import-resolver-typescript: '*' + eslint-import-resolver-webpack: '*' + peerDependenciesMeta: + '@typescript-eslint/parser': + optional: true + eslint-import-resolver-node: + optional: true + eslint-import-resolver-typescript: + optional: true + eslint-import-resolver-webpack: + optional: true dependencies: + '@typescript-eslint/parser': 5.22.0_hcfsmds2fshutdssjqluwm76uu debug: 3.2.7 + eslint-import-resolver-node: 0.3.6 find-up: 2.1.0 + transitivePeerDependencies: + - supports-color dev: false /eslint-plugin-es/3.0.1_eslint@8.15.0: @@ -8349,19 +8351,24 @@ packages: regexpp: 3.2.0 dev: false - /eslint-plugin-import/2.26.0_eslint@8.15.0: + /eslint-plugin-import/2.26.0_6nacgdzqm4zbhelsxkmd2vkvxy: resolution: {integrity: sha512-hYfi3FXaM8WPLf4S1cikh/r4IxnO6zrhZbEGz2b660EJRbuxgpDS5gkCuYgGWg2xxh2rBuIr4Pvhve/7c31koA==} engines: {node: '>=4'} peerDependencies: + '@typescript-eslint/parser': '*' eslint: '*' + peerDependenciesMeta: + '@typescript-eslint/parser': + optional: true dependencies: + '@typescript-eslint/parser': 5.22.0_hcfsmds2fshutdssjqluwm76uu array-includes: 3.1.5 array.prototype.flat: 1.3.0 debug: 2.6.9 doctrine: 2.1.0 eslint: 8.15.0 eslint-import-resolver-node: 0.3.6 - eslint-module-utils: 2.7.3 + eslint-module-utils: 2.7.3_wex3ustmkv4ospy3s77r6ihlwq has: 1.0.3 is-core-module: 2.9.0 is-glob: 4.0.3 @@ -8369,6 +8376,10 @@ packages: object.values: 1.1.5 resolve: 1.22.0 tsconfig-paths: 3.14.1 + transitivePeerDependencies: + - eslint-import-resolver-typescript + - eslint-import-resolver-webpack + - supports-color dev: false /eslint-plugin-node/11.1.0_eslint@8.15.0: @@ -8467,7 +8478,7 @@ packages: import-fresh: 3.3.0 imurmurhash: 0.1.4 is-glob: 4.0.3 - js-yaml: /@zkochan/js-yaml/0.0.5 + js-yaml: /@zkochan/js-yaml/0.0.6 json-stable-stringify-without-jsonify: 1.0.1 levn: 0.4.1 lodash.merge: 4.6.2 @@ -8580,6 +8591,8 @@ packages: regex-not: 1.0.2 snapdragon: 0.8.2 to-regex: 3.0.2 + transitivePeerDependencies: + - supports-color dev: true /expand-template/2.0.3: @@ -8638,6 +8651,8 @@ packages: type-is: 1.6.18 utils-merge: 1.0.1 vary: 1.1.2 + transitivePeerDependencies: + - supports-color /express/4.18.1: resolution: {integrity: sha512-zZBcOX9TfehHQhtupq57OF8lFZ3UZi08Y97dwFCkD8p9d/d2Y3M+ykKcwaMDEL+4qyUolgBDX6AblpR3fL212Q==} @@ -8674,6 +8689,8 @@ packages: type-is: 1.6.18 utils-merge: 1.0.1 vary: 1.1.2 + transitivePeerDependencies: + - supports-color /ext/1.6.0: resolution: {integrity: sha512-sdBImtzkq2HpkdRLtlLWDa6w4DX22ijZLKx8BMPUuKe1c5lbN6xwQDQCxSfxBQnHZ13ls/FH0MQZx/q/gr6FQg==} @@ -8723,6 +8740,8 @@ packages: regex-not: 1.0.2 snapdragon: 0.8.2 to-regex: 3.0.2 + transitivePeerDependencies: + - supports-color dev: true /extsprintf/1.3.0: @@ -8742,6 +8761,8 @@ packages: is-glob: 4.0.3 merge2: 1.4.1 micromatch: 3.1.10 + transitivePeerDependencies: + - supports-color dev: true /fast-glob/3.2.11: @@ -8853,6 +8874,8 @@ packages: parseurl: 1.3.3 statuses: 1.5.0 unpipe: 1.0.0 + transitivePeerDependencies: + - supports-color /finalhandler/1.2.0: resolution: {integrity: sha512-5uXcUVftlQMFnWC9qu/svkWv3GTd2PfUhK/3PLkYNAe7FbqJMt3515HaxE6eRL74GdsriiwujiawdaB1BpEISg==} @@ -8865,15 +8888,8 @@ packages: parseurl: 1.3.3 statuses: 2.0.1 unpipe: 1.0.0 - - /find-cache-dir/2.1.0: - resolution: {integrity: sha512-Tq6PixE0w/VMFfCgbONnkiQIVol/JJL7nRMi20fqzA4NRs9AfeqMGeRdPi3wIhYkxjeBaWh2rxwapn5Tu3IqOQ==} - engines: {node: '>=6'} - dependencies: - commondir: 1.0.1 - make-dir: 2.1.0 - pkg-dir: 3.0.0 - dev: true + transitivePeerDependencies: + - supports-color /find-packages/8.0.13: resolution: {integrity: sha512-quqz6Q25rbTusGKWVb4aKX+cYBoerAEGU+HUvW6CbPPNWkuPbrCmQUSCNKTgEjhoOi2IaRbzkGJhdnSI8Ztpkw==} @@ -8896,13 +8912,6 @@ packages: locate-path: 2.0.0 dev: false - /find-up/3.0.0: - resolution: {integrity: sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==} - engines: {node: '>=6'} - dependencies: - locate-path: 3.0.0 - dev: true - /find-up/4.1.0: resolution: {integrity: sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==} engines: {node: '>=8'} @@ -9369,6 +9378,8 @@ packages: ignore: 4.0.6 pify: 4.0.1 slash: 2.0.0 + transitivePeerDependencies: + - supports-color dev: true /got/11.8.3: @@ -10168,17 +10179,16 @@ packages: engines: {node: '>=8'} dev: true - /istanbul-lib-instrument/5.2.0_@babel+types@7.17.10: + /istanbul-lib-instrument/5.2.0: resolution: {integrity: sha512-6Lthe1hqXHBNsqvgDzGO6l03XNeu3CrG4RqQ1KM9+l5+jNGpEJfIELx1NS3SEHmJQA8np/u+E4EPRKRiu6m19A==} engines: {node: '>=8'} dependencies: '@babel/core': 7.17.10 - '@babel/parser': 7.17.10_@babel+types@7.17.10 + '@babel/parser': 7.17.10 '@istanbuljs/schema': 0.1.3 istanbul-lib-coverage: 3.2.0 semver: 6.3.0 transitivePeerDependencies: - - '@babel/types' - supports-color dev: true @@ -10211,7 +10221,7 @@ packages: throat: 6.0.1 dev: true - /jest-circus/27.5.1_@babel+types@7.17.10: + /jest-circus/27.5.1: resolution: {integrity: sha512-D95R7x5UtlMA5iBYsOHFFbMD/GVA4R/Kdq15f7xYWUfWHBto9NYRsOvnSauTgdF+ogCpJ4tyKOXhUifxS65gdw==} engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0} dependencies: @@ -10227,7 +10237,7 @@ packages: jest-each: 27.5.1 jest-matcher-utils: 27.5.1 jest-message-util: 27.5.1 - jest-runtime: 27.5.1_@babel+types@7.17.10 + jest-runtime: 27.5.1 jest-snapshot: 27.5.1 jest-util: 27.5.1 pretty-format: 27.5.1 @@ -10235,11 +10245,10 @@ packages: stack-utils: 2.0.5 throat: 6.0.1 transitivePeerDependencies: - - '@babel/types' - supports-color dev: true - /jest-cli/27.5.1_o6s2m2xtd45l6w6tzwuiksf67y: + /jest-cli/27.5.1_ts-node@10.7.0: resolution: {integrity: sha512-Hc6HOOwYq4/74/c62dEE3r5elx8wjYqxY0r0G/nFrLDPMFRu6RA/u8qINOIkvhxG7mMQ5EJsOGfRpI8L6eFUVw==} engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0} hasBin: true @@ -10249,20 +10258,19 @@ packages: node-notifier: optional: true dependencies: - '@jest/core': 27.5.1_o6s2m2xtd45l6w6tzwuiksf67y + '@jest/core': 27.5.1_ts-node@10.7.0 '@jest/test-result': 27.5.1 '@jest/types': 27.5.1 chalk: 4.1.2 exit: 0.1.2 graceful-fs: 4.2.10 import-local: 3.1.0 - jest-config: 27.5.1_o6s2m2xtd45l6w6tzwuiksf67y + jest-config: 27.5.1_ts-node@10.7.0 jest-util: 27.5.1 jest-validate: 27.5.1 prompts: 2.4.2 yargs: 16.2.0 transitivePeerDependencies: - - '@babel/types' - bufferutil - canvas - supports-color @@ -10270,7 +10278,7 @@ packages: - utf-8-validate dev: true - /jest-config/27.5.1_o6s2m2xtd45l6w6tzwuiksf67y: + /jest-config/27.5.1_ts-node@10.7.0: resolution: {integrity: sha512-5sAsjm6tGdsVbW9ahcChPAFCk4IlkQUknH5AvKjuLTSlcO/wCZKyFdn7Rg0EkC+OGgWODEy2hDpWB1PgzH0JNA==} engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0} peerDependencies: @@ -10280,22 +10288,22 @@ packages: optional: true dependencies: '@babel/core': 7.17.10 - '@jest/test-sequencer': 27.5.1_@babel+types@7.17.10 + '@jest/test-sequencer': 27.5.1 '@jest/types': 27.5.1 - babel-jest: 27.5.1_cczbc4p27buikwd6hspbpc45fe + babel-jest: 27.5.1_@babel+core@7.17.10 chalk: 4.1.2 ci-info: 3.3.0 deepmerge: 4.2.2 glob: 7.2.0 graceful-fs: 4.2.10 - jest-circus: 27.5.1_@babel+types@7.17.10 + jest-circus: 27.5.1 jest-environment-jsdom: 27.5.1 jest-environment-node: 27.5.1 jest-get-type: 27.5.1 - jest-jasmine2: 27.5.1_@babel+types@7.17.10 + jest-jasmine2: 27.5.1 jest-regex-util: 27.5.1 jest-resolve: 27.5.1 - jest-runner: 27.5.1_@babel+types@7.17.10 + jest-runner: 27.5.1 jest-util: 27.5.1 jest-validate: 27.5.1 micromatch: 4.0.5 @@ -10305,7 +10313,6 @@ packages: strip-json-comments: 3.1.1 ts-node: 10.7.0_mocf6w6juzjyi26vrxr4oqpfq4 transitivePeerDependencies: - - '@babel/types' - bufferutil - canvas - supports-color @@ -10395,7 +10402,7 @@ packages: fsevents: 2.3.2 dev: true - /jest-jasmine2/27.5.1_@babel+types@7.17.10: + /jest-jasmine2/27.5.1: resolution: {integrity: sha512-jtq7VVyG8SqAorDpApwiJJImd0V2wv1xzdheGHRGyuT7gZm6gG47QEskOlzsN1PG/6WNaCo5pmwMHDf3AkG2pQ==} engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0} dependencies: @@ -10411,13 +10418,12 @@ packages: jest-each: 27.5.1 jest-matcher-utils: 27.5.1 jest-message-util: 27.5.1 - jest-runtime: 27.5.1_@babel+types@7.17.10 + jest-runtime: 27.5.1 jest-snapshot: 27.5.1 jest-util: 27.5.1 pretty-format: 27.5.1 throat: 6.0.1 transitivePeerDependencies: - - '@babel/types' - supports-color dev: true @@ -10506,14 +10512,14 @@ packages: slash: 3.0.0 dev: true - /jest-runner/27.5.1_@babel+types@7.17.10: + /jest-runner/27.5.1: resolution: {integrity: sha512-g4NPsM4mFCOwFKXO4p/H/kWGdJp9V8kURY2lX8Me2drgXqG7rrZAx5kv+5H7wtt/cdFIjhqYx1HrlqWHaOvDaQ==} engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0} dependencies: '@jest/console': 27.5.1 '@jest/environment': 27.5.1 '@jest/test-result': 27.5.1 - '@jest/transform': 27.5.1_@babel+types@7.17.10 + '@jest/transform': 27.5.1 '@jest/types': 27.5.1 '@types/node': 14.18.16 chalk: 4.1.2 @@ -10526,20 +10532,19 @@ packages: jest-leak-detector: 27.5.1 jest-message-util: 27.5.1 jest-resolve: 27.5.1 - jest-runtime: 27.5.1_@babel+types@7.17.10 + jest-runtime: 27.5.1 jest-util: 27.5.1 jest-worker: 27.5.1 source-map-support: 0.5.21 throat: 6.0.1 transitivePeerDependencies: - - '@babel/types' - bufferutil - canvas - supports-color - utf-8-validate dev: true - /jest-runtime/27.5.1_@babel+types@7.17.10: + /jest-runtime/27.5.1: resolution: {integrity: sha512-o7gxw3Gf+H2IGt8fv0RiyE1+r83FJBRruoA+FXrlHw6xEyBsU8ugA6IPfTdVyA0w8HClpbK+DGJxH59UrNMx8A==} engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0} dependencies: @@ -10548,7 +10553,7 @@ packages: '@jest/globals': 27.5.1 '@jest/source-map': 27.5.1 '@jest/test-result': 27.5.1 - '@jest/transform': 27.5.1_@babel+types@7.17.10 + '@jest/transform': 27.5.1 '@jest/types': 27.5.1 chalk: 4.1.2 cjs-module-lexer: 1.2.2 @@ -10566,7 +10571,6 @@ packages: slash: 3.0.0 strip-bom: 4.0.0 transitivePeerDependencies: - - '@babel/types' - supports-color dev: true @@ -10587,7 +10591,7 @@ packages: '@babel/plugin-syntax-typescript': 7.17.10_@babel+core@7.17.10 '@babel/traverse': 7.17.10 '@babel/types': 7.17.10 - '@jest/transform': 27.5.1_@babel+types@7.17.10 + '@jest/transform': 27.5.1 '@jest/types': 27.5.1 '@types/babel__traverse': 7.17.1 '@types/prettier': 2.6.0 @@ -10654,7 +10658,7 @@ packages: supports-color: 8.1.1 dev: true - /jest/27.5.1_o6s2m2xtd45l6w6tzwuiksf67y: + /jest/27.5.1_ts-node@10.7.0: resolution: {integrity: sha512-Yn0mADZB89zTtjkPJEXwrac3LHudkQMR+Paqa8uxJHCBr9agxztUifWCyiYrjhMPBoUVBjyny0I7XH6ozDr7QQ==} engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0} hasBin: true @@ -10664,11 +10668,10 @@ packages: node-notifier: optional: true dependencies: - '@jest/core': 27.5.1_o6s2m2xtd45l6w6tzwuiksf67y + '@jest/core': 27.5.1_ts-node@10.7.0 import-local: 3.1.0 - jest-cli: 27.5.1_o6s2m2xtd45l6w6tzwuiksf67y + jest-cli: 27.5.1_ts-node@10.7.0 transitivePeerDependencies: - - '@babel/types' - bufferutil - canvas - supports-color @@ -11017,14 +11020,6 @@ packages: path-exists: 3.0.0 dev: false - /locate-path/3.0.0: - resolution: {integrity: sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==} - engines: {node: '>=6'} - dependencies: - p-locate: 3.0.0 - path-exists: 3.0.0 - dev: true - /locate-path/5.0.0: resolution: {integrity: sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==} engines: {node: '>=8'} @@ -11232,6 +11227,7 @@ packages: socks-proxy-agent: 6.2.0 ssri: 8.0.1 transitivePeerDependencies: + - bluebird - supports-color dev: false @@ -11437,6 +11433,8 @@ packages: regex-not: 1.0.2 snapdragon: 0.8.2 to-regex: 3.0.2 + transitivePeerDependencies: + - supports-color dev: true /micromatch/4.0.5: @@ -11667,6 +11665,8 @@ packages: regex-not: 1.0.2 snapdragon: 0.8.2 to-regex: 3.0.2 + transitivePeerDependencies: + - supports-color dev: true /nanoresource/1.3.0: @@ -11813,6 +11813,7 @@ packages: tar: 6.1.11 which: 2.0.2 transitivePeerDependencies: + - bluebird - supports-color dev: false @@ -12196,13 +12197,6 @@ packages: p-limit: 1.3.0 dev: false - /p-locate/3.0.0: - resolution: {integrity: sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==} - engines: {node: '>=6'} - dependencies: - p-limit: 2.3.0 - dev: true - /p-locate/4.1.0: resolution: {integrity: sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==} engines: {node: '>=8'} @@ -12481,13 +12475,6 @@ packages: - supports-color dev: false - /pkg-dir/3.0.0: - resolution: {integrity: sha512-/E57AYkoeQ25qkxMj5PBOVgF8Kiu/h7cYS30Z5+R7WaiCCBfLq58ZI/dSeaEKb9WVJV5n/03QwrN3IeWIFllvw==} - engines: {node: '>=6'} - dependencies: - find-up: 3.0.0 - dev: true - /pkg-dir/4.2.0: resolution: {integrity: sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==} engines: {node: '>=8'} @@ -12654,6 +12641,11 @@ packages: /promise-inflight/1.0.1: resolution: {integrity: sha1-mEcocL8igTL8vdhoEputEsPAKeM=} + peerDependencies: + bluebird: '*' + peerDependenciesMeta: + bluebird: + optional: true dev: false /promise-retry/2.0.1: @@ -12925,7 +12917,7 @@ packages: resolution: {integrity: sha512-UkRNRIwnhG+y7hpqnycCL/xbTk7+ia9VuVTC0S+zVbwd65DI9eUpRMfsWIGrCWxTU/mi+JW8cHQCrv+zfCbEPQ==} engines: {node: '>=10.13'} dependencies: - js-yaml: /@zkochan/js-yaml/0.0.5 + js-yaml: /@zkochan/js-yaml/0.0.6 strip-bom: 4.0.0 /readable-stream/2.3.7: @@ -13422,6 +13414,8 @@ packages: on-finished: 2.3.0 range-parser: 1.2.1 statuses: 1.5.0 + transitivePeerDependencies: + - supports-color /send/0.18.0: resolution: {integrity: sha512-qqWzuOjSFOuqPjFe4NOsMLafToQQwBSOEpS+FwEt3A2V3vKubTquT3vmLTQpFgMXp8AlFWFuP1qKaJZOtPpVXg==} @@ -13440,6 +13434,8 @@ packages: on-finished: 2.4.1 range-parser: 1.2.1 statuses: 2.0.1 + transitivePeerDependencies: + - supports-color /serve-static/1.14.2: resolution: {integrity: sha512-+TMNA9AFxUEGuC0z2mevogSnn9MXKb4fa7ngeRMJaaGv8vTwnIEkKi+QGvPt33HSnf8pRS+WGM0EbMtCJLKMBQ==} @@ -13449,6 +13445,8 @@ packages: escape-html: 1.0.3 parseurl: 1.3.3 send: 0.17.2 + transitivePeerDependencies: + - supports-color /serve-static/1.15.0: resolution: {integrity: sha512-XGuRDNjXUijsUL0vl6nSD7cwURuzEgglbOaFuZM9g3kwDXOWVTck0jLzjPzGD+TazWbboZYu52/9/XPdUgne9g==} @@ -13458,6 +13456,8 @@ packages: escape-html: 1.0.3 parseurl: 1.3.3 send: 0.18.0 + transitivePeerDependencies: + - supports-color /set-blocking/2.0.0: resolution: {integrity: sha1-BF+XgtARrppoA93TgrJDkrPYkPc=} @@ -13473,13 +13473,6 @@ packages: /setprototypeof/1.2.0: resolution: {integrity: sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==} - /shallow-clone/3.0.1: - resolution: {integrity: sha512-/6KqX+GVUdqPuPPd2LxDDxzX6CAbjJehAAOKlNpqqUpAqPM6HeL8f+o3a+JsyGjn2lv0WY8UsTgUJjU9Ok55NA==} - engines: {node: '>=8'} - dependencies: - kind-of: 6.0.3 - dev: true - /shebang-command/1.2.0: resolution: {integrity: sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=} engines: {node: '>=0.10.0'} @@ -13637,6 +13630,8 @@ packages: source-map: 0.5.7 source-map-resolve: 0.5.3 use: 3.1.1 + transitivePeerDependencies: + - supports-color dev: true /socks-proxy-agent/6.1.1: @@ -14399,7 +14394,7 @@ packages: '@types/jest': 27.5.0 bs-logger: 0.2.6 fast-json-stable-stringify: 2.1.0 - jest: 27.5.1_o6s2m2xtd45l6w6tzwuiksf67y + jest: 27.5.1_ts-node@10.7.0 jest-util: 27.5.1 json5: 2.2.1 lodash.memoize: 4.1.2 @@ -14864,7 +14859,7 @@ packages: fast-safe-stringify: 2.1.1 handlebars: 4.7.7 http-errors: 1.8.1 - js-yaml: /@zkochan/js-yaml/0.0.5 + js-yaml: /@zkochan/js-yaml/0.0.6 JSONStream: 1.3.5 jsonwebtoken: 8.5.1 kleur: 4.1.4 @@ -15198,7 +15193,7 @@ packages: resolution: {integrity: sha512-LwyucHy0uhWqbrOkh9cBluZBeNVxzHjDaE9mwepZG3n3ZlbM4v3ndrFw51zW/NXYFFqP+QWZ72ihtLWTh05e4Q==} engines: {node: '>=10.13'} dependencies: - js-yaml: /@zkochan/js-yaml/0.0.5 + js-yaml: /@zkochan/js-yaml/0.0.6 write-file-atomic: 3.0.3 /ws/7.5.7: diff --git a/privatePackages/prepare/src/index.ts b/privatePackages/prepare/src/index.ts index b8d7e4619ae..1ccdbb8b423 100644 --- a/privatePackages/prepare/src/index.ts +++ b/privatePackages/prepare/src/index.ts @@ -16,13 +16,13 @@ const tmpPath = path.join(__dirname, `../../../../pnpm_tmp/${uniqueString()}`) let dirNumber = 0 -export function tempDir () { +export function tempDir (chdir: boolean = true) { dirNumber++ const dirname = dirNumber.toString() const tmpDir = path.join(tmpPath, dirname) fs.mkdirSync(tmpDir, { recursive: true }) - process.chdir(tmpDir) + if (chdir) process.chdir(tmpDir) return tmpDir } diff --git a/utils/ts-execution-runtime/README.md b/utils/ts-execution-runtime/README.md deleted file mode 100644 index 6637c70b103..00000000000 --- a/utils/ts-execution-runtime/README.md +++ /dev/null @@ -1,25 +0,0 @@ -# @pnpm/ts-execution-runtime - -> pnpm's TypeScript execution runtime - -## Usage - -Create the `js` file in the TypeScript package you want to execute directly from source with the following contents: - -```js -require('@pnpm/ts-execution-runtime') - -require('./src/index.ts') -``` - -## Rationale - -There are cases when the contributor wants to check changes to `pnpm` codebase as quick as possible. The TypeScript compiler does not currently let the user compile the code without typechecking, thus this process is pretty slow. The typechecking step can also be skipped for quick changes, because editors typically have `eslint` integration and do typechecking inside -modified files. - -This module allows to use `@babel/register` to transpile `pnpm` TypeScript source code on the fly -without typechecking. In order to use this module on `pnpm` source code, one needs to execute: `node /packages/pnpm/spnpm [command] [flags]` - -## License - -MIT diff --git a/utils/ts-execution-runtime/index.js b/utils/ts-execution-runtime/index.js deleted file mode 100644 index 0e13c4d655b..00000000000 --- a/utils/ts-execution-runtime/index.js +++ /dev/null @@ -1,18 +0,0 @@ -const babelRegister = require('@babel/register') -const path = require('path') - -const root = path.dirname(path.dirname(__dirname)) - -babelRegister({ - root, - cwd: root, - extensions: ['.ts'], - presets: [ - '@babel/preset-typescript', - ], - plugins: [ - '@babel/plugin-transform-modules-commonjs', - '@babel/plugin-proposal-dynamic-import', - require.resolve('./rewrite-imports.js') - ] -}) diff --git a/utils/ts-execution-runtime/package.json b/utils/ts-execution-runtime/package.json deleted file mode 100644 index 325a8137e54..00000000000 --- a/utils/ts-execution-runtime/package.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "name": "@pnpm/ts-execution-runtime", - "version": "1.0.0", - "private": true, - "license": "MIT", - "main": "index.js", - "devDependencies": { - "@babel/core": "^7.16.7", - "@babel/register": "^7.13.16", - "@pnpm/ts-execution-runtime": "workspace:*" - } -} diff --git a/utils/ts-execution-runtime/rewrite-imports.js b/utils/ts-execution-runtime/rewrite-imports.js deleted file mode 100644 index e37625b5922..00000000000 --- a/utils/ts-execution-runtime/rewrite-imports.js +++ /dev/null @@ -1,90 +0,0 @@ -// This plugin transforms module imports inside `pnpm` codebase, so that they point to -// TypeScript sources `src/index.ts` and not to declared entrypoint `lib/index.js`. -// Also, sometimes the code uses deep imports from `@pnpm/.../lib/...` packages, -// the plugin rewrites `lib` to `src` for such deep imports to point back to TypeScript code - -const path = require('path') - -const NATIVE_MODULES = new Set(Object.keys(process.binding('natives'))) - -module.exports = ({ types: t }, opts) => { - function rewriteModulePath(source, file, state) { - const opts = state.opts - let result = source - const sourceParts = source.split('/') - const isQualifiedModulePath = sourceParts.length > 2 || (sourceParts.length === 2 && sourceParts[0][0] !== '@') - if (!isQualifiedModulePath && !path.isAbsolute(source) && !source.startsWith('.') && !NATIVE_MODULES.has(source)) { - try { - const packageRootDir = path.dirname(require.resolve(source + '/package.json', {paths: [file]})) - if (packageRootDir.split(path.sep).indexOf('node_modules') < 0) { - result = path.join(packageRootDir, 'src/index.ts') - } - } catch (e) { - // If we have hit ESM module, we just ignore this case for now and do not rewrite imports - if (e.code !== 'ERR_PACKAGE_PATH_NOT_EXPORTED') - throw e; - } - } - if (isQualifiedModulePath && source.startsWith('@pnpm/') && source.indexOf('/lib/') >= 0) { - result = source.replace('/lib/', '/src/') - } - - if (result !== source) { - return result - } else { - return - } - } - - function replaceRequire(nodePath, state) { - if ( - !t.isIdentifier(nodePath.node.callee, { name: 'require' }) && - !( - t.isMemberExpression(nodePath.node.callee) && - t.isIdentifier(nodePath.node.callee.object, { name: 'require' }) - ) - ) { - return - } - - const moduleArg = nodePath.node.arguments[0] - if (moduleArg && moduleArg.type === 'StringLiteral') { - const modulePath = rewriteModulePath(moduleArg.value, state.file.opts.filename, state) - if (modulePath) { - nodePath.replaceWith(t.callExpression( - nodePath.node.callee, [t.stringLiteral(modulePath)] - )) - } - } - } - - function replaceImportExport(nodePath, state) { - const moduleArg = nodePath.node.source - if (moduleArg && moduleArg.type === 'StringLiteral') { - const modulePath = rewriteModulePath(moduleArg.value, state.file.opts.filename, state) - if (modulePath) { - nodePath.node.source = t.stringLiteral(modulePath) - } - } - } - - return { - visitor: { - CallExpression: { - exit(nodePath, state) { - return replaceRequire(nodePath, state) - } - }, - ImportDeclaration: { - exit(nodePath, state) { - return replaceImportExport(nodePath, state) - } - }, - ExportDeclaration: { - exit(nodePath, state) { - return replaceImportExport(nodePath, state) - } - }, - } - } -}