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

chore(deps): bump execa from 5.1.1 to 6.0.0 #1815

Closed
wants to merge 2 commits into from

Conversation

dependabot[bot]
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Nov 18, 2021

Bumps execa from 5.1.1 to 6.0.0.

Release notes

Sourced from execa's releases.

v6.0.0

Breaking

  • Require Node.js 12.20 (#478) 7707880
  • This package is now pure ESM. Please read this.
  • Moved from a default export to named exports.
    • require('execa')import {execa} from 'execa'
    • require('execa').syncimport {execaSync} from 'execa'
    • require('execa').commandimport {execaCommand} from 'execa'
    • require('execa').commandSyncimport {execaCommandSync} from 'execa'
    • require('execa').nodeimport {execaNode} from 'execa'

sindresorhus/execa@v5.1.1...v6.0.0

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 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)

Bumps [execa](https://github.com/sindresorhus/execa) from 5.1.1 to 6.0.0.
- [Release notes](https://github.com/sindresorhus/execa/releases)
- [Commits](sindresorhus/execa@v5.1.1...v6.0.0)

---
updated-dependencies:
- dependency-name: execa
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot bot added the dependencies Pull requests that update a dependency file label Nov 18, 2021
@jjtang1985 jjtang1985 self-assigned this Nov 19, 2021
@jjtang1985
Copy link
Contributor

jjtang1985 commented Nov 19, 2021

@marikaner @FrankEssenberger @florian-richter

The tests failed due to the error shown at the end of the comment.

This is because execa switch to ESM, while jest does not support it officially. Here is the jest doc, where experimental support is mentioned.

Jest encountered an unexpected token

    Jest failed to parse a file. This happens e.g. when your code or its dependencies use non-standard JavaScript syntax, or when Jest is not configured to support such syntax.

    Out of the box Jest supports Babel, which will be used to transform your files into valid JS based on your Babel configuration.

    By default "node_modules" folder is ignored by transformers.

    Here's what you can do:
     • If you are trying to use ECMAScript Modules, see https://jestjs.io/docs/ecmascript-modules for how to enable it.
     • If you are trying to use TypeScript, see https://jestjs.io/docs/getting-started#using-typescript
     • To have some of your "node_modules" files transformed, you can specify a custom "transformIgnorePatterns" in your config.
     • If you need a custom transformation specify a "transform" option in your config.
     • If you simply want to mock your non-JS modules (e.g. binary assets) you can stub them out with the "moduleNameMapper" config option.

    You'll find more details and examples of these config options in the docs:
    https://jestjs.io/docs/configuration
    For information about custom transformations, see:
    https://jestjs.io/docs/code-transformation

    Details:

    /home/runner/work/cloud-sdk-js/cloud-sdk-js/packages/generator/node_modules/execa/index.js:1
({"Object.<anonymous>":function(module,exports,require,__dirname,__filename,jest){import {Buffer} from 'node:buffer';

    SyntaxError: Cannot use import statement outside a module

@jjtang1985
Copy link
Contributor

I created a test.ts file and executed it ts-node test.ts

import { execa } from 'execa';

async function main() {
  const ls = await execa('ls');
}

main();

Then I got:

Error [ERR_REQUIRE_ESM]: Must use import to load ES Module: .../node_modules/execa/index.js
require() of ES modules is not supported.
require() of .../node_modules/execa/index.js from /Users/d069641/Documents/GitHub/public/cloud-sdk-js/packages/generator/src/test.ts is an ES module file as it is a .js file whose nearest parent package.json contains "type": "module" which defines all .js files in that package scope as ES modules.
Instead rename index.js to end in .cjs, change the requiring code to use import(), or remove "type": "module" from .../node_modules/execa/package.json.

If I delete the "type": "module", I see the error, which is the same as the previous one with jest:

import {Buffer} from 'node:buffer';
^^^^^^

SyntaxError: Cannot use import statement outside a module

@jjtang1985
Copy link
Contributor

jjtang1985 commented Dec 7, 2021

Seems to be the same error as this PR and this reference about typescript 4.6

@jjtang1985
Copy link
Contributor

Close it for now.

@jjtang1985 jjtang1985 closed this Dec 7, 2021
@dependabot @github
Copy link
Contributor Author

dependabot bot commented on behalf of github Dec 7, 2021

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.

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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant