Skip to content

[rush] Upgrade pnpm-sync-lib to v0.3.3 for pnpm v10 compatibility #5254

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,9 @@ These GitHub repositories provide supplementary resources for Rush Stack:
| [/libraries/package-extractor](./libraries/package-extractor/) | [![npm version](https://badge.fury.io/js/%40rushstack%2Fpackage-extractor.svg)](https://badge.fury.io/js/%40rushstack%2Fpackage-extractor) | [changelog](./libraries/package-extractor/CHANGELOG.md) | [@rushstack/package-extractor](https://www.npmjs.com/package/@rushstack/package-extractor) |
| [/libraries/rig-package](./libraries/rig-package/) | [![npm version](https://badge.fury.io/js/%40rushstack%2Frig-package.svg)](https://badge.fury.io/js/%40rushstack%2Frig-package) | [changelog](./libraries/rig-package/CHANGELOG.md) | [@rushstack/rig-package](https://www.npmjs.com/package/@rushstack/rig-package) |
| [/libraries/rush-lib](./libraries/rush-lib/) | [![npm version](https://badge.fury.io/js/%40microsoft%2Frush-lib.svg)](https://badge.fury.io/js/%40microsoft%2Frush-lib) | | [@microsoft/rush-lib](https://www.npmjs.com/package/@microsoft/rush-lib) |
| [/libraries/rush-pnpm-kit-v10](./libraries/rush-pnpm-kit-v10/) | [![npm version](https://badge.fury.io/js/%40rushstack%2Frush-pnpm-kit-v10.svg)](https://badge.fury.io/js/%40rushstack%2Frush-pnpm-kit-v10) | [changelog](./libraries/rush-pnpm-kit-v10/CHANGELOG.md) | [@rushstack/rush-pnpm-kit-v10](https://www.npmjs.com/package/@rushstack/rush-pnpm-kit-v10) |
| [/libraries/rush-pnpm-kit-v8](./libraries/rush-pnpm-kit-v8/) | [![npm version](https://badge.fury.io/js/%40rushstack%2Frush-pnpm-kit-v8.svg)](https://badge.fury.io/js/%40rushstack%2Frush-pnpm-kit-v8) | [changelog](./libraries/rush-pnpm-kit-v8/CHANGELOG.md) | [@rushstack/rush-pnpm-kit-v8](https://www.npmjs.com/package/@rushstack/rush-pnpm-kit-v8) |
| [/libraries/rush-pnpm-kit-v9](./libraries/rush-pnpm-kit-v9/) | [![npm version](https://badge.fury.io/js/%40rushstack%2Frush-pnpm-kit-v9.svg)](https://badge.fury.io/js/%40rushstack%2Frush-pnpm-kit-v9) | [changelog](./libraries/rush-pnpm-kit-v9/CHANGELOG.md) | [@rushstack/rush-pnpm-kit-v9](https://www.npmjs.com/package/@rushstack/rush-pnpm-kit-v9) |
| [/libraries/rush-sdk](./libraries/rush-sdk/) | [![npm version](https://badge.fury.io/js/%40rushstack%2Frush-sdk.svg)](https://badge.fury.io/js/%40rushstack%2Frush-sdk) | | [@rushstack/rush-sdk](https://www.npmjs.com/package/@rushstack/rush-sdk) |
| [/libraries/stream-collator](./libraries/stream-collator/) | [![npm version](https://badge.fury.io/js/%40rushstack%2Fstream-collator.svg)](https://badge.fury.io/js/%40rushstack%2Fstream-collator) | [changelog](./libraries/stream-collator/CHANGELOG.md) | [@rushstack/stream-collator](https://www.npmjs.com/package/@rushstack/stream-collator) |
| [/libraries/terminal](./libraries/terminal/) | [![npm version](https://badge.fury.io/js/%40rushstack%2Fterminal.svg)](https://badge.fury.io/js/%40rushstack%2Fterminal) | [changelog](./libraries/terminal/CHANGELOG.md) | [@rushstack/terminal](https://www.npmjs.com/package/@rushstack/terminal) |
Expand Down
2 changes: 1 addition & 1 deletion apps/lockfile-explorer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
"js-yaml": "~3.13.1",
"open": "~8.4.0",
"update-notifier": "~5.1.0",
"@pnpm/dependency-path-lockfile-pre-v9": "npm:@pnpm/dependency-path@~2.1.2",
"@rushstack/rush-pnpm-kit-v8": "workspace:*",
"semver": "~7.5.4",
"@rushstack/rush-sdk": "workspace:*",
"@rushstack/ts-command-line": "workspace:*"
Expand Down
7 changes: 4 additions & 3 deletions apps/lockfile-explorer/src/utils/shrinkwrap.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.
// See LICENSE in the project root for license information.

import * as dependencyPathLockfilePreV9 from '@pnpm/dependency-path-lockfile-pre-v9';
import * as pnpmKitV8 from '@rushstack/rush-pnpm-kit-v8';

interface IPackageInfo {
name: string;
Expand All @@ -12,7 +12,8 @@ interface IPackageInfo {
export function convertLockfileV6DepPathToV5DepPath(newDepPath: string): string {
if (!newDepPath.includes('@', 2) || newDepPath.startsWith('file:')) return newDepPath;
const index = newDepPath.indexOf('@', newDepPath.indexOf('/@') + 2);
if (newDepPath.includes('(') && index > dependencyPathLockfilePreV9.indexOfPeersSuffix(newDepPath)) return newDepPath;
if (newDepPath.includes('(') && index > pnpmKitV8.dependencyPath.indexOfPeersSuffix(newDepPath))
return newDepPath;
return `${newDepPath.substring(0, index)}/${newDepPath.substring(index + 1)}`;
}

Expand All @@ -21,7 +22,7 @@ export function parseDependencyPath(shrinkwrapFileMajorVersion: number, newDepPa
if (shrinkwrapFileMajorVersion === 6) {
dependencyPath = convertLockfileV6DepPathToV5DepPath(newDepPath);
}
const packageInfo = dependencyPathLockfilePreV9.parse(dependencyPath);
const packageInfo = pnpmKitV8.dependencyPath.parse(dependencyPath);
return {
name: packageInfo.name as string,
peersSuffix: packageInfo.peersSuffix,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"changes": [
{
"packageName": "@microsoft/rush",
"comment": "Upgrade `pnpm-sync-lib` to v0.3.3 for pnpm v10 compatibility",
"type": "none"
}
],
"packageName": "@microsoft/rush"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"changes": [
{
"packageName": "@rushstack/lockfile-explorer",
"comment": "Use pnpm dependency path implementation from `@rushstack/rush-pnpm-kit-v8`",
"type": "patch"
}
],
"packageName": "@rushstack/lockfile-explorer"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"changes": [
{
"packageName": "@rushstack/rush-pnpm-kit-v10",
"comment": "Set up the `@rushstack/rush-pnpm-kit-v10` package to bundle all pnpm v10 related packages together.",
"type": "minor"
}
],
"packageName": "@rushstack/rush-pnpm-kit-v10"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"changes": [
{
"packageName": "@rushstack/rush-pnpm-kit-v8",
"comment": "Set up the `@rushstack/rush-pnpm-kit-v8` package to bundle all pnpm v8 related packages together.",
"type": "minor"
}
],
"packageName": "@rushstack/rush-pnpm-kit-v8"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"changes": [
{
"packageName": "@rushstack/rush-pnpm-kit-v9",
"comment": "Set up the `@rushstack/rush-pnpm-kit-v9` package to bundle all pnpm v9 related packages together.",
"type": "minor"
}
],
"packageName": "@rushstack/rush-pnpm-kit-v9"
}
16 changes: 2 additions & 14 deletions common/config/rush/browser-approved-packages.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"packages": [
{
"name": "@fluentui/react",
"allowedCategories": [ "libraries", "vscode-extensions" ]
"allowedCategories": [ "vscode-extensions" ]
},
{
"name": "@fluentui/react-components",
Expand Down Expand Up @@ -50,10 +50,6 @@
"name": "@ungap/structured-clone",
"allowedCategories": [ "libraries" ]
},
{
"name": "axios",
"allowedCategories": [ "libraries" ]
},
{
"name": "dependency-path",
"allowedCategories": [ "libraries" ]
Expand All @@ -62,10 +58,6 @@
"name": "local-web-rig",
"allowedCategories": [ "libraries", "vscode-extensions" ]
},
{
"name": "office-ui-fabric-core",
"allowedCategories": [ "libraries" ]
},
{
"name": "react",
"allowedCategories": [ "libraries", "tests", "vscode-extensions" ]
Expand Down Expand Up @@ -96,11 +88,7 @@
},
{
"name": "tslib",
"allowedCategories": [ "libraries", "tests", "vscode-extensions" ]
},
{
"name": "zod",
"allowedCategories": [ "libraries" ]
"allowedCategories": [ "tests", "vscode-extensions" ]
}
]
}
20 changes: 20 additions & 0 deletions common/config/rush/nonbrowser-approved-packages.json
Original file line number Diff line number Diff line change
Expand Up @@ -102,10 +102,18 @@
"name": "@pnpm/link-bins",
"allowedCategories": [ "libraries" ]
},
{
"name": "@pnpm/lockfile-file",
"allowedCategories": [ "libraries" ]
},
{
"name": "@pnpm/lockfile-types",
"allowedCategories": [ "libraries" ]
},
{
"name": "@pnpm/lockfile.fs",
"allowedCategories": [ "libraries" ]
},
{
"name": "@pnpm/lockfile.types",
"allowedCategories": [ "libraries" ]
Expand Down Expand Up @@ -278,6 +286,18 @@
"name": "@rushstack/rush-http-build-cache-plugin",
"allowedCategories": [ "libraries" ]
},
{
"name": "@rushstack/rush-pnpm-kit-v10",
"allowedCategories": [ "libraries" ]
},
{
"name": "@rushstack/rush-pnpm-kit-v8",
"allowedCategories": [ "libraries" ]
},
{
"name": "@rushstack/rush-pnpm-kit-v9",
"allowedCategories": [ "libraries" ]
},
{
"name": "@rushstack/rush-redis-cobuild-plugin",
"allowedCategories": [ "tests" ]
Expand Down
Loading