Messages should be concise but explanatory. We are using a convention inspired by gitmoji, to label our Commit messages and Pull Request titles:
- 💥 Breaking change - Breaking API changes
- ✨ New feature - New public API, behavior, event, property
- 🐛 Bug fix - Fix bugs, regressions, crashes
- ⚡️ Performance - Improve performance, reduce bundle size
- 📝 Documentation - User-facing documentation
- ⚗️ Experimental - New public feature behind a feature flag
- 👷 Build/CI - Dependencies, tooling, deployment, CI config
- ♻️ Refactor - Code restructuring, architectural changes
- 🎨 Code structure - Improve code structure, formatting
- ✅ Tests - Add/fix/improve tests
- 🔧 Configuration - Config files, project setup
- 🔥 Removal - Remove code, features, deprecated items
- 👌 Code review - Address code review feedback
- 🚨 Linting - Add/fix linter rules
- 🧹 Cleanup - Minor cleanup, housekeeping
- 🔊 Logging - Add/modify debug logs, telemetry
- 🔇 Remove logs - Remove debug logs or telemetry
When adding a new dependency, you must update LICENSE-3rdparty.csv:
- Add entry with format:
Component,Origin,License,Copyright - Use
devprefix for all devDependencies (including playground) - Do not include version numbers - list package name only
- Maintain alphabetical order by package name
- Fetch license info from GitHub raw LICENSE file
Example:
dev,chokidar,MIT,Copyright (c) 2012 Paul Miller / Elan Shanker- Check package repository's LICENSE or package.json
- GitHub:
https://raw.githubusercontent.com/{org}/{repo}/master/LICENSE - Extract copyright holder from license file header
Always use latest stable versions for new dependencies. Check with:
npm view <package>@latest versionTypes auto-generated from rum-events-format submodule → src/rumEvent.types.ts (committed).
yarn json-schemas:sync # Update submodule + regenerate types
yarn json-schemas:generate # Regenerate types onlyFork dependency: Uses bcaudan/json-schema-to-typescript#bcaudan/add-readonly-support (v11.0.1) for readonly modifier support. Built lazily when generating types (not during yarn install) to avoid CI rate limiting.
the CI fails with an error like this:
Script exited with error: Error: TypeScript 3.8.2 compatibility compatibility broken
...
node_modules/@datadog/browser-rum-core/cjs/index.d.ts(15,46): error TS1005: ',' expected.
Reproduce locally with yarn test:compat:tsc.
Check the file mentioned in the error (e.g. node_modules/@datadog/browser-rum-core/cjs/index.d.ts). The likely cause is using TypeScript syntax too recent for 3.8.2. For example, combining type and non-type exports on a single line:
// ❌ not supported in TS 3.8.2
export { createProfilingContextManager, type ProfilingContextManager } from './domain/contexts/profilingContext'Split into two separate lines:
// ✅
export type { ProfilingContextManager } from './domain/contexts/profilingContext'
export { createProfilingContextManager } from './domain/contexts/profilingContext'