@ohos-ports/esbuild-openharmony-arm64 0.28.1-beta.2 → 0.28.1-beta.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,26 +1,3 @@
1
- # @ohos-ports/esbuild-openharmony-arm64
1
+ # esbuild
2
2
 
3
- This is the HarmonyOS arm64 binary package for [esbuild](https://github.com/evanw/esbuild), a fast JavaScript bundler and minifier.
4
-
5
- ## Overview
6
-
7
- This package provides the native esbuild binary compiled for HarmonyOS (OpenHarmony) on arm64 architecture. It is part of the `@ohos-ports` initiative to bring Node.js ecosystem packages to HarmonyOS.
8
-
9
- - **Platform**: openharmony / arm64
10
- - **Binary format**: ELF 64-bit LSB arm64, static, stripped
11
- - **Version**: 0.28.1 (matches upstream esbuild v0.28.1)
12
- - **Source**: Compiled from Go source at https://github.com/evanw/esbuild tag v0.28.1
13
-
14
- ## Build
15
-
16
- The binary is compiled from esbuild's Go source code using:
17
-
18
- ```bash
19
- GOOS=linux GOARCH=arm64 CGO_ENABLED=0 make esbuild GO_FLAGS="-ldflags '-s -w'"
20
- ```
21
-
22
- The resulting binary is signed for HarmonyOS.
23
-
24
- ## License
25
-
26
- MIT - see the [esbuild LICENSE](https://github.com/evanw/esbuild/blob/main/LICENSE.md) for details.
3
+ This is the Windows 64-bit binary for esbuild, a JavaScript bundler and minifier. See https://github.com/evanw/esbuild for details.
package/bin/esbuild CHANGED
Binary file
package/index.js ADDED
@@ -0,0 +1,34 @@
1
+ 'use strict';
2
+
3
+ // @esbuild/win32-x64 → OpenHarmony arm64 migration (round 1)
4
+ //
5
+ // The original npm package only shipped the Windows x64 esbuild.exe
6
+ // (PE32+ x86-64, prebuilt Go binary) and had no JS entry, so it could
7
+ // neither be installed on openharmony (EBADPLATFORM) nor executed
8
+ // (ENOEXEC) nor required (MODULE_NOT_FOUND).
9
+ //
10
+ // This migration compiles esbuild v0.28.1 from Go source
11
+ // (https://github.com/evanw/esbuild, tag v0.28.1) as a fully static
12
+ // arm64 binary (CGO_ENABLED=0, no dynamic NEEDED entries) and ships it
13
+ // at bin/esbuild, natively supporting the 'openharmony' platform.
14
+
15
+ var path = require('path');
16
+
17
+ var platform = process.platform;
18
+ var arch = process.arch;
19
+
20
+ // Direct openharmony support — NOT mapped to linux/win32.
21
+ var isSupported = platform === 'openharmony' && arch === 'arm64';
22
+
23
+ var binPath = path.join(__dirname, 'bin', 'esbuild');
24
+
25
+ module.exports = {
26
+ name: '@ohos-ports/esbuild-openharmony-arm64',
27
+ version: '0.28.1',
28
+ migratedFor: { platform: 'openharmony', arch: 'arm64' },
29
+ platform: platform,
30
+ arch: arch,
31
+ isSupported: isSupported,
32
+ binPath: binPath,
33
+ bin: binPath,
34
+ };
package/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "@ohos-ports/esbuild-openharmony-arm64",
3
- "version": "0.28.1-beta.2",
4
- "description": "The HarmonyOS arm64 binary for esbuild, a JavaScript bundler.",
3
+ "version": "0.28.1-beta.3",
4
+ "description": "The OpenHarmony arm64 binary for esbuild, a JavaScript bundler. (Migrated from @esbuild/win32-x64@0.28.1: compiled from Go source for openharmony/arm64.)",
5
5
  "repository": {
6
6
  "type": "git",
7
- "url": "git+https://github.com/ohos-ports/ohos-ports.git",
8
- "directory": "ports/@ohos-ports/esbuild-openharmony-arm64/0.28.1"
7
+ "url": "https://github.com/ohos-ports/ohos-ports.git",
8
+ "directory": "ports/esbuild-openharmony-arm64/0.28.1"
9
9
  },
10
10
  "license": "MIT",
11
11
  "preferUnplugged": true,
@@ -17,5 +17,18 @@
17
17
  ],
18
18
  "cpu": [
19
19
  "arm64"
20
- ]
20
+ ],
21
+ "main": "index.js",
22
+ "bin": {
23
+ "esbuild": "bin/esbuild"
24
+ },
25
+ "files": [
26
+ "bin/esbuild",
27
+ "index.js",
28
+ "README.md"
29
+ ],
30
+ "bugs": {
31
+ "url": "https://github.com/ohos-ports/ohos-ports/issues"
32
+ },
33
+ "homepage": "https://github.com/ohos-ports/ohos-ports#readme"
21
34
  }