@mondaydotcomorg/z2h-cli 0.11.3 → 0.11.4
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/esm/migrations/004-remove-z2h-cli-workspace-dep.d.ts +3 -0
- package/dist/esm/migrations/004-remove-z2h-cli-workspace-dep.d.ts.map +1 -0
- package/dist/esm/migrations/004-remove-z2h-cli-workspace-dep.mjs +21 -0
- package/dist/migrations/004-remove-z2h-cli-workspace-dep.d.ts +3 -0
- package/dist/migrations/004-remove-z2h-cli-workspace-dep.d.ts.map +1 -0
- package/dist/migrations/004-remove-z2h-cli-workspace-dep.js +23 -0
- package/migrations.json +5 -0
- package/package.json +1 -1
- package/src/migrations/004-remove-z2h-cli-workspace-dep.ts +24 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"004-remove-z2h-cli-workspace-dep.d.ts","sourceRoot":"","sources":["../../../src/migrations/004-remove-z2h-cli-workspace-dep.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AAEvC,MAAM,CAAC,OAAO,UAAU,wBAAwB,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,CAqBjE"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
function removeZ2hCliWorkspaceDep(tree) {
|
|
2
|
+
if (!tree.exists('package.json')) {
|
|
3
|
+
return;
|
|
4
|
+
}
|
|
5
|
+
const pkg = JSON.parse(tree.read('package.json', 'utf-8'));
|
|
6
|
+
let changed = false;
|
|
7
|
+
for (const section of ['dependencies', 'devDependencies']) {
|
|
8
|
+
if (pkg[section]?.['@mondaydotcomorg/z2h-cli']) {
|
|
9
|
+
delete pkg[section]['@mondaydotcomorg/z2h-cli'];
|
|
10
|
+
if (Object.keys(pkg[section]).length === 0) {
|
|
11
|
+
delete pkg[section];
|
|
12
|
+
}
|
|
13
|
+
changed = true;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
if (changed) {
|
|
17
|
+
tree.write('package.json', JSON.stringify(pkg, null, 2) + '\n');
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export { removeZ2hCliWorkspaceDep as default };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"004-remove-z2h-cli-workspace-dep.d.ts","sourceRoot":"","sources":["../../src/migrations/004-remove-z2h-cli-workspace-dep.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AAEvC,MAAM,CAAC,OAAO,UAAU,wBAAwB,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,CAqBjE"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: 'Module' } });
|
|
2
|
+
|
|
3
|
+
function removeZ2hCliWorkspaceDep(tree) {
|
|
4
|
+
if (!tree.exists('package.json')) {
|
|
5
|
+
return;
|
|
6
|
+
}
|
|
7
|
+
const pkg = JSON.parse(tree.read('package.json', 'utf-8'));
|
|
8
|
+
let changed = false;
|
|
9
|
+
for (const section of ['dependencies', 'devDependencies']) {
|
|
10
|
+
if (pkg[section]?.['@mondaydotcomorg/z2h-cli']) {
|
|
11
|
+
delete pkg[section]['@mondaydotcomorg/z2h-cli'];
|
|
12
|
+
if (Object.keys(pkg[section]).length === 0) {
|
|
13
|
+
delete pkg[section];
|
|
14
|
+
}
|
|
15
|
+
changed = true;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
if (changed) {
|
|
19
|
+
tree.write('package.json', JSON.stringify(pkg, null, 2) + '\n');
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
exports.default = removeZ2hCliWorkspaceDep;
|
package/migrations.json
CHANGED
|
@@ -14,6 +14,11 @@
|
|
|
14
14
|
"version": "0.6.1",
|
|
15
15
|
"description": "Rewrite workspace .yarnrc.yml/.npmrc from ${NPM_TOKEN} to the @mondaydotcomorg broker scope-split",
|
|
16
16
|
"migrate": "./dist/migrations/003-npm-broker-scope-split"
|
|
17
|
+
},
|
|
18
|
+
"remove-z2h-cli-workspace-dep": {
|
|
19
|
+
"version": "0.11.4",
|
|
20
|
+
"description": "Remove @mondaydotcomorg/z2h-cli from workspace deps (globally installed, must not be a local dep)",
|
|
21
|
+
"migrate": "./dist/migrations/004-remove-z2h-cli-workspace-dep"
|
|
17
22
|
}
|
|
18
23
|
}
|
|
19
24
|
}
|
package/package.json
CHANGED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { Tree } from '@nx/devkit';
|
|
2
|
+
|
|
3
|
+
export default function removeZ2hCliWorkspaceDep(tree: Tree): void {
|
|
4
|
+
if (!tree.exists('package.json')) {
|
|
5
|
+
return;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
const pkg = JSON.parse(tree.read('package.json', 'utf-8')!);
|
|
9
|
+
let changed = false;
|
|
10
|
+
|
|
11
|
+
for (const section of ['dependencies', 'devDependencies'] as const) {
|
|
12
|
+
if (pkg[section]?.['@mondaydotcomorg/z2h-cli']) {
|
|
13
|
+
delete pkg[section]['@mondaydotcomorg/z2h-cli'];
|
|
14
|
+
if (Object.keys(pkg[section]).length === 0) {
|
|
15
|
+
delete pkg[section];
|
|
16
|
+
}
|
|
17
|
+
changed = true;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
if (changed) {
|
|
22
|
+
tree.write('package.json', JSON.stringify(pkg, null, 2) + '\n');
|
|
23
|
+
}
|
|
24
|
+
}
|