diff --git a/CHANGELOG.md b/CHANGELOG.md index 88de39ac6c2..da16d42187f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## Unreleased + +* Experimental support for esbuild on NetBSD ([#1624](https://github.com/evanw/esbuild/pull/1624)) + + With this release, esbuild now has a published binary executable for [NetBSD](https://www.netbsd.org/) in the [`esbuild-netbsd-64`](http://npmjs.com/package/esbuild-netbsd-64) npm package, and esbuild's installer has been modified to attempt to use it when on NetBSD. Hopefully this makes installing esbuild via npm work on NetBSD. This change was contributed by [@gdt](https://github.com/gdt). + + ⚠️ Note: NetBSD is not one of [Node's supported platforms](https://nodejs.org/api/process.html#process_process_platform), so installing esbuild may or may not work on NetBSD depending on how Node has been patched. This is not a problem with esbuild. ⚠️ + ## 0.13.5 * Improve watch mode accuracy ([#1113](https://github.com/evanw/esbuild/issues/1113)) diff --git a/Makefile b/Makefile index 7f2392f57b3..58d36d582e8 100644 --- a/Makefile +++ b/Makefile @@ -117,6 +117,7 @@ platform-all: cmd/esbuild/version.go test-all platform-darwin-arm64 \ platform-freebsd \ platform-freebsd-arm64 \ + platform-netbsd \ platform-openbsd \ platform-linux \ platform-linux-32 \ @@ -162,6 +163,9 @@ platform-freebsd: platform-freebsd-arm64: make GOOS=freebsd GOARCH=arm64 NPMDIR=npm/esbuild-freebsd-arm64 platform-unixlike +platform-netbsd: + make GOOS=netbsd GOARCH=amd64 NPMDIR=npm/esbuild-netbsd-64 platform-unixlike + platform-openbsd: make GOOS=openbsd GOARCH=amd64 NPMDIR=npm/esbuild-openbsd-64 platform-unixlike @@ -234,6 +238,10 @@ publish-all: cmd/esbuild/version.go test-prepublish publish-linux-ppc64le \ publish-sunos + @echo Enter one-time password: + @read OTP && OTP="$$OTP" $(MAKE) -j1 \ + publish-netbsd + # Do these last to avoid race conditions @echo Enter one-time password: @read OTP && OTP="$$OTP" make -j2 \ @@ -269,6 +277,9 @@ publish-freebsd: platform-freebsd publish-freebsd-arm64: platform-freebsd-arm64 test -n "$(OTP)" && cd npm/esbuild-freebsd-arm64 && npm publish --otp="$(OTP)" +publish-netbsd: platform-netbsd + test -n "$(OTP)" && cd npm/esbuild-netbsd-64 && npm publish --otp="$(OTP)" + publish-openbsd: platform-openbsd test -n "$(OTP)" && cd npm/esbuild-openbsd-64 && npm publish --otp="$(OTP)" @@ -317,6 +328,7 @@ clean: rm -rf npm/esbuild-darwin-arm64/bin rm -rf npm/esbuild-freebsd-64/bin rm -rf npm/esbuild-freebsd-amd64/bin + rm -rf npm/esbuild-netbsd-64/bin rm -rf npm/esbuild-openbsd-64/bin rm -rf npm/esbuild-linux-32/bin rm -rf npm/esbuild-linux-64/bin diff --git a/lib/npm/node-platform.ts b/lib/npm/node-platform.ts index fe933d5a295..2122c6228f9 100644 --- a/lib/npm/node-platform.ts +++ b/lib/npm/node-platform.ts @@ -19,13 +19,14 @@ export const knownUnixlikePackages: Record = { 'darwin x64 LE': 'esbuild-darwin-64', 'freebsd arm64 LE': 'esbuild-freebsd-arm64', 'freebsd x64 LE': 'esbuild-freebsd-64', - 'openbsd x64 LE': 'esbuild-openbsd-64', 'linux arm LE': 'esbuild-linux-arm', 'linux arm64 LE': 'esbuild-linux-arm64', 'linux ia32 LE': 'esbuild-linux-32', 'linux mips64el LE': 'esbuild-linux-mips64le', 'linux ppc64 LE': 'esbuild-linux-ppc64le', 'linux x64 LE': 'esbuild-linux-64', + 'netbsd x64 LE': 'esbuild-netbsd-64', + 'openbsd x64 LE': 'esbuild-openbsd-64', 'sunos x64 LE': 'esbuild-sunos-64', }; diff --git a/npm/esbuild-netbsd-64/README.md b/npm/esbuild-netbsd-64/README.md new file mode 100644 index 00000000000..ca4558d4374 --- /dev/null +++ b/npm/esbuild-netbsd-64/README.md @@ -0,0 +1,5 @@ +# esbuild + +This is the NetBSD AMD64 binary for esbuild, a JavaScript bundler and minifier. See https://github.com/evanw/esbuild for details. + +⚠️ Note: NetBSD is not one of [Node's supported platforms](https://nodejs.org/api/process.html#process_process_platform), so installing esbuild may or may not work on NetBSD depending on how Node has been patched. This is not a problem with esbuild. ⚠️ diff --git a/npm/esbuild-netbsd-64/package.json b/npm/esbuild-netbsd-64/package.json new file mode 100644 index 00000000000..0debd78883a --- /dev/null +++ b/npm/esbuild-netbsd-64/package.json @@ -0,0 +1,13 @@ +{ + "name": "esbuild-netbsd-64", + "version": "0.13.0", + "description": "The NetBSD AMD64 binary for esbuild, a JavaScript bundler.", + "repository": "https://github.com/evanw/esbuild", + "license": "MIT", + "os": [ + "netbsd" + ], + "cpu": [ + "x64" + ] +} diff --git a/npm/esbuild/package.json b/npm/esbuild/package.json index bea4e664cea..3c0c4e37954 100644 --- a/npm/esbuild/package.json +++ b/npm/esbuild/package.json @@ -23,6 +23,7 @@ "esbuild-linux-arm64": "0.13.5", "esbuild-linux-mips64le": "0.13.5", "esbuild-linux-ppc64le": "0.13.5", + "esbuild-netbsd-64": "0.13.5", "esbuild-openbsd-64": "0.13.5", "esbuild-sunos-64": "0.13.5", "esbuild-windows-32": "0.13.5",