From 63eb8140a7dd878727d3682654be5e609dc2f793 Mon Sep 17 00:00:00 2001 From: Ian McKenzie <13459320+ikmckenz@users.noreply.github.com> Date: Sun, 30 Jun 2024 10:59:20 -0700 Subject: [PATCH] Add OpenBSD arm64 (#3674) --- .editorconfig | 2 +- Makefile | 10 ++++++++++ dl.sh | 1 + lib/npm/node-platform.ts | 1 + npm/@esbuild/openbsd-arm64/README.md | 3 +++ npm/@esbuild/openbsd-arm64/package.json | 20 ++++++++++++++++++++ 6 files changed, 36 insertions(+), 1 deletion(-) create mode 100644 npm/@esbuild/openbsd-arm64/README.md create mode 100644 npm/@esbuild/openbsd-arm64/package.json diff --git a/.editorconfig b/.editorconfig index 087a1b9f0f3..ab77668c3df 100644 --- a/.editorconfig +++ b/.editorconfig @@ -2,6 +2,6 @@ indent_style = tab indent_size = 2 -[*.{js,ts}] +[*.{js,json,ts}] indent_style = space indent_size = 2 diff --git a/Makefile b/Makefile index 1d25584f648..2a3aad6e862 100644 --- a/Makefile +++ b/Makefile @@ -304,6 +304,7 @@ platform-all: platform-linux-x64 \ platform-netbsd-x64 \ platform-neutral \ + platform-openbsd-arm64 \ platform-openbsd-x64 \ platform-sunos-x64 \ platform-wasi-preview1 \ @@ -362,6 +363,9 @@ platform-freebsd-arm64: platform-netbsd-x64: @$(MAKE) --no-print-directory GOOS=netbsd GOARCH=amd64 NPMDIR=npm/@esbuild/netbsd-x64 platform-unixlike +platform-openbsd-arm64: + @$(MAKE) --no-print-directory GOOS=openbsd GOARCH=arm64 NPMDIR=npm/@esbuild/openbsd-arm64 platform-unixlike + platform-openbsd-x64: @$(MAKE) --no-print-directory GOOS=openbsd GOARCH=amd64 NPMDIR=npm/@esbuild/openbsd-x64 platform-unixlike @@ -439,6 +443,7 @@ publish-all: check-go-version @read OTP && OTP="$$OTP" $(MAKE) --no-print-directory -j4 \ publish-freebsd-x64 \ publish-freebsd-arm64 \ + publish-openbsd-arm64 \ publish-openbsd-x64 \ publish-netbsd-x64 @@ -519,6 +524,9 @@ publish-freebsd-arm64: platform-freebsd-arm64 publish-netbsd-x64: platform-netbsd-x64 test -n "$(OTP)" && cd npm/@esbuild/netbsd-x64 && npm publish --otp="$(OTP)" +publish-openbsd-arm64: platform-openbsd-arm64 + test -n "$(OTP)" && cd npm/@esbuild/openbsd-arm64 && npm publish --otp="$(OTP)" + publish-openbsd-x64: platform-openbsd-x64 test -n "$(OTP)" && cd npm/@esbuild/openbsd-x64 && npm publish --otp="$(OTP)" @@ -611,6 +619,7 @@ validate-builds: @$(MAKE) --no-print-directory TARGET=platform-linux-s390x SCOPE=@esbuild/ PACKAGE=linux-s390x SUBPATH=bin/esbuild validate-build @$(MAKE) --no-print-directory TARGET=platform-linux-x64 SCOPE=@esbuild/ PACKAGE=linux-x64 SUBPATH=bin/esbuild validate-build @$(MAKE) --no-print-directory TARGET=platform-netbsd-x64 SCOPE=@esbuild/ PACKAGE=netbsd-x64 SUBPATH=bin/esbuild validate-build + @$(MAKE) --no-print-directory TARGET=platform-openbsd-arm64 SCOPE=@esbuild/ PACKAGE=openbsd-arm64 SUBPATH=bin/esbuild validate-build @$(MAKE) --no-print-directory TARGET=platform-openbsd-x64 SCOPE=@esbuild/ PACKAGE=openbsd-x64 SUBPATH=bin/esbuild validate-build @$(MAKE) --no-print-directory TARGET=platform-sunos-x64 SCOPE=@esbuild/ PACKAGE=sunos-x64 SUBPATH=bin/esbuild validate-build @$(MAKE) --no-print-directory TARGET=platform-wasi-preview1 SCOPE=@esbuild/ PACKAGE=wasi-preview1 SUBPATH=esbuild.wasm validate-build @@ -646,6 +655,7 @@ clean: rm -rf npm/@esbuild/linux-s390x/bin rm -rf npm/@esbuild/linux-x64/bin rm -rf npm/@esbuild/netbsd-x64/bin + rm -rf npm/@esbuild/openbsd-arm64/bin rm -rf npm/@esbuild/openbsd-x64/bin rm -rf npm/@esbuild/sunos-x64/bin rm -rf npm/esbuild-wasm/esm diff --git a/dl.sh b/dl.sh index 3d52c63eef5..45d3a9adec0 100755 --- a/dl.sh +++ b/dl.sh @@ -11,6 +11,7 @@ case $platform in 'Linux arm64' | 'Linux aarch64') curl -fo "$tgz" "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-$ESBUILD_VERSION.tgz";; 'Linux x86_64') curl -fo "$tgz" "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-$ESBUILD_VERSION.tgz";; 'NetBSD amd64') curl -fo "$tgz" "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-$ESBUILD_VERSION.tgz";; + 'OpenBSD arm64') curl -fo "$tgz" "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-$ESBUILD_VERSION.tgz";; 'OpenBSD amd64') curl -fo "$tgz" "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-$ESBUILD_VERSION.tgz";; *) echo "error: Unsupported platform: $platform"; exit 1 esac diff --git a/lib/npm/node-platform.ts b/lib/npm/node-platform.ts index 156d024a347..bda3b0948cc 100644 --- a/lib/npm/node-platform.ts +++ b/lib/npm/node-platform.ts @@ -42,6 +42,7 @@ export const knownUnixlikePackages: Record = { 'linux x64 LE': '@esbuild/linux-x64', 'linux loong64 LE': '@esbuild/linux-loong64', 'netbsd x64 LE': '@esbuild/netbsd-x64', + 'openbsd arm64 LE': '@esbuild/openbsd-arm64', 'openbsd x64 LE': '@esbuild/openbsd-x64', 'sunos x64 LE': '@esbuild/sunos-x64', } diff --git a/npm/@esbuild/openbsd-arm64/README.md b/npm/@esbuild/openbsd-arm64/README.md new file mode 100644 index 00000000000..1a0e1e8b427 --- /dev/null +++ b/npm/@esbuild/openbsd-arm64/README.md @@ -0,0 +1,3 @@ +# esbuild + +This is the OpenBSD ARM 64-bit binary for esbuild, a JavaScript bundler and minifier. See https://github.com/evanw/esbuild for details. diff --git a/npm/@esbuild/openbsd-arm64/package.json b/npm/@esbuild/openbsd-arm64/package.json new file mode 100644 index 00000000000..26410115f8e --- /dev/null +++ b/npm/@esbuild/openbsd-arm64/package.json @@ -0,0 +1,20 @@ +{ + "name": "@esbuild/openbsd-arm64", + "version": "0.20.2", + "description": "The OpenBSD ARM 64-bit binary for esbuild, a JavaScript bundler.", + "repository": { + "type": "git", + "url": "git+https://github.com/evanw/esbuild.git" + }, + "license": "MIT", + "preferUnplugged": true, + "engines": { + "node": ">=12" + }, + "os": [ + "openbsd" + ], + "cpu": [ + "arm64" + ] +}