Skip to content

Commit 17e857d

Browse files
committed
updates to pass PR ci
1 parent 1cbdc12 commit 17e857d

File tree

6 files changed

+18
-12
lines changed

6 files changed

+18
-12
lines changed

packages/svelte/.eslintrc.js renamed to packages/svelte/.eslintrc.cjs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,14 @@ module.exports = {
22
env: {
33
browser: true,
44
},
5+
overrides: [
6+
{
7+
files: ['vite.config.ts'],
8+
parserOptions: {
9+
project: ['tsconfig.test.json'],
10+
},
11+
},
12+
],
513
extends: ['../../.eslintrc.js'],
614
rules: {
715
'@sentry-internal/sdk/no-unsupported-es6-methods': 'off',

packages/svelte/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,9 @@
5353
"svelte": "3.x || 4.x"
5454
},
5555
"devDependencies": {
56-
"@testing-library/svelte": "^3.2.1",
56+
"svelte": "3.49.0",
5757
"@sveltejs/vite-plugin-svelte": "3.0.1",
58-
"svelte": "3.49.0"
58+
"@testing-library/svelte": "^3.2.1"
5959
},
6060
"scripts": {
6161
"build": "run-p build:transpile build:types",

packages/svelte/test/performance.test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import type { Scope } from '@sentry/core';
22
import { act, render } from '@testing-library/svelte';
33

4+
import { vi } from 'vitest';
45
// linter doesn't like Svelte component imports
56
import DummyComponent from './components/Dummy.svelte';
6-
import { vi } from 'vitest';
77

88
let returnUndefinedTransaction = false;
99

@@ -21,8 +21,8 @@ const testInitSpan: any = {
2121
isRecording: () => true,
2222
};
2323

24-
vi.mock('@sentry/core', () => {
25-
const original = vi.importActual('@sentry/core');
24+
vi.mock('@sentry/core', async () => {
25+
const original = await vi.importActual('@sentry/core');
2626
return {
2727
...original,
2828
getCurrentScope(): Scope {

packages/svelte/test/sdk.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ import { SDK_VERSION } from '@sentry/browser';
22
import * as SentryBrowser from '@sentry/browser';
33
import type { EventProcessor } from '@sentry/types';
44

5-
import { detectAndReportSvelteKit, init as svelteInit, isSvelteKitApp } from '../src/sdk';
65
import { vi } from 'vitest';
6+
import { detectAndReportSvelteKit, init as svelteInit, isSvelteKitApp } from '../src/sdk';
77

88
let passedEventProcessor: EventProcessor | undefined;
99

packages/svelte/tsconfig.test.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
{
22
"extends": "./tsconfig.json",
33

4-
"include": ["test/**/*"],
4+
"include": ["test/**/*", "vite.config.ts"],
55

66
"compilerOptions": {
77
// should include all types from `./tsconfig.json` plus types for all test frameworks used
8-
"types": ["jest"]
8+
"types": ["vitest/globals"]
99

1010
// other package-specific, test-specific options
1111
}

packages/svelte/vite.config.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,10 @@
1-
import type { UserConfig } from 'vitest';
21
import { svelte } from '@sveltejs/vite-plugin-svelte';
2+
import type { UserConfig } from 'vitest';
33
import baseConfig from '../../vite/vite.config';
44

55
export default {
66
...baseConfig,
7-
plugins: [
8-
svelte({ hot: !process.env.VITEST }),
9-
],
7+
plugins: [svelte({ hot: !process.env.VITEST })],
108
test: {
119
// test exists, no idea why TS doesn't recognize it
1210
// eslint-disable-next-line @typescript-eslint/no-explicit-any

0 commit comments

Comments
 (0)