napi-rs/examples/napi/package.json
copilot-swe-agent[bot] 6aac7bf9da Fix test commands to use find + xargs for file discovery
- Node.js --test flag doesn't support glob patterns directly
- Changed test commands to use find + xargs pattern
- This ensures all test files are discovered and passed to node --test
- Works reliably across different shell environments

Co-authored-by: Brooooooklyn <3468483+Brooooooklyn@users.noreply.github.com>
2025-10-12 04:17:46 +00:00

56 lines
1.5 KiB
JSON

{
"name": "@examples/napi",
"private": true,
"version": "0.0.0",
"type": "module",
"main": "./index.js",
"types": "./index.d.ts",
"scripts": {
"browser": "vite",
"build": "napi-raw build --platform --js index.cjs --dts index.d.cts",
"test": "cross-env TS_NODE_PROJECT=./tsconfig.json sh -c 'find __tests__ \\( -name \"*.spec.ts\" -o -name \"*.spec.js\" \\) | xargs node --import @oxc-node/core/register --test'",
"test-js": "find __tests__ -name '*.spec.js' | xargs node --test"
},
"napi": {
"binaryName": "example",
"wasm": {
"initialMemory": 16384,
"browser": {
"fs": true,
"buffer": true
}
},
"dtsHeader": "type MaybePromise<T> = T | Promise<T>",
"dtsHeaderFile": "./dts-header.d.ts",
"targets": [
"wasm32-wasip1-threads"
]
},
"devDependencies": {
"@napi-rs/cli": "workspace:*",
"@napi-rs/triples": "workspace:*",
"@napi-rs/wasm-runtime": "workspace:*",
"@oxc-node/core": "^0.0.32",
"@testing-library/dom": "^10.4.1",
"@types/lodash": "^4.17.20",
"@vitest/browser": "^3.2.4",
"@vitest/ui": "^3.2.4",
"buffer": "^6.0.3",
"core-js": "^3.45.1",
"cross-env": "10.1.0",
"electron": "^38.1.0",
"lodash": "^4.17.21",
"playwright": "^1.55.0",
"rxjs": "^7.8.2",
"sinon": "^21.0.0",
"vite": "^7.1.5",
"vite-plugin-node-polyfills": "^0.24.0",
"vitest": "^3.2.4",
"web-streams-polyfill": "^4.2.0",
"webdriverio": "^9.19.2"
},
"dependencies": {
"@emnapi/core": "^1.5.0"
}
}