pnpm-settings-migrator 0.6.1 → 0.7.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.
package/README.md CHANGED
@@ -33,15 +33,36 @@ Sort keys when write `pnpm-workspace.yaml`.
33
33
 
34
34
  ### `--compatibility`
35
35
 
36
- - **Type**: `'auto' | 'v10' | 'v11'`
36
+ - **Type**: `'auto' | 'v10' | 'v11' | 'v12'`
37
37
  - **Default**: `'auto'`
38
38
 
39
39
  Compatibility target for migrated settings:
40
40
 
41
- - `auto`: infer from `packageManager` (`pnpm@11+` => `v11`, otherwise `v10`)
41
+ - `auto`: infer from `packageManager` or `devEngines.packageManager`
42
+ (`pnpm@12+` => `v12`, `pnpm@11` => `v11`, otherwise `v10`)
42
43
  - `v10`: keep legacy settings as-is and migrate schema-aligned pnpm config keys from `.npmrc`
43
44
  - `v11`: normalize to v11-compatible settings (`allowBuilds`, `allowUnusedPatches`, etc.)
44
45
  and migrate all non auth/registry `.npmrc` entries to `pnpm-workspace.yaml`
46
+ - `v12`: apply the same settings migration as `v11`. pnpm 12 keeps pnpm 11's
47
+ settings and lockfile format.
48
+
49
+ In `v11` and `v12` modes, normalization is applied both to settings read from
50
+ legacy files and to deprecated settings already present in
51
+ `pnpm-workspace.yaml`.
52
+
53
+ Automated v10 to v11 conversions include:
54
+
55
+ - `managePackageManagerVersions`, `packageManagerStrict`, and
56
+ `packageManagerStrictVersion` -> `pmOnFail`
57
+ - `onlyBuiltDependencies`, `onlyBuiltDependenciesFile`,
58
+ `neverBuiltDependencies`, and `ignoredBuiltDependencies` -> `allowBuilds`
59
+ - `allowNonAppliedPatches` -> `allowUnusedPatches`
60
+ - `auditConfig.ignoreCves` -> `auditConfig.ignoreGhsas`
61
+ - `useNodeVersion` and root `executionEnv.nodeVersion` ->
62
+ `package.json#devEngines.runtime`
63
+ - `.npmrc` entries such as `node-mirror:release` -> `nodeDownloadMirrors`
64
+ - removal of `ignoreDepScripts` and `ignorePatchFailures`, which have no v11
65
+ equivalent
45
66
 
46
67
  Notes:
47
68
 
@@ -50,7 +71,17 @@ Notes:
50
71
  runtime/install options.
51
72
  - Workspace manifest-only fields such as `packages`, `catalog`, and `catalogs` are not
52
73
  migrated from `.npmrc`.
53
- - In `v11`, auth/registry-related keys still stay in `.npmrc`.
74
+ - In `v11` and `v12`, auth/registry-related keys still stay in `.npmrc`.
75
+ - If no auth/registry lines remain after a v11 or v12 migration, the empty
76
+ `.npmrc` is removed.
77
+ - Values moved from `auditConfig.ignoreCves` still contain CVE IDs. Replace them
78
+ manually with the corresponding GHSA IDs after migration.
79
+ - The migrator does not update the `packageManager` version, CI environment variables,
80
+ shell setup, or pnpm commands in scripts. When `packageManager` still pins pnpm 10,
81
+ pass `--compatibility v11` explicitly and update the pin separately.
82
+ - pnpm 12 is currently a release candidate. Its removed
83
+ `pnpm install --resolution-only` CLI flag is outside this settings migrator's
84
+ scope; replace it with `pnpm peers check` in scripts before upgrading.
54
85
 
55
86
  ### `--replace-deprecated`
56
87