diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4884bffc581..c963d91db29 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -20,7 +20,7 @@ jobs: - name: Set up Go 1.x uses: actions/setup-go@v3 with: - go-version: 1.20.12 + go-version: 1.22.4 id: go - name: Setup Node.js environment @@ -50,7 +50,7 @@ jobs: - name: Set up Go 1.x uses: actions/setup-go@v3 with: - go-version: 1.20.12 + go-version: 1.22.4 id: go - name: Setup Node.js environment @@ -81,7 +81,7 @@ jobs: - name: Set up Go 1.x uses: actions/setup-go@v3 with: - go-version: 1.20.12 + go-version: 1.22.4 id: go - name: Setup Node.js environment @@ -273,7 +273,7 @@ jobs: - name: Set up Go 1.x uses: actions/setup-go@v3 with: - go-version: 1.20.12 + go-version: 1.22.4 id: go # Make sure esbuild works with old versions of Deno. Note: It's important diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml index 9ac72023d4c..721b1b1b95f 100644 --- a/.github/workflows/validate.yml +++ b/.github/workflows/validate.yml @@ -18,7 +18,7 @@ jobs: - name: Set up Go 1.x uses: actions/setup-go@v3 with: - go-version: 1.20.12 + go-version: 1.22.4 id: go - name: Validation checks diff --git a/CHANGELOG.md b/CHANGELOG.md index 33b039d4a19..31a7595852d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,27 @@ # Changelog +## Unreleased + +* Drop support for older versions of Windows ([#3802](https://github.com/evanw/esbuild/issues/3802)) + + This release drops support for the following operating systems: + + * Windows 7 + * Windows 8 + * Windows Server 2008 + * Windows Server 2012 + + This is because the Go programming language dropped support for these operating system versions in [Go 1.21](https://go.dev/doc/go1.21#windows), and this release updates esbuild from Go 1.20 to Go 1.22. + + Note that this only affects the binary esbuild executables that are published to the `esbuild` npm package. It's still possible to compile esbuild's source code for these older operating systems. If you need to, you can compile esbuild for yourself using an older version of the Go compiler (before Go version 1.21). That might look something like this: + + ``` + git clone https://github.com/evanw/esbuild.git + cd esbuild + go build ./cmd/esbuild + ./esbuild.exe --version + ``` + ## 0.21.5 * Fix `Symbol.metadata` on classes without a class decorator ([#3781](https://github.com/evanw/esbuild/issues/3781)) diff --git a/Makefile b/Makefile index 48894d38951..6e2f4354bd2 100644 --- a/Makefile +++ b/Makefile @@ -20,7 +20,7 @@ test-all: @$(MAKE) --no-print-directory -j6 test-common test-deno ts-type-tests test-wasm-node test-wasm-browser lib-typecheck test-yarnpnp check-go-version: - @go version | grep ' go1\.20\.12 ' || (echo 'Please install Go version 1.20.12' && false) + @go version | grep ' go1\.22\.4 ' || (echo 'Please install Go version 1.22.4' && false) # Note: Don't add "-race" here by default. The Go race detector is currently # only supported on the following configurations: diff --git a/npm/esbuild-wasm/bin/esbuild b/npm/esbuild-wasm/bin/esbuild index ec7f0eed47b..be508a444a3 100755 --- a/npm/esbuild-wasm/bin/esbuild +++ b/npm/esbuild-wasm/bin/esbuild @@ -87,6 +87,15 @@ for (let key in process.env) { } } +console.log('globalThis.crypto', globalThis.crypto) +console.log('globalThis.crypto.getRandomValues', globalThis.crypto && globalThis.crypto.getRandomValues) +try { + console.log("require('crypto')", require('crypto')) +} catch (err) { + console.log("require('crypto')", err) +} + +/* // Node v19 introduced "globalThis.crypto" https://github.com/nodejs/node/pull/44897. // This broke Go's WebAssembly shim: https://github.com/golang/go/issues/56860. // Hack around this breakage by resetting "globalThis.crypto" to "writable". @@ -96,6 +105,7 @@ Object.defineProperty(globalThis, 'crypto', { writable: true, configurable: true, }); +*/ process.argv.splice(2, 0, esbuild_wasm); wrapper(module_.createRequire(wasm_exec_node), Object.assign(Object.create(WebAssembly), { instantiate }));