Skip to content

Commit b51dc64

Browse files
committed
chore: upgrade deps
1 parent 8c4e895 commit b51dc64

File tree

8 files changed

+533
-366
lines changed

8 files changed

+533
-366
lines changed

.github/workflows/CI.yml

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,6 @@ env:
33
DEBUG: napi:*
44
APP_NAME: tar
55
MACOSX_DEPLOYMENT_TARGET: '10.13'
6-
permissions:
7-
contents: write
8-
id-token: write
96
'on':
107
push:
118
branches:
@@ -108,9 +105,9 @@ jobs:
108105
- host: ubuntu-latest
109106
target: wasm32-wasip1-threads
110107
build: |
111-
wget https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-25/wasi-sdk-25.0-x86_64-linux.tar.gz
112-
tar -xvf wasi-sdk-25.0-x86_64-linux.tar.gz
113-
export WASI_SDK_PATH="$(pwd)/wasi-sdk-25.0-x86_64-linux"
108+
wget https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-27/wasi-sdk-27.0-x86_64-linux.tar.gz
109+
tar -xvf wasi-sdk-27.0-x86_64-linux.tar.gz
110+
export WASI_SDK_PATH="$(pwd)/wasi-sdk-27.0-x86_64-linux"
114111
yarn build --target wasm32-wasip1-threads
115112
name: stable - ${{ matrix.settings.target }} - node@22
116113
runs-on: ${{ matrix.settings.host }}
@@ -386,6 +383,9 @@ jobs:
386383
publish:
387384
name: Publish
388385
runs-on: ubuntu-latest
386+
permissions:
387+
contents: write
388+
id-token: write
389389
needs:
390390
- lint
391391
- build-freebsd
@@ -414,18 +414,15 @@ jobs:
414414
shell: bash
415415
- name: Publish
416416
run: |
417-
npm config set provenance true
417+
npm install -g npm
418418
if git log -1 --pretty=%B | grep "^[0-9]\+\.[0-9]\+\.[0-9]\+$";
419419
then
420-
echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> ~/.npmrc
421420
npm publish --access public
422421
elif git log -1 --pretty=%B | grep "^[0-9]\+\.[0-9]\+\.[0-9]\+";
423422
then
424-
echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> ~/.npmrc
425423
npm publish --tag next --access public
426424
else
427425
echo "Not a release, skipping publish"
428426
fi
429427
env:
430428
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
431-
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
authors = ["LongYinan <lynweklm@gmail.com>"]
3-
edition = "2021"
3+
edition = "2024"
44
name = "napi-tar"
55
version = "0.1.0"
66

index.d.ts

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,16 @@ export declare class Archive {
7373
setIgnoreZeros(ignoreZeros: boolean): void
7474
}
7575

76-
export declare class Entries {
77-
[Symbol.iterator](): Iterator<Entry, void, void>
76+
/**
77+
* This type extends JavaScript's `Iterator`, and so has the iterator helper
78+
* methods. It may extend the upcoming TypeScript `Iterator` class in the future.
79+
*
80+
* @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Iterator#iterator_helper_methods
81+
* @see https://www.typescriptlang.org/docs/handbook/release-notes/typescript-5-6.html#iterator-helper-methods
82+
*/
83+
export declare class Entries extends Iterator<Entry, void, void> {
84+
85+
next(value?: void): IteratorResult<Entry, void>
7886
}
7987

8088
export declare class Entry {

index.js

Lines changed: 141 additions & 26 deletions
Large diffs are not rendered by default.

package.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -62,22 +62,22 @@
6262
"version": "napi version"
6363
},
6464
"devDependencies": {
65-
"@napi-rs/cli": "^3.0.1",
66-
"@napi-rs/lzma": "^1.4.3",
65+
"@napi-rs/cli": "^3.1.3",
66+
"@napi-rs/lzma": "^1.4.4",
6767
"@oxc-node/core": "^0.0.32",
6868
"@taplo/cli": "^0.7.0",
69-
"@types/node": "^24.1.0",
69+
"@types/node": "^24.2.1",
7070
"@types/tar": "^6",
7171
"ava": "^6.4.1",
72-
"chalk": "^5.4.1",
72+
"chalk": "^5.5.0",
7373
"husky": "^9.1.7",
74-
"lint-staged": "^16.1.2",
74+
"lint-staged": "^16.1.5",
7575
"npm-run-all2": "^8.0.4",
76-
"oxlint": "^1.8.0",
76+
"oxlint": "^1.11.1",
7777
"prettier": "^3.6.2",
7878
"tar": "^7.4.3",
7979
"tinybench": "^4.0.1",
80-
"typescript": "^5.8.3"
80+
"typescript": "^5.9.2"
8181
},
8282
"lint-staged": {
8383
"*.@(js|ts|tsx)": [

src/entry.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
use napi::bindgen_prelude::Reference;
2-
use napi::Env;
3-
use napi::{bindgen_prelude::SharedReference, iterator::Generator};
1+
use napi::{
2+
bindgen_prelude::{Env, Reference, SharedReference},
3+
iterator::Generator,
4+
};
45
use napi_derive::napi;
56

67
use crate::header::ReadonlyHeader;

tsconfig.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
{
22
"compilerOptions": {
3-
"target": "ES2018",
3+
"target": "es2022",
44
"strict": true,
5-
"moduleResolution": "node",
6-
"module": "CommonJS",
5+
"moduleResolution": "Bundler",
6+
"module": "ESNext",
77
"noUnusedLocals": true,
88
"noUnusedParameters": true,
99
"esModuleInterop": true,
10+
"lib": ["ESNext"],
1011
"allowSyntheticDefaultImports": true
1112
},
1213
"include": ["."],

0 commit comments

Comments
 (0)