Skip to content

Commit f84884d

Browse files
committed
πŸ”€ Merge main: js-core subpackages, profiler transport refactor
Resolves conflicts from js-core/assembly, js-core/util, js-core/monitor entry points and profiler transport extraction. Converts new spec files from Jasmine to Vitest API. Adds missing vitest aliases for new js-core subpath imports.
1 parent 406be41 commit f84884d

159 files changed

Lines changed: 2334 additions & 914 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

β€Ž.gitignoreβ€Ž

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
bundle
44
cjs
55
esm
6+
temp
67
node_modules
78
coverage
89
tunnel.log

β€Ž.gitlab-ci.ymlβ€Ž

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -296,6 +296,16 @@ check-schemas:
296296
- yarn
297297
- node scripts/check-schemas.ts
298298

299+
check-js-core-api:
300+
extends:
301+
- .base-configuration
302+
- .test-allowed-branches
303+
interruptible: true
304+
script:
305+
- yarn
306+
- yarn workspace @datadog/js-core build
307+
- yarn api:check
308+
299309
unit-bs:
300310
stage: browserstack
301311
needs: ['unit']

β€Ž.prettierignoreβ€Ž

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,8 @@ yarn.lock
1313
/developer-extension/.output
1414
/developer-extension/.wxt
1515

16+
# Auto-generated by API Extractor β€” do not format
17+
/packages/js-core/api
18+
1619
# Symlinks (prettier would otherwise resolve and overwrite the target file or replace the symlink with a regular file)
1720
/packages/browser-rum-slim/BROWSER_SUPPORT.md

β€ŽCHANGELOG.mdβ€Ž

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,11 @@ This is the v7 major release. It removes deprecated options and legacy code path
209209
- **Higher-quality data** β€” deterministic sampling (consistent decisions across products), aborted requests no longer polluting error metrics, and a new `session_renewal` view loading type to better understand session boundaries.
210210
- **A cleaner API** β€” deprecated options and beta flags removed; what's left is the supported, stable surface going forward.
211211

212+
> [!WARNING]
213+
> Upgrading to v7 introduces deterministic sampling for distributed traces based on the RUM session ID. As a result, under RUM without Limits, the likelihood to index sessions that had sampled associated traces is significantly increased β€” meaning more traces will now be retained by your existing Cross-Product Retention Filters RUMxAPM, even without any configuration change.
214+
>
215+
> If you have cross-product Retention Filters (e.g. RUM-linked APM traces), you may see an **increase in the volume of indexed spans**, which could lead to **higher costs**. We recommend reviewing your Retention Filter configuration and estimated span volume after upgrading.
216+
212217
**Migrating from v6:**
213218

214219
- Follow the [v6 β†’ v7 migration guide](https://github.com/DataDog/documentation/blob/8ed5928d4cf04351f6ec6f6e8d605267def58351/content/en/real_user_monitoring/guide/browser-sdk-upgrade.md) in the Datadog documentation.

β€ŽLICENSE-3rdparty.csvβ€Ž

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,14 @@ dev,@typescript-eslint/utils,MIT,Copyright (c) 2019 typescript-eslint and other
3838
dev,@wxt-dev/module-react,MIT,Copyright (c) 2023 Aaron
3939
dev,@vitejs/plugin-react,MIT,Copyright (c) 2019-present Evan You & Vite Contributors
4040
dev,@vitejs/plugin-vue,MIT,Copyright (c) 2019-present, Yuxi (Evan) You and Vite contributors
41+
dev,@microsoft/api-extractor,MIT,Copyright (c) Microsoft Corporation. All rights reserved.
4142
dev,@vitest/browser,MIT,Copyright (c) 2021-Present VoidZero Inc. and Vitest contributors
4243
dev,@vitest/browser-playwright,MIT,Copyright (c) 2021-Present VoidZero Inc. and Vitest contributors
4344
dev,@vitest/browser-webdriverio,MIT,Copyright (c) 2021-Present VoidZero Inc. and Vitest contributors
4445
dev,webdriverio,MIT,Copyright (c) OpenJS Foundation and other contributors
4546
dev,@vitest/coverage-istanbul,MIT,Copyright (c) 2021-Present VoidZero Inc. and Vitest contributors
4647
dev,@module-federation/enhanced,MIT, Copyright (c) 2020 ScriptedAlchemy LLC (Zack Jackson) Zhou Shaw (zhouxiao)
48+
dev,@vue/compiler-dom,MIT,Copyright (c) 2018-present, Yuxi (Evan) You
4749
dev,@vue/test-utils,MIT,Copyright (c) 2021-present vuejs
4850
dev,acorn,MIT,Copyright (C) 2012-2022 by various contributors (see AUTHORS)
4951
dev,ajv,MIT,Copyright 2015-2017 Evgeny Poberezkin

β€Ždeveloper-extension/package.jsonβ€Ž

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@
1111
"@types/react": "19.2.17",
1212
"@types/react-dom": "19.2.3",
1313
"@wxt-dev/module-react": "1.2.2",
14-
"typescript": "6.0.3"
14+
"typescript": "6.0.3",
15+
"vite": "8.0.16"
1516
},
1617
"dependencies": {
1718
"@datadog/browser-core": "workspace:*",

β€Žeslint-local-rules/disallowSideEffects.tsβ€Ž

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,10 @@ const pathsWithSideEffect = new Set([
4545

4646
// Those packages are known to have no side effects when evaluated
4747
const packagesWithoutSideEffect = new Set([
48+
'@datadog/js-core/assembly',
4849
'@datadog/js-core/time',
50+
'@datadog/js-core/util',
51+
'@datadog/js-core/monitor',
4952
'@datadog/browser-core',
5053
'@datadog/browser-rum-core',
5154
'@datadog/browser-rum-react/internal',

β€Žpackage.jsonβ€Ž

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
],
1212
"type": "module",
1313
"scripts": {
14+
"api:check": "node scripts/check-js-core-api.ts",
1415
"build": "yarn workspaces foreach --all --parallel --topological-dev run build",
1516
"build:bundle": "yarn workspaces foreach --all --parallel run build:bundle",
1617
"build:apps": "node scripts/build/build-test-apps.ts",
@@ -45,6 +46,7 @@
4546
"@datadog/rum-events-format": "DataDog/rum-events-format#commit=02c94b31a2676458a156ed627f3edcd87254beb7",
4647
"@eslint/js": "10.0.1",
4748
"@jsdevtools/coverage-istanbul-loader": "3.0.5",
49+
"@microsoft/api-extractor": "7.58.9",
4850
"@playwright/test": "1.60.0",
4951
"@swc/core": "1.15.40",
5052
"@types/busboy": "1.5.4",
@@ -107,12 +109,12 @@
107109
"webpack-dev-middleware": "8.0.3",
108110
"ws": "8.21.0"
109111
},
112+
"resolutions": {
113+
"@wxt-dev/module-react/@vitejs/plugin-react": "5.2.0"
114+
},
110115
"volta": {
111116
"node": "26.3.0",
112117
"yarn": "4.16.0"
113118
},
114-
"packageManager": "yarn@4.16.0",
115-
"resolutions": {
116-
"@wxt-dev/module-react/@vitejs/plugin-react": "5.2.0"
117-
}
119+
"packageManager": "yarn@4.16.0"
118120
}
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# `@datadog/browser-core` package
2+
3+
`@datadog/browser-core` is primarily consumed by other `@datadog/browser-*` packages within this
4+
monorepo. It is published to npm but **not supported for external use** and carries **no semver
5+
stability guarantee**.
6+
7+
## Breaking changes are allowed
8+
9+
External consumers exist but are unsupported β€” we do not guarantee compatibility for them. You may
10+
freely:
11+
12+
- Remove or rename exported symbols
13+
- Change function signatures (parameters, return types, arity)
14+
- Reorganize modules and re-exports
15+
16+
When migrating code from `@datadog/browser-core` to `@datadog/js-core`, do **not** keep a
17+
backward-compatible re-export in `browser-core` just to avoid a "breaking change" β€” there is no
18+
breaking change here. Move the code and update all internal call sites directly.
19+
20+
Review comments that warn about "breaking changes" in this package (e.g. removed exports,
21+
signature changes) are **not applicable** and should be disregarded.

β€Žpackages/browser-core/package.jsonβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
"directory": "packages/browser-core"
2424
},
2525
"dependencies": {
26-
"@datadog/js-core": "0.0.2"
26+
"@datadog/js-core": "0.0.3"
2727
},
2828
"devDependencies": {
2929
"@types/pako": "2.0.4",

0 commit comments

Comments
Β (0)