@arcships/light-ocr 0.5.7 → 0.5.8

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,7 +1,7 @@
1
1
  # @arcships/light-ocr
2
2
 
3
3
  [![npm version](https://img.shields.io/npm/v/%40arcships%2Flight-ocr?color=CB3837)](https://www.npmjs.com/package/@arcships/light-ocr)
4
- [![Node.js 22 and 24](https://img.shields.io/badge/Node.js-22%20%7C%2024-339933)](https://nodejs.org/)
4
+ [![Node.js 22+](https://img.shields.io/badge/Node.js-22%2B-339933)](https://nodejs.org/)
5
5
  [![Apache-2.0](https://img.shields.io/npm/l/%40arcships%2Flight-ocr)](https://github.com/arcships/light-ocr/blob/main/LICENSE)
6
6
 
7
7
  ![light-ocr](https://raw.githubusercontent.com/arcships/light-ocr/main/docs/assets/light-ocr-banner.png)
@@ -18,8 +18,8 @@ cloud APIs, postinstall downloads, or local native compilation.
18
18
  | **Input** | JPEG, PNG, PDF, `Uint8Array`, or decoded pixel buffers |
19
19
  | **Output** | text lines in reading order, confidence, quadrilateral boxes, and timing |
20
20
  | **Runtime** | CommonJS + ESM + bundled TypeScript declarations |
21
- | **Platforms** | macOS, Linux glibc, and Windows on x64 and ARM64 |
22
- | **Node.js** | 22 and 24 |
21
+ | **Platforms** | macOS, Linux (glibc and musl), and Windows on x64 and ARM64 |
22
+ | **Node.js** | 22 or newer; the 22/24 LTS lines are Tier 1, and the stable Node-API ABI lets newer majors load the same prebuilt binaries |
23
23
 
24
24
  ## Install
25
25
 
@@ -244,6 +244,8 @@ and ends with CPU as the stable fallback:
244
244
  | macOS on Intel | CPU |
245
245
  | Linux x64 with glibc | WebGPU through Vulkan, then CPU |
246
246
  | Linux arm64 with glibc | CPU |
247
+ | Linux x64 with musl (Alpine) | CPU |
248
+ | Linux arm64 with musl (Alpine) | CPU |
247
249
  | Windows x64 | WebGPU through D3D12, then CPU |
248
250
  | Windows arm64 | CPU |
249
251
 
package/package.json CHANGED
@@ -7,11 +7,11 @@
7
7
  },
8
8
  "dependencies": {
9
9
  "@arcships/light-ocr-model-ppocrv6-small": "0.3.4",
10
- "@arcships/light-ocr-runtime": "0.1.7"
10
+ "@arcships/light-ocr-runtime": "0.1.8"
11
11
  },
12
12
  "description": "Offline image and PDF OCR for Node.js — the stable PP-OCRv6 Small tier",
13
13
  "engines": {
14
- "node": "^22.0.0 || ^24.0.0"
14
+ "node": ">=22.0.0"
15
15
  },
16
16
  "exports": {
17
17
  ".": {
@@ -42,5 +42,5 @@
42
42
  },
43
43
  "type": "commonjs",
44
44
  "types": "./src/index.d.ts",
45
- "version": "0.5.7"
45
+ "version": "0.5.8"
46
46
  }
package/src/document.cjs CHANGED
@@ -3,7 +3,7 @@
3
3
  const fs = require('node:fs/promises');
4
4
  const path = require('node:path');
5
5
 
6
- const { OcrError } = require('@arcships/light-ocr-runtime');
6
+ const { OcrError, platformIdentity } = require('@arcships/light-ocr-runtime');
7
7
 
8
8
  const DEFAULTS = Object.freeze({
9
9
  dpi: 150,
@@ -19,14 +19,16 @@ let defaultCreateEngine;
19
19
 
20
20
  function platformPdfiumPackage() {
21
21
  const packages = {
22
- 'darwin-arm64': '@arcships/light-ocr-darwin-arm64',
23
- 'darwin-x64': '@arcships/light-ocr-darwin-x64',
22
+ 'macos-arm64': '@arcships/light-ocr-darwin-arm64',
23
+ 'macos-x64': '@arcships/light-ocr-darwin-x64',
24
24
  'linux-arm64': '@arcships/light-ocr-linux-arm64-gnu',
25
25
  'linux-x64': '@arcships/light-ocr-linux-x64-gnu',
26
- 'win32-arm64': '@arcships/light-ocr-win32-arm64',
27
- 'win32-x64': '@arcships/light-ocr-win32-x64',
26
+ 'linux-arm64-musl': '@arcships/light-ocr-linux-arm64-musl',
27
+ 'linux-x64-musl': '@arcships/light-ocr-linux-x64-musl',
28
+ 'windows-arm64': '@arcships/light-ocr-win32-arm64',
29
+ 'windows-x64': '@arcships/light-ocr-win32-x64',
28
30
  };
29
- return packages[`${process.platform}-${process.arch}`];
31
+ return packages[platformIdentity().id];
30
32
  }
31
33
 
32
34
  function loadPdfium() {