nomyo-js/package.json
alpha nerd 2495f1e6e8
Some checks failed
NYX Security Scan / nyx-scan (pull_request) Failing after 5m58s
fix: repair npm install and the rollup build
Three independent breakages, all present on main before this branch:

1. `npm ci` always exited non-zero. The root package.json carried
   "install": "node-gyp-build", but binding.gyp lives in native/, so the
   script ran in a directory with nothing to build:

     gyp: binding.gyp not found (cwd: <repo root>)

   native/package.json already declares that same install script in the
   right place, alongside its binding.gyp and "gypfile": true, so the
   root copy was a duplicate in the wrong package. Removing it also
   clears the now-inaccurate hasInstallScript flag from the lockfile.
   `npm ci` exits 0 again; the addon still builds from native/.

2. `npm run build` failed at the first step. @rollup/plugin-typescript
   requires tslib as a peer, and nothing depended on it directly — it was
   only present transitively as an optional dev dep, so a clean install
   could omit it entirely. Declared explicitly.

3. rollup.config.js used ESM syntax while package.json has no
   "type": "module", so Node parsed it as CommonJS and threw
   "Cannot use import statement outside a module". Node 24 recovers by
   reparsing (with a warning); Node 18 fails outright. Renamed to
   rollup.config.mjs, which is unambiguous on both. Setting
   "type": "module" instead would have broken jest.config.js, which is
   CommonJS.

Verified on Node 18.19.1 and Node 24.18.0: npm ci exits 0, npm run build
produces all three bundles plus declarations, and 76/76 tests pass.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-19 11:10:36 +02:00

70 lines
2 KiB
JSON

{
"name": "nomyo-js",
"version": "0.1.0",
"description": "OpenAI-compatible secure chat client with end-to-end encryption",
"main": "dist/node/index.js",
"browser": "dist/browser/index.js",
"module": "dist/esm/index.js",
"types": "dist/types/index.d.ts",
"exports": {
".": {
"node": {
"require": "./dist/node/index.js",
"import": "./dist/esm/index.js"
},
"browser": {
"import": "./dist/browser/index.js",
"require": "./dist/browser/index.js"
},
"types": "./dist/types/index.d.ts"
}
},
"files": [
"dist",
"native",
"README.md",
"LICENSE"
],
"scripts": {
"build": "npm run build:node && npm run build:browser && npm run build:types",
"build:node": "rollup -c --environment TARGET:node",
"build:browser": "rollup -c --environment TARGET:browser",
"build:types": "tsc --emitDeclarationOnly",
"test": "jest",
"test:browser": "karma start",
"prepublishOnly": "npm run build && npm test"
},
"keywords": [
"openai",
"encryption",
"secure",
"chat",
"e2e",
"privacy",
"nomyo"
],
"author": "",
"license": "Apache-2.0",
"engines": {
"node": ">=22.22.2"
},
"devDependencies": {
"@rollup/plugin-commonjs": "^29.0.0",
"@rollup/plugin-node-resolve": "^16.0.0",
"@rollup/plugin-typescript": "^12.0.0",
"@types/jest": "^30.0.0",
"@types/node": "^24.0.0",
"jest": "^30.0.0",
"karma": "^6.4.0",
"node-addon-api": "^8.6.0",
"node-gyp": "^13.0.0",
"node-gyp-build": "^4.8.0",
"rollup": "^4.0.0",
"ts-jest": "^29.4.6",
"tslib": "^2.8.1",
"typescript": "^6.0.0"
},
"optionalDependencies": {
"nomyo-native": "file:./native"
}
}