Skip to content

Commit aab3290

Browse files
committed
Fix windows i686
1 parent bc01841 commit aab3290

3 files changed

Lines changed: 12 additions & 39 deletions

File tree

.github/workflows/CI.yaml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -243,9 +243,7 @@ jobs:
243243
run: yarn build --target i686-pc-windows-msvc
244244

245245
- name: Test binary
246-
run: |
247-
node -v
248-
node simple-test.js
246+
run: yarn test
249247

250248
- name: Upload artifact
251249
uses: actions/upload-artifact@v2

package.json

Lines changed: 9 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,8 @@
55
"main": "index.js",
66
"repository": "git@github.com:napi-rs/package-template.git",
77
"license": "MIT",
8-
"keywords": [
9-
"napi-rs",
10-
"NAPI",
11-
"N-API",
12-
"Rust",
13-
"node-addon",
14-
"node-addon-api"
15-
],
16-
"files": [
17-
"index.d.ts",
18-
"index.js"
19-
],
8+
"keywords": ["napi-rs", "NAPI", "N-API", "Rust", "node-addon", "node-addon-api"],
9+
"files": ["index.d.ts", "index.js"],
2010
"napi": {
2111
"name": "package-template",
2212
"triples": {
@@ -75,27 +65,14 @@
7565
"@node-rs/helper": "^1.0.0-alpha.1"
7666
},
7767
"lint-staged": {
78-
"*.@(js|ts|tsx)": [
79-
"prettier --write",
80-
"eslint -c .eslintrc.yml --fix"
81-
],
82-
"*.@(yml|yaml)": [
83-
"prettier --parser yaml --write"
84-
],
85-
"*.md": [
86-
"prettier --parser markdown --write"
87-
],
88-
"*.json": [
89-
"prettier --parser json --write"
90-
]
68+
"*.@(js|ts|tsx)": ["prettier --write", "eslint -c .eslintrc.yml --fix"],
69+
"*.@(yml|yaml)": ["prettier --parser yaml --write"],
70+
"*.md": ["prettier --parser markdown --write"],
71+
"*.json": ["prettier --parser json --write"]
9172
},
9273
"ava": {
93-
"require": [
94-
"ts-node/register/transpile-only"
95-
],
96-
"extensions": [
97-
"ts"
98-
],
74+
"require": ["ts-node/register/transpile-only"],
75+
"extensions": ["ts"],
9976
"environmentVariables": {
10077
"TS_NODE_PROJECT": "./tsconfig.json"
10178
}
@@ -113,4 +90,4 @@
11390
"pre-commit": "lint-staged"
11491
}
11592
}
116-
}
93+
}

simple-test.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
11
const { exec } = require('child_process')
2-
const { stderr } = require('process')
32

43
exec(`node -e "console.log(require('./index.js'))"`, (err, stdout, stderr) => {
4+
console.info(stdout)
5+
console.info(stderr)
56
if (err) {
6-
console.error(err)
77
process.exit(1)
88
}
9-
console.info(stdout)
10-
console.info(stderr)
119
})

0 commit comments

Comments
 (0)