Skip to content

lookup: update thread-sleep metadata - #1159

Open
reggi wants to merge 1 commit into
nodejs:mainfrom
reggi:fix/thread-sleep-metadata
Open

reggi wants to merge 1 commit into
nodejs:mainfrom
reggi:fix/thread-sleep-metadata

Conversation

@reggi

@reggi reggi commented Oct 2, 2026

Copy link
Copy Markdown

Summary

Remove the stale native-build metadata from the thread-sleep lookup entry.

Why this is needed

CITGM currently installs the fixture with:

npm install --build-from-source

--build-from-source historically forwarded configuration to native installers. npm 12 rejects unknown CLI configuration flags, so the command now fails with EUNKNOWNCONFIG before installation or tests begin.

Current thread-sleep@2.2.0 releases are implemented entirely in JavaScript. The selected source contains no binding.gyp, native dependency, binary configuration, or install script. It executes a child Node.js process and uses setTimeout to provide synchronous sleeping behavior.

The source-build override and native tag are therefore leftovers from thread-sleep's older native implementation. Replacing the CLI flag with an environment variable would preserve behavior that the current fixture no longer has. This change removes both stale fields and lets CITGM perform a normal install before running the existing timing tests.

The fixture remains marked flaky because its timing assertions can still vary under load. This change does not alter that independent disposition.

Addresses npm/cli#10023.

Validation

  • ./node_modules/.bin/eslint --cache
  • ./node_modules/.bin/prettier --check lib/lookup.json
  • ./node_modules/.bin/tap run test/test-lookup.js test/test-create-options.js
  • jq empty lib/lookup.json
  • git diff --check

Remove the stale native tag and build-from-source install argument. Current thread-sleep releases are implemented in JavaScript and no longer contain a native build.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 1896c431-0032-423c-afbe-3133ce92cec7
@codecov-commenter

codecov-commenter commented Oct 2, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 96.20%. Comparing base (8914dd0) to head (bd103c9).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1159   +/-   ##
=======================================
  Coverage   96.20%   96.20%           
=======================================
  Files          29       29           
  Lines        2213     2213           
=======================================
  Hits         2129     2129           
  Misses         84       84           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants