Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build(deps-dev): bump chai from 4.4.1 to 5.1.0 in /web #15877

Merged
merged 2 commits into from Apr 8, 2024

Conversation

dependabot[bot]
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Apr 4, 2024

Bumps chai from 4.4.1 to 5.1.0.

Release notes

Sourced from chai's releases.

v5.1.0

What's Changed

New Contributors

Full Changelog: chaijs/chai@v5.0.3...v5.1.0

v5.0.3

Fix bad v5.0.2 publish.

Full Changelog: chaijs/chai@v5.0.2...v5.0.3

v5.0.2

What's Changed

Full Changelog: chaijs/chai@v5.0.1...v5.0.2

v5.0.0

BREAKING CHANGES

  • Chai now only supports EcmaScript Modules (ESM). This means your tests will need to either have import {...} from 'chai' or import('chai'). require('chai') will cause failures in nodejs. If you're using ESM and seeing failures, it may be due to a bundler or transpiler which is incorrectly converting import statements into require calls.
  • Dropped support for Internet Explorer.
  • Dropped support for NodeJS < 18.
  • Minimum supported browsers are now Firefox 100, Safari 14.1, Chrome 100, Edge 100. Support for browsers prior to these versions is "best effort" (bug reports on older browsers will be assessed individually and may be marked as wontfix).

What's Changed

... (truncated)

Commits

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

@dependabot dependabot bot added dependencies Pull requests that update a dependency file javascript Pull requests that update Javascript code labels Apr 4, 2024
@dependabot dependabot bot force-pushed the dependabot/npm_and_yarn/web/chai-5.1.0 branch 2 times, most recently from b6ec708 to 75b2e04 Compare April 4, 2024 19:49
@danielhjacobs
Copy link
Contributor

danielhjacobs commented Apr 4, 2024

Chai now only supports EcmaScript Modules (ESM). This means your tests will need to either have import {...} from 'chai' or import('chai'). require('chai') will cause failures in nodejs.

This PR will not be mergeable until all our tests are changed to use ESM.

@dependabot dependabot bot force-pushed the dependabot/npm_and_yarn/web/chai-5.1.0 branch from 75b2e04 to fc0c02c Compare April 4, 2024 20:07
@torokati44
Copy link
Member

torokati44 commented Apr 4, 2024

Huh, interesting that chai-html was able to updated.

@danielhjacobs
Copy link
Contributor

danielhjacobs commented Apr 4, 2024

Huh, interesting that chai-html was able to updated.

Was it? When was that? It's still on version 2.1.0, when the latest version is 3.0.0 according to https://www.npmjs.com/package/chai-html?activeTab=versions:

"chai-html": "^2.1.0",

@danielhjacobs
Copy link
Contributor

danielhjacobs commented Apr 4, 2024

@torokati44
Copy link
Member

Was it? When was that?

Okay it wasn't then. I just saw it listed in #15365, but not here, so I assumed it must have gotten done sometime... Sorry.

@torokati44
Copy link
Member

torokati44 commented Apr 4, 2024

Something like this? ☝️
EDIT: Not quite... 😅

@danielhjacobs
Copy link
Contributor

  1. Add to the self-hosted package.json this:

  1. Not as sure about this, but not sure you can mix and match import with require

@torokati44 torokati44 force-pushed the dependabot/npm_and_yarn/web/chai-5.1.0 branch 3 times, most recently from ad598fd to 0270916 Compare April 4, 2024 22:12
@danielhjacobs
Copy link
Contributor

danielhjacobs commented Apr 4, 2024

I think the next issue is the webpack config needs to be an export similar to this:

https://github.com/ruffle-rs/ruffle/blob/master/web/packages/extension/webpack.config.js#L71

@torokati44 torokati44 force-pushed the dependabot/npm_and_yarn/web/chai-5.1.0 branch from 0270916 to 3c75145 Compare April 4, 2024 22:23
@torokati44
Copy link
Member

Yes, just what I was looking for, thank you! 🙏

@danielhjacobs
Copy link
Contributor

danielhjacobs commented Apr 4, 2024

See path: path.resolve(__dirname, "dist"),

Compare to https://github.com/ruffle-rs/ruffle/blob/master/web/packages/extension/webpack.config.js#L90

For reference https://stackoverflow.com/questions/8817423/why-is-dirname-not-defined-in-node-repl

@torokati44 torokati44 force-pushed the dependabot/npm_and_yarn/web/chai-5.1.0 branch from 3c75145 to cf93537 Compare April 4, 2024 22:34
@danielhjacobs
Copy link
Contributor

danielhjacobs commented Apr 4, 2024

Damn, current error seems to be because the tests are full of __dirname references.

Edit: https://github.com/search?q=repo%3Aruffle-rs%2Fruffle+__dirname+path%3A%2F%5Eweb%5C%2Fpackages%5C%2Fselfhosted%5C%2F%2F+path%3A%2F%5Eweb%5C%2Fpackages%5C%2Fselfhosted%5C%2Ftest%5C%2Fpolyfill%5C%2F%2F&type=code

@torokati44
Copy link
Member

But how come it passes on Windows? 😱

@danielhjacobs
Copy link
Contributor

Windows hasn't run tests for a while.

@torokati44
Copy link
Member

Yeah, right... oh...

@danielhjacobs
Copy link
Contributor

Proof positive for progress though, 3 tests passed (the JS API tests don't use __dirname)

@torokati44
Copy link
Member

Oh, will this work for us?

Starting with Node.js 20.11 / 21.2, you can use import.meta.dirname

const __dirname = import.meta.dirname;

https://stackoverflow.com/a/50052194/635587

@danielhjacobs
Copy link
Contributor

Worth a shot. We no longer test Node 18 on CI, but we don't call it unsupported. This would make it unsupported, but just for tests I guess, so I feel like that's fine personally if no one disagrees.

@danielhjacobs
Copy link
Contributor

Looks like you need to run npm run format

@torokati44 torokati44 force-pushed the dependabot/npm_and_yarn/web/chai-5.1.0 branch 2 times, most recently from 57671c5 to f470968 Compare April 4, 2024 23:06
@torokati44
Copy link
Member

It's gween!

@torokati44 torokati44 force-pushed the dependabot/npm_and_yarn/web/chai-5.1.0 branch 2 times, most recently from 3dca3e7 to 23b570e Compare April 8, 2024 15:15
@danielhjacobs danielhjacobs added the waiting-on-review Waiting on review from a Ruffle team member label Apr 8, 2024
Copy link
Contributor

@danielhjacobs danielhjacobs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving because all checks are green and I see nothing obviously wrong. I don't consider myself qualified to fully review changing all our tests to ESM (which as a note, is one thing done by this PR), so hoping for another review.

@torokati44 torokati44 force-pushed the dependabot/npm_and_yarn/web/chai-5.1.0 branch from 23b570e to 3f15d1e Compare April 8, 2024 20:29
Copy link
Contributor

@Dinnerbone Dinnerbone left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks totally fine to me. Thank you both!

dependabot bot and others added 2 commits April 8, 2024 23:19
Bumps [chai](https://github.com/chaijs/chai) from 4.4.1 to 5.1.0.
- [Release notes](https://github.com/chaijs/chai/releases)
- [Changelog](https://github.com/chaijs/chai/blob/main/History.md)
- [Commits](chaijs/chai@v4.4.1...v5.1.0)

---
updated-dependencies:
- dependency-name: chai
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
@torokati44 torokati44 force-pushed the dependabot/npm_and_yarn/web/chai-5.1.0 branch from 3f15d1e to 0d08c53 Compare April 8, 2024 21:19
@torokati44 torokati44 enabled auto-merge (rebase) April 8, 2024 21:20
@torokati44 torokati44 merged commit bffa2e8 into master Apr 8, 2024
15 checks passed
@dependabot dependabot bot deleted the dependabot/npm_and_yarn/web/chai-5.1.0 branch April 8, 2024 21:26
@Lord-McSweeney Lord-McSweeney removed the waiting-on-review Waiting on review from a Ruffle team member label Apr 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file javascript Pull requests that update Javascript code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants