Skip to content

Commit 3230bc7

Browse files
committed
make dedicated package
1 parent fc05c52 commit 3230bc7

File tree

19 files changed

+183
-4
lines changed

19 files changed

+183
-4
lines changed

.github/workflows/build.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -369,6 +369,7 @@ jobs:
369369
${{ github.workspace }}/packages/browser/build/bundles/**
370370
${{ github.workspace }}/packages/integrations/build/bundles/**
371371
${{ github.workspace }}/packages/replay/build/bundles/**
372+
${{ github.workspace }}/packages/replay-canvas/build/bundles/**
372373
${{ github.workspace }}/packages/**/*.tgz
373374
${{ github.workspace }}/packages/serverless/build/aws/dist-serverless/*.zip
374375

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@
6969
"packages/remix",
7070
"packages/replay",
7171
"packages/replay-worker",
72+
"packages/replay-canvas",
7273
"packages/serverless",
7374
"packages/svelte",
7475
"packages/sveltekit",

packages/browser/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
},
2525
"dependencies": {
2626
"@sentry-internal/feedback": "7.88.0",
27+
"@sentry-internal/replay-canvas": "7.88.0",
2728
"@sentry-internal/tracing": "7.88.0",
2829
"@sentry/core": "7.88.0",
2930
"@sentry/replay": "7.88.0",

packages/browser/src/index.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@ const INTEGRATIONS = {
2020

2121
export { INTEGRATIONS as Integrations };
2222

23-
export { Replay, ReplayCanvas } from '@sentry/replay';
23+
export { Replay } from '@sentry/replay';
24+
export { ReplayCanvas } from '@sentry-internal/replay-canvas';
2425
export type {
2526
ReplayEventType,
2627
ReplayEventWithTime,
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
vendor
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
// Note: All paths are relative to the directory in which eslint is being run, rather than the directory where this file
2+
// lives
3+
4+
// ESLint config docs: https://eslint.org/docs/user-guide/configuring/
5+
6+
module.exports = {
7+
extends: ['../../.eslintrc.js'],
8+
};

packages/replay-canvas/.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
node_modules
2+
/*.tgz
3+
.eslintcache
4+
build
5+
!vendor/*.d.ts

packages/replay-canvas/LICENSE

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
Copyright (c) 2023 Sentry (https://sentry.io) and individual contributors. All rights reserved.
2+
3+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
4+
documentation files (the "Software"), to deal in the Software without restriction, including without limitation the
5+
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit
6+
persons to whom the Software is furnished to do so, subject to the following conditions:
7+
8+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the
9+
Software.
10+
11+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
12+
WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
13+
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
14+
OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

packages/replay-canvas/README.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<p align="center">
2+
<a href="https://sentry.io/?utm_source=github&utm_medium=logo" target="_blank">
3+
<img src="https://sentry-brand.storage.googleapis.com/sentry-wordmark-dark-280x84.png" alt="Sentry" width="280" height="84">
4+
</a>
5+
</p>
6+
7+
# Sentry Session Replay Worker
8+
9+
This is an internal package that is used by @sentry/replay.
10+
It generates a web worker and converts it to a string, so that we can process it easier in replay.
11+
12+
By extracting this into a dedicated (private, internal) package, we can streamline the build of replay.
13+
14+
## Example Worker
15+
16+
You can find an example worker for if you want to self-host the compression worker in [/examples](./examples/).
17+
18+
This is generated from the actual soure via `yarn build:examples`, which should be run manually whenever replay-worker is updated.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
module.exports = require('../../jest/jest.config.js');

0 commit comments

Comments
 (0)