From 1c1516b7c199364be9070eecfabe8ba81ae9da62 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 5 Sep 2022 23:49:50 +0000 Subject: [PATCH] chore(deps): update dependency esbuild to ^0.15.0 (#1848) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [esbuild](https://togithub.com/evanw/esbuild) | [`^0.14.38` -> `^0.15.0`](https://renovatebot.com/diffs/npm/esbuild/0.14.54/0.15.7) | [![age](https://badges.renovateapi.com/packages/npm/esbuild/0.15.7/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/npm/esbuild/0.15.7/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/npm/esbuild/0.15.7/compatibility-slim/0.14.54)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/npm/esbuild/0.15.7/confidence-slim/0.14.54)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
evanw/esbuild ### [`v0.15.7`](https://togithub.com/evanw/esbuild/blob/HEAD/CHANGELOG.md#​0157) [Compare Source](https://togithub.com/evanw/esbuild/compare/v0.15.6...v0.15.7) - Add `--watch=forever` to allow esbuild to never terminate ([#​1511](https://togithub.com/evanw/esbuild/issues/1511), [#​1885](https://togithub.com/evanw/esbuild/issues/1885)) Currently using esbuild's watch mode via `--watch` from the CLI will stop watching if stdin is closed. The rationale is that stdin is automatically closed by the OS when the parent process exits, so stopping watch mode when stdin is closed ensures that esbuild's watch mode doesn't keep running forever after the parent process has been closed. For example, it would be bad if you wrote a shell script that did `esbuild --watch &` to run esbuild's watch mode in the background, and every time you run the script it creates a new `esbuild` process that runs forever. However, there are cases when it makes sense for esbuild's watch mode to never exit. One such case is within a short-lived VM where the lifetime of all processes inside the VM is expected to be the lifetime of the VM. Previously you could easily do this by piping the output of a long-lived command into esbuild's stdin such as `sleep 999999999 | esbuild --watch &`. However, this possibility often doesn't occur to people, and it also doesn't work on Windows. People also sometimes attempt to keep esbuild open by piping an infinite stream of data to esbuild such as with `esbuild --watch /` where `` is an integer must be treated as if they were `n` times the `..` operator instead (the `` path segment is ignored). So `/path/to/project/__virtual__/xyz/2/foo.js` maps to the underlying file `/path/to/project/../../foo.js`. This scheme makes it possible for Yarn to get node (and esbuild) to load the same file multiple times (which is sometimes required for correctness) without actually duplicating the file on the file system. However, old versions of Yarn used to use `$$virtual` instead of `__virtual__`. This was changed because `$$virtual` was error-prone due to the use of the `$` character, which can cause bugs when it's not correctly escaped within regular expressions. Now that esbuild makes `$$virtual` an alias for `__virtual__`, esbuild should now work with manifests from these old Yarn versions. - Ignore PnP manifests in virtual directories The specification describes the algorithm for how to find the Plug'n'Play manifest when starting from a certain point in the file system: search through all parent directories in reverse order until the manifest is found. However, this interacts poorly with virtual paths since it can end up finding a virtual copy of the manifest instead of the original. To avoid this, esbuild now ignores manifests in virtual directories so that the search for the manifest will continue and find the original manifest in another parent directory later on. These fixes mean that esbuild's implementation of Plug'n'Play now matches Yarn's implementation more closely, and esbuild can now correctly build more projects that use Plug'n'Play. ### [`v0.15.0`](https://togithub.com/evanw/esbuild/blob/HEAD/CHANGELOG.md#​0150) [Compare Source](https://togithub.com/evanw/esbuild/compare/v0.14.54...v0.15.0) **This release contains backwards-incompatible changes.** Since esbuild is before version 1.0.0, these changes have been released as a new minor version to reflect this (as [recommended by npm](https://docs.npmjs.com/cli/v6/using-npm/semver/)). You should either be pinning the exact version of `esbuild` in your `package.json` file or be using a version range syntax that only accepts patch upgrades such as `~0.14.0`. See the documentation about [semver](https://docs.npmjs.com/cli/v6/using-npm/semver/) for more information. - Implement the Yarn Plug'n'Play module resolution algorithm ([#​154](https://togithub.com/evanw/esbuild/issues/154), [#​237](https://togithub.com/evanw/esbuild/issues/237), [#​1263](https://togithub.com/evanw/esbuild/issues/1263), [#​2451](https://togithub.com/evanw/esbuild/pull/2451)) [Node](https://nodejs.org/) comes with a package manager called [npm](https://www.npmjs.com/), which installs packages into a `node_modules` folder. Node and esbuild both come with built-in rules for resolving import paths to packages within `node_modules`, so packages installed via npm work automatically without any configuration. However, many people use an alternative package manager called [Yarn](https://yarnpkg.com/). While Yarn can install packages using `node_modules`, it also offers a different package installation strategy called [Plug'n'Play](https://yarnpkg.com/features/pnp/), which is often shortened to "PnP" (not to be confused with [pnpm](https://pnpm.io/), which is an entirely different unrelated package manager). Plug'n'Play installs packages as `.zip` files on your file system. The packages are never actually unzipped. Since Node doesn't know anything about Yarn's package installation strategy, this means you can no longer run your code with Node as it won't be able to find your packages. Instead, you need to run your code with Yarn, which applies patches to Node's file system APIs before running your code. These patches attempt to make zip files seem like normal directories. When running under Yarn, using Node's file system API to read `./some.zip/lib/file.js` actually automatically extracts `lib/file.js` from `./some.zip` at run-time as if it was a normal file. Other file system APIs behave similarly. However, these patches don't work with esbuild because esbuild is not written in JavaScript; it's a native binary executable that interacts with the file system directly through the operating system. Previously the workaround for using esbuild with Plug'n'Play was to use the [`@yarnpkg/esbuild-plugin-pnp`](https://www.npmjs.com/package/@​yarnpkg/esbuild-plugin-pnp) plugin with esbuild's JavaScript API. However, this wasn't great because the plugin needed to potentially intercept every single import path and file load to check whether it was a Plug'n'Play package, which has an unusually high performance cost. It also meant that certain subtleties of path resolution rules within a `.zip` file could differ slightly from the way esbuild normally works since path resolution inside `.zip` files was implemented by Yarn, not by esbuild (which is due to a limitation of esbuild's plugin API). With this release, esbuild now contains an independent implementation of Yarn's Plug'n'Play algorithm (which is used when esbuild finds a `.pnp.js`, `.pnp.cjs`, or `.pnp.data.json` file in the directory tree). Creating additional implementations of this algorithm recently became possible because Yarn's package manifest format was recently documented: https://yarnpkg.com/advanced/pnp-spec/. This should mean that you can now use esbuild to bundle Plug'n'Play projects without any additional configuration (so you shouldn't need `@yarnpkg/esbuild-plugin-pnp` anymore). Bundling these projects should now happen much faster as Yarn no longer even needs to be run at all. Bundling the Yarn codebase itself with esbuild before and after this change seems to demonstrate over a 10x speedup (3.4s to 0.24s). And path resolution rules within Yarn packages should now be consistent with how esbuild handles regular Node packages. For example, fields such as `module` and `browser` in `package.json` files within `.zip` files should now be respected. Keep in mind that this is brand new code and there may be some initial issues to work through before esbuild's implementation is solid. Yarn's Plug'n'Play specification is also brand new and may need some follow-up edits to guide new implementations to match Yarn's exact behavior. If you try this out, make sure to test it before committing to using it, and let me know if anything isn't working as expected. Should you need to debug esbuild's path resolution, you may find `--log-level=verbose` helpful.
--- ### Configuration 📅 **Schedule**: Branch creation - "after 10pm every weekday,before 5am every weekday,every weekend" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about these updates again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/vercel/turborepo). --- benchmark/package.json | 2 +- cli/package.json | 2 +- pnpm-lock.yaml | 59 +++++++++++++++++++++--------------------- 3 files changed, 31 insertions(+), 32 deletions(-) diff --git a/benchmark/package.json b/benchmark/package.json index df347857017b3..9a9266042ebef 100644 --- a/benchmark/package.json +++ b/benchmark/package.json @@ -2,7 +2,7 @@ "name": "benchmark", "version": "1.0.0", "dependencies": { - "esbuild": "^0.14.38", + "esbuild": "^0.15.0", "esbuild-register": "^3.3.2", "fs-extra": "^10.0.0", "ndjson": "^2.0.0" diff --git a/cli/package.json b/cli/package.json index c99ae659db0cd..2553110e67678 100644 --- a/cli/package.json +++ b/cli/package.json @@ -13,7 +13,7 @@ }, "devDependencies": { "copy-template-dir": "^1.4.0", - "esbuild": "^0.14.38", + "esbuild": "^0.15.0", "esbuild-register": "^3.3.2", "execa": "^5.0.0", "faker": "^5.1.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index f543dd7ed83a5..e6e077d4ecf75 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -17,13 +17,13 @@ importers: benchmark: specifiers: '@types/node': ^16.11.49 - esbuild: ^0.14.38 + esbuild: ^0.15.0 esbuild-register: ^3.3.2 fs-extra: ^10.0.0 ndjson: ^2.0.0 dependencies: - esbuild: 0.14.49 - esbuild-register: 3.3.3_esbuild@0.14.49 + esbuild: 0.15.6 + esbuild-register: 3.3.3_esbuild@0.15.6 fs-extra: 10.1.0 ndjson: 2.0.0 devDependencies: @@ -32,7 +32,7 @@ importers: cli: specifiers: copy-template-dir: ^1.4.0 - esbuild: ^0.14.38 + esbuild: ^0.15.0 esbuild-register: ^3.3.2 execa: ^5.0.0 faker: ^5.1.0 @@ -43,8 +43,8 @@ importers: uvu: ^0.5.3 devDependencies: copy-template-dir: 1.4.0 - esbuild: 0.14.49 - esbuild-register: 3.3.3_esbuild@0.14.49 + esbuild: 0.15.6 + esbuild-register: 3.3.3_esbuild@0.15.6 execa: 5.1.1 faker: 5.5.3 fs-extra: 9.1.0 @@ -631,7 +631,6 @@ packages: cpu: [loong64] os: [linux] requiresBuild: true - dev: true optional: true /@eslint/eslintrc/0.4.3: @@ -2803,6 +2802,7 @@ packages: cpu: [x64] os: [android] requiresBuild: true + dev: true optional: true /esbuild-android-64/0.15.6: @@ -2811,7 +2811,6 @@ packages: cpu: [x64] os: [android] requiresBuild: true - dev: true optional: true /esbuild-android-arm64/0.14.49: @@ -2820,6 +2819,7 @@ packages: cpu: [arm64] os: [android] requiresBuild: true + dev: true optional: true /esbuild-android-arm64/0.15.6: @@ -2828,7 +2828,6 @@ packages: cpu: [arm64] os: [android] requiresBuild: true - dev: true optional: true /esbuild-darwin-64/0.14.49: @@ -2837,6 +2836,7 @@ packages: cpu: [x64] os: [darwin] requiresBuild: true + dev: true optional: true /esbuild-darwin-64/0.15.6: @@ -2845,7 +2845,6 @@ packages: cpu: [x64] os: [darwin] requiresBuild: true - dev: true optional: true /esbuild-darwin-arm64/0.14.49: @@ -2854,6 +2853,7 @@ packages: cpu: [arm64] os: [darwin] requiresBuild: true + dev: true optional: true /esbuild-darwin-arm64/0.15.6: @@ -2862,7 +2862,6 @@ packages: cpu: [arm64] os: [darwin] requiresBuild: true - dev: true optional: true /esbuild-freebsd-64/0.14.49: @@ -2871,6 +2870,7 @@ packages: cpu: [x64] os: [freebsd] requiresBuild: true + dev: true optional: true /esbuild-freebsd-64/0.15.6: @@ -2879,7 +2879,6 @@ packages: cpu: [x64] os: [freebsd] requiresBuild: true - dev: true optional: true /esbuild-freebsd-arm64/0.14.49: @@ -2888,6 +2887,7 @@ packages: cpu: [arm64] os: [freebsd] requiresBuild: true + dev: true optional: true /esbuild-freebsd-arm64/0.15.6: @@ -2896,7 +2896,6 @@ packages: cpu: [arm64] os: [freebsd] requiresBuild: true - dev: true optional: true /esbuild-linux-32/0.14.49: @@ -2905,6 +2904,7 @@ packages: cpu: [ia32] os: [linux] requiresBuild: true + dev: true optional: true /esbuild-linux-32/0.15.6: @@ -2913,7 +2913,6 @@ packages: cpu: [ia32] os: [linux] requiresBuild: true - dev: true optional: true /esbuild-linux-64/0.14.49: @@ -2922,6 +2921,7 @@ packages: cpu: [x64] os: [linux] requiresBuild: true + dev: true optional: true /esbuild-linux-64/0.15.6: @@ -2930,7 +2930,6 @@ packages: cpu: [x64] os: [linux] requiresBuild: true - dev: true optional: true /esbuild-linux-arm/0.14.49: @@ -2939,6 +2938,7 @@ packages: cpu: [arm] os: [linux] requiresBuild: true + dev: true optional: true /esbuild-linux-arm/0.15.6: @@ -2947,7 +2947,6 @@ packages: cpu: [arm] os: [linux] requiresBuild: true - dev: true optional: true /esbuild-linux-arm64/0.14.49: @@ -2956,6 +2955,7 @@ packages: cpu: [arm64] os: [linux] requiresBuild: true + dev: true optional: true /esbuild-linux-arm64/0.15.6: @@ -2964,7 +2964,6 @@ packages: cpu: [arm64] os: [linux] requiresBuild: true - dev: true optional: true /esbuild-linux-mips64le/0.14.49: @@ -2973,6 +2972,7 @@ packages: cpu: [mips64el] os: [linux] requiresBuild: true + dev: true optional: true /esbuild-linux-mips64le/0.15.6: @@ -2981,7 +2981,6 @@ packages: cpu: [mips64el] os: [linux] requiresBuild: true - dev: true optional: true /esbuild-linux-ppc64le/0.14.49: @@ -2990,6 +2989,7 @@ packages: cpu: [ppc64] os: [linux] requiresBuild: true + dev: true optional: true /esbuild-linux-ppc64le/0.15.6: @@ -2998,7 +2998,6 @@ packages: cpu: [ppc64] os: [linux] requiresBuild: true - dev: true optional: true /esbuild-linux-riscv64/0.14.49: @@ -3007,6 +3006,7 @@ packages: cpu: [riscv64] os: [linux] requiresBuild: true + dev: true optional: true /esbuild-linux-riscv64/0.15.6: @@ -3015,7 +3015,6 @@ packages: cpu: [riscv64] os: [linux] requiresBuild: true - dev: true optional: true /esbuild-linux-s390x/0.14.49: @@ -3024,6 +3023,7 @@ packages: cpu: [s390x] os: [linux] requiresBuild: true + dev: true optional: true /esbuild-linux-s390x/0.15.6: @@ -3032,7 +3032,6 @@ packages: cpu: [s390x] os: [linux] requiresBuild: true - dev: true optional: true /esbuild-netbsd-64/0.14.49: @@ -3041,6 +3040,7 @@ packages: cpu: [x64] os: [netbsd] requiresBuild: true + dev: true optional: true /esbuild-netbsd-64/0.15.6: @@ -3049,7 +3049,6 @@ packages: cpu: [x64] os: [netbsd] requiresBuild: true - dev: true optional: true /esbuild-openbsd-64/0.14.49: @@ -3058,6 +3057,7 @@ packages: cpu: [x64] os: [openbsd] requiresBuild: true + dev: true optional: true /esbuild-openbsd-64/0.15.6: @@ -3066,15 +3066,14 @@ packages: cpu: [x64] os: [openbsd] requiresBuild: true - dev: true optional: true - /esbuild-register/3.3.3_esbuild@0.14.49: + /esbuild-register/3.3.3_esbuild@0.15.6: resolution: {integrity: sha512-eFHOkutgIMJY5gc8LUp/7c+LLlDqzNi9T6AwCZ2WKKl3HmT+5ef3ZRyPPxDOynInML0fgaC50yszPKfPnjC0NQ==} peerDependencies: esbuild: '>=0.12 <1' dependencies: - esbuild: 0.14.49 + esbuild: 0.15.6 /esbuild-sunos-64/0.14.49: resolution: {integrity: sha512-4c8Zowp+V3zIWje329BeLbGh6XI9c/rqARNaj5yPHdC61pHI9UNdDxT3rePPJeWcEZVKjkiAS6AP6kiITp7FSw==} @@ -3082,6 +3081,7 @@ packages: cpu: [x64] os: [sunos] requiresBuild: true + dev: true optional: true /esbuild-sunos-64/0.15.6: @@ -3090,7 +3090,6 @@ packages: cpu: [x64] os: [sunos] requiresBuild: true - dev: true optional: true /esbuild-windows-32/0.14.49: @@ -3099,6 +3098,7 @@ packages: cpu: [ia32] os: [win32] requiresBuild: true + dev: true optional: true /esbuild-windows-32/0.15.6: @@ -3107,7 +3107,6 @@ packages: cpu: [ia32] os: [win32] requiresBuild: true - dev: true optional: true /esbuild-windows-64/0.14.49: @@ -3116,6 +3115,7 @@ packages: cpu: [x64] os: [win32] requiresBuild: true + dev: true optional: true /esbuild-windows-64/0.15.6: @@ -3124,7 +3124,6 @@ packages: cpu: [x64] os: [win32] requiresBuild: true - dev: true optional: true /esbuild-windows-arm64/0.14.49: @@ -3133,6 +3132,7 @@ packages: cpu: [arm64] os: [win32] requiresBuild: true + dev: true optional: true /esbuild-windows-arm64/0.15.6: @@ -3141,7 +3141,6 @@ packages: cpu: [arm64] os: [win32] requiresBuild: true - dev: true optional: true /esbuild/0.14.49: @@ -3170,6 +3169,7 @@ packages: esbuild-windows-32: 0.14.49 esbuild-windows-64: 0.14.49 esbuild-windows-arm64: 0.14.49 + dev: true /esbuild/0.15.6: resolution: {integrity: sha512-sgLOv3l4xklvXzzczhRwKRotyrfyZ2i1fCS6PTOLPd9wevDPArGU8HFtHrHCOcsMwTjLjzGm15gvC8uxVzQf+w==} @@ -3198,7 +3198,6 @@ packages: esbuild-windows-32: 0.15.6 esbuild-windows-64: 0.15.6 esbuild-windows-arm64: 0.15.6 - dev: true /escalade/3.1.1: resolution: {integrity: sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==}