Skip to content

Commit

Permalink
publish 0.9.1 to npm
Browse files Browse the repository at this point in the history
  • Loading branch information
evanw committed Mar 12, 2021
1 parent 20fc8a8 commit 094eac1
Show file tree
Hide file tree
Showing 17 changed files with 20 additions and 18 deletions.
6 changes: 4 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Changelog

## Unreleased
## 0.9.1

* Fix bundling when parent directory is inaccessible ([#938](https://github.com/evanw/esbuild/issues/938))

Expand Down Expand Up @@ -46,7 +46,9 @@

Except that node doesn't actually ever look at the properties of that object to determine the export names. Instead it parses the CommonJS file and scans the AST for certain syntax patterns. A full list of supported patterns can be found in the [documentation for the `cjs-module-lexer` package](https://github.com/guybedford/cjs-module-lexer#grammar). This library doesn't currently support the syntax patterns used by esbuild.

While esbuild could adapt its syntax to these patterns, the patterns are less compact than the ones used by esbuild and doing this would lead to code bloat. Supporting two separate ways of generating export getters would also complicate esbuild's internal implementation, which is undesirable. Another alternative could be to update the implementation of `cjs-module-lexer` to support the specific patterns used by esbuild. This is also undesirable because this pattern detection would break when minification is enabled, this would tightly couple esbuild's output format with node and prevent esbuild from changing it, and it wouldn't work for existing and previous versions of node that still have the old version of this library.
While esbuild could adapt its syntax to these patterns, the patterns are less compact than the ones used by esbuild and doing this would lead to code bloat. Supporting two separate ways of generating export getters would also complicate esbuild's internal implementation, which is undesirable.

Another alternative could be to update the implementation of `cjs-module-lexer` to support the specific patterns used by esbuild. This is also undesirable because this pattern detection would break when minification is enabled, this would tightly couple esbuild's output format with node and prevent esbuild from changing it, and it wouldn't work for existing and previous versions of node that still have the old version of this library.

Instead, esbuild will now add additional code to "annotate" ESM files that have been converted to CommonJS when esbuild's platform has been set to `node`. The annotation is dead code but is still detected by the `cjs-module-lexer` library. If the original ESM file has the exports `foo` and `bar`, the additional annotation code will look like this:

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.9.0"
const esbuildVersion = "0.9.1"
2 changes: 1 addition & 1 deletion npm/esbuild-darwin-64/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "esbuild-darwin-64",
"version": "0.9.0",
"version": "0.9.1",
"description": "The macOS 64-bit binary for esbuild, a JavaScript bundler.",
"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.9.0",
"version": "0.9.1",
"description": "The macOS ARM 64-bit binary for esbuild, a JavaScript bundler.",
"repository": "https://github.com/evanw/esbuild",
"license": "MIT",
Expand Down
2 changes: 1 addition & 1 deletion npm/esbuild-freebsd-64/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "esbuild-freebsd-64",
"version": "0.9.0",
"version": "0.9.1",
"description": "The FreeBSD 64-bit binary for esbuild, a JavaScript bundler.",
"repository": "https://github.com/evanw/esbuild",
"license": "MIT",
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.9.0",
"version": "0.9.1",
"description": "The FreeBSD ARM 64-bit binary for esbuild, a JavaScript bundler.",
"repository": "https://github.com/evanw/esbuild",
"license": "MIT",
Expand Down
2 changes: 1 addition & 1 deletion npm/esbuild-linux-32/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "esbuild-linux-32",
"version": "0.9.0",
"version": "0.9.1",
"description": "The Linux 32-bit binary for esbuild, a JavaScript bundler.",
"repository": "https://github.com/evanw/esbuild",
"license": "MIT",
Expand Down
2 changes: 1 addition & 1 deletion npm/esbuild-linux-64/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "esbuild-linux-64",
"version": "0.9.0",
"version": "0.9.1",
"description": "The Linux 64-bit binary for esbuild, a JavaScript bundler.",
"repository": "https://github.com/evanw/esbuild",
"license": "MIT",
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.9.0",
"version": "0.9.1",
"description": "The Linux ARM binary for esbuild, a JavaScript bundler.",
"repository": "https://github.com/evanw/esbuild",
"license": "MIT",
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.9.0",
"version": "0.9.1",
"description": "The Linux ARM 64-bit binary for esbuild, a JavaScript bundler.",
"repository": "https://github.com/evanw/esbuild",
"license": "MIT",
Expand Down
2 changes: 1 addition & 1 deletion npm/esbuild-linux-mips64le/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "esbuild-linux-mips64le",
"version": "0.9.0",
"version": "0.9.1",
"description": "The Linux MIPS 64-bit Little Endian binary for esbuild, a JavaScript bundler.",
"repository": "https://github.com/evanw/esbuild",
"license": "MIT",
Expand Down
2 changes: 1 addition & 1 deletion npm/esbuild-linux-ppc64le/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "esbuild-linux-ppc64le",
"version": "0.9.0",
"version": "0.9.1",
"description": "The Linux PowerPC 64-bit Little Endian binary for esbuild, a JavaScript bundler.",
"repository": "https://github.com/evanw/esbuild",
"license": "MIT",
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.9.0",
"version": "0.9.1",
"description": "The cross-platform WebAssembly binary for esbuild, a JavaScript bundler.",
"repository": "https://github.com/evanw/esbuild",
"license": "MIT",
Expand Down
2 changes: 1 addition & 1 deletion npm/esbuild-windows-32/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "esbuild-windows-32",
"version": "0.9.0",
"version": "0.9.1",
"description": "The Windows 32-bit binary for esbuild, a JavaScript bundler.",
"repository": "https://github.com/evanw/esbuild",
"license": "MIT",
Expand Down
2 changes: 1 addition & 1 deletion npm/esbuild-windows-64/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "esbuild-windows-64",
"version": "0.9.0",
"version": "0.9.1",
"description": "The Windows 64-bit binary for esbuild, a JavaScript bundler.",
"repository": "https://github.com/evanw/esbuild",
"license": "MIT",
Expand Down
2 changes: 1 addition & 1 deletion npm/esbuild/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "esbuild",
"version": "0.9.0",
"version": "0.9.1",
"description": "An extremely fast JavaScript bundler and minifier.",
"repository": "https://github.com/evanw/esbuild",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.9.0
0.9.1

0 comments on commit 094eac1

Please sign in to comment.