diff --git a/.changeset/pretty-houses-admire.md b/.changeset/pretty-houses-admire.md new file mode 100644 index 0000000000..41f0a4698e --- /dev/null +++ b/.changeset/pretty-houses-admire.md @@ -0,0 +1,6 @@ +--- +"@pnpm/plugin-commands-installation": minor +"pnpm": minor +--- + +Support pnpm recursive import diff --git a/fixtures/workspace-has-shared-npm-shrinkwrap-json/.gitignore b/fixtures/workspace-has-shared-npm-shrinkwrap-json/.gitignore new file mode 100644 index 0000000000..6908d42775 --- /dev/null +++ b/fixtures/workspace-has-shared-npm-shrinkwrap-json/.gitignore @@ -0,0 +1,2 @@ +!package-lock.json + diff --git a/fixtures/workspace-has-shared-npm-shrinkwrap-json/npm-shrinkwrap.json b/fixtures/workspace-has-shared-npm-shrinkwrap-json/npm-shrinkwrap.json new file mode 100644 index 0000000000..3aa6f8357a --- /dev/null +++ b/fixtures/workspace-has-shared-npm-shrinkwrap-json/npm-shrinkwrap.json @@ -0,0 +1,75 @@ +{ + "name": "workspace-has-shared-npm-shrinkwrap-json", + "version": "1.0.0", + "lockfileVersion": 2, + "requires": true, + "packages": { + "": { + "name": "workspace-has-shared-npm-shrinkwrap-json", + "version": "1.0.0", + "workspaces": [ + "packages/**" + ] + }, + "node_modules/bar": { + "resolved": "packages/bar", + "link": true + }, + "node_modules/foo": { + "resolved": "packages/foo", + "link": true + }, + "node_modules/is-negative": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-negative/-/is-negative-1.0.1.tgz", + "integrity": "sha1-3GuHKO69A8db+HYIftzVDpy1aZQ=", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-positive": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-positive/-/is-positive-1.0.0.tgz", + "integrity": "sha1-iACYVrZKLx632LsBeUGEJK4EUss=", + "engines": { + "node": ">=0.10.0" + } + }, + "packages/bar": { + "version": "0.0.0", + "dependencies": { + "is-negative": "^1.0.0" + } + }, + "packages/foo": { + "version": "0.0.0", + "dependencies": { + "is-positive": "^1.0.0" + } + } + }, + "dependencies": { + "bar": { + "version": "file:packages/bar", + "requires": { + "is-negative": "^1.0.0" + } + }, + "foo": { + "version": "file:packages/foo", + "requires": { + "is-positive": "^1.0.0" + } + }, + "is-negative": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-negative/-/is-negative-1.0.1.tgz", + "integrity": "sha1-3GuHKO69A8db+HYIftzVDpy1aZQ=" + }, + "is-positive": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-positive/-/is-positive-1.0.0.tgz", + "integrity": "sha1-iACYVrZKLx632LsBeUGEJK4EUss=" + } + } +} diff --git a/fixtures/workspace-has-shared-npm-shrinkwrap-json/package.json b/fixtures/workspace-has-shared-npm-shrinkwrap-json/package.json new file mode 100644 index 0000000000..e9dce0dff1 --- /dev/null +++ b/fixtures/workspace-has-shared-npm-shrinkwrap-json/package.json @@ -0,0 +1,8 @@ +{ + "private": true, + "name": "workspace-has-shared-npm-shrinkwrap-json", + "version": "1.0.0", + "workspaces": [ + "packages/**" + ] +} diff --git a/fixtures/workspace-has-shared-npm-shrinkwrap-json/packages/bar/package.json b/fixtures/workspace-has-shared-npm-shrinkwrap-json/packages/bar/package.json new file mode 100644 index 0000000000..250aac1f44 --- /dev/null +++ b/fixtures/workspace-has-shared-npm-shrinkwrap-json/packages/bar/package.json @@ -0,0 +1,7 @@ +{ + "name": "bar", + "version": "0.0.0", + "dependencies": { + "is-negative": "^1.0.0" + } +} diff --git a/fixtures/workspace-has-shared-npm-shrinkwrap-json/packages/foo/package.json b/fixtures/workspace-has-shared-npm-shrinkwrap-json/packages/foo/package.json new file mode 100644 index 0000000000..64a6547f30 --- /dev/null +++ b/fixtures/workspace-has-shared-npm-shrinkwrap-json/packages/foo/package.json @@ -0,0 +1,7 @@ +{ + "name": "foo", + "version": "0.0.0", + "dependencies": { + "is-positive": "^1.0.0" + } +} diff --git a/fixtures/workspace-has-shared-npm-shrinkwrap-json/pnpm-worksapce.yaml b/fixtures/workspace-has-shared-npm-shrinkwrap-json/pnpm-worksapce.yaml new file mode 100644 index 0000000000..600b4bb486 --- /dev/null +++ b/fixtures/workspace-has-shared-npm-shrinkwrap-json/pnpm-worksapce.yaml @@ -0,0 +1,2 @@ +packages: + - 'packages/**' diff --git a/fixtures/workspace-has-shared-package-lock-json/.gitignore b/fixtures/workspace-has-shared-package-lock-json/.gitignore new file mode 100644 index 0000000000..6908d42775 --- /dev/null +++ b/fixtures/workspace-has-shared-package-lock-json/.gitignore @@ -0,0 +1,2 @@ +!package-lock.json + diff --git a/fixtures/workspace-has-shared-package-lock-json/package-lock.json b/fixtures/workspace-has-shared-package-lock-json/package-lock.json new file mode 100644 index 0000000000..84b4c870aa --- /dev/null +++ b/fixtures/workspace-has-shared-package-lock-json/package-lock.json @@ -0,0 +1,75 @@ +{ + "name": "workspace-has-shared-package-lock-json", + "version": "1.0.0", + "lockfileVersion": 2, + "requires": true, + "packages": { + "": { + "name": "workspace-has-shared-package-lock-json", + "version": "1.0.0", + "workspaces": [ + "packages/**" + ] + }, + "node_modules/bar": { + "resolved": "packages/bar", + "link": true + }, + "node_modules/foo": { + "resolved": "packages/foo", + "link": true + }, + "node_modules/is-negative": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-negative/-/is-negative-1.0.1.tgz", + "integrity": "sha1-3GuHKO69A8db+HYIftzVDpy1aZQ=", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-positive": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-positive/-/is-positive-1.0.0.tgz", + "integrity": "sha1-iACYVrZKLx632LsBeUGEJK4EUss=", + "engines": { + "node": ">=0.10.0" + } + }, + "packages/bar": { + "version": "0.0.0", + "dependencies": { + "is-negative": "^1.0.0" + } + }, + "packages/foo": { + "version": "0.0.0", + "dependencies": { + "is-positive": "^1.0.0" + } + } + }, + "dependencies": { + "bar": { + "version": "file:packages/bar", + "requires": { + "is-negative": "^1.0.0" + } + }, + "foo": { + "version": "file:packages/foo", + "requires": { + "is-positive": "^1.0.0" + } + }, + "is-negative": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-negative/-/is-negative-1.0.1.tgz", + "integrity": "sha1-3GuHKO69A8db+HYIftzVDpy1aZQ=" + }, + "is-positive": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-positive/-/is-positive-1.0.0.tgz", + "integrity": "sha1-iACYVrZKLx632LsBeUGEJK4EUss=" + } + } +} diff --git a/fixtures/workspace-has-shared-package-lock-json/package.json b/fixtures/workspace-has-shared-package-lock-json/package.json new file mode 100644 index 0000000000..d8c1eea55b --- /dev/null +++ b/fixtures/workspace-has-shared-package-lock-json/package.json @@ -0,0 +1,8 @@ +{ + "private": true, + "name": "workspace-has-shared-package-lock-json", + "version": "1.0.0", + "workspaces": [ + "packages/**" + ] +} diff --git a/fixtures/workspace-has-shared-package-lock-json/packages/bar/package.json b/fixtures/workspace-has-shared-package-lock-json/packages/bar/package.json new file mode 100644 index 0000000000..250aac1f44 --- /dev/null +++ b/fixtures/workspace-has-shared-package-lock-json/packages/bar/package.json @@ -0,0 +1,7 @@ +{ + "name": "bar", + "version": "0.0.0", + "dependencies": { + "is-negative": "^1.0.0" + } +} diff --git a/fixtures/workspace-has-shared-package-lock-json/packages/foo/package.json b/fixtures/workspace-has-shared-package-lock-json/packages/foo/package.json new file mode 100644 index 0000000000..64a6547f30 --- /dev/null +++ b/fixtures/workspace-has-shared-package-lock-json/packages/foo/package.json @@ -0,0 +1,7 @@ +{ + "name": "foo", + "version": "0.0.0", + "dependencies": { + "is-positive": "^1.0.0" + } +} diff --git a/fixtures/workspace-has-shared-package-lock-json/pnpm-worksapce.yaml b/fixtures/workspace-has-shared-package-lock-json/pnpm-worksapce.yaml new file mode 100644 index 0000000000..600b4bb486 --- /dev/null +++ b/fixtures/workspace-has-shared-package-lock-json/pnpm-worksapce.yaml @@ -0,0 +1,2 @@ +packages: + - 'packages/**' diff --git a/fixtures/workspace-has-shared-yarn-lock/.gitignore b/fixtures/workspace-has-shared-yarn-lock/.gitignore new file mode 100644 index 0000000000..a59389a0ad --- /dev/null +++ b/fixtures/workspace-has-shared-yarn-lock/.gitignore @@ -0,0 +1 @@ +!yarn.lock diff --git a/fixtures/workspace-has-shared-yarn-lock/package.json b/fixtures/workspace-has-shared-yarn-lock/package.json new file mode 100644 index 0000000000..b18a8bad6e --- /dev/null +++ b/fixtures/workspace-has-shared-yarn-lock/package.json @@ -0,0 +1,8 @@ +{ + "private": true, + "name": "workspace-has-shared-yarn-lock", + "version": "1.0.0", + "workspaces": [ + "packages/**" + ] +} diff --git a/fixtures/workspace-has-shared-yarn-lock/packages/bar/package.json b/fixtures/workspace-has-shared-yarn-lock/packages/bar/package.json new file mode 100644 index 0000000000..250aac1f44 --- /dev/null +++ b/fixtures/workspace-has-shared-yarn-lock/packages/bar/package.json @@ -0,0 +1,7 @@ +{ + "name": "bar", + "version": "0.0.0", + "dependencies": { + "is-negative": "^1.0.0" + } +} diff --git a/fixtures/workspace-has-shared-yarn-lock/packages/foo/package.json b/fixtures/workspace-has-shared-yarn-lock/packages/foo/package.json new file mode 100644 index 0000000000..64a6547f30 --- /dev/null +++ b/fixtures/workspace-has-shared-yarn-lock/packages/foo/package.json @@ -0,0 +1,7 @@ +{ + "name": "foo", + "version": "0.0.0", + "dependencies": { + "is-positive": "^1.0.0" + } +} diff --git a/fixtures/workspace-has-shared-yarn-lock/pnpm-worksapce.yaml b/fixtures/workspace-has-shared-yarn-lock/pnpm-worksapce.yaml new file mode 100644 index 0000000000..600b4bb486 --- /dev/null +++ b/fixtures/workspace-has-shared-yarn-lock/pnpm-worksapce.yaml @@ -0,0 +1,2 @@ +packages: + - 'packages/**' diff --git a/fixtures/workspace-has-shared-yarn-lock/yarn.lock b/fixtures/workspace-has-shared-yarn-lock/yarn.lock new file mode 100644 index 0000000000..d897b2b667 --- /dev/null +++ b/fixtures/workspace-has-shared-yarn-lock/yarn.lock @@ -0,0 +1,13 @@ +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. +# yarn lockfile v1 + + +is-negative@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/is-negative/-/is-negative-1.0.1.tgz#dc6b8728eebd03c75bf876087edcd50e9cb56994" + integrity sha1-3GuHKO69A8db+HYIftzVDpy1aZQ= + +is-positive@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-positive/-/is-positive-1.0.0.tgz#88009856b64a2f1eb7d8bb0179418424ae0452cb" + integrity sha1-iACYVrZKLx632LsBeUGEJK4EUss= diff --git a/packages/plugin-commands-import/CHANGELOG.md b/packages/plugin-commands-import/CHANGELOG.md deleted file mode 100644 index a6477637da..0000000000 --- a/packages/plugin-commands-import/CHANGELOG.md +++ /dev/null @@ -1,1357 +0,0 @@ -# @pnpm/plugin-commands-import - -## 3.1.17 - -### Patch Changes - -- Updated dependencies [4ab87844a] - - @pnpm/core@1.1.0 - - @pnpm/cli-utils@0.6.29 - - @pnpm/read-project-manifest@2.0.6 - - @pnpm/store-connection-manager@3.1.3 - -## 3.1.16 - -### Patch Changes - -- @pnpm/core@1.0.2 -- @pnpm/store-connection-manager@3.1.2 - -## 3.1.15 - -### Patch Changes - -- @pnpm/cli-utils@0.6.28 -- @pnpm/store-connection-manager@3.1.1 -- @pnpm/core@1.0.1 - -## 3.1.14 - -### Patch Changes - -- Updated dependencies [bd7bcdbe8] -- Updated dependencies [d4e2e52c4] - - @pnpm/store-connection-manager@3.1.0 - - @pnpm/core@1.0.0 - - @pnpm/cli-utils@0.6.27 - -## 3.1.13 - -### Patch Changes - -- @pnpm/cli-utils@0.6.26 -- @pnpm/store-connection-manager@3.0.20 -- supi@0.47.27 - -## 3.1.12 - -### Patch Changes - -- @pnpm/cli-utils@0.6.25 - -## 3.1.11 - -### Patch Changes - -- @pnpm/cli-utils@0.6.24 -- @pnpm/store-connection-manager@3.0.19 -- supi@0.47.25 - -## 3.1.10 - -### Patch Changes - -- Updated dependencies [59a4152ce] - - supi@0.47.24 - - @pnpm/store-connection-manager@3.0.18 - -## 3.1.9 - -### Patch Changes - -- Updated dependencies [c7081cbb4] - - supi@0.47.23 - - @pnpm/cli-utils@0.6.23 - - @pnpm/store-connection-manager@3.0.17 - -## 3.1.8 - -### Patch Changes - -- Updated dependencies [83e23601e] -- Updated dependencies [6cc1aa2c0] - - supi@0.47.22 - - @pnpm/cli-utils@0.6.22 - - @pnpm/store-connection-manager@3.0.16 - -## 3.1.7 - -### Patch Changes - -- Updated dependencies [141d2f02e] - - supi@0.47.21 - - @pnpm/store-connection-manager@3.0.15 - -## 3.1.6 - -### Patch Changes - -- Updated dependencies [11a934da1] - - supi@0.47.20 - - @pnpm/cli-utils@0.6.21 - - @pnpm/store-connection-manager@3.0.14 - -## 3.1.5 - -### Patch Changes - -- @pnpm/cli-utils@0.6.20 -- @pnpm/store-connection-manager@3.0.13 -- supi@0.47.19 - -## 3.1.4 - -### Patch Changes - -- Updated dependencies [ccf2f295d] - - supi@0.47.18 - -## 3.1.3 - -### Patch Changes - -- @pnpm/cli-utils@0.6.19 -- @pnpm/store-connection-manager@3.0.12 -- supi@0.47.17 - -## 3.1.2 - -### Patch Changes - -- @pnpm/cli-utils@0.6.18 -- @pnpm/store-connection-manager@3.0.11 -- supi@0.47.16 - -## 3.1.1 - -### Patch Changes - -- supi@0.47.15 -- @pnpm/store-connection-manager@3.0.10 - -## 3.1.0 - -### Minor Changes - -- f815dabd9: Converting a `yarn.lock` to a `pnpm-lock.yaml`. - -### Patch Changes - -- @pnpm/cli-utils@0.6.17 -- @pnpm/store-connection-manager@3.0.9 -- supi@0.47.14 - -## 3.0.13 - -### Patch Changes - -- supi@0.47.13 -- @pnpm/store-connection-manager@3.0.8 - -## 3.0.12 - -### Patch Changes - -- supi@0.47.12 -- @pnpm/store-connection-manager@3.0.7 - -## 3.0.11 - -### Patch Changes - -- @pnpm/cli-utils@0.6.16 -- @pnpm/store-connection-manager@3.0.6 -- supi@0.47.11 - -## 3.0.10 - -### Patch Changes - -- supi@0.47.10 -- @pnpm/cli-utils@0.6.15 -- @pnpm/store-connection-manager@3.0.5 - -## 3.0.9 - -### Patch Changes - -- supi@0.47.9 -- @pnpm/cli-utils@0.6.14 -- @pnpm/store-connection-manager@3.0.4 - -## 3.0.8 - -### Patch Changes - -- @pnpm/cli-utils@0.6.13 -- @pnpm/read-project-manifest@2.0.5 -- supi@0.47.8 -- @pnpm/store-connection-manager@3.0.3 - -## 3.0.7 - -### Patch Changes - -- supi@0.47.7 -- @pnpm/cli-utils@0.6.12 -- @pnpm/store-connection-manager@3.0.2 - -## 3.0.6 - -### Patch Changes - -- Updated dependencies [3c044519e] - - supi@0.47.6 - -## 3.0.5 - -### Patch Changes - -- Updated dependencies [040124530] - - supi@0.47.5 - - @pnpm/cli-utils@0.6.11 - -## 3.0.4 - -### Patch Changes - -- Updated dependencies [ca67f6004] - - supi@0.47.4 - -## 3.0.3 - -### Patch Changes - -- Updated dependencies [caf453dd3] - - supi@0.47.3 - -## 3.0.2 - -### Patch Changes - -- Updated dependencies [d3ec941d2] - - supi@0.47.2 - -## 3.0.1 - -### Patch Changes - -- @pnpm/cli-utils@0.6.10 -- @pnpm/store-connection-manager@3.0.1 -- supi@0.47.1 - -## 3.0.0 - -### Major Changes - -- 691f64713: New required option added: cacheDir. - -### Patch Changes - -- Updated dependencies [691f64713] -- Updated dependencies [b3478c756] - - @pnpm/store-connection-manager@3.0.0 - - supi@0.47.0 - - @pnpm/cli-utils@0.6.9 - -## 2.0.20 - -### Patch Changes - -- supi@0.46.18 - -## 2.0.19 - -### Patch Changes - -- Updated dependencies [8e76690f4] - - supi@0.46.17 - - @pnpm/cli-utils@0.6.8 - - @pnpm/read-project-manifest@2.0.4 - - @pnpm/store-connection-manager@2.1.11 - -## 2.0.18 - -### Patch Changes - -- supi@0.46.16 -- @pnpm/store-connection-manager@2.1.10 - -## 2.0.17 - -### Patch Changes - -- @pnpm/store-connection-manager@2.1.9 -- supi@0.46.15 - -## 2.0.16 - -### Patch Changes - -- supi@0.46.15 - -## 2.0.15 - -### Patch Changes - -- @pnpm/store-connection-manager@2.1.8 -- supi@0.46.14 -- @pnpm/cli-utils@0.6.7 -- @pnpm/read-project-manifest@2.0.3 - -## 2.0.14 - -### Patch Changes - -- Updated dependencies [a1a03d145] - - supi@0.46.13 - - @pnpm/cli-utils@0.6.6 - - @pnpm/store-connection-manager@2.1.7 - -## 2.0.13 - -### Patch Changes - -- @pnpm/store-connection-manager@2.1.6 -- supi@0.46.12 - -## 2.0.12 - -### Patch Changes - -- @pnpm/cli-utils@0.6.5 -- @pnpm/store-connection-manager@2.1.5 -- supi@0.46.12 - -## 2.0.11 - -### Patch Changes - -- Updated dependencies [da0d4091d] - - supi@0.46.11 - -## 2.0.10 - -### Patch Changes - -- Updated dependencies [0e69ad440] - - supi@0.46.10 - -## 2.0.9 - -### Patch Changes - -- supi@0.46.9 -- @pnpm/cli-utils@0.6.4 -- @pnpm/store-connection-manager@2.1.4 - -## 2.0.8 - -### Patch Changes - -- @pnpm/read-project-manifest@2.0.2 -- supi@0.46.8 -- @pnpm/cli-utils@0.6.3 -- @pnpm/store-connection-manager@2.1.3 - -## 2.0.7 - -### Patch Changes - -- Updated dependencies [66dbd06e6] - - supi@0.46.7 - - @pnpm/store-connection-manager@2.1.2 - -## 2.0.6 - -### Patch Changes - -- Updated dependencies [3e3c3ff71] - - supi@0.46.6 - - @pnpm/store-connection-manager@2.1.1 - -## 2.0.5 - -### Patch Changes - -- supi@0.46.5 - -## 2.0.4 - -### Patch Changes - -- Updated dependencies [97c64bae4] -- Updated dependencies [05baaa6e7] -- Updated dependencies [6e9c112af] - - supi@0.46.4 - - @pnpm/store-connection-manager@2.1.0 - - @pnpm/read-project-manifest@2.0.1 - - @pnpm/cli-utils@0.6.2 - -## 2.0.3 - -### Patch Changes - -- @pnpm/cli-utils@0.6.1 -- @pnpm/store-connection-manager@2.0.3 -- supi@0.46.3 - -## 2.0.2 - -### Patch Changes - -- Updated dependencies [c70c77f89] - - supi@0.46.2 - - @pnpm/store-connection-manager@2.0.2 - -## 2.0.1 - -### Patch Changes - -- supi@0.46.1 -- @pnpm/store-connection-manager@2.0.1 - -## 2.0.0 - -### Major Changes - -- 97b986fbc: Node.js 10 support is dropped. At least Node.js 12.17 is required for the package to work. - -### Patch Changes - -- Updated dependencies [6871d74b2] -- Updated dependencies [97b986fbc] -- Updated dependencies [78470a32d] -- Updated dependencies [f2d3b6c8b] -- Updated dependencies [945dc9f56] -- Updated dependencies [048c94871] -- Updated dependencies [f2bb5cbeb] -- Updated dependencies [7adc6e875] -- Updated dependencies [735d2ac79] -- Updated dependencies [9e30b9659] - - @pnpm/constants@5.0.0 - - @pnpm/cli-utils@0.6.0 - - @pnpm/error@2.0.0 - - @pnpm/read-project-manifest@2.0.0 - - @pnpm/store-connection-manager@1.1.0 - - supi@0.46.0 - -## 1.0.110 - -### Patch Changes - -- @pnpm/cli-utils@0.5.4 -- @pnpm/store-connection-manager@1.0.4 -- supi@0.45.4 - -## 1.0.109 - -### Patch Changes - -- supi@0.45.3 -- @pnpm/cli-utils@0.5.3 -- @pnpm/store-connection-manager@1.0.3 - -## 1.0.108 - -### Patch Changes - -- supi@0.45.2 -- @pnpm/store-connection-manager@1.0.2 - -## 1.0.107 - -### Patch Changes - -- @pnpm/store-connection-manager@1.0.1 -- supi@0.45.1 - -## 1.0.106 - -### Patch Changes - -- Updated dependencies [f008425cd] -- Updated dependencies [8d1dfa89c] - - supi@0.45.0 - - @pnpm/store-connection-manager@1.0.0 - - @pnpm/cli-utils@0.5.2 - -## 1.0.105 - -### Patch Changes - -- Updated dependencies [3be2b1773] - - @pnpm/cli-utils@0.5.1 - - supi@0.44.8 - -## 1.0.104 - -### Patch Changes - -- supi@0.44.7 - -## 1.0.103 - -### Patch Changes - -- Updated dependencies [27a40321c] - - @pnpm/store-connection-manager@0.3.64 - - supi@0.44.6 - -## 1.0.102 - -### Patch Changes - -- supi@0.44.5 - -## 1.0.101 - -### Patch Changes - -- Updated dependencies [cb040ae18] - - @pnpm/cli-utils@0.5.0 - - supi@0.44.4 - - @pnpm/store-connection-manager@0.3.63 - -## 1.0.100 - -### Patch Changes - -- Updated dependencies [ad113645b] - - @pnpm/read-project-manifest@1.1.7 - - supi@0.44.3 - - @pnpm/cli-utils@0.4.51 - - @pnpm/store-connection-manager@0.3.62 - -## 1.0.99 - -### Patch Changes - -- @pnpm/cli-utils@0.4.50 -- @pnpm/store-connection-manager@0.3.61 -- supi@0.44.2 - -## 1.0.98 - -### Patch Changes - -- @pnpm/cli-utils@0.4.49 - -## 1.0.97 - -### Patch Changes - -- Updated dependencies [43de80034] - - @pnpm/store-connection-manager@0.3.60 - - @pnpm/cli-utils@0.4.48 - -## 1.0.96 - -### Patch Changes - -- Updated dependencies [9a9bc67d2] - - supi@0.44.1 - -## 1.0.95 - -### Patch Changes - -- Updated dependencies [9ad8c27bf] -- Updated dependencies [548f28df9] - - supi@0.44.0 - - @pnpm/cli-utils@0.4.47 - - @pnpm/read-project-manifest@1.1.6 - - @pnpm/store-connection-manager@0.3.59 - -## 1.0.94 - -### Patch Changes - -- supi@0.43.29 -- @pnpm/cli-utils@0.4.46 -- @pnpm/store-connection-manager@0.3.58 - -## 1.0.93 - -### Patch Changes - -- Updated dependencies [af897c324] -- Updated dependencies [af897c324] - - supi@0.43.28 - -## 1.0.92 - -### Patch Changes - -- supi@0.43.27 - -## 1.0.91 - -### Patch Changes - -- Updated dependencies [f40bc5927] -- Updated dependencies [672c27cfe] - - supi@0.43.26 - - @pnpm/cli-utils@0.4.45 - - @pnpm/store-connection-manager@0.3.57 - -## 1.0.90 - -### Patch Changes - -- supi@0.43.25 - -## 1.0.89 - -### Patch Changes - -- supi@0.43.24 -- @pnpm/cli-utils@0.4.44 -- @pnpm/store-connection-manager@0.3.56 - -## 1.0.88 - -### Patch Changes - -- @pnpm/cli-utils@0.4.43 -- @pnpm/store-connection-manager@0.3.55 -- supi@0.43.23 - -## 1.0.87 - -### Patch Changes - -- @pnpm/cli-utils@0.4.42 -- @pnpm/store-connection-manager@0.3.54 -- supi@0.43.22 - -## 1.0.86 - -### Patch Changes - -- supi@0.43.21 -- @pnpm/cli-utils@0.4.41 -- @pnpm/store-connection-manager@0.3.53 - -## 1.0.85 - -### Patch Changes - -- supi@0.43.20 -- @pnpm/store-connection-manager@0.3.52 - -## 1.0.84 - -### Patch Changes - -- Updated dependencies [dc5a0a102] - - @pnpm/store-connection-manager@0.3.51 - - supi@0.43.19 - -## 1.0.83 - -### Patch Changes - -- @pnpm/store-connection-manager@0.3.50 -- supi@0.43.18 - -## 1.0.82 - -### Patch Changes - -- Updated dependencies [8698a7060] - - supi@0.43.17 - - @pnpm/cli-utils@0.4.40 - - @pnpm/store-connection-manager@0.3.49 - -## 1.0.81 - -### Patch Changes - -- @pnpm/cli-utils@0.4.39 -- @pnpm/store-connection-manager@0.3.48 -- supi@0.43.16 - -## 1.0.80 - -### Patch Changes - -- Updated dependencies [0c5f1bcc9] - - @pnpm/error@1.4.0 - - @pnpm/cli-utils@0.4.38 - - @pnpm/read-project-manifest@1.1.5 - - @pnpm/store-connection-manager@0.3.47 - - supi@0.43.15 - -## 1.0.79 - -### Patch Changes - -- supi@0.43.14 - -## 1.0.78 - -### Patch Changes - -- supi@0.43.13 -- @pnpm/store-connection-manager@0.3.46 -- @pnpm/read-project-manifest@1.1.4 -- @pnpm/cli-utils@0.4.37 - -## 1.0.77 - -### Patch Changes - -- Updated dependencies [c4ec56eeb] - - supi@0.43.12 - - @pnpm/read-project-manifest@1.1.3 - - @pnpm/cli-utils@0.4.36 - - @pnpm/store-connection-manager@0.3.45 - -## 1.0.76 - -### Patch Changes - -- supi@0.43.11 -- @pnpm/store-connection-manager@0.3.44 - -## 1.0.75 - -### Patch Changes - -- Updated dependencies [b5d694e7f] -- Updated dependencies [c03a2b2cb] - - supi@0.43.10 - - @pnpm/cli-utils@0.4.35 - - @pnpm/read-project-manifest@1.1.2 - - @pnpm/store-connection-manager@0.3.43 - -## 1.0.74 - -### Patch Changes - -- Updated dependencies [50b360ec1] - - supi@0.43.9 - - @pnpm/cli-utils@0.4.34 - - @pnpm/store-connection-manager@0.3.42 - -## 1.0.73 - -### Patch Changes - -- Updated dependencies [fcdad632f] -- Updated dependencies [d54043ee4] - - @pnpm/constants@4.1.0 - - supi@0.43.8 - - @pnpm/cli-utils@0.4.33 - - @pnpm/read-project-manifest@1.1.1 - - @pnpm/store-connection-manager@0.3.41 - -## 1.0.72 - -### Patch Changes - -- supi@0.43.7 - -## 1.0.71 - -### Patch Changes - -- supi@0.43.6 - -## 1.0.70 - -### Patch Changes - -- Updated dependencies [ddd98dd74] -- Updated dependencies [f591fdeeb] - - supi@0.43.5 - - @pnpm/cli-utils@0.4.32 - - @pnpm/store-connection-manager@0.3.40 - -## 1.0.69 - -### Patch Changes - -- Updated dependencies [2762781cc] -- Updated dependencies [fb92e9f88] - - @pnpm/read-project-manifest@1.1.0 - - supi@0.43.4 - - @pnpm/cli-utils@0.4.31 - - @pnpm/store-connection-manager@0.3.39 - -## 1.0.68 - -### Patch Changes - -- Updated dependencies [95ad9cafa] - - supi@0.43.3 - -## 1.0.67 - -### Patch Changes - -- Updated dependencies [74914c178] - - supi@0.43.2 - - @pnpm/cli-utils@0.4.30 - - @pnpm/store-connection-manager@0.3.38 - -## 1.0.66 - -### Patch Changes - -- Updated dependencies [9e774ae20] - - supi@0.43.1 - - @pnpm/store-connection-manager@0.3.37 - -## 1.0.65 - -### Patch Changes - -- Updated dependencies [23cf3c88b] - - supi@0.43.0 - - @pnpm/cli-utils@0.4.29 - - @pnpm/store-connection-manager@0.3.36 - -## 1.0.64 - -### Patch Changes - -- Updated dependencies [40a9e1f3f] - - supi@0.42.0 - - @pnpm/store-connection-manager@0.3.35 - -## 1.0.63 - -### Patch Changes - -- @pnpm/store-connection-manager@0.3.34 -- supi@0.41.31 - -## 1.0.62 - -### Patch Changes - -- @pnpm/store-connection-manager@0.3.33 -- supi@0.41.30 -- @pnpm/cli-utils@0.4.28 - -## 1.0.61 - -### Patch Changes - -- Updated dependencies [86cd72de3] - - supi@0.41.29 - - @pnpm/store-connection-manager@0.3.32 - - @pnpm/cli-utils@0.4.27 - -## 1.0.60 - -### Patch Changes - -- Updated dependencies [968c26470] - - supi@0.41.28 - - @pnpm/store-connection-manager@0.3.31 - -## 1.0.59 - -### Patch Changes - -- Updated dependencies [5a3420ee5] - - supi@0.41.27 - - @pnpm/cli-utils@0.4.26 - -## 1.0.58 - -### Patch Changes - -- Updated dependencies [11dea936a] - - supi@0.41.26 - - @pnpm/store-connection-manager@0.3.30 - -## 1.0.57 - -### Patch Changes - -- Updated dependencies [c4165dccb] - - supi@0.41.25 - -## 1.0.56 - -### Patch Changes - -- Updated dependencies [c7e856fac] - - supi@0.41.24 - -## 1.0.55 - -### Patch Changes - -- Updated dependencies [8242401c7] - - supi@0.41.23 - -## 1.0.54 - -### Patch Changes - -- Updated dependencies [75a36deba] -- Updated dependencies [8351fce25] - - @pnpm/error@1.3.1 - - supi@0.41.22 - - @pnpm/cli-utils@0.4.25 - - @pnpm/read-project-manifest@1.0.13 - - @pnpm/store-connection-manager@0.3.29 - -## 1.0.53 - -### Patch Changes - -- Updated dependencies [83e2e6879] - - supi@0.41.21 - -## 1.0.52 - -### Patch Changes - -- @pnpm/cli-utils@0.4.24 -- @pnpm/store-connection-manager@0.3.28 - -## 1.0.51 - -### Patch Changes - -- @pnpm/store-connection-manager@0.3.27 -- supi@0.41.20 -- @pnpm/cli-utils@0.4.23 - -## 1.0.50 - -### Patch Changes - -- Updated dependencies [6d480dd7a] - - @pnpm/error@1.3.0 - - supi@0.41.19 - - @pnpm/cli-utils@0.4.22 - - @pnpm/read-project-manifest@1.0.12 - - @pnpm/store-connection-manager@0.3.26 - -## 1.0.49 - -### Patch Changes - -- @pnpm/cli-utils@0.4.21 -- @pnpm/store-connection-manager@0.3.25 - -## 1.0.48 - -### Patch Changes - -- Updated dependencies [9b90591e4] - - supi@0.41.18 - - @pnpm/cli-utils@0.4.20 - - @pnpm/store-connection-manager@0.3.24 - -## 1.0.47 - -### Patch Changes - -- @pnpm/read-project-manifest@1.0.11 -- @pnpm/cli-utils@0.4.19 -- supi@0.41.17 -- @pnpm/store-connection-manager@0.3.23 - -## 1.0.46 - -### Patch Changes - -- Updated dependencies [3bd3253e3] -- Updated dependencies [0a8ff3ad3] - - @pnpm/read-project-manifest@1.0.10 - - supi@0.41.16 - - @pnpm/cli-utils@0.4.18 - - @pnpm/store-connection-manager@0.3.22 - -## 1.0.45 - -### Patch Changes - -- a2ef8084f: Use the same versions of dependencies across the pnpm monorepo. -- Updated dependencies [103ad7487] -- Updated dependencies [a2ef8084f] - - supi@0.41.15 - - @pnpm/cli-utils@0.4.17 - - @pnpm/store-connection-manager@0.3.21 - -## 1.0.44 - -### Patch Changes - -- supi@0.41.14 - -## 1.0.43 - -### Patch Changes - -- supi@0.41.13 - -## 1.0.42 - -### Patch Changes - -- Updated dependencies [8c1cf25b7] - - supi@0.41.12 - -## 1.0.41 - -### Patch Changes - -- Updated dependencies [ad69677a7] - - @pnpm/cli-utils@0.4.16 - - @pnpm/store-connection-manager@0.3.20 - -## 1.0.40 - -### Patch Changes - -- Updated dependencies [a01626668] - - supi@0.41.11 - -## 1.0.39 - -### Patch Changes - -- supi@0.41.10 -- @pnpm/store-connection-manager@0.3.19 -- @pnpm/cli-utils@0.4.15 - -## 1.0.38 - -### Patch Changes - -- Updated dependencies [7b98d16c8] - - @pnpm/store-connection-manager@0.3.18 - - @pnpm/cli-utils@0.4.14 - - supi@0.41.9 - -## 1.0.37 - -### Patch Changes - -- Updated dependencies [d9310c034] - - @pnpm/store-connection-manager@0.3.17 - - supi@0.41.8 - -## 1.0.36 - -### Patch Changes - -- Updated dependencies [1d8ec7208] - - supi@0.41.7 - -## 1.0.35 - -### Patch Changes - -- @pnpm/cli-utils@0.4.13 -- @pnpm/store-connection-manager@0.3.16 - -## 1.0.34 - -### Patch Changes - -- @pnpm/cli-utils@0.4.12 -- @pnpm/store-connection-manager@0.3.15 -- supi@0.41.6 - -## 1.0.33 - -### Patch Changes - -- @pnpm/store-connection-manager@0.3.14 -- supi@0.41.5 - -## 1.0.32 - -### Patch Changes - -- @pnpm/cli-utils@0.4.11 -- @pnpm/store-connection-manager@0.3.13 - -## 1.0.31 - -### Patch Changes - -- Updated dependencies [220896511] - - supi@0.41.4 - - @pnpm/cli-utils@0.4.10 - - @pnpm/store-connection-manager@0.3.12 - - @pnpm/read-project-manifest@1.0.9 - -## 1.0.30 - -### Patch Changes - -- Updated dependencies [57d08f303] - - supi@0.41.3 - - @pnpm/store-connection-manager@0.3.11 - -## 1.0.29 - -### Patch Changes - -- Updated dependencies [17b598c18] -- Updated dependencies [1520e3d6f] - - supi@0.41.2 - - @pnpm/store-connection-manager@0.3.10 - -## 1.0.28 - -### Patch Changes - -- supi@0.41.1 - -## 1.0.27 - -### Patch Changes - -- Updated dependencies [71a8c8ce3] -- Updated dependencies [71a8c8ce3] - - supi@0.41.0 - - @pnpm/cli-utils@0.4.9 - - @pnpm/read-project-manifest@1.0.8 - - @pnpm/store-connection-manager@0.3.9 - -## 1.0.26 - -### Patch Changes - -- supi@0.40.1 -- @pnpm/store-connection-manager@0.3.8 - -## 1.0.25 - -### Patch Changes - -- Updated dependencies [57c510f00] -- Updated dependencies [41d92948b] -- Updated dependencies [e934b1a48] - - @pnpm/read-project-manifest@1.0.7 - - supi@0.40.0 - - @pnpm/cli-utils@0.4.8 - - @pnpm/store-connection-manager@0.3.7 - -## 1.0.24 - -### Patch Changes - -- Updated dependencies [0e7ec4533] -- Updated dependencies [13630c659] -- Updated dependencies [d3ddd023c] - - supi@0.39.10 - - @pnpm/store-connection-manager@0.3.6 - - @pnpm/cli-utils@0.4.7 - -## 1.0.23 - -### Patch Changes - -- supi@0.39.9 -- @pnpm/store-connection-manager@0.3.5 - -## 1.0.22 - -### Patch Changes - -- @pnpm/store-connection-manager@0.3.4 -- supi@0.39.8 - -## 1.0.21 - -### Patch Changes - -- @pnpm/store-connection-manager@0.3.3 - -## 1.0.20 - -### Patch Changes - -- @pnpm/cli-utils@0.4.6 -- @pnpm/store-connection-manager@0.3.2 -- supi@0.39.7 - -## 1.0.19 - -### Patch Changes - -- Updated dependencies [2f9c7ca85] -- Updated dependencies [160975d62] - - supi@0.39.6 - -## 1.0.18 - -### Patch Changes - -- @pnpm/store-connection-manager@0.3.1 -- supi@0.39.5 - -## 1.0.17 - -### Patch Changes - -- supi@0.39.4 - -## 1.0.16 - -### Patch Changes - -- Updated dependencies [71b0cb8fd] - - supi@0.39.3 - -## 1.0.15 - -### Patch Changes - -- Updated dependencies [327bfbf02] - - supi@0.39.2 - -## 1.0.14 - -### Patch Changes - -- supi@0.39.1 - -## 1.0.13 - -### Patch Changes - -- Updated dependencies [b5f66c0f2] -- Updated dependencies [2e8ebabb2] -- Updated dependencies [ca9f50844] -- Updated dependencies [cc8a3bd31] -- Updated dependencies [3f73eaf0c] -- Updated dependencies [f516d266c] -- Updated dependencies [da091c711] -- Updated dependencies [a7d20d927] -- Updated dependencies [e11019b89] -- Updated dependencies [802d145fc] -- Updated dependencies [242cf8737] -- Updated dependencies [b6a82072e] -- Updated dependencies [45fdcfde2] -- Updated dependencies [a5febb913] -- Updated dependencies [4f5801b1c] -- Updated dependencies [c25cccdad] -- Updated dependencies [f453a5f46] -- Updated dependencies [9fbb74ecb] - - @pnpm/constants@4.0.0 - - supi@0.39.0 - - @pnpm/store-connection-manager@0.3.0 - - @pnpm/cli-utils@0.4.5 - - @pnpm/error@1.2.1 - - @pnpm/read-project-manifest@1.0.6 - -## 1.0.12-alpha.7 - -### Patch Changes - -- Updated dependencies [ca9f50844] -- Updated dependencies [cc8a3bd31] -- Updated dependencies [a7d20d927] -- Updated dependencies [242cf8737] -- Updated dependencies [45fdcfde2] -- Updated dependencies [a5febb913] -- Updated dependencies [c25cccdad] - - @pnpm/constants@4.0.0-alpha.1 - - supi@0.39.0-alpha.7 - - @pnpm/store-connection-manager@0.3.0-alpha.5 - - @pnpm/cli-utils@0.4.5-alpha.2 - -## 1.0.12-alpha.6 - -### Patch Changes - -- Updated dependencies [3f73eaf0] -- Updated dependencies [da091c71] -- Updated dependencies [9fbb74ec] - - supi@0.39.0-alpha.6 - - @pnpm/store-connection-manager@0.3.0-alpha.4 - - @pnpm/cli-utils@0.4.5-alpha.1 - - @pnpm/read-project-manifest@1.0.6-alpha.0 - -## 1.0.12-alpha.5 - -### Patch Changes - -- supi@0.38.30-alpha.5 - -## 1.0.12-alpha.4 - -### Patch Changes - -- Updated dependencies [b5f66c0f2] - - @pnpm/constants@4.0.0-alpha.0 - - supi@0.39.0-alpha.4 - - @pnpm/store-connection-manager@0.2.32-alpha.3 - - @pnpm/cli-utils@0.4.5-alpha.0 - -## 1.0.11-alpha.3 - -### Patch Changes - -- Updated dependencies [f453a5f46] - - supi@0.39.0-alpha.3 - - @pnpm/store-connection-manager@0.2.32-alpha.2 - -## 1.0.11-alpha.2 - -### Patch Changes - -- Updated dependencies [2e8ebabb2] - - supi@0.39.0-alpha.2 - -## 1.0.11-alpha.1 - -### Patch Changes - -- Updated dependencies [4f62d0383] - - supi@0.39.0-alpha.1 - - @pnpm/store-connection-manager@0.2.32-alpha.1 - -## 1.0.11-alpha.0 - -### Patch Changes - -- Updated dependencies [91c4b5954] - - @pnpm/store-connection-manager@0.3.0-alpha.0 - - supi@0.39.0-alpha.0 - -## 1.0.11 - -### Patch Changes - -- Updated dependencies [760cc6664] - - supi@0.38.30 - -## 1.0.10 - -### Patch Changes - -- Updated dependencies [907c63a48] -- Updated dependencies [907c63a48] -- Updated dependencies [907c63a48] -- Updated dependencies [907c63a48] -- Updated dependencies [907c63a48] -- Updated dependencies [907c63a48] - - supi@0.38.29 - - @pnpm/store-connection-manager@0.2.31 - - @pnpm/read-project-manifest@1.0.5 - - @pnpm/cli-utils@0.4.4 diff --git a/packages/plugin-commands-import/README.md b/packages/plugin-commands-import/README.md deleted file mode 100644 index af14685dca..0000000000 --- a/packages/plugin-commands-import/README.md +++ /dev/null @@ -1,15 +0,0 @@ -# @pnpm/plugin-commands-import - -> The import command - -[![npm version](https://img.shields.io/npm/v/@pnpm/plugin-commands-import.svg)](https://www.npmjs.com/package/@pnpm/plugin-commands-import) - -## Installation - -```sh - add @pnpm/plugin-commands-import -``` - -## License - -MIT diff --git a/packages/plugin-commands-import/jest.config.js b/packages/plugin-commands-import/jest.config.js deleted file mode 100644 index 2ddfb5f739..0000000000 --- a/packages/plugin-commands-import/jest.config.js +++ /dev/null @@ -1,4 +0,0 @@ -const config = require('../../jest.config.js') - -module.exports = config - diff --git a/packages/plugin-commands-import/package.json b/packages/plugin-commands-import/package.json deleted file mode 100644 index 3a6cc7931f..0000000000 --- a/packages/plugin-commands-import/package.json +++ /dev/null @@ -1,59 +0,0 @@ -{ - "name": "@pnpm/plugin-commands-import", - "version": "3.1.17", - "description": "The import command", - "main": "lib/index.js", - "typings": "lib/index.d.ts", - "files": [ - "lib", - "!*.map" - ], - "engines": { - "node": ">=12.17" - }, - "scripts": { - "lint": "eslint src/**/*.ts test/**/*.ts", - "registry-mock": "registry-mock", - "test:jest": "jest", - "test:e2e": "registry-mock prepare && run-p -r registry-mock test:jest", - "_test": "cross-env PNPM_REGISTRY_MOCK_PORT=7773 pnpm run test:e2e", - "test": "pnpm run compile && pnpm run _test", - "prepublishOnly": "pnpm run compile", - "compile": "rimraf lib tsconfig.tsbuildinfo && tsc --build && pnpm run lint -- --fix" - }, - "repository": "https://github.com/pnpm/pnpm/blob/master/packages/plugin-commands-import", - "keywords": [ - "pnpm6", - "pnpm", - "pack", - "publish" - ], - "license": "MIT", - "bugs": { - "url": "https://github.com/pnpm/pnpm/issues" - }, - "homepage": "https://github.com/pnpm/pnpm/blob/master/packages/plugin-commands-import#readme", - "devDependencies": { - "@pnpm/assert-project": "workspace:*", - "@pnpm/prepare": "workspace:0.0.27", - "@types/ncp": "^2.0.4", - "@types/yarnpkg__lockfile": "^1.1.5", - "@yarnpkg/lockfile": "^1.1.0", - "ncp": "^2.0.0", - "tempy": "^1.0.0" - }, - "dependencies": { - "@pnpm/cli-utils": "workspace:0.6.29", - "@pnpm/constants": "workspace:5.0.0", - "@pnpm/error": "workspace:2.0.0", - "@pnpm/graceful-fs": "workspace:1.0.0", - "@pnpm/read-project-manifest": "workspace:2.0.6", - "@pnpm/store-connection-manager": "workspace:3.1.3", - "@zkochan/rimraf": "^2.1.1", - "load-json-file": "^6.2.0", - "path-exists": "^4.0.0", - "render-help": "^1.0.1", - "@pnpm/core": "workspace:1.1.0" - }, - "funding": "https://opencollective.com/pnpm" -} diff --git a/packages/plugin-commands-import/src/index.ts b/packages/plugin-commands-import/src/index.ts deleted file mode 100644 index bfced674da..0000000000 --- a/packages/plugin-commands-import/src/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -import * as importCommand from './import' - -export { importCommand } diff --git a/packages/plugin-commands-import/tsconfig.json b/packages/plugin-commands-import/tsconfig.json deleted file mode 100644 index ccb9fa79b4..0000000000 --- a/packages/plugin-commands-import/tsconfig.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "extends": "@pnpm/tsconfig", - "compilerOptions": { - "outDir": "lib", - "rootDir": "src" - }, - "include": [ - "src/**/*.ts", - "../../typings/**/*.d.ts" - ], - "references": [ - { - "path": "../../privatePackages/assert-project" - }, - { - "path": "../../privatePackages/prepare" - }, - { - "path": "../cli-utils" - }, - { - "path": "../constants" - }, - { - "path": "../core" - }, - { - "path": "../error" - }, - { - "path": "../graceful-fs" - }, - { - "path": "../read-project-manifest" - }, - { - "path": "../store-connection-manager" - } - ] -} diff --git a/packages/plugin-commands-import/tsconfig.lint.json b/packages/plugin-commands-import/tsconfig.lint.json deleted file mode 100644 index 0dc5add6b7..0000000000 --- a/packages/plugin-commands-import/tsconfig.lint.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "extends": "./tsconfig.json", - "include": [ - "src/**/*.ts", - "test/**/*.ts", - "../../typings/**/*.d.ts" - ] -} diff --git a/packages/plugin-commands-installation/package.json b/packages/plugin-commands-installation/package.json index ae0cdac4bc..882d43c190 100644 --- a/packages/plugin-commands-installation/package.json +++ b/packages/plugin-commands-installation/package.json @@ -16,7 +16,7 @@ "registry-mock": "registry-mock", "test:jest": "jest", "test:e2e": "registry-mock prepare && run-p -r registry-mock test:jest", - "_test": "cross-env PNPM_REGISTRY_MOCK_PORT=7774 pnpm run test:e2e", + "_test": "cross-env PNPM_REGISTRY_MOCK_PORT=7773 pnpm run test:e2e", "test": "pnpm run compile && pnpm run _test", "prepublishOnly": "pnpm run compile", "compile": "rimraf lib tsconfig.tsbuildinfo && tsc --build && pnpm run lint -- --fix" @@ -40,11 +40,13 @@ "@pnpm/prepare": "workspace:0.0.27", "@pnpm/test-fixtures": "workspace:*", "@types/is-ci": "^3.0.0", + "@types/ncp": "^2.0.4", "@types/proxyquire": "^1.3.28", "@types/ramda": "0.27.39", "@types/sinon": "^9.0.11", + "@types/yarnpkg__lockfile": "^1.1.5", "@types/zkochan__table": "npm:@types/table@6.0.0", - "load-json-file": "^6.2.0", + "ncp": "^2.0.0", "path-name": "^1.0.0", "proxyquire": "^2.1.3", "read-yaml-file": "^2.1.0", @@ -61,21 +63,26 @@ "@pnpm/common-cli-options-help": "workspace:0.7.1", "@pnpm/config": "workspace:13.4.1", "@pnpm/constants": "workspace:5.0.0", + "@pnpm/core": "workspace:1.1.0", "@pnpm/error": "workspace:2.0.0", "@pnpm/filter-workspace-packages": "workspace:4.4.1", "@pnpm/find-workspace-dir": "workspace:3.0.1", "@pnpm/find-workspace-packages": "workspace:3.1.21", + "@pnpm/graceful-fs": "workspace:1.0.0", "@pnpm/manifest-utils": "workspace:2.1.1", "@pnpm/outdated": "workspace:9.0.12", "@pnpm/package-store": "workspace:12.1.0", "@pnpm/parse-wanted-dependency": "workspace:2.0.0", "@pnpm/plugin-commands-rebuild": "workspace:5.2.0", "@pnpm/pnpmfile": "workspace:1.1.1", + "@pnpm/read-project-manifest": "workspace:2.0.6", "@pnpm/resolver-base": "workspace:8.1.0", "@pnpm/semver-diff": "^1.0.2", "@pnpm/sort-packages": "workspace:2.1.2", "@pnpm/store-connection-manager": "workspace:3.1.3", "@pnpm/types": "workspace:7.5.0", + "@yarnpkg/lockfile": "^1.1.0", + "@zkochan/rimraf": "^2.1.1", "@zkochan/table": "^1.0.0", "@zkochan/which": "^2.0.3", "camelcase-keys": "^6.2.2", @@ -83,6 +90,7 @@ "enquirer": "^2.3.6", "is-ci": "^3.0.0", "is-subdir": "^1.1.1", + "load-json-file": "^6.2.0", "mem": "^8.0.0", "p-filter": "^2.1.0", "p-limit": "^3.1.0", @@ -91,7 +99,6 @@ "ramda": "^0.27.1", "read-ini-file": "^3.1.0", "render-help": "^1.0.1", - "@pnpm/core": "workspace:1.1.0", "version-selector-type": "^3.0.0" }, "peerDependencies": { diff --git a/packages/plugin-commands-import/src/import.ts b/packages/plugin-commands-installation/src/import.ts similarity index 73% rename from packages/plugin-commands-import/src/import.ts rename to packages/plugin-commands-installation/src/import.ts index 1f5ba852c9..3d875c587b 100644 --- a/packages/plugin-commands-import/src/import.ts +++ b/packages/plugin-commands-installation/src/import.ts @@ -9,11 +9,17 @@ import { } from '@pnpm/store-connection-manager' import gfs from '@pnpm/graceful-fs' import { install, InstallOptions } from '@pnpm/core' +import { Config } from '@pnpm/config' +import findWorkspacePackages from '@pnpm/find-workspace-packages' +import { Project } from '@pnpm/types' +import logger from '@pnpm/logger' +import { sequenceGraph } from '@pnpm/sort-packages' import rimraf from '@zkochan/rimraf' import loadJsonFile from 'load-json-file' import renderHelp from 'render-help' import { parse as parseYarnLock } from '@yarnpkg/lockfile' import exists from 'path-exists' +import recursive from './recursive' export const rcOptionsTypes = cliOptionsTypes @@ -33,8 +39,15 @@ export function help () { export const commandNames = ['import'] +export type ImportCommandOptions = Pick & CreateStoreControllerOptions & Omit + export async function handler ( - opts: CreateStoreControllerOptions & Omit + opts: ImportCommandOptions, + params: string[] ) { // Removing existing pnpm lockfile // it should not influence the new one @@ -54,6 +67,39 @@ export async function handler ( throw new PnpmError('LOCKFILE_NOT_FOUND', 'No lockfile found') } preferredVersions = getPreferredVersions(versionsByPackageNames) + + // For a workspace with shared lockfile + if (opts.workspaceDir) { + const allProjects = opts.allProjects ?? await findWorkspacePackages(opts.workspaceDir, opts) + const selectedProjectsGraph = opts.selectedProjectsGraph ?? selectProjectByDir(allProjects, opts.dir) + if (selectedProjectsGraph != null) { + const sequencedGraph = sequenceGraph(selectedProjectsGraph) + // Check and warn if there are cyclic dependencies + if (!sequencedGraph.safe) { + const cyclicDependenciesInfo = sequencedGraph.cycles.length > 0 + ? `: ${sequencedGraph.cycles.map(deps => deps.join(', ')).join('; ')}` + : '' + logger.warn({ + message: `There are cyclic workspace dependencies${cyclicDependenciesInfo}`, + prefix: opts.workspaceDir, + }) + } + await recursive(allProjects, + params, + // @ts-expect-error + { + ...opts, + lockfileOnly: true, + selectedProjectsGraph, + preferredVersions, + workspaceDir: opts.workspaceDir, + }, + 'import' + ) + } + return + } + const store = await createOrConnectStoreController(opts) const installOpts = { ...opts, @@ -166,3 +212,9 @@ interface YarnLockPackage { interface YarnPackgeLock { [name: string]: YarnLockPackage } + +function selectProjectByDir (projects: Project[], searchedDir: string) { + const project = projects.find(({ dir }) => path.relative(dir, searchedDir) === '') + if (project == null) return undefined + return { [searchedDir]: { dependencies: [], package: project } } +} diff --git a/packages/plugin-commands-installation/src/index.ts b/packages/plugin-commands-installation/src/index.ts index c6b5a96d07..f7d6f2e546 100644 --- a/packages/plugin-commands-installation/src/index.ts +++ b/packages/plugin-commands-installation/src/index.ts @@ -6,5 +6,6 @@ import * as prune from './prune' import * as remove from './remove' import * as unlink from './unlink' import * as update from './update' +import * as importCommand from './import' -export { add, fetch, install, link, prune, remove, unlink, update } +export { add, fetch, install, link, prune, remove, unlink, update, importCommand } diff --git a/packages/plugin-commands-installation/src/recursive.ts b/packages/plugin-commands-installation/src/recursive.ts index 9d37ded310..4b6aad9c14 100755 --- a/packages/plugin-commands-installation/src/recursive.ts +++ b/packages/plugin-commands-installation/src/recursive.ts @@ -38,6 +38,7 @@ import { createWorkspaceSpecs, updateToWorkspacePackagesFromManifest } from './u import updateToLatestSpecsFromManifest, { createLatestSpecs } from './updateToLatestSpecsFromManifest' import getSaveType from './getSaveType' import getPinnedVersion from './getPinnedVersion' +import { PreferredVersions } from '@pnpm/resolver-base' type RecursiveOptions = CreateStoreControllerOptions & Pick> + allowNew?: boolean + forceHoistPattern?: boolean + forcePublicHoistPattern?: boolean + ignoredPackages?: Set + update?: boolean + useBetaCli?: boolean + selectedProjectsGraph: ProjectsGraph + preferredVersions?: PreferredVersions +} & Partial< +Pick +> & Required< +Pick +> export default async function recursive ( allProjects: Project[], params: string[], - opts: RecursiveOptions & { - allowNew?: boolean - forceHoistPattern?: boolean - forcePublicHoistPattern?: boolean - ignoredPackages?: Set - update?: boolean - useBetaCli?: boolean - selectedProjectsGraph: ProjectsGraph - } & Required>, - cmdFullName: 'install' | 'add' | 'remove' | 'unlink' | 'update' + opts: RecursiveOptions, + cmdFullName: 'install' | 'add' | 'remove' | 'unlink' | 'update' | 'import' ): Promise { if (allProjects.length === 0) { // It might make sense to throw an exception in this case @@ -124,8 +132,8 @@ export default async function recursive ( targetDependenciesField, workspacePackages, - forceHoistPattern: typeof opts.rawLocalConfig['hoist-pattern'] !== 'undefined' || typeof opts.rawLocalConfig['hoist'] !== 'undefined', - forceShamefullyHoist: typeof opts.rawLocalConfig['shamefully-hoist'] !== 'undefined', + forceHoistPattern: typeof opts.rawLocalConfig?.['hoist-pattern'] !== 'undefined' || typeof opts.rawLocalConfig?.['hoist'] !== 'undefined', + forceShamefullyHoist: typeof opts.rawLocalConfig?.['shamefully-hoist'] !== 'undefined', }) as InstallOptions const result = { @@ -164,13 +172,24 @@ export default async function recursive ( const updateMatch = cmdFullName === 'update' && (params.length > 0) ? createMatcher(params) : null // For a workspace with shared lockfile - if (opts.lockfileDir && ['add', 'install', 'remove', 'update'].includes(cmdFullName)) { + if (opts.lockfileDir && ['add', 'install', 'remove', 'update', 'import'].includes(cmdFullName)) { let importers = await getImporters() const calculatedRepositoryRoot = calculateRepositoryRoot(opts.workspaceDir, importers.map(x => x.rootDir)) const isFromWorkspace = isSubdir.bind(null, calculatedRepositoryRoot) importers = await pFilter(importers, async ({ rootDir }: { rootDir: string }) => isFromWorkspace(await fs.realpath(rootDir))) if (importers.length === 0) return true - const mutation = cmdFullName === 'remove' ? 'uninstallSome' : (params.length === 0 && !updateToLatest ? 'install' : 'installSome') + let mutation!: string + switch (cmdFullName) { + case 'remove': + mutation = 'uninstallSome' + break + case 'import': + mutation = 'install' + break + default: + mutation = (params.length === 0 && !updateToLatest ? 'install' : 'installSome') + break + } const writeProjectManifests = [] as Array<(manifest: ProjectManifest) => Promise> const mutatedImporters = [] as MutatedProject[] await Promise.all(importers.map(async ({ buildIndex, rootDir }) => { diff --git a/packages/plugin-commands-installation/test/getPinnedVersion.ts b/packages/plugin-commands-installation/test/getPinnedVersion.ts new file mode 100644 index 0000000000..a99a635bef --- /dev/null +++ b/packages/plugin-commands-installation/test/getPinnedVersion.ts @@ -0,0 +1,8 @@ +import getPinnedVersion from '@pnpm/plugin-commands-installation/lib/getPinnedVersion' + +test('getPinnedVersion()', () => { + expect(getPinnedVersion({ saveExact: true })).toEqual('patch') + expect(getPinnedVersion({ savePrefix: '' })).toEqual('patch') + expect(getPinnedVersion({ savePrefix: '~' })).toEqual('minor') + expect(getPinnedVersion({ savePrefix: '^' })).toEqual('major') +}) diff --git a/packages/plugin-commands-installation/test/getSaveType.ts b/packages/plugin-commands-installation/test/getSaveType.ts new file mode 100644 index 0000000000..b858f035ae --- /dev/null +++ b/packages/plugin-commands-installation/test/getSaveType.ts @@ -0,0 +1,9 @@ +import getSaveType from '@pnpm/plugin-commands-installation/lib/getSaveType' + +test('getSaveType()', () => { + expect(getSaveType({ saveDev: true })).toEqual('devDependencies') + expect(getSaveType({ savePeer: true })).toEqual('devDependencies') + expect(getSaveType({ saveOptional: true })).toEqual('optionalDependencies') + expect(getSaveType({ saveProd: true })).toEqual('dependencies') + expect(getSaveType({})).toBeUndefined() +}) diff --git a/packages/plugin-commands-import/test/index.ts b/packages/plugin-commands-installation/test/import.ts similarity index 97% rename from packages/plugin-commands-import/test/index.ts rename to packages/plugin-commands-installation/test/import.ts index cf75c4f900..1f6a375fea 100644 --- a/packages/plugin-commands-import/test/index.ts +++ b/packages/plugin-commands-installation/test/import.ts @@ -3,7 +3,7 @@ import { promisify } from 'util' import path from 'path' import assertProject from '@pnpm/assert-project' import PnpmError from '@pnpm/error' -import { importCommand } from '@pnpm/plugin-commands-import' +import { importCommand } from '@pnpm/plugin-commands-installation' import prepare, { tempDir } from '@pnpm/prepare' import { addDistTag, REGISTRY_MOCK_PORT } from '@pnpm/registry-mock' import tempy from 'tempy' @@ -52,7 +52,7 @@ test('import from package-lock.json', async () => { await importCommand.handler({ ...DEFAULT_OPTS, dir: process.cwd(), - }) + }, []) const project = assertProject(process.cwd()) const lockfile = await project.readLockfile() @@ -73,7 +73,7 @@ test('import from yarn.lock', async () => { await importCommand.handler({ ...DEFAULT_OPTS, dir: process.cwd(), - }) + }, []) const project = assertProject(process.cwd()) const lockfile = await project.readLockfile() @@ -94,7 +94,7 @@ test('import from npm-shrinkwrap.json', async () => { await importCommand.handler({ ...DEFAULT_OPTS, dir: process.cwd(), - }) + }, []) const project = assertProject(process.cwd()) const lockfile = await project.readLockfile() @@ -113,7 +113,7 @@ test('import fails when no lockfiles are found', async () => { importCommand.handler({ ...DEFAULT_OPTS, dir: process.cwd(), - }) + }, []) ).rejects.toThrow( new PnpmError('LOCKFILE_NOT_FOUND', 'No lockfile found') ) diff --git a/packages/plugin-commands-installation/test/importRecursive.ts b/packages/plugin-commands-installation/test/importRecursive.ts new file mode 100644 index 0000000000..84c7be1fd7 --- /dev/null +++ b/packages/plugin-commands-installation/test/importRecursive.ts @@ -0,0 +1,116 @@ +/// +import { promisify } from 'util' +import path from 'path' +import assertProject from '@pnpm/assert-project' +import { importCommand } from '@pnpm/plugin-commands-installation' +import { tempDir } from '@pnpm/prepare' +import { REGISTRY_MOCK_PORT } from '@pnpm/registry-mock' +import { readProjects } from '@pnpm/filter-workspace-packages' +import tempy from 'tempy' +import ncpCB from 'ncp' + +const ncp = promisify(ncpCB) + +const fixtures = path.join(__dirname, '../../../fixtures') + +const REGISTRY = `http://localhost:${REGISTRY_MOCK_PORT}` +const TMP = tempy.directory() + +const DEFAULT_OPTS = { + alwaysAuth: false, + ca: undefined, + cacheDir: path.join(TMP, 'cache'), + cert: undefined, + fetchRetries: 2, + fetchRetryFactor: 90, + fetchRetryMaxtimeout: 90, + fetchRetryMintimeout: 10, + httpsProxy: undefined, + key: undefined, + localAddress: undefined, + lock: false, + lockStaleDuration: 90, + networkConcurrency: 16, + offline: false, + proxy: undefined, + rawConfig: { registry: REGISTRY }, + registries: { default: REGISTRY }, + registry: REGISTRY, + storeDir: path.join(TMP, 'store'), + strictSsl: false, + userAgent: 'pnpm', + useRunningStoreServer: false, + useStoreServer: false, +} + +test('import from shared yarn.lock of monorepo', async () => { + tempDir() + + await ncp(path.join(fixtures, 'workspace-has-shared-yarn-lock'), process.cwd()) + const { allProjects, selectedProjectsGraph } = await readProjects(process.cwd(), []) + await importCommand.handler({ + ...DEFAULT_OPTS, + allProjects, + selectedProjectsGraph, + workspaceDir: process.cwd(), + lockfileDir: process.cwd(), + dir: process.cwd(), + }, []) + + const project = assertProject(process.cwd()) + const lockfile = await project.readLockfile() + expect(lockfile.packages).toHaveProperty(['/is-positive/1.0.0']) + expect(lockfile.packages).toHaveProperty(['/is-negative/1.0.1']) + + // node_modules is not created + await project.hasNot('is-positive') + await project.hasNot('is-negative') +}) + +test('import from shared package-lock.json of monorepo', async () => { + tempDir() + + await ncp(path.join(fixtures, 'workspace-has-shared-package-lock-json'), process.cwd()) + const { allProjects, selectedProjectsGraph } = await readProjects(process.cwd(), []) + await importCommand.handler({ + ...DEFAULT_OPTS, + allProjects, + selectedProjectsGraph, + workspaceDir: process.cwd(), + lockfileDir: process.cwd(), + dir: process.cwd(), + }, []) + + const project = assertProject(process.cwd()) + const lockfile = await project.readLockfile() + expect(lockfile.packages).toHaveProperty(['/is-positive/1.0.0']) + expect(lockfile.packages).toHaveProperty(['/is-negative/1.0.1']) + + // node_modules is not created + await project.hasNot('is-positive') + await project.hasNot('is-negative') +}) + +test('import from shared npm-shrinkwrap.json of monorepo', async () => { + tempDir() + + await ncp(path.join(fixtures, 'workspace-has-shared-npm-shrinkwrap-json'), process.cwd()) + const { allProjects, selectedProjectsGraph } = await readProjects(process.cwd(), []) + await importCommand.handler({ + ...DEFAULT_OPTS, + allProjects, + selectedProjectsGraph, + workspaceDir: process.cwd(), + lockfileDir: process.cwd(), + dir: process.cwd(), + }, []) + + const project = assertProject(process.cwd()) + const lockfile = await project.readLockfile() + expect(lockfile.packages).toHaveProperty(['/is-positive/1.0.0']) + expect(lockfile.packages).toHaveProperty(['/is-negative/1.0.1']) + + // node_modules is not created + await project.hasNot('is-positive') + await project.hasNot('is-negative') +}) diff --git a/packages/plugin-commands-installation/test/updateToLatestSpecsFromManifest.ts b/packages/plugin-commands-installation/test/updateToLatestSpecsFromManifest.ts new file mode 100644 index 0000000000..2f32243241 --- /dev/null +++ b/packages/plugin-commands-installation/test/updateToLatestSpecsFromManifest.ts @@ -0,0 +1,42 @@ +import updateToLatestSpecsFromManifest, { createLatestSpecs } from '@pnpm/plugin-commands-installation/lib/updateToLatestSpecsFromManifest' + +const MAINFEST = { + dependencies: { + 'dep-of-pkg-with-1-dep': 'npm:pkg-with-1-dep@1.0.0', + }, + devDependencies: { + foo: 'github:pnpm/foo', + }, + optionalDependencies: { + 'is-positive': '^1.0.0', + }, +} + +test('updateToLatestSpecsFromManifest()', () => { + const updateResult1 = expect(updateToLatestSpecsFromManifest(MAINFEST, { + optionalDependencies: true, + dependencies: true, + devDependencies: true, + })) + updateResult1.toHaveLength(2) + updateResult1.toContain('dep-of-pkg-with-1-dep@npm:pkg-with-1-dep@latest') + updateResult1.toContain('is-positive@latest') + + const updateResult2 = expect(updateToLatestSpecsFromManifest(MAINFEST, { + optionalDependencies: false, + dependencies: true, + devDependencies: false, + })) + updateResult2.toHaveLength(1) + updateResult2.toStrictEqual(['dep-of-pkg-with-1-dep@npm:pkg-with-1-dep@latest']) +}) + +test('createLatestSpecs()', () => { + expect( + createLatestSpecs(['dep-of-pkg-with-1-dep', 'is-positive@2.0.0', 'foo'], MAINFEST) + ).toStrictEqual(['dep-of-pkg-with-1-dep@npm:pkg-with-1-dep@latest', 'is-positive@2.0.0', 'foo']) + + expect( + createLatestSpecs(['dep-of-pkg-with-1-dep', 'is-positive', 'foo', 'bar'], MAINFEST) + ).toStrictEqual(['dep-of-pkg-with-1-dep@npm:pkg-with-1-dep@latest', 'is-positive@latest', 'foo']) +}) diff --git a/packages/plugin-commands-installation/tsconfig.json b/packages/plugin-commands-installation/tsconfig.json index a22adcd358..5ac9f86bca 100644 --- a/packages/plugin-commands-installation/tsconfig.json +++ b/packages/plugin-commands-installation/tsconfig.json @@ -48,6 +48,9 @@ { "path": "../find-workspace-packages" }, + { + "path": "../graceful-fs" + }, { "path": "../lockfile-types" }, @@ -75,6 +78,9 @@ { "path": "../pnpmfile" }, + { + "path": "../read-project-manifest" + }, { "path": "../resolver-base" }, diff --git a/packages/plugin-commands-listing/package.json b/packages/plugin-commands-listing/package.json index b47c23b5d9..572343f34f 100644 --- a/packages/plugin-commands-listing/package.json +++ b/packages/plugin-commands-listing/package.json @@ -16,7 +16,7 @@ "registry-mock": "registry-mock", "test:jest": "jest", "test:e2e": "registry-mock prepare && run-p -r registry-mock test:jest", - "_test": "cross-env PNPM_REGISTRY_MOCK_PORT=7775 pnpm run test:e2e", + "_test": "cross-env PNPM_REGISTRY_MOCK_PORT=7774 pnpm run test:e2e", "test": "pnpm run compile && pnpm run _test", "prepublishOnly": "pnpm run compile", "compile": "rimraf lib tsconfig.tsbuildinfo && tsc --build && pnpm run lint -- --fix" diff --git a/packages/plugin-commands-outdated/package.json b/packages/plugin-commands-outdated/package.json index 17f0eb1088..fe46591a89 100644 --- a/packages/plugin-commands-outdated/package.json +++ b/packages/plugin-commands-outdated/package.json @@ -16,7 +16,7 @@ "registry-mock": "registry-mock", "test:jest": "jest", "test:e2e": "registry-mock prepare && run-p -r registry-mock test:jest", - "_test": "cross-env PNPM_REGISTRY_MOCK_PORT=7776 pnpm run test:e2e", + "_test": "cross-env PNPM_REGISTRY_MOCK_PORT=7775 pnpm run test:e2e", "test": "pnpm run compile && pnpm run _test", "prepublishOnly": "pnpm run compile", "compile": "rimraf lib tsconfig.tsbuildinfo && tsc --build && pnpm run lint -- --fix" diff --git a/packages/plugin-commands-publishing/package.json b/packages/plugin-commands-publishing/package.json index 6fb084a430..d901495341 100644 --- a/packages/plugin-commands-publishing/package.json +++ b/packages/plugin-commands-publishing/package.json @@ -16,7 +16,7 @@ "registry-mock": "registry-mock", "test:jest": "jest", "test:e2e": "registry-mock prepare && run-p -r registry-mock test:jest", - "_test": "cross-env PNPM_REGISTRY_MOCK_PORT=7777 pnpm run test:e2e", + "_test": "cross-env PNPM_REGISTRY_MOCK_PORT=7776 pnpm run test:e2e", "test": "pnpm run compile && pnpm run _test", "prepublishOnly": "pnpm run compile", "compile": "rimraf lib tsconfig.tsbuildinfo && tsc --build && pnpm run lint -- --fix" diff --git a/packages/plugin-commands-rebuild/package.json b/packages/plugin-commands-rebuild/package.json index ae0c121682..3dabf18099 100644 --- a/packages/plugin-commands-rebuild/package.json +++ b/packages/plugin-commands-rebuild/package.json @@ -16,7 +16,7 @@ "registry-mock": "registry-mock", "test:jest": "jest", "test:e2e": "registry-mock prepare && run-p -r registry-mock test:jest", - "_test": "cross-env PNPM_REGISTRY_MOCK_PORT=7778 pnpm run test:e2e", + "_test": "cross-env PNPM_REGISTRY_MOCK_PORT=7777 pnpm run test:e2e", "test": "pnpm run compile && pnpm run _test", "prepublishOnly": "pnpm run compile", "compile": "rimraf lib tsconfig.tsbuildinfo && tsc --build && pnpm run lint -- --fix" diff --git a/packages/plugin-commands-script-runners/package.json b/packages/plugin-commands-script-runners/package.json index d88d0017f2..e3a5d7a692 100644 --- a/packages/plugin-commands-script-runners/package.json +++ b/packages/plugin-commands-script-runners/package.json @@ -16,7 +16,7 @@ "registry-mock": "registry-mock", "test:jest": "jest", "test:e2e": "registry-mock prepare && run-p -r registry-mock test:jest", - "_test": "cross-env PNPM_REGISTRY_MOCK_PORT=7779 pnpm run test:e2e", + "_test": "cross-env PNPM_REGISTRY_MOCK_PORT=7778 pnpm run test:e2e", "test": "pnpm run compile && pnpm run _test", "prepublishOnly": "pnpm run compile", "compile": "rimraf lib tsconfig.tsbuildinfo && tsc --build && pnpm run lint -- --fix" diff --git a/packages/plugin-commands-store/package.json b/packages/plugin-commands-store/package.json index 9ac031d315..67584737c9 100644 --- a/packages/plugin-commands-store/package.json +++ b/packages/plugin-commands-store/package.json @@ -16,7 +16,7 @@ "registry-mock": "registry-mock", "test:jest": "jest", "test:e2e": "registry-mock prepare && run-p -r registry-mock test:jest", - "_test": "cross-env PNPM_REGISTRY_MOCK_PORT=7780 pnpm run test:e2e", + "_test": "cross-env PNPM_REGISTRY_MOCK_PORT=7779 pnpm run test:e2e", "test": "pnpm run compile && pnpm run _test", "prepublishOnly": "pnpm run compile", "compile": "rimraf lib tsconfig.tsbuildinfo && tsc --build && pnpm run lint -- --fix" diff --git a/packages/pnpm/package.json b/packages/pnpm/package.json index 4fccdf24c3..9edb448f7a 100644 --- a/packages/pnpm/package.json +++ b/packages/pnpm/package.json @@ -42,7 +42,6 @@ "@pnpm/pick-registry-for-package": "workspace:2.0.5", "@pnpm/plugin-commands-audit": "workspace:5.1.19", "@pnpm/plugin-commands-env": "workspace:1.2.3", - "@pnpm/plugin-commands-import": "workspace:3.1.17", "@pnpm/plugin-commands-installation": "workspace:7.1.0", "@pnpm/plugin-commands-listing": "workspace:4.0.20", "@pnpm/plugin-commands-outdated": "workspace:5.0.25", @@ -158,7 +157,7 @@ "test:jest": "jest", "pretest:e2e": "rimraf node_modules/.bin/pnpm", "test:e2e": "registry-mock prepare && run-p -r registry-mock test:jest", - "_test": "cross-env PNPM_REGISTRY_MOCK_PORT=7781 pnpm run test:e2e", + "_test": "cross-env PNPM_REGISTRY_MOCK_PORT=7780 pnpm run test:e2e", "test": "pnpm run compile && pnpm run _test", "prepublishOnly": "pnpm compile && npm cache clear --force && publish-packed --prune --npm-client yarn --dest dist", "postpublish": "publish-packed", diff --git a/packages/pnpm/src/cmd/index.ts b/packages/pnpm/src/cmd/index.ts index 2fc918887b..cf2c99d8d8 100644 --- a/packages/pnpm/src/cmd/index.ts +++ b/packages/pnpm/src/cmd/index.ts @@ -2,8 +2,7 @@ import { CompletionFunc } from '@pnpm/command' import { types as allTypes } from '@pnpm/config' import { audit } from '@pnpm/plugin-commands-audit' import { env } from '@pnpm/plugin-commands-env' -import { importCommand } from '@pnpm/plugin-commands-import' -import { add, fetch, install, link, prune, remove, unlink, update } from '@pnpm/plugin-commands-installation' +import { add, fetch, install, link, prune, remove, unlink, update, importCommand } from '@pnpm/plugin-commands-installation' import { list, ll, why } from '@pnpm/plugin-commands-listing' import { outdated } from '@pnpm/plugin-commands-outdated' import { pack, publish } from '@pnpm/plugin-commands-publishing' diff --git a/packages/pnpm/src/main.ts b/packages/pnpm/src/main.ts index 3e48ba5bab..c38c21a853 100644 --- a/packages/pnpm/src/main.ts +++ b/packages/pnpm/src/main.ts @@ -149,7 +149,7 @@ export default async function run (inputArgv: string[]) { } if ( - cmd === 'install' && + (cmd === 'install' || cmd === 'import') && typeof workspaceDir === 'string' ) { cliOptions['recursive'] = true diff --git a/packages/pnpm/tsconfig.json b/packages/pnpm/tsconfig.json index bca6670556..52a60390a8 100644 --- a/packages/pnpm/tsconfig.json +++ b/packages/pnpm/tsconfig.json @@ -78,9 +78,6 @@ { "path": "../plugin-commands-env" }, - { - "path": "../plugin-commands-import" - }, { "path": "../plugin-commands-installation" }, diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index afdfc6a93a..d13902f8ef 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -2059,49 +2059,6 @@ importers: execa: /safe-execa/0.1.1 path-name: 1.0.0 - packages/plugin-commands-import: - specifiers: - '@pnpm/assert-project': workspace:* - '@pnpm/cli-utils': workspace:0.6.29 - '@pnpm/constants': workspace:5.0.0 - '@pnpm/core': workspace:1.1.0 - '@pnpm/error': workspace:2.0.0 - '@pnpm/graceful-fs': workspace:1.0.0 - '@pnpm/plugin-commands-import': 'link:' - '@pnpm/prepare': workspace:0.0.27 - '@pnpm/read-project-manifest': workspace:2.0.6 - '@pnpm/store-connection-manager': workspace:3.1.3 - '@types/ncp': ^2.0.4 - '@types/yarnpkg__lockfile': ^1.1.5 - '@yarnpkg/lockfile': ^1.1.0 - '@zkochan/rimraf': ^2.1.1 - load-json-file: ^6.2.0 - ncp: ^2.0.0 - path-exists: ^4.0.0 - render-help: ^1.0.1 - tempy: ^1.0.0 - dependencies: - '@pnpm/cli-utils': link:../cli-utils - '@pnpm/constants': link:../constants - '@pnpm/core': link:../core - '@pnpm/error': link:../error - '@pnpm/graceful-fs': link:../graceful-fs - '@pnpm/read-project-manifest': link:../read-project-manifest - '@pnpm/store-connection-manager': link:../store-connection-manager - '@zkochan/rimraf': 2.1.1 - load-json-file: 6.2.0 - path-exists: 4.0.0 - render-help: 1.0.2 - devDependencies: - '@pnpm/assert-project': link:../../privatePackages/assert-project - '@pnpm/plugin-commands-import': 'link:' - '@pnpm/prepare': link:../../privatePackages/prepare - '@types/ncp': 2.0.5 - '@types/yarnpkg__lockfile': 1.1.5 - '@yarnpkg/lockfile': 1.1.0 - ncp: 2.0.0 - tempy: 1.0.1 - packages/plugin-commands-installation: specifiers: '@pnpm/assert-project': workspace:* @@ -2116,6 +2073,7 @@ importers: '@pnpm/filter-workspace-packages': workspace:4.4.1 '@pnpm/find-workspace-dir': workspace:3.0.1 '@pnpm/find-workspace-packages': workspace:3.1.21 + '@pnpm/graceful-fs': workspace:1.0.0 '@pnpm/lockfile-types': workspace:3.1.0 '@pnpm/logger': ^4.0.0 '@pnpm/manifest-utils': workspace:2.1.1 @@ -2128,6 +2086,7 @@ importers: '@pnpm/plugin-commands-rebuild': workspace:5.2.0 '@pnpm/pnpmfile': workspace:1.1.1 '@pnpm/prepare': workspace:0.0.27 + '@pnpm/read-project-manifest': workspace:2.0.6 '@pnpm/resolver-base': workspace:8.1.0 '@pnpm/semver-diff': ^1.0.2 '@pnpm/sort-packages': workspace:2.1.2 @@ -2135,10 +2094,14 @@ importers: '@pnpm/test-fixtures': workspace:* '@pnpm/types': workspace:7.5.0 '@types/is-ci': ^3.0.0 + '@types/ncp': ^2.0.4 '@types/proxyquire': ^1.3.28 '@types/ramda': 0.27.39 '@types/sinon': ^9.0.11 + '@types/yarnpkg__lockfile': ^1.1.5 '@types/zkochan__table': npm:@types/table@6.0.0 + '@yarnpkg/lockfile': ^1.1.0 + '@zkochan/rimraf': ^2.1.1 '@zkochan/table': ^1.0.0 '@zkochan/which': ^2.0.3 camelcase-keys: ^6.2.2 @@ -2148,6 +2111,7 @@ importers: is-subdir: ^1.1.1 load-json-file: ^6.2.0 mem: ^8.0.0 + ncp: ^2.0.0 p-filter: ^2.1.0 p-limit: ^3.1.0 path-absolute: ^1.0.1 @@ -2176,17 +2140,21 @@ importers: '@pnpm/filter-workspace-packages': link:../filter-workspace-packages '@pnpm/find-workspace-dir': link:../find-workspace-dir '@pnpm/find-workspace-packages': link:../find-workspace-packages + '@pnpm/graceful-fs': link:../graceful-fs '@pnpm/manifest-utils': link:../manifest-utils '@pnpm/outdated': link:../outdated '@pnpm/package-store': link:../package-store '@pnpm/parse-wanted-dependency': link:../parse-wanted-dependency '@pnpm/plugin-commands-rebuild': link:../plugin-commands-rebuild '@pnpm/pnpmfile': link:../pnpmfile + '@pnpm/read-project-manifest': link:../read-project-manifest '@pnpm/resolver-base': link:../resolver-base '@pnpm/semver-diff': 1.0.2 '@pnpm/sort-packages': link:../sort-packages '@pnpm/store-connection-manager': link:../store-connection-manager '@pnpm/types': link:../types + '@yarnpkg/lockfile': 1.1.0 + '@zkochan/rimraf': 2.1.1 '@zkochan/table': 1.0.0 '@zkochan/which': 2.0.3 camelcase-keys: 6.2.2 @@ -2194,6 +2162,7 @@ importers: enquirer: 2.3.6 is-ci: 3.0.1 is-subdir: 1.2.0 + load-json-file: 6.2.0 mem: 8.1.1 p-filter: 2.1.0 p-limit: 3.1.0 @@ -2213,11 +2182,13 @@ importers: '@pnpm/prepare': link:../../privatePackages/prepare '@pnpm/test-fixtures': link:../../privatePackages/test-fixtures '@types/is-ci': 3.0.0 + '@types/ncp': 2.0.5 '@types/proxyquire': 1.3.28 '@types/ramda': 0.27.39 '@types/sinon': 9.0.11 + '@types/yarnpkg__lockfile': 1.1.5 '@types/zkochan__table': /@types/table/6.0.0 - load-json-file: 6.2.0 + ncp: 2.0.0 path-name: 1.0.0 proxyquire: 2.1.3 read-yaml-file: 2.1.0 @@ -2728,7 +2699,6 @@ importers: '@pnpm/pick-registry-for-package': workspace:2.0.5 '@pnpm/plugin-commands-audit': workspace:5.1.19 '@pnpm/plugin-commands-env': workspace:1.2.3 - '@pnpm/plugin-commands-import': workspace:3.1.17 '@pnpm/plugin-commands-installation': workspace:7.1.0 '@pnpm/plugin-commands-listing': workspace:4.0.20 '@pnpm/plugin-commands-outdated': workspace:5.0.25 @@ -2821,7 +2791,6 @@ importers: '@pnpm/pick-registry-for-package': link:../pick-registry-for-package '@pnpm/plugin-commands-audit': link:../plugin-commands-audit '@pnpm/plugin-commands-env': link:../plugin-commands-env - '@pnpm/plugin-commands-import': link:../plugin-commands-import '@pnpm/plugin-commands-installation': link:../plugin-commands-installation '@pnpm/plugin-commands-listing': link:../plugin-commands-listing '@pnpm/plugin-commands-outdated': link:../plugin-commands-outdated @@ -5599,7 +5568,7 @@ packages: /@yarnpkg/lockfile/1.1.0: resolution: {integrity: sha512-GpSwvyXOcOOlV70vbnzjj4fW5xW/FdUF6nQEt1ENy7m4ZCczi1+/buVUPAqmGfqznsORNFzUMjctTIp8a9tuCQ==} - dev: true + dev: false /@yarnpkg/parsers/2.3.0: resolution: {integrity: sha512-qgz0QUgOvnhtF92kaluIhIIKBUHlYlHUBQxqh5v9+sxEQvUeF6G6PKiFlzo3E6O99XwvNEGpVu1xZPoSGyGscQ==}