From 55a9d75a4b238c09e703f729df44e52ef53affff Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 9 Jan 2026 16:18:56 -0800 Subject: [PATCH 1/8] Remove contributors with deleted accounts (#74252) Co-authored-by: TypeScript Bot --- types/fabric/package.json | 4 ---- types/katex/package.json | 4 ---- types/node-jsfl-runner/package.json | 7 +------ types/passport-facebook-token/package.json | 4 ---- types/react-native-safari-view/package.json | 7 +------ types/scrambo/package.json | 7 +------ 6 files changed, 3 insertions(+), 30 deletions(-) diff --git a/types/fabric/package.json b/types/fabric/package.json index 047547f4006c81..b5a58c8b94e913 100644 --- a/types/fabric/package.json +++ b/types/fabric/package.json @@ -17,10 +17,6 @@ "name": "Joseph Livecchi", "githubUsername": "joewashear007" }, - { - "name": "Michael Randolph", - "githubUsername": "mrand01" - }, { "name": "Tiger Oakes", "githubUsername": "NotWoods" diff --git a/types/katex/package.json b/types/katex/package.json index cb8b5c97e38a4f..4b45f425f88727 100644 --- a/types/katex/package.json +++ b/types/katex/package.json @@ -9,10 +9,6 @@ "@types/katex": "workspace:." }, "owners": [ - { - "name": "Michael Randolph", - "githubUsername": "mrand01" - }, { "name": "Kevin Nguyen", "githubUsername": "knguyen0125" diff --git a/types/node-jsfl-runner/package.json b/types/node-jsfl-runner/package.json index 20697958d8fb5f..1acc15e83925e2 100644 --- a/types/node-jsfl-runner/package.json +++ b/types/node-jsfl-runner/package.json @@ -11,10 +11,5 @@ "devDependencies": { "@types/node-jsfl-runner": "workspace:." }, - "owners": [ - { - "name": "Michael Randolph", - "githubUsername": "mrand01" - } - ] + "owners": [] } diff --git a/types/passport-facebook-token/package.json b/types/passport-facebook-token/package.json index 2d879e9c3bfe8a..dc1cbe8388100b 100644 --- a/types/passport-facebook-token/package.json +++ b/types/passport-facebook-token/package.json @@ -16,10 +16,6 @@ { "name": "Ray Martone", "githubUsername": "rmartone" - }, - { - "name": "Michael Randolph", - "githubUsername": "mrand01" } ] } diff --git a/types/react-native-safari-view/package.json b/types/react-native-safari-view/package.json index 6d9b40bef6578a..9e7f456a86ca2f 100644 --- a/types/react-native-safari-view/package.json +++ b/types/react-native-safari-view/package.json @@ -11,10 +11,5 @@ "devDependencies": { "@types/react-native-safari-view": "workspace:." }, - "owners": [ - { - "name": "Michael Randolph", - "githubUsername": "mrand01" - } - ] + "owners": [] } diff --git a/types/scrambo/package.json b/types/scrambo/package.json index d6511f7583560b..435d207cdb5992 100644 --- a/types/scrambo/package.json +++ b/types/scrambo/package.json @@ -8,10 +8,5 @@ "devDependencies": { "@types/scrambo": "workspace:." }, - "owners": [ - { - "name": "Christopher Mühl", - "githubUsername": "padarom" - } - ] + "owners": [] } From 5123ad006e0a5ae7c85e236cca51c3d37d5723e1 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 9 Jan 2026 16:20:35 -0800 Subject: [PATCH 2/8] Bump the github-actions group across 2 directories with 6 updates (#74255) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/actions/setup-for-scripts/action.yml | 2 +- .github/workflows/CI.yml | 6 +++--- .github/workflows/UpdateCodeowners.yml | 2 +- .github/workflows/format-and-commit.yml | 4 ++-- .github/workflows/ghostbuster.yml | 2 +- .github/workflows/pnpm-cache.yml | 2 +- .github/workflows/support-window.yml | 2 +- 7 files changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/actions/setup-for-scripts/action.yml b/.github/actions/setup-for-scripts/action.yml index 17d0788c2eb4d6..b6338ba54ae60d 100644 --- a/.github/actions/setup-for-scripts/action.yml +++ b/.github/actions/setup-for-scripts/action.yml @@ -4,7 +4,7 @@ description: Set up repo for running scripts runs: using: composite steps: - - uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0 + - uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0 with: node-version: '20' - uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4.2.0 diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 2d0f0226a815b0..d2865156c0c087 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -87,7 +87,7 @@ jobs: echo "store=$(pnpm store path)" >> $GITHUB_OUTPUT - name: Restore pnpm cache - uses: actions/cache/restore@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0 + uses: actions/cache/restore@9255dc7a253b0ccc959486e2bca901246202afeb # v5.0.1 with: path: ${{ steps.pnpm-cache.outputs.store }} key: ${{ runner.os }}-pnpm-store-cache- @@ -115,7 +115,7 @@ jobs: if: ${{ github.event_name == 'pull_request' }} - name: Upload suggestions - uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0 + uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0 with: name: suggestions_${{ matrix.shardId }}_${{ matrix.shardCount }} if-no-files-found: ignore @@ -139,7 +139,7 @@ jobs: id: suggestions-dir run: echo "path=$(node ./scripts/get-suggestions-dir.js)" >> "$GITHUB_OUTPUT" - - uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6.0.0 + - uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0 with: path: ${{ steps.suggestions-dir.outputs.path }} merge-multiple: true diff --git a/.github/workflows/UpdateCodeowners.yml b/.github/workflows/UpdateCodeowners.yml index 2a85d013eb23c7..5bed7ba0d784dd 100644 --- a/.github/workflows/UpdateCodeowners.yml +++ b/.github/workflows/UpdateCodeowners.yml @@ -32,7 +32,7 @@ jobs: - run: pnpm run update-codeowners - - uses: stefanzweifel/git-auto-commit-action@28e16e81777b558cc906c8750092100bbb34c5e3 # v7.0.0 + - uses: stefanzweifel/git-auto-commit-action@04702edda442b2e678b25b537cec683a1493fcb9 # v7.1.0 with: commit_author: 'TypeScript Bot ' commit_message: '🤖 Update CODEOWNERS' diff --git a/.github/workflows/format-and-commit.yml b/.github/workflows/format-and-commit.yml index a318e8becb9af7..999947edb12a52 100644 --- a/.github/workflows/format-and-commit.yml +++ b/.github/workflows/format-and-commit.yml @@ -24,7 +24,7 @@ jobs: id: date run: echo "date=$(/bin/date -u "+%Y-%m-%d")" >> $GITHUB_OUTPUT - - uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0 + - uses: actions/cache@9255dc7a253b0ccc959486e2bca901246202afeb # v5.0.1 with: # dprint caches info about the files in the repo to skip formatting them. # However, since package.json and .dprint.jsonc don't change very often, @@ -40,7 +40,7 @@ jobs: - run: pnpm dprint fmt - - uses: stefanzweifel/git-auto-commit-action@28e16e81777b558cc906c8750092100bbb34c5e3 # v7.0.0 + - uses: stefanzweifel/git-auto-commit-action@04702edda442b2e678b25b537cec683a1493fcb9 # v7.1.0 with: commit_author: 'TypeScript Bot ' commit_message: '🤖 dprint fmt' diff --git a/.github/workflows/ghostbuster.yml b/.github/workflows/ghostbuster.yml index dd0b6311e9677e..7593815e3a8c99 100644 --- a/.github/workflows/ghostbuster.yml +++ b/.github/workflows/ghostbuster.yml @@ -42,7 +42,7 @@ jobs: fi - if: ${{ inputs.skipPR != 'true' }} - uses: peter-evans/create-pull-request@22a9089034f40e5a961c8808d113e2c98fb63676 # v7.0.11 + uses: peter-evans/create-pull-request@98357b18bf14b5342f975ff684046ec3b2a07725 # v8.0.0 with: token: ${{ secrets.GITHUB_TOKEN }} commit-message: 'Remove contributors with deleted accounts #no-publishing-comment' diff --git a/.github/workflows/pnpm-cache.yml b/.github/workflows/pnpm-cache.yml index 71bfacbcb45f8c..cf8f4ad73a6e4d 100644 --- a/.github/workflows/pnpm-cache.yml +++ b/.github/workflows/pnpm-cache.yml @@ -27,7 +27,7 @@ jobs: run: pnpm install - name: Save pnpm cache - uses: actions/cache/save@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0 + uses: actions/cache/save@9255dc7a253b0ccc959486e2bca901246202afeb # v5.0.1 with: path: ${{ steps.pnpm-cache.outputs.store }} key: ${{ runner.os }}-pnpm-store-cache-${{ steps.pnpm-cache.outputs.date }} diff --git a/.github/workflows/support-window.yml b/.github/workflows/support-window.yml index 2890a8c34c4176..1dae4dcadc2d21 100644 --- a/.github/workflows/support-window.yml +++ b/.github/workflows/support-window.yml @@ -43,7 +43,7 @@ jobs: - name: Make SVG diagram run: node --experimental-json-modules scripts/support-window > docs/support-window.svg - - uses: stefanzweifel/git-auto-commit-action@28e16e81777b558cc906c8750092100bbb34c5e3 # v7.0.0 + - uses: stefanzweifel/git-auto-commit-action@04702edda442b2e678b25b537cec683a1493fcb9 # v7.1.0 with: commit_author: 'TypeScript Bot ' commit_message: '🤖 Update support window' From 03aa5d85a0f117cff2d0001f4b3ca79ee762609b Mon Sep 17 00:00:00 2001 From: ikeyan Date: Sat, 10 Jan 2026 09:22:52 +0900 Subject: [PATCH 3/8] =?UTF-8?q?=F0=9F=A4=96=20Merge=20PR=20#74265=20[node/?= =?UTF-8?q?tls]=20Added=20TLSSocket.servername=20by=20@ikeyan?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- types/node/node-tests/tls.ts | 1 + types/node/tls.d.ts | 4 ++++ types/node/v20/test/tls.ts | 1 + types/node/v20/tls.d.ts | 4 ++++ types/node/v22/test/tls.ts | 1 + types/node/v22/tls.d.ts | 4 ++++ types/node/v24/test/tls.ts | 1 + types/node/v24/tls.d.ts | 4 ++++ 8 files changed, 20 insertions(+) diff --git a/types/node/node-tests/tls.ts b/types/node/node-tests/tls.ts index 5e6200b0625604..84bfa124392eb1 100644 --- a/types/node/node-tests/tls.ts +++ b/types/node/node-tests/tls.ts @@ -60,6 +60,7 @@ import { tlsSocket.enableTrace(); tlsSocket.encrypted; // $ExpectType true + tlsSocket.servername; // $ExpectType string | false | null const caCertificates: string[] = getCACertificates("default"); const ciphers: string[] = getCiphers(); diff --git a/types/node/tls.d.ts b/types/node/tls.d.ts index 8e2ffa7d08aa2b..5c45f93774f058 100644 --- a/types/node/tls.d.ts +++ b/types/node/tls.d.ts @@ -251,6 +251,10 @@ declare module "node:tls" { * When a handshake is completed but not ALPN protocol was selected, tlsSocket.alpnProtocol equals false. */ alpnProtocol: string | false | null; + /** + * String containing the server name requested via SNI (Server Name Indication) TLS extension. + */ + servername: string | false | null; /** * Returns an object representing the local certificate. The returned object has * some properties corresponding to the fields of the certificate. diff --git a/types/node/v20/test/tls.ts b/types/node/v20/test/tls.ts index c9e7e32d9a2046..7d0298cca28178 100644 --- a/types/node/v20/test/tls.ts +++ b/types/node/v20/test/tls.ts @@ -58,6 +58,7 @@ import { tlsSocket.enableTrace(); tlsSocket.encrypted; // $ExpectType true + tlsSocket.servername; // $ExpectType string | false | null const ciphers: string[] = getCiphers(); const curve: string = DEFAULT_ECDH_CURVE; diff --git a/types/node/v20/tls.d.ts b/types/node/v20/tls.d.ts index 948b7371cbd6f0..0b819a1779e450 100644 --- a/types/node/v20/tls.d.ts +++ b/types/node/v20/tls.d.ts @@ -245,6 +245,10 @@ declare module "tls" { * When a handshake is completed but not ALPN protocol was selected, tlsSocket.alpnProtocol equals false. */ alpnProtocol: string | false | null; + /** + * String containing the server name requested via SNI (Server Name Indication) TLS extension. + */ + servername: string | false | null; /** * Returns an object representing the local certificate. The returned object has * some properties corresponding to the fields of the certificate. diff --git a/types/node/v22/test/tls.ts b/types/node/v22/test/tls.ts index e31bae16b1c682..29559361ad00e7 100644 --- a/types/node/v22/test/tls.ts +++ b/types/node/v22/test/tls.ts @@ -60,6 +60,7 @@ import { tlsSocket.enableTrace(); tlsSocket.encrypted; // $ExpectType true + tlsSocket.servername; // $ExpectType string | false | null const caCertificates: string[] = getCACertificates("default"); const ciphers: string[] = getCiphers(); diff --git a/types/node/v22/tls.d.ts b/types/node/v22/tls.d.ts index 86e96b89ef2f66..84dc89f3b14e15 100644 --- a/types/node/v22/tls.d.ts +++ b/types/node/v22/tls.d.ts @@ -245,6 +245,10 @@ declare module "tls" { * When a handshake is completed but not ALPN protocol was selected, tlsSocket.alpnProtocol equals false. */ alpnProtocol: string | false | null; + /** + * String containing the server name requested via SNI (Server Name Indication) TLS extension. + */ + servername: string | false | null; /** * Returns an object representing the local certificate. The returned object has * some properties corresponding to the fields of the certificate. diff --git a/types/node/v24/test/tls.ts b/types/node/v24/test/tls.ts index e31bae16b1c682..29559361ad00e7 100644 --- a/types/node/v24/test/tls.ts +++ b/types/node/v24/test/tls.ts @@ -60,6 +60,7 @@ import { tlsSocket.enableTrace(); tlsSocket.encrypted; // $ExpectType true + tlsSocket.servername; // $ExpectType string | false | null const caCertificates: string[] = getCACertificates("default"); const ciphers: string[] = getCiphers(); diff --git a/types/node/v24/tls.d.ts b/types/node/v24/tls.d.ts index 5d52de810c2a58..1e51dabf37afee 100644 --- a/types/node/v24/tls.d.ts +++ b/types/node/v24/tls.d.ts @@ -245,6 +245,10 @@ declare module "tls" { * When a handshake is completed but not ALPN protocol was selected, tlsSocket.alpnProtocol equals false. */ alpnProtocol: string | false | null; + /** + * String containing the server name requested via SNI (Server Name Indication) TLS extension. + */ + servername: string | false | null; /** * Returns an object representing the local certificate. The returned object has * some properties corresponding to the fields of the certificate. From 605212b9e507d878dc24fae2a358cd464e1d8b83 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 9 Jan 2026 16:23:18 -0800 Subject: [PATCH 4/8] Remove contributors with deleted accounts (#74279) Co-authored-by: TypeScript Bot From 2863f9d379ca5fed26f50bfe9af6852589d2882e Mon Sep 17 00:00:00 2001 From: Yukihiro Hasegawa <49516827+y-hsgw@users.noreply.github.com> Date: Sat, 10 Jan 2026 09:56:01 +0900 Subject: [PATCH 5/8] =?UTF-8?q?=F0=9F=A4=96=20Merge=20PR=20#74254=20node/p?= =?UTF-8?q?rocess:=20add=20excludeEnv=20option=20to=20diagnostic=20report?= =?UTF-8?q?=20configuration=20by=20@y-hsgw?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- types/node/process.d.ts | 5 +++++ types/node/v22/process.d.ts | 5 +++++ types/node/v22/test/process.ts | 1 + types/node/v24/process.d.ts | 5 +++++ types/node/v24/test/process.ts | 1 + 5 files changed, 17 insertions(+) diff --git a/types/node/process.d.ts b/types/node/process.d.ts index b3082eb7132f6b..5c371636613bc1 100644 --- a/types/node/process.d.ts +++ b/types/node/process.d.ts @@ -594,6 +594,11 @@ declare module "node:process" { * @default false */ reportOnUncaughtException: boolean; + /** + * If true, a diagnostic report is generated without the environment variables. + * @default false + */ + excludeEnv: boolean; /** * The signal used to trigger the creation of a diagnostic report. * @default 'SIGUSR2' diff --git a/types/node/v22/process.d.ts b/types/node/v22/process.d.ts index b761ec170f5edd..0ccd90b6332c12 100644 --- a/types/node/v22/process.d.ts +++ b/types/node/v22/process.d.ts @@ -474,6 +474,11 @@ declare module "process" { * @default false */ reportOnUncaughtException: boolean; + /** + * If true, a diagnostic report is generated without the environment variables. + * @default false + */ + excludeEnv: boolean; /** * The signal used to trigger the creation of a diagnostic report. * @default 'SIGUSR2' diff --git a/types/node/v22/test/process.ts b/types/node/v22/test/process.ts index a87700e8e4be29..aa1311afe48af4 100644 --- a/types/node/v22/test/process.ts +++ b/types/node/v22/test/process.ts @@ -68,6 +68,7 @@ import { fileURLToPath } from "node:url"; report.reportOnFatalError = true; report.reportOnSignal = true; report.reportOnUncaughtException = true; + report.excludeEnv = true; report.signal = "SIGINT"; let dest = report.writeReport("asdasd", new Error()); dest = report.writeReport("asdasd"); diff --git a/types/node/v24/process.d.ts b/types/node/v24/process.d.ts index c1108661abb1d3..d31ea550b7b0a4 100644 --- a/types/node/v24/process.d.ts +++ b/types/node/v24/process.d.ts @@ -472,6 +472,11 @@ declare module "process" { * @default false */ reportOnUncaughtException: boolean; + /** + * If true, a diagnostic report is generated without the environment variables. + * @default false + */ + excludeEnv: boolean; /** * The signal used to trigger the creation of a diagnostic report. * @default 'SIGUSR2' diff --git a/types/node/v24/test/process.ts b/types/node/v24/test/process.ts index a87700e8e4be29..aa1311afe48af4 100644 --- a/types/node/v24/test/process.ts +++ b/types/node/v24/test/process.ts @@ -68,6 +68,7 @@ import { fileURLToPath } from "node:url"; report.reportOnFatalError = true; report.reportOnSignal = true; report.reportOnUncaughtException = true; + report.excludeEnv = true; report.signal = "SIGINT"; let dest = report.writeReport("asdasd", new Error()); dest = report.writeReport("asdasd"); From f103e59bc5a383fde18f4e071fbe00c1c2c6225b Mon Sep 17 00:00:00 2001 From: Nihesh Rachakonda <153965219+rnihesh@users.noreply.github.com> Date: Sat, 10 Jan 2026 07:26:11 +0530 Subject: [PATCH 6/8] =?UTF-8?q?=F0=9F=A4=96=20Merge=20PR=20#74160=20[matom?= =?UTF-8?q?o-tracker-react-native]=20Add=20url=20property=20to=20Action=20?= =?UTF-8?q?interface=20by=20@rnihesh?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- types/matomo-tracker-react-native/index.d.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/types/matomo-tracker-react-native/index.d.ts b/types/matomo-tracker-react-native/index.d.ts index ea549c6189d240..5b089f0b318fd2 100644 --- a/types/matomo-tracker-react-native/index.d.ts +++ b/types/matomo-tracker-react-native/index.d.ts @@ -24,6 +24,7 @@ export interface AppStart { export interface Action { name: string; + url?: string; userInfo?: UserInfo; } @@ -33,6 +34,7 @@ export interface Event { name?: string; value?: number; campaign?: string; + url?: string; userInfo?: UserInfo; } From 0bf407b26832de32398d6a8f917636e0501b5b5b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=ED=95=9C=EB=A7=8C=EC=9A=B1?= <98882987+manNomi@users.noreply.github.com> Date: Sat, 10 Jan 2026 12:10:35 +0900 Subject: [PATCH 7/8] =?UTF-8?q?=F0=9F=A4=96=20Merge=20PR=20#74280=20[relay?= =?UTF-8?q?-runtime]=20:=20Add=20missing=20RelayFeatureFlags=20with=20rela?= =?UTF-8?q?y-runtime=20v20.1.1=20by=20@manNomi?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../lib/util/RelayFeatureFlags.d.ts | 16 ++- types/relay-runtime/relay-runtime-tests.tsx | 130 +++++++++++++----- 2 files changed, 103 insertions(+), 43 deletions(-) diff --git a/types/relay-runtime/lib/util/RelayFeatureFlags.d.ts b/types/relay-runtime/lib/util/RelayFeatureFlags.d.ts index 5aab726fa84c82..f21b8376c16186 100644 --- a/types/relay-runtime/lib/util/RelayFeatureFlags.d.ts +++ b/types/relay-runtime/lib/util/RelayFeatureFlags.d.ts @@ -5,22 +5,28 @@ export interface FeatureFlags { ENABLE_RELAY_RESOLVERS: boolean; ENABLE_GETFRAGMENTIDENTIFIER_OPTIMIZATION: boolean; ENABLE_FRIENDLY_QUERY_NAME_GQL_URL: boolean; - ENABLE_LOAD_QUERY_REQUEST_DEDUPING: boolean; ENABLE_DO_NOT_WRAP_LIVE_QUERY: boolean; ENABLE_NOTIFY_SUBSCRIPTION: boolean; - BATCH_ASYNC_MODULE_UPDATES_FN: null | undefined | ((arg: () => void) => Disposable); + BATCH_ASYNC_MODULE_UPDATES_FN: null | undefined | ((callback: () => void) => Disposable); ENABLE_CONTAINERS_SUBSCRIBE_ON_COMMIT: boolean; MAX_DATA_ID_LENGTH: number | null | undefined; STRING_INTERN_LEVEL: number; LOG_MISSING_RECORDS_IN_PROD: boolean; ENABLE_RELAY_OPERATION_TRACKER_SUSPENSE: boolean; + ENABLE_UI_CONTEXT_ON_RELAY_LOGGER: boolean; + ENABLE_NONCOMPLIANT_ERROR_HANDLING_ON_LISTS: boolean; ENABLE_LOOSE_SUBSCRIPTION_ATTRIBUTION: boolean; ENABLE_OPERATION_TRACKER_OPTIMISTIC_UPDATES: boolean; - ENABLE_FIELD_ERROR_HANDLING: boolean; - ENABLE_FIELD_ERROR_HANDLING_THROW_BY_DEFAULT: boolean; - ENABLE_FIELD_ERROR_HANDLING_CATCH_DIRECTIVE: boolean; PROCESS_OPTIMISTIC_UPDATE_BEFORE_SUBSCRIPTION: boolean; MARK_RESOLVER_VALUES_AS_CLEAN_AFTER_FRAGMENT_REREAD: boolean; + ENABLE_CYLE_DETECTION_IN_VARIABLES: boolean; + ENABLE_ACTIVITY_COMPATIBILITY: boolean; + ENABLE_READ_TIME_RESOLVER_STORAGE_KEY_PREFIX: boolean; + ENABLE_USE_PAGINATION_IS_LOADING_FIX: boolean; + ENABLE_STORE_ID_COLLISION_LOGGING: boolean; + DISALLOW_NESTED_UPDATES: boolean; + ENABLE_TYPENAME_PREFIXED_DATA_ID: boolean; + CHECK_ALL_FRAGMENTS_FOR_MISSING_CLIENT_EDGES: boolean; } export const RelayFeatureFlags: FeatureFlags; diff --git a/types/relay-runtime/relay-runtime-tests.tsx b/types/relay-runtime/relay-runtime-tests.tsx index b52e400269ebd0..9a48eccb1b7296 100644 --- a/types/relay-runtime/relay-runtime-tests.tsx +++ b/types/relay-runtime/relay-runtime-tests.tsx @@ -30,6 +30,7 @@ import { RecordProxy, RecordSource, RecordSourceSelectorProxy, + RelayFeatureFlags, requestSubscription, Result, ROOT_ID, @@ -105,9 +106,9 @@ const handlerProvider: HandlerProvider = (handle: string) => { // Augment (or remove from) this list: case "connection": return ConnectionHandler; - // case 'viewer': - // // ViewerHandler is special-cased and does not have an `update` method - // return ViewerHandler; + // case 'viewer': + // // ViewerHandler is special-cased and does not have an `update` method + // return ViewerHandler; case "custom": return { update(store, fieldPayload) { @@ -170,7 +171,7 @@ const environment = new Environment({ kind: "linked", }, ], - log: logEvent => { + log: (logEvent) => { switch (logEvent.name) { case "suspense.fragment": case "suspense.query": @@ -213,7 +214,7 @@ const environment = new Environment({ break; } }, - relayFieldLogger: arg => { + relayFieldLogger: (arg) => { if (arg.kind === "missing_required_field.log") { console.log(arg.fieldPath, arg.owner); } else if (arg.kind === "missing_required_field.throw") { @@ -366,7 +367,7 @@ const get_store_recorditem_typed = store.getSource().get("someDat // commitLocalUpdate // ~~~~~~~~~~~~~~~~~~~~~ -commitLocalUpdate(environment, store => { +commitLocalUpdate(environment, (store) => { const root = store.get(ROOT_ID); root!.setValue("foo", "localKey"); }); @@ -672,11 +673,7 @@ const operationWithCacheConfig = createOperationDescriptor(request, variables, c const operationWithDataID = createOperationDescriptor(request, variables, undefined, dataID); const operationWithAll = createOperationDescriptor(request, variables, cacheConfig, dataID); -__internal.fetchQueryDeduped( - environment, - operation.request.identifier, - () => environment.execute({ operation }), -); +__internal.fetchQueryDeduped(environment, operation.request.identifier, () => environment.execute({ operation })); // ~~~~~~~~~~~~~~~~~~~~~~~ // MULTI ACTOR ENVIRONMENT @@ -787,7 +784,7 @@ function NonNullableArrayFragmentResolver(usersKey: UserComponent_users$key) { usersKey, ); - return data.map(thing => `${thing.id}: ${thing.name}, ${thing.profile_picture}`); + return data.map((thing) => `${thing.id}: ${thing.name}, ${thing.profile_picture}`); } function NullableArrayFragmentResolver(usersKey: UserComponent_users$key | null) { @@ -803,7 +800,7 @@ function NullableArrayFragmentResolver(usersKey: UserComponent_users$key | null) usersKey, ); - return data?.map(thing => `${thing.id}: ${thing.name}, ${thing.profile_picture}`); + return data?.map((thing) => `${thing.id}: ${thing.name}, ${thing.profile_picture}`); } function ArrayOfNullableFragmentResolver(usersKey: ReadonlyArray) { @@ -819,7 +816,7 @@ function ArrayOfNullableFragmentResolver(usersKey: ReadonlyArray `${thing.id}: ${thing.name}, ${thing.profile_picture}`); + return data?.map((thing) => `${thing.id}: ${thing.name}, ${thing.profile_picture}`); } // ~~~~~~~~~~~~~~~~~~~~~ @@ -847,10 +844,10 @@ requestSubscription(environment, { onCompleted: () => { return; }, - onError: _error => { + onError: (_error) => { return; }, - onNext: _response => { + onNext: (_response) => { return; }, updater: (_store, _data) => { @@ -881,15 +878,18 @@ ConnectionInterface.inject({ // Provided variables // ~~~~~~~~~~~~~~~~~~ -__internal.withProvidedVariables({ - one: "value", -}, { - two: { - get() { - return "value"; +__internal.withProvidedVariables( + { + one: "value", + }, + { + two: { + get() { + return "value"; + }, }, }, -}); +); __internal.withProvidedVariables.tests_only_resetDebugCache?.(); @@ -974,7 +974,10 @@ const refetchMetadata: { // ~~~~~~~~~~~~~~~~~~~ async function waitForFragmentDataTest(userKey: UserComponent_user$key) { - const { name, profile_picture: { uri } } = await waitForFragmentData( + const { + name, + profile_picture: { uri }, + } = await waitForFragmentData( environment, graphql` fragment UserComponent_user on User { @@ -1075,26 +1078,26 @@ function observeQueryTest() { // ~~~~~~~~~~~~~~~~~~ const MyResolverType__id_graphql: ReaderFragment = { - "argumentDefinitions": [], - "kind": "Fragment", - "metadata": null, - "name": "MyResolverType__id", - "selections": [ + argumentDefinitions: [], + kind: "Fragment", + metadata: null, + name: "MyResolverType__id", + selections: [ { - "kind": "ClientExtension", - "selections": [ + kind: "ClientExtension", + selections: [ { - "alias": null, - "args": null, - "kind": "ScalarField", - "name": "id", - "storageKey": null, + alias: null, + args: null, + kind: "ScalarField", + name: "id", + storageKey: null, }, ], }, ], - "type": "MyResolverType", - "abstractKey": null, + type: "MyResolverType", + abstractKey: null, }; interface MyResolverType { @@ -1127,3 +1130,54 @@ type AnimalTypenames = "Cat" | "Dog"; export function myAnimal(): IdOf<"Animal", AnimalTypenames> { return Math.random() > 0.5 ? { id: "5", __typename: "Dog" } : { id: "6", __typename: "Cat" }; } + +// ~~~~~~~~~~~~~~~~~~ +// RelayFeatureFlags +// ~~~~~~~~~~~~~~~~~~ + +// Test all existing flags +// $ExpectType boolean +const variableConnectionKey = RelayFeatureFlags.ENABLE_VARIABLE_CONNECTION_KEY; + +// $ExpectType boolean +const relayResolvers = RelayFeatureFlags.ENABLE_RELAY_RESOLVERS; + +// $ExpectType boolean +const uiContext = RelayFeatureFlags.ENABLE_UI_CONTEXT_ON_RELAY_LOGGER; + +// $ExpectType boolean +const nonCompliantErrorHandling = RelayFeatureFlags.ENABLE_NONCOMPLIANT_ERROR_HANDLING_ON_LISTS; + +// $ExpectType boolean +const cycleDetection = RelayFeatureFlags.ENABLE_CYLE_DETECTION_IN_VARIABLES; + +// $ExpectType boolean +const activityCompatibility = RelayFeatureFlags.ENABLE_ACTIVITY_COMPATIBILITY; + +// $ExpectType boolean +const readTimeResolverStorageKeyPrefix = RelayFeatureFlags.ENABLE_READ_TIME_RESOLVER_STORAGE_KEY_PREFIX; + +// $ExpectType boolean +const usePaginationIsLoadingFix = RelayFeatureFlags.ENABLE_USE_PAGINATION_IS_LOADING_FIX; + +// $ExpectType boolean +const storeIdCollisionLogging = RelayFeatureFlags.ENABLE_STORE_ID_COLLISION_LOGGING; + +// $ExpectType boolean +const disallowNestedUpdates = RelayFeatureFlags.DISALLOW_NESTED_UPDATES; + +// $ExpectType boolean +const typenamePrefixedDataId = RelayFeatureFlags.ENABLE_TYPENAME_PREFIXED_DATA_ID; + +// $ExpectType boolean +const checkAllFragments = RelayFeatureFlags.CHECK_ALL_FRAGMENTS_FOR_MISSING_CLIENT_EDGES; + +// Test that removed flags no longer exist (these should cause type errors) +// The following flags were removed as they don't exist in relay-runtime v20.1.1: +// - ENABLE_LOAD_QUERY_REQUEST_DEDUPING +// - ENABLE_FIELD_ERROR_HANDLING +// - ENABLE_FIELD_ERROR_HANDLING_THROW_BY_DEFAULT +// - ENABLE_FIELD_ERROR_HANDLING_CATCH_DIRECTIVE +// - FILTER_OUT_RELAY_RESOLVER_RECORDS +// - OPTIMIZE_NOTIFY +// - ENABLE_READER_FRAGMENTS_LOGGING From d215f134dfa6452f2fe100b8d778d9ea18279841 Mon Sep 17 00:00:00 2001 From: Holger Jeromin Date: Sat, 10 Jan 2026 05:14:46 +0100 Subject: [PATCH 8/8] =?UTF-8?q?=F0=9F=A4=96=20Merge=20PR=20#74180=20[jasmi?= =?UTF-8?q?ne]=20Add=20many=20missing=20tsdoc=20comments=20by=20@HolgerJer?= =?UTF-8?q?omin?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Holger Jeromin --- types/jasmine/index.d.ts | 278 ++++++++++++++++++++++++++++++++++++++- 1 file changed, 274 insertions(+), 4 deletions(-) diff --git a/types/jasmine/index.d.ts b/types/jasmine/index.d.ts index c37f20dc1d31a0..316c9f05360886 100644 --- a/types/jasmine/index.d.ts +++ b/types/jasmine/index.d.ts @@ -359,6 +359,12 @@ declare namespace jasmine { /** @deprecated Please use `Configuration` instead of `EnvConfiguration`. */ type EnvConfiguration = Configuration; + /** + * Get the currently booted mock {Clock} for this Jasmine environment. + * @name jasmine.clock + * @since 2.0.0 + * @returns {Clock} + */ function clock(): Clock; /** * @deprecated Private method that may be changed or removed in the future @@ -408,28 +414,189 @@ declare namespace jasmine { */ function is(sample: any): AsymmetricMatcher; + /** + * Get an {@link AsymmetricEqualityTester} that will succeed if the actual + * value is an `Array` that contains at least the elements in the sample. + * @since 2.2.0 + * @param sample + */ function arrayContaining(sample: ArrayLike): ArrayContaining; + /** + * Get an {@link AsymmetricEqualityTester} that will succeed if the actual + * value is an `Array` that contains all of the elements in the sample in + * any order. + * @since 2.8.0 + * @param sample + */ function arrayWithExactContents(sample: ArrayLike): ArrayContaining; + + /** + * Get an {@link AsymmetricEqualityTester} that will succeed if the actual + * value being compared contains at least the specified keys and values. + * @since 1.3.0 + * @param sample - The subset of properties that _must_ be in the actual. + */ function objectContaining(sample: { [K in keyof T]?: ExpectedRecursive }): ObjectContaining; + /** + * Get an {@link AsymmetricEqualityTester} that will succeed if every + * key/value pair in the sample passes the deep equality comparison + * with at least one key/value pair in the actual value being compared + * @since 3.5.0 + * @param sample - The subset of items that _must_ be in the actual. + */ function mapContaining(sample: Map): AsymmetricMatcher>; + /** + * Get an {@link AsymmetricEqualityTester} that will succeed if every item + * in the sample passes the deep equality comparison + * with at least one item in the actual value being compared + * @since 3.5.0 + * @param sample - The subset of items that _must_ be in the actual. + */ function setContaining(sample: Set): AsymmetricMatcher>; + /** + * Set the default spy strategy for the current scope of specs. + * + * _Note:_ This is only callable from within a {@link beforeEach}, {@link it}, or {@link beforeAll}. + * @param defaultStrategyFn - a function that assigns a strategy + * @example + * beforeEach(function() { + * jasmine.setDefaultSpyStrategy(and => and.returnValue(true)); + * }); + */ function setDefaultSpyStrategy(fn?: (and: SpyAnd) => void): void; + + /** + * Replaces Jasmine's global error handling with a spy. This prevents Jasmine + * from treating uncaught exceptions and unhandled promise rejections + * as spec failures and allows them to be inspected using the spy's + * {@link Spy#calls|calls property} and related matchers such as + * {@link matchers#toHaveBeenCalledWith|toHaveBeenCalledWith}. + * + * After installing the spy, spyOnGlobalErrorsAsync immediately calls its + * argument, which must be an async or promise-returning function. The spy + * will be passed as the first argument to that callback. Normal error + * handling will be restored when the promise returned from the callback is + * settled. + * + * When the JavaScript runtime reports an uncaught error or unhandled rejection, + * the spy will be called with a single parameter representing Jasmine's best + * effort at describing the error. This parameter may be of any type, because + * JavaScript allows anything to be thrown or used as the reason for a + * rejected promise, but Error instances and strings are most common. + * + * Note: The JavaScript runtime may deliver uncaught error events and unhandled + * rejection events asynchronously, especially in browsers. If the event + * occurs after the promise returned from the callback is settled, it won't + * be routed to the spy even if the underlying error occurred previously. + * It's up to you to ensure that all of the error/rejection events that you + * want to handle have occurred before you resolve the promise returned from + * the callback. + * + * You must ensure that the `it`/`beforeEach`/etc fn that called + * `spyOnGlobalErrorsAsync` does not signal completion until after the + * promise returned by `spyOnGlobalErrorsAsync` is resolved. Normally this is + * done by `await`ing the returned promise. Leaving the global error spy + * installed after the `it`/`beforeEach`/etc fn that installed it signals + * completion is likely to cause problems and is not supported. + * @param fn - A function to run, during which the global error spy will be effective + * @example + * it('demonstrates global error spies', async function() { + * await jasmine.spyOnGlobalErrorsAsync(async function(globalErrorSpy) { + * setTimeout(function() { + * throw new Error('the expected error'); + * }); + * await new Promise(function(resolve) { + * setTimeout(resolve); + * }); + * const expected = new Error('the expected error'); + * expect(globalErrorSpy).toHaveBeenCalledWith(expected); + * }); + * }); + */ function spyOnGlobalErrorsAsync(fn?: (globalErrorSpy: Spy<(error: Error) => void>) => Promise): Promise; + /** + * Add a custom spy strategy for the current scope of specs. + * + * _Note:_ This is only callable from within a {@link beforeEach}, {@link it}, or {@link beforeAll}. + * @since 3.5.0 + * @param name - The name of the strategy (i.e. what you call from `and`) + * @param factory - Factory function that returns the plan to be executed. + */ function addSpyStrategy(name: string, factory: Fn): void; + /** + * Create a bare {@link Spy} object. This won't be installed anywhere and will not have any implementation behind it. + * @since 1.3.0 + * @param name - Name to give the spy. This will be displayed in failure messages. + * @param originalFn - The "real" function. This will + * be used for subsequent calls to the spy after you call + * `mySpy.and.callThrough()`. In most cases you should omit this parameter. + * The usual way to supply an original function is to call {@link spyOn} + * instead of createSpy. + */ function createSpy(name?: string, originalFn?: Fn): Spy; + /** + * Create an object with multiple {@link Spy}s as its members. + * @since 1.3.0 + * @param baseName - Base name for the spies in the object. + * @param methodNames - Array of method names to create spies for, or Object whose keys will be method names and values the {@link Spy#and#returnValue|returnValue}. + * @param propertyNames - Array of property names to create spies for, or Object whose keys will be propertynames and values the {@link Spy#and#returnValue|returnValue}. + */ function createSpyObj(baseName: string, methodNames: SpyObjMethodNames, propertyNames?: SpyObjPropertyNames): any; + /** + * Create an object with multiple {@link Spy}s as its members. + * @since 1.3.0 + * @param baseName - Base name for the spies in the object. + * @param methodNames - Array of method names to create spies for, or Object whose keys will be method names and values the {@link Spy#and#returnValue|returnValue}. + * @param propertyNames - Array of property names to create spies for, or Object whose keys will be propertynames and values the {@link Spy#and#returnValue|returnValue}. + */ function createSpyObj( baseName: string, methodNames: SpyObjMethodNames, propertyNames?: SpyObjPropertyNames, ): SpyObj; + /** + * Create an object with multiple {@link Spy}s as its members. + * @since 1.3.0 + * @param baseName - Base name for the spies in the object. + * @param methodNames - Array of method names to create spies for, or Object whose keys will be method names and values the {@link Spy#and#returnValue|returnValue}. + * @param propertyNames - Array of property names to create spies for, or Object whose keys will be propertynames and values the {@link Spy#and#returnValue|returnValue}. + */ function createSpyObj(methodNames: SpyObjMethodNames, propertyNames?: SpyObjPropertyNames): any; + /** + * Create an object with multiple {@link Spy}s as its members. + * @since 1.3.0 + * @param baseName - Base name for the spies in the object. + * @param methodNames - Array of method names to create spies for, or Object whose keys will be method names and values the {@link Spy#and#returnValue|returnValue}. + * @param propertyNames - Array of property names to create spies for, or Object whose keys will be propertynames and values the {@link Spy#and#returnValue|returnValue}. + */ function createSpyObj(methodNames: SpyObjMethodNames, propertyNames?: SpyObjPropertyNames): SpyObj; + /** + * Get the currently booted Jasmine Environment. + * + * @since 1.3.0 + */ function getEnv(): Env; + /** + * Logs a message for use in debugging. If the spec fails, trace messages + * will be included in the {@link SpecDoneEvent|result} passed to the + * reporter's specDone method. + * + * This method should be called only when a spec (including any associated + * beforeEach or afterEach functions) is running. + * @since 4.0.0 + * @param msg - The message to log + */ function debugLog(msg: string): void; + /** + * Add a custom equality tester for the current scope of specs. + * + * _Note:_ This is only callable from within a {@link beforeEach}, {@link it}, or {@link beforeAll}. + * @since 2.0.0 + * @param tester - A function which takes two arguments to compare and returns a `true` or `false` comparison result if it knows how to compare them, and `undefined` otherwise. + */ function addCustomEqualityTester(equalityTester: CustomEqualityTester): void; /** @@ -440,16 +607,38 @@ declare namespace jasmine { */ function addCustomObjectFormatter(formatter: CustomObjectFormatter): void; + /** + * Add custom matchers for the current scope of specs. + * + * _Note:_ This is only callable from within a {@link beforeEach}, {@link it}, or {@link beforeAll}. + * @since 2.0.0 + * @param matchers - Keys from this object will be the new matcher names. + */ function addMatchers(matchers: CustomMatcherFactories): void; + /** + * Add custom async matchers for the current scope of specs. + * + * _Note:_ This is only callable from within a {@link beforeEach}, {@link it}, or {@link beforeAll}. + * @since 3.5.0 + * @param matchers - Keys from this object will be the new async matcher names. + */ function addAsyncMatchers(matchers: CustomAsyncMatcherFactories): void; - function stringMatching(str: string | RegExp): AsymmetricMatcher; + /** + * Get an {@link AsymmetricEqualityTester} that will succeed if the actual + * value is a `String` that matches the `RegExp` or `String`. + * @since 2.2.0 + * @param expected + */ + function stringMatching(expected: string | RegExp): AsymmetricMatcher; - function stringContaining(str: string): AsymmetricMatcher; /** - * @deprecated Private method that may be changed or removed in the future + * Get an {@link AsymmetricEqualityTester} that will succeed if the actual + * value is a `String` that contains the specified `String`. + * @since 3.10.0 + * @param expected */ - function formatErrorMsg(domain: string, usage: string): (msg: string) => string; + function stringContaining(expected: string): AsymmetricMatcher; interface Any extends AsymmetricMatcher { new(expectedClass: any): any; @@ -558,6 +747,14 @@ declare namespace jasmine { interface Env { addReporter(reporter: CustomReporter): void; + /** + * Configures whether Jasmine should allow the same function to be spied on + * more than once during the execution of a spec. By default, spying on + * a function that is already a spy will cause an error. + * @name Env#allowRespy + * @since 2.5.0 + * @param allow Whether to allow respying + */ allowRespy(allow: boolean): void; clearReporters(): void; configuration(): Configuration; @@ -576,6 +773,12 @@ declare namespace jasmine { * @since 3.6.0 */ setSuiteProperty: typeof setSuiteProperty; + /** + * Provides the root suite, through which all suites and specs can be + * accessed. + * @return the root suite + * @since 2.0.0 + */ topSuite(): Suite; } @@ -682,25 +885,57 @@ declare namespace jasmine { // tslint:disable-next-line unified-signatures toMatch(expected: string | RegExp, expectationFailOutput: any): void; + /** + * {@link expect} the actual value to be defined. (Not `undefined`) + * @name matchers#toBeDefined + * @since 1.3.0 + * @example + * expect(result).toBeDefined(); + */ toBeDefined(): void; /** * @deprecated expectationFailOutput is deprecated. Use withContext instead. */ // tslint:disable-next-line unified-signatures toBeDefined(expectationFailOutput: any): void; + /** + * {@link expect} the actual value to be `undefined`. + * @since 1.3.0 + * @example + * expect(result).toBeUndefined(): + */ toBeUndefined(): void; /** * @deprecated expectationFailOutput is deprecated. Use withContext instead. */ // tslint:disable-next-line unified-signatures toBeUndefined(expectationFailOutput: any): void; + /** + * {@link expect} the actual value to be `null`. + * @since 1.3.0 + * @example + * expect(result).toBeNull(); + */ toBeNull(): void; /** * @deprecated expectationFailOutput is deprecated. Use withContext instead. */ // tslint:disable-next-line unified-signatures toBeNull(expectationFailOutput: any): void; + /** + * {@link expect} the actual value to be `NaN` (Not a Number). + * @since 1.3.0 + * @example + * expect(thing).toBeNaN(); + */ toBeNaN(): void; + + /** + * {@link expect} the actual value to be truthy. + * @since 2.0.0 + * @example + * expect(thing).toBeTruthy(); + */ toBeTruthy(): void; /** * @deprecated expectationFailOutput is deprecated. Use withContext instead. @@ -715,10 +950,45 @@ declare namespace jasmine { toBeFalsy(expectationFailOutput: any): void; toBeTrue(): void; toBeFalse(): void; + /** + * {@link expect} the actual (a {@link Spy}) to have been called. + * @since 1.3.0 + * @example + * expect(mySpy).toHaveBeenCalled(); + * expect(mySpy).not.toHaveBeenCalled(); + */ toHaveBeenCalled(): void; + /** + * {@link expect} the actual value (a {@link Spy}) to have been called before another {@link Spy}. + * @since 2.6.0 + * @param expected - {@link Spy} that should have been called after the `actual` {@link Spy}. + * @example + * expect(mySpy).toHaveBeenCalledBefore(otherSpy); + */ toHaveBeenCalledBefore(expected: Func): void; + /** + * {@link expect} the actual (a {@link Spy}) to have been called with particular arguments at least once. + * @since 1.3.0 + * @param params - The arguments to look for + * @example + * expect(mySpy).toHaveBeenCalledWith('foo', 'bar', 2); + */ toHaveBeenCalledWith(...params: any[]): void; + /** + * {@link expect} the actual (a {@link Spy}) to have been called exactly once, and exactly with the particular arguments. + * @since 3.6.0 + * @param params - The arguments to look for + * @example + * expect(mySpy).toHaveBeenCalledOnceWith('foo', 'bar', 2); + */ toHaveBeenCalledOnceWith(...params: any[]): void; + /** + * {@link expect} the actual (a {@link Spy}) to have been called the specified number of times. + * @since 2.4.0 + * @param expected - The number of invocations to look for. + * @example + * expect(mySpy).toHaveBeenCalledTimes(3); + */ toHaveBeenCalledTimes(expected: number): void; toContain(expected: any): void; /**