Skip to content

Commit

Permalink
chore: upgrade dependencies (#1657)
Browse files Browse the repository at this point in the history
  • Loading branch information
Brooooooklyn committed Jul 17, 2023
1 parent 73a704a commit 6d62b3f
Show file tree
Hide file tree
Showing 16 changed files with 1,038 additions and 1,905 deletions.
2 changes: 1 addition & 1 deletion .eslintrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ plugins:

extends:
- eslint:recommended
- plugin:prettier/recommended
- prettier

globals:
BigInt: 'readonly'
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ jobs:
key: ${{ matrix.settings.host }}-${{ matrix.settings.toolchain }}-${{ matrix.settings.target }}-cargo-cache

- name: 'Install dependencies'
shell: bash
run: yarn install --mode=skip-build --immutable

- name: Check build
Expand Down Expand Up @@ -227,7 +228,10 @@ jobs:
cache: 'yarn'

- name: Install dependencies
run: yarn install --immutable --mode=skip-build
run: |
yarn config set supportedArchitectures.cpu --json '["x64", "arm64"]'
yarn config set supportedArchitectures.libc --json '["musl", "glibc"]'
yarn install --immutable --mode=skip-build
- name: Cache cargo
uses: actions/cache@v3
Expand Down
20 changes: 10 additions & 10 deletions cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,24 +67,24 @@
"url": "https://github.com/napi-rs/napi-rs/issues"
},
"dependencies": {
"@octokit/rest": "^20.0.0",
"clipanion": "^3.2.0",
"colorette": "^2.0.19",
"@octokit/rest": "^20.0.1",
"clipanion": "^3.2.1",
"colorette": "^2.0.20",
"debug": "^4.3.4",
"inquirer": "^9.1.5",
"inquirer": "^9.2.8",
"js-yaml": "^4.1.0",
"lodash-es": "^4.17.21",
"typanion": "^3.12.1"
"typanion": "^3.13.0"
},
"devDependencies": {
"@types/inquirer": "^9.0.3",
"@types/js-yaml": "^4.0.5",
"@types/lodash-es": "^4.17.7",
"ava": "^5.2.0",
"esbuild": "^0.18.0",
"prettier": "^2.8.7",
"@types/lodash-es": "^4.17.8",
"ava": "^5.3.1",
"esbuild": "^0.18.13",
"prettier": "^3.0.0",
"ts-node": "^10.9.1",
"typescript": "^5.1.3"
"typescript": "^5.1.6"
},
"funding": {
"type": "github",
Expand Down
4 changes: 2 additions & 2 deletions cli/src/api/artifacts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ export async function collectArtifacts(userOptions: ArtifactsOptions) {
const universalSourceBins = new Set(
targets
.filter((platform) => platform.arch === 'universal')
.flatMap((p) =>
UniArchsByPlatform[p.platform]?.map((a) => `${p.platform}-${a}`),
.flatMap(
(p) => UniArchsByPlatform[p.platform]?.map((a) => `${p.platform}-${a}`),
)
.filter(Boolean) as string[],
)
Expand Down
1 change: 1 addition & 0 deletions cli/src/api/build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -565,6 +565,7 @@ class Builder {
private async writeJsBinding(idents: string[]) {
if (
!this.options.platform ||
// eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
this.options.noJsBinding ||
idents.length === 0
) {
Expand Down
13 changes: 8 additions & 5 deletions cli/src/api/pre-publish.ts
Original file line number Diff line number Diff line change
Expand Up @@ -129,11 +129,14 @@ export async function prePublish(userOptions: PrePublishOptions) {
if (!options.dryRun) {
await version(userOptions)
await updatePackageJson(packageJsonPath, {
optionalDependencies: targets.reduce((deps, target) => {
deps[`${packageName}-${target.platformArchABI}`] = packageJson.version

return deps
}, {} as Record<string, string>),
optionalDependencies: targets.reduce(
(deps, target) => {
deps[`${packageName}-${target.platformArchABI}`] = packageJson.version

return deps
},
{} as Record<string, string>,
),
})
}

Expand Down
4 changes: 1 addition & 3 deletions cli/src/api/templates/ci-template.ts
Original file line number Diff line number Diff line change
Expand Up @@ -198,9 +198,7 @@ jobs:
usesh: true
mem: 3000
prepare: |
pkg install -y -f curl node libnghttp2
curl -qL https://www.npmjs.com/install.sh | sh
npm install --location=global --ignore-scripts yarn
pkg install -y -f curl node libnghttp2 npm yarn
curl https://sh.rustup.rs -sSf --output rustup.sh
sh rustup.sh -y --profile minimal --default-toolchain beta
export PATH="/usr/local/cargo/bin:$PATH"
Expand Down
4 changes: 3 additions & 1 deletion crates/napi/src/js_values/deferred.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ use std::os::raw::c_void;
use std::ptr;

use crate::bindgen_runtime::{ToNapiValue, THREAD_DESTROYED};
use crate::{check_status, JsError, JsObject, Value};
#[cfg(feature = "deferred_trace")]
use crate::JsError;
use crate::{check_status, JsObject, Value};
use crate::{sys, Env, Error, Result};
#[cfg(feature = "deferred_trace")]
use crate::{NapiRaw, NapiValue};
Expand Down
4 changes: 2 additions & 2 deletions examples/napi-compat-mode/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
},
"devDependencies": {
"@napi-rs/cli": "workspace:*",
"ava": "^5.2.0",
"sinon": "^15.0.3"
"ava": "^5.3.1",
"sinon": "^15.2.0"
},
"ava": {
"extensions": [
Expand Down
2 changes: 1 addition & 1 deletion examples/napi/electron-renderer/index.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!DOCTYPE html>
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
Expand Down
6 changes: 3 additions & 3 deletions examples/napi/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@
},
"devDependencies": {
"@napi-rs/cli": "workspace:*",
"@types/lodash": "^4.14.192",
"ava": "^5.2.0",
"@types/lodash": "^4.14.195",
"ava": "^5.3.1",
"lodash": "^4.17.21",
"sinon": "^15.0.3"
"sinon": "^15.2.0"
},
"ava": {
"extensions": [
Expand Down
2 changes: 0 additions & 2 deletions lerna.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
{
"packages": ["cli", "triples"],
"version": "independent",
"useWorkspaces": true,
"npmClient": "yarn",
"message": "chore: publish"
}
6 changes: 3 additions & 3 deletions memory-testing/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@
"build": "napi-raw build --release --no-js"
},
"dependencies": {
"colorette": "^2.0.19",
"colorette": "^2.0.20",
"dockerode": "^3.3.5",
"pretty-bytes": "^6.1.0",
"pretty-bytes": "^6.1.1",
"table": "^6.8.1"
},
"devDependencies": {
"@napi-rs/cli": "workspace:*",
"@types/dockerode": "^3.3.16"
"@types/dockerode": "^3.3.19"
}
}
40 changes: 19 additions & 21 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@
"memory-testing",
"examples/napi",
"examples/napi-compat-mode",
"examples/binary",
"crates/cli"
"examples/binary"
],
"repository": {
"type": "git",
Expand All @@ -22,7 +21,7 @@
"build": "lerna run build --scope '@napi-rs/*'",
"build:bench": "yarn workspace bench build",
"build:memory": "yarn workspace memory-testing build",
"build:test": "lerna run build --stream --concurrency 1 --scope '@examples/*'",
"build:test": "lerna run build --stream --concurrency 1 --scope=\"@examples/*\"",
"format": "run-p format:prettier format:rs format:toml",
"format:prettier": "prettier . -w",
"format:rs": "cargo fmt",
Expand Down Expand Up @@ -69,37 +68,36 @@
"devDependencies": {
"@napi-rs/cli": "workspace:*",
"@rollup/plugin-alias": "^5.0.0",
"@rollup/plugin-commonjs": "^25.0.0",
"@rollup/plugin-commonjs": "^25.0.3",
"@rollup/plugin-json": "^6.0.0",
"@rollup/plugin-node-resolve": "^15.0.2",
"@rollup/plugin-node-resolve": "^15.1.0",
"@rollup/plugin-replace": "^5.0.2",
"@taplo/cli": "^0.5.2",
"@types/debug": "^4.1.7",
"@types/lodash-es": "^4.17.7",
"@types/node": "^18.15.11",
"@types/sinon": "^10.0.13",
"@typescript-eslint/eslint-plugin": "^5.57.1",
"@typescript-eslint/parser": "^5.57.1",
"ava": "^5.2.0",
"@types/debug": "^4.1.8",
"@types/lodash-es": "^4.17.8",
"@types/node": "^20.4.2",
"@types/sinon": "^10.0.15",
"@typescript-eslint/eslint-plugin": "^6.0.0",
"@typescript-eslint/parser": "^6.0.0",
"ava": "^5.3.1",
"c8": "^8.0.0",
"cross-env": "^7.0.3",
"electron": "25.3.0",
"esbuild": "^0.18.0",
"eslint": "^8.38.0",
"esbuild": "^0.18.13",
"eslint": "^8.45.0",
"eslint-config-prettier": "^8.8.0",
"eslint-plugin-import": "^2.27.5",
"eslint-plugin-prettier": "^4.2.1",
"husky": "^8.0.3",
"lerna": "^6.6.1",
"lint-staged": "^13.2.1",
"lerna": "^7.1.4",
"lint-staged": "^13.2.3",
"npm-run-all": "^4.1.5",
"prettier": "^2.8.7",
"prettier": "^3.0.0",
"shx": "^0.3.4",
"sinon": "^15.0.3",
"sinon": "^15.2.0",
"source-map-support": "^0.5.21",
"ts-node": "^10.9.1",
"tslib": "^2.5.0",
"typescript": "^5.1.3"
"tslib": "^2.6.0",
"typescript": "^5.1.6"
},
"packageManager": "yarn@3.6.1"
}
4 changes: 2 additions & 2 deletions triples/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,11 @@
"url": "https://github.com/napi-rs/napi-rs/issues"
},
"scripts": {
"build": "node --loader ts-node/esm/transpile-only ./generate-triple-list.ts"
"build": "node --loader ts-node/esm/transpile-only ./generate-triple-list.ts && prettier --write ./index.cjs"
},
"devDependencies": {
"lodash-es": "^4.17.21",
"ts-node": "^10.9.1",
"typescript": "^5.0.4"
"typescript": "^5.1.6"
}
}

0 comments on commit 6d62b3f

Please sign in to comment.