From b9e2d837233c3df038e7eb32481bbca96442f458 Mon Sep 17 00:00:00 2001 From: Ian McKenzie Date: Mon, 26 Feb 2024 22:35:47 -0800 Subject: [PATCH 1/2] Add OpenBSD arm64 --- 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 ++++++++++++++++++++ npm/esbuild/package.json | 1 + 6 files changed, 36 insertions(+) create mode 100644 npm/@esbuild/openbsd-arm64/README.md create mode 100644 npm/@esbuild/openbsd-arm64/package.json diff --git a/Makefile b/Makefile index 8dc7d055acd..a26c45d58af 100644 --- a/Makefile +++ b/Makefile @@ -291,6 +291,7 @@ platform-all: platform-linux-x64 \ platform-netbsd-x64 \ platform-neutral \ + platform-openbsd-arm64 \ platform-openbsd-x64 \ platform-sunos-x64 \ platform-wasm \ @@ -344,6 +345,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 @@ -421,6 +425,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 @@ -497,6 +502,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)" @@ -589,6 +597,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-wasm PACKAGE=esbuild-wasm SUBPATH=esbuild.wasm validate-build @@ -622,6 +631,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..afde0a95549 --- /dev/null +++ b/npm/@esbuild/openbsd-arm64/package.json @@ -0,0 +1,20 @@ +{ + "name": "@esbuild/openbsd-arm64", + "version": "0.20.1", + "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" + ] +} diff --git a/npm/esbuild/package.json b/npm/esbuild/package.json index 310826e04ed..e1baaf0a0b5 100644 --- a/npm/esbuild/package.json +++ b/npm/esbuild/package.json @@ -36,6 +36,7 @@ "@esbuild/linux-s390x": "0.20.1", "@esbuild/linux-x64": "0.20.1", "@esbuild/netbsd-x64": "0.20.1", + "@esbuild/openbsd-arm64": "0.20.1", "@esbuild/openbsd-x64": "0.20.1", "@esbuild/sunos-x64": "0.20.1", "@esbuild/win32-arm64": "0.20.1", From c0dd905263b3cf4ce22677469f0e09b57b364f71 Mon Sep 17 00:00:00 2001 From: Ian McKenzie Date: Thu, 14 Mar 2024 09:34:51 -0700 Subject: [PATCH 2/2] Set json as space instead of tabs in .editorconfig --- .editorconfig | 2 +- npm/esbuild/package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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/npm/esbuild/package.json b/npm/esbuild/package.json index e1baaf0a0b5..65e69b9fcc4 100644 --- a/npm/esbuild/package.json +++ b/npm/esbuild/package.json @@ -36,7 +36,7 @@ "@esbuild/linux-s390x": "0.20.1", "@esbuild/linux-x64": "0.20.1", "@esbuild/netbsd-x64": "0.20.1", - "@esbuild/openbsd-arm64": "0.20.1", + "@esbuild/openbsd-arm64": "0.20.1", "@esbuild/openbsd-x64": "0.20.1", "@esbuild/sunos-x64": "0.20.1", "@esbuild/win32-arm64": "0.20.1",