yarn-version 8.7.0 → 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.
- package/CHANGELOG.md +19 -0
- package/README.md +2 -152
- package/package.json +9 -39
- package/yarn-version.mjs +3 -0
- package/dist/index-node.mjs +0 -1251
- package/dist/index-node.mjs.map +0 -1
- package/rollup.config.mjs +0 -12
- package/src/__fixtures__/basic/package.json +0 -4
- package/src/__fixtures__/basic/yarn.lock +0 -12
- package/src/__fixtures__/monorepo/package.json +0 -7
- package/src/__fixtures__/monorepo/packages/package-1/package.json +0 -4
- package/src/__fixtures__/monorepo/packages/package-2/package.json +0 -7
- package/src/__fixtures__/monorepo/packages/package-3/package.json +0 -7
- package/src/__fixtures__/monorepo/packages/package-4/package.json +0 -7
- package/src/__fixtures__/monorepo/packages/package-5/package.json +0 -8
- package/src/__fixtures__/monorepo/yarn.lock +0 -0
- package/src/__fixtures__/no-version/package.json +0 -3
- package/src/__fixtures__/no-version/yarn.lock +0 -0
- package/src/__fixtures__/with-lifecycle/.yarn/install-state.gz +0 -0
- package/src/__fixtures__/with-lifecycle/package.json +0 -7
- package/src/__fixtures__/with-lifecycle/yarn.lock +0 -11
- package/src/commands/version.test.ts +0 -94
- package/src/commands/version.ts +0 -902
- package/src/index.ts +0 -13
- package/src/missing-types.d.ts +0 -11
- package/src/utils/UsageError.ts +0 -6
- package/src/utils/bumpTypeUtils.ts +0 -113
- package/src/utils/conventionalChangelogUtils.test.ts +0 -761
- package/src/utils/conventionalChangelogUtils.ts +0 -104
- package/src/utils/conventionalCommitConfigUtils.ts +0 -20
- package/src/utils/execCommand.ts +0 -189
- package/src/utils/generatorUtils.ts +0 -11
- package/src/utils/gitUtils.ts +0 -193
- package/src/utils/githubUtils.ts +0 -82
- package/src/utils/mapUtils.ts +0 -7
- package/src/utils/packageDependenciesUtils.test.ts +0 -24
- package/src/utils/packageDependenciesUtils.ts +0 -80
- package/src/utils/packageUtils.ts +0 -97
- package/src/utils/updateChangelog.ts +0 -39
- package/src/utils/workspaceUtils.ts +0 -142
- package/tsconfig.json +0 -23
- package/vitest.config.js +0 -9
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,25 @@
|
|
|
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
|
+
|
|
20
|
+
## [8.7.1](https://github.com/christophehurpeau/pob/compare/yarn-version@8.7.0...yarn-version@8.7.1) (2025-11-24)
|
|
21
|
+
|
|
22
|
+
Version bump for dependency: @pob/rollup-esbuild
|
|
23
|
+
|
|
24
|
+
|
|
6
25
|
## [8.7.0](https://github.com/christophehurpeau/pob/compare/yarn-version@8.6.1...yarn-version@8.7.0) (2025-11-18)
|
|
7
26
|
|
|
8
27
|
### Features
|
package/README.md
CHANGED
|
@@ -6,156 +6,6 @@
|
|
|
6
6
|
yarn berry versionning using conventional commits
|
|
7
7
|
</p>
|
|
8
8
|
|
|
9
|
-
##
|
|
9
|
+
## Deprecated
|
|
10
10
|
|
|
11
|
-
|
|
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": "
|
|
3
|
+
"version": "9.0.0",
|
|
4
4
|
"description": "yarn berry versioning using conventional commits",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"semantic-release",
|
|
@@ -19,16 +19,16 @@
|
|
|
19
19
|
"homepage": "https://github.com/christophehurpeau/pob",
|
|
20
20
|
"type": "module",
|
|
21
21
|
"engines": {
|
|
22
|
-
"node": ">=
|
|
22
|
+
"node": ">=24.11.0"
|
|
23
23
|
},
|
|
24
|
-
"bin": "./
|
|
25
|
-
"main": "./
|
|
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": "./
|
|
31
|
+
"import": "./yarn-version.mjs"
|
|
32
32
|
}
|
|
33
33
|
}
|
|
34
34
|
},
|
|
@@ -38,44 +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": "vitest run",
|
|
43
|
-
"test:watch": "vitest"
|
|
44
|
-
},
|
|
45
|
-
"pob": {
|
|
46
|
-
"bundler": "rollup-esbuild",
|
|
47
|
-
"entries": [
|
|
48
|
-
"index"
|
|
49
|
-
],
|
|
50
|
-
"envs": [
|
|
51
|
-
{
|
|
52
|
-
"target": "node",
|
|
53
|
-
"version": "22",
|
|
54
|
-
"omitVersionInFileName": true,
|
|
55
|
-
"executable": true
|
|
56
|
-
}
|
|
57
|
-
],
|
|
58
|
-
"typescript": true
|
|
41
|
+
"start": "yarn clean:build && rollup --config rollup.config.mjs --watch"
|
|
59
42
|
},
|
|
43
|
+
"pob": {},
|
|
60
44
|
"prettier": "@pob/root/prettier-config",
|
|
61
45
|
"dependencies": {
|
|
62
|
-
"@
|
|
63
|
-
"@octokit/rest": "22.0.1",
|
|
64
|
-
"@pob/pretty-pkg": "13.1.0",
|
|
65
|
-
"commander": "14.0.2",
|
|
66
|
-
"conventional-changelog-conventionalcommits": "9.1.0",
|
|
67
|
-
"conventional-changelog-preset-loader": "5.0.0",
|
|
68
|
-
"conventional-changelog-writer": "8.2.0",
|
|
69
|
-
"conventional-commits-parser": "6.2.1",
|
|
70
|
-
"nightingale": "18.1.0",
|
|
71
|
-
"semver": "7.7.3"
|
|
46
|
+
"@pob/version": "1.0.1"
|
|
72
47
|
},
|
|
73
48
|
"devDependencies": {
|
|
74
|
-
"@
|
|
75
|
-
"@types/node": "22.19.1",
|
|
76
|
-
"@types/npmcli__map-workspaces": "3.0.4",
|
|
77
|
-
"type-fest": "5.2.0",
|
|
78
|
-
"typescript": "5.9.3",
|
|
79
|
-
"vitest": "4.0.8"
|
|
49
|
+
"@types/node": "22.19.1"
|
|
80
50
|
}
|
|
81
51
|
}
|
package/yarn-version.mjs
ADDED