sinon
sinon copied to clipboard
Try to use newer mochify packages
Purpose (TL;DR) - mandatory
Fix the failure where bundling with mochify fails today:
❯ npm run test-headless
> [email protected] test-headless
> mochify --no-detect-globals --recursive -R dot --grep WebWorker --invert "test/**/*-test.js"
Error: Can't walk dependency graph: ENOENT: no such file or directory, lstat '/Users/carlerik/dev/sinon/timers'
required by /Users/carlerik/dev/fake-timers/src/fake-timers-src.js
New and removed dependencies detected. Learn more about Socket for GitHub ↗︎
| Package | New capabilities | Transitives | Size | Publisher |
|---|---|---|---|---|
| npm/@mochify/[email protected] | Transitive: environment, filesystem, network, shell | +51 |
3.63 MB | mantoni |
| npm/@mochify/[email protected] | Transitive: environment, filesystem, network, shell, unsafe | +152 |
55.5 MB | mantoni |
| npm/@mochify/[email protected] | Transitive: environment, eval, filesystem, network, shell | +177 |
30.4 MB | mantoni |
| npm/@sinonjs/[email protected] | Transitive: environment, eval | +23 |
1.95 MB | mantoni |
| npm/[email protected] | filesystem | 0 |
5.85 kB | abraha2d |
| npm/[email protected] | None | +24 |
241 MB | esbuild, evanw |
| npm/[email protected] | None | 0 |
4.54 kB | sindresorhus |
| npm/[email protected] | Transitive: environment, eval | +4 |
7 MB | fatso83 |
🚮 Removed packages: npm/[email protected]
👍 Dependency issues cleared. Learn more about Socket for GitHub ↗︎
This PR previously contained dependency changes with security issues that have been resolved, removed, or ignored.
This is failing differently here than locally:
Error: R] Could not resolve "./test"
<stdin>:1:8:
1 │ require('./test');
╵ ~~~~~~~~
1 error
Locally I am getting this:
✘ [ERROR] Could not resolve "timers"
test.js:2:23:
2 │ timersModule = require("timers");
╵ ~~~~~~~~
The package "timers" wasn't found on the file system but is built into node. Are you trying to
bundle for node? You can use "--platform=node" to do that, which will remove this error.
✘ [ERROR] Could not resolve "timers/promises"
test.js:7:23:
7 │ timersModule = require("timers/promises");
╵ ~~~~~~~~~~~~~~~~~
The package "timers/promises" wasn't found on the file system but is built into node. Are you
trying to bundle for node? You can use "--platform=node" to do that, which will remove this error.
I can try to extract the build bits later. This works for now!