[RUMF-848] Expose internal types and constants to be used in Datadog app#727
[RUMF-848] Expose internal types and constants to be used in Datadog app#727BenoitZugmeyer merged 12 commits intomasterfrom
Conversation
1cecbc3 to
d6b10f9
Compare
d6b10f9 to
a162dd3
Compare
Codecov Report
@@ Coverage Diff @@
## master #727 +/- ##
=======================================
Coverage 80.77% 80.77%
=======================================
Files 72 72
Lines 3745 3745
Branches 877 877
=======================================
Hits 3025 3025
Misses 720 720
Continue to review full report at Codecov.
|
f55db89 to
051b5e9
Compare
051b5e9 to
86a13a1
Compare
f45be84 to
62dd2d1
Compare
62dd2d1 to
a9ac8f1
Compare
* Add some documentation * Enforce it on all code that should be added to the packages * Reword a few functions * Make sure only files with side effects can import files with side effects * Allow `new WeakMap()` and `Object.keys()` calls
* Replace unnecessary RegExp constructor with a regexp value * Disable the rule on 'mutationBuffer', as I want to remove this in the future. * Remove unused `freezePage` function
8c252f6 to
01f2da1
Compare
| // TODO: remove this global MutationBuffer instance | ||
| // eslint-disable-next-line local-rules/enforce-declarative-modules | ||
| export const mutationBuffer = new MutationBuffer() |
There was a problem hiding this comment.
I want to remove this in a separate PR, because it involves a bit of rearchitecturing of RRWeb codebase
* rename the rule to `disallow-side-effects` * adjust doc comments * remove unneeded eslint-disable comment * improve rule description and report message
0660bdc to
44d2b84
Compare
…app (#727) * [RUMF-848] expose internal types and constants to be used in Datadog app * [RUMF-848] add a ESLint rule to enforce declarative modules * [RUMF-848] allow using 'import type' from any file in restricted files * 🚚 [RUMF-848] move types and constants to respect the new ESLint rule * [RUMF-848] adjust ESLint rule * Add some documentation * Enforce it on all code that should be added to the packages * Reword a few functions * Make sure only files with side effects can import files with side effects * Allow `new WeakMap()` and `Object.keys()` calls * 🚚 [RUMF-848] remove tracekit IIFE by spliting it into different modules * [RUMF-848] replace tracekit report.* with proper functions * [RUMF-848] replace tracekit computeStackTrace.* with proper functions * [RUMF-848] move LogsUserConfiguration in logs.ts * [RUMF-848] fix last RRWeb issues * Replace unnecessary RegExp constructor with a regexp value * Disable the rule on 'mutationBuffer', as I want to remove this in the future. * Remove unused `freezePage` function * 👌 [RUMF-848] review adjustments * rename the rule to `disallow-side-effects` * adjust doc comments * remove unneeded eslint-disable comment * improve rule description and report message
This logic was introduced to allow RRWeb users to "pause" the recording by using the public method `freezePage`. This method has been removed in PR #727, and it appears that the `freeze` logic is now unneeded: since the "fullsnapshot" logic is synchronous, no DOM mutation can happen or be processed while the document snapshot is taken.
This logic was introduced to allow RRWeb users to "pause" the recording by using the public method `freezePage`. This method has been removed in PR #727, and it appears that the `freeze` logic is now unneeded: since the "fullsnapshot" logic is synchronous, no DOM mutation can happen or be processed while the document snapshot is taken.
Codecov Report✅ All modified and coverable lines are covered by tests. Please upload reports for the commit 44d2b84 to get more accurate results. Additional details and impacted files@@ Coverage Diff @@
## master #727 +/- ##
==========================================
- Coverage 82.64% 80.77% -1.87%
==========================================
Files 72 72
Lines 3745 3745
Branches 877 877
==========================================
- Hits 3095 3025 -70
- Misses 650 720 +70 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Motivation
Expose internal types to be used in Datadog app
Changes
Testing
I have gone over the contributing documentation.