update-workspace-root-version 1.0.3 → 1.0.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/README.md CHANGED
@@ -30,7 +30,7 @@ Then, run the codemod before you create a tag. For example, after [changesets](h
30
30
  /* package.json */
31
31
  {
32
32
  "scripts": {
33
- "release:changelog": "changeset version; update-workspace-root-version",
33
+ "release:prepare": "changeset version; update-workspace-root-version"
34
34
  },
35
35
  "devDependencies": {
36
36
  "@changesets/cli": "...",
@@ -1,22 +1,6 @@
1
- import { join } from 'node:path';
2
- import { findFiles } from '@codemod-utils/files';
1
+ import { getPackageRoots } from '@codemod-utils/files';
3
2
  import { readPackageJson } from '@codemod-utils/json';
4
3
  import { allow } from '../utils/version/index.js';
5
- function getPackageRoots(options) {
6
- const { projectRoot } = options;
7
- const packageRoots = findFiles('**/package.json', {
8
- ignoreList: ['**/{dist,node_modules}/**/*'],
9
- projectRoot,
10
- }).map((filePath) => {
11
- return join(projectRoot, filePath.replace(/package\.json$/, ''));
12
- });
13
- const isMonorepo = packageRoots.length > 1;
14
- if (isMonorepo) {
15
- // Remove the workspace root
16
- return packageRoots.filter((packageRoot) => packageRoot !== projectRoot);
17
- }
18
- return packageRoots;
19
- }
20
4
  export function getPackageVersions(options) {
21
5
  const packageRoots = getPackageRoots(options);
22
6
  return packageRoots
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "update-workspace-root-version",
3
- "version": "1.0.3",
3
+ "version": "1.0.4",
4
4
  "description": "Update the workspace root version in a monorepo",
5
5
  "keywords": [
6
6
  "codemod",
@@ -24,23 +24,23 @@
24
24
  "dist"
25
25
  ],
26
26
  "dependencies": {
27
- "@codemod-utils/files": "^2.0.8",
28
- "@codemod-utils/json": "^1.1.13",
27
+ "@codemod-utils/files": "^2.1.0",
28
+ "@codemod-utils/json": "^1.1.14",
29
29
  "yargs": "^17.7.2"
30
30
  },
31
31
  "devDependencies": {
32
- "@changesets/cli": "^2.27.12",
32
+ "@changesets/cli": "^2.28.1",
33
33
  "@changesets/get-github-info": "^0.6.0",
34
34
  "@codemod-utils/tests": "^1.1.11",
35
- "@ijlee2-frontend-configs/eslint-config-node": "^0.2.1",
36
- "@ijlee2-frontend-configs/prettier": "^0.2.0",
37
- "@ijlee2-frontend-configs/typescript": "^0.3.0",
35
+ "@ijlee2-frontend-configs/eslint-config-node": "^0.2.3",
36
+ "@ijlee2-frontend-configs/prettier": "^0.2.1",
37
+ "@ijlee2-frontend-configs/typescript": "^0.3.1",
38
38
  "@sondr3/minitest": "^0.1.2",
39
- "@types/node": "^18.19.75",
39
+ "@types/node": "^18.19.76",
40
40
  "@types/yargs": "^17.0.33",
41
41
  "concurrently": "^9.1.2",
42
- "eslint": "^9.20.0",
43
- "prettier": "^3.5.0",
42
+ "eslint": "^9.21.0",
43
+ "prettier": "^3.5.2",
44
44
  "typescript": "^5.7.3"
45
45
  },
46
46
  "engines": {