Skip to content

Commit

Permalink
fix(build): Revert unintended Replay tsconfig changes (#6300)
Browse files Browse the repository at this point in the history
This PR reverts a few changes I unintentionally comitted and merged in #6288. It caused build errors which for some reasons did not our CI's "build" step to fail but caused size-check fails in https://github.com/getsentry/sentry-javascript/actions/runs/3546454900
  • Loading branch information
Lms24 authored Nov 25, 2022
1 parent 7821ba7 commit d825549
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 18 deletions.
2 changes: 1 addition & 1 deletion packages/replay/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ module.exports = {
{
files: ['worker/**/*.ts'],
parserOptions: {
project: ['config/tsconfig.worker.json'],
project: ['./config/tsconfig.worker.json'],
},
},
{
Expand Down
11 changes: 10 additions & 1 deletion packages/replay/config/tsconfig.base.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,13 @@
{
"compilerOptions": {},
"compilerOptions": {
"module": "esnext",
"moduleResolution": "node",
"noImplicitAny": true,
"noEmitOnError": false,
"esModuleInterop": true,
"resolveJsonModule": true,
"skipLibCheck": true,
"target": "es5"
},
"exclude": ["node_modules"]
}
6 changes: 0 additions & 6 deletions packages/replay/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,12 +63,6 @@
"engines": {
"node": ">=12"
},
"size-limit": [
{
"path": "build/npm/index.js",
"limit": "4500ms"
}
],
"volta": {
"node": "14.21.1",
"yarn": "1.22.19"
Expand Down
12 changes: 2 additions & 10 deletions packages/replay/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,19 +1,11 @@
{
"extends": "./config/tsconfig.core.json",
"compilerOptions": {
"module": "esnext",
"moduleResolution": "node",
"noImplicitAny": true,
"noEmitOnError": false,
"esModuleInterop": true,
"resolveJsonModule": true,
"skipLibCheck": true,
"types": ["node", "jest"],
"target": "es5",
"paths": {
"@test": ["./test"],
"@test/*": ["./test/*"]
}
},
"types": ["node", "jest"]
},
"include": ["src/**/*.ts", "test/**/*.ts", "rollup.config.ts", "jest.config.ts", "jest.setup.ts"],
"exclude": ["node_modules"]
Expand Down
2 changes: 2 additions & 0 deletions packages/replay/worker/src/handleMessage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,10 @@ export function handleMessage(e: MessageEvent): void {
const id = e.data.id as number;
const [data] = e.data.args ? JSON.parse(e.data.args) : [];

// @ts-ignore this syntax is actually fine
if (method in handlers && typeof handlers[method] === 'function') {
try {
// @ts-ignore this syntax is actually fine
const response = handlers[method](data);
// @ts-ignore this syntax is actually fine
postMessage({
Expand Down

0 comments on commit d825549

Please sign in to comment.