singularity-forge/packages/native/package.json
Lex Christopherson e6be5ac03f fix: compile @gsd/native to JS before publish
@gsd/native shipped raw .ts files in node_modules, which Node.js
refuses to import (ERR_UNSUPPORTED_NODE_MODULES_TYPE_STRIPPING on
Node 22/24, ERR_UNKNOWN_FILE_EXTENSION on Node 20). Add tsc build
step, point exports at dist/, and add to bundleDependencies.

Closes #248

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-13 14:05:41 -06:00

60 lines
1.7 KiB
JSON

{
"name": "@gsd/native",
"version": "0.1.0",
"description": "Native Rust bindings for GSD \u2014 high-performance native modules via N-API",
"type": "module",
"main": "./dist/index.js",
"types": "./dist/index.d.ts",
"scripts": {
"build": "tsc -p tsconfig.json",
"build:native": "node ../../native/scripts/build.js",
"build:native:dev": "node ../../native/scripts/build.js --dev",
"test": "node --test src/__tests__/grep.test.mjs src/__tests__/ps.test.mjs src/__tests__/glob.test.mjs src/__tests__/clipboard.test.mjs src/__tests__/highlight.test.mjs src/__tests__/html.test.mjs src/__tests__/text.test.mjs src/__tests__/fd.test.mjs src/__tests__/image.test.mjs"
},
"exports": {
".": {
"types": "./dist/index.d.ts",
"import": "./dist/index.js"
},
"./grep": {
"types": "./dist/grep/index.d.ts",
"import": "./dist/grep/index.js"
},
"./ps": {
"types": "./dist/ps/index.d.ts",
"import": "./dist/ps/index.js"
},
"./glob": {
"types": "./dist/glob/index.d.ts",
"import": "./dist/glob/index.js"
},
"./clipboard": {
"types": "./dist/clipboard/index.d.ts",
"import": "./dist/clipboard/index.js"
},
"./ast": {
"types": "./dist/ast/index.d.ts",
"import": "./dist/ast/index.js"
},
"./html": {
"types": "./dist/html/index.d.ts",
"import": "./dist/html/index.js"
},
"./text": {
"types": "./dist/text/index.d.ts",
"import": "./dist/text/index.js"
},
"./fd": {
"types": "./dist/fd/index.d.ts",
"import": "./dist/fd/index.js"
},
"./image": {
"types": "./dist/image/index.d.ts",
"import": "./dist/image/index.js"
}
},
"files": [
"dist"
],
"license": "MIT"
}