pnpm-settings-migrator 0.6.1 → 0.8.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
@@ -15,6 +15,20 @@ Run in your workspace root:
15
15
  pnpm dlx pnpm-settings-migrator
16
16
  ```
17
17
 
18
+ After migration, the CLI reports how many root settings changed and shows a
19
+ GitHub-style YAML diff. Removed lines are red and added lines are green:
20
+
21
+ ```text
22
+ ℹ 2 settings changed
23
+ packages:
24
+ - packages/*
25
+ + - apps/*
26
+
27
+ overrides:
28
+ foo: 1.0.0
29
+ + bar: 2.0.0
30
+ ```
31
+
18
32
  ## CLI Options
19
33
 
20
34
  ### `--cwd`
@@ -33,15 +47,36 @@ Sort keys when write `pnpm-workspace.yaml`.
33
47
 
34
48
  ### `--compatibility`
35
49
 
36
- - **Type**: `'auto' | 'v10' | 'v11'`
50
+ - **Type**: `'auto' | 'v10' | 'v11' | 'v12'`
37
51
  - **Default**: `'auto'`
38
52
 
39
53
  Compatibility target for migrated settings:
40
54
 
41
- - `auto`: infer from `packageManager` (`pnpm@11+` => `v11`, otherwise `v10`)
55
+ - `auto`: infer from `packageManager` or `devEngines.packageManager`
56
+ (`pnpm@12+` => `v12`, `pnpm@11` => `v11`, otherwise `v10`)
42
57
  - `v10`: keep legacy settings as-is and migrate schema-aligned pnpm config keys from `.npmrc`
43
58
  - `v11`: normalize to v11-compatible settings (`allowBuilds`, `allowUnusedPatches`, etc.)
44
59
  and migrate all non auth/registry `.npmrc` entries to `pnpm-workspace.yaml`
60
+ - `v12`: apply the same settings migration as `v11`. pnpm 12 keeps pnpm 11's
61
+ settings and lockfile format.
62
+
63
+ In `v11` and `v12` modes, normalization is applied both to settings read from
64
+ legacy files and to deprecated settings already present in
65
+ `pnpm-workspace.yaml`.
66
+
67
+ Automated v10 to v11 conversions include:
68
+
69
+ - `managePackageManagerVersions`, `packageManagerStrict`, and
70
+ `packageManagerStrictVersion` -> `pmOnFail`
71
+ - `onlyBuiltDependencies`, `onlyBuiltDependenciesFile`,
72
+ `neverBuiltDependencies`, and `ignoredBuiltDependencies` -> `allowBuilds`
73
+ - `allowNonAppliedPatches` -> `allowUnusedPatches`
74
+ - `auditConfig.ignoreCves` -> `auditConfig.ignoreGhsas`
75
+ - `useNodeVersion` and root `executionEnv.nodeVersion` ->
76
+ `package.json#devEngines.runtime`
77
+ - `.npmrc` entries such as `node-mirror:release` -> `nodeDownloadMirrors`
78
+ - removal of `ignoreDepScripts` and `ignorePatchFailures`, which have no v11
79
+ equivalent
45
80
 
46
81
  Notes:
47
82
 
@@ -50,7 +85,17 @@ Notes:
50
85
  runtime/install options.
51
86
  - Workspace manifest-only fields such as `packages`, `catalog`, and `catalogs` are not
52
87
  migrated from `.npmrc`.
53
- - In `v11`, auth/registry-related keys still stay in `.npmrc`.
88
+ - In `v11` and `v12`, auth/registry-related keys still stay in `.npmrc`.
89
+ - If no auth/registry lines remain after a v11 or v12 migration, the empty
90
+ `.npmrc` is removed.
91
+ - Values moved from `auditConfig.ignoreCves` still contain CVE IDs. Replace them
92
+ manually with the corresponding GHSA IDs after migration.
93
+ - The migrator does not update the `packageManager` version, CI environment variables,
94
+ shell setup, or pnpm commands in scripts. When `packageManager` still pins pnpm 10,
95
+ pass `--compatibility v11` explicitly and update the pin separately.
96
+ - pnpm 12 is currently a release candidate. Its removed
97
+ `pnpm install --resolution-only` CLI flag is outside this settings migrator's
98
+ scope; replace it with `pnpm peers check` in scripts before upgrading.
54
99
 
55
100
  ### `--replace-deprecated`
56
101
 
@@ -82,6 +127,14 @@ Strategy to handle conflicts when merging settings with existing `pnpm-workspace
82
127
 
83
128
  Disable migrating `resolutions` field in `package.json`.
84
129
 
130
+ ### `--no-show-changes`
131
+
132
+ - **Type**: `boolean`
133
+ - **Default behavior**: `showChanges=true` (use this flag to disable)
134
+
135
+ Disable showing the settings diff after migration. Library consumers can set
136
+ `showChanges: false`.
137
+
85
138
  ### `--no-clean-npmrc`
86
139
 
87
140
  - **Type**: `boolean`