Skip to content

Try to use newer mochify packages#2609

Merged
fatso83 merged 4 commits intomainfrom
upgrade-mochify
Sep 10, 2024
Merged

Try to use newer mochify packages#2609
fatso83 merged 4 commits intomainfrom
upgrade-mochify

Conversation

@fatso83
Copy link
Copy Markdown
Contributor

@fatso83 fatso83 commented Aug 26, 2024

Purpose (TL;DR) - mandatory

Fix the failure where bundling with mochify fails today:

❯ npm run test-headless

> sinon@18.0.0 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 fatso83 marked this pull request as draft August 26, 2024 13:23
@socket-security
Copy link
Copy Markdown

socket-security bot commented Aug 26, 2024

@socket-security
Copy link
Copy Markdown

socket-security bot commented Aug 26, 2024

👍 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↗︎

@fatso83
Copy link
Copy Markdown
Contributor Author

fatso83 commented Aug 26, 2024

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 fatso83 marked this pull request as ready for review September 10, 2024 20:56
@fatso83
Copy link
Copy Markdown
Contributor Author

fatso83 commented Sep 10, 2024

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

@fatso83 fatso83 merged commit 9715798 into main Sep 10, 2024
@fatso83 fatso83 deleted the upgrade-mochify branch September 10, 2024 21:17
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