Skip to content

Commit

Permalink
Downgrade -> "query-string": "^7.1.3"
Browse files Browse the repository at this point in the history
  • Loading branch information
diemol committed Sep 6, 2023
1 parent 7dd67e6 commit a781410
Show file tree
Hide file tree
Showing 3 changed files with 57 additions and 55 deletions.
5 changes: 0 additions & 5 deletions jest.config.js
@@ -1,9 +1,4 @@
const esModules = [
// query-string and its dependencies
'query-string',
'decode-uri-component',
'split-on-first',
'filter-obj',
// got and dependencies
'got',
'p-cancelable',
Expand Down
105 changes: 56 additions & 49 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -44,7 +44,7 @@
"form-data": "^4.0.0",
"got": "^11.8.6",
"hash.js": "^1.1.7",
"query-string": "^8.1.0",
"query-string": "^7.1.3",
"tunnel": "^0.0.6",
"yargs": "^17.2.1"
},
Expand Down

2 comments on commit a781410

@redbugz
Copy link

Choose a reason for hiding this comment

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

I don't see a release with this fix yet, so we are still having problems

cat test/node_modules/saucelabs/package.json 
{
  "name": "saucelabs",
  "version": "7.3.1",
 ...
  "dependencies": {
    "@xhmikosr/downloader": "^13.0.1",
    "change-case": "^4.1.2",
    "form-data": "^4.0.0",
    "got": "^11.8.6",
    "hash.js": "^1.1.7",
    "query-string": "^8.1.0",
    "tunnel": "^0.0.6",
    "yargs": "^17.2.1"
  },
....

Which results in:

/Users/me/project/test/node_modules/saucelabs/build/index.js:13
var _queryString = _interopRequireDefault(require("query-string"));
                                          ^

Error [ERR_REQUIRE_ESM]: require() of ES Module /Users/me/project/test/node_modules/query-string/index.js from /Users/me/project/test/node_modules/saucelabs/build/index.js not supported.
Instead change the require of /Users/me/project/test/node_modules/query-string/index.js in /Users/me/project/test/node_modules/saucelabs/build/index.js to a dynamic import() which is available in all CommonJS modules.
    at Object.<anonymous> (/Users/me/project/test/node_modules/saucelabs/build/index.js:13:43)

@diemol
Copy link
Member Author

@diemol diemol commented on a781410 Oct 10, 2023

Choose a reason for hiding this comment

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

There is no release yet because the download package is also ESM, so the issue is still present.

Please sign in to comment.