Skip to content

Commit bdc8e93

Browse files
authored
Merge pull request #106 from napi-rs/upgrade-npm
chore: upgrade napi-rs npm package
2 parents 53c73e1 + c3c447e commit bdc8e93

File tree

13 files changed

+1291
-1273
lines changed

13 files changed

+1291
-1273
lines changed

.github/workflows/ci.yaml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -136,8 +136,8 @@ jobs:
136136
- name: Upload artifact
137137
uses: actions/upload-artifact@v2
138138
with:
139-
name: bindings-musl
140-
path: packages/*/*.musl.node
139+
name: bindings-linux-musl
140+
path: packages/**/*.node
141141

142142
test_binding:
143143
name: Test bindings on ${{ matrix.os }} - node@${{ matrix.node }}
@@ -195,7 +195,6 @@ jobs:
195195
test_musl_binding:
196196
name: Test bindings on alpine - node@${{ matrix.node }}
197197
needs:
198-
- lint_and_build
199198
- build_musl
200199
strategy:
201200
fail-fast: false
@@ -209,14 +208,14 @@ jobs:
209208
- name: Download artifacts
210209
uses: actions/download-artifact@v2
211210
with:
212-
name: bindings-musl
211+
name: bindings-linux-musl
213212
path: artifacts
214213

215214
- name: Move artifacts
216215
run: node scripts/mv-artifacts.js
217216
shell: bash
218217
env:
219-
MOVE_TARGET: musl
218+
MOVE_TARGET: linux-musl
220219

221220
- name: List packages
222221
run: ls -R packages

package.json

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,30 +20,30 @@
2020
"typecheck": "tsc -b tsconfig.project.json -verbose"
2121
},
2222
"devDependencies": {
23-
"@octokit/rest": "^18.0.0",
24-
"@typescript-eslint/eslint-plugin": "^3.6.1",
25-
"@typescript-eslint/parser": "^3.6.1",
26-
"ava": "^3.10.1",
23+
"@octokit/rest": "^18.0.3",
24+
"@typescript-eslint/eslint-plugin": "^3.9.1",
25+
"@typescript-eslint/parser": "^3.9.1",
26+
"ava": "^3.11.1",
2727
"benchmark": "^2.1.4",
2828
"chalk": "^4.1.0",
29-
"codecov": "^3.7.0",
29+
"codecov": "^3.7.2",
3030
"cross-env": "^7.0.2",
31-
"eslint": "^7.4.0",
31+
"eslint": "^7.7.0",
3232
"eslint-config-prettier": "^6.11.0",
3333
"eslint-plugin-import": "^2.22.0",
3434
"eslint-plugin-prettier": "^3.1.4",
3535
"eslint-plugin-sonarjs": "^0.5.0",
3636
"husky": "^4.2.5",
3737
"lerna": "^3.22.1",
3838
"lint-staged": "^10.2.11",
39-
"napi-rs": "^0.2.4",
39+
"napi-rs": "^0.2.6",
4040
"npm-run-all": "^4.1.5",
4141
"nyc": "^15.1.0",
4242
"prettier": "^2.0.5",
4343
"putasset": "^5.0.3",
4444
"ts-node": "^8.10.2",
4545
"tsconfig-paths": "^3.9.0",
46-
"typescript": "^3.9.6"
46+
"typescript": "^4.0.2"
4747
},
4848
"ava": {
4949
"extensions": ["ts"],

packages/bcrypt/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@
2323
},
2424
"scripts": {
2525
"bench": "cross-env NODE_ENV=production node benchmark/bcrypt.js",
26-
"build": "napi --release ./bcrypt",
27-
"build:debug": "napi ./bcrypt"
26+
"build": "napi build --platform --release ./bcrypt",
27+
"build:debug": "napi build --platform ./bcrypt"
2828
},
2929
"bugs": {
3030
"url": "https://github.com/napi-rs/node-rs/issues"

packages/crc32/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@
2323
},
2424
"scripts": {
2525
"bench": "cross-env NODE_ENV=production node benchmark/crc32.js",
26-
"build": "napi --release ./crc32",
27-
"build:debug": "napi ./crc32"
26+
"build": "napi build --platform --release ./crc32",
27+
"build:debug": "napi build --platform ./crc32"
2828
},
2929
"bugs": {
3030
"url": "https://github.com/napi-rs/node-rs/issues"
File renamed without changes.

packages/deno-lint/npm/musl/package.json renamed to packages/deno-lint/npm/linux-musl/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
"author": "LongYinan <[email protected]>",
77
"homepage": "https://github.com/napi-rs/node-rs",
88
"license": "MIT",
9-
"main": "deno-lint.musl.node",
10-
"files": ["deno-lint.musl.node"],
9+
"main": "deno-lint.linux-musl.node",
10+
"files": ["deno-lint.linux-musl.node"],
1111
"os": ["linux"],
1212
"cpu": ["x64"],
1313
"engines": {

packages/deno-lint/package.json

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@
2727
},
2828
"scripts": {
2929
"bench": "cross-env NODE_ENV=production node benchmark/lint.js",
30-
"build": "napi --release ./deno-lint",
31-
"build:debug": "napi ./deno-lint",
30+
"build": "napi build --platform --release ./deno-lint",
31+
"build:debug": "napi build --platform ./deno-lint",
3232
"prepublishOnly": "node ./publish.js",
3333
"version": "node ./version.js"
3434
},
@@ -41,5 +41,10 @@
4141
},
4242
"devDependencies": {
4343
"@types/webpack": "^4.41.21"
44+
},
45+
"optionalDependencies": {
46+
"@node-rs/deno-lint-win32": "^0.1.0",
47+
"@node-rs/deno-lint-darwin": "^0.1.0",
48+
"@node-rs/deno-lint-linux": "^0.1.0"
4449
}
4550
}

packages/deno-lint/publish.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ updatePackageJson(path.join(__dirname, 'package.json'), {
1313
}, {}),
1414
})
1515

16-
for (const name of [...platforms, 'musl']) {
16+
for (const name of [...platforms, 'linux-musl']) {
1717
const pkgDir = path.join(__dirname, 'npm', name)
1818
const filename = `deno-lint.${name}.node`
1919
const bindingFile = fs.readFileSync(path.join(__dirname, filename))

packages/deno-lint/version.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ const { version } = require('./package.json')
55
const platforms = require('./platforms')
66
const updatePackageJson = require('./update-package')
77

8-
for (const name of [...platforms, 'musl']) {
8+
for (const name of [...platforms, 'linux-musl']) {
99
const pkgDir = path.join(__dirname, 'npm', name)
1010
updatePackageJson(path.join(pkgDir, 'package.json'), {
1111
version,

packages/helper/src/loader.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ export function loadBinding(dirname: string, filename = 'index') {
1818
try {
1919
return require(bindingFilePath)
2020
} catch {
21-
return require(join(dirname, `${filename}.musl.node`))
21+
return require(join(dirname, `${filename}.linux-musl.node`))
2222
}
2323
}
2424

0 commit comments

Comments
 (0)