Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/actions/setup-for-scripts/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ runs:
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version: '24'
- uses: pnpm/action-setup@8912a9102ac27614460f54aedde9e1e7f9aec20d # v6.0.5
- uses: pnpm/action-setup@739bfe42ca9233c5e6aca07c1a25a9d34aca49b0 # v6.0.7
with:
run_install: |
- args: [--filter, ., --filter, '{./scripts}...']
4 changes: 2 additions & 2 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
with:
node-version: '24'

- uses: pnpm/action-setup@8912a9102ac27614460f54aedde9e1e7f9aec20d # v6.0.5
- uses: pnpm/action-setup@739bfe42ca9233c5e6aca07c1a25a9d34aca49b0 # v6.0.7

- id: matrix
run: |
Expand Down Expand Up @@ -79,7 +79,7 @@ jobs:
printf "Aborting: symlinks found:\n%s" "$symlinks"; exit 1
fi

- uses: pnpm/action-setup@8912a9102ac27614460f54aedde9e1e7f9aec20d # v6.0.5
- uses: pnpm/action-setup@739bfe42ca9233c5e6aca07c1a25a9d34aca49b0 # v6.0.7

- name: Get pnpm cache info
id: pnpm-cache
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pnpm-cache.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version: '24'
- uses: pnpm/action-setup@8912a9102ac27614460f54aedde9e1e7f9aec20d # v6.0.5
- uses: pnpm/action-setup@739bfe42ca9233c5e6aca07c1a25a9d34aca49b0 # v6.0.7

- name: Get pnpm cache info
id: pnpm-cache
Expand Down
159 changes: 76 additions & 83 deletions README.fr.md

Large diffs are not rendered by default.

4 changes: 0 additions & 4 deletions types/aos/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,6 @@
"@types/aos": "workspace:."
},
"owners": [
{
"name": "Rostislav Shermenyov",
"githubUsername": "shermendev"
},
{
"name": "Matheus Grieger",
"githubUsername": "matheusgrieger"
Expand Down
4 changes: 0 additions & 4 deletions types/bootstrap-datepicker/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,6 @@
{
"name": "Boris Yankov",
"githubUsername": "borisyankov"
},
{
"name": "Jannik Keye",
"githubUsername": "jannikkeye"
}
]
}
12 changes: 12 additions & 0 deletions types/facebook-js-sdk/facebook-js-sdk-tests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,18 @@ FB.Event.subscribe("auth.authResponseChange", response => {

FB.Event.unsubscribe("auth.authResponseChange", () => {});

FB.Event.subscribe("xfbml.render", () => {
console.log("all plugins rendered");
});

FB.Event.subscribe("xfbml.ready", message => {
console.log(message.type);
console.log(message.id);
console.log(message.instance);
});

FB.Event.unsubscribe("xfbml.ready", () => {});

FB.api("/me", response => {});
FB.api("/me", "get", { fields: ["last_name"] }, response => {});
FB.api("/me", { fields: ["last_name", "age_range"] }, response => {
Expand Down
17 changes: 16 additions & 1 deletion types/facebook-js-sdk/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,22 @@ declare namespace facebook {
| "auth.logout"
| "auth.login"
| "auth.statusChange"
| "xfbml.ready"
| "xfbml.render";

/**
* Payload delivered to `xfbml.ready` subscribers when a social plugin
* finishes rendering. The `instance` shape varies by plugin `type`
* (e.g. video instances expose `play`/`pause`/`subscribe`).
*
* https://developers.facebook.com/docs/javascript/howto/#tracking-xfbml-rendering
*/
interface XfbmlReadyMessage {
type: string;
id: string;
instance: unknown;
}

type LoginStatus =
| "authorization_expired"
| "connected"
Expand All @@ -18,7 +32,8 @@ declare namespace facebook {

type FacebookEventCallback<
TEvent extends FacebookEventType,
> = TEvent extends "xfbl.render" ? () => void
> = TEvent extends "xfbml.render" ? () => void
: TEvent extends "xfbml.ready" ? (message: XfbmlReadyMessage) => void
: (response: StatusResponse) => void;

type UserField =
Expand Down
2 changes: 1 addition & 1 deletion types/jsdom/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
/// <reference types="node" />

import { EventEmitter } from "events";
import { Token } from "parse5";
import type { Token } from "parse5" with { "resolution-mode": "import" };
import * as tough from "tough-cookie";
import { Dispatcher } from "undici-types";
import { Context } from "vm";
Expand Down
3 changes: 2 additions & 1 deletion types/jsdom/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,10 @@
"dependencies": {
"@types/node": "*",
"@types/tough-cookie": "*",
"parse5": "^7.0.0",
"parse5": "^8.0.0",
"undici-types": "^7.21.0"
},
"minimumTypeScriptVersion": "5.3",
"devDependencies": {
"@types/jsdom": "workspace:."
},
Expand Down
7 changes: 1 addition & 6 deletions types/layzr.js/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,5 @@
"devDependencies": {
"@types/layzr.js": "workspace:."
},
"owners": [
{
"name": "Rostislav Shermenyov",
"githubUsername": "shermendev"
}
]
"owners": []
}
4 changes: 0 additions & 4 deletions types/moveto/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,6 @@
"@types/moveto": "workspace:."
},
"owners": [
{
"name": "Rostislav Shermenyov",
"githubUsername": "shermendev"
},
{
"name": "pea3nut",
"githubUsername": "pea3nut"
Expand Down
15 changes: 6 additions & 9 deletions types/node/events.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -528,15 +528,12 @@ declare module "node:events" {
* import { addAbortListener } from 'node:events';
*
* function example(signal) {
* let disposable;
* try {
* signal.addEventListener('abort', (e) => e.stopImmediatePropagation());
* disposable = addAbortListener(signal, (e) => {
* // Do something when signal is aborted.
* });
* } finally {
* disposable?.[Symbol.dispose]();
* }
* signal.addEventListener('abort', (e) => e.stopImmediatePropagation());
* // addAbortListener() returns a disposable, so the `using` keyword ensures
* // the abort listener is automatically removed when this scope exits.
* using _ = addAbortListener(signal, (e) => {
* // Do something when signal is aborted.
* });
* }
* ```
* @since v20.5.0
Expand Down
132 changes: 126 additions & 6 deletions types/node/fs.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1144,6 +1144,7 @@ declare module "node:fs" {
options:
| (StatOptions & {
bigint?: false | undefined;
throwIfNoEntry?: true | undefined;
})
| undefined,
callback: (err: NodeJS.ErrnoException | null, stats: Stats) => void,
Expand All @@ -1152,33 +1153,82 @@ declare module "node:fs" {
path: PathLike,
options: StatOptions & {
bigint: true;
throwIfNoEntry?: true | undefined;
},
callback: (err: NodeJS.ErrnoException | null, stats: BigIntStats) => void,
): void;
function stat(
path: PathLike,
options: StatOptions | undefined,
options: StatOptions & {
bigint?: false | undefined;
throwIfNoEntry: false;
},
callback: (err: NodeJS.ErrnoException | null, stats: Stats | undefined) => void,
): void;
function stat(
path: PathLike,
options: StatOptions & {
bigint: true;
throwIfNoEntry: false;
},
callback: (err: NodeJS.ErrnoException | null, stats: BigIntStats | undefined) => void,
): void;
function stat(
path: PathLike,
options: StatOptions & {
throwIfNoEntry?: true | undefined;
},
callback: (err: NodeJS.ErrnoException | null, stats: Stats | BigIntStats) => void,
): void;
function stat(
path: PathLike,
options: StatOptions | undefined,
callback: (err: NodeJS.ErrnoException | null, stats: Stats | BigIntStats | undefined) => void,
): void;
namespace stat {
// TODO: aliased promisify signatures
/**
* Asynchronous stat(2) - Get file status.
* @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
*/
function __promisify__(path: PathLike): Promise<Stats>;
function __promisify__(
path: PathLike,
options?: StatOptions & {
bigint?: false | undefined;
throwIfNoEntry?: true | undefined;
},
): Promise<Stats>;
function __promisify__(
path: PathLike,
options: StatOptions & {
bigint: true;
throwIfNoEntry?: true | undefined;
},
): Promise<BigIntStats>;
function __promisify__(path: PathLike, options?: StatOptions): Promise<Stats | BigIntStats>;
function __promisify__(
path: PathLike,
options: StatOptions & {
bigint?: false | undefined;
throwIfNoEntry: false;
},
): Promise<Stats | undefined>;
function __promisify__(
path: PathLike,
options: StatOptions & {
bigint: true;
throwIfNoEntry: false;
},
): Promise<BigIntStats | undefined>;
function __promisify__(
path: PathLike,
options: StatOptions & {
throwIfNoEntry?: true | undefined;
},
): Promise<Stats | BigIntStats>;
function __promisify__(path: PathLike, options?: StatOptions): Promise<Stats | BigIntStats | undefined>;
}
/** @deprecated This orphaned interface will be removed in a future version. */
interface StatSyncFn extends Function {
(path: PathLike, options?: undefined): Stats;
(
Expand Down Expand Up @@ -1220,7 +1270,42 @@ declare module "node:fs" {
* Synchronous stat(2) - Get file status.
* @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
*/
const statSync: StatSyncFn;
function statSync(path: PathLike): Stats;
function statSync(
path: PathLike,
options?: StatOptions & {
bigint?: false | undefined;
throwIfNoEntry?: true | undefined;
},
): Stats;
function statSync(
path: PathLike,
options: StatOptions & {
bigint: true;
throwIfNoEntry?: true | undefined;
},
): BigIntStats;
function statSync(
path: PathLike,
options: StatOptions & {
bigint?: false | undefined;
throwIfNoEntry: false;
},
): Stats | undefined;
function statSync(
path: PathLike,
options: StatOptions & {
bigint: true;
throwIfNoEntry: false;
},
): BigIntStats | undefined;
function statSync(
path: PathLike,
options: StatOptions & {
throwIfNoEntry?: true | undefined;
},
): Stats | BigIntStats;
function statSync(path: PathLike, options?: StatOptions): Stats | BigIntStats | undefined;
/**
* Invokes the callback with the `fs.Stats` for the file descriptor.
*
Expand Down Expand Up @@ -1410,7 +1495,42 @@ declare module "node:fs" {
* Synchronous lstat(2) - Get file status. Does not dereference symbolic links.
* @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
*/
const lstatSync: StatSyncFn;
function lstatSync(path: PathLike): Stats;
function lstatSync(
path: PathLike,
options?: StatOptions & {
bigint?: false | undefined;
throwIfNoEntry?: true | undefined;
},
): Stats;
function lstatSync(
path: PathLike,
options: StatOptions & {
bigint: true;
throwIfNoEntry?: true | undefined;
},
): BigIntStats;
function lstatSync(
path: PathLike,
options: StatOptions & {
bigint?: false | undefined;
throwIfNoEntry: false;
},
): Stats | undefined;
function lstatSync(
path: PathLike,
options: StatOptions & {
bigint: true;
throwIfNoEntry: false;
},
): BigIntStats | undefined;
function lstatSync(
path: PathLike,
options: StatOptions & {
throwIfNoEntry?: true | undefined;
},
): Stats | BigIntStats;
function lstatSync(path: PathLike, options?: StatOptions): Stats | BigIntStats | undefined;
/**
* Creates a new link from the `existingPath` to the `newPath`. See the POSIX [`link(2)`](http://man7.org/linux/man-pages/man2/link.2.html) documentation for more detail. No arguments other than
* a possible
Expand Down Expand Up @@ -4461,10 +4581,10 @@ declare module "node:fs" {
}
interface StatOptions {
bigint?: boolean | undefined;
}
interface StatSyncOptions extends StatOptions {
throwIfNoEntry?: boolean | undefined;
}
/** @deprecated This orphaned interface will be removed in a future version. Use `StatOptions` instead. */
interface StatSyncOptions extends StatOptions {}
interface CopyOptionsBase {
/**
* Dereference symlinks
Expand Down
Loading