From 65abaf8502bb2e005fe2fc9f1040e80f7fda1deb Mon Sep 17 00:00:00 2001 From: RARcodes Date: Sun, 7 Jun 2026 22:07:31 +0200 Subject: [PATCH] Fix npm test running 0 tests; add CI workflow The zap test runner loads CoffeeScript test files only when it can require('coffee-script/register'). Since b856cb8 the devDependency is the renamed 'coffeescript' package, so on a fresh npm install zap finds no compiler, silently falls back to *.test.js, and reports 'All of 0 tests passed'. Install coffeescript under its legacy 'coffee-script' name via an npm alias so zap resolves it again. The coffee/cake binaries are unchanged. All 99 tests now run and pass. Also add a GitHub Actions workflow running the suite on Node 18-24 so a silent regression like this gets caught. --- .github/workflows/ci.yml | 21 +++++++++++++++++++++ package-lock.json | 6 ++++-- package.json | 2 +- 3 files changed, 26 insertions(+), 3 deletions(-) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 00000000..e67eb98b --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,21 @@ +name: CI + +on: + push: + branches: [master] + pull_request: + +jobs: + test: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + node-version: [18.x, 20.x, 22.x, 24.x] + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: ${{ matrix.node-version }} + - run: npm ci + - run: npm test diff --git a/package-lock.json b/package-lock.json index 748c6f58..7b8b1709 100644 --- a/package-lock.json +++ b/package-lock.json @@ -13,7 +13,7 @@ "xmlbuilder": "~11.0.0" }, "devDependencies": { - "coffeescript": ">=1.10.0 <2", + "coffee-script": "npm:coffeescript@>=1.10.0 <2", "coveralls": "^3.0.1", "diff": ">=1.0.8", "docco": ">=0.6.2", @@ -320,11 +320,13 @@ "wrap-ansi": "^5.1.0" } }, - "node_modules/coffeescript": { + "node_modules/coffee-script": { + "name": "coffeescript", "version": "1.12.7", "resolved": "https://registry.npmjs.org/coffeescript/-/coffeescript-1.12.7.tgz", "integrity": "sha512-pLXHFxQMPklVoEekowk8b3erNynC+DVJzChxS/LCBBgR6/8AJkHivkm//zbowcfc7BTCAjryuhx6gPqPRfsFoA==", "dev": true, + "license": "MIT", "bin": { "cake": "bin/cake", "coffee": "bin/coffee" diff --git a/package.json b/package.json index d241d68b..16ef7841 100644 --- a/package.json +++ b/package.json @@ -79,7 +79,7 @@ "xmlbuilder": "~11.0.0" }, "devDependencies": { - "coffeescript": ">=1.10.0 <2", + "coffee-script": "npm:coffeescript@>=1.10.0 <2", "coveralls": "^3.0.1", "diff": ">=1.0.8", "docco": ">=0.6.2",