ci: smoke test the build output on Node.js 18 - #174
Open
shaurya703 wants to merge 1 commit into
Open
Conversation
Closes tinylibs#57 engines.node is ">=18" but the CI matrix starts at 20, so the oldest supported version was never exercised. tinylibs#109 tried adding 18 to the existing matrix and stalled: tsdown, vitest and even node:test are unusable on 18.x, and downgrading the dev stack to reach it was not worth it. This takes the approach settled on in that thread instead — a standalone file using node:assert with no test runner, checking the happy path of the built bundle: - x(): stdout, stderr, argument forwarding, async iteration, exit codes, throwOnError, and env - xSync(): stdout, exit code, throwOnError - exec/execSync alias identity The job deliberately skips `npm ci`. The smoke test imports dist/ and node builtins and nothing else, so the dev dependencies that made 18.x unworkable are never installed. It runs on 18.0.0 and 18.x across ubuntu and windows, against the same dist/ artifact the other jobs consume. vitest only collects src/**/*_test.ts, so the file is excluded from the unit run without further configuration. Verified against a real v18.0.0: 10/10 pass. The suite is not vacuous — stubbing the exitCode getter in dist/ turns 3 of the 10 red and exits 1. On the current toolchain, vitest still reports 51 passed and lint, publint and format:check stay clean.
43081j
approved these changes
Sep 14, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #57
engines.nodeis">=18"but the CI matrix starts at 20, so the oldest supported version was never exercised. #109 tried adding 18 to the existing matrix and stalled: tsdown, vitest and evennode:testare unusable on 18.x, and downgrading the dev stack to reach it was not worth it.This takes the approach settled on in that thread instead:
test/smoke.mjschecks the happy path of the built bundle:x()— stdout, stderr, argument forwarding, async iteration, exit codes,throwOnError, and envxSync()— stdout, exit code,throwOnErrorexec/execSyncalias identityWhy this one works where #109 didn't
The job deliberately skips
npm ci. The smoke test importsdist/and node builtins and nothing else, so the dev dependencies that made 18.x unworkable are never installed. It runs on18.0.0and18.xacross ubuntu and windows, against the samedist/artifact the other jobs already consume.process.execPathis used for every child command, so the same file runs unmodified on Windows.vitest only collects
src/**/*_test.ts, so the file is excluded from the unit run without any extra configuration.Verification
Run against a real v18.0.0 (not just
18.x): 10/10 pass.The suite isn't vacuous — stubbing the
exitCodegetter indist/turns 3 of the 10 red and exits 1.On the current toolchain, vitest still reports 51 passed, and
lint,publintandformat:checkstay clean.