Skip to content

Commit 4e722a8

Browse files
build: add support for experimental releases (#2831)
1 parent 975c150 commit 4e722a8

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

resources/build-npm.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,10 @@ function buildPackageJSON() {
6868

6969
if (preReleaseTag != null) {
7070
const [tag] = preReleaseTag.split('.');
71-
assert(['alpha', 'beta', 'rc'].includes(tag), `"${tag}" tag is supported.`);
71+
assert(
72+
tag.startsWith('experimental-') || ['alpha', 'beta', 'rc'].includes(tag),
73+
`"${tag}" tag is supported.`,
74+
);
7275

7376
assert(!packageJSON.publishConfig, 'Can not override "publishConfig".');
7477
packageJSON.publishConfig = { tag: tag || 'latest' };

src/__tests__/version-test.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@ import { version, versionInfo } from '../version';
66
describe('Version', () => {
77
it('version', () => {
88
expect(version).to.be.a('string');
9-
expect(version).to.match(/^\d+\.\d+\.\d(-(alpha|beta|rc)\.\d+)?$/);
9+
expect(version).to.match(
10+
/^\d+\.\d+\.\d(-(alpha|beta|rc|(experimental-[\w-]+))\.\d+)?$/,
11+
);
1012
});
1113

1214
it('versionInfo', () => {

0 commit comments

Comments
 (0)