Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: evanw/esbuild
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 71be8bc24e70609ab50a80e90a17a1f5770c89b5
Choose a base ref
...
head repository: evanw/esbuild
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: aaae34eb60632f9945c96379fb3fd22580815e9c
Choose a head ref

Commits on Jul 6, 2022

  1. Copy the full SHA
    46d352e View commit details
  2. follow-up to #2371

    evanw committed Jul 6, 2022
    Copy the full SHA
    8b5e048 View commit details
  3. Copy the full SHA
    18ef7be View commit details
  4. improve printed diffs in tests

    evanw committed Jul 6, 2022
    Copy the full SHA
    4a00ba9 View commit details
  5. Copy the full SHA
    ffbc5c2 View commit details
  6. Copy the full SHA
    580ad40 View commit details

Commits on Jul 10, 2022

  1. Copy the full SHA
    a2789bf View commit details
  2. Copy the full SHA
    147163e View commit details
  3. Fix documentation link (#2376)

    0kyn authored Jul 10, 2022
    Copy the full SHA
    4aa1868 View commit details
  4. Copy the full SHA
    04b6572 View commit details
  5. publish 0.14.49 to npm

    evanw committed Jul 10, 2022
    Copy the full SHA
    3b6b964 View commit details

Commits on Jul 11, 2022

  1. add image/avif to mime types

    evanw committed Jul 11, 2022
    Copy the full SHA
    4a4fd6e View commit details
  2. Copy the full SHA
    f730c03 View commit details

Commits on Jul 18, 2022

  1. Copy the full SHA
    ecae25d View commit details

Commits on Jul 19, 2022

  1. Copy the full SHA
    96a5fb4 View commit details
  2. Copy the full SHA
    a1a7072 View commit details
  3. fix some go warnings

    evanw committed Jul 19, 2022
    Copy the full SHA
    8e78ac6 View commit details
  4. Copy the full SHA
    e70d8e2 View commit details
  5. Copy the full SHA
    c05ece7 View commit details
  6. Copy the full SHA
    61dd5f4 View commit details
  7. Copy the full SHA
    d8e401d View commit details

Commits on Jul 20, 2022

  1. Copy the full SHA
    4c5318f View commit details
  2. Copy the full SHA
    f5f5b57 View commit details
  3. fix #2399: update golang.org/x/sys

    evanw committed Jul 20, 2022
    Copy the full SHA
    fd13718 View commit details

Commits on Jul 23, 2022

  1. Copy the full SHA
    49c229f View commit details

Commits on Jul 24, 2022

  1. update go 1.18.3 => 1.18.4

    evanw committed Jul 24, 2022
    Copy the full SHA
    50c04d6 View commit details
  2. Copy the full SHA
    f41b38d View commit details
  3. Copy the full SHA
    2c2ef24 View commit details
  4. Copy the full SHA
    8c6c39a View commit details

Commits on Jul 25, 2022

  1. Copy the full SHA
    98ab5e1 View commit details
  2. Copy the full SHA
    7208846 View commit details
  3. Copy the full SHA
    69d356b View commit details
  4. Copy the full SHA
    09cbb59 View commit details
  5. Copy the full SHA
    8759590 View commit details
  6. publish 0.14.50 to npm

    evanw committed Jul 25, 2022
    Copy the full SHA
    e2830ae View commit details

Commits on Jul 27, 2022

  1. Copy the full SHA
    7a268da View commit details

Commits on Jul 28, 2022

  1. 5
    Copy the full SHA
    0137224 View commit details
  2. publish 0.14.51 to npm

    evanw committed Jul 28, 2022
    Copy the full SHA
    4402c76 View commit details
  3. fix typo in release notes

    evanw committed Jul 28, 2022
    Copy the full SHA
    19429aa View commit details

Commits on Jul 30, 2022

  1. Copy the full SHA
    40ef633 View commit details

Commits on Jul 31, 2022

  1. Copy the full SHA
    2f6c899 View commit details
  2. Copy the full SHA
    e23e181 View commit details
  3. fix large binary input on deno

    evanw committed Jul 31, 2022
    Copy the full SHA
    08c6744 View commit details
  4. Copy the full SHA
    5e918f4 View commit details
  5. Revert "fix #2417: autmatically add module to conditions"

    This reverts commit 5e918f4.
    evanw committed Jul 31, 2022
    Copy the full SHA
    7bd4900 View commit details

Commits on Aug 2, 2022

  1. Copy the full SHA
    ea63c87 View commit details
  2. update go 1.18.4 => 1.19

    evanw committed Aug 2, 2022
    Copy the full SHA
    21deb41 View commit details
  3. Copy the full SHA
    af0ab3e View commit details
  4. Copy the full SHA
    296870e View commit details
  5. Copy the full SHA
    d6cf390 View commit details
Showing with 23,984 additions and 16,210 deletions.
  1. +47 −19 .github/workflows/ci.yml
  2. +1 −1 .github/workflows/validate.yml
  3. +4 −0 .gitignore
  4. +3,320 −0 CHANGELOG-2020.md
  5. +6,004 −0 CHANGELOG-2021.md
  6. +2,067 −10,717 CHANGELOG.md
  7. +116 −88 Makefile
  8. +29 −2 cmd/esbuild/main.go
  9. +3 −3 cmd/esbuild/service.go
  10. +1 −1 cmd/esbuild/version.go
  11. +3 −1 go.mod
  12. +2 −2 go.sum
  13. +89 −49 internal/bundler/bundler.go
  14. +38 −0 internal/bundler/bundler_css_test.go
  15. +225 −0 internal/bundler/bundler_dce_test.go
  16. +251 −91 internal/bundler/bundler_default_test.go
  17. +20 −0 internal/bundler/bundler_loader_test.go
  18. +44 −2 internal/bundler/bundler_lower_test.go
  19. +65 −5 internal/bundler/bundler_packagejson_test.go
  20. +25 −0 internal/bundler/bundler_splitting_test.go
  21. +84 −8 internal/bundler/bundler_test.go
  22. +123 −7 internal/bundler/bundler_ts_test.go
  23. +118 −1 internal/bundler/bundler_tsconfig_test.go
  24. +5 −5 internal/bundler/debug.go
  25. +134 −61 internal/bundler/linker.go
  26. +84 −0 internal/bundler/snapshots/snapshots_css.txt
  27. +207 −41 internal/bundler/snapshots/snapshots_dce.txt
  28. +120 −22 internal/bundler/snapshots/snapshots_default.txt
  29. +20 −4 internal/bundler/snapshots/snapshots_importstar.txt
  30. +25 −63 internal/bundler/snapshots/snapshots_loader.txt
  31. +148 −0 internal/bundler/snapshots/snapshots_lower.txt
  32. +29 −2 internal/bundler/snapshots/snapshots_packagejson.txt
  33. +12 −2 internal/bundler/snapshots/snapshots_splitting.txt
  34. +52 −0 internal/bundler/snapshots/snapshots_ts.txt
  35. +75 −9 internal/bundler/snapshots/snapshots_tsconfig.txt
  36. +17 −18 internal/cache/cache.go
  37. +1 −16 internal/compat/js_table.go
  38. +51 −21 internal/config/config.go
  39. +7 −8 internal/css_parser/css_decls_box.go
  40. +16 −13 internal/css_parser/css_parser.go
  41. +3 −2 internal/css_parser/css_parser_test.go
  42. +3 −7 internal/css_printer/css_printer.go
  43. +9 −9 internal/fs/filepath.go
  44. +134 −24 internal/fs/fs_mock.go
  45. +106 −4 internal/fs/fs_mock_test.go
  46. +19 −9 internal/fs/fs_real.go
  47. +387 −0 internal/fs/fs_zip.go
  48. +4 −2 internal/helpers/mime.go
  49. +114 −0 internal/helpers/quote.go
  50. +45 −33 internal/js_ast/js_ast.go
  51. +6 −0 internal/js_ast/js_ast_helpers.go
  52. +56 −28 internal/js_lexer/js_lexer.go
  53. +977 −343 internal/js_parser/js_parser.go
  54. +222 −17 internal/js_parser/js_parser_lower.go
  55. +46 −0 internal/js_parser/js_parser_lower_test.go
  56. +251 −11 internal/js_parser/js_parser_test.go
  57. +37 −1 internal/js_parser/json_parser.go
  58. +15 −15 internal/js_parser/json_parser_test.go
  59. +40 −14 internal/js_parser/sourcemap_parser.go
  60. +13 −13 internal/js_parser/ts_parser.go
  61. +28 −6 internal/js_parser/ts_parser_test.go
  62. +321 −193 internal/js_printer/js_printer.go
  63. +15 −9 internal/js_printer/js_printer_test.go
  64. +191 −1 internal/logger/logger.go
  65. +109 −34 internal/resolver/package_json.go
  66. +308 −46 internal/resolver/resolver.go
  67. +311 −0 internal/resolver/testExpectations.json
  68. +37 −1 internal/resolver/tsconfig_json.go
  69. +640 −0 internal/resolver/yarnpnp.go
  70. +106 −0 internal/resolver/yarnpnp_test.go
  71. +66 −33 internal/runtime/runtime.go
  72. +135 −58 internal/sourcemap/sourcemap.go
  73. +1 −1 internal/test/util.go
  74. +1 −1 lib/deno/mod.ts
  75. +1 −1 lib/npm/node-install.ts
  76. +74 −14 lib/npm/node-platform.ts
  77. +65 −40 lib/npm/node.ts
  78. +695 −712 lib/shared/common.ts
  79. +3 −3 lib/shared/stdio_protocol.ts
  80. +20 −9 lib/shared/types.ts
  81. +3 −0 npm/@esbuild/android-arm/README.md
  82. +17 −0 npm/@esbuild/android-arm/package.json
  83. +3 −0 npm/@esbuild/linux-loong64/README.md
  84. +17 −0 npm/@esbuild/linux-loong64/package.json
  85. +1 −1 npm/esbuild-android-64/package.json
  86. +1 −1 npm/esbuild-android-arm64/package.json
  87. +1 −1 npm/esbuild-darwin-64/package.json
  88. +1 −1 npm/esbuild-darwin-arm64/package.json
  89. +1 −1 npm/esbuild-freebsd-64/package.json
  90. +1 −1 npm/esbuild-freebsd-arm64/package.json
  91. +1 −1 npm/esbuild-linux-32/package.json
  92. +1 −1 npm/esbuild-linux-64/package.json
  93. +1 −1 npm/esbuild-linux-arm/package.json
  94. +1 −1 npm/esbuild-linux-arm64/package.json
  95. +1 −1 npm/esbuild-linux-mips64le/package.json
  96. +1 −1 npm/esbuild-linux-ppc64le/package.json
  97. +1 −1 npm/esbuild-linux-riscv64/package.json
  98. +1 −1 npm/esbuild-linux-s390x/package.json
  99. +1 −1 npm/esbuild-netbsd-64/package.json
  100. +1 −1 npm/esbuild-openbsd-64/package.json
  101. +1 −1 npm/esbuild-sunos-64/package.json
  102. +1 −1 npm/esbuild-wasm/package.json
  103. +1 −1 npm/esbuild-windows-32/package.json
  104. +1 −1 npm/esbuild-windows-64/package.json
  105. +1 −1 npm/esbuild-windows-arm64/package.json
  106. +23 −21 npm/esbuild/package.json
  107. +59 −51 pkg/api/api.go
  108. +36 −16 pkg/api/api_impl.go
  109. +25 −29 pkg/cli/cli.go
  110. +51 −20 pkg/cli/cli_impl.go
  111. +2 −3 pkg/cli/mangle_cache.go
  112. +3 −0 require/yarnpnp/.gitignore
  113. +1 −0 require/yarnpnp/bar/index.js
  114. +1 −0 require/yarnpnp/bar/node_modules/bar-pkg/index.js
  115. +1 −0 require/yarnpnp/foo/index.js
  116. +4 −0 require/yarnpnp/foo/package.json
  117. +26 −0 require/yarnpnp/in.mjs
  118. +16 −0 require/yarnpnp/package.json
  119. +3 −0 require/yarnpnp/tsconfig.json
  120. +152 −0 require/yarnpnp/yarn.lock
  121. +30 −4 scripts/compat-table.js
  122. +2,960 −2,896 scripts/end-to-end-tests.js
  123. +0 −144 scripts/es6-fuzzer.js
  124. +4 −1 scripts/esbuild.js
  125. +783 −15 scripts/js-api-tests.js
  126. +2 −1 scripts/node-unref-tests.js
  127. +7 −7 scripts/package-lock.json
  128. +1 −1 scripts/package.json
  129. +39 −1 scripts/plugin-tests.js
  130. +81 −0 scripts/test-yarnpnp.js
  131. +10 −2 scripts/test262.js
  132. +218 −0 scripts/verify-source-map.js
  133. +88 −0 scripts/wasm-tests.js
  134. +1 −1 version.txt
66 changes: 47 additions & 19 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -7,6 +7,35 @@ on:
branches: ['*']

jobs:
esbuild-slow:
# Split these out into their own runner because they're very slow
name: esbuild CI (Slow Tests)
runs-on: ubuntu-latest

steps:
- name: Set up Go 1.x
uses: actions/setup-go@v2
with:
go-version: 1.19.1
id: go

- name: Setup Node.js environment
uses: actions/setup-node@v1.4.4
with:
node-version: 16

- name: Check out code into the Go module directory
uses: actions/checkout@v2

- name: Rollup Tests
run: make test-rollup

- name: Uglify Tests
run: CI=1 make uglify

- name: Ensure all platforms can be built
run: make clean && make platform-all

esbuild:
name: esbuild CI
runs-on: ${{ matrix.os }}
@@ -18,18 +47,20 @@ jobs:
- name: Set up Go 1.x
uses: actions/setup-go@v2
with:
go-version: 1.18.3
go-version: 1.19.1
id: go

- name: Setup Node.js environment
uses: actions/setup-node@v1.4.4
with:
node-version: 16

- name: Setup Deno 1.x
# The version of Deno is pinned because version 1.25.1 was causing test
# flakes due to random segfaults.
- name: Setup Deno 1.24.0
uses: denoland/setup-deno@main
with:
deno-version: v1.x
deno-version: v1.24.0

- name: Check out code into the Go module directory
uses: actions/checkout@v2
@@ -40,17 +71,19 @@ jobs:
- name: go vet
run: go vet ./cmd/... ./internal/... ./pkg/...

- name: Deno Tests
# Deno tests currently don't run on Windows because of "esbuild" vs.
# "esbuild.exe" in the test harness. This should be fixed...
- name: Deno Tests (non-Windows)
if: matrix.os != 'windows-latest'
run: make test-deno

- name: Deno Tests (Windows)
if: matrix.os == 'windows-latest'
run: make test-deno-windows

- name: Test for path/filepath
if: matrix.os == 'ubuntu-latest'
run: make no-filepath

- name: Make sure "check-go-version" works
- name: Make sure "check-go-version" works (non-Windows)
if: matrix.os != 'windows-latest'
run: make check-go-version

@@ -61,7 +94,7 @@ jobs:
- name: npm ci
run: cd scripts && npm ci

- name: Register Test (ESBUILD_WORKER_THREADS=0)
- name: Register Test (ESBUILD_WORKER_THREADS=0, non-Windows)
if: matrix.os != 'windows-latest'
run: ESBUILD_WORKER_THREADS=0 node scripts/register-test.js

@@ -74,7 +107,7 @@ jobs:
- name: E2E Tests
run: node scripts/end-to-end-tests.js

- name: JS API Tests (ESBUILD_WORKER_THREADS=0)
- name: JS API Tests (ESBUILD_WORKER_THREADS=0, non-Windows)
if: matrix.os != 'windows-latest'
run: ESBUILD_WORKER_THREADS=0 node scripts/js-api-tests.js

@@ -99,14 +132,17 @@ jobs:
if: matrix.os == 'ubuntu-latest'
run: make test-wasm-browser

- name: WebAssembly API Tests (node)
- name: WebAssembly API Tests (node, Linux)
if: matrix.os == 'ubuntu-latest'
run: make test-wasm-node

- name: WebAssembly API Tests (node)
- name: WebAssembly API Tests (node, non-Linux)
if: matrix.os != 'ubuntu-latest'
run: node scripts/wasm-tests.js

- name: Yarn PnP tests
run: make test-yarnpnp

- name: Sucrase Tests
if: matrix.os == 'ubuntu-latest'
run: make test-sucrase
@@ -119,14 +155,6 @@ jobs:
if: matrix.os == 'ubuntu-latest'
run: make test-preact-splitting

- name: Uglify Tests
if: matrix.os == 'ubuntu-latest'
run: CI=1 make uglify

- name: Rollup Tests
if: matrix.os == 'ubuntu-latest'
run: make test-rollup

- name: Check the unicode table generator
if: matrix.os == 'ubuntu-latest'
run: cd scripts && node gen-unicode-table.js
2 changes: 1 addition & 1 deletion .github/workflows/validate.yml
Original file line number Diff line number Diff line change
@@ -15,7 +15,7 @@ jobs:
- name: Set up Go 1.x
uses: actions/setup-go@v2
with:
go-version: 1.18.3
go-version: 1.19.1
id: go

- name: Validation checks
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -6,6 +6,10 @@
/deno/
/esbuild
/github/
/npm/@esbuild/android-arm/esbuild.wasm
/npm/@esbuild/android-arm/exit0.js
/npm/@esbuild/android-arm/wasm_exec_node.js
/npm/@esbuild/android-arm/wasm_exec.js
/npm/esbuild-android-64/esbuild.wasm
/npm/esbuild-android-64/exit0.js
/npm/esbuild-android-64/wasm_exec_node.js
Loading