pnpm-settings-migrator 0.8.0 → 0.9.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 +33 -16
- package/dist/cli.mjs +1346 -220
- package/dist/index.d.mts +50 -14
- package/dist/index.mjs +1323 -219
- package/package.json +10 -5
package/README.md
CHANGED
|
@@ -56,13 +56,13 @@ Compatibility target for migrated settings:
|
|
|
56
56
|
(`pnpm@12+` => `v12`, `pnpm@11` => `v11`, otherwise `v10`)
|
|
57
57
|
- `v10`: keep legacy settings as-is and migrate schema-aligned pnpm config keys from `.npmrc`
|
|
58
58
|
- `v11`: normalize to v11-compatible settings (`allowBuilds`, `allowUnusedPatches`, etc.)
|
|
59
|
-
and migrate
|
|
60
|
-
- `v12`:
|
|
61
|
-
|
|
59
|
+
and migrate recognized project settings from `.npmrc` to `pnpm-workspace.yaml`
|
|
60
|
+
- `v12`: use the shared v11 schema plus the v12 delta, including
|
|
61
|
+
`globalShims`, while rejecting v11-only workspace settings.
|
|
62
62
|
|
|
63
|
-
In `v11` and `v12` modes,
|
|
64
|
-
|
|
65
|
-
`pnpm-workspace.yaml`.
|
|
63
|
+
In `v11` and `v12` modes, the migrator validates existing workspace keys,
|
|
64
|
+
filters incoming settings against the selected schema, and applies required
|
|
65
|
+
normalization to legacy files and `pnpm-workspace.yaml`.
|
|
66
66
|
|
|
67
67
|
Automated v10 to v11 conversions include:
|
|
68
68
|
|
|
@@ -80,12 +80,21 @@ Automated v10 to v11 conversions include:
|
|
|
80
80
|
|
|
81
81
|
Notes:
|
|
82
82
|
|
|
83
|
-
- `.npmrc` migration is aligned with pnpm workspace
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
-
|
|
87
|
-
|
|
88
|
-
-
|
|
83
|
+
- `.npmrc` migration is aligned with the target pnpm workspace schema. Unknown
|
|
84
|
+
keys and settings supported only by a different pnpm major stay in `.npmrc`
|
|
85
|
+
with a warning.
|
|
86
|
+
- In `v11` and `v12`, auth/registry keys and project-refused machine settings
|
|
87
|
+
such as `globalDir`, `stateDir`, `configDir`, and `scope` stay in `.npmrc`.
|
|
88
|
+
- Registry declarations containing embedded credentials or dynamic `${...}`
|
|
89
|
+
URLs stay in their source with a warning.
|
|
90
|
+
- In v11 workspaces, supported subproject `.npmrc` fields are moved to
|
|
91
|
+
`packageConfigs` by package name. pnpm v11 accepts `hoist`, `modulesDir`,
|
|
92
|
+
`overrides`, `saveExact`, and `savePrefix` there. pnpm v12 does not support
|
|
93
|
+
`packageConfigs`, so subproject settings are retained with a warning.
|
|
94
|
+
- Cleanup removes only source keys represented in the final workspace after
|
|
95
|
+
applying the selected merge strategy.
|
|
96
|
+
Unrecognized, refused, incompatible, or otherwise unsupported
|
|
97
|
+
`package.json#pnpm` child keys remain in `package.json`.
|
|
89
98
|
- If no auth/registry lines remain after a v11 or v12 migration, the empty
|
|
90
99
|
`.npmrc` is removed.
|
|
91
100
|
- Values moved from `auditConfig.ignoreCves` still contain CVE IDs. Replace them
|
|
@@ -93,9 +102,10 @@ Notes:
|
|
|
93
102
|
- The migrator does not update the `packageManager` version, CI environment variables,
|
|
94
103
|
shell setup, or pnpm commands in scripts. When `packageManager` still pins pnpm 10,
|
|
95
104
|
pass `--compatibility v11` explicitly and update the pin separately.
|
|
96
|
-
- pnpm 12 is
|
|
97
|
-
`pnpm install --resolution-only` CLI
|
|
98
|
-
|
|
105
|
+
- pnpm 12 is stable; this project verifies migrated output against pnpm 12.2.1
|
|
106
|
+
as well as pnpm 11.25.0. Its removed `pnpm install --resolution-only` CLI
|
|
107
|
+
flag is outside this settings migrator's scope; replace it with
|
|
108
|
+
`pnpm peers check` in scripts before upgrading.
|
|
99
109
|
|
|
100
110
|
### `--replace-deprecated`
|
|
101
111
|
|
|
@@ -108,6 +118,13 @@ Example conversions:
|
|
|
108
118
|
|
|
109
119
|
- `allowNonAppliedPatches` -> `allowUnusedPatches`
|
|
110
120
|
- `onlyBuiltDependencies` / `ignoredBuiltDependencies` / `neverBuiltDependencies` -> `allowBuilds`
|
|
121
|
+
- `auditLevel` / `auditConfig` -> `audit`
|
|
122
|
+
- `updateConfig` -> `update`
|
|
123
|
+
- `cleanupUnusedCatalogs` -> `catalogPrune`
|
|
124
|
+
- `enableGlobalVirtualStore` -> `virtualStoreType`
|
|
125
|
+
- `sideEffectsCacheReadonly` / `remoteSideEffectsCache` -> structured
|
|
126
|
+
`sideEffectsCache`
|
|
127
|
+
- non-conflicting `namedRegistries` aliases -> URL-keyed `registries`
|
|
111
128
|
|
|
112
129
|
### `--strategy`
|
|
113
130
|
|
|
@@ -147,7 +164,7 @@ Disable removing pnpm settings in `.npmrc` file.
|
|
|
147
164
|
- **Type**: `boolean`
|
|
148
165
|
- **Default behavior**: `cleanPackageJson=true` (use this flag to disable)
|
|
149
166
|
|
|
150
|
-
Disable removing `pnpm` field in `package.json`.
|
|
167
|
+
Disable removing migrated child keys from the `pnpm` field in `package.json`.
|
|
151
168
|
|
|
152
169
|
### `--no-newline-between`
|
|
153
170
|
|