π¦ Update core devDependencies (patch) #33056
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
0.8.54
->0.8.55
8.2.6
->8.2.7
4.2.2
->4.2.3
How to resolve breaking changes
This PR may introduce breaking changes that require manual intervention. In such cases, you will need to check out this branch, fix the cause of the breakage, and commit the fix to ensure a green CI build. To check out and update this PR, follow the steps below:
Release Notes
evanw/esbuild
v0.8.55
Compare Source
Align more closely with node's
default
import behavior for CommonJS (#β532)Note: This could be considered a breaking change or a bug fix depending on your point of view.
Importing a CommonJS file into an ESM file does not behave the same everywhere. Historically people compiled their ESM code into CommonJS using Babel before ESM was supported natively. More recently, node has made it possible to use ESM syntax natively but to still import CommonJS files into ESM. These behave differently in many ways but one of the most unfortunate differences is how the
default
export is handled.When you import a normal CommonJS file, both Babel and node agree that the value of
module.exports
should be stored in the ESM import nameddefault
. However, if the CommonJS file used to be an ESM file but was compiled into a CommonJS file, Babel will set the ESM import nameddefault
to the value of the original ESM export nameddefault
while node will continue to set the ESM import nameddefault
to the value ofmodule.exports
. Babel detects if a CommonJS file used to be an ESM file by the presence of theexports.__esModule = true
marker.This is unfortunate because it means there is no general way to make code work with both ecosystems. With Babel the code
import * as someFile from './some-file'
can access the originaldefault
export withsomeFile.default
but with node you need to usesomeFile.default.default
instead. Previously esbuild followed Babel's approach but starting with this release, esbuild will now try to use a blend between the Babel and node approaches.This is the new behavior: importing a CommonJS file will set the
default
import tomodule.exports
in all cases except whenmodule.exports.__esModule && "default" in module.exports
, in which case it will fall through tomodule.exports.default
. In other words: in cases where the default import was previouslyundefined
for CommonJS files whenexports.__esModule === true
, the default import will now bemodule.exports
. This should hopefully keep Babel cross-compiled ESM code mostly working but at the same time now enable some node-oriented code to start working.If you are authoring a library using ESM but shipping it as CommonJS, the best way to avoid this mess is to just never use
default
exports in ESM. Only use named exports with names other thandefault
.Fix bug when ESM file has empty exports and is converted to CommonJS (#β910)
A file containing the contents
export {}
is still considered to be an ESM file even though it has no exports. However, if a file containing this edge case is converted to CommonJS internally during bundling (e.g. when it is the target ofrequire()
), esbuild failed to mark theexports
symbol from the CommonJS wrapping closure as used even though it is actually needed. This resulted in an output file that crashed when run. Theexports
symbol is now considered used in this case, so the bug has been fixed.Avoid introducing
this
for imported function callsIt is possible to import a function exported by a CommonJS file into an ESM file like this:
When you do this, esbuild currently transforms your code into something like this:
However, doing that changes the value of
this
observed by the exportfn
. The property accesscjs_file.fn
is in the syntactic "call target" position so the value ofthis
becomes the value ofcjs_file
. With this release, esbuild will now use a different syntax in this case to avoid passingcjs_file
asthis
:This change in esbuild mirrors a similar recent TypeScript compiler change, and also makes esbuild more consistent with Babel which already does this transformation.
postcss/postcss
v8.2.7
Compare Source
Renovate configuration
π Schedule: "after 12am every weekday" in timezone America/Los_Angeles.
π¦ Automerge: Disabled by config. Please merge this manually once you are satisfied.
β»οΈ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
π» Immortal: This PR will be recreated if closed unmerged. Get config help if that's undesired.
This PR has been generated by WhiteSource Renovate. View repository job log here.