Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(#62): lockfile v9 support: update @pnpm/list, @pnpm/workspace.find-packages #64

Merged
merged 1 commit into from
May 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -140,9 +140,9 @@
"patchedDependencies": {
"@types/npmcli__arborist@5.6.1": "patches/@types__npmcli__arborist@5.6.1.patch",
"@npmcli/arborist@6.3.0": "patches/@npmcli__arborist@6.3.0.patch",
"@pnpm/workspace.find-packages@1.0.14": "patches/@pnpm__workspace.find-packages@1.0.14.patch",
"assert@2.1.0": "patches/assert@2.1.0.patch",
"@yarnpkg/parsers@3.0.0": "patches/@yarnpkg__parsers@3.0.0.patch"
"@yarnpkg/parsers@3.0.0": "patches/@yarnpkg__parsers@3.0.0.patch",
"@pnpm/workspace.find-packages@2.0.4": "patches/@pnpm__workspace.find-packages@2.0.4.patch"
}
},
"overrides": {
Expand Down
4 changes: 2 additions & 2 deletions packages/tools/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
"@nolyfill/internal": "workspace:*",
"@nolyfill/promise.any": "workspace:*",
"@npmcli/arborist": "^6.3.0",
"@pnpm/list": "^9.1.12",
"@pnpm/workspace.find-packages": "^1.0.14",
"@pnpm/list": "^10.1.1",
"@pnpm/workspace.find-packages": "^2.0.4",
"@rollup/plugin-commonjs": "^25.0.7",
"@rollup/plugin-json": "^6.1.0",
"@rollup/plugin-node-resolve": "^15.2.3",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,23 +1,27 @@
diff --git a/lib/index.js b/lib/index.js
index d1ce8e1c081d7f3379a8ee48a8e471d7058779ea..b8966765874c71b660d553e501e9faa6cc1b852a 100644
index c8d68e72ea0907b8f4dfcd83b30d26f9512a99ea..633e8a460c65c2d735ef452a41c02d2dfa951e60 100644
--- a/lib/index.js
+++ b/lib/index.js
@@ -5,24 +5,24 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
@@ -1,29 +1,29 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.arrayOfWorkspacePackagesToMap = exports.findWorkspacePackagesNoCheck = exports.findWorkspacePackages = void 0;
const path_1 = __importDefault(require("path"));
-const cli_utils_1 = require("@pnpm/cli-utils");
+// const cli_utils_1 = require("@pnpm/cli-utils");
const constants_1 = require("@pnpm/constants");
const workspace_read_manifest_1 = require("@pnpm/workspace.read-manifest");
const util_lex_comparator_1 = require("@pnpm/util.lex-comparator");
const fs_find_packages_1 = require("@pnpm/fs.find-packages");
-const logger_1 = require("@pnpm/logger");
+// const logger_1 = require("@pnpm/logger");
const read_yaml_file_1 = __importDefault(require("read-yaml-file"));
-async function findWorkspacePackages(workspaceRoot, opts) {
- const pkgs = await findWorkspacePackagesNoCheck(workspaceRoot, opts);
- for (const pkg of pkgs) {
- (0, cli_utils_1.packageIsInstallable)(pkg.dir, pkg.manifest, opts ?? {});
- (0, cli_utils_1.packageIsInstallable)(pkg.dir, pkg.manifest, opts ?? {
- supportedArchitectures: {
- os: ['current'],
- cpu: ['current'],
- libc: ['current'],
- },
- });
- // When setting shared-workspace-lockfile=false, `pnpm` can be set in sub-project's package.json.
- if (opts?.sharedWorkspaceLockfile && pkg.dir !== workspaceRoot) {
- checkNonRootProjectManifest(pkg);
Expand All @@ -26,10 +30,17 @@ index d1ce8e1c081d7f3379a8ee48a8e471d7058779ea..b8966765874c71b660d553e501e9faa6
- return pkgs;
-}
-exports.findWorkspacePackages = findWorkspacePackages;
+// const logger_1 = require("@pnpm/logger");
+// async function findWorkspacePackages(workspaceRoot, opts) {
+// const pkgs = await findWorkspacePackagesNoCheck(workspaceRoot, opts);
+// for (const pkg of pkgs) {
+// (0, cli_utils_1.packageIsInstallable)(pkg.dir, pkg.manifest, opts ?? {});
+// (0, cli_utils_1.packageIsInstallable)(pkg.dir, pkg.manifest, opts ?? {
+// supportedArchitectures: {
+// os: ['current'],
+// cpu: ['current'],
+// libc: ['current'],
+// },
+// });
+// // When setting shared-workspace-lockfile=false, `pnpm` can be set in sub-project's package.json.
+// if (opts?.sharedWorkspaceLockfile && pkg.dir !== workspaceRoot) {
+// checkNonRootProjectManifest(pkg);
Expand All @@ -41,10 +52,10 @@ index d1ce8e1c081d7f3379a8ee48a8e471d7058779ea..b8966765874c71b660d553e501e9faa6
async function findWorkspacePackagesNoCheck(workspaceRoot, opts) {
let patterns = opts?.patterns;
if (patterns == null) {
@@ -52,26 +52,26 @@ async function requirePackagesManifest(dir) {
throw err;
}
@@ -42,26 +42,26 @@ async function findWorkspacePackagesNoCheck(workspaceRoot, opts) {
return pkgs;
}
exports.findWorkspacePackagesNoCheck = findWorkspacePackagesNoCheck;
-function arrayOfWorkspacePackagesToMap(pkgs) {
- return pkgs.reduce((acc, pkg) => {
- if (!pkg.manifest.name)
Expand Down Expand Up @@ -89,4 +100,4 @@ index d1ce8e1c081d7f3379a8ee48a8e471d7058779ea..b8966765874c71b660d553e501e9faa6
+// }
+// }
+// }
//# sourceMappingURL=index.js.map
//# sourceMappingURL=index.js.map
Loading
Loading