pnpm-settings-migrator 0.0.6 → 0.0.8
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/dist/cli.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import process from 'node:process';
|
|
2
2
|
import { cac } from 'cac';
|
|
3
3
|
import { consola } from 'consola';
|
|
4
|
-
import { b as bold, d as dim, a as magenta, m as migratePnpmSettings, g as green, c as red } from './shared/pnpm-settings-migrator.
|
|
4
|
+
import { b as bold, d as dim, a as magenta, m as migratePnpmSettings, g as green, c as red } from './shared/pnpm-settings-migrator.Cwv3sjIn.mjs';
|
|
5
5
|
import '@ntnyq/utils';
|
|
6
6
|
import 'defu';
|
|
7
7
|
import 'detect-indent';
|
|
@@ -14,7 +14,7 @@ import 'read-ini-file';
|
|
|
14
14
|
import 'uncase';
|
|
15
15
|
|
|
16
16
|
const name = "pnpm-settings-migrator";
|
|
17
|
-
const version = "0.0.
|
|
17
|
+
const version = "0.0.8";
|
|
18
18
|
|
|
19
19
|
const cli = cac(name);
|
|
20
20
|
cli.version(version).option("--cwd [cwd]", "Current working directory").option("--sort-keys", "Sort keys when write pnpm-workspace.yaml").option(
|
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { m as migratePnpmSettings, r as resolveOptions } from './shared/pnpm-settings-migrator.
|
|
1
|
+
export { m as migratePnpmSettings, r as resolveOptions } from './shared/pnpm-settings-migrator.Cwv3sjIn.mjs';
|
|
2
2
|
import '@ntnyq/utils';
|
|
3
3
|
import 'consola';
|
|
4
4
|
import 'defu';
|
package/dist/shared/{pnpm-settings-migrator.BjjY2_gT.mjs → pnpm-settings-migrator.Cwv3sjIn.mjs}
RENAMED
|
@@ -18,12 +18,13 @@ const DEFAULT_INDENT = 2;
|
|
|
18
18
|
const PNPM_SETTINGS_FIELDS = [
|
|
19
19
|
"allowedDeprecatedVersions",
|
|
20
20
|
"allowNonAppliedPatches",
|
|
21
|
+
"allowUnusedPatches",
|
|
21
22
|
"auditConfig",
|
|
22
23
|
"configDependencies",
|
|
23
|
-
"dangerouslyAllowAllBuilds",
|
|
24
24
|
"executionEnv",
|
|
25
25
|
"ignoredBuiltDependencies",
|
|
26
26
|
"ignoredOptionalDependencies",
|
|
27
|
+
"ignorePatchFailures",
|
|
27
28
|
"neverBuiltDependencies",
|
|
28
29
|
"onlyBuiltDependencies",
|
|
29
30
|
"onlyBuiltDependenciesFile",
|
|
@@ -129,10 +130,12 @@ async function migratePnpmSettings(rawOptions = {}) {
|
|
|
129
130
|
...pnpmSettingsInNpmrc,
|
|
130
131
|
...pnpmSettingsInPackageJson
|
|
131
132
|
});
|
|
132
|
-
const yamlDocument = new Document(
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
133
|
+
const yamlDocument = new Document(
|
|
134
|
+
{},
|
|
135
|
+
{
|
|
136
|
+
sortMapEntries: options.sortKeys
|
|
137
|
+
}
|
|
138
|
+
);
|
|
136
139
|
Object.entries(pnpmWorkspaceResult).forEach(([key, value], index) => {
|
|
137
140
|
yamlDocument.add({ key, value });
|
|
138
141
|
if (options.newlineBetween && index < Object.keys(pnpmWorkspaceResult).length - 1) {
|
|
@@ -142,7 +145,12 @@ async function migratePnpmSettings(rawOptions = {}) {
|
|
|
142
145
|
});
|
|
143
146
|
}
|
|
144
147
|
});
|
|
145
|
-
await fsWriteFile(
|
|
148
|
+
await fsWriteFile(
|
|
149
|
+
pnpmWorkspaceYamlPath,
|
|
150
|
+
yamlDocument.toString({
|
|
151
|
+
indent: pnpmWorkspaceYamlIndent
|
|
152
|
+
})
|
|
153
|
+
);
|
|
146
154
|
if (isNpmrcExist && options.cleanNpmrc) {
|
|
147
155
|
await pruneNpmrc(npmrcPath);
|
|
148
156
|
}
|
package/package.json
CHANGED