Skip to content

Releases

sharp 0.35.5-ohos.2 for HarmonyOS ARM64

Choose a tag to compare

@kdada kdada released this 17 Oct 18:21
Immutable release. Only release title and notes can be modified.

sharp 0.35.5-ohos.2 fixes initialization when HarmonyOS Node creates Unix socket pairs for stdin, stdout, stderr, or fork IPC. The previous package could fail before exporting the image API because Node's statx path rejects valid standard socket descriptors with EBADF.

The package still uses the pinned official @img/sharp-wasm32 0.35.5 engine and libvips 8.18.7. One JavaScript standard-stream initialization fragment calls a local helper: it tries fstat first, and only on OpenHarmony EBADF for fd 0–2 may it initialize the NODERAWFS node with a validated kernel socket inode and type. It does not create fs.Stats, alter Node fs functions, or change the WASM binary. Other errors and closed descriptors remain failures.

Validated on HarmonyOS ARM64 with Node 24.21.0:

  • Two independent offline builds produce identical archives.
  • 36 related stdio cases pass: spawn/fork/eval, CJS/ESM, IPC request/ack, file/FIFO controls, and closed-descriptor rejection.
  • Live cases compare each inherited descriptor with Python os.fstat, exercise the actual engine's WASI stdin/stdout/stderr, and check exact PNG pixels and asymmetric rotation.
  • Private npm installation and relocation to a path with spaces each pass all eight native image acceptance cases.

Archive: sharp-0.35.5-ohos.2.tgz (3,939,677 bytes).
SHA-256: 531aaf2dcc74f0242ff481a5210eabc36a220fa9bf01ea13ab3ea21dac265fcb.
Source: 6b121e2; upstream: 51a990f.

The archive contains a complete npm package under package/. It provides no command-line executable. The official WASM engine's format, memory, and text-rendering limitations still apply. General Node socket fstat behavior remains unchanged. The previous 0.35.5-ohos.1 release remains intact.

v0.35.5-ohos.1

Choose a tag to compare

@kdada kdada released this 17 Oct 14:19
Immutable release. Only release title and notes can be modified.

HarmonyOS ARM64 sharp 0.35.5-ohos.1, for consumers pinned to upstream sharp 0.35.5, including DeepSeek Harness 0.2.1-rc.2.

  • Upstream: lovell/sharp v0.35.5, commit 51a990faa26ade5586a4934ac9673c98d8893326.
  • Verified port commit: 325f85ab72d58ba2dc88c3d97def54c361468332; default branch ohos/0.35.5 retains upstream history.
  • Runtime: unmodified official @img/sharp-wasm32@0.35.5, libvips 8.18.7, sharp-libvips 1.3.4. HarmonyOS ARM64 explicitly selects WASM inside Node.js. This continues the existing port's WASM design; native libvips and the upstream WASM engine were not rebuilt.
  • Runtime and test dependencies are complete pinned archives in tpr/. Source/provenance recipes, URLs, licenses, SHA256 and npm SHA512 are recorded in ohos/SOURCES.json. Original dependency licenses plus WASM notices and LGPL/GPL texts are included. Build and installation do not download dependencies.

Native acceptance completed on HarmonyOS ARM64, Node.js v24.21.0, Python 3.14.7 before creating the tag or release:

  • Two fresh offline builds produced byte-identical tgz files.
  • Python parsing, all 27 JavaScript syntax checks and git diff --check passed.
  • Direct package, extraction to an independent path with spaces, and isolated npm --offline --ignore-scripts installation each passed all 8 native acceptance groups.
  • CJS, ESM, eval and stdin entry points passed. Tests cover real upstream fixtures, EXIF auto-orientation, JPEG/PNG/WebP resizing, raw pixels and half transparency, compositing, rotation/crop pixel coordinates, concurrency, streams, Unicode/file paths and error cases.
  • Complete upstream unit suite: 59 files, 1803 tests, 1796 passed, 7 skipped, 0 failed, 0 cancelled. Six skips concern unavailable native text rendering; one concerns the native 64-bit 4096 MB cache limit.
  • No ELF binaries are present, so no new ELF signing is applicable. All packaging and acceptance ran on the HarmonyOS host.

Reproduce from a clean checkout with Node.js 24, Python 3, Git and an application-private TMPDIR:

python3 ohos/verify.py --output "$XDG_CACHE_HOME/sharp-0.35.5/reproduce-release"

The output path must be new. The verifier uses real standard streams and launches each upstream unit file as an independent ordinary Node process. This HarmonyOS Node build can expose EBADF standard file descriptors in node --test isolation children; Emscripten NODERAWFS requires valid stdin/stdout/stderr. The upstream test adaptations recognize HarmonyOS and distinguish actual WASM32 memory/Buffer behavior from native ARM64.

The tgz is an npm library package with one top-level package/ directory and its complete bundled node_modules. It has no CLI command. To use it in an isolated project, extract it and place package/ at node_modules/sharp, or install the local tgz with npm:

npm install --offline --ignore-scripts --no-audit --no-fund /absolute/path/sharp-0.35.5-ohos.1.tgz

Software-directory integration is separate; after that update, project-local installation uses oo install sharp --.

WASM retains upstream memory, performance and codec limitations and does not provide native text rendering. Query sharp.format for available codecs. Acceptance is evidence for this HarmonyOS host/runtime, not a claim about every device or native libvips feature.

Main artifact: sharp-0.35.5-ohos.1.tgz, 3937861 bytes.

SHA256:

ebe84217f42c1c6761559d6371ca7188a6957da1ca7cb5283366ecd69d5c2ce8

The release includes the package checksum, complete checksum list, machine-readable validation and individual validation logs. All attachments are uploaded before publication under GitHub native release immutability. Historical 0.35.3-ohos.1 artifacts remain unchanged.

sharp 0.35.3 for HarmonyOS ARM64 (ohos.1)

Choose a tag to compare

@kdada kdada released this 12 Sep 09:22

HarmonyOS PC ARM64 adaptation of sharp 0.35.3, package version 0.35.3-ohos.1.

The package explicitly selects the upstream WebAssembly engine on HarmonyOS and bundles its exact runtime dependencies. Installation runs no scripts and needs Node.js 24; no ELF signing is needed for this JavaScript/WASM distribution. The source branch contains an offline build recipe, verified npm input archives and hashes, and retained upstream licenses.

Native acceptance on HarmonyOS with Node.js 24.21.0 passed CommonJS and ESM imports, PNG/JPEG/WebP encoding and decoding, metadata, resize, pixel values and invalid input. The released tgz was also extracted and tested in an independent application-private path containing spaces.

After catalog deployment: oo update then oo install sharp in the target npm project. Upstream WASM memory, performance and format limitations apply; this is not a native libvips build. Other codecs and the complete sharp API have not been accepted on this host. See ohos/README.md for build and usage details.