update-workspace-root-version 2.0.6 → 2.1.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.
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { writeFileSync } from 'node:fs';
|
|
2
|
+
import { EOL } from 'node:os';
|
|
2
3
|
import { join } from 'node:path';
|
|
3
4
|
import { readPackageJson } from '@codemod-utils/package-json';
|
|
4
5
|
export function updateWorkspaceRootVersion(version, options) {
|
|
@@ -6,6 +7,6 @@ export function updateWorkspaceRootVersion(version, options) {
|
|
|
6
7
|
const packageJson = readPackageJson({ projectRoot });
|
|
7
8
|
packageJson['version'] = version;
|
|
8
9
|
const destination = join(projectRoot, 'package.json');
|
|
9
|
-
const file = JSON.stringify(packageJson, null, 2)
|
|
10
|
+
const file = JSON.stringify(packageJson, null, 2).replaceAll('\n', EOL) + EOL;
|
|
10
11
|
writeFileSync(destination, file, 'utf8');
|
|
11
12
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "update-workspace-root-version",
|
|
3
|
-
"version": "2.0
|
|
3
|
+
"version": "2.1.0",
|
|
4
4
|
"description": "Update the workspace root version in a monorepo",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"codemod",
|
|
@@ -24,16 +24,16 @@
|
|
|
24
24
|
"dist"
|
|
25
25
|
],
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@codemod-utils/files": "^3.0
|
|
28
|
-
"@codemod-utils/package-json": "^3.
|
|
27
|
+
"@codemod-utils/files": "^3.1.0",
|
|
28
|
+
"@codemod-utils/package-json": "^3.3.0",
|
|
29
29
|
"yargs": "^18.0.0"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
|
-
"@changesets/cli": "^2.29.
|
|
33
|
-
"@changesets/get-github-info": "^0.
|
|
34
|
-
"@codemod-utils/tests": "^2.0
|
|
35
|
-
"@ijlee2-frontend-configs/eslint-config-node": "^2.
|
|
36
|
-
"@ijlee2-frontend-configs/prettier": "^2.
|
|
32
|
+
"@changesets/cli": "^2.29.8",
|
|
33
|
+
"@changesets/get-github-info": "^0.7.0",
|
|
34
|
+
"@codemod-utils/tests": "^2.1.0",
|
|
35
|
+
"@ijlee2-frontend-configs/eslint-config-node": "^2.3.0",
|
|
36
|
+
"@ijlee2-frontend-configs/prettier": "^2.3.0",
|
|
37
37
|
"@sondr3/minitest": "^0.1.2",
|
|
38
38
|
"@tsconfig/node20": "^20.1.8",
|
|
39
39
|
"@tsconfig/strictest": "^2.0.8",
|
|
@@ -41,14 +41,14 @@
|
|
|
41
41
|
"@types/yargs": "^17.0.35",
|
|
42
42
|
"concurrently": "^9.2.1",
|
|
43
43
|
"eslint": "^9.39.1",
|
|
44
|
-
"prettier": "^3.
|
|
44
|
+
"prettier": "^3.7.4",
|
|
45
45
|
"typescript": "^5.9.3"
|
|
46
46
|
},
|
|
47
47
|
"engines": {
|
|
48
48
|
"node": "20.* || >= 22"
|
|
49
49
|
},
|
|
50
50
|
"scripts": {
|
|
51
|
-
"build": "
|
|
51
|
+
"build": "sh build.sh --production",
|
|
52
52
|
"format": "prettier . --cache --write",
|
|
53
53
|
"lint": "concurrently \"pnpm:lint:*(!fix)\" --names \"lint:\"",
|
|
54
54
|
"lint:fix": "concurrently \"pnpm:lint:*:fix\" --names \"fix:\" && pnpm format",
|
|
@@ -58,6 +58,6 @@
|
|
|
58
58
|
"lint:types": "tsc --noEmit",
|
|
59
59
|
"release:prepare": "changeset version",
|
|
60
60
|
"release:publish": "pnpm build && changeset publish",
|
|
61
|
-
"test": "
|
|
61
|
+
"test": "sh build.sh --test && mt dist-for-testing --quiet"
|
|
62
62
|
}
|
|
63
63
|
}
|