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

Bump chai from 4.4.1 to 5.1.1 #655

Closed
wants to merge 1 commit into from

Conversation

dependabot[bot]
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github May 13, 2024

Bumps chai from 4.4.1 to 5.1.1.

Release notes

Sourced from chai's releases.

v5.1.1

What's Changed

New Contributors

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

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.

... (truncated)

Commits

Dependabot compatibility score

You can trigger a rebase of this PR 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)

Note
Automatic rebases have been disabled on this pull request as it has been open for over 30 days.

@dependabot dependabot bot added dependencies Pull requests that update a dependency file javascript Pull requests that update Javascript code labels May 13, 2024
@chadlwilson chadlwilson marked this pull request as draft May 13, 2024 03:10
@zabil
Copy link
Member

zabil commented Jun 14, 2024

@dependabot rebase

Bumps [chai](https://github.com/chaijs/chai) from 4.4.1 to 5.1.1.
- [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.1)

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

Signed-off-by: dependabot[bot] <[email protected]>
@dependabot dependabot bot force-pushed the dependabot/npm_and_yarn/chai-5.1.1 branch from 129b7ce to d142ce7 Compare June 14, 2024 16:38
@zabil
Copy link
Member

zabil commented Jun 20, 2024

This is stuck because the latest version of chai switched to ES modules, and now I'm getting an error.

Exception during run: Error [ERR_REQUIRE_ESM]: require() of ES Module /Users/zabilcm/projects/gauge-js/node_modules/chai/chai.js from /Users/zabilcm/projects/gauge-js/test/custom-message-registry-test.js not supported.
Instead change the require of chai.js in /Users/zabilcm/projects/gauge-js/test/custom-message-registry-test.js to a dynamic import() which is available in all CommonJS modules.
    at Object.<anonymous> (/Users/zabilcm/projects/gauge-js/test/custom-message-registry-test.js:1:14)
    at async formattedImport (/Users/zabilcm/projects/gauge-js/node_modules/mocha/lib/nodejs/esm-utils.js:9:14)
    at async exports.requireOrImport (/Users/zabilcm/projects/gauge-js/node_modules/mocha/lib/nodejs/esm-utils.js:42:28)
    at async exports.loadFilesAsync (/Users/zabilcm/projects/gauge-js/node_modules/mocha/lib/nodejs/esm-utils.js:100:20)
    at async singleRun (/Users/zabilcm/projects/gauge-js/node_modules/mocha/lib/cli/run-helpers.js:125:3)
    at async exports.handler (/Users/zabilcm/projects/gauge-js/node_modules/mocha/lib/cli/run.js:370:5) {
  code: 'ERR_REQUIRE_ESM'

The best way to handle this, since other dependencies might do the same, is to change gauge js to an ES module and increase the major version number. This will make sure the dependencies can be updated without getting stuck.

What do you think?

@zabil
Copy link
Member

zabil commented Jun 20, 2024

Also being discussed on hacker news today

https://borischerny.com/javascript,/typescript/2024/06/19/ES-Modules-Are-A-Mess.html

@chadlwilson
Copy link
Contributor

Yeah, this has been an ongoing debate for years now, and almost a joke at this point when trying to wade through babel, webpack, typescript, corejs configurations etc and make all this stuff actually work (if you have any older versions of anything).

I'm not sure I have a sufficiently well educated opinion yet on what should happen for gauge-js itself but definitely seems like moving to an ES module make sense and probably has limited risk given the way gauge-js is used? (likely with Node only, on dev machines, as a top level dependency in a package.json)

Given I moved Node 16 to minimum back in Jan we should be relatively clean to move anyway.

@zabil
Copy link
Member

zabil commented Jun 20, 2024

Yeah I think the risk is limited. I'd like investigate this and hopefully send a PR. Will create an issue to track this.

@chadlwilson
Copy link
Contributor

Thought it might be easy, but seems at least not trivial - experiment at #667

@chadlwilson
Copy link
Contributor

chadlwilson commented Jun 20, 2024

Feel free to butcher that branch at will :-)

@zabil
Copy link
Member

zabil commented Jun 20, 2024

I think it's because of this line

 ].concat(module.paths.filter((p) => p.indexOf(".gauge") < 0));

module.exports module.paths no longer available in es modules.

@chadlwilson
Copy link
Contributor

Yup, it is - that's just as far as I got up to before trying to figure out what that is doing and the consequences for those using the plugin, and thus gave up for now :-)

@chadlwilson
Copy link
Contributor

We'll do this within #667 since it's coupled.

Copy link
Contributor Author

dependabot bot commented on behalf of github Jun 21, 2024

OK, I won't notify you again about this release, but will get in touch when a new version is available. If you'd rather skip all updates until the next major or minor version, let me know by commenting @dependabot ignore this major version or @dependabot ignore this minor version. You can also ignore all major, minor, or patch releases for a dependency by adding an ignore condition with the desired update_types to your config file.

If you change your mind, just re-open this PR and I'll resolve any conflicts on it.

@dependabot dependabot bot deleted the dependabot/npm_and_yarn/chai-5.1.1 branch June 21, 2024 03:13
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
Development

Successfully merging this pull request may close these issues.

2 participants