chore(deps-dev): bump esbuild from 0.15.1 to 0.15.3
Bumps esbuild from 0.15.1 to 0.15.3.
Release notes
Sourced from esbuild's releases.
v0.15.3
Change the Yarn PnP manifest to a singleton (#2463)
Previously esbuild searched for the Yarn PnP manifest in the parent directories of each file. But with Yarn's
enableGlobalCachesetting it's possible to configure Yarn PnP's implementation to reach outside of the directory subtree containing the Yarn PnP manifest. This was causing esbuild to fail to bundle projects with theenableGlobalCachesetting enabled.To handle this case, esbuild will now only search for the Yarn PnP manifest in the current working directory of the esbuild process. If you're using esbuild's CLI, this means you will now have to
cdinto the appropriate directory first. If you're using esbuild's API, you can override esbuild's value for the current working directory with theabsWorkingDirAPI option.Fix Yarn PnP resolution failures due to backslashes in paths on Windows (#2462)
Previously dependencies of a Yarn PnP virtual dependency failed to resolve on Windows. This was because Windows uses
\instead of/as a path separator, and the path manipulation algorithms used for Yarn PnP expected/. This release converts\into/in Windows paths, which fixes this issue.Fix
sideEffectspatterns containing slashes on Windows (#2465)The
sideEffectsfield inpackage.jsonlets you specify an array of patterns to mark which files have side effects (which causes all other files to be considered to not have side effects by exclusion). That looks like this:"sideEffects": [ "**/index.js", "**/index.prod.js" ]However, the presence of the
/character in the pattern meant that the pattern failed to match Windows-style paths, which brokesideEffectson Windows in this case. This release fixes this problem by adding additional code to handle Windows-style paths.v0.15.2
Fix Yarn PnP issue with packages containing
index.js(#2455, #2461)Yarn PnP's tests require the resolved paths to end in
/. That's not how the rest of esbuild's internals work, however, and doing this messed up esbuild's node module path resolution regarding automatically-detectedindex.jsfiles. Previously packages that relied on implicitindex.jsresolution rules didn't work with esbuild under Yarn PnP. Removing this slash has fixed esbuild's path resolution behavior regardingindex.js, which should now the same both with and without Yarn PnP.Fix Yarn PnP support for
extendsintsconfig.json(#2456)Previously using
extendsintsconfig.jsonwith a path in a Yarn PnP package didn't work. This is because the process of setting up package path resolution rules requires parsingtsconfig.jsonfiles (due to thebaseUrlandpathsfeatures) and resolvingextendsto a package path requires package path resolution rules to already be set up, which is a circular dependency. This cycle is broken by using special rules forextendsintsconfig.jsonthat bypasses esbuild's normal package path resolution process. This is why usingextendswith a Yarn PnP package didn't automatically work. With this release, these special rules have been modified to check for a Yarn PnP manifest so this case should work now.Fix Yarn PnP support in
esbuild-wasm(#2458)When running esbuild via WebAssembly, Yarn PnP support previously failed because Go's file system internals return
EINVALwhen trying to read a.zipfile as a directory when run with WebAssembly. This was unexpected because Go's file system internals returnENOTDIRfor this case on native. This release updates esbuild to treatEINVALlikeENOTDIRin this case, which fixes usingesbuild-wasmto bundle a Yarn PnP project.Note that to be able to use
esbuild-wasmfor Yarn PnP successfully, you currently have to run it usingnodeinstead ofyarn node. This is because the file system shim that Yarn overwrites node's native file system API with currently generates invalid file descriptors with negative values when inside a.zipfile. This prevents esbuild from working correctly because Go's file system internals don't expect syscalls that succeed without an error to return an invalid file descriptor. Yarn is working on fixing their use of invalid file descriptors.
Changelog
Sourced from esbuild's changelog.
0.15.3
Change the Yarn PnP manifest to a singleton (#2463)
Previously esbuild searched for the Yarn PnP manifest in the parent directories of each file. But with Yarn's
enableGlobalCachesetting it's possible to configure Yarn PnP's implementation to reach outside of the directory subtree containing the Yarn PnP manifest. This was causing esbuild to fail to bundle projects with theenableGlobalCachesetting enabled.To handle this case, esbuild will now only search for the Yarn PnP manifest in the current working directory of the esbuild process. If you're using esbuild's CLI, this means you will now have to
cdinto the appropriate directory first. If you're using esbuild's API, you can override esbuild's value for the current working directory with theabsWorkingDirAPI option.Fix Yarn PnP resolution failures due to backslashes in paths on Windows (#2462)
Previously dependencies of a Yarn PnP virtual dependency failed to resolve on Windows. This was because Windows uses
\instead of/as a path separator, and the path manipulation algorithms used for Yarn PnP expected/. This release converts\into/in Windows paths, which fixes this issue.Fix
sideEffectspatterns containing slashes on Windows (#2465)The
sideEffectsfield inpackage.jsonlets you specify an array of patterns to mark which files have side effects (which causes all other files to be considered to not have side effects by exclusion). That looks like this:"sideEffects": [ "**/index.js", "**/index.prod.js" ]However, the presence of the
/character in the pattern meant that the pattern failed to match Windows-style paths, which brokesideEffectson Windows in this case. This release fixes this problem by adding additional code to handle Windows-style paths.0.15.2
Fix Yarn PnP issue with packages containing
index.js(#2455, #2461)Yarn PnP's tests require the resolved paths to end in
/. That's not how the rest of esbuild's internals work, however, and doing this messed up esbuild's node module path resolution regarding automatically-detectedindex.jsfiles. Previously packages that relied on implicitindex.jsresolution rules didn't work with esbuild under Yarn PnP. Removing this slash has fixed esbuild's path resolution behavior regardingindex.js, which should now the same both with and without Yarn PnP.Fix Yarn PnP support for
extendsintsconfig.json(#2456)Previously using
extendsintsconfig.jsonwith a path in a Yarn PnP package didn't work. This is because the process of setting up package path resolution rules requires parsingtsconfig.jsonfiles (due to thebaseUrlandpathsfeatures) and resolvingextendsto a package path requires package path resolution rules to already be set up, which is a circular dependency. This cycle is broken by using special rules forextendsintsconfig.jsonthat bypasses esbuild's normal package path resolution process. This is why usingextendswith a Yarn PnP package didn't automatically work. With this release, these special rules have been modified to check for a Yarn PnP manifest so this case should work now.Fix Yarn PnP support in
esbuild-wasm(#2458)When running esbuild via WebAssembly, Yarn PnP support previously failed because Go's file system internals return
EINVALwhen trying to read a.zipfile as a directory when run with WebAssembly. This was unexpected because Go's file system internals returnENOTDIRfor this case on native. This release updates esbuild to treatEINVALlikeENOTDIRin this case, which fixes usingesbuild-wasmto bundle a Yarn PnP project.Note that to be able to use
esbuild-wasmfor Yarn PnP successfully, you currently have to run it usingnodeinstead ofyarn node. This is because the file system shim that Yarn overwrites node's native file system API with currently generates invalid file descriptors with negative values when inside a.zipfile. This prevents esbuild from working correctly because Go's file system internals don't expect syscalls that succeed without an error to return an invalid file descriptor. Yarn is working on fixing their use of invalid file descriptors.
Commits
eeb2509publish 0.15.3 to npm8a71011pnp: remove unuseddependencyTreeRootsdata44a7a61fix #2463: change yarn pnp manifest to a singleton6fd8736fix #2465: handle windows paths andsideEffects9f0699funit tests: run using both windows and unix paths1f7273cfix #2462: convert\to/in windows pathse6fa739publish 0.15.2 to npm9b40267fix #2455: strip/to fixindex.jsedge case4e68c27fix #2456:extendsintsconfig.jsonwith pnp201c1f6release notes for the previous commit (#2458)- Additional commits viewable in compare view
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 rebasewill rebase this PR@dependabot recreatewill recreate this PR, overwriting any edits that have been made to it@dependabot mergewill merge this PR after your CI passes on it@dependabot squash and mergewill squash and merge this PR after your CI passes on it@dependabot cancel mergewill cancel a previously requested merge and block automerging@dependabot reopenwill reopen this PR if it is closed@dependabot closewill close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually@dependabot ignore this major versionwill 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 versionwill 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 dependencywill close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)