refactor: enforce frontend view model boundaries
This commit is contained in:
@@ -2,14 +2,16 @@ const assert = require("node:assert/strict");
|
||||
const { execFileSync } = require("node:child_process");
|
||||
|
||||
const { version } = require("../package.json");
|
||||
// eslint-disable-next-line sonarjs/no-os-command-from-path -- Repository checks use the developer/CI Git installation; arguments never invoke a shell.
|
||||
const git = (...arguments_) => execFileSync("git", arguments_, { encoding: "utf8" }).trim();
|
||||
|
||||
const git = (...arguments_) =>
|
||||
execFileSync("git", arguments_, { encoding: "utf8" }).trim(); // eslint-disable-line sonarjs/no-os-command-from-path -- Repository checks use the developer/CI Git installation; arguments never invoke a shell.
|
||||
|
||||
assert.equal(
|
||||
git("status", "--porcelain"),
|
||||
"",
|
||||
"Commit all changes before preparing a release",
|
||||
);
|
||||
|
||||
const tag_ = git(
|
||||
"tag",
|
||||
"--merged",
|
||||
@@ -20,6 +22,7 @@ const tag_ = git(
|
||||
)
|
||||
.split("\n")
|
||||
.find(tag => /^v\d+\.\d+\.\d+$/.test(tag));
|
||||
|
||||
assert.equal(
|
||||
version,
|
||||
tag_?.slice(1) ?? "0.0.0",
|
||||
|
||||
Reference in New Issue
Block a user