Skip to content

Commit

Permalink
NodeType was moved to @rrweb/types
Browse files Browse the repository at this point in the history
  • Loading branch information
Juice10 committed Nov 27, 2023
1 parent 05b6986 commit db8b6b9
Show file tree
Hide file tree
Showing 8 changed files with 20 additions and 15 deletions.
3 changes: 2 additions & 1 deletion packages/rrdom-nodejs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@
"cssstyle": "^2.3.0",
"nwsapi": "^2.2.0",
"rrdom": "^2.0.0-alpha.11",
"rrweb-snapshot": "^2.0.0-alpha.11"
"rrweb-snapshot": "^2.0.0-alpha.11",
"@rrweb/types": "^2.0.0-alpha.11"
},
"browserslist": [
"supports es6-class"
Expand Down
7 changes: 5 additions & 2 deletions packages/rrdom/test/diff.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,17 @@ import {
import type { IRRElement, IRRNode } from '../src/document';
import { Replayer } from 'rrweb';
import type {
NodeType as RRNodeType,
serializedNodeWithId,
eventWithTime,
canvasMutationData,
styleDeclarationData,
styleSheetRuleData,
} from '@rrweb/types';
import { EventType, IncrementalSource } from '@rrweb/types';
import {
NodeType as RRNodeType,
EventType,
IncrementalSource,
} from '@rrweb/types';
import { compileTSCode } from './utils';

const elementSn = {
Expand Down
4 changes: 2 additions & 2 deletions packages/rrdom/test/virtual-dom.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,17 @@ import * as fs from 'fs';
import * as path from 'path';
import * as puppeteer from 'puppeteer';
import { JSDOM } from 'jsdom';
import { Mirror } from 'rrweb-snapshot';
import {
cdataNode,
commentNode,
documentNode,
documentTypeNode,
elementNode,
Mirror,
NodeType,
NodeType as RRNodeType,
textNode,
} from 'rrweb-snapshot';
} from '@rrweb/types';
import {
buildFromDom,
buildFromNode,
Expand Down
2 changes: 1 addition & 1 deletion packages/rrweb-snapshot/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
},
"homepage": "https://github.com/rrweb-io/rrweb/tree/master/packages/rrweb-snapshot#readme",
"dependencies": {
"@rrweb/types": "^2.0.0-alpha.8"
"@rrweb/types": "^2.0.0-alpha.11"
},
"devDependencies": {
"@types/chai": "^4.1.4",
Expand Down
12 changes: 7 additions & 5 deletions packages/rrweb-snapshot/test/integration.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,12 @@ import * as http from 'http';
import * as url from 'url';
import * as puppeteer from 'puppeteer';
import * as rollup from 'rollup';
import * as typescript from 'rollup-plugin-typescript2';
import * as assert from 'assert';
import resolve from '@rollup/plugin-node-resolve';
import typescript from 'rollup-plugin-typescript2';
import assert from 'assert';
import { waitForRAF } from './utils';

const _resolve = resolve as unknown as () => rollup.Plugin;
const _typescript = typescript as unknown as () => rollup.Plugin;

const htmlFolder = path.join(__dirname, 'html');
Expand Down Expand Up @@ -74,7 +76,7 @@ describe('integration tests', function (this: ISuite) {

const bundle = await rollup.rollup({
input: path.resolve(__dirname, '../src/index.ts'),
plugins: [_typescript()],
plugins: [_resolve(), _typescript()],
});
const {
output: [{ code: _code }],
Expand Down Expand Up @@ -341,7 +343,7 @@ describe('iframe integration tests', function (this: ISuite) {

const bundle = await rollup.rollup({
input: path.resolve(__dirname, '../src/index.ts'),
plugins: [_typescript()],
plugins: [_resolve(), _typescript()],
});
const {
output: [{ code: _code }],
Expand Down Expand Up @@ -389,7 +391,7 @@ describe('shadow DOM integration tests', function (this: ISuite) {

const bundle = await rollup.rollup({
input: path.resolve(__dirname, '../src/index.ts'),
plugins: [_typescript()],
plugins: [_resolve(), _typescript()],
});
const {
output: [{ code: _code }],
Expand Down
2 changes: 1 addition & 1 deletion packages/rrweb-snapshot/test/rebuild.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import * as fs from 'fs';
import * as path from 'path';
import { addHoverClass, buildNodeWithSN, createCache } from '../src/rebuild';
import { NodeType } from '../src/types';
import { NodeType } from '@rrweb/types';
import { createMirror, Mirror } from '../src/utils';

function getDuration(hrtime: [number, number]) {
Expand Down
2 changes: 1 addition & 1 deletion packages/rrweb-snapshot/test/snapshot.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
serializeNodeWithId,
_isBlockedElement,
} from '../src/snapshot';
import { serializedNodeWithId } from '../src/types';
import { serializedNodeWithId } from '@rrweb/types';
import { Mirror } from '../src/utils';

describe('absolute url to stylesheet', () => {
Expand Down
3 changes: 1 addition & 2 deletions packages/rrweb-snapshot/test/utils.test.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
/**
* @jest-environment jsdom
*/
import { NodeType, serializedNode } from '../src/types';
import { isNodeMetaEqual } from '../src/utils';
import { serializedNodeWithId } from 'rrweb-snapshot';
import { NodeType, serializedNode, serializedNodeWithId } from '@rrweb/types';

describe('utils', () => {
describe('isNodeMetaEqual()', () => {
Expand Down

0 comments on commit db8b6b9

Please sign in to comment.