Skip to content

♻️ move browser-core to devDependencies#78

Merged
bcaudan merged 3 commits into
mainfrom
bcaudna/fix-dep
Apr 1, 2026
Merged

♻️ move browser-core to devDependencies#78
bcaudan merged 3 commits into
mainfrom
bcaudna/fix-dep

Conversation

@bcaudan

@bcaudan bcaudan commented Mar 31, 2026

Copy link
Copy Markdown
Collaborator

Motivation

@datadog/browser-core was listed as a production dependency, but Rollup bundles it entirely into the distribution output. Listing it as a prod dep was inaccurate and would unnecessarily inflate the dependency tree of downstream consumers.

Changes

  • Move @datadog/browser-core from dependencies to devDependencies

Test instructions

  1. yarn build — bundle builds without errors
  2. Confirm no require('@datadog/browser-core') appears in dist/ output
  3. yarn test:unit — all unit tests pass

Checklist

  • Tested locally (playground)
  • Added unit tests for this change.
  • Added e2e/integration tests for this change.
  • Updated related documentation.

@bcaudan bcaudan marked this pull request as ready for review March 31, 2026 09:01
@bcaudan bcaudan requested a review from a team as a code owner March 31, 2026 09:01

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 52a42522d9

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread package.json
@bcaudan bcaudan marked this pull request as draft March 31, 2026 09:07
- use `respectExternal: true` in rollup-plugin-dts so only `electron`
  is treated as external
- browser-core types (`DefaultPrivacyLevel`, `Context`) are now inlined
  in `dist/index.d.ts`
@bcaudan bcaudan marked this pull request as ready for review March 31, 2026 11:32

@cdn34dd cdn34dd left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice catch! One thing though, the distinction between dependencies and devDependencies can be subtle when using a bundler like rollup, and it's pretty easy to get wrong because things wiill work fine either way locally.

Could we add a quick note maybe in the CONTRIBUTING.md file highlighting where a new package should be added as ?

@bcaudan bcaudan merged commit d25fa33 into main Apr 1, 2026
14 checks passed
@bcaudan bcaudan deleted the bcaudna/fix-dep branch April 1, 2026 07:04
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.

2 participants