fix(release): allow non-publishing branch audits

This commit is contained in:
NimBold
2026-08-09 05:10:25 +03:30
parent 807e16a1fe
commit 6a9b2bc099
3 changed files with 31 additions and 16 deletions
+8 -2
View File
@@ -11,8 +11,8 @@ const currentVersion = JSON.parse(
fs.readFileSync(path.join(repositoryRoot, 'package.json'), 'utf8')
).version;
function runVerifier(tag) {
return spawnSync(process.execPath, [verifier, '--tag', tag], {
function runVerifier(tag, ...extraArguments) {
return spawnSync(process.execPath, [verifier, '--tag', tag, ...extraArguments], {
cwd: repositoryRoot,
encoding: 'utf8',
});
@@ -35,3 +35,9 @@ test('release version verifier rejects non-semver tag names', () => {
assert.equal(result.status, 1);
assert.match(result.stderr, /semantic version tag/);
});
test('release version verifier accepts an untagged non-publishing package audit', () => {
const result = runVerifier('main', '--allow-untagged');
assert.equal(result.status, 0, result.stderr);
assert.match(result.stdout, new RegExp(`Non-publishing package version ${currentVersion} matches`));
});