Major Changes
-
#1497
2606a2aThanks @Juice10! - Distributed files have new filenames, paths and extensions. Important: If you reference distributed files or types directly, you might have to update your paths/filenames. E.g. you import fromrrweb/typings/...orrrdom/es. However you runimport rrweb from 'rrweb'you won't notice a difference with this change. If you include rrweb files directly in a script tag, you might have to update that path to include a the.umd.cjsfiles instead. All.jsfiles now use ES modules which can be used in modern browsers, node.js and bundlers that support ES modules. All npm packages now also ship.cjsand.umd.cjsfiles. The.umd.cjsfiles are CommonJS modules that bundle all files together to make it easy to ship one file to browser environments (similar to the previous.jsfiles). The.cjsfiles are CommonJS modules that can be used in older Node.js environments. Types should be better defined inpackage.jsonand if you need specific types they might be exported from new packages (for examplePlayerMachineStateandSpeedMachineStateare now exported from@rrweb/replay). Check thepackage.json'smainandexportsfield for the available files. -
#1127
3cc4323Thanks @YunFeng0817! - Refactor: Improve performance by 80% in a super large benchmark case.- Refactor: change the data structure of childNodes from array to linked list
- Improve the performance of the "contains" function. New algorithm will reduce the complexity from O(n) to O(logn)
Patch Changes
-
#1126
227d43aThanks @YunFeng0817! - Refactor all suffix of bundled scripts with commonjs module from 'js' to cjs #1087. -
#1593
5a78938Thanks @daibhin! -NodeTypeenum was moved from rrweb-snapshot to @rrweb/types
The following types where moved from rrweb-snapshot to @rrweb/types:documentNode,documentTypeNode,legacyAttributes,textNode,cdataNode,commentNode,elementNode,serializedNode,serializedNodeWithId,serializedElementNodeWithId,serializedTextNodeWithId,IMirror,INode,mediaAttributes,attributesandDataURLOptions -
#1704
33e01f5Thanks @eoghanmurray! - Provide a /umd/ output folder alongside the /dist/ one so that we can serve UMD (Universal Module Definition) files with a .js extension, without upsetting expectations set by package.json that all .js files in /dist/ are modules -
Updated dependencies [
ad9bc3e,2a80949]:- rrdom@0.1.7
-
Updated dependencies [
3809060,55ebce7]:- rrdom@0.1.6
-
Updated dependencies [
ce6019d,fd85c79]:- rrdom@0.1.5
-
Updated dependencies [
f1b23dd]:- rrdom@0.1.4
-
#909
d5d877eThanks @Juice10! - Inline stylesheets when they load so late stylesheet content is captured. -
Updated dependencies [
74f553a,de755ae,a31e272,01612b7]:- rrdom@0.1.3
- rrweb-snapshot@2.0.0-alpha.0
-
Updated dependencies [
0f0a532,8e55c45,d872d28,b798f2d,123a81e,efdc167,979d2b1,227d43a,2606a2a,f27e545,227d43a,3cc4323,335639a,123a81e,5a78938,e607e83,33e01f5,c278d06]:- @rrweb/types@2.0.0
- rrdom@2.0.0