From 5879e9b257d4bae7da7b31d527250425c7abc7ab Mon Sep 17 00:00:00 2001 From: Antoine du Hamel Date: Wed, 3 Dec 2025 15:55:28 +0100 Subject: [PATCH 1/2] tools: ignore more paths in GHA CI MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PR-URL: https://github.com/nodejs/node/pull/60920 Reviewed-By: Colin Ihrig Reviewed-By: Chengzhong Wu Reviewed-By: Luigi Pinca Reviewed-By: Ulises Gascón Reviewed-By: Marco Ippolito --- .github/workflows/build-tarball.yml | 44 +++++++++++++++++++++++++---- .github/workflows/test-macos.yml | 44 +++++++++++++++++++++++++---- .github/workflows/test-shared.yml | 40 ++++++++++++++++++++++---- 3 files changed, 110 insertions(+), 18 deletions(-) diff --git a/.github/workflows/build-tarball.yml b/.github/workflows/build-tarball.yml index 97cea1132c6f0e..18d3050a2a474e 100644 --- a/.github/workflows/build-tarball.yml +++ b/.github/workflows/build-tarball.yml @@ -4,13 +4,29 @@ on: pull_request: types: [opened, synchronize, reopened, ready_for_review] paths-ignore: - - .mailmap - '**.md' - '**.nix' - - AUTHORS + - eslint.config.mjs + - '**/eslint.config_partial.mjs' + - android-configure + - android-configure.py + - android-patches/** + - benchmarks/** + - codecov.yml - doc/** + - pyproject.yml + - tsconfig.json - test/internet/** - - .github/** + - tools/actions/** + - tools/bootstrap/** + - tools/dep_updaters/** + - tools/doc/** + - tools/eslint-rules/** + - tools/eslint/** + - tools/lint-md/** + - typings/** + - vcbuild.bat + - .** - '!.github/workflows/build-tarball.yml' push: branches: @@ -18,13 +34,29 @@ on: - v[0-9]+.x-staging - v[0-9]+.x paths-ignore: - - .mailmap - '**.md' - '**.nix' - - AUTHORS + - eslint.config.mjs + - '**/eslint.config_partial.mjs' + - android-configure + - android-configure.py + - android-patches/** + - benchmarks/** + - codecov.yml - doc/** + - pyproject.yml + - tsconfig.json - test/internet/** - - .github/** + - tools/actions/** + - tools/bootstrap/** + - tools/dep_updaters/** + - tools/doc/** + - tools/eslint-rules/** + - tools/eslint/** + - tools/lint-md/** + - typings/** + - vcbuild.bat + - .** - '!.github/workflows/build-tarball.yml' concurrency: diff --git a/.github/workflows/test-macos.yml b/.github/workflows/test-macos.yml index 4551f5184f6c6a..df7f073d38774d 100644 --- a/.github/workflows/test-macos.yml +++ b/.github/workflows/test-macos.yml @@ -4,13 +4,29 @@ on: pull_request: types: [opened, synchronize, reopened, ready_for_review] paths-ignore: - - .mailmap - '**.md' - '**.nix' - - AUTHORS + - eslint.config.mjs + - '**/eslint.config_partial.mjs' + - android-configure + - android-configure.py + - android-patches/** + - benchmarks/** + - codecov.yml - doc/** + - pyproject.yml + - tsconfig.json - test/internet/** - - .github/** + - tools/actions/** + - tools/bootstrap/** + - tools/dep_updaters/** + - tools/doc/** + - tools/eslint-rules/** + - tools/eslint/** + - tools/lint-md/** + - typings/** + - vcbuild.bat + - .** - '!.github/workflows/test-macos.yml' push: branches: @@ -19,13 +35,29 @@ on: - v[0-9]+.x-staging - v[0-9]+.x paths-ignore: - - .mailmap - '**.md' - '**.nix' - - AUTHORS + - eslint.config.mjs + - '**/eslint.config_partial.mjs' + - android-configure + - android-configure.py + - android-patches/** + - benchmarks/** + - codecov.yml - doc/** + - pyproject.yml + - tsconfig.json - test/internet/** - - .github/** + - tools/actions/** + - tools/bootstrap/** + - tools/dep_updaters/** + - tools/doc/** + - tools/eslint-rules/** + - tools/eslint/** + - tools/lint-md/** + - typings/** + - vcbuild.bat + - .** - '!.github/workflows/test-macos.yml' concurrency: diff --git a/.github/workflows/test-shared.yml b/.github/workflows/test-shared.yml index 78e71bbd35cfbe..07b87270106373 100644 --- a/.github/workflows/test-shared.yml +++ b/.github/workflows/test-shared.yml @@ -5,9 +5,14 @@ name: Test Shared libraries on: pull_request: paths-ignore: - - .mailmap - '**.md' - - AUTHORS + - eslint.config.mjs + - '**/eslint.config_partial.mjs' + - android-configure + - android-configure.py + - android-patches/** + - benchmarks/** + - codecov.yml - deps/ada/** - deps/brotli/** - deps/cares/** @@ -26,8 +31,17 @@ on: - deps/zlib/** - deps/zstd/** - doc/** + - pyproject.yml + - tsconfig.json - test/internet/** - - .github/** + - tools/** + - '!tools/gyp/**' + - '!tools/nix/**' + - '!tools/v8/**' + - '!tools/v8_gypfiles/**' + - typings/** + - vcbuild.bat + - .** - '!.github/workflows/test-shared.yml' types: [opened, synchronize, reopened, ready_for_review] push: @@ -37,9 +51,14 @@ on: - v[0-9]+.x-staging - v[0-9]+.x paths-ignore: - - .mailmap - '**.md' - - AUTHORS + - eslint.config.mjs + - '**/eslint.config_partial.mjs' + - android-configure + - android-configure.py + - android-patches/** + - benchmarks/** + - codecov.yml - deps/ada/** - deps/brotli/** - deps/cares/** @@ -58,8 +77,17 @@ on: - deps/zlib/** - deps/zstd/** - doc/** + - pyproject.yml + - tsconfig.json - test/internet/** - - .github/** + - tools/** + - '!tools/gyp/**' + - '!tools/nix/**' + - '!tools/v8/**' + - '!tools/v8_gypfiles/**' + - typings/** + - vcbuild.bat + - .** - '!.github/workflows/test-shared.yml' concurrency: From 746c3c2ec2eee4f33adde73c34364ed873cacffd Mon Sep 17 00:00:00 2001 From: Chengzhong Wu Date: Wed, 3 Dec 2025 17:53:07 +0000 Subject: [PATCH 2/2] util: assert getCallSites does not invoke Error.prepareStackTrace PR-URL: https://github.com/nodejs/node/pull/60922 Reviewed-By: Colin Ihrig Reviewed-By: Ilyas Shabi --- doc/api/util.md | 3 +++ .../test-util-getcallsites-preparestacktrace.js | 14 ++++++++++++++ 2 files changed, 17 insertions(+) create mode 100644 test/parallel/test-util-getcallsites-preparestacktrace.js diff --git a/doc/api/util.md b/doc/api/util.md index 37bdcd02bc55bb..9a02eb43c45b76 100644 --- a/doc/api/util.md +++ b/doc/api/util.md @@ -564,6 +564,9 @@ changes: Returns an array of call site objects containing the stack of the caller function. +Unlike accessing an `error.stack`, the result returned from this API is not +interfered with `Error.prepareStackTrace`. + ```mjs import { getCallSites } from 'node:util'; diff --git a/test/parallel/test-util-getcallsites-preparestacktrace.js b/test/parallel/test-util-getcallsites-preparestacktrace.js new file mode 100644 index 00000000000000..ce4ac23e096a08 --- /dev/null +++ b/test/parallel/test-util-getcallsites-preparestacktrace.js @@ -0,0 +1,14 @@ +'use strict'; + +const common = require('../common'); +const assert = require('node:assert'); +const { getCallSites } = require('node:util'); + +// Asserts that util.getCallSites() does not invoke +// Error.prepareStackTrace. + +Error.prepareStackTrace = common.mustNotCall(); + +const sites = getCallSites(1); +assert.strictEqual(sites.length, 1); +assert.strictEqual(sites[0].scriptName, __filename);