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: v0.20.0
Choose a base ref
...
head repository: evanw/esbuild
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v0.21.5
Choose a head ref
Loading
Showing with 20,457 additions and 6,795 deletions.
  1. +43 −1 .github/workflows/ci.yml
  2. +4,054 −0 CHANGELOG-2023.md
  3. +545 −3,899 CHANGELOG.md
  4. +15 −2 Makefile
  5. +10 −5 cmd/esbuild/main.go
  6. +19 −6 cmd/esbuild/service.go
  7. +1 −1 cmd/esbuild/version.go
  8. +8 −8 compat-table/package-lock.json
  9. +4 −4 compat-table/package.json
  10. +17 −2 compat-table/src/index.ts
  11. +0 −3 compat-table/src/mdn.ts
  12. +67 −47 internal/bundler/bundler.go
  13. +97 −1 internal/bundler_tests/bundler_dce_test.go
  14. +405 −0 internal/bundler_tests/bundler_default_test.go
  15. +107 −0 internal/bundler_tests/bundler_loader_test.go
  16. +32 −0 internal/bundler_tests/bundler_lower_test.go
  17. +2 −0 internal/bundler_tests/bundler_ts_test.go
  18. +168 −0 internal/bundler_tests/bundler_tsconfig_test.go
  19. +99 −46 internal/bundler_tests/snapshots/snapshots_dce.txt
  20. +531 −247 internal/bundler_tests/snapshots/snapshots_default.txt
  21. +32 −32 internal/bundler_tests/snapshots/snapshots_glob.txt
  22. +59 −0 internal/bundler_tests/snapshots/snapshots_loader.txt
  23. +540 −336 internal/bundler_tests/snapshots/snapshots_lower.txt
  24. +17 −18 internal/bundler_tests/snapshots/snapshots_splitting.txt
  25. +40 −43 internal/bundler_tests/snapshots/snapshots_ts.txt
  26. +31 −14 internal/bundler_tests/snapshots/snapshots_tsconfig.txt
  27. +11 −10 internal/compat/css_table.go
  28. +19 −14 internal/compat/js_table.go
  29. +1 −0 internal/config/config.go
  30. +173 −163 internal/css_parser/css_color_spaces.go
  31. +44 −36 internal/css_parser/css_decls_color.go
  32. +109 −106 internal/css_parser/css_decls_gradient.go
  33. +1 −1 internal/css_parser/css_decls_list_style.go
  34. +28 −25 internal/css_parser/css_nesting.go
  35. +4 −5 internal/css_parser/css_parser.go
  36. +10 −0 internal/css_parser/css_parser_test.go
  37. +1 −0 internal/fs/fs.go
  38. +4 −0 internal/fs/fs_mock.go
  39. +7 −0 internal/fs/fs_real.go
  40. +4 −0 internal/fs/fs_zip.go
  41. +158 −0 internal/helpers/float.go
  42. +50 −26 internal/js_ast/js_ast.go
  43. +145 −8 internal/js_ast/js_ast_helpers.go
  44. +283 −167 internal/js_parser/js_parser.go
  45. +0 −8 internal/js_parser/js_parser_lower.go
  46. +1,420 −692 internal/js_parser/js_parser_lower_class.go
  47. +139 −39 internal/js_parser/js_parser_lower_test.go
  48. +464 −331 internal/js_parser/js_parser_test.go
  49. +14 −4 internal/js_parser/json_parser.go
  50. +10 −12 internal/js_parser/ts_parser.go
  51. +162 −89 internal/js_parser/ts_parser_test.go
  52. +114 −65 internal/js_printer/js_printer.go
  53. +29 −25 internal/js_printer/js_printer_test.go
  54. +46 −12 internal/linker/linker.go
  55. +14 −1 internal/logger/logger.go
  56. +5 −0 internal/logger/msg_ids.go
  57. +65 −28 internal/resolver/resolver.go
  58. +19 −7 internal/resolver/tsconfig_json.go
  59. +3 −5 internal/resolver/yarnpnp.go
  60. +84 −41 internal/runtime/runtime.go
  61. +33 −0 internal/runtime/runtime_test.go
  62. +5 −19 lib/deno/mod.ts
  63. +13 −0 lib/shared/common.ts
  64. +2 −0 lib/shared/stdio_protocol.ts
  65. +32 −6 lib/shared/types.ts
  66. +11 −0 lib/tsconfig-nolib.json
  67. +1 −1 npm/@esbuild/aix-ppc64/package.json
  68. +1 −1 npm/@esbuild/android-arm/package.json
  69. +1 −1 npm/@esbuild/android-arm64/package.json
  70. +1 −1 npm/@esbuild/android-x64/package.json
  71. +1 −1 npm/@esbuild/darwin-arm64/package.json
  72. +1 −1 npm/@esbuild/darwin-x64/package.json
  73. +1 −1 npm/@esbuild/freebsd-arm64/package.json
  74. +1 −1 npm/@esbuild/freebsd-x64/package.json
  75. +1 −1 npm/@esbuild/linux-arm/package.json
  76. +1 −1 npm/@esbuild/linux-arm64/package.json
  77. +1 −1 npm/@esbuild/linux-ia32/package.json
  78. +1 −1 npm/@esbuild/linux-loong64/package.json
  79. +1 −1 npm/@esbuild/linux-mips64el/package.json
  80. +1 −1 npm/@esbuild/linux-ppc64/package.json
  81. +1 −1 npm/@esbuild/linux-riscv64/package.json
  82. +1 −1 npm/@esbuild/linux-s390x/package.json
  83. +1 −1 npm/@esbuild/linux-x64/package.json
  84. +1 −1 npm/@esbuild/netbsd-x64/package.json
  85. +1 −1 npm/@esbuild/openbsd-x64/package.json
  86. +1 −1 npm/@esbuild/sunos-x64/package.json
  87. +1 −1 npm/@esbuild/win32-arm64/package.json
  88. +1 −1 npm/@esbuild/win32-ia32/package.json
  89. +1 −1 npm/@esbuild/win32-x64/package.json
  90. +1 −1 npm/esbuild-wasm/package.json
  91. +24 −24 npm/esbuild/package.json
  92. +3 −0 pkg/api/api.go
  93. +5 −55 pkg/api/api_impl.go
  94. +1 −1 pkg/api/serve_other.go
  95. +1 −0 pkg/cli/cli_impl.go
  96. +5,383 −0 scripts/decorator-tests.js
  97. +3,912 −0 scripts/decorator-tests.ts
  98. +12 −14 scripts/deno-tests.js
  99. +259 −0 scripts/end-to-end-tests.js
  100. +7 −10 scripts/js-api-tests.js
  101. +135 −1 scripts/plugin-tests.js
  102. +1 −5 scripts/ts-type-tests.js
  103. +5 −0 scripts/tsconfig.json
  104. +5 −0 staticcheck.conf
  105. +1 −1 version.txt
44 changes: 43 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -160,6 +160,10 @@ jobs:
if: matrix.os == 'ubuntu-latest'
run: make lib-typecheck

- name: Decorator Tests
if: matrix.os == 'ubuntu-latest'
run: make decorator-tests

- name: WebAssembly API Tests (browser)
if: matrix.os == 'ubuntu-latest'
run: make test-wasm-browser
@@ -225,7 +229,45 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
# Note: I'm excluding "macos-latest" here because GitHub recently
# changed their macOS CI VMs from x86_64 to aarch64 (i.e. from Intel
# to ARM) and it looks like old Deno versions have WASM bugs on ARM.
# Specifically, this test now crashes like this when run on macOS:
#
# #
# # Fatal error in , line 0
# # Check failed: RwxMemoryWriteScope::IsAllowed().
# #
# #
# #
# #FailureMessage Object: 0x16f282368
# ==== C stack trace ===============================
#
# 0 deno 0x0000000101bb8e78 v8::base::debug::StackTrace::StackTrace() + 24
# 1 deno 0x0000000101bbda84 v8::platform::(anonymous namespace)::PrintStackTrace() + 24
# 2 deno 0x0000000101bb6230 V8_Fatal(char const*, ...) + 268
# 3 deno 0x000000010227e468 v8::internal::wasm::WasmCodeManager::MemoryProtectionKeysEnabled() const + 0
# 4 deno 0x0000000102299994 v8::internal::wasm::WasmEngine::InitializeOncePerProcess() + 44
# 5 deno 0x0000000101e78fd0 v8::internal::V8::Initialize() + 1576
# 6 deno 0x0000000101c3b7d8 v8::V8::Initialize(int) + 32
# 7 deno 0x00000001011833dc _ZN3std4sync4once4Once9call_once28_$u7b$$u7b$closure$u7d$$u7d$17h2bbe74d315ab3e84E + 488
# 8 deno 0x00000001017f8854 std::sync::once::Once::call_inner::h70fbdd48fe002a01 + 724
# 9 deno 0x000000010115ca80 deno_core::runtime::JsRuntime::new::h9c5f1a9c910f1eed + 192
# 10 deno 0x00000001014d3b50 deno_runtime::worker::MainWorker::bootstrap_from_options::h91a0eaac48dfc18e + 4260
# 11 deno 0x0000000100ee692c deno::create_main_worker::h0d1622755821ae7f + 1608
# 12 deno 0x0000000100f6c688 _ZN97_$LT$core..future..from_generator..GenFuture$LT$T$GT$$u20$as$u20$core..future..future..Future$GT$4poll17h87ddfac9566887c8E + 492
# 13 deno 0x0000000100f6ba18 tokio::runtime::task::raw::poll::h7d51f1a7d5a61c15 + 1396
# 14 deno 0x0000000101917b98 std::sys_common::backtrace::__rust_begin_short_backtrace::hd384935dcffe6f2d + 332
# 15 deno 0x0000000101917954 _ZN4core3ops8function6FnOnce40call_once$u7b$$u7b$vtable.shim$u7d$$u7d$17he2755732d5d29cf0E + 124
# 16 deno 0x0000000101829684 std::sys::unix::thread::Thread::new::thread_start::h432bc30153e41f60 + 48
# 17 libsystem_pthread.dylib 0x000000018a436f94 _pthread_start + 136
# 18 libsystem_pthread.dylib 0x000000018a431d34 thread_start + 8
#
# Hopefully running this old Deno version on Linux is sufficiently
# close to running it on macOS. For reference, I believe this is the
# change that GitHub made which broke this test:
# https://github.blog/changelog/2023-10-02-github-actions-apple-silicon-m1-macos-runners-are-now-available-in-public-beta/
os: [ubuntu-latest, windows-latest]

steps:
- name: Set up Go 1.x
Loading