diff --git a/CHANGELOG.md b/CHANGELOG.md index c0f625a0860..376a0bc22e8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,14 +1,16 @@ # Changelog -## Unreleased +## 0.22.0 -* Omit packages from bundle by default when targeting node ([#1874](https://github.com/evanw/esbuild/issues/1874), [#2830](https://github.com/evanw/esbuild/issues/2830), [#2846](https://github.com/evanw/esbuild/issues/2846), [#2915](https://github.com/evanw/esbuild/issues/2915), [#3145](https://github.com/evanw/esbuild/issues/3145), [#3294](https://github.com/evanw/esbuild/issues/3294), [#3323](https://github.com/evanw/esbuild/issues/3323), [#3582](https://github.com/evanw/esbuild/issues/3582), [#3809](https://github.com/evanw/esbuild/issues/3809), [#3815](https://github.com/evanw/esbuild/issues/3815)) +**This release deliberately contains backwards-incompatible changes.** To avoid automatically picking up releases like this, you should either be pinning the exact version of `esbuild` in your `package.json` file (recommended) or be using a version range syntax that only accepts patch upgrades such as `^0.21.0` or `~0.21.0`. See npm's documentation about [semver](https://docs.npmjs.com/cli/v6/using-npm/semver/) for more information. + +* Omit packages from bundles by default when targeting node ([#1874](https://github.com/evanw/esbuild/issues/1874), [#2830](https://github.com/evanw/esbuild/issues/2830), [#2846](https://github.com/evanw/esbuild/issues/2846), [#2915](https://github.com/evanw/esbuild/issues/2915), [#3145](https://github.com/evanw/esbuild/issues/3145), [#3294](https://github.com/evanw/esbuild/issues/3294), [#3323](https://github.com/evanw/esbuild/issues/3323), [#3582](https://github.com/evanw/esbuild/issues/3582), [#3809](https://github.com/evanw/esbuild/issues/3809), [#3815](https://github.com/evanw/esbuild/issues/3815)) This breaking change is an experiment. People are commonly confused when using esbuild to bundle code for node (i.e. for `--platform=node`) because some packages may not be intended for bundlers, and may use node-specific features that don't work with a bundler. Even though esbuild's "getting started" instructions say to use `--packages=external` to work around this problem, many people don't read the documentation and don't do this, and are then confused when it doesn't work. So arguably this is a bad default behavior for esbuild to have if people keep tripping over this. - With this release, esbuild will now omit packages from the bundle by default when the platform is `node` (i.e. the previous behavior of `--packages=external` is now the default in this case). If you don't want this behavior, you can do `--packages=bundle` to allow packages to be included in the bundle (i.e. the previous default behavior). Note that `--packages=bundle` doesn't mean all packages are bundled, just that packages are allowed to be bundled. You can still exclude individual packages from the bundle using `--external:` even when `--packages=bundle` is present. + With this release, esbuild will now omit packages from the bundle by default when the platform is `node` (i.e. the previous behavior of `--packages=external` is now the default in this case). _Note that your dependencies must now be present on the file system when your bundle is run._ If you don't want this behavior, you can do `--packages=bundle` to allow packages to be included in the bundle (i.e. the previous default behavior). Note that `--packages=bundle` doesn't mean all packages are bundled, just that packages are allowed to be bundled. You can still exclude individual packages from the bundle using `--external:` even when `--packages=bundle` is present. - The `--packages=` setting considers all import paths that "look like" package imports in the original source code to be packages. Specifically packages that don't start with a path segment of `/` or `.` or `..` are considered to be package imports. The only two exceptions to this rule are [subpath imports](https://nodejs.org/api/packages.html#subpath-imports) (which start with a `#` character) and TypeScript path remappings via `path` and/or `baseUrl` in `tsconfig.json` (which are applied first). + The `--packages=` setting considers all import paths that "look like" package imports in the original source code to be package imports. Specifically import paths that don't start with a path segment of `/` or `.` or `..` are considered to be package imports. The only two exceptions to this rule are [subpath imports](https://nodejs.org/api/packages.html#subpath-imports) (which start with a `#` character) and TypeScript path remappings via `paths` and/or `baseUrl` in `tsconfig.json` (which are applied first). * Drop support for older platforms ([#3802](https://github.com/evanw/esbuild/issues/3802)) diff --git a/cmd/esbuild/version.go b/cmd/esbuild/version.go index 27ad7fa06ed..4abcc3f7f19 100644 --- a/cmd/esbuild/version.go +++ b/cmd/esbuild/version.go @@ -1,3 +1,3 @@ package main -const esbuildVersion = "0.21.5" +const esbuildVersion = "0.22.0" diff --git a/npm/@esbuild/aix-ppc64/package.json b/npm/@esbuild/aix-ppc64/package.json index 3f75fadd25a..ed1243f7494 100644 --- a/npm/@esbuild/aix-ppc64/package.json +++ b/npm/@esbuild/aix-ppc64/package.json @@ -1,6 +1,6 @@ { "name": "@esbuild/aix-ppc64", - "version": "0.21.5", + "version": "0.22.0", "description": "The IBM AIX PowerPC 64-bit binary for esbuild, a JavaScript bundler.", "repository": { "type": "git", diff --git a/npm/@esbuild/android-arm/package.json b/npm/@esbuild/android-arm/package.json index edd9d1deedd..ff812dd531e 100644 --- a/npm/@esbuild/android-arm/package.json +++ b/npm/@esbuild/android-arm/package.json @@ -1,6 +1,6 @@ { "name": "@esbuild/android-arm", - "version": "0.21.5", + "version": "0.22.0", "description": "A WebAssembly shim for esbuild on Android ARM.", "repository": { "type": "git", diff --git a/npm/@esbuild/android-arm64/package.json b/npm/@esbuild/android-arm64/package.json index 818261ffa68..909943f8440 100644 --- a/npm/@esbuild/android-arm64/package.json +++ b/npm/@esbuild/android-arm64/package.json @@ -1,6 +1,6 @@ { "name": "@esbuild/android-arm64", - "version": "0.21.5", + "version": "0.22.0", "description": "The Android ARM 64-bit binary for esbuild, a JavaScript bundler.", "repository": { "type": "git", diff --git a/npm/@esbuild/android-x64/package.json b/npm/@esbuild/android-x64/package.json index 7fedce18175..2b6ca98d3f0 100644 --- a/npm/@esbuild/android-x64/package.json +++ b/npm/@esbuild/android-x64/package.json @@ -1,6 +1,6 @@ { "name": "@esbuild/android-x64", - "version": "0.21.5", + "version": "0.22.0", "description": "A WebAssembly shim for esbuild on Android x64.", "repository": "https://github.com/evanw/esbuild", "license": "MIT", diff --git a/npm/@esbuild/darwin-arm64/package.json b/npm/@esbuild/darwin-arm64/package.json index a247eed1d7e..13419ed7e40 100644 --- a/npm/@esbuild/darwin-arm64/package.json +++ b/npm/@esbuild/darwin-arm64/package.json @@ -1,6 +1,6 @@ { "name": "@esbuild/darwin-arm64", - "version": "0.21.5", + "version": "0.22.0", "description": "The macOS ARM 64-bit binary for esbuild, a JavaScript bundler.", "repository": { "type": "git", diff --git a/npm/@esbuild/darwin-x64/package.json b/npm/@esbuild/darwin-x64/package.json index f4bc23ff4e6..909c8ae1230 100644 --- a/npm/@esbuild/darwin-x64/package.json +++ b/npm/@esbuild/darwin-x64/package.json @@ -1,6 +1,6 @@ { "name": "@esbuild/darwin-x64", - "version": "0.21.5", + "version": "0.22.0", "description": "The macOS 64-bit binary for esbuild, a JavaScript bundler.", "repository": { "type": "git", diff --git a/npm/@esbuild/freebsd-arm64/package.json b/npm/@esbuild/freebsd-arm64/package.json index 90b9e496753..29d58c68bb1 100644 --- a/npm/@esbuild/freebsd-arm64/package.json +++ b/npm/@esbuild/freebsd-arm64/package.json @@ -1,6 +1,6 @@ { "name": "@esbuild/freebsd-arm64", - "version": "0.21.5", + "version": "0.22.0", "description": "The FreeBSD ARM 64-bit binary for esbuild, a JavaScript bundler.", "repository": { "type": "git", diff --git a/npm/@esbuild/freebsd-x64/package.json b/npm/@esbuild/freebsd-x64/package.json index b2433322e41..0a7292ad42b 100644 --- a/npm/@esbuild/freebsd-x64/package.json +++ b/npm/@esbuild/freebsd-x64/package.json @@ -1,6 +1,6 @@ { "name": "@esbuild/freebsd-x64", - "version": "0.21.5", + "version": "0.22.0", "description": "The FreeBSD 64-bit binary for esbuild, a JavaScript bundler.", "repository": { "type": "git", diff --git a/npm/@esbuild/linux-arm/package.json b/npm/@esbuild/linux-arm/package.json index e1862b9143c..808e7f71d1e 100644 --- a/npm/@esbuild/linux-arm/package.json +++ b/npm/@esbuild/linux-arm/package.json @@ -1,6 +1,6 @@ { "name": "@esbuild/linux-arm", - "version": "0.21.5", + "version": "0.22.0", "description": "The Linux ARM binary for esbuild, a JavaScript bundler.", "repository": { "type": "git", diff --git a/npm/@esbuild/linux-arm64/package.json b/npm/@esbuild/linux-arm64/package.json index dc8dcce3365..985ad2f5f0d 100644 --- a/npm/@esbuild/linux-arm64/package.json +++ b/npm/@esbuild/linux-arm64/package.json @@ -1,6 +1,6 @@ { "name": "@esbuild/linux-arm64", - "version": "0.21.5", + "version": "0.22.0", "description": "The Linux ARM 64-bit binary for esbuild, a JavaScript bundler.", "repository": { "type": "git", diff --git a/npm/@esbuild/linux-ia32/package.json b/npm/@esbuild/linux-ia32/package.json index 5d68183c712..280e7df36d8 100644 --- a/npm/@esbuild/linux-ia32/package.json +++ b/npm/@esbuild/linux-ia32/package.json @@ -1,6 +1,6 @@ { "name": "@esbuild/linux-ia32", - "version": "0.21.5", + "version": "0.22.0", "description": "The Linux 32-bit binary for esbuild, a JavaScript bundler.", "repository": { "type": "git", diff --git a/npm/@esbuild/linux-loong64/package.json b/npm/@esbuild/linux-loong64/package.json index c5b32d399c4..105360420b8 100644 --- a/npm/@esbuild/linux-loong64/package.json +++ b/npm/@esbuild/linux-loong64/package.json @@ -1,6 +1,6 @@ { "name": "@esbuild/linux-loong64", - "version": "0.21.5", + "version": "0.22.0", "description": "The Linux LoongArch 64-bit binary for esbuild, a JavaScript bundler.", "repository": { "type": "git", diff --git a/npm/@esbuild/linux-mips64el/package.json b/npm/@esbuild/linux-mips64el/package.json index 1712e282ce6..80e90587ded 100644 --- a/npm/@esbuild/linux-mips64el/package.json +++ b/npm/@esbuild/linux-mips64el/package.json @@ -1,6 +1,6 @@ { "name": "@esbuild/linux-mips64el", - "version": "0.21.5", + "version": "0.22.0", "description": "The Linux MIPS 64-bit Little Endian binary for esbuild, a JavaScript bundler.", "repository": { "type": "git", diff --git a/npm/@esbuild/linux-ppc64/package.json b/npm/@esbuild/linux-ppc64/package.json index ff87687bedf..a84a1968edb 100644 --- a/npm/@esbuild/linux-ppc64/package.json +++ b/npm/@esbuild/linux-ppc64/package.json @@ -1,6 +1,6 @@ { "name": "@esbuild/linux-ppc64", - "version": "0.21.5", + "version": "0.22.0", "description": "The Linux PowerPC 64-bit Little Endian binary for esbuild, a JavaScript bundler.", "repository": { "type": "git", diff --git a/npm/@esbuild/linux-riscv64/package.json b/npm/@esbuild/linux-riscv64/package.json index 1dff58e876b..aa46ab4df93 100644 --- a/npm/@esbuild/linux-riscv64/package.json +++ b/npm/@esbuild/linux-riscv64/package.json @@ -1,6 +1,6 @@ { "name": "@esbuild/linux-riscv64", - "version": "0.21.5", + "version": "0.22.0", "description": "The Linux RISC-V 64-bit binary for esbuild, a JavaScript bundler.", "repository": { "type": "git", diff --git a/npm/@esbuild/linux-s390x/package.json b/npm/@esbuild/linux-s390x/package.json index 8e5065d9527..7036ea43975 100644 --- a/npm/@esbuild/linux-s390x/package.json +++ b/npm/@esbuild/linux-s390x/package.json @@ -1,6 +1,6 @@ { "name": "@esbuild/linux-s390x", - "version": "0.21.5", + "version": "0.22.0", "description": "The Linux IBM Z 64-bit Big Endian binary for esbuild, a JavaScript bundler.", "repository": { "type": "git", diff --git a/npm/@esbuild/linux-x64/package.json b/npm/@esbuild/linux-x64/package.json index ac25c6702c5..4dd0a9e0a32 100644 --- a/npm/@esbuild/linux-x64/package.json +++ b/npm/@esbuild/linux-x64/package.json @@ -1,6 +1,6 @@ { "name": "@esbuild/linux-x64", - "version": "0.21.5", + "version": "0.22.0", "description": "The Linux 64-bit binary for esbuild, a JavaScript bundler.", "repository": { "type": "git", diff --git a/npm/@esbuild/netbsd-x64/package.json b/npm/@esbuild/netbsd-x64/package.json index 34be89c8e3d..f78f7771a68 100644 --- a/npm/@esbuild/netbsd-x64/package.json +++ b/npm/@esbuild/netbsd-x64/package.json @@ -1,6 +1,6 @@ { "name": "@esbuild/netbsd-x64", - "version": "0.21.5", + "version": "0.22.0", "description": "The NetBSD AMD64 binary for esbuild, a JavaScript bundler.", "repository": { "type": "git", diff --git a/npm/@esbuild/openbsd-arm64/package.json b/npm/@esbuild/openbsd-arm64/package.json index 2799bdb5a34..2bdc7df273e 100644 --- a/npm/@esbuild/openbsd-arm64/package.json +++ b/npm/@esbuild/openbsd-arm64/package.json @@ -1,20 +1,20 @@ { - "name": "@esbuild/openbsd-arm64", - "version": "0.20.2", - "description": "The OpenBSD ARM 64-bit binary for esbuild, a JavaScript bundler.", - "repository": { - "type": "git", - "url": "git+https://github.com/evanw/esbuild.git" - }, - "license": "MIT", - "preferUnplugged": true, - "engines": { - "node": ">=18" - }, - "os": [ - "openbsd" - ], - "cpu": [ - "arm64" - ] + "name": "@esbuild/openbsd-arm64", + "version": "0.22.0", + "description": "The OpenBSD ARM 64-bit binary for esbuild, a JavaScript bundler.", + "repository": { + "type": "git", + "url": "git+https://github.com/evanw/esbuild.git" + }, + "license": "MIT", + "preferUnplugged": true, + "engines": { + "node": ">=18" + }, + "os": [ + "openbsd" + ], + "cpu": [ + "arm64" + ] } diff --git a/npm/@esbuild/openbsd-x64/package.json b/npm/@esbuild/openbsd-x64/package.json index 3458728a012..531b932a650 100644 --- a/npm/@esbuild/openbsd-x64/package.json +++ b/npm/@esbuild/openbsd-x64/package.json @@ -1,6 +1,6 @@ { "name": "@esbuild/openbsd-x64", - "version": "0.21.5", + "version": "0.22.0", "description": "The OpenBSD 64-bit binary for esbuild, a JavaScript bundler.", "repository": { "type": "git", diff --git a/npm/@esbuild/sunos-x64/package.json b/npm/@esbuild/sunos-x64/package.json index 7f9e535d933..1bd5d30dd46 100644 --- a/npm/@esbuild/sunos-x64/package.json +++ b/npm/@esbuild/sunos-x64/package.json @@ -1,6 +1,6 @@ { "name": "@esbuild/sunos-x64", - "version": "0.21.5", + "version": "0.22.0", "description": "The illumos 64-bit binary for esbuild, a JavaScript bundler.", "repository": { "type": "git", diff --git a/npm/@esbuild/wasi-preview1/package.json b/npm/@esbuild/wasi-preview1/package.json index e82ec08ffb8..4ab09aa4006 100644 --- a/npm/@esbuild/wasi-preview1/package.json +++ b/npm/@esbuild/wasi-preview1/package.json @@ -1,6 +1,6 @@ { "name": "@esbuild/wasi-preview1", - "version": "0.21.5", + "version": "0.22.0", "description": "The WASI (WebAssembly System Interface) preview 1 binary for esbuild, a JavaScript bundler.", "repository": { "type": "git", diff --git a/npm/@esbuild/win32-arm64/package.json b/npm/@esbuild/win32-arm64/package.json index 6515c595ec6..3057547e652 100644 --- a/npm/@esbuild/win32-arm64/package.json +++ b/npm/@esbuild/win32-arm64/package.json @@ -1,6 +1,6 @@ { "name": "@esbuild/win32-arm64", - "version": "0.21.5", + "version": "0.22.0", "description": "The Windows ARM 64-bit binary for esbuild, a JavaScript bundler.", "repository": { "type": "git", diff --git a/npm/@esbuild/win32-ia32/package.json b/npm/@esbuild/win32-ia32/package.json index dbc5b1b8b02..9d2bcf7f874 100644 --- a/npm/@esbuild/win32-ia32/package.json +++ b/npm/@esbuild/win32-ia32/package.json @@ -1,6 +1,6 @@ { "name": "@esbuild/win32-ia32", - "version": "0.21.5", + "version": "0.22.0", "description": "The Windows 32-bit binary for esbuild, a JavaScript bundler.", "repository": { "type": "git", diff --git a/npm/@esbuild/win32-x64/package.json b/npm/@esbuild/win32-x64/package.json index f11545c107b..e1f0da268a4 100644 --- a/npm/@esbuild/win32-x64/package.json +++ b/npm/@esbuild/win32-x64/package.json @@ -1,6 +1,6 @@ { "name": "@esbuild/win32-x64", - "version": "0.21.5", + "version": "0.22.0", "description": "The Windows 64-bit binary for esbuild, a JavaScript bundler.", "repository": { "type": "git", diff --git a/npm/esbuild-wasm/package.json b/npm/esbuild-wasm/package.json index b3f767dedce..0f362041599 100644 --- a/npm/esbuild-wasm/package.json +++ b/npm/esbuild-wasm/package.json @@ -1,6 +1,6 @@ { "name": "esbuild-wasm", - "version": "0.21.5", + "version": "0.22.0", "description": "The cross-platform WebAssembly binary for esbuild, a JavaScript bundler.", "repository": { "type": "git", diff --git a/npm/esbuild/package.json b/npm/esbuild/package.json index 938142189f0..6fba5fd215b 100644 --- a/npm/esbuild/package.json +++ b/npm/esbuild/package.json @@ -1,6 +1,6 @@ { "name": "esbuild", - "version": "0.21.5", + "version": "0.22.0", "description": "An extremely fast JavaScript and CSS bundler and minifier.", "repository": { "type": "git", @@ -18,29 +18,30 @@ "esbuild": "bin/esbuild" }, "optionalDependencies": { - "@esbuild/aix-ppc64": "0.21.5", - "@esbuild/android-arm": "0.21.5", - "@esbuild/android-arm64": "0.21.5", - "@esbuild/android-x64": "0.21.5", - "@esbuild/darwin-arm64": "0.21.5", - "@esbuild/darwin-x64": "0.21.5", - "@esbuild/freebsd-arm64": "0.21.5", - "@esbuild/freebsd-x64": "0.21.5", - "@esbuild/linux-arm": "0.21.5", - "@esbuild/linux-arm64": "0.21.5", - "@esbuild/linux-ia32": "0.21.5", - "@esbuild/linux-loong64": "0.21.5", - "@esbuild/linux-mips64el": "0.21.5", - "@esbuild/linux-ppc64": "0.21.5", - "@esbuild/linux-riscv64": "0.21.5", - "@esbuild/linux-s390x": "0.21.5", - "@esbuild/linux-x64": "0.21.5", - "@esbuild/netbsd-x64": "0.21.5", - "@esbuild/openbsd-x64": "0.21.5", - "@esbuild/sunos-x64": "0.21.5", - "@esbuild/win32-arm64": "0.21.5", - "@esbuild/win32-ia32": "0.21.5", - "@esbuild/win32-x64": "0.21.5" + "@esbuild/aix-ppc64": "0.22.0", + "@esbuild/android-arm": "0.22.0", + "@esbuild/android-arm64": "0.22.0", + "@esbuild/android-x64": "0.22.0", + "@esbuild/darwin-arm64": "0.22.0", + "@esbuild/darwin-x64": "0.22.0", + "@esbuild/freebsd-arm64": "0.22.0", + "@esbuild/freebsd-x64": "0.22.0", + "@esbuild/linux-arm": "0.22.0", + "@esbuild/linux-arm64": "0.22.0", + "@esbuild/linux-ia32": "0.22.0", + "@esbuild/linux-loong64": "0.22.0", + "@esbuild/linux-mips64el": "0.22.0", + "@esbuild/linux-ppc64": "0.22.0", + "@esbuild/linux-riscv64": "0.22.0", + "@esbuild/linux-s390x": "0.22.0", + "@esbuild/linux-x64": "0.22.0", + "@esbuild/netbsd-x64": "0.22.0", + "@esbuild/openbsd-arm64": "0.22.0", + "@esbuild/openbsd-x64": "0.22.0", + "@esbuild/sunos-x64": "0.22.0", + "@esbuild/win32-arm64": "0.22.0", + "@esbuild/win32-ia32": "0.22.0", + "@esbuild/win32-x64": "0.22.0" }, "license": "MIT" } diff --git a/version.txt b/version.txt index e756a90e66c..21574090598 100644 --- a/version.txt +++ b/version.txt @@ -1 +1 @@ -0.21.5 +0.22.0