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 esbuild from 0.14.26 to 0.14.27 #12461

Merged
merged 3 commits into from Mar 15, 2022

Conversation

dependabot[bot]
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Mar 15, 2022

Bumps esbuild from 0.14.26 to 0.14.27.

Release notes

Sourced from esbuild's releases.

v0.14.27

  • Avoid generating an enumerable default import for CommonJS files in Babel mode (#2097)

    Importing a CommonJS module into an ES module can be done in two different ways. In node mode the default import is always set to module.exports, while in Babel mode the default import passes through to module.exports.default instead. Node mode is triggered when the importing file ends in .mjs, has type: "module" in its package.json file, or the imported module does not have a __esModule marker.

    Previously esbuild always created the forwarding default import in Babel mode, even if module.exports had no property called default. This was problematic because the getter named default still showed up as a property on the imported namespace object, and could potentially interfere with code that iterated over the properties of the imported namespace object. With this release the getter named default will now only be added in Babel mode if the default property exists at the time of the import.

  • Fix a circular import edge case regarding ESM-to-CommonJS conversion (#1894, #2059)

    This fixes a regression that was introduced in version 0.14.5 of esbuild. Ever since that version, esbuild now creates two separate export objects when you convert an ES module file into a CommonJS module: one for ES modules and one for CommonJS modules. The one for CommonJS modules is written to module.exports and exported from the file, and the one for ES modules is internal and can be accessed by bundling code that imports the entry point (for example, the entry point might import itself to be able to inspect its own exports).

    The reason for these two separate export objects is that CommonJS modules are supposed to see a special export called __esModule which indicates that the module used to be an ES module, while ES modules are not supposed to see any automatically-added export named __esModule. This matters for real-world code both because people sometimes iterate over the properties of ES module export namespace objects and because some people write ES module code containing their own exports named __esModule that they expect other ES module code to be able to read.

    However, this change to split exports into two separate objects broke ES module re-exports in the edge case where the imported module is involved in an import cycle. This happened because the CommonJS module.exports object was no longer mutated as exports were added. Instead it was being initialized at the end of the generated file after the import statements to other modules (which are converted into require() calls). This release changes module.exports initialization to happen earlier in the file and then double-writes further exports to both the ES module and CommonJS module export objects.

    This fix was contributed by @​indutny.

Changelog

Sourced from esbuild's changelog.

0.14.27

  • Avoid generating an enumerable default import for CommonJS files in Babel mode (#2097)

    Importing a CommonJS module into an ES module can be done in two different ways. In node mode the default import is always set to module.exports, while in Babel mode the default import passes through to module.exports.default instead. Node mode is triggered when the importing file ends in .mjs, has type: "module" in its package.json file, or the imported module does not have a __esModule marker.

    Previously esbuild always created the forwarding default import in Babel mode, even if module.exports had no property called default. This was problematic because the getter named default still showed up as a property on the imported namespace object, and could potentially interfere with code that iterated over the properties of the imported namespace object. With this release the getter named default will now only be added in Babel mode if the default property exists at the time of the import.

  • Fix a circular import edge case regarding ESM-to-CommonJS conversion (#1894, #2059)

    This fixes a regression that was introduced in version 0.14.5 of esbuild. Ever since that version, esbuild now creates two separate export objects when you convert an ES module file into a CommonJS module: one for ES modules and one for CommonJS modules. The one for CommonJS modules is written to module.exports and exported from the file, and the one for ES modules is internal and can be accessed by bundling code that imports the entry point (for example, the entry point might import itself to be able to inspect its own exports).

    The reason for these two separate export objects is that CommonJS modules are supposed to see a special export called __esModule which indicates that the module used to be an ES module, while ES modules are not supposed to see any automatically-added export named __esModule. This matters for real-world code both because people sometimes iterate over the properties of ES module export namespace objects and because some people write ES module code containing their own exports named __esModule that they expect other ES module code to be able to read.

    However, this change to split exports into two separate objects broke ES module re-exports in the edge case where the imported module is involved in an import cycle. This happened because the CommonJS module.exports object was no longer mutated as exports were added. Instead it was being initialized at the end of the generated file after the import statements to other modules (which are converted into require() calls). This release changes module.exports initialization to happen earlier in the file and then double-writes further exports to both the ES module and CommonJS module export objects.

    This fix was contributed by @​indutny.

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 will merge this PR once CI passes on it, as requested by @fisker.


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)

@dependabot dependabot bot added javascript Pull requests that update Javascript code scope:dependency Issues that cannot be solved inside Prettier itself, and must be fixed in a dependency labels Mar 15, 2022
Bumps [esbuild](https://github.com/evanw/esbuild) from 0.14.26 to 0.14.27.
- [Release notes](https://github.com/evanw/esbuild/releases)
- [Changelog](https://github.com/evanw/esbuild/blob/master/CHANGELOG.md)
- [Commits](evanw/esbuild@v0.14.26...v0.14.27)

---
updated-dependencies:
- dependency-name: esbuild
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot bot force-pushed the dependabot/npm_and_yarn/esbuild-0.14.27 branch from 59896cd to 1355da3 Compare March 15, 2022 04:44
@fisker fisker self-assigned this Mar 15, 2022
@github-actions
Copy link

github-actions bot commented Mar 15, 2022

Size Change: -4.68 kB (0%)

Total Size: 17.7 MB

Filename Size Change
./dist/cli.js 420 kB -490 B (0%)
./dist/doc.js 68.3 kB -550 B (-1%)
./dist/esm/parser-angular.mjs 58.8 kB -103 B (0%)
./dist/esm/parser-babel.mjs 304 kB -103 B (0%)
./dist/esm/parser-espree.mjs 154 kB -103 B (0%)
./dist/esm/parser-flow.mjs 2.07 MB -118 B (0%)
./dist/esm/parser-html.mjs 162 kB -126 B (0%)
./dist/esm/parser-markdown.mjs 169 kB -126 B (0%)
./dist/esm/parser-meriyah.mjs 161 kB -103 B (0%)
./dist/esm/parser-postcss.mjs 191 kB -103 B (0%)
./dist/esm/parser-typescript.mjs 3.51 MB -111 B (0%)
./dist/esm/parser-yaml.mjs 129 kB -103 B (0%)
./dist/esm/standalone.mjs 441 kB -229 B (0%)
./dist/index.js 1.5 MB -980 B (0%)
./dist/parser-angular.js 59.2 kB -103 B (0%)
./dist/parser-babel.js 305 kB -103 B (0%)
./dist/parser-espree.js 154 kB -103 B (0%)
./dist/parser-flow.js 2.07 MB -118 B (0%)
./dist/parser-html.js 162 kB -126 B (0%)
./dist/parser-markdown.js 170 kB -126 B (0%)
./dist/parser-meriyah.js 161 kB -103 B (0%)
./dist/parser-postcss.js 192 kB -103 B (0%)
./dist/parser-typescript.js 3.51 MB -111 B (0%)
./dist/parser-yaml.js 130 kB -103 B (0%)
./dist/standalone.js 441 kB -229 B (0%)
ℹ️ View Unchanged
Filename Size
./dist/bin-prettier.js 1.98 kB
./dist/esm 4.1 kB
./dist/esm/parser-glimmer.mjs 192 kB
./dist/esm/parser-graphql.mjs 42.8 kB
./dist/LICENSE 281 kB
./dist/package.json 616 B
./dist/parser-glimmer.js 192 kB
./dist/parser-graphql.js 43.2 kB
./dist/README.md 4.13 kB
./dist/third-party.js 303 kB

compressed-size-action

@fisker
Copy link
Sponsor Member

fisker commented Mar 15, 2022

This version breaks next branch, I'm not sure why main branch is not affected. Maybe we should wait for evanw/esbuild#2103 to be fixed.

@fisker
Copy link
Sponsor Member

fisker commented Mar 15, 2022

This didn't fail because evanw/esbuild#2103 only effect esm version of outdent.

@fisker
Copy link
Sponsor Member

fisker commented Mar 15, 2022

@dependabot squash and merge

@dependabot dependabot bot merged commit b26a245 into main Mar 15, 2022
@dependabot dependabot bot deleted the dependabot/npm_and_yarn/esbuild-0.14.27 branch March 15, 2022 14:45
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 16, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
javascript Pull requests that update Javascript code scope:dependency Issues that cannot be solved inside Prettier itself, and must be fixed in a dependency
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant