-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore(deps-dev): bump @types/node from 22.4.0 to 22.5.0 in the typescript group #1780
Merged
github-actions
merged 1 commit into
main
from
dependabot/npm_and_yarn/typescript-2c84eb52ee
Aug 26, 2024
Merged
chore(deps-dev): bump @types/node from 22.4.0 to 22.5.0 in the typescript group #1780
github-actions
merged 1 commit into
main
from
dependabot/npm_and_yarn/typescript-2c84eb52ee
Aug 26, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dependabot
bot
added
dependencies
Pull requests that update a dependency file
javascript
Pull requests that update Javascript code
labels
Aug 26, 2024
Diff between @types/node 22.4.0 and 22.5.0diff --git a/README.md b/README.md
index v22.4.0..v22.5.0 100644
--- a/README.md
+++ b/README.md
@@ -9,5 +9,5 @@
### Additional Details
- * Last updated: Fri, 16 Aug 2024 18:09:07 GMT
+ * Last updated: Wed, 21 Aug 2024 16:09:20 GMT
* Dependencies: [undici-types](https://npmjs.com/package/undici-types)
diff --git a/globals.d.ts b/globals.d.ts
index v22.4.0..v22.5.0 100644
--- a/globals.d.ts
+++ b/globals.d.ts
@@ -3,5 +3,5 @@
// #region Fetch and friends
// Conditional type aliases, used at the end of this file.
-// Will either be empty if lib-dom is included, or the undici version otherwise.
+// Will either be empty if lib.dom (or lib.webworker) is included, or the undici version otherwise.
type _Request = typeof globalThis extends { onmessage: any } ? {} : import("undici-types").Request;
type _Response = typeof globalThis extends { onmessage: any } ? {} : import("undici-types").Response;
@@ -18,4 +18,47 @@
// #endregion Fetch and friends
+// Conditional type definitions for webstorage interface, which conflicts with lib.dom otherwise.
+type _Storage = typeof globalThis extends { onabort: any } ? {} : {
+ /**
+ * Returns the number of key/value pairs.
+ *
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Storage/length)
+ */
+ readonly length: number;
+ /**
+ * Removes all key/value pairs, if there are any.
+ *
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Storage/clear)
+ */
+ clear(): void;
+ /**
+ * Returns the current value associated with the given key, or null if the given key does not exist.
+ *
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Storage/getItem)
+ */
+ getItem(key: string): string | null;
+ /**
+ * Returns the name of the nth key, or null if n is greater than or equal to the number of key/value pairs.
+ *
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Storage/key)
+ */
+ key(index: number): string | null;
+ /**
+ * Removes the key/value pair with the given key, if a key/value pair with the given key exists.
+ *
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Storage/removeItem)
+ */
+ removeItem(key: string): void;
+ /**
+ * Sets the value of the pair identified by key to value, creating a new key/value pair if none existed for key previously.
+ *
+ * Throws a "QuotaExceededError" DOMException exception if the new value couldn't be set.
+ *
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Storage/setItem)
+ */
+ setItem(key: string, value: string): void;
+ [key: string]: any;
+};
+
declare global {
// Declare "static" methods in Error
@@ -110,52 +153,8 @@
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Storage)
*/
- interface Storage {
- /**
- * Returns the number of key/value pairs.
- *
- * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Storage/length)
- */
- readonly length: number;
- /**
- * Removes all key/value pairs, if there are any.
- *
- * Dispatches a storage event on Window objects holding an equivalent Storage object.
- *
- * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Storage/clear)
- */
- clear(): void;
- /**
- * Returns the current value associated with the given key, or null if the given key does not exist.
- *
- * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Storage/getItem)
- */
- getItem(key: string): string | null;
- /**
- * Returns the name of the nth key, or null if n is greater than or equal to the number of key/value pairs.
- *
- * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Storage/key)
- */
- key(index: number): string | null;
- /**
- * Removes the key/value pair with the given key, if a key/value pair with the given key exists.
- *
- * Dispatches a storage event on Window objects holding an equivalent Storage object.
- *
- * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Storage/removeItem)
- */
- removeItem(key: string): void;
- /**
- * Sets the value of the pair identified by key to value, creating a new key/value pair if none existed for key previously.
- *
- * Throws a "QuotaExceededError" DOMException exception if the new value couldn't be set. (Setting could fail if, e.g., the user has disabled storage for the site, or if the quota has been exceeded.)
- *
- * Dispatches a storage event on Window objects holding an equivalent Storage object.
- *
- * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Storage/setItem)
- */
- setItem(key: string, value: string): void;
- }
+ interface Storage extends _Storage {}
- var Storage: typeof globalThis extends { onmessage: any; Storage: infer T } ? T
+ // Conditional on `onabort` rather than `onmessage`, in order to exclude lib.webworker
+ var Storage: typeof globalThis extends { onabort: any; Storage: infer T } ? T
: {
prototype: Storage;
diff --git a/http.d.ts b/http.d.ts
index v22.4.0..v22.5.0 100644
--- a/http.d.ts
+++ b/http.d.ts
@@ -1903,4 +1903,17 @@
*/
const maxHeaderSize: number;
+ /**
+ * A browser-compatible implementation of [WebSocket](https://nodejs.org/docs/latest/api/http.html#websocket).
+ * @since v22.5.0
+ */
+ const WebSocket: import("undici-types").WebSocket;
+ /**
+ * @since v22.5.0
+ */
+ const CloseEvent: import("undici-types").CloseEvent;
+ /**
+ * @since v22.5.0
+ */
+ const MessageEvent: import("undici-types").MessageEvent;
}
declare module "node:http" {
diff --git a/index.d.ts b/index.d.ts
index v22.4.0..v22.5.0 100644
--- a/index.d.ts
+++ b/index.d.ts
@@ -68,4 +68,5 @@
/// <reference path="repl.d.ts" />
/// <reference path="sea.d.ts" />
+/// <reference path="sqlite.d.ts" />
/// <reference path="stream.d.ts" />
/// <reference path="stream/promises.d.ts" />
diff --git a/package.json b/package.json
index v22.4.0..v22.5.0 100644
--- a/package.json
+++ b/package.json
@@ -1,5 +1,5 @@
{
"name": "@types/node",
- "version": "22.4.0",
+ "version": "22.5.0",
"description": "TypeScript definitions for node",
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node",
@@ -213,5 +213,5 @@
"undici-types": "~6.19.2"
},
- "typesPublisherContentHash": "f22f2e87b11a05781ab2a2c4b7812aa834cf70e01e9db42c5288e6cc3f15fd47",
+ "typesPublisherContentHash": "6e32f4b237ea4dd6efcade6ee8b163957a578f405f3c76453b372a2d32e00c03",
"typeScriptVersion": "4.8"
}
\ No newline at end of file
diff --git a/path.d.ts b/path.d.ts
index v22.4.0..v22.5.0 100644
--- a/path.d.ts
+++ b/path.d.ts
@@ -96,4 +96,13 @@
resolve(...paths: string[]): string;
/**
+ * The `path.matchesGlob()` method determines if `path` matches the `pattern`.
+ * @param path The path to glob-match against.
+ * @param pattern The glob to check the path against.
+ * @returns Whether or not the `path` matched the `pattern`.
+ * @throws {TypeError} if `path` or `pattern` are not strings.
+ * @since v22.5.0
+ */
+ matchesGlob(path: string, pattern: string): boolean;
+ /**
* Determines whether {path} is an absolute path. An absolute path will always resolve to the same location, regardless of the working directory.
*
diff --git a/process.d.ts b/process.d.ts
index v22.4.0..v22.5.0 100644
--- a/process.d.ts
+++ b/process.d.ts
@@ -76,4 +76,5 @@
"node:repl": typeof import("node:repl");
"node:sea": typeof import("node:sea");
+ "node:sqlite": typeof import("node:sqlite");
"stream": typeof import("stream");
"node:stream": typeof import("node:stream");
@@ -324,21 +325,25 @@
interface ProcessReport {
/**
+ * Write reports in a compact format, single-line JSON, more easily consumable by log processing systems
+ * than the default multi-line format designed for human consumption.
+ * @since v13.12.0, v12.17.0
+ */
+ compact: boolean;
+ /**
* Directory where the report is written.
+ * The default value is the empty string, indicating that reports are written to the current
* working directory of the Node.js process.
- * @default '' indicating that reports are written to the current
*/
directory: string;
/**
- * Filename where the report is written.
- * The default value is the empty string.
- * @default '' the output filename will be comprised of a timestamp,
- * PID, and sequence number.
+ * Filename where the report is written. If set to the empty string, the output filename will be comprised
+ * of a timestamp, PID, and sequence number. The default value is the empty string.
*/
filename: string;
/**
- * Returns a JSON-formatted diagnostic report for the running process.
- * The report's JavaScript stack trace is taken from err, if present.
+ * Returns a JavaScript Object representation of a diagnostic report for the running process.
+ * The report's JavaScript stack trace is taken from `err`, if present.
*/
- getReport(err?: Error): string;
+ getReport(err?: Error): object;
/**
* If true, a diagnostic report is generated on fatal errors,
@@ -366,16 +371,17 @@
* Writes a diagnostic report to a file. If filename is not provided, the default filename
* includes the date, time, PID, and a sequence number.
- * The report's JavaScript stack trace is taken from err, if present.
+ * The report's JavaScript stack trace is taken from `err`, if present.
*
+ * If the value of filename is set to `'stdout'` or `'stderr'`, the report is written
+ * to the stdout or stderr of the process respectively.
* @param fileName Name of the file where the report is written.
* This should be a relative path, that will be appended to the directory specified in
* `process.report.directory`, or the current working directory of the Node.js process,
* if unspecified.
- * @param error A custom error used for reporting the JavaScript stack.
+ * @param err A custom error used for reporting the JavaScript stack.
* @return Filename of the generated report.
*/
- writeReport(fileName?: string): string;
- writeReport(error?: Error): string;
writeReport(fileName?: string, err?: Error): string;
+ writeReport(err?: Error): string;
}
interface ResourceUsage {
@@ -889,4 +895,38 @@
*/
exitCode?: number | string | number | undefined;
+ finalization: {
+ /**
+ * This function registers a callback to be called when the process emits the `exit` event if the `ref` object was not garbage collected.
+ * If the object `ref` was garbage collected before the `exit` event is emitted, the callback will be removed from the finalization registry, and it will not be called on process exit.
+ *
+ * Inside the callback you can release the resources allocated by the `ref` object.
+ * Be aware that all limitations applied to the `beforeExit` event are also applied to the callback function,
+ * this means that there is a possibility that the callback will not be called under special circumstances.
+ *
+ * The idea of this function is to help you free up resources when the starts process exiting, but also let the object be garbage collected if it is no longer being used.
+ * @param ref The reference to the resource that is being tracked.
+ * @param callback The callback function to be called when the resource is finalized.
+ * @since v22.5.0
+ * @experimental
+ */
+ register<T extends object>(ref: T, callback: (ref: T, event: "exit") => void): void;
+ /**
+ * This function behaves exactly like the `register`, except that the callback will be called when the process emits the `beforeExit` event if `ref` object was not garbage collected.
+ *
+ * Be aware that all limitations applied to the `beforeExit` event are also applied to the callback function, this means that there is a possibility that the callback will not be called under special circumstances.
+ * @param ref The reference to the resource that is being tracked.
+ * @param callback The callback function to be called when the resource is finalized.
+ * @since v22.5.0
+ * @experimental
+ */
+ registerBeforeExit<T extends object>(ref: T, callback: (ref: T, event: "beforeExit") => void): void;
+ /**
+ * This function remove the register of the object from the finalization registry, so the callback will not be called anymore.
+ * @param ref The reference to the resource that was registered previously.
+ * @since v22.5.0
+ * @experimental
+ */
+ unregister(ref: object): void;
+ };
/**
* The `process.getActiveResourcesInfo()` method returns an array of strings containing
@@ -1705,9 +1745,9 @@
allowedNodeEnvironmentFlags: ReadonlySet<string>;
/**
- * `process.report` is an object whose methods are used to generate diagnostic
- * reports for the current process. Additional documentation is available in the `report documentation`.
+ * `process.report` is an object whose methods are used to generate diagnostic reports for the current process.
+ * Additional documentation is available in the [report documentation](https://nodejs.org/docs/latest-v22.x/api/report.html).
* @since v11.8.0
*/
- report?: ProcessReport | undefined;
+ report: ProcessReport;
/**
* ```js
diff --git a/test.d.ts b/test.d.ts
index v22.4.0..v22.5.0 100644
--- a/test.d.ts
+++ b/test.d.ts
@@ -1961,30 +1961,46 @@
type TestEventGenerator = AsyncGenerator<TestEvent, void>;
+ interface ReporterConstructorWrapper<T extends new(...args: any[]) => Transform> {
+ new(...args: ConstructorParameters<T>): InstanceType<T>;
+ (...args: ConstructorParameters<T>): InstanceType<T>;
+ }
+
/**
* The `dot` reporter outputs the test results in a compact format,
* where each passing test is represented by a `.`,
* and each failing test is represented by a `X`.
+ * @since v20.0.0
*/
function dot(source: TestEventGenerator): AsyncGenerator<"\n" | "." | "X", void>;
/**
* The `tap` reporter outputs the test results in the [TAP](https://testanything.org/) format.
+ * @since v20.0.0
*/
function tap(source: TestEventGenerator): AsyncGenerator<string, void>;
+ class SpecReporter extends Transform {
+ constructor();
+ }
/**
* The `spec` reporter outputs the test results in a human-readable format.
+ * @since v20.0.0
*/
- class Spec extends Transform {
- constructor();
- }
+ const spec: ReporterConstructorWrapper<typeof SpecReporter>;
/**
* The `junit` reporter outputs test results in a jUnit XML format.
+ * @since v21.0.0
*/
function junit(source: TestEventGenerator): AsyncGenerator<string, void>;
+ class LcovReporter extends Transform {
+ constructor(opts?: Omit<TransformOptions, "writableObjectMode">);
+ }
/**
- * The `lcov` reporter outputs test coverage when used with the [`--experimental-test-coverage`](https://nodejs.org/docs/latest-v22.x/api/cli.html#--experimental-test-coverage) flag.
+ * The `lcov` reporter outputs test coverage when used with the
+ * [`--experimental-test-coverage`](https://nodejs.org/docs/latest-v22.x/api/cli.html#--experimental-test-coverage) flag.
+ * @since v22.0.0
*/
- class Lcov extends Transform {
- constructor(opts?: TransformOptions);
- }
- export { dot, junit, Lcov as lcov, Spec as spec, tap, TestEvent };
+ // TODO: change the export to a wrapper function once node@0db38f0 is merged (breaking change)
+ // const lcov: ReporterConstructorWrapper<typeof LcovReporter>;
+ const lcov: LcovReporter;
+
+ export { dot, junit, lcov, spec, tap, TestEvent };
}
diff --git a/worker_threads.d.ts b/worker_threads.d.ts
index v22.4.0..v22.5.0 100644
--- a/worker_threads.d.ts
+++ b/worker_threads.d.ts
@@ -411,4 +411,22 @@
postMessage(value: any, transferList?: readonly TransferListItem[]): void;
/**
+ * Sends a value to another worker, identified by its thread ID.
+ * @param threadId The target thread ID. If the thread ID is invalid, a `ERR_WORKER_MESSAGING_FAILED` error will be thrown.
+ * If the target thread ID is the current thread ID, a `ERR_WORKER_MESSAGING_SAME_THREAD` error will be thrown.
+ * @param value The value to send.
+ * @param transferList If one or more `MessagePort`-like objects are passed in value, a `transferList` is required for those items
+ * or `ERR_MISSING_MESSAGE_PORT_IN_TRANSFER_LIST` is thrown. See `port.postMessage()` for more information.
+ * @param timeout Time to wait for the message to be delivered in milliseconds. By default it's `undefined`, which means wait forever.
+ * If the operation times out, a `ERR_WORKER_MESSAGING_TIMEOUT` error is thrown.
+ * @since v22.5.0
+ */
+ postMessageToThread(threadId: number, value: any, timeout?: number): Promise<void>;
+ postMessageToThread(
+ threadId: number,
+ value: any,
+ transferList: readonly TransferListItem[],
+ timeout?: number,
+ ): Promise<void>;
+ /**
* Opposite of `unref()`, calling `ref()` on a previously `unref()`ed worker does _not_ let the program exit if it's the only active handle left (the default
* behavior). If the worker is `ref()`ed, calling `ref()` again has
diff --git a/sqlite.d.ts b/sqlite.d.ts
new file mode 100644
index v22.4.0..v22.5.0
--- a/sqlite.d.ts
+++ b/sqlite.d.ts
@@ -0,0 +1,213 @@
+/**
+ * The `node:sqlite` module facilitates working with SQLite databases.
+ * To access it:
+ *
+ * ```js
+ * import sqlite from 'node:sqlite';
+ * ```
+ *
+ * This module is only available under the `node:` scheme. The following will not
+ * work:
+ *
+ * ```js
+ * import sqlite from 'sqlite';
+ * ```
+ *
+ * The following example shows the basic usage of the `node:sqlite` module to open
+ * an in-memory database, write data to the database, and then read the data back.
+ *
+ * ```js
+ * import { DatabaseSync } from 'node:sqlite';
+ * const database = new DatabaseSync(':memory:');
+ *
+ * // Execute SQL statements from strings.
+ * database.exec(`
+ * CREATE TABLE data(
+ * key INTEGER PRIMARY KEY,
+ * value TEXT
+ * ) STRICT
+ * `);
+ * // Create a prepared statement to insert data into the database.
+ * const insert = database.prepare('INSERT INTO data (key, value) VALUES (?, ?)');
+ * // Execute the prepared statement with bound values.
+ * insert.run(1, 'hello');
+ * insert.run(2, 'world');
+ * // Create a prepared statement to read data from the database.
+ * const query = database.prepare('SELECT * FROM data ORDER BY key');
+ * // Execute the prepared statement and log the result set.
+ * console.log(query.all());
+ * // Prints: [ { key: 1, value: 'hello' }, { key: 2, value: 'world' } ]
+ * ```
+ * @since v22.5.0
+ * @experimental
+ * @see [source](https://github.com/nodejs/node/blob/v22.x/lib/sqlite.js)
+ */
+declare module "node:sqlite" {
+ interface DatabaseSyncOptions {
+ /**
+ * If `true`, the database is opened by the constructor.
+ * When this value is `false`, the database must be opened via the `open()` method.
+ */
+ open?: boolean | undefined;
+ }
+ /**
+ * This class represents a single [connection](https://www.sqlite.org/c3ref/sqlite3.html) to a SQLite database. All APIs
+ * exposed by this class execute synchronously.
+ * @since v22.5.0
+ */
+ class DatabaseSync {
+ /**
+ * Constructs a new `DatabaseSync` instance.
+ * @param location The location of the database.
+ * A SQLite database can be stored in a file or completely [in memory](https://www.sqlite.org/inmemorydb.html).
+ * To use a file-backed database, the location should be a file path.
+ * To use an in-memory database, the location should be the special name `':memory:'`.
+ * @param options Configuration options for the database connection.
+ */
+ constructor(location: string, options?: DatabaseSyncOptions);
+ /**
+ * Closes the database connection. An exception is thrown if the database is not
+ * open. This method is a wrapper around [`sqlite3_close_v2()`](https://www.sqlite.org/c3ref/close.html).
+ * @since v22.5.0
+ */
+ close(): void;
+ /**
+ * This method allows one or more SQL statements to be executed without returning
+ * any results. This method is useful when executing SQL statements read from a
+ * file. This method is a wrapper around [`sqlite3_exec()`](https://www.sqlite.org/c3ref/exec.html).
+ * @since v22.5.0
+ * @param sql A SQL string to execute.
+ */
+ exec(sql: string): void;
+ /**
+ * Opens the database specified in the `location` argument of the `DatabaseSync`constructor. This method should only be used when the database is not opened via
+ * the constructor. An exception is thrown if the database is already open.
+ * @since v22.5.0
+ */
+ open(): void;
+ /**
+ * Compiles a SQL statement into a [prepared statement](https://www.sqlite.org/c3ref/stmt.html). This method is a wrapper
+ * around [`sqlite3_prepare_v2()`](https://www.sqlite.org/c3ref/prepare.html).
+ * @since v22.5.0
+ * @param sql A SQL string to compile to a prepared statement.
+ * @return The prepared statement.
+ */
+ prepare(sql: string): StatementSync;
+ }
+ type SupportedValueType = null | number | bigint | string | Uint8Array;
+ interface StatementResultingChanges {
+ /**
+ * The number of rows modified, inserted, or deleted by the most recently completed `INSERT`, `UPDATE`, or `DELETE` statement.
+ * This field is either a number or a `BigInt` depending on the prepared statement's configuration.
+ * This property is the result of [`sqlite3_changes64()`](https://www.sqlite.org/c3ref/changes.html).
+ */
+ changes: number | bigint;
+ /**
+ * The most recently inserted rowid.
+ * This field is either a number or a `BigInt` depending on the prepared statement's configuration.
+ * This property is the result of [`sqlite3_last_insert_rowid()`](https://www.sqlite.org/c3ref/last_insert_rowid.html).
+ */
+ lastInsertRowid: number | bigint;
+ }
+ /**
+ * This class represents a single [prepared statement](https://www.sqlite.org/c3ref/stmt.html). This class cannot be
+ * instantiated via its constructor. Instead, instances are created via the`database.prepare()` method. All APIs exposed by this class execute
+ * synchronously.
+ *
+ * A prepared statement is an efficient binary representation of the SQL used to
+ * create it. Prepared statements are parameterizable, and can be invoked multiple
+ * times with different bound values. Parameters also offer protection against [SQL injection](https://en.wikipedia.org/wiki/SQL_injection) attacks. For these reasons, prepared statements are
+ * preferred
+ * over hand-crafted SQL strings when handling user input.
+ * @since v22.5.0
+ */
+ class StatementSync {
+ private constructor();
+ /**
+ * This method executes a prepared statement and returns all results as an array of
+ * objects. If the prepared statement does not return any results, this method
+ * returns an empty array. The prepared statement [parameters are bound](https://www.sqlite.org/c3ref/bind_blob.html) using
+ * the values in `namedParameters` and `anonymousParameters`.
+ * @since v22.5.0
+ * @param namedParameters An optional object used to bind named parameters. The keys of this object are used to configure the mapping.
+ * @param anonymousParameters Zero or more values to bind to anonymous parameters.
+ * @return An array of objects. Each object corresponds to a row returned by executing the prepared statement. The keys and values of each object correspond to the column names and values of
+ * the row.
+ */
+ all(...anonymousParameters: SupportedValueType[]): unknown[];
+ all(
+ namedParameters: Record<string, SupportedValueType>,
+ ...anonymousParameters: SupportedValueType[]
+ ): unknown[];
+ /**
+ * This method returns the source SQL of the prepared statement with parameter
+ * placeholders replaced by values. This method is a wrapper around [`sqlite3_expanded_sql()`](https://www.sqlite.org/c3ref/expanded_sql.html).
+ * @since v22.5.0
+ * @return The source SQL expanded to include parameter values.
+ */
+ expandedSQL(): string;
+ /**
+ * This method executes a prepared statement and returns the first result as an
+ * object. If the prepared statement does not return any results, this method
+ * returns `undefined`. The prepared statement [parameters are bound](https://www.sqlite.org/c3ref/bind_blob.html) using the
+ * values in `namedParameters` and `anonymousParameters`.
+ * @since v22.5.0
+ * @param namedParameters An optional object used to bind named parameters. The keys of this object are used to configure the mapping.
+ * @param anonymousParameters Zero or more values to bind to anonymous parameters.
+ * @return An object corresponding to the first row returned by executing the prepared statement. The keys and values of the object correspond to the column names and values of the row. If no
+ * rows were returned from the database then this method returns `undefined`.
+ */
+ get(...anonymousParameters: SupportedValueType[]): unknown;
+ get(namedParameters: Record<string, SupportedValueType>, ...anonymousParameters: SupportedValueType[]): unknown;
+ /**
+ * This method executes a prepared statement and returns an object summarizing the
+ * resulting changes. The prepared statement [parameters are bound](https://www.sqlite.org/c3ref/bind_blob.html) using the
+ * values in `namedParameters` and `anonymousParameters`.
+ * @since v22.5.0
+ * @param namedParameters An optional object used to bind named parameters. The keys of this object are used to configure the mapping.
+ * @param anonymousParameters Zero or more values to bind to anonymous parameters.
+ */
+ run(...anonymousParameters: SupportedValueType[]): StatementResultingChanges;
+ run(
+ namedParameters: Record<string, SupportedValueType>,
+ ...anonymousParameters: SupportedValueType[]
+ ): StatementResultingChanges;
+ /**
+ * The names of SQLite parameters begin with a prefix character. By default,`node:sqlite` requires that this prefix character is present when binding
+ * parameters. However, with the exception of dollar sign character, these
+ * prefix characters also require extra quoting when used in object keys.
+ *
+ * To improve ergonomics, this method can be used to also allow bare named
+ * parameters, which do not require the prefix character in JavaScript code. There
+ * are several caveats to be aware of when enabling bare named parameters:
+ *
+ * * The prefix character is still required in SQL.
+ * * The prefix character is still allowed in JavaScript. In fact, prefixed names
+ * will have slightly better binding performance.
+ * * Using ambiguous named parameters, such as `$k` and `@k`, in the same prepared
+ * statement will result in an exception as it cannot be determined how to bind
+ * a bare name.
+ * @since v22.5.0
+ * @param enabled Enables or disables support for binding named parameters without the prefix character.
+ */
+ setAllowBareNamedParameters(enabled: boolean): void;
+ /**
+ * When reading from the database, SQLite `INTEGER`s are mapped to JavaScript
+ * numbers by default. However, SQLite `INTEGER`s can store values larger than
+ * JavaScript numbers are capable of representing. In such cases, this method can
+ * be used to read `INTEGER` data using JavaScript `BigInt`s. This method has no
+ * impact on database write operations where numbers and `BigInt`s are both
+ * supported at all times.
+ * @since v22.5.0
+ * @param enabled Enables or disables the use of `BigInt`s when reading `INTEGER` fields from the database.
+ */
+ setReadBigInts(enabled: boolean): void;
+ /**
+ * This method returns the source SQL of the prepared statement. This method is a
+ * wrapper around [`sqlite3_sql()`](https://www.sqlite.org/c3ref/expanded_sql.html).
+ * @since v22.5.0
+ * @return The source SQL used to create this prepared statement.
+ */
+ sourceSQL(): string;
+ }
+}
Command detailsnpm diff --diff=@types/node@22.4.0 --diff=@types/node@22.5.0 --diff-unified=2 See also the Reported by ybiquitous/npm-diff-action@v1.6.0 (Node.js 22.7.0 and npm 10.8.2) |
Bumps the typescript group with 1 update: [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node). Updates `@types/node` from 22.4.0 to 22.5.0 - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node) --- updated-dependencies: - dependency-name: "@types/node" dependency-type: direct:development update-type: version-update:semver-minor dependency-group: typescript ... Signed-off-by: dependabot[bot] <support@github.com>
dependabot
bot
force-pushed
the
dependabot/npm_and_yarn/typescript-2c84eb52ee
branch
from
August 26, 2024 02:20
ceec92a
to
abf74a5
Compare
github-actions
bot
deleted the
dependabot/npm_and_yarn/typescript-2c84eb52ee
branch
August 26, 2024 02:21
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
dependencies
Pull requests that update a dependency file
javascript
Pull requests that update Javascript code
0 participants
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Rebasing might not happen immediately, so don't worry if this takes some time.
Note: if you make any changes to this PR yourself, they will take precedence over the rebase.
Bumps the typescript group with 1 update: @types/node.
Updates
@types/node
from 22.4.0 to 22.5.0Commits
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting
@dependabot rebase
.Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
@dependabot rebase
will rebase this PR@dependabot recreate
will recreate this PR, overwriting any edits that have been made to it@dependabot merge
will merge this PR after your CI passes on it@dependabot squash and merge
will squash and merge this PR after your CI passes on it@dependabot cancel merge
will cancel a previously requested merge and block automerging@dependabot reopen
will reopen this PR if it is closed@dependabot close
will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually@dependabot show <dependency name> ignore conditions
will show all of the ignore conditions of the specified dependency@dependabot ignore <dependency name> major version
will close this group update PR and stop Dependabot creating any more for the specific dependency's major version (unless you unignore this specific dependency's major version or upgrade to it yourself)@dependabot ignore <dependency name> minor version
will close this group update PR and stop Dependabot creating any more for the specific dependency's minor version (unless you unignore this specific dependency's minor version or upgrade to it yourself)@dependabot ignore <dependency name>
will close this group update PR and stop Dependabot creating any more for the specific dependency (unless you unignore this specific dependency or upgrade to it yourself)@dependabot unignore <dependency name>
will remove all of the ignore conditions of the specified dependency@dependabot unignore <dependency name> <ignore condition>
will remove the ignore condition of the specified dependency and ignore conditions