pnpm 11.0.0-rc.5 → 11.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/README.md +1 -0
  2. package/dist/pnpm.mjs +39 -14
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -235,6 +235,7 @@ Benchmarks on an app with lots of dependencies:
235
235
  - [Frequently Asked Questions](https://pnpm.io/faq)
236
236
  - [X](https://x.com/pnpmjs)
237
237
  - [Bluesky](https://bsky.app/profile/pnpm.io)
238
+ - [Discord](https://r.pnpm.io/chat)
238
239
 
239
240
  ## License
240
241
 
package/dist/pnpm.mjs CHANGED
@@ -1000,7 +1000,7 @@ var init_lib2 = __esm({
1000
1000
  "use strict";
1001
1001
  defaultManifest = {
1002
1002
  name: true ? "pnpm" : "pnpm",
1003
- version: true ? "11.0.0-rc.5" : "0.0.0"
1003
+ version: true ? "11.0.0" : "0.0.0"
1004
1004
  };
1005
1005
  pkgJson = defaultManifest;
1006
1006
  packageManager = {
@@ -2090,11 +2090,12 @@ If you think that this is the case, then run "pnpm store prune" and rerun the co
2090
2090
  });
2091
2091
 
2092
2092
  // ../pkg-manifest/utils/lib/getAllDependenciesFromManifest.js
2093
- function getAllDependenciesFromManifest(pkg) {
2093
+ function getAllDependenciesFromManifest(pkg, opts2) {
2094
2094
  return {
2095
2095
  ...pkg.devDependencies,
2096
2096
  ...pkg.dependencies,
2097
- ...pkg.optionalDependencies
2097
+ ...pkg.optionalDependencies,
2098
+ ...opts2?.autoInstallPeers ? pkg.peerDependencies : {}
2098
2099
  };
2099
2100
  }
2100
2101
  var init_getAllDependenciesFromManifest = __esm({
@@ -4294,11 +4295,12 @@ function filterDependenciesByType(manifest, include) {
4294
4295
  ...include.optionalDependencies ? manifest.optionalDependencies : {}
4295
4296
  };
4296
4297
  }
4297
- function getAllDependenciesFromManifest2(manifest) {
4298
+ function getAllDependenciesFromManifest2(manifest, opts2) {
4298
4299
  return {
4299
4300
  ...manifest.devDependencies,
4300
4301
  ...manifest.dependencies,
4301
- ...manifest.optionalDependencies
4302
+ ...manifest.optionalDependencies,
4303
+ ...opts2?.autoInstallPeers ? manifest.peerDependencies : {}
4302
4304
  };
4303
4305
  }
4304
4306
  var init_lib9 = __esm({
@@ -46193,6 +46195,8 @@ async function extractZipToTarget(zipPath, basename2, targetDir, ignoreEntry) {
46193
46195
  const basenamePrefix = basename2 === "" ? "" : `${basename2}/`;
46194
46196
  const testEntry = toStatelessTester(ignoreEntry);
46195
46197
  for (const entry of zip.getEntries()) {
46198
+ if (entry.isDirectory)
46199
+ continue;
46196
46200
  const entryPath = entry.entryName;
46197
46201
  validatePathSecurity(nodeDir, entryPath);
46198
46202
  if (testEntry) {
@@ -156803,7 +156807,7 @@ async function mutateModules(projects, maybeOpts) {
156803
156807
  });
156804
156808
  }
156805
156809
  async function installSome(project) {
156806
- const currentBareSpecifiers = opts2.ignoreCurrentSpecifiers ? {} : getAllDependenciesFromManifest2(project.manifest);
156810
+ const currentBareSpecifiers = opts2.ignoreCurrentSpecifiers ? {} : getAllDependenciesFromManifest2(project.manifest, { autoInstallPeers: opts2.autoInstallPeers });
156807
156811
  const optionalDependencies = project.targetDependenciesField ? {} : project.manifest.optionalDependencies ?? {};
156808
156812
  const devDependencies = project.targetDependenciesField ? {} : project.manifest.devDependencies ?? {};
156809
156813
  if (preferredSpecs == null) {
@@ -201647,6 +201651,7 @@ async function handler31(opts2, params) {
201647
201651
  if (isExecutedByCorepack()) {
201648
201652
  throw new PnpmError("CANT_SELF_UPDATE_IN_COREPACK", "You should update pnpm with corepack");
201649
201653
  }
201654
+ globalInfo("Checking for updates...");
201650
201655
  const { resolve: resolve3 } = createResolver2({ ...opts2, configByUri: opts2.configByUri });
201651
201656
  const pkgName = "pnpm";
201652
201657
  const bareSpecifier = params[0] ?? "latest";
@@ -201658,6 +201663,22 @@ async function handler31(opts2, params) {
201658
201663
  if (!resolution?.manifest) {
201659
201664
  throw new PnpmError("CANNOT_RESOLVE_PNPM", `Cannot find "${bareSpecifier}" version of pnpm`);
201660
201665
  }
201666
+ const targetVersion = resolution.manifest.version;
201667
+ let previousVersion;
201668
+ if (opts2.wantedPackageManager?.name === packageManager.name) {
201669
+ if (opts2.wantedPackageManager.version !== targetVersion) {
201670
+ previousVersion = opts2.wantedPackageManager.version;
201671
+ }
201672
+ } else if (packageManager.version !== targetVersion) {
201673
+ previousVersion = packageManager.version;
201674
+ }
201675
+ const previousMajor = previousVersion != null ? import_semver43.default.coerce(previousVersion)?.major : void 0;
201676
+ const targetMajor = import_semver43.default.major(targetVersion);
201677
+ if (previousMajor != null && targetMajor > previousMajor) {
201678
+ const hint = MAJOR_UPGRADE_HINTS[targetMajor];
201679
+ if (hint)
201680
+ globalWarn(hint);
201681
+ }
201661
201682
  if (opts2.wantedPackageManager?.name === packageManager.name) {
201662
201683
  if (opts2.wantedPackageManager?.version !== resolution.manifest.version) {
201663
201684
  const { manifest, writeProjectManifest: writeProjectManifest2 } = await readProjectManifest(opts2.rootProjectManifestDir);
@@ -201697,6 +201718,7 @@ async function handler31(opts2, params) {
201697
201718
  if (resolution.manifest.version === packageManager.version) {
201698
201719
  return `The currently active ${packageManager.name} v${packageManager.version} is already "${bareSpecifier}" and doesn't need an update`;
201699
201720
  }
201721
+ globalInfo(`Updating pnpm from v${packageManager.version} to v${resolution.manifest.version}...`);
201700
201722
  const store = await createStoreController(opts2);
201701
201723
  const envLockfile = await resolvePackageManagerIntegrities(resolution.manifest.version, {
201702
201724
  registries: opts2.registries,
@@ -201714,7 +201736,7 @@ async function handler31(opts2, params) {
201714
201736
  if (alreadyExisted) {
201715
201737
  return `The ${bareSpecifier} version, v${resolution.manifest.version}, is already present on the system. It was activated by linking it from ${baseDir}.`;
201716
201738
  }
201717
- return void 0;
201739
+ return `Successfully updated pnpm to v${resolution.manifest.version}`;
201718
201740
  }
201719
201741
  function updateVersionConstraint(current, newVersion) {
201720
201742
  if (current == null)
@@ -201738,7 +201760,7 @@ function versionSpecFromPinned(version2, pinnedVersion) {
201738
201760
  return version2;
201739
201761
  }
201740
201762
  }
201741
- var import_semver43, commandNames31, skipPackageManagerCheck2;
201763
+ var import_semver43, commandNames31, MAJOR_UPGRADE_HINTS, skipPackageManagerCheck2;
201742
201764
  var init_selfUpdate = __esm({
201743
201765
  "../engine/pm/commands/lib/self-updater/selfUpdate.js"() {
201744
201766
  "use strict";
@@ -201758,6 +201780,9 @@ var init_selfUpdate = __esm({
201758
201780
  import_semver43 = __toESM(require_semver2(), 1);
201759
201781
  init_installPnpm();
201760
201782
  commandNames31 = ["self-update"];
201783
+ MAJOR_UPGRADE_HINTS = {
201784
+ 11: "pnpm v11 removed or renamed several v10 settings. See https://pnpm.io/11.x/migration for migration instructions."
201785
+ };
201761
201786
  skipPackageManagerCheck2 = true;
201762
201787
  }
201763
201788
  });
@@ -208116,17 +208141,17 @@ function help34() {
208116
208141
  ],
208117
208142
  url: docsUrl("env"),
208118
208143
  usages: [
208119
- "pnpm env use --global 18",
208144
+ "pnpm env use --global 24",
208120
208145
  "pnpm env use --global lts",
208121
- "pnpm env use --global argon",
208146
+ "pnpm env use --global krypton",
208122
208147
  "pnpm env use --global latest",
208123
- "pnpm env use --global rc/18",
208148
+ "pnpm env use --global rc/24",
208124
208149
  "pnpm env list",
208125
- "pnpm env list 18",
208150
+ "pnpm env list 24",
208126
208151
  "pnpm env list lts",
208127
- "pnpm env list argon",
208152
+ "pnpm env list krypton",
208128
208153
  "pnpm env list latest",
208129
- "pnpm env list rc/18"
208154
+ "pnpm env list rc/24"
208130
208155
  ]
208131
208156
  });
208132
208157
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pnpm",
3
- "version": "11.0.0-rc.5",
3
+ "version": "11.0.0",
4
4
  "description": "Fast, disk space efficient package manager",
5
5
  "keywords": [
6
6
  "pnpm",