Closed dependabot[bot] closed 2 months ago
@dependabot rebase
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?
Also being discussed on hacker news today
https://borischerny.com/javascript,/typescript/2024/06/19/ES-Modules-Are-A-Mess.html
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.
Yeah I think the risk is limited. I'd like investigate this and hopefully send a PR. Will create an issue to track this.
Thought it might be easy, but seems at least not trivial - experiment at https://github.com/getgauge/gauge-js/pull/667
Feel free to butcher that branch at will :-)
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.
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 :-)
We'll do this within #667 since it's coupled.
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.
Bumps chai from 4.4.1 to 5.1.1.
Release notes
Sourced from chai's releases.
... (truncated)
Commits
37263c0
fix: support some virtual contexts intoThrow
(#1609)91e58ed
Correct Mocha import instructions (#1611)61159d1
build(deps-dev): bump ip from 1.1.8 to 1.1.9 (#1608)8475d2a
Set up ESLint for JSDoc comments (#1605)936c0ca
5.1.02cf92f5
Fix publish script (#1602)1ba37b5
Set support in same members (#1583)f224339
Assert interface fix (#1601)d504573
Implementiterable
assertion (#1592)640d932
Convert comments in "legal comments" format to jsdoc (#1598)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