Skip to content

Commit

Permalink
feat(*): upgrade dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
Brooooooklyn committed Apr 24, 2023
1 parent 66d56e4 commit a0ef7de
Show file tree
Hide file tree
Showing 22 changed files with 1,642 additions and 855 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ jobs:
uses: dtolnay/rust-toolchain@stable
if: ${{ !matrix.settings.docker }}
with:
toolchain: nightly-2023-03-01
toolchain: nightly-2023-04-23
targets: ${{ matrix.settings.target }}

- name: Cache cargo registry
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
- name: Install
uses: dtolnay/rust-toolchain@stable
with:
toolchain: nightly-2023-03-01
toolchain: nightly-2023-04-23
components: rustfmt, clippy

- name: 'Install dependencies'
Expand Down
6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ members = [
]

[profile.release]
codegen-units = 1
lto = true
codegen-units = 1
lto = true
overflow-checks = false
strip = 'symbols'
strip = 'symbols'
2 changes: 1 addition & 1 deletion crates/alloc/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
edition = "2021"
name = "global_alloc"
name = "global_alloc"
version = "0.1.0"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
Expand Down
24 changes: 12 additions & 12 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,29 +25,29 @@
},
"devDependencies": {
"@napi-rs/cli": "2.15.2",
"@swc-node/core": "^1.10.1",
"@swc-node/register": "^1.6.2",
"@swc/core": "^1.3.37",
"@swc-node/core": "^1.10.3",
"@swc-node/register": "^1.6.4",
"@swc/core": "^1.3.53",
"@taplo/cli": "^0.5.2",
"@types/node": "^18.14.6",
"@typescript-eslint/eslint-plugin": "^5.54.0",
"@typescript-eslint/parser": "^5.54.0",
"@types/node": "^18.16.0",
"@typescript-eslint/eslint-plugin": "^5.59.0",
"@typescript-eslint/parser": "^5.59.0",
"ava": "^5.2.0",
"benchmark": "^2.1.4",
"codecov": "^3.8.3",
"cross-env": "^7.0.3",
"eslint": "^8.35.0",
"eslint-config-prettier": "^8.6.0",
"eslint": "^8.39.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.5.1",
"lint-staged": "^13.1.2",
"lerna": "^6.6.1",
"lint-staged": "^13.2.1",
"npm-run-all": "^4.1.5",
"prettier": "^2.8.4",
"prettier": "^2.8.8",
"ts-node": "^10.9.1",
"tslib": "^2.5.0",
"typescript": "^4.9.5"
"typescript": "^5.0.4"
},
"lint-staged": {
"*.@(js|ts|tsx)": [
Expand Down
6 changes: 3 additions & 3 deletions packages/argon2/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
[package]
edition = "2021"
name = "node-rs_argon2"
name = "node-rs_argon2"
version = "0.0.0"

[lib]
crate-type = ["cdylib"]

[dependencies]
argon2 = { version = "0.4", features = ["parallel"] }
napi = { version = "2", default-features = false, features = ["napi3"] }
argon2 = "0.5"
global_alloc = { path = "../../crates/alloc" }
napi = { version = "2", default-features = false, features = ["napi3"] }
napi-derive = { version = "2", default-features = false, features = [
"type-def",
] }
Expand Down
6 changes: 6 additions & 0 deletions packages/argon2/index.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
/* tslint:disable */
/* eslint-disable */
/* prettier-ignore */

/* auto-generated by NAPI-RS */

const { existsSync, readFileSync } = require('fs')
const { join } = require('path')

Expand Down
7 changes: 4 additions & 3 deletions packages/argon2/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,13 @@
"scripts": {
"artifacts": "napi artifacts -d ../../artifacts",
"bench": "cross-env NODE_ENV=production node benchmark/argon2.js",
"build": "napi build --platform --release --pipe \"prettier -w\"",
"build:debug": "napi build --platform --pipe \"prettier -w\"",
"build": "napi build --platform --release",
"build:debug": "napi build --platform",
"prepublishOnly": "napi prepublish",
"version": "napi version"
},
"devDependencies": {
"argon2": "^0.30.3"
"argon2": "^0.30.3",
"cross-env": "^7.0.3"
}
}
2 changes: 1 addition & 1 deletion packages/argon2/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ impl Task for RawHashTask {
let generated_salt = SaltString::generate(&mut OsRng);
hasher.hash_password_into(
self.password.as_slice(),
generated_salt.as_bytes(),
generated_salt.as_str().as_bytes(),
&mut output,
)
}
Expand Down
14 changes: 7 additions & 7 deletions packages/bcrypt/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
[package]
authors = ["LongYinan <lynweklm@gmail.com>"]
edition = "2021"
name = "node-rs-bcrypt"
name = "node-rs-bcrypt"
version = "0.1.0"

[lib]
crate-type = ["cdylib"]

[dependencies]
bcrypt = "0.14"
blowfish = { version = "0.9", features = ["bcrypt"] }
base64 = { version = "0.21" }
bcrypt = "0.14"
blowfish = { version = "0.9", features = ["bcrypt"] }
getrandom = "0.2"
global_alloc = { path = "../../crates/alloc" }
napi = { version = "2", default-features = false, features = ["napi3"] }
napi-derive = { version = "2" }
getrandom = "0.2"
base64 = { version = "0.20" }
napi = { version = "2", default-features = false, features = ["napi3"] }
napi-derive = { version = "2" }

[dev-dependencies]
quickcheck = "1.0"
Expand Down
6 changes: 6 additions & 0 deletions packages/bcrypt/binding.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
/* tslint:disable */
/* eslint-disable */
/* prettier-ignore */

/* auto-generated by NAPI-RS */

const { existsSync, readFileSync } = require('fs')
const { join } = require('path')

Expand Down
7 changes: 4 additions & 3 deletions packages/bcrypt/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@
"scripts": {
"artifacts": "napi artifacts -d ../../artifacts",
"bench": "cross-env NODE_ENV=production node benchmark/bcrypt.js",
"build": "napi build --platform --release --js binding.js --dts binding.d.ts --pipe \"prettier -w\"",
"build:debug": "napi build --platform --pipe \"prettier -w\"",
"build": "napi build --platform --release --js binding.js --dts binding.d.ts",
"build:debug": "napi build --platform",
"prepublishOnly": "napi prepublish",
"version": "napi version"
},
Expand All @@ -69,7 +69,8 @@
"devDependencies": {
"@types/bcrypt": "^5.0.0",
"bcrypt": "^5.1.0",
"bcryptjs": "^2.4.3"
"bcryptjs": "^2.4.3",
"cross-env": "^7.0.3"
},
"funding": {
"type": "github",
Expand Down
12 changes: 5 additions & 7 deletions packages/bcrypt/src/salt_task.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
use base64::engine::Engine;
use getrandom::getrandom;
use napi::{Env, Error, Result, Status, Task};
use napi_derive::napi;
Expand All @@ -16,14 +17,11 @@ pub(crate) fn gen_salt() -> bcrypt::BcryptResult<[u8; 16]> {
#[inline]
pub(crate) fn format_salt(rounds: u32, version: &Version, salt: &[u8; 16]) -> String {
let mut base64_string = String::new();
base64::encode_engine_string(
salt,
&mut base64_string,
&base64::engine::fast_portable::FastPortable::from(
&base64::alphabet::BCRYPT,
base64::engine::fast_portable::PAD,
),
let engine = base64::engine::general_purpose::GeneralPurpose::new(
&base64::alphabet::BCRYPT,
base64::engine::general_purpose::PAD,
);
engine.encode_string(salt, &mut base64_string);
format!("${version}${rounds:0>2}${base64_string}")
}

Expand Down
10 changes: 5 additions & 5 deletions packages/crc32/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
[package]
authors = ["LongYinan <lynweklm@gmail.com>"]
edition = "2021"
name = "node-rs-crc32"
name = "node-rs-crc32"
version = "0.1.0"

[lib]
crate-type = ["cdylib"]

[dependencies]
crc32c = { version = "0.6" }
crc32fast = { version = "1.3", features = ["nightly"] }
crc32c = { version = "0.6" }
crc32fast = { version = "1.3", features = ["nightly"] }
global_alloc = { path = "../../crates/alloc" }
napi = { version = "2", default-features = false, features = ["napi3"] }
napi-derive = { version = "2", default-features = false }
napi = { version = "2", default-features = false, features = ["napi3"] }
napi-derive = { version = "2", default-features = false }

[build-dependencies]
napi-build = "2"
2 changes: 1 addition & 1 deletion packages/deno-lint/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
"typanion": "^3.12.1"
},
"devDependencies": {
"@types/webpack": "^5.28.0"
"@types/webpack": "^5.28.1"
},
"funding": {
"type": "github",
Expand Down
10 changes: 5 additions & 5 deletions packages/jieba/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
[package]
authors = ["LongYinan <lynweklm@gmail.com>"]
edition = "2021"
name = "node-rs-jieba"
name = "node-rs-jieba"
version = "0.1.0"

[lib]
crate-type = ["cdylib"]

[dependencies]
global_alloc = { path = "../../crates/alloc" }
jieba-rs = { version = "0.6", features = ["default-dict", "tfidf", "textrank"] }
napi = { version = "2", default-features = false, features = ["napi3"] }
napi-derive = { version = "2" }
once_cell = "1"
jieba-rs = { version = "0.6", features = ["default-dict", "tfidf", "textrank"] }
napi = { version = "2", default-features = false, features = ["napi3"] }
napi-derive = { version = "2" }
once_cell = "1"

[build-dependencies]
napi-build = "2"
4 changes: 2 additions & 2 deletions packages/jsonwebtoken/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
authors = ["Francesco Benedetto"]
edition = "2021"
name = "node-rs-jsonwebtoken"
name = "node-rs-jsonwebtoken"
version = "0.1.0"

[lib]
Expand All @@ -15,9 +15,9 @@ napi = { version = "2", default-features = false, features = [
"serde-json",
] }
napi-derive = { version = "2" }
rand = "0.8"
serde = "1.0"
serde_json = "1.0"
rand = "0.8"

[build-dependencies]
napi-build = "2"
8 changes: 4 additions & 4 deletions packages/xxhash/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
[package]
authors = ["LongYinan <lynweklm@gmail.com>"]
edition = "2021"
name = "xxhash"
name = "xxhash"
version = "0.1.0"

[lib]
crate-type = ["cdylib"]

[dependencies]
global_alloc = { path = "../../crates/alloc" }
napi = { version = "2", default-features = false, features = ["napi6"] }
napi-derive = { version = "2" }
xxhash-rust = { version = "0.8", features = ["xxh32", "xxh64", "xxh3"] }
napi = { version = "2", default-features = false, features = ["napi6"] }
napi-derive = { version = "2" }
xxhash-rust = { version = "0.8", features = ["xxh32", "xxh64", "xxh3"] }

[build-dependencies]
napi-build = "2"
2 changes: 1 addition & 1 deletion packages/xxhash/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
},
"devDependencies": {
"@types/xxhashjs": "^0.2.2",
"webpack": "^5.75.0",
"webpack": "^5.80.0",
"xxhash": "^0.3.0",
"xxhashjs": "^0.2.2"
},
Expand Down
2 changes: 1 addition & 1 deletion rust-toolchain
Original file line number Diff line number Diff line change
@@ -1 +1 @@
nightly-2023-03-01
nightly-2023-04-23
2 changes: 0 additions & 2 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@
"removeComments": true,
"strict": true,
"skipLibCheck": true,
"suppressImplicitAnyIndexErrors": true,
"suppressExcessPropertyErrors": true,
"forceConsistentCasingInFileNames": true,
"target": "ES2018",
"inlineSourceMap": true,
Expand Down

0 comments on commit a0ef7de

Please sign in to comment.