Skip to content

dev: Upgrade to use [email protected] #11901

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

Merged
merged 4 commits into from
May 6, 2024
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 package.json
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@
"@types/jsdom": "^21.1.6",
"@types/node": "^14.18.0",
"@types/rimraf": "^3.0.2",
"@vitest/coverage-c8": "^0.29.2",
"@vitest/coverage-v8": "^1.6.0",
"codecov": "^3.6.5",
"deepmerge": "^4.2.2",
"downlevel-dts": "~0.11.0",
Expand All @@ -127,7 +127,7 @@
"ts-node": "10.9.1",
"typedoc": "^0.18.0",
"typescript": "4.9.5",
"vitest": "^0.29.2",
"vitest": "^1.6.0",
"yalc": "^1.0.0-pre.53"
},
"resolutions": {
Expand Down
1 change: 0 additions & 1 deletion packages/angular/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@
"ng-packagr": "^14.2.2",
"rxjs": "7.8.1",
"typescript": "4.6.4",
"vitest": "^1.4.0",
"zone.js": "^0.12.0"
},
"scripts": {
Expand Down
24 changes: 12 additions & 12 deletions packages/astro/test/integration/snippets.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ describe('buildClientSnippet', () => {
it('returns a basic Sentry init call with default options', () => {
const snippet = buildClientSnippet({});
expect(snippet).toMatchInlineSnapshot(`
"import * as Sentry from \\"@sentry/astro\\";
"import * as Sentry from "@sentry/astro";

Sentry.init({
dsn: import.meta.env.PUBLIC_SENTRY_DSN,
Expand All @@ -34,13 +34,13 @@ describe('buildClientSnippet', () => {
const snippet = buildClientSnippet(allSdkOptions);

expect(snippet).toMatchInlineSnapshot(`
"import * as Sentry from \\"@sentry/astro\\";
"import * as Sentry from "@sentry/astro";

Sentry.init({
dsn: \\"my-dsn\\",
dsn: "my-dsn",
debug: true,
environment: \\"staging\\",
release: \\"1.0.0\\",
environment: "staging",
release: "1.0.0",
tracesSampleRate: 0.3,
sampleRate: 0.2,
integrations: [Sentry.browserTracingIntegration(), Sentry.replayIntegration()],
Expand All @@ -53,7 +53,7 @@ describe('buildClientSnippet', () => {
it('does not include browserTracingIntegration if tracesSampleRate is 0', () => {
const snippet = buildClientSnippet({ tracesSampleRate: 0 });
expect(snippet).toMatchInlineSnapshot(`
"import * as Sentry from \\"@sentry/astro\\";
"import * as Sentry from "@sentry/astro";

Sentry.init({
dsn: import.meta.env.PUBLIC_SENTRY_DSN,
Expand All @@ -72,7 +72,7 @@ describe('buildClientSnippet', () => {
it('does not include Replay if replay sample ratest are 0', () => {
const snippet = buildClientSnippet({ replaysSessionSampleRate: 0, replaysOnErrorSampleRate: 0 });
expect(snippet).toMatchInlineSnapshot(`
"import * as Sentry from \\"@sentry/astro\\";
"import * as Sentry from "@sentry/astro";

Sentry.init({
dsn: import.meta.env.PUBLIC_SENTRY_DSN,
Expand All @@ -91,7 +91,7 @@ describe('buildServerSnippet', () => {
it('returns a basic Sentry init call with default options', () => {
const snippet = buildServerSnippet({});
expect(snippet).toMatchInlineSnapshot(`
"import * as Sentry from \\"@sentry/astro\\";
"import * as Sentry from "@sentry/astro";

Sentry.init({
dsn: import.meta.env.PUBLIC_SENTRY_DSN,
Expand All @@ -107,13 +107,13 @@ describe('buildServerSnippet', () => {
const snippet = buildServerSnippet(allSdkOptions);

expect(snippet).toMatchInlineSnapshot(`
"import * as Sentry from \\"@sentry/astro\\";
"import * as Sentry from "@sentry/astro";

Sentry.init({
dsn: \\"my-dsn\\",
dsn: "my-dsn",
debug: true,
environment: \\"staging\\",
release: \\"1.0.0\\",
environment: "staging",
release: "1.0.0",
tracesSampleRate: 0.3,
sampleRate: 0.2,
});"
Expand Down
2 changes: 2 additions & 0 deletions packages/sveltekit/.empty.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
// Hack to get $app/stores import working (can't mock it in tests if path is not resolvable).
// See: https://github.com/vitest-dev/vitest/issues/4630
9 changes: 9 additions & 0 deletions packages/sveltekit/vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
import { dirname, resolve } from 'path';
import { fileURLToPath } from 'url';

import type { UserConfig } from 'vitest';

import baseConfig from '../../vite/vite.config';
Expand All @@ -10,5 +13,11 @@ export default {
...(baseConfig as UserConfig & { test: any }).test,
environment: 'jsdom',
setupFiles: ['./test/vitest.setup.ts'],
alias: [
{
find: '$app/stores',
replacement: resolve(fileURLToPath(dirname(import.meta.url)), '/.empty.js'),
},
],
},
};
Loading