Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ref(repo): Add @sentry-internal namespace to rrweb package names #17

Merged
merged 1 commit into from
Jan 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions packages/rrdom/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "rrdom",
"name": "@sentry-internal/rrdom",
"version": "0.1.2",
"scripts": {
"dev": "rollup -c -w",
Expand Down Expand Up @@ -33,7 +33,7 @@
"rollup": "^2.56.3",
"rollup-plugin-terser": "^7.0.2",
"rollup-plugin-typescript2": "^0.30.0",
"rrweb-snapshot": "^1.1.14",
"@sentry-internal/rrweb-snapshot": "^1.1.14",
"ts-jest": "^27.0.5",
"tslib": "^2.3.1",
"typescript": "^3.9.5"
Expand Down
2 changes: 2 additions & 0 deletions packages/rrdom/rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ for (let config of baseConfigs) {
name: config.name,
format: 'iife',
file: pkg.unpkg.replace(pkg.name, config.path),
extend: true,
Copy link
Member Author

Choose a reason for hiding this comment

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

This is the only deliberate change I made: After changing the namespace, rollup threw an error that the package name is illegal unless I add this option. Tbh I'm not entirely sure what the problem here is but I don't think we need this particular build config anyway.

},
],
},
Expand All @@ -67,6 +68,7 @@ for (let config of baseConfigs) {
format: 'iife',
file: toMinPath(pkg.unpkg).replace(pkg.name, config.path),
sourcemap: true,
extend: true,
},
],
},
Expand Down
6 changes: 5 additions & 1 deletion packages/rrdom/src/document-nodejs.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
import { INode, NodeType, serializedNodeWithId } from 'rrweb-snapshot';
import {
INode,
NodeType,
serializedNodeWithId,
} from '@sentry-internal/rrweb-snapshot';
import { NWSAPI } from 'nwsapi';
import { parseCSSText, camelize, toCSSText } from './style';
const nwsapi = require('nwsapi');
Expand Down
4 changes: 2 additions & 2 deletions packages/rrweb-player/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "rrweb-player",
"name": "@sentry-internal/rrweb-player",
"version": "0.7.14",
"devDependencies": {
"@rollup/plugin-commonjs": "^11.0.0",
Expand All @@ -25,7 +25,7 @@
},
"dependencies": {
"@tsconfig/svelte": "^1.0.0",
"rrweb": "^1.1.3"
"@sentry-internal/rrweb": "^1.1.3"
},
"scripts": {
"build": "rollup -c",
Expand Down
8 changes: 4 additions & 4 deletions packages/rrweb-player/src/Controller.svelte
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<script lang="ts">
import { EventType } from 'rrweb';
import type { Replayer } from 'rrweb';
import type { playerMetaData } from 'rrweb/typings/types';
import { EventType } from '@sentry-internal/rrweb';
import type { Replayer } from '@sentry-internal/rrweb';
import type { playerMetaData } from '@sentry-internal/rrweb/typings/types';
import type {
PlayerMachineState,
SpeedMachineState,
} from 'rrweb/typings/replay/machine';
} from '@sentry-internal/rrweb/typings/replay/machine';
import {
onMount,
onDestroy,
Expand Down
4 changes: 2 additions & 2 deletions packages/rrweb-player/src/Player.svelte
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<script lang="ts">
import { onMount, onDestroy } from 'svelte';
import { Replayer, unpack } from 'rrweb';
import type { eventWithTime } from 'rrweb/typings/types';
import { Replayer, unpack } from '@sentry-internal/rrweb';
import type { eventWithTime } from '@sentry-internal/rrweb/typings/types';
import {
inlineCss,
openFullscreen,
Expand Down
2 changes: 1 addition & 1 deletion packages/rrweb-player/src/main.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { eventWithTime } from 'rrweb/typings/types';
import type { eventWithTime } from '@sentry-internal/rrweb/typings/types';
import _Player from './Player.svelte';

type PlayerProps = {
Expand Down
7 changes: 5 additions & 2 deletions packages/rrweb-player/typings/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
import { eventWithTime, playerConfig } from 'rrweb/typings/types';
import { Replayer, mirror } from 'rrweb';
import {
eventWithTime,
playerConfig,
} from '@sentry-internal/rrweb/typings/types';
import { Replayer, mirror } from '@sentry-internal/rrweb';
import { SvelteComponent } from 'svelte';

export type RRwebPlayerOptions = {
Expand Down
2 changes: 1 addition & 1 deletion packages/rrweb-snapshot/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "rrweb-snapshot",
"name": "@sentry-internal/rrweb-snapshot",
"version": "1.1.14",
"description": "rrweb's component to take a snapshot of DOM, aka DOM serializer",
"scripts": {
Expand Down
4 changes: 2 additions & 2 deletions packages/rrweb/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "rrweb",
"name": "@sentry-internal/rrweb",
"version": "1.1.3",
"description": "record and replay the web",
"scripts": {
Expand Down Expand Up @@ -79,6 +79,6 @@
"base64-arraybuffer": "^1.0.1",
"fflate": "^0.4.4",
"mitt": "^1.1.3",
"rrweb-snapshot": "^1.1.14"
"@sentry-internal/rrweb-snapshot": "^1.1.14"
}
}
2 changes: 1 addition & 1 deletion packages/rrweb/src/record/iframe-manager.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { serializedNodeWithId, INode } from 'rrweb-snapshot';
import { serializedNodeWithId, INode } from '@sentry-internal/rrweb-snapshot';
import { mutationCallBack } from '../types';

export class IframeManager {
Expand Down
6 changes: 5 additions & 1 deletion packages/rrweb/src/record/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
import { snapshot, MaskInputOptions, SlimDOMOptions } from 'rrweb-snapshot';
import {
snapshot,
MaskInputOptions,
SlimDOMOptions,
} from '@sentry-internal/rrweb-snapshot';
import { initObservers, mutationBuffers } from './observer';
import {
on,
Expand Down
2 changes: 1 addition & 1 deletion packages/rrweb/src/record/mutation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {
isShadowRoot,
needMaskingText,
maskInputValue,
} from 'rrweb-snapshot';
} from '@sentry-internal/rrweb-snapshot';
import {
mutationRecord,
textCursor,
Expand Down
6 changes: 5 additions & 1 deletion packages/rrweb/src/record/observer.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
import { INode, MaskInputOptions, maskInputValue } from 'rrweb-snapshot';
import {
INode,
MaskInputOptions,
maskInputValue,
} from '@sentry-internal/rrweb-snapshot';
import { FontFaceSet } from 'css-font-loading-module';
import {
throttle,
Expand Down
2 changes: 1 addition & 1 deletion packages/rrweb/src/record/observers/canvas/2d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { INode } from 'rrweb-snapshot';
import { INode } from '@sentry-internal/rrweb-snapshot';
import {
blockClass,
CanvasContext,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { INode } from 'rrweb-snapshot';
import { INode } from '@sentry-internal/rrweb-snapshot';
import {
blockClass,
canvasManagerMutationCallback,
Expand Down
2 changes: 1 addition & 1 deletion packages/rrweb/src/record/observers/canvas/canvas.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { INode, ICanvas } from 'rrweb-snapshot';
import { INode, ICanvas } from '@sentry-internal/rrweb-snapshot';
import { blockClass, IWindow, listenerHandler } from '../../../types';
import { isBlocked, patch } from '../../../utils';

Expand Down
2 changes: 1 addition & 1 deletion packages/rrweb/src/record/observers/canvas/webgl.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { INode } from 'rrweb-snapshot';
import { INode } from '@sentry-internal/rrweb-snapshot';
import {
blockClass,
CanvasContext,
Expand Down
2 changes: 1 addition & 1 deletion packages/rrweb/src/replay/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {
NodeType,
BuildCache,
createCache,
} from 'rrweb-snapshot';
} from '@sentry-internal/rrweb-snapshot';
import * as mittProxy from 'mitt';
import { polyfill as smoothscrollPolyfill } from './smoothscroll';
import { Timer } from './timer';
Expand Down
2 changes: 1 addition & 1 deletion packages/rrweb/src/replay/virtual-styles.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { INode } from 'rrweb-snapshot';
import { INode } from '@sentry-internal/rrweb-snapshot';

export enum StyleRuleType {
Insert,
Expand Down
2 changes: 1 addition & 1 deletion packages/rrweb/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {
SlimDOMOptions,
MaskInputFn,
MaskTextFn,
} from 'rrweb-snapshot';
} from '@sentry-internal/rrweb-snapshot';
import { PackFn, UnpackFn } from './packer/base';
import { IframeManager } from './record/iframe-manager';
import { ShadowDomManager } from './record/shadow-dom-manager';
Expand Down
2 changes: 1 addition & 1 deletion packages/rrweb/src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import {
serializedNodeWithId,
NodeType,
isShadowRoot,
} from 'rrweb-snapshot';
} from '@sentry-internal/rrweb-snapshot';

export function on(
type: string,
Expand Down
2 changes: 1 addition & 1 deletion packages/rrweb/test/integration.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import {
replaceLast,
} from './utils';
import { recordOptions, eventWithTime, EventType } from '../src/types';
import { visitSnapshot, NodeType } from 'rrweb-snapshot';
import { visitSnapshot, NodeType } from '@sentry-internal/rrweb-snapshot';

interface ISuite {
server: http.Server;
Expand Down
2 changes: 1 addition & 1 deletion packages/rrweb/test/record/webgl.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import {
CanvasContext,
} from '../../src/types';
import { assertSnapshot, launchPuppeteer, waitForRAF } from '../utils';
import { ICanvas } from 'rrweb-snapshot';
import { ICanvas } from '@sentry-internal/rrweb-snapshot';

interface ISuite {
code: string;
Expand Down
2 changes: 1 addition & 1 deletion packages/rrweb/test/utils.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { NodeType } from 'rrweb-snapshot';
import { NodeType } from '@sentry-internal/rrweb-snapshot';
import {
EventType,
IncrementalSource,
Expand Down
2 changes: 1 addition & 1 deletion packages/rrweb/typings/record/iframe-manager.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { serializedNodeWithId, INode } from 'rrweb-snapshot';
import { serializedNodeWithId, INode } from '@sentry-internal/rrweb-snapshot';
import { mutationCallBack } from '../types';
export declare class IframeManager {
private iframes;
Expand Down
2 changes: 1 addition & 1 deletion packages/rrweb/typings/replay/virtual-styles.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { INode } from 'rrweb-snapshot';
import { INode } from '@sentry-internal/rrweb-snapshot';
export declare enum StyleRuleType {
Insert = 0,
Remove = 1,
Expand Down
2 changes: 1 addition & 1 deletion packages/rrweb/typings/types.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { serializedNodeWithId, idNodeMap, INode, MaskInputOptions, SlimDOMOptions, MaskInputFn, MaskTextFn } from 'rrweb-snapshot';
import { serializedNodeWithId, idNodeMap, INode, MaskInputOptions, SlimDOMOptions, MaskInputFn, MaskTextFn } from '@sentry-internal/rrweb-snapshot';
import { PackFn, UnpackFn } from './packer/base';
import { IframeManager } from './record/iframe-manager';
import { ShadowDomManager } from './record/shadow-dom-manager';
Expand Down
2 changes: 1 addition & 1 deletion packages/rrweb/typings/utils.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Mirror, throttleOptions, listenerHandler, hookResetter, blockClass, addedNodeMutation, removedNodeMutation, textMutation, attributeMutation, mutationData, scrollData, inputData, DocumentDimension, IWindow } from './types';
import { INode, serializedNodeWithId } from 'rrweb-snapshot';
import { INode, serializedNodeWithId } from '@sentry-internal/rrweb-snapshot';
export declare function on(type: string, fn: EventListenerOrEventListenerObject, target?: Document | IWindow): listenerHandler;
export declare function createMirror(): Mirror;
export declare let _mirror: Mirror;
Expand Down