sinon icon indicating copy to clipboard operation
sinon copied to clipboard

Try to use newer mochify packages

Open fatso83 opened this issue 1 year ago • 3 comments

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

fatso83 avatar Aug 26 '24 13:08 fatso83

👍 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.

View full report↗︎

socket-security[bot] avatar Aug 26 '24 13:08 socket-security[bot]

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.

fatso83 avatar Aug 26 '24 13:08 fatso83

I can try to extract the build bits later. This works for now!

fatso83 avatar Sep 10 '24 21:09 fatso83