Skip to content

v5.14.0#295

Merged
szegedi merged 16 commits intov5.xfrom
v5.14.0-proposal
Mar 18, 2026
Merged

v5.14.0#295
szegedi merged 16 commits intov5.xfrom
v5.14.0-proposal

Conversation

IlyasShabi and others added 6 commits March 10, 2026 14:57
Improve heap profile memory usage by lazily loading js objects
* Read V8 map data directly, for signal safety

* Allow passing in an ACF key object externally to the profiler.

* time-profiler.ts uses it to pass an AsyncLocalStorage (ALS) as the key.
#281)

use MapAllocationProfile by default to get heap profiler
* build(deps-dev): bump gts from 4.0.1 to 7.0.0

Bumps [gts](https://github.com/google/gts) from 4.0.1 to 7.0.0.
- [Release notes](https://github.com/google/gts/releases)
- [Changelog](https://github.com/google/gts/blob/main/CHANGELOG.md)
- [Commits](google/gts@v4.0.1...v7.0.0)

---
updated-dependencies:
- dependency-name: gts
  dependency-version: 7.0.0
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

* fix(lint): migrate ESLint config to flat format for gts 7.x / ESLint v9

- Add eslint.config.js using gts flat config export
- Delete legacy .eslintrc.json and .eslintignore
- Fix .prettierrc.js formatting (prettier v3 style)
- Fix @typescript-eslint/no-explicit-any errors (now error in ts-eslint v8 recommended)
- Fix @typescript-eslint/no-unused-vars and @typescript-eslint/no-floating-promises
- Update eslint-disable comment to use n/ prefix instead of node/
- Exclude benchmark/, scripts/, system-test/ from root config (have own configs)
- Auto-fix prettier trailing comma issues across source files (prettier v3)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Attila Szegedi <attila.szegedi@datadoghq.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
@github-actions
Copy link

github-actions bot commented Mar 10, 2026

Overall package size

Self size: 2.02 MB
Deduped: 2.38 MB
No deduping: 2.38 MB

Dependency sizes | name | version | self size | total size | |------|---------|-----------|------------| | source-map | 0.7.6 | 185.63 kB | 185.63 kB | | pprof-format | 2.2.1 | 163.06 kB | 163.06 kB | | node-gyp-build | 3.9.0 | 8.81 kB | 8.81 kB |

🤖 This report was automatically generated by heaviest-objects-in-the-universe

@pr-commenter
Copy link

pr-commenter bot commented Mar 10, 2026

Benchmarks

Benchmark execution time: 2026-03-18 10:36:56

Comparing candidate commit b37c006 in PR branch v5.14.0-proposal with baseline commit f02ecf4 in branch v5.x.

Found 0 performance improvements and 0 performance regressions! Performance is the same for 92 metrics, 28 unstable metrics.

@szegedi szegedi marked this pull request as ready for review March 10, 2026 18:05
Qard and others added 10 commits March 13, 2026 13:35
When lineNumbers is enabled, the column is always zero. If only one
occurence of a call occurs on one line then that is correctly selected.
However, in cases where the same function is called multiple times in
the same line it will be unable to differentiate them and would use
the unmapped value. This now makes it select the first call in the line
as a best-guess for the match, and in Node.js v25 will use the new
column field in LineTick to select the correct column where possible.
Reduce time profiler memory usage with lazy profile tree
Bumps [sinon](https://github.com/sinonjs/sinon) from 21.0.1 to 21.0.2.
- [Release notes](https://github.com/sinonjs/sinon/releases)
- [Changelog](https://github.com/sinonjs/sinon/blob/main/docs/changelog.md)
- [Commits](sinonjs/sinon@v21.0.1...v21.0.2)

---
updated-dependencies:
- dependency-name: sinon
  dependency-version: 21.0.2
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 25.3.3 to 25.4.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-version: 25.4.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Attila Szegedi <szegedi@users.noreply.github.com>
#292)

* Rewrite SourceMapper to use eager directory scan with sourceMappingURL support

Replace `SourceMapper.create(searchDirs[])` with a two-part API:
- `new SourceMapper()` constructs an empty mapper synchronously
- `await sm.loadDirectory(dir)` populates it asynchronously
- SourceMapper.create() is kept as backwards-compatible delegate

This separates construction from loading, allowing callers to fire off
the async scan without blocking profiler initialization. In production the
scan is fire-and-forget (completes well before the first profile is taken);
in tests it is awaited directly.

The directory scan now uses a two-phase approach per JS file:

  Phase 1 (higher priority): reads each .js/.cjs/.mjs file and checks for
  a `sourceMappingURL` annotation (per TC39 ECMA-426). Inline
  `data:application/json;base64,` URLs are decoded in-memory; external
  file URLs are loaded from disk if the file exists. The implementation first
  attempts to read only a 4k tail of the file, and if it is not sufficient
  falls back to reading the entire file.

  Phase 2 (fallback): processes .map files found in the directory using
  the original logic (file property → naming convention). Skips any JS
  file that Phase 1 already resolved.

processSourceMap is refactored to parse just the `file` JSON property
before creating the SourceMapConsumer, so we can bail out early (skipping
consumer creation) if the JS file was already loaded in Phase 1.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
use dd-octo-sts for tag creation
Bumps [sinon](https://github.com/sinonjs/sinon) from 21.0.2 to 21.0.3.
- [Release notes](https://github.com/sinonjs/sinon/releases)
- [Changelog](https://github.com/sinonjs/sinon/blob/main/docs/changelog.md)
- [Commits](sinonjs/sinon@v21.0.2...v21.0.3)

---
updated-dependencies:
- dependency-name: sinon
  dependency-version: 21.0.3
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
 feat: track declared-but-missing source maps and report them in profile comments                                                                                                                                                                            
   
  When a JS file has a sourceMappingURL annotation but no map file is found                                                                                                                                                                                   
  after both phases of directory scanning, SourceMapper tracks it as                                                                                                                                                                                        
  declared-missing. mappingInfo() for such files returns a SourceLocation
  with missingMapFile: true, and serialize() emits a single
  dd:has-missing-map-files token into profile.comment when at least one
  such file is encountered.

  Inline data: URL annotations in all valid forms (including
  data:application/json;charset=utf-8;base64,...) are correctly handled
  and never produce false missing-map signals.

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 25.4.0 to 25.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-version: 25.5.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
@szegedi szegedi merged commit a976273 into v5.x Mar 18, 2026
170 of 181 checks passed
@szegedi szegedi deleted the v5.14.0-proposal branch March 18, 2026 11:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants