Skip to content
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
2 changes: 1 addition & 1 deletion packages/pnpm-sync-lib/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "pnpm-sync-lib",
"version": "0.3.1",
"version": "0.3.2",
"description": "API library for integrating \"pnpm-sync\" with your toolchain",
"repository": {
"type": "git",
Expand Down
8 changes: 4 additions & 4 deletions packages/pnpm-sync-lib/src/pnpmSyncPrepare.ts
Original file line number Diff line number Diff line change
Expand Up @@ -219,8 +219,8 @@ export async function pnpmSyncPrepareAsync(options: IPnpmSyncPrepareOptions): Pr
const pnpmModulesYaml = YAML.parse(fs.readFileSync(`${pnpmModulesYamlPath}/.modules.yaml`, 'utf8'));
const pnpmVersion: string | undefined = pnpmModulesYaml?.packageManager?.split('@')[1];

// currently, only support pnpm v8
if (!pnpmVersion || !(pnpmVersion.startsWith('8') || !pnpmVersion.startsWith('9'))) {
// currently, only support pnpm v8 and v9
if (!pnpmVersion || !(pnpmVersion.startsWith('8') || pnpmVersion.startsWith('9'))) {
logMessageCallback({
message: `The pnpm version is not supported; pnpm-sync requires pnpm version 8.x, 9.x`,
messageKind: LogMessageKind.ERROR,
Expand All @@ -238,12 +238,12 @@ export async function pnpmSyncPrepareAsync(options: IPnpmSyncPrepareOptions): Pr
ignoreIncompatible: true
});

// currently, only support lockfileVersion 6.x, which is pnpm v8
// currently, only support lockfileVersion 6.x, which is pnpm v8 and lockfileVersion 9.x, which is pnpm v9
const lockfileVersion: string | undefined = pnpmLockfile?.lockfileVersion.toString();
if (
!pnpmLockfile ||
!lockfileVersion ||
!(lockfileVersion.startsWith('6') || !lockfileVersion.startsWith('9'))
!(lockfileVersion.startsWith('6') || lockfileVersion.startsWith('9'))
) {
logMessageCallback({
message: `The pnpm-lock.yaml format is not supported; pnpm-sync requires lockfile version 6, 9`,
Expand Down
2 changes: 1 addition & 1 deletion packages/pnpm-sync/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "pnpm-sync",
"version": "0.3.1",
"version": "0.3.2",
"description": "Recopy injected dependencies whenever a project is rebuilt in your PNPM workspace",
"keywords": [
"rush",
Expand Down
2 changes: 1 addition & 1 deletion tests/pnpm-sync-api-test/src/test/pnpmSyncPrepare.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ Array [
Object {
"details": Object {
"actualVersion": "incompatible-version",
"expectedVersion": "0.3.1",
"expectedVersion": "0.3.2",
"messageIdentifier": "prepare-replacing-file",
"pnpmSyncJsonPath": "<root>/pnpm-sync/tests/test-fixtures/sample-lib1/node_modules/.pnpm-sync.json",
"sourceProjectFolder": "<root>/pnpm-sync/tests/test-fixtures/sample-lib1",
Expand Down