Skip to content

Commit

Permalink
publish 0.22.0 to npm
Browse files Browse the repository at this point in the history
  • Loading branch information
evanw committed Jun 30, 2024
1 parent 196dcad commit 80c6e6e
Show file tree
Hide file tree
Showing 30 changed files with 76 additions and 73 deletions.
10 changes: 6 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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))

Expand Down
2 changes: 1 addition & 1 deletion cmd/esbuild/version.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
package main

const esbuildVersion = "0.21.5"
const esbuildVersion = "0.22.0"
2 changes: 1 addition & 1 deletion npm/@esbuild/aix-ppc64/package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
2 changes: 1 addition & 1 deletion npm/@esbuild/android-arm/package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
2 changes: 1 addition & 1 deletion npm/@esbuild/android-arm64/package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
2 changes: 1 addition & 1 deletion npm/@esbuild/android-x64/package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
2 changes: 1 addition & 1 deletion npm/@esbuild/darwin-arm64/package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
2 changes: 1 addition & 1 deletion npm/@esbuild/darwin-x64/package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
2 changes: 1 addition & 1 deletion npm/@esbuild/freebsd-arm64/package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
2 changes: 1 addition & 1 deletion npm/@esbuild/freebsd-x64/package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
2 changes: 1 addition & 1 deletion npm/@esbuild/linux-arm/package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
2 changes: 1 addition & 1 deletion npm/@esbuild/linux-arm64/package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
2 changes: 1 addition & 1 deletion npm/@esbuild/linux-ia32/package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
2 changes: 1 addition & 1 deletion npm/@esbuild/linux-loong64/package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
2 changes: 1 addition & 1 deletion npm/@esbuild/linux-mips64el/package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
2 changes: 1 addition & 1 deletion npm/@esbuild/linux-ppc64/package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
2 changes: 1 addition & 1 deletion npm/@esbuild/linux-riscv64/package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
2 changes: 1 addition & 1 deletion npm/@esbuild/linux-s390x/package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
2 changes: 1 addition & 1 deletion npm/@esbuild/linux-x64/package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
2 changes: 1 addition & 1 deletion npm/@esbuild/netbsd-x64/package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
36 changes: 18 additions & 18 deletions npm/@esbuild/openbsd-arm64/package.json
Original file line number Diff line number Diff line change
@@ -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"
]
}
2 changes: 1 addition & 1 deletion npm/@esbuild/openbsd-x64/package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
2 changes: 1 addition & 1 deletion npm/@esbuild/sunos-x64/package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
2 changes: 1 addition & 1 deletion npm/@esbuild/wasi-preview1/package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
2 changes: 1 addition & 1 deletion npm/@esbuild/win32-arm64/package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
2 changes: 1 addition & 1 deletion npm/@esbuild/win32-ia32/package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
2 changes: 1 addition & 1 deletion npm/@esbuild/win32-x64/package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
2 changes: 1 addition & 1 deletion npm/esbuild-wasm/package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
49 changes: 25 additions & 24 deletions npm/esbuild/package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand All @@ -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"
}
2 changes: 1 addition & 1 deletion version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.21.5
0.22.0

0 comments on commit 80c6e6e

Please sign in to comment.