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: 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);