yarn-version 8.7.1 → 9.0.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.
Files changed (62) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/README.md +2 -152
  3. package/package.json +8 -33
  4. package/yarn-version.mjs +3 -0
  5. package/dist/index-node.mjs +0 -1276
  6. package/dist/index-node.mjs.map +0 -1
  7. package/rollup.config.mjs +0 -12
  8. package/src/__fixtures__/basic/package.json +0 -4
  9. package/src/__fixtures__/basic/yarn.lock +0 -12
  10. package/src/__fixtures__/monorepo/package.json +0 -7
  11. package/src/__fixtures__/monorepo/packages/package-1/package.json +0 -4
  12. package/src/__fixtures__/monorepo/packages/package-2/package.json +0 -7
  13. package/src/__fixtures__/monorepo/packages/package-3/package.json +0 -7
  14. package/src/__fixtures__/monorepo/packages/package-4/package.json +0 -7
  15. package/src/__fixtures__/monorepo/packages/package-5/package.json +0 -8
  16. package/src/__fixtures__/monorepo/yarn.lock +0 -0
  17. package/src/__fixtures__/monorepo-duplicate-names/package.json +0 -7
  18. package/src/__fixtures__/monorepo-duplicate-names/packages/pkg-a/package.json +0 -4
  19. package/src/__fixtures__/monorepo-duplicate-names/packages/pkg-b/package.json +0 -4
  20. package/src/__fixtures__/monorepo-invalid-package-json/package.json +0 -7
  21. package/src/__fixtures__/monorepo-invalid-package-json/packages/pkg-with-invalid-json/package.json +0 -5
  22. package/src/__fixtures__/monorepo-nested/package.json +0 -9
  23. package/src/__fixtures__/monorepo-nested/packages/deep-nested/package.json +0 -4
  24. package/src/__fixtures__/monorepo-nested/packages/nested-1/packages/package-nested.json +0 -4
  25. package/src/__fixtures__/monorepo-nested/packages/nested-1/packages/package.json +0 -4
  26. package/src/__fixtures__/monorepo-nested/packages/package-1/package.json +0 -4
  27. package/src/__fixtures__/monorepo-no-name/package.json +0 -7
  28. package/src/__fixtures__/monorepo-no-name/packages/no-name-package/package.json +0 -3
  29. package/src/__fixtures__/monorepo-object-form/package.json +0 -9
  30. package/src/__fixtures__/monorepo-object-form/packages/package-1/package.json +0 -4
  31. package/src/__fixtures__/monorepo-object-form/packages/package-2/package.json +0 -4
  32. package/src/__fixtures__/monorepo-object-form/packages/package-3/package.json +0 -4
  33. package/src/__fixtures__/monorepo-object-form/packages/package-4/package.json +0 -4
  34. package/src/__fixtures__/monorepo-object-form/packages/package-5/package.json +0 -4
  35. package/src/__fixtures__/no-version/package.json +0 -3
  36. package/src/__fixtures__/no-version/yarn.lock +0 -0
  37. package/src/__fixtures__/with-lifecycle/.yarn/install-state.gz +0 -0
  38. package/src/__fixtures__/with-lifecycle/package.json +0 -7
  39. package/src/__fixtures__/with-lifecycle/yarn.lock +0 -11
  40. package/src/commands/version.test.ts +0 -95
  41. package/src/commands/version.ts +0 -902
  42. package/src/index.ts +0 -13
  43. package/src/missing-types.d.ts +0 -10
  44. package/src/utils/UsageError.ts +0 -6
  45. package/src/utils/bumpTypeUtils.ts +0 -113
  46. package/src/utils/conventionalChangelogUtils.test.ts +0 -762
  47. package/src/utils/conventionalChangelogUtils.ts +0 -104
  48. package/src/utils/conventionalCommitConfigUtils.ts +0 -20
  49. package/src/utils/execCommand.ts +0 -189
  50. package/src/utils/generatorUtils.ts +0 -11
  51. package/src/utils/gitUtils.ts +0 -193
  52. package/src/utils/githubUtils.ts +0 -82
  53. package/src/utils/mapUtils.ts +0 -7
  54. package/src/utils/mapWorkspaces.test.ts +0 -89
  55. package/src/utils/packageDependenciesUtils.test.ts +0 -25
  56. package/src/utils/packageDependenciesUtils.ts +0 -80
  57. package/src/utils/packageUtils.test.ts +0 -32
  58. package/src/utils/packageUtils.ts +0 -127
  59. package/src/utils/updateChangelog.ts +0 -39
  60. package/src/utils/workspaceUtils.ts +0 -142
  61. package/tsconfig.json +0 -21
  62. package/vitest.config.js +0 -9
package/CHANGELOG.md CHANGED
@@ -3,6 +3,20 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [9.0.0](https://github.com/christophehurpeau/pob/compare/yarn-version@8.7.1...yarn-version@9.0.0) (2025-12-06)
7
+
8
+ ### ⚠ BREAKING CHANGES
9
+
10
+ * migrate pob-version to @pob/version and add initial bun support
11
+
12
+ ### Features
13
+
14
+ * migrate pob-version to @pob/version and add initial bun support
15
+
16
+ ### Bug Fixes
17
+
18
+ * properly import pob/version in pob/root
19
+
6
20
  ## [8.7.1](https://github.com/christophehurpeau/pob/compare/yarn-version@8.7.0...yarn-version@8.7.1) (2025-11-24)
7
21
 
8
22
  Version bump for dependency: @pob/rollup-esbuild
package/README.md CHANGED
@@ -6,156 +6,6 @@
6
6
  yarn berry versionning using conventional commits
7
7
  </p>
8
8
 
9
- ## Install
9
+ ## Deprecated
10
10
 
11
- ```bash
12
- yarn add --dev yarn-version conventional-changelog-conventionalcommits
13
- ```
14
-
15
- ## Usage
16
-
17
- ```bash
18
- yarn yarn-version version --help
19
- ```
20
-
21
- ## Options
22
-
23
- `--bump-dependents-highest-as` is for updates in dependent packages. In a monorepo, when a package B has a peer dependency on package A, if A is updated with a breaking change (major), but B has no changes, B will be updated with this option. Sometimes, a major in A should update B with patch or minor. Sometimes, it should also be a major as it also breaks things for B. The default is `major`. If A is `minor` and the value is `major`, B will be updated as `minor`.
24
-
25
- ## Example with Github Action, for a simple repository
26
-
27
- ```yml
28
- name: Release
29
- on:
30
- workflow_dispatch:
31
- inputs:
32
- dry-run:
33
- description: "Dry run"
34
- required: true
35
- type: boolean
36
- default: false
37
-
38
- jobs:
39
- release:
40
- runs-on: ubuntu-latest
41
- steps:
42
- - uses: actions/checkout@v5
43
- with:
44
- token: ${{ secrets.GH_TOKEN }}
45
- fetch-depth: 0
46
-
47
- - name: Enable Corepack
48
- run: corepack enable
49
-
50
- - uses: actions/setup-node@v6
51
- with:
52
- node-version: 24
53
-
54
- - name: Install Dependencies
55
- run: yarn install --immutable --immutable-cache
56
-
57
- - name: New version (dry run)
58
- if: github.ref == 'refs/heads/main' && inputs.dry-run
59
- run: yarn yarn-version version --dry-run
60
-
61
- - name: Configure Git user
62
- if: github.ref == 'refs/heads/main' && !inputs.dry-run
63
- run: |
64
- git config --global user.name 'github-actions[bot]'
65
- git config --global user.email 'github-actions[bot]@users.noreply.github.com'
66
-
67
- - name: New version
68
- if: github.ref == 'refs/heads/main' && !inputs.dry-run
69
- run: |
70
- yarn yarn-version version --create-release=github -m 'chore: release %v [skip ci]'
71
- env:
72
- HUSKY: 0
73
- GH_TOKEN: ${{ secrets.GH_TOKEN }}
74
- YARN_ENABLE_IMMUTABLE_INSTALLS: false
75
-
76
- - name: Publish to npm
77
- run: |
78
- if [ -z "$NODE_AUTH_TOKEN" ]; then
79
- echo "Missing env variable NODE_AUTH_TOKEN"
80
- exit 1
81
- fi
82
- echo >> ./.yarnrc.yml
83
- echo "npmAuthToken: $NODE_AUTH_TOKEN" >> ./.yarnrc.yml
84
- yarn npm publish
85
- if: github.ref == 'refs/heads/main' && !inputs.dry-run
86
- env:
87
- NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
88
- ```
89
-
90
- ## Example with Github Action, for a monorepo
91
-
92
- ```yml
93
- name: Release
94
- on:
95
- workflow_dispatch:
96
- inputs:
97
- dry-run:
98
- description: "Dry run"
99
- required: true
100
- type: boolean
101
- default: false
102
- bump-dependents-highest-as:
103
- description: "Bump dependents highest as"
104
- required: false
105
- type: choice
106
- options:
107
- - major
108
- - minor
109
- - patch
110
- default: "major"
111
-
112
- jobs:
113
- release:
114
- runs-on: ubuntu-latest
115
- steps:
116
- - uses: actions/checkout@v5
117
- with:
118
- token: ${{ secrets.GH_TOKEN }}
119
- fetch-depth: 0
120
-
121
- - name: Enable Corepack
122
- run: corepack enable
123
-
124
- - uses: actions/setup-node@v3
125
- with:
126
- node-version: 24
127
-
128
- - name: Install Dependencies
129
- run: yarn install --immutable --immutable-cache
130
-
131
- - name: New version (dry run)
132
- if: github.ref == 'refs/heads/main' && inputs.dry-run
133
- run: yarn yarn-version version --dry-run --bump-dependents-highest-as=${{ inputs.bump-dependents-highest-as }}
134
- - name: Configure Git user
135
- if: github.ref == 'refs/heads/main' && !inputs.dry-run
136
- run: |
137
- git config --global user.name 'github-actions[bot]'
138
- git config --global user.email 'github-actions[bot]@users.noreply.github.com'
139
-
140
- - name: New version
141
- if: github.ref == 'refs/heads/main' && !inputs.dry-run
142
- run: |
143
- yarn yarn-version version --create-release=github --bump-dependents-highest-as=${{ inputs.bump-dependents-highest-as }} -m 'chore: release [skip ci]\n\n%t'
144
- env:
145
- HUSKY: 0
146
- GH_TOKEN: ${{ secrets.GH_TOKEN }}
147
- YARN_ENABLE_IMMUTABLE_INSTALLS: false
148
-
149
- - name: Publish to npm
150
- run: |
151
- if [ -z "$NODE_AUTH_TOKEN" ]; then
152
- echo "Missing env variable NODE_AUTH_TOKEN"
153
- exit 1
154
- fi
155
- echo >> ./.yarnrc.yml
156
- echo "npmAuthToken: $NODE_AUTH_TOKEN" >> ./.yarnrc.yml
157
- yarn workspaces foreach --parallel --no-private npm publish --tolerate-republish
158
- if: github.ref == 'refs/heads/main' && !inputs.dry-run
159
- env:
160
- NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
161
- ```
11
+ Use `@pob/version` instead. Adds support for bun.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "yarn-version",
3
- "version": "8.7.1",
3
+ "version": "9.0.0",
4
4
  "description": "yarn berry versioning using conventional commits",
5
5
  "keywords": [
6
6
  "semantic-release",
@@ -21,14 +21,14 @@
21
21
  "engines": {
22
22
  "node": ">=24.11.0"
23
23
  },
24
- "bin": "./dist/index-node.mjs",
25
- "main": "./dist/index-node.mjs",
24
+ "bin": "./yarn-version.mjs",
25
+ "main": "./yarn-version.mjs",
26
26
  "exports": {
27
27
  "./package.json": "./package.json",
28
28
  ".": {
29
29
  "types": "./dist/definitions/index.d.ts",
30
30
  "node": {
31
- "import": "./dist/index-node.mjs"
31
+ "import": "./yarn-version.mjs"
32
32
  }
33
33
  }
34
34
  },
@@ -38,39 +38,14 @@
38
38
  "clean:build": "pob-esbuild-clean-out dist",
39
39
  "lint": "yarn run lint:eslint",
40
40
  "lint:eslint": "yarn ../.. run eslint --quiet packages/yarn-version",
41
- "start": "yarn clean:build && rollup --config rollup.config.mjs --watch",
42
- "test": "yarn ../../ run test -- packages/yarn-version"
43
- },
44
- "pob": {
45
- "bundler": "rollup-esbuild",
46
- "entries": [
47
- "index"
48
- ],
49
- "envs": [
50
- {
51
- "target": "node",
52
- "version": "22",
53
- "omitVersionInFileName": true,
54
- "executable": true
55
- }
56
- ],
57
- "typescript": true
41
+ "start": "yarn clean:build && rollup --config rollup.config.mjs --watch"
58
42
  },
43
+ "pob": {},
59
44
  "prettier": "@pob/root/prettier-config",
60
45
  "dependencies": {
61
- "@octokit/rest": "22.0.1",
62
- "commander": "14.0.2",
63
- "conventional-changelog-conventionalcommits": "9.1.0",
64
- "conventional-changelog-preset-loader": "5.0.0",
65
- "conventional-changelog-writer": "8.2.0",
66
- "conventional-commits-parser": "6.2.1",
67
- "nightingale": "18.1.0",
68
- "semver": "7.7.3"
46
+ "@pob/version": "1.0.1"
69
47
  },
70
48
  "devDependencies": {
71
- "@pob/rollup-esbuild": "7.4.1",
72
- "@types/node": "22.19.1",
73
- "type-fest": "5.2.0",
74
- "typescript": "5.9.3"
49
+ "@types/node": "22.19.1"
75
50
  }
76
51
  }
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env node
2
+
3
+ import "@pob/version";