semantic-release-lerna 0.7.2 → 0.8.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/README.md +1 -1
- package/lib/get-changed-packages.js +1 -1
- package/lib/should-latch.js +5 -1
- package/lib/should-latch.test.js +13 -0
- package/package.json +12 -12
package/README.md
CHANGED
|
@@ -77,7 +77,7 @@ To use legacy auth set `NPM_USERNAME`, `NPM_PASSWORD` and `NPM_EMAIL`.
|
|
|
77
77
|
| Option | Description | Default |
|
|
78
78
|
| --------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------- |
|
|
79
79
|
| `npmVerifyAuth` | Set to `false` to disable verifying NPM registry credentials. | `true` |
|
|
80
|
-
| `latch` | Latches package versions together. If the version bump is at least the given version all packages will be bumped regardless if the package has been touched or not. `"major", "minor", "patch", "none"` | `"minor"` |
|
|
80
|
+
| `latch` | Latches package versions together. If the version bump is at least the given version all packages will be bumped regardless if the package has been touched or not. `"major", "minor", "patch", "prerelease", "none"` | `"minor"` |
|
|
81
81
|
| `rootVersion` | Allow to update version on root `package.json`. | `true` |
|
|
82
82
|
|
|
83
83
|
## Troubleshooting
|
|
@@ -89,7 +89,7 @@ function collectUpdates(filteredPackages, packageGraph, execOptions, commandOpti
|
|
|
89
89
|
}
|
|
90
90
|
|
|
91
91
|
/**
|
|
92
|
-
* @param {"major" | "minor" | "patch" | "none"} latch
|
|
92
|
+
* @param {"major" | "minor" | "patch" | "prerelease" | "none"} latch
|
|
93
93
|
* @param {any} context
|
|
94
94
|
* @returns {Promise<any[]>}
|
|
95
95
|
*/
|
package/lib/should-latch.js
CHANGED
|
@@ -1,12 +1,14 @@
|
|
|
1
|
+
/* eslint-disable security/detect-unsafe-regex */
|
|
1
2
|
const latchMajor = /^\d+\.0\.0$/;
|
|
2
3
|
const latchMinor = /^\d+\.\d+\.0$/;
|
|
3
4
|
const latchPatch = /^\d+\.\d\.\d+$/;
|
|
5
|
+
const latchPrerelease = /^\d+\.\d+\.\d+(-(.*\.)?\d+)?$/;
|
|
4
6
|
|
|
5
7
|
/**
|
|
6
8
|
* Returns true if version should be latched together
|
|
7
9
|
*
|
|
8
10
|
* @param {string} version
|
|
9
|
-
* @param {"major" | "minor" | "patch" | "none"} latch
|
|
11
|
+
* @param {"major" | "minor" | "patch" | "prerelease" | "none"} latch
|
|
10
12
|
* @returns {boolean}
|
|
11
13
|
*/
|
|
12
14
|
function shouldLatch(version, latch) {
|
|
@@ -17,6 +19,8 @@ function shouldLatch(version, latch) {
|
|
|
17
19
|
return latchMinor.test(version);
|
|
18
20
|
case "patch":
|
|
19
21
|
return latchPatch.test(version);
|
|
22
|
+
case "prerelease":
|
|
23
|
+
return latchPrerelease.test(version);
|
|
20
24
|
default:
|
|
21
25
|
return false;
|
|
22
26
|
}
|
package/lib/should-latch.test.js
CHANGED
|
@@ -56,3 +56,16 @@ describe("latch patch", () => {
|
|
|
56
56
|
expect(shouldLatch(next, "patch")).toBe(result);
|
|
57
57
|
});
|
|
58
58
|
});
|
|
59
|
+
|
|
60
|
+
describe("latch prerelease", () => {
|
|
61
|
+
it.each`
|
|
62
|
+
bump | result | version | next
|
|
63
|
+
${"major"} | ${true} | ${version} | ${semver.inc(version, "major")}
|
|
64
|
+
${"minor"} | ${true} | ${version} | ${semver.inc(version, "minor")}
|
|
65
|
+
${"patch"} | ${true} | ${version} | ${semver.inc(version, "patch")}
|
|
66
|
+
${"prerelease"} | ${true} | ${version} | ${semver.inc(version, "prerelease")}
|
|
67
|
+
`("should return $result when version bump is $bump ($version -> $next)", ({ result, next }) => {
|
|
68
|
+
expect.assertions(1);
|
|
69
|
+
expect(shouldLatch(next, "prerelease")).toBe(result);
|
|
70
|
+
});
|
|
71
|
+
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "semantic-release-lerna",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.8.0",
|
|
4
4
|
"description": "semantic-release plugin to publish lerna monorepo packages to npm",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"npm",
|
|
@@ -68,25 +68,25 @@
|
|
|
68
68
|
"write-json-file": "^4.0.0"
|
|
69
69
|
},
|
|
70
70
|
"devDependencies": {
|
|
71
|
-
"@html-validate/eslint-config": "5.5.
|
|
72
|
-
"@html-validate/eslint-config-jest": "5.5.
|
|
73
|
-
"@html-validate/prettier-config": "2.3.
|
|
74
|
-
"@semantic-release/npm": "9.0.
|
|
75
|
-
"@types/jest": "29.
|
|
71
|
+
"@html-validate/eslint-config": "5.5.22",
|
|
72
|
+
"@html-validate/eslint-config-jest": "5.5.18",
|
|
73
|
+
"@html-validate/prettier-config": "2.3.4",
|
|
74
|
+
"@semantic-release/npm": "9.0.2",
|
|
75
|
+
"@types/jest": "29.4.0",
|
|
76
76
|
"codecov": "3.8.3",
|
|
77
77
|
"fs-extra": "11.1.0",
|
|
78
78
|
"got": "11.8.6",
|
|
79
|
-
"jest": "29.
|
|
80
|
-
"lerna": "6.1
|
|
81
|
-
"prettier": "2.8.
|
|
82
|
-
"semantic-release": "
|
|
79
|
+
"jest": "29.4.2",
|
|
80
|
+
"lerna": "6.4.1",
|
|
81
|
+
"prettier": "2.8.4",
|
|
82
|
+
"semantic-release": "20.1.0",
|
|
83
83
|
"stream-buffers": "3.0.2",
|
|
84
|
-
"verdaccio": "5.
|
|
84
|
+
"verdaccio": "5.19.1"
|
|
85
85
|
},
|
|
86
86
|
"peerDependencies": {
|
|
87
87
|
"@semantic-release/npm": ">= 7",
|
|
88
88
|
"lerna": "^3.2 || ^4 || ^5 || ^6",
|
|
89
|
-
"semantic-release": ">=15.0.0 <
|
|
89
|
+
"semantic-release": ">=15.0.0 <21.0.0"
|
|
90
90
|
},
|
|
91
91
|
"engines": {
|
|
92
92
|
"node": ">= 14"
|