Skip to content

Commit 064828d

Browse files
committed
update new typst version in check commands
Also refactor to not miss an update. This fix the failing test that was added to detect this version mismatch.
1 parent f33f44f commit 064828d

3 files changed

Lines changed: 15 additions & 15 deletions

File tree

‎configuration‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,8 @@
77
# but it also used when packaging (e.g. run configure.sh, then prepare-dist.sh, then package.sh)
88
# deno_dom should match release at https://github.com/b-fuze/deno-dom/releases
99

10-
# NB: When these are updated, you must also update the versions
10+
# IMPORTANT: When these are updated, you must also update the versions
1111
# in src/command/check/check.ts
12-
1312
# Binary dependencies
1413
export DENO=v2.4.5
1514
# TODO figure out where 0.1.41 apple silicon libs are available

‎src/command/check/check.ts‎

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -243,19 +243,18 @@ async function checkVersions(conf: CheckConfiguration) {
243243
// loading the configuration file directly, but that
244244
// file is in an awkward format and it is not packaged
245245
// with our installers
246-
const checkData: [string | undefined, string, string][] = strict
247-
? [
248-
[pandocVersion, "3.8.3", "Pandoc"],
249-
[sassVersion, "1.87.0", "Dart Sass"],
250-
[denoVersion, "2.4.5", "Deno"],
251-
[typstVersion, "0.14.0", "Typst"],
252-
]
253-
: [
254-
[pandocVersion, ">=3.8.3", "Pandoc"],
255-
[sassVersion, ">=1.87.0", "Dart Sass"],
256-
[denoVersion, ">=2.3.1", "Deno"],
257-
[typstVersion, ">=0.14.0", "Typst"],
258-
];
246+
const versionConstraints: [string | undefined, string, string][] = [
247+
[pandocVersion, "3.8.3", "Pandoc"],
248+
[sassVersion, "1.87.0", "Dart Sass"],
249+
[denoVersion, "2.4.5", "Deno"],
250+
[typstVersion, "0.14.2", "Typst"],
251+
];
252+
const checkData: [string | undefined, string, string][] = versionConstraints
253+
.map(([version, ver, name]) => [
254+
version,
255+
strict ? ver : `>=${ver}`,
256+
name,
257+
]);
259258
const fun = strict ? strictCheckVersion : checkVersion;
260259
for (const [version, constraint, name] of checkData) {
261260
if (version === undefined) {

‎tests/smoke/check/check-versions-no-mismatch.test.ts‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
import { testQuartoCmd } from "../../test.ts";
99
import { printsMessage } from "../../verify.ts";
1010

11+
// If this test fails, it indicates that there is a version mismatch
12+
// Check 'src\command\check\check.ts' for the recorded versions, and compare to 'configuration' file
1113
testQuartoCmd(
1214
"check",
1315
["versions"],

0 commit comments

Comments
 (0)