Skip to content

Commit 6b4bb97

Browse files
committed
chore(deps): upgrade @napi-rs/cli to ^3.10.4 and regenerate bindings (#169)
npm 12 changed `npm pack --dry-run --json` output from an array to an object keyed by package name, which broke `napi prepublish` in the 1.2.0 release job (Failed to validate the release package ... with npm pack --dry-run). @napi-rs/cli >= 3.10 parses both shapes. Regenerate index.js/index.d.ts with the new generator (adds __napiBindingTarget, WASI loader chain, IteratorObject typings).
1 parent 070f312 commit 6b4bb97

4 files changed

Lines changed: 327 additions & 94 deletions

File tree

‎index.d.ts‎

Lines changed: 55 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,21 @@
11
/* auto-generated by NAPI-RS */
22
/* eslint-disable */
3+
4+
/**
5+
* Which binding artifact the generated loader actually loaded: `'native'` for
6+
* a native addon, otherwise the `platformArchABI` of the WASI flavor. Every
7+
* flavor napi-rs can build is listed, because `NAPI_RS_NATIVE_LIBRARY_PATH`
8+
* can point the loader at a WASI artifact this package does not build itself.
9+
*/
10+
export declare const __napiBindingTarget: 'native' | 'wasm32-wasi' | 'wasm32-wasip1'
11+
12+
declare global {
13+
interface IteratorObject<T, TReturn = unknown, TNext = unknown>
14+
extends globalThis.Iterator<T, TReturn, TNext> {
15+
[globalThis.Symbol.iterator](): globalThis.IteratorObject<T, TReturn, TNext>
16+
}
17+
}
18+
319
export declare class Blob {
420
/** Get the id (SHA1) of a repository blob */
521
id(): string
@@ -323,11 +339,16 @@ export declare class Cred {
323339
* @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Iterator#iterator_helper_methods
324340
* @see https://www.typescriptlang.org/docs/handbook/release-notes/typescript-5-6.html#iterator-helper-methods
325341
*/
326-
export declare class Deltas extends Iterator<DiffDelta, void, void> {
342+
export declare class Deltas {
327343

328-
next(value?: void): IteratorResult<DiffDelta, void>
344+
[globalThis.Symbol.iterator](): this
345+
next(...[value]: [] | [void]): globalThis.IteratorResult<DiffDelta, void | undefined>
346+
return(...[value]: [] | [void]): globalThis.IteratorResult<DiffDelta, void | undefined>
347+
throw(exception?: unknown): globalThis.IteratorResult<DiffDelta, void | undefined>
329348
}
330349

350+
export interface Deltas extends globalThis.Omit<globalThis.IteratorObject<DiffDelta, void | undefined, void>, 'next' | 'return' | 'throw'> {}
351+
331352
export declare class Diff {
332353
/**
333354
* Merge one diff into another.
@@ -1609,7 +1630,7 @@ export declare class Repository {
16091630
* @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Iterator#iterator_helper_methods
16101631
* @see https://www.typescriptlang.org/docs/handbook/release-notes/typescript-5-6.html#iterator-helper-methods
16111632
*/
1612-
export declare class RevWalk extends Iterator<string, void, void> {
1633+
export declare class RevWalk {
16131634
/**
16141635
* Reset a revwalk to allow re-configuring it.
16151636
*
@@ -1700,9 +1721,14 @@ export declare class RevWalk extends Iterator<string, void, void> {
17001721
* The reference must point to a commitish.
17011722
*/
17021723
hideRef(reference: string): this
1703-
next(value?: void): IteratorResult<string, void>
1724+
[globalThis.Symbol.iterator](): this
1725+
next(...[value]: [] | [void]): globalThis.IteratorResult<string, void | undefined>
1726+
return(...[value]: [] | [void]): globalThis.IteratorResult<string, void | undefined>
1727+
throw(exception?: unknown): globalThis.IteratorResult<string, void | undefined>
17041728
}
17051729

1730+
export interface RevWalk extends globalThis.Omit<globalThis.IteratorObject<string, void | undefined, void>, 'next' | 'return' | 'throw'> {}
1731+
17061732
/**
17071733
* A Signature is used to indicate authorship of various actions throughout the
17081734
* library.
@@ -1864,11 +1890,16 @@ export declare class TreeEntry {
18641890
* @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Iterator#iterator_helper_methods
18651891
* @see https://www.typescriptlang.org/docs/handbook/release-notes/typescript-5-6.html#iterator-helper-methods
18661892
*/
1867-
export declare class TreeIter extends Iterator<TreeEntry, void, void> {
1893+
export declare class TreeIter {
18681894

1869-
next(value?: void): IteratorResult<TreeEntry, void>
1895+
[globalThis.Symbol.iterator](): this
1896+
next(...[value]: [] | [void]): globalThis.IteratorResult<TreeEntry, void | undefined>
1897+
return(...[value]: [] | [void]): globalThis.IteratorResult<TreeEntry, void | undefined>
1898+
throw(exception?: unknown): globalThis.IteratorResult<TreeEntry, void | undefined>
18701899
}
18711900

1901+
export interface TreeIter extends globalThis.Omit<globalThis.IteratorObject<TreeEntry, void | undefined, void>, 'next' | 'return' | 'throw'> {}
1902+
18721903
/** Automatic tag following options. */
18731904
export declare const enum AutotagOption {
18741905
/** Use the setting from the remote's configuration */
@@ -1878,7 +1909,7 @@ export declare const enum AutotagOption {
18781909
/** Don't ask for any tags beyond the refspecs */
18791910
None = 2,
18801911
/** Ask for all the tags */
1881-
All = 3
1912+
All = 3,
18821913
}
18831914

18841915
/**
@@ -1954,7 +1985,7 @@ export declare const enum BranchType {
19541985
/** A local branch not on a remote. */
19551986
Local = 0,
19561987
/** A branch for a remote. */
1957-
Remote = 1
1988+
Remote = 1,
19581989
}
19591990

19601991
/**
@@ -2060,7 +2091,7 @@ export declare const enum CloneLocal {
20602091
/** Never bypass the git-aware transport */
20612092
None = 2,
20622093
/** Bypass the git-aware transport, but don't try to use hardlinks. */
2063-
NoLinks = 3
2094+
NoLinks = 3,
20642095
}
20652096

20662097
/**
@@ -2118,7 +2149,7 @@ export declare const enum ConfigLevel {
21182149
/** Application specific configuration file */
21192150
App = 6,
21202151
/** Highest level available */
2121-
Highest = 7
2152+
Highest = 7,
21222153
}
21232154

21242155
/** Types of credentials that can be requested by a credential callback. */
@@ -2136,7 +2167,7 @@ export declare const enum CredentialType {
21362167
/** 1 << 4 */
21372168
SshInteractive = 16,
21382169
/** 1 << 5 */
2139-
Username = 32
2170+
Username = 32,
21402171
}
21412172

21422173
export interface CredInfo {
@@ -2181,7 +2212,7 @@ export declare const enum Delta {
21812212
/** Entry is unreadable */
21822213
Unreadable = 9,
21832214
/** Entry in the index is conflicted */
2184-
Conflicted = 10
2215+
Conflicted = 10,
21852216
}
21862217

21872218
/**
@@ -2216,7 +2247,7 @@ export declare const enum DiffFlags {
22162247
* File exists at this side of the delta.
22172248
* 1 << 3
22182249
*/
2219-
Exists = 8
2250+
Exists = 8,
22202251
}
22212252

22222253
/**
@@ -2243,7 +2274,7 @@ export declare const enum Direction {
22432274
/** Data will be fetched (read) from this remote. */
22442275
Fetch = 0,
22452276
/** Data will be pushed (written) to this remote. */
2246-
Push = 1
2277+
Push = 1,
22472278
}
22482279

22492280
/** Configuration for how pruning is done on a fetch */
@@ -2253,7 +2284,7 @@ export declare const enum FetchPrune {
22532284
/** Force pruning on */
22542285
On = 1,
22552286
/** Force pruning off */
2256-
Off = 2
2287+
Off = 2,
22572288
}
22582289

22592290
/** Valid modes for index and tree entries. */
@@ -2271,7 +2302,7 @@ export declare const enum FileMode {
22712302
/** Link */
22722303
Link = 5,
22732304
/** Commit */
2274-
Commit = 6
2305+
Commit = 6,
22752306
}
22762307

22772308
/**
@@ -2400,7 +2431,7 @@ export declare const enum GitErrorCode {
24002431
ApplyFail = 'ApplyFail',
24012432
Owner = 'Owner',
24022433
Timeout = 'Timeout',
2403-
InvalidArg = 'InvalidArg'
2434+
InvalidArg = 'InvalidArg',
24042435
}
24052436

24062437
/**
@@ -2437,7 +2468,7 @@ export declare const enum ObjectType {
24372468
/** An object which corresponds to a git blob */
24382469
Blob = 3,
24392470
/** An object which corresponds to a git tag */
2440-
Tag = 4
2471+
Tag = 4,
24412472
}
24422473

24432474
export interface Progress {
@@ -2476,7 +2507,7 @@ export declare const enum ReferenceType {
24762507
Direct = 0,
24772508
/** A reference which points at another reference. */
24782509
Symbolic = 1,
2479-
Unknown = 2
2510+
Unknown = 2,
24802511
}
24812512

24822513
/**
@@ -2495,7 +2526,7 @@ export declare const enum RemoteRedirect {
24952526
*/
24962527
Initial = 1,
24972528
/** Allow redirects at any stage in the fetch or push. */
2498-
All = 2
2529+
All = 2,
24992530
}
25002531

25012532
/**
@@ -2504,7 +2535,7 @@ export declare const enum RemoteRedirect {
25042535
*/
25052536
export declare const enum RemoteUpdateFlags {
25062537
UpdateFetchHead = 1,
2507-
ReportUnchanged = 2
2538+
ReportUnchanged = 2,
25082539
}
25092540

25102541
/**
@@ -2536,7 +2567,7 @@ export declare const enum RepositoryOpenFlags {
25362567
* Respect environment variables like `$GIT_DIR`.
25372568
* 1 << 4
25382569
*/
2539-
FromEnv = 16
2570+
FromEnv = 16,
25402571
}
25412572

25422573
export declare const enum RepositoryState {
@@ -2551,7 +2582,7 @@ export declare const enum RepositoryState {
25512582
RebaseInteractive = 8,
25522583
RebaseMerge = 9,
25532584
ApplyMailbox = 10,
2554-
ApplyMailboxOrRebase = 11
2585+
ApplyMailboxOrRebase = 11,
25552586
}
25562587

25572588
/** Orderings that may be specified for Revwalk iteration. */
@@ -2584,7 +2615,7 @@ export declare const enum Sort {
25842615
* This sorting mode can be combined with any others.
25852616
* 1 << 2
25862617
*/
2587-
Reverse = 4
2618+
Reverse = 4,
25882619
}
25892620

25902621
/**

0 commit comments

Comments
 (0)