+
+# Official Sentry SDK for Solid Start
+
+[![npm version](https://img.shields.io/npm/v/@sentry/sveltekit.svg)](https://www.npmjs.com/package/@sentry/sveltekit)
+[![npm dm](https://img.shields.io/npm/dm/@sentry/sveltekit.svg)](https://www.npmjs.com/package/@sentry/sveltekit)
+[![npm dt](https://img.shields.io/npm/dt/@sentry/sveltekit.svg)](https://www.npmjs.com/package/@sentry/sveltekit)
+
+## Links
+
+- [Official SDK Docs](https://docs.sentry.io/platforms/javascript/guides/sveltekit/)
+
+## Compatibility
+
+The minimum supported version of SvelteKit is `1.0.0`. The SDK works best with Vite 4.2 and newer. Older Vite versions
+might not generate source maps correctly.
+
+The SDK supports the following SvelteKit adapters:
+
+- `@sveltejs/adapter-auto` - for Vercel with the Node runtime. Other deployment targets might work but we don't
+ guarantee compatibility.
+- `@sveltejs/adapter-vercel` - only for Node (Lambda) runtimes, not yet Vercel's edge runtime
+- `@sveltejs/adapter-node`
+
+If you use the SDK with other adapters, we cannot guarantee that everything works as expected. You might need to
+[manually configure source maps upload](#-configuring-source-maps-upload). The SDK is currently not compatible with
+none-Node server runtimes, such as Vercel's Edge runtime or Cloudflare workers.
+
+## General
+
+This package is a wrapper around `@sentry/node` for the server and `@sentry/svelte` for the client side, with added
+functionality related to SvelteKit.
+
+## Automatic Setup
+
+We recommend installing the SDK by running the
+[Sentry wizard](https://docs.sentry.io/platforms/javascript/guides/sveltekit/#install) in the root directory of your
+project:
+
+```sh
+npx @sentry/wizard@latest -i sveltekit
+```
+
+Take a look at the sections below if you want to customize your SDK configuration.
+
+## Manual Setup
+
+If the setup through the wizard doesn't work for you, you can also set up the SDK manually.
+
+### 1. Prerequesits & Installation
+
+1. Install the Sentry SvelteKit SDK:
+
+ ```bash
+ # Using npm
+ npm install @sentry/sveltekit
+
+ # Using yarn
+ yarn add @sentry/sveltekit
+ ```
+
+### 2. Client-side Setup
+
+The Sentry SvelteKit SDK mostly relies on [SvelteKit Hooks](https://kit.svelte.dev/docs/hooks) to capture error and
+performance data.
+
+1. If you don't already have a client hooks file, create a new one in `src/hooks.client.(js|ts)`.
+
+2. On the top of your `hooks.client.(js|ts)` file, initialize the Sentry SDK:
+
+ ```javascript
+ // hooks.client.(js|ts)
+ import * as Sentry from '@sentry/sveltekit';
+
+ Sentry.init({
+ dsn: '__DSN__',
+ tracesSampleRate: 1.0,
+ // For instance, initialize Session Replay:
+ replaysSessionSampleRate: 0.1,
+ replaysOnErrorSampleRate: 1.0,
+ integrations: [Sentry.replayIntegration()],
+ });
+ ```
+
+3. Add our `handleErrorWithSentry` function to the `handleError` hook:
+
+ ```javascript
+ // hooks.client.(js|ts)
+ import { handleErrorWithSentry } from '@sentry/sveltekit';
+
+ const myErrorHandler = ({ error, event }) => {
+ console.error('An error occurred on the client side:', error, event);
+ };
+
+ export const handleError = handleErrorWithSentry(myErrorHandler);
+ // or alternatively, if you don't have a custom error handler:
+ // export const handleError = handleErrorWithSentry();
+ ```
+
+### 3. Server-side Setup
+
+1. If you don't already have a server hooks file, create a new one in `src/hooks.server.(js|ts)`.
+
+2. On the top of your `hooks.server.(js|ts)` file, initialize the Sentry SDK:
+
+ ```javascript
+ // hooks.server.(js|ts)
+ import * as Sentry from '@sentry/sveltekit';
+
+ Sentry.init({
+ dsn: '__DSN__',
+ tracesSampleRate: 1.0,
+ });
+ ```
+
+3. Add our `handleErrorWithSentry` function to the `handleError` hook:
+
+ ```javascript
+ // hooks.server.(js|ts)
+ import { handleErrorWithSentry } from '@sentry/sveltekit';
+
+ const myErrorHandler = ({ error, event }) => {
+ console.error('An error occurred on the server side:', error, event);
+ };
+
+ export const handleError = handleErrorWithSentry(myErrorHandler);
+ // or alternatively, if you don't have a custom error handler:
+ // export const handleError = handleErrorWithSentry();
+ ```
+
+4. Add our request handler to the `handle` hook in `hooks.server.ts`:
+
+ ```javascript
+ // hooks.server.(js|ts)
+ import { sentryHandle } from '@sentry/sveltekit';
+
+ export const handle = sentryHandle();
+ // or alternatively, if you already have a handler defined, use the `sequence` function
+ // see: https://kit.svelte.dev/docs/modules#sveltejs-kit-hooks-sequence
+ // export const handle = sequence(sentryHandle(), yourHandler());
+ ```
+
+### 4. Vite Setup
+
+Add `sentrySvelteKit` to your Vite plugins in `vite.config.(js|ts)` file so that the Sentry SDK can apply build-time
+features. Make sure that it is added _before_ the `sveltekit` plugin:
+
+```javascript
+// vite.config.(js|ts)
+import { sveltekit } from '@sveltejs/kit/vite';
+import { sentrySvelteKit } from '@sentry/sveltekit';
+
+export default {
+ plugins: [sentrySvelteKit(), sveltekit()],
+ // ... rest of your Vite config
+};
+```
+
+This adds the
+[Sentry Vite Plugin](https://github.com/getsentry/sentry-javascript-bundler-plugins/tree/main/packages/vite-plugin) to
+your Vite config to automatically upload source maps to Sentry.
+
+---
+
+## Uploading Source Maps
+
+After completing the [Vite Setup](#5-vite-setup), the SDK will automatically upload source maps to Sentry, when you
+build your project. However, you still need to specify your Sentry auth token as well as your org and project slugs. You
+can either set them as env variables (for example in a `.env` file):
+
+- `SENTRY_ORG` your Sentry org slug
+- `SENTRY_PROJECT` your Sentry project slug
+- `SENTRY_AUTH_TOKEN` your Sentry auth token
+
+Or you can pass them in whatever form you prefer to `sentrySvelteKit`:
+
+```js
+// vite.config.(js|ts)
+import { sveltekit } from '@sveltejs/kit/vite';
+import { sentrySvelteKit } from '@sentry/sveltekit';
+
+export default {
+ plugins: [
+ sentrySvelteKit({
+ sourceMapsUploadOptions: {
+ org: 'my-org-slug',
+ project: 'my-project-slug',
+ authToken: process.env.SENTRY_AUTH_TOKEN,
+ },
+ }),
+ sveltekit(),
+ ],
+ // ... rest of your Vite config
+};
+```
+
+### Configuring Source maps upload
+
+Under `sourceMapsUploadOptions`, you can also specify all additional options supported by the
+[Sentry Vite Plugin](https://www.npmjs.com/package/@sentry/vite-plugin). This might be useful if you're using adapters
+other than the Node adapter or have a more customized build setup.
+
+```js
+// vite.config.(js|ts)
+import { sveltekit } from '@sveltejs/kit/vite';
+import { sentrySvelteKit } from '@sentry/sveltekit';
+
+export default {
+ plugins: [
+ sentrySvelteKit({
+ sourceMapsUploadOptions: {
+ org: 'my-org-slug',
+ project: 'my-project-slug',
+ authToken: process.env.SENTRY_AUTH_TOKEN,
+ include: ['dist'],
+ cleanArtifacts: true,
+ setCommits: {
+ auto: true,
+ },
+ },
+ }),
+ sveltekit(),
+ ],
+ // ... rest of your Vite config
+};
+```
+
+### Disabeling automatic source map upload
+
+If you don't want to upload source maps automatically, you can disable it as follows:
+
+```js
+// vite.config.(js|ts)
+import { sveltekit } from '@sveltejs/kit/vite';
+import { sentrySvelteKit } from '@sentry/sveltekit';
+
+export default {
+ plugins: [
+ sentrySvelteKit({
+ autoUploadSourceMaps: false,
+ }),
+ sveltekit(),
+ ],
+ // ... rest of your Vite config
+};
+```
+
+## Configure Auto-Instrumentation
+
+The SDK mostly relies on [SvelteKit's hooks](https://kit.svelte.dev/docs/hooks) to collect error and performance data.
+However, SvelteKit doesn't yet offer a hook for universal or server-only `load` function calls. Therefore, the SDK uses
+a Vite plugin to auto-instrument `load` functions so that you don't have to add a Sentry wrapper to each function
+manually. Auto-instrumentation is enabled by default, as soon as you add the `sentrySvelteKit()` function call to your
+`vite.config.(js|ts)`. However, you can customize the behavior, or disable it entirely. In this case, you can still
+manually wrap specific `load` functions with the `withSentry` function.
+
+Note: The SDK will only auto-instrument `load` functions in `+page` or `+layout` files that do not yet contain any
+Sentry code. If you already have custom Sentry code in such files, you'll have to
+[manually](#instrument-load-functions-manually) add our wrapper to your `load` functions.
+
+### Customize Auto-instrumentation
+
+By passing the `autoInstrument` option to `sentrySvelteKit` you can disable auto-instrumentation entirely, or customize
+which `load` functions should be instrumented:
+
+```javascript
+// vite.config.(js|ts)
+import { sveltekit } from '@sveltejs/kit/vite';
+import { sentrySvelteKit } from '@sentry/sveltekit';
+
+export default {
+ plugins: [
+ sentrySvelteKit({
+ autoInstrument: {
+ load: true, // universal load functions
+ serverLoad: false, // server-only load functions
+ },
+ }),
+ sveltekit(),
+ ],
+ // ... rest of your Vite config
+};
+```
+
+### Disable Auto-instrumentation
+
+If you set the `autoInstrument` option to `false`, the SDK won't auto-instrument any `load` function. You can still
+[manually instrument](#instrument-load-functions-manually) specific `load` functions.
+
+```javascript
+// vite.config.(js|ts)
+import { sveltekit } from '@sveltejs/kit/vite';
+import { sentrySvelteKit } from '@sentry/sveltekit';
+
+export default {
+ plugins: [
+ sentrySvelteKit({
+ autoInstrument: false;
+ }),
+ sveltekit(),
+ ],
+ // ... rest of your Vite config
+};
+```
+
+### Instrument `load` Functions Manually
+
+If you don't want to use auto-instrumentation, you can also manually instrument specific `load` functions with our load
+function wrappers:
+
+To instrument your universal `load` functions in `+(page|layout).(js|ts)`, wrap our `wrapLoadWithSentry` function around
+your load code:
+
+```javascript
+import { wrapLoadWithSentry } from '@sentry/sveltekit';
+
+export const load = wrapLoadWithSentry(event => {
+ //... your load code
+});
+```
+
+To instrument server `load` functions in `+(page|layout).server.(js|ts)`, wrap our `wrapServerLoadWithSentry` function
+around your load code:
+
+```javascript
+import { wrapServerLoadWithSentry } from '@sentry/sveltekit';
+
+export const load = wrapServerLoadWithSentry(event => {
+ //... your server load code
+});
+```
diff --git a/packages/solidstart/package.json b/packages/solidstart/package.json
new file mode 100644
index 000000000000..bab6f28eb820
--- /dev/null
+++ b/packages/solidstart/package.json
@@ -0,0 +1,100 @@
+{
+ "name": "@sentry/solidstart",
+ "version": "8.11.0",
+ "description": "Official Sentry SDK for Solid Start",
+ "repository": "git://github.com/getsentry/sentry-javascript.git",
+ "homepage": "https://github.com/getsentry/sentry-javascript/tree/master/packages/solidstart",
+ "author": "Sentry",
+ "license": "MIT",
+ "engines": {
+ "node": ">=16"
+ },
+ "files": [
+ "cjs",
+ "esm",
+ "index.types.d.ts",
+ "solidrouter.types.d.ts",
+ "types-ts3.8"
+ ],
+ "main": "build/cjs/index.server.js",
+ "module": "build/esm/index.server.js",
+ "browser": "build/esm/index.client.js",
+ "types": "build/index.types.d.ts",
+ "exports": {
+ "./package.json": "./package.json",
+ ".": {
+ "types": "./build/index.types.d.ts",
+ "browser": {
+ "import": "./build/esm/index.client.js",
+ "require": "./build/cjs/index.client.js"
+ },
+ "node": {
+ "import": "./build/esm/index.server.js",
+ "require": "./build/cjs/index.server.js"
+ }
+ },
+ "./solidrouter": {
+ "types": "./build/solidrouter.types.d.ts",
+ "browser": {
+ "import": "./build/esm/solidrouter.client.js",
+ "require": "./build/cjs/solidrouter.client.js"
+ },
+ "node": {
+ "import": "./build/esm/solidrouter.server.js",
+ "require": "./build/cjs/solidrouter.server.js"
+ }
+ }
+ },
+ "publishConfig": {
+ "access": "public"
+ },
+ "peerDependencies": {
+ "@solidjs/router": "^0.13.4",
+ "@solidjs/start": "^1.0.0"
+ },
+ "peerDependenciesMeta": {
+ "@solidjs/router": {
+ "optional": true
+ }
+ },
+ "dependencies": {
+ "@sentry/core": "8.11.0",
+ "@sentry/node": "8.11.0",
+ "@sentry/opentelemetry": "8.11.0",
+ "@sentry/solid": "8.11.0",
+ "@sentry/types": "8.11.0",
+ "@sentry/utils": "8.11.0",
+ "@sentry/vite-plugin": "2.19.0"
+ },
+ "devDependencies": {
+ "@solidjs/start": "^1.0.0",
+ "@solidjs/router": "^0.13.4",
+ "@solidjs/testing-library": "0.8.5",
+ "@testing-library/jest-dom": "^6.4.5",
+ "@testing-library/user-event": "^14.5.2",
+ "solid-js": "^1.8.11",
+ "vite-plugin-solid": "^2.8.2"
+ },
+ "scripts": {
+ "build": "run-p build:transpile build:types",
+ "build:dev": "yarn build",
+ "build:transpile": "rollup -c rollup.npm.config.mjs",
+ "build:types": "tsc -p tsconfig.types.json",
+ "build:watch": "run-p build:transpile:watch build:types:watch",
+ "build:dev:watch": "yarn build:watch",
+ "build:transpile:watch": "rollup -c rollup.npm.config.mjs --watch",
+ "build:types:watch": "tsc -p tsconfig.types.json --watch",
+ "build:tarball": "ts-node ../../scripts/prepack.ts && npm pack ./build",
+ "circularDepCheck": "madge --circular src/index.client.ts && madge --circular src/index.server.ts && madge --circular src/index.types.ts",
+ "clean": "rimraf build coverage sentry-sveltekit-*.tgz",
+ "fix": "eslint . --format stylish --fix",
+ "lint": "eslint . --format stylish",
+ "test": "yarn test:unit",
+ "test:unit": "vitest run",
+ "test:watch": "vitest --watch",
+ "yalc:publish": "ts-node ../../scripts/prepack.ts && yalc publish build --push --sig"
+ },
+ "volta": {
+ "extends": "../../package.json"
+ }
+}
diff --git a/packages/solidstart/rollup.npm.config.mjs b/packages/solidstart/rollup.npm.config.mjs
new file mode 100644
index 000000000000..0f6953887e04
--- /dev/null
+++ b/packages/solidstart/rollup.npm.config.mjs
@@ -0,0 +1,21 @@
+import { makeBaseNPMConfig, makeNPMConfigVariants } from '@sentry-internal/rollup-utils';
+
+export default makeNPMConfigVariants(
+ makeBaseNPMConfig({
+ entrypoints: [
+ 'src/index.server.ts',
+ 'src/solidrouter.server.ts',
+ 'src/index.client.ts',
+ 'src/solidrouter.client.ts',
+ 'src/client/index.ts',
+ 'src/client/solidrouter.ts',
+ 'src/server/index.ts',
+ 'src/server/solidrouter.ts',
+ ],
+ // prevent this internal nextjs code from ending up in our built package (this doesn't happen automatially because
+ // the name doesn't match an SDK dependency)
+ packageSpecificConfig: {
+ external: ['solid-js', '@sentry/solid/solidrouter'],
+ },
+ }),
+);
diff --git a/packages/solidstart/src/client/index.ts b/packages/solidstart/src/client/index.ts
new file mode 100644
index 000000000000..9b455bb3048c
--- /dev/null
+++ b/packages/solidstart/src/client/index.ts
@@ -0,0 +1,3 @@
+export * from '@sentry/solid';
+
+export { init } from './sdk';
diff --git a/packages/solidstart/src/client/sdk.ts b/packages/solidstart/src/client/sdk.ts
new file mode 100644
index 000000000000..ded1f4f86c7f
--- /dev/null
+++ b/packages/solidstart/src/client/sdk.ts
@@ -0,0 +1,23 @@
+import { applySdkMetadata, setTag } from '@sentry/core';
+import type { BrowserOptions } from '@sentry/solid';
+import { init as initSolidSDK } from '@sentry/solid';
+import type { Client } from '@sentry/types';
+
+/**
+ * Initialize the client side of the Sentry SvelteKit SDK.
+ *
+ * @param options Configuration options for the SDK.
+ */
+export function init(options: BrowserOptions): Client | undefined {
+ const opts = {
+ ...options,
+ };
+
+ applySdkMetadata(opts, 'solidstart', ['solidstart', 'solid']);
+
+ const client = initSolidSDK(opts);
+
+ setTag('runtime', 'browser');
+
+ return client;
+}
diff --git a/packages/solidstart/src/client/solidrouter.ts b/packages/solidstart/src/client/solidrouter.ts
new file mode 100644
index 000000000000..34d3b324f9d3
--- /dev/null
+++ b/packages/solidstart/src/client/solidrouter.ts
@@ -0,0 +1 @@
+export * from '@sentry/solid/solidrouter';
diff --git a/packages/solidstart/src/common/debug-build.ts b/packages/solidstart/src/common/debug-build.ts
new file mode 100644
index 000000000000..60aa50940582
--- /dev/null
+++ b/packages/solidstart/src/common/debug-build.ts
@@ -0,0 +1,8 @@
+declare const __DEBUG_BUILD__: boolean;
+
+/**
+ * This serves as a build time flag that will be true by default, but false in non-debug builds or if users replace `__SENTRY_DEBUG__` in their generated code.
+ *
+ * ATTENTION: This constant must never cross package boundaries (i.e. be exported) to guarantee that it can be used for tree shaking.
+ */
+export const DEBUG_BUILD = __DEBUG_BUILD__;
diff --git a/packages/solidstart/src/index.client.ts b/packages/solidstart/src/index.client.ts
new file mode 100644
index 000000000000..4f1cce44fa36
--- /dev/null
+++ b/packages/solidstart/src/index.client.ts
@@ -0,0 +1 @@
+export * from './client';
diff --git a/packages/solidstart/src/index.server.ts b/packages/solidstart/src/index.server.ts
new file mode 100644
index 000000000000..0ce5251aa327
--- /dev/null
+++ b/packages/solidstart/src/index.server.ts
@@ -0,0 +1 @@
+export * from './server';
diff --git a/packages/solidstart/src/index.types.ts b/packages/solidstart/src/index.types.ts
new file mode 100644
index 000000000000..0da6f7c0c53b
--- /dev/null
+++ b/packages/solidstart/src/index.types.ts
@@ -0,0 +1,31 @@
+// We export everything from both the client part of the SDK and from the server part.
+// Some of the exports collide, which is not allowed, unless we redifine the colliding
+// exports in this file - which we do below.
+export * from './client';
+export * from './server';
+
+import type { Integration, Options, StackParser } from '@sentry/types';
+
+import type * as clientSdk from './client';
+import type * as serverSdk from './server';
+
+/** Initializes Sentry SvelteKit SDK */
+export declare function init(options: Options | clientSdk.BrowserOptions | serverSdk.NodeOptions): void;
+
+export declare const linkedErrorsIntegration: typeof clientSdk.linkedErrorsIntegration;
+export declare const contextLinesIntegration: typeof clientSdk.contextLinesIntegration;
+
+export declare const getDefaultIntegrations: (options: Options) => Integration[];
+export declare const defaultStackParser: StackParser;
+
+export declare const getClient: typeof clientSdk.getClient;
+// eslint-disable-next-line deprecation/deprecation
+export declare const getCurrentHub: typeof clientSdk.getCurrentHub;
+
+export declare function close(timeout?: number | undefined): PromiseLike;
+export declare function flush(timeout?: number | undefined): PromiseLike;
+export declare function lastEventId(): string | undefined;
+
+export declare const continueTrace: typeof clientSdk.continueTrace;
+
+export declare const metrics: typeof clientSdk.metrics & typeof serverSdk.metrics;
diff --git a/packages/solidstart/src/server/index.ts b/packages/solidstart/src/server/index.ts
new file mode 100644
index 000000000000..f8b50ec53a45
--- /dev/null
+++ b/packages/solidstart/src/server/index.ts
@@ -0,0 +1,126 @@
+// Node SDK exports
+// Unfortunately, we cannot `export * from '@sentry/node'` because in prod builds,
+// Vite puts these exports into a `default` property (Sentry.default) rather than
+// on the top - level namespace.
+// Hence, we export everything from the Node SDK explicitly:
+export {
+ addBreadcrumb,
+ addEventProcessor,
+ addIntegration,
+ addOpenTelemetryInstrumentation,
+ addRequestDataToEvent,
+ anrIntegration,
+ captureCheckIn,
+ captureConsoleIntegration,
+ captureEvent,
+ captureException,
+ captureFeedback,
+ captureMessage,
+ captureSession,
+ close,
+ connectIntegration,
+ consoleIntegration,
+ contextLinesIntegration,
+ continueTrace,
+ createGetModuleFromFilename,
+ createTransport,
+ cron,
+ debugIntegration,
+ dedupeIntegration,
+ DEFAULT_USER_INCLUDES,
+ defaultStackParser,
+ endSession,
+ expressErrorHandler,
+ expressIntegration,
+ extractRequestData,
+ extraErrorDataIntegration,
+ fastifyIntegration,
+ flush,
+ functionToStringIntegration,
+ generateInstrumentOnce,
+ getActiveSpan,
+ getAutoPerformanceIntegrations,
+ getClient,
+ // eslint-disable-next-line deprecation/deprecation
+ getCurrentHub,
+ getCurrentScope,
+ getDefaultIntegrations,
+ getGlobalScope,
+ getIsolationScope,
+ getRootSpan,
+ getSentryRelease,
+ getSpanDescendants,
+ getSpanStatusFromHttpCode,
+ graphqlIntegration,
+ hapiIntegration,
+ httpIntegration,
+ inboundFiltersIntegration,
+ initOpenTelemetry,
+ isInitialized,
+ koaIntegration,
+ lastEventId,
+ linkedErrorsIntegration,
+ localVariablesIntegration,
+ makeNodeTransport,
+ metrics,
+ modulesIntegration,
+ mongoIntegration,
+ mongooseIntegration,
+ mysql2Integration,
+ mysqlIntegration,
+ nativeNodeFetchIntegration,
+ nestIntegration,
+ NodeClient,
+ nodeContextIntegration,
+ onUncaughtExceptionIntegration,
+ onUnhandledRejectionIntegration,
+ parameterize,
+ postgresIntegration,
+ prismaIntegration,
+ redisIntegration,
+ requestDataIntegration,
+ rewriteFramesIntegration,
+ Scope,
+ SDK_VERSION,
+ SEMANTIC_ATTRIBUTE_SENTRY_OP,
+ SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN,
+ SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE,
+ SEMANTIC_ATTRIBUTE_SENTRY_SOURCE,
+ sessionTimingIntegration,
+ setContext,
+ setCurrentClient,
+ setExtra,
+ setExtras,
+ setHttpStatus,
+ setMeasurement,
+ setTag,
+ setTags,
+ setupConnectErrorHandler,
+ setupExpressErrorHandler,
+ setupHapiErrorHandler,
+ setupKoaErrorHandler,
+ setupNestErrorHandler,
+ setUser,
+ spanToBaggageHeader,
+ spanToJSON,
+ spanToTraceHeader,
+ spotlightIntegration,
+ startInactiveSpan,
+ startNewTrace,
+ startSession,
+ startSpan,
+ startSpanManual,
+ trpcMiddleware,
+ withActiveSpan,
+ withIsolationScope,
+ withMonitor,
+ withScope,
+ zodErrorsIntegration,
+} from '@sentry/node';
+
+// We can still leave this for the carrier init and type exports
+export * from '@sentry/node';
+
+// -------------------------
+// SvelteKit SDK exports:
+export { init } from './sdk';
diff --git a/packages/solidstart/src/server/sdk.ts b/packages/solidstart/src/server/sdk.ts
new file mode 100644
index 000000000000..0b37587e923d
--- /dev/null
+++ b/packages/solidstart/src/server/sdk.ts
@@ -0,0 +1,21 @@
+import { applySdkMetadata, setTag } from '@sentry/core';
+import type { NodeClient, NodeOptions } from '@sentry/node';
+import { init as initNodeSdk } from '@sentry/node';
+
+/**
+ *
+ * @param options
+ */
+export function init(options: NodeOptions): NodeClient | undefined {
+ const opts = {
+ ...options,
+ };
+
+ applySdkMetadata(opts, 'solidstart', ['solidstart', 'node']);
+
+ const client = initNodeSdk(opts);
+
+ setTag('runtime', 'node');
+
+ return client;
+}
diff --git a/packages/solidstart/src/server/solidrouter.ts b/packages/solidstart/src/server/solidrouter.ts
new file mode 100644
index 000000000000..877d18cf4249
--- /dev/null
+++ b/packages/solidstart/src/server/solidrouter.ts
@@ -0,0 +1,61 @@
+import type { HashRouter, MemoryRouter, RouteSectionProps, StaticRouter } from '@solidjs/router';
+// import { useBeforeLeave, useLocation } from '@solidjs/router';
+import type { Router as BaseRouter } from '@solidjs/router/dist/routers/Router';
+import type { Component, JSX, ParentProps } from 'solid-js';
+import { createComponent, mergeProps, splitProps } from 'solid-js';
+
+/** Pass-through component in case user didn't specify a root **/
+function SentryDefaultRoot(props: ParentProps): JSX.Element {
+ return props.children;
+}
+
+/**
+ * Unfortunately, we cannot use router hooks directly in the Router, so we
+ * need to wrap the `root` prop to instrument navigation.
+ */
+function withSentryRouterRoot(Root: Component): Component {
+ const SentryRouterRoot = (props: RouteSectionProps): JSX.Element => {
+ // TODO: This is a rudimentary first version of handling navigation spans
+ // It does not
+ // - use query params
+ // - parameterize the route
+
+ // useBeforeLeave(({ to }: BeforeLeaveEventArgs) => {
+ // `to` could be `-1` if the browser back-button was used
+ // eslint-disable-next-line no-console
+ // console.log('[server] useBeforeLeave', to.toString());
+ // });
+
+ // const location = useLocation();
+ // createEffect(() => {
+ // eslint-disable-next-line no-console
+ // console.log('[server] useLocation', location.pathname);
+ // });
+
+ return createComponent(Root, props);
+ };
+
+ return SentryRouterRoot;
+}
+
+/**
+ *
+ */
+export function solidRouterBrowserTracingIntegration(): void {}
+
+type RouterType = typeof BaseRouter | typeof HashRouter | typeof MemoryRouter | typeof StaticRouter;
+
+/**
+ * A higher-order component to instrument Solid Router to create navigation spans.
+ */
+export function withSentryRouterRouting(Router: RouterType): RouterType {
+ const SentryRouter = (props: Parameters[0]): JSX.Element => {
+ const [local, others] = splitProps(props, ['root']);
+ // We need to wrap root here in case the user passed in their own root
+ const Root = withSentryRouterRoot(local.root ? local.root : SentryDefaultRoot);
+
+ return createComponent(Router, mergeProps({ root: Root }, others));
+ };
+
+ return SentryRouter;
+}
diff --git a/packages/solidstart/src/solidrouter.client.ts b/packages/solidstart/src/solidrouter.client.ts
new file mode 100644
index 000000000000..ee104bf72e2b
--- /dev/null
+++ b/packages/solidstart/src/solidrouter.client.ts
@@ -0,0 +1 @@
+export * from './client/solidrouter';
diff --git a/packages/solidstart/src/solidrouter.server.ts b/packages/solidstart/src/solidrouter.server.ts
new file mode 100644
index 000000000000..cad6137aeb89
--- /dev/null
+++ b/packages/solidstart/src/solidrouter.server.ts
@@ -0,0 +1 @@
+export * from './server/solidrouter';
diff --git a/packages/solidstart/src/solidrouter.types.ts b/packages/solidstart/src/solidrouter.types.ts
new file mode 100644
index 000000000000..272c013dffde
--- /dev/null
+++ b/packages/solidstart/src/solidrouter.types.ts
@@ -0,0 +1,13 @@
+// We export everything from both the client part of the SDK and from the server part.
+// Some of the exports collide, which is not allowed, unless we redifine the colliding
+// exports in this file - which we do below.
+
+export * from './client/solidrouter';
+export * from './server/solidrouter';
+
+import type * as clientSolidRouter from './client/solidrouter';
+import type * as serverSolidRouter from './server/solidrouter';
+
+export declare const solidRouterBrowserTracingIntegration: typeof clientSolidRouter & typeof serverSolidRouter;
+
+export declare const withSentryRouterRouting: typeof clientSolidRouter & typeof serverSolidRouter;
diff --git a/packages/solidstart/tsconfig.json b/packages/solidstart/tsconfig.json
new file mode 100644
index 000000000000..bf45a09f2d71
--- /dev/null
+++ b/packages/solidstart/tsconfig.json
@@ -0,0 +1,9 @@
+{
+ "extends": "../../tsconfig.json",
+
+ "include": ["src/**/*"],
+
+ "compilerOptions": {
+ // package-specific options
+ }
+}
diff --git a/packages/solidstart/tsconfig.test.json b/packages/solidstart/tsconfig.test.json
new file mode 100644
index 000000000000..51c6c9c9b8ea
--- /dev/null
+++ b/packages/solidstart/tsconfig.test.json
@@ -0,0 +1,14 @@
+{
+ "extends": "./tsconfig.json",
+
+ "include": ["test/**/*", "vite.config.ts"],
+
+ "compilerOptions": {
+ // should include all types from `./tsconfig.json` plus types for all test frameworks used
+ "types": ["node", "vitest/globals", "vite/client", "@testing-library/jest-dom"],
+
+ // other package-specific, test-specific options
+ "jsx": "preserve",
+ "jsxImportSource": "solid-js"
+ }
+}
diff --git a/packages/solidstart/tsconfig.types.json b/packages/solidstart/tsconfig.types.json
new file mode 100644
index 000000000000..49a8c984fcc6
--- /dev/null
+++ b/packages/solidstart/tsconfig.types.json
@@ -0,0 +1,10 @@
+{
+ "extends": "./tsconfig.json",
+
+ "compilerOptions": {
+ "declaration": true,
+ "declarationMap": true,
+ "emitDeclarationOnly": true,
+ "outDir": "build"
+ }
+}
diff --git a/packages/solidstart/vite.config.ts b/packages/solidstart/vite.config.ts
new file mode 100644
index 000000000000..1dfe27d70c66
--- /dev/null
+++ b/packages/solidstart/vite.config.ts
@@ -0,0 +1,14 @@
+import solidPlugin from 'vite-plugin-solid';
+import type { UserConfig } from 'vitest';
+import baseConfig from '../../vite/vite.config';
+
+export default {
+ ...baseConfig,
+ plugins: [solidPlugin({ hot: !process.env.VITEST })],
+ test: {
+ // test exists, no idea why TS doesn't recognize it
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
+ ...(baseConfig as UserConfig & { test: any }).test,
+ environment: 'jsdom',
+ },
+};
diff --git a/yarn.lock b/yarn.lock
index b8bf4eeeb15c..574ddba861e0 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -283,7 +283,7 @@
dependencies:
tslib "^2.3.0"
-"@antfu/utils@^0.7.7", "@antfu/utils@^0.7.8":
+"@antfu/utils@^0.7.6", "@antfu/utils@^0.7.7", "@antfu/utils@^0.7.8":
version "0.7.8"
resolved "https://registry.yarnpkg.com/@antfu/utils/-/utils-0.7.8.tgz#86cb0974bcab7e64e29b57d6d9021102307257de"
integrity sha512-rWQkqXRESdjXtc+7NRfK9lASQjpXJu1ayp7qi1d23zZorY+wBHVLHHoVcMsEnkqEBWTFqbztO7/QdJFzyEcLTg==
@@ -2083,7 +2083,7 @@
resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.23.0.tgz#da950e622420bf96ca0d0f2909cdddac3acd8719"
integrity sha512-vvPKKdMemU85V9WE/l5wZEmImpCtLqbnTvqDS2U1fJ96KrxoW7KrXhNsNCblQlg8Ck4b85yxdTyelsMUgFUXiw==
-"@babel/parser@^7.22.7", "@babel/parser@^7.23.9", "@babel/parser@^7.24.6", "@babel/parser@^7.24.7":
+"@babel/parser@^7.22.16", "@babel/parser@^7.22.7", "@babel/parser@^7.23.5", "@babel/parser@^7.23.9", "@babel/parser@^7.24.6", "@babel/parser@^7.24.7":
version "7.24.7"
resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.24.7.tgz#9a5226f92f0c5c8ead550b750f5608e766c8ce85"
integrity sha512-9uUYRm6OqQrCqQdG1iCBwBPZgN8ciDBro2nIOFaiRz1/BCxaI7CNvQbDHvsArAC7Tw9Hda/B3U+6ui9u4HWXPw==
@@ -3751,6 +3751,15 @@
"@babel/helper-validator-identifier" "^7.22.20"
to-fast-properties "^2.0.0"
+"@babel/types@^7.22.17", "@babel/types@^7.23.9", "@babel/types@^7.24.5", "@babel/types@^7.24.7":
+ version "7.24.7"
+ resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.24.7.tgz#6027fe12bc1aa724cd32ab113fb7f1988f1f66f2"
+ integrity sha512-XEFXSlxiG5td2EJRe8vOmRbaXVgfcBlszKujvVmWIK/UpywWljQCfzAv3RQCGujWQ1RD4YYWEAqDXfuJiy8f5Q==
+ dependencies:
+ "@babel/helper-string-parser" "^7.24.7"
+ "@babel/helper-validator-identifier" "^7.24.7"
+ to-fast-properties "^2.0.0"
+
"@babel/types@^7.22.19", "@babel/types@^7.24.0":
version "7.24.0"
resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.24.0.tgz#3b951f435a92e7333eba05b7566fd297960ea1bf"
@@ -3769,15 +3778,6 @@
"@babel/helper-validator-identifier" "^7.22.20"
to-fast-properties "^2.0.0"
-"@babel/types@^7.23.9", "@babel/types@^7.24.5", "@babel/types@^7.24.7":
- version "7.24.7"
- resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.24.7.tgz#6027fe12bc1aa724cd32ab113fb7f1988f1f66f2"
- integrity sha512-XEFXSlxiG5td2EJRe8vOmRbaXVgfcBlszKujvVmWIK/UpywWljQCfzAv3RQCGujWQ1RD4YYWEAqDXfuJiy8f5Q==
- dependencies:
- "@babel/helper-string-parser" "^7.24.7"
- "@babel/helper-validator-identifier" "^7.24.7"
- to-fast-properties "^2.0.0"
-
"@bcoe/v8-coverage@^0.2.3":
version "0.2.3"
resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39"
@@ -6777,6 +6777,20 @@
dependencies:
"@opentelemetry/api" "^1.0.0"
+"@opentelemetry/api-logs@0.51.1":
+ version "0.51.1"
+ resolved "https://registry.yarnpkg.com/@opentelemetry/api-logs/-/api-logs-0.51.1.tgz#ded1874c04516c2b8cb24828eef3d6c3d1f75343"
+ integrity sha512-E3skn949Pk1z2XtXu/lxf6QAZpawuTM/IUEXcAzpiUkTd73Hmvw26FiN3cJuTmkpM5hZzHwkomVdtrh/n/zzwA==
+ dependencies:
+ "@opentelemetry/api" "^1.0.0"
+
+"@opentelemetry/api-logs@0.52.0":
+ version "0.52.0"
+ resolved "https://registry.yarnpkg.com/@opentelemetry/api-logs/-/api-logs-0.52.0.tgz#b117c1fc6fc457249739bbe21571cefc55e5092c"
+ integrity sha512-HxjD7xH9iAE4OyhNaaSec65i1H6QZYBWSwWkowFfsc5YAcDvJG30/J1sRKXEQqdmUcKTXEAnA66UciqZha/4+Q==
+ dependencies:
+ "@opentelemetry/api" "^1.0.0"
+
"@opentelemetry/api-logs@0.52.1":
version "0.52.1"
resolved "https://registry.yarnpkg.com/@opentelemetry/api-logs/-/api-logs-0.52.1.tgz#52906375da4d64c206b0c4cb8ffa209214654ecc"
@@ -6796,7 +6810,7 @@
resolved "https://registry.yarnpkg.com/@opentelemetry/api/-/api-1.9.0.tgz#d03eba68273dc0f7509e2a3d5cba21eae10379fe"
integrity sha512-3giAOQvZiH5F9bMlMiv8+GSPMeqg0dbaeo58/0SlA9sxSqZhnUtxzX9/2FzyhS9sWQf5S0GJE0AKBrFqjpeYcg==
-"@opentelemetry/context-async-hooks@^1.25.1":
+"@opentelemetry/context-async-hooks@^1.25.0", "@opentelemetry/context-async-hooks@^1.25.1":
version "1.25.1"
resolved "https://registry.yarnpkg.com/@opentelemetry/context-async-hooks/-/context-async-hooks-1.25.1.tgz#810bff2fcab84ec51f4684aff2d21f6c057d9e73"
integrity sha512-UW/ge9zjvAEmRWVapOP0qyCvPulWU6cQxGxDbWEFfGOj1VBBZAuOqTo3X6yWmDTD3Xe15ysCZChHncr2xFMIfQ==
@@ -6827,7 +6841,7 @@
dependencies:
"@opentelemetry/semantic-conventions" "1.25.0"
-"@opentelemetry/core@1.25.1", "@opentelemetry/core@^1.23.0", "@opentelemetry/core@^1.25.1":
+"@opentelemetry/core@1.25.1", "@opentelemetry/core@^1.23.0", "@opentelemetry/core@^1.25.0", "@opentelemetry/core@^1.25.1":
version "1.25.1"
resolved "https://registry.yarnpkg.com/@opentelemetry/core/-/core-1.25.1.tgz#ff667d939d128adfc7c793edae2f6bca177f829d"
integrity sha512-GeT/l6rBYWVQ4XArluLVB6WWQ8flHbdb6r2FCHC3smtdOAbrJBIv35tpV/yp9bmYUJf+xmZpu9DRTIeJVhFbEQ==
@@ -6908,6 +6922,16 @@
"@opentelemetry/instrumentation" "^0.52.0"
"@opentelemetry/semantic-conventions" "^1.22.0"
+"@opentelemetry/instrumentation-http@0.52.0":
+ version "0.52.0"
+ resolved "https://registry.yarnpkg.com/@opentelemetry/instrumentation-http/-/instrumentation-http-0.52.0.tgz#a2fd280a493591d2cf4db534253ca406580569f7"
+ integrity sha512-E6ywZuxTa4LnVXZGwL1oj3e2Eog1yIaNqa8KjKXoGkDNKte9/SjQnePXOmhQYI0A9nf0UyFbP9aKd+yHrkJXUA==
+ dependencies:
+ "@opentelemetry/core" "1.25.0"
+ "@opentelemetry/instrumentation" "0.52.0"
+ "@opentelemetry/semantic-conventions" "1.25.0"
+ semver "^7.5.2"
+
"@opentelemetry/instrumentation-http@0.52.1":
version "0.52.1"
resolved "https://registry.yarnpkg.com/@opentelemetry/instrumentation-http/-/instrumentation-http-0.52.1.tgz#12061501601838d1c912f9c29bdd40a13a7e44cf"
@@ -7002,6 +7026,18 @@
"@opentelemetry/redis-common" "^0.36.2"
"@opentelemetry/semantic-conventions" "^1.22.0"
+"@opentelemetry/instrumentation@0.52.0":
+ version "0.52.0"
+ resolved "https://registry.yarnpkg.com/@opentelemetry/instrumentation/-/instrumentation-0.52.0.tgz#f8b790bfb1c61c27e0ba846bc6d0e377da195d1e"
+ integrity sha512-LPwSIrw+60cheWaXsfGL8stBap/AppKQJFE+qqRvzYrgttXFH2ofoIMxWadeqPTq4BYOXM/C7Bdh/T+B60xnlQ==
+ dependencies:
+ "@opentelemetry/api-logs" "0.52.0"
+ "@types/shimmer" "^1.0.2"
+ import-in-the-middle "1.8.0"
+ require-in-the-middle "^7.1.1"
+ semver "^7.5.2"
+ shimmer "^1.2.1"
+
"@opentelemetry/instrumentation@0.52.1", "@opentelemetry/instrumentation@^0.49 || ^0.50 || ^0.51 || ^0.52.0", "@opentelemetry/instrumentation@^0.52.0", "@opentelemetry/instrumentation@^0.52.1":
version "0.52.1"
resolved "https://registry.yarnpkg.com/@opentelemetry/instrumentation/-/instrumentation-0.52.1.tgz#2e7e46a38bd7afbf03cf688c862b0b43418b7f48"
@@ -7025,6 +7061,18 @@
semver "^7.5.2"
shimmer "^1.2.1"
+"@opentelemetry/instrumentation@^0.49 || ^0.50 || ^0.51":
+ version "0.51.1"
+ resolved "https://registry.yarnpkg.com/@opentelemetry/instrumentation/-/instrumentation-0.51.1.tgz#46fb2291150ec6923e50b2f094b9407bc726ca9b"
+ integrity sha512-JIrvhpgqY6437QIqToyozrUG1h5UhwHkaGK/WAX+fkrpyPtc+RO5FkRtUd9BH0MibabHHvqsnBGKfKVijbmp8w==
+ dependencies:
+ "@opentelemetry/api-logs" "0.51.1"
+ "@types/shimmer" "^1.0.2"
+ import-in-the-middle "1.7.4"
+ require-in-the-middle "^7.1.1"
+ semver "^7.5.2"
+ shimmer "^1.2.1"
+
"@opentelemetry/otlp-transformer@^0.50.0":
version "0.50.0"
resolved "https://registry.yarnpkg.com/@opentelemetry/otlp-transformer/-/otlp-transformer-0.50.0.tgz#211fe512fcce9d76042680f955336dbde3be03ef"
@@ -7078,7 +7126,7 @@
"@opentelemetry/core" "1.25.0"
"@opentelemetry/semantic-conventions" "1.25.0"
-"@opentelemetry/resources@1.25.1", "@opentelemetry/resources@^1.23.0", "@opentelemetry/resources@^1.25.1":
+"@opentelemetry/resources@1.25.1", "@opentelemetry/resources@^1.23.0", "@opentelemetry/resources@^1.25.0", "@opentelemetry/resources@^1.25.1":
version "1.25.1"
resolved "https://registry.yarnpkg.com/@opentelemetry/resources/-/resources-1.25.1.tgz#bb9a674af25a1a6c30840b755bc69da2796fefbb"
integrity sha512-pkZT+iFYIZsVn6+GzM0kSX+u3MSLCY9md+lIJOoKl/P+gJFfxJte/60Usdp8Ce4rOs8GduUpSPNe1ddGyDT1sQ==
@@ -7138,7 +7186,7 @@
"@opentelemetry/resources" "1.24.1"
"@opentelemetry/semantic-conventions" "1.24.1"
-"@opentelemetry/sdk-trace-base@^1.23.0", "@opentelemetry/sdk-trace-base@^1.25.1":
+"@opentelemetry/sdk-trace-base@^1.23.0", "@opentelemetry/sdk-trace-base@^1.25.0", "@opentelemetry/sdk-trace-base@^1.25.1":
version "1.25.1"
resolved "https://registry.yarnpkg.com/@opentelemetry/sdk-trace-base/-/sdk-trace-base-1.25.1.tgz#cbc1e60af255655d2020aa14cde17b37bd13df37"
integrity sha512-C8k4hnEbc5FamuZQ92nTOp8X/diCY56XUTnMiv9UTuJitCzaNNHAVsdm5+HLCdI8SLQsLWIrG38tddMxLVoftw==
@@ -7162,7 +7210,7 @@
resolved "https://registry.yarnpkg.com/@opentelemetry/semantic-conventions/-/semantic-conventions-1.25.0.tgz#390eb4d42a29c66bdc30066af9035645e9bb7270"
integrity sha512-M+kkXKRAIAiAP6qYyesfrC5TOmDpDVtsxuGfPcqd9B/iBrac+E14jYwrgm0yZBUIbIP2OnqC3j+UgkXLm1vxUQ==
-"@opentelemetry/semantic-conventions@1.25.1", "@opentelemetry/semantic-conventions@^1.25.1":
+"@opentelemetry/semantic-conventions@1.25.1", "@opentelemetry/semantic-conventions@^1.25.0", "@opentelemetry/semantic-conventions@^1.25.1":
version "1.25.1"
resolved "https://registry.yarnpkg.com/@opentelemetry/semantic-conventions/-/semantic-conventions-1.25.1.tgz#0deecb386197c5e9c2c28f2f89f51fb8ae9f145e"
integrity sha512-ZDjMJJQRlyk8A1KZFCc+bCbsyrn1wTwdNt56F7twdfUfnHUZUq77/WfONCj8p72NZOyP7pNTdUWSTYC3GTbuuQ==
@@ -7317,6 +7365,15 @@
resolved "https://registry.yarnpkg.com/@prisma/client/-/client-5.9.1.tgz#d92bd2f7f006e0316cb4fda9d73f235965cf2c64"
integrity sha512-caSOnG4kxcSkhqC/2ShV7rEoWwd3XrftokxJqOCMVvia4NYV/TPtJlS9C2os3Igxw/Qyxumj9GBQzcStzECvtQ==
+"@prisma/instrumentation@5.15.0":
+ version "5.15.0"
+ resolved "https://registry.yarnpkg.com/@prisma/instrumentation/-/instrumentation-5.15.0.tgz#9ec061b35761579ffa896bdf19c6a0bf53247593"
+ integrity sha512-fCWOOOajTKOUEp43gRmBqwt6oN9bPJcLiloi2OG/2ED0N5z62Cuza6FDrlm3SJHQAXYlXqLE0HLdEE5WcUkOzg==
+ dependencies:
+ "@opentelemetry/api" "^1.8"
+ "@opentelemetry/instrumentation" "^0.49 || ^0.50 || ^0.51"
+ "@opentelemetry/sdk-trace-base" "^1.22"
+
"@prisma/instrumentation@5.16.0":
version "5.16.0"
resolved "https://registry.yarnpkg.com/@prisma/instrumentation/-/instrumentation-5.16.0.tgz#ee50f851945364c43e4067b84fe4071235ca3dd2"
@@ -7672,7 +7729,7 @@
estree-walker "^2.0.2"
picomatch "^2.3.1"
-"@rollup/pluginutils@^5.0.2", "@rollup/pluginutils@^5.0.3", "@rollup/pluginutils@^5.0.4", "@rollup/pluginutils@^5.1.0":
+"@rollup/pluginutils@^5.0.2", "@rollup/pluginutils@^5.0.3", "@rollup/pluginutils@^5.0.4", "@rollup/pluginutils@^5.0.5", "@rollup/pluginutils@^5.1.0":
version "5.1.0"
resolved "https://registry.yarnpkg.com/@rollup/pluginutils/-/pluginutils-5.1.0.tgz#7e53eddc8c7f483a4ad0b94afb1f7f5fd3c771e0"
integrity sha512-XTIWOPPcpvyKI6L1NHo0lFlCyznUEyPmPY1mc3KpPVDYulHSTvyeLNVW00QTLIAFNhR3kYnJTQHeGqU4M3n09g==
@@ -7900,6 +7957,44 @@
"@angular-devkit/schematics" "14.2.13"
jsonc-parser "3.1.0"
+"@sentry-internal/browser-utils@8.11.0":
+ version "8.11.0"
+ resolved "https://registry.yarnpkg.com/@sentry-internal/browser-utils/-/browser-utils-8.11.0.tgz#ee73594bde569608b0dd0c8aa499f8497dbb0f53"
+ integrity sha512-PCnmzeLm7eTdMleVWa1jbdNcB6M5R17CSX8oQF6A/5a2w9qW6HbjEwK6X4yc9MzsFXFaTNekvPQLMRhIE1MgpA==
+ dependencies:
+ "@sentry/core" "8.11.0"
+ "@sentry/types" "8.11.0"
+ "@sentry/utils" "8.11.0"
+
+"@sentry-internal/feedback@8.11.0":
+ version "8.11.0"
+ resolved "https://registry.yarnpkg.com/@sentry-internal/feedback/-/feedback-8.11.0.tgz#72bfa11678dfa19857a3cf6943a05f0ddb72f12d"
+ integrity sha512-cMiFAuHP4jXCqWD7/UA5cvl0ee3hN5klAWTDVCZutnZ30pbUurg+nIggYBcaxdtLlqW6BCwyVs2nb/OB75CCSQ==
+ dependencies:
+ "@sentry/core" "8.11.0"
+ "@sentry/types" "8.11.0"
+ "@sentry/utils" "8.11.0"
+
+"@sentry-internal/replay-canvas@8.11.0":
+ version "8.11.0"
+ resolved "https://registry.yarnpkg.com/@sentry-internal/replay-canvas/-/replay-canvas-8.11.0.tgz#c01c1385c426a39189bec151a74bc173b6068a4b"
+ integrity sha512-SrBFI0vwyeyUjibCbYfxzCNMd07QMDNoi+0SYzhBagp6ALbU8r/pa02JRsnr//qhZt2NOM6S2kks9e2VHr6hYg==
+ dependencies:
+ "@sentry-internal/replay" "8.11.0"
+ "@sentry/core" "8.11.0"
+ "@sentry/types" "8.11.0"
+ "@sentry/utils" "8.11.0"
+
+"@sentry-internal/replay@8.11.0":
+ version "8.11.0"
+ resolved "https://registry.yarnpkg.com/@sentry-internal/replay/-/replay-8.11.0.tgz#58c923fbae32204ad32e1e99c01c4040c1e06b2f"
+ integrity sha512-NyuHW1Ds2GGW6PjN7nnRl/XoM31Y/BUnOhhLbNmbxWj5mgWuUP/7tOlz2PhP0YqZxVteZ99QIssfSRgtYOeQlg==
+ dependencies:
+ "@sentry-internal/browser-utils" "8.11.0"
+ "@sentry/core" "8.11.0"
+ "@sentry/types" "8.11.0"
+ "@sentry/utils" "8.11.0"
+
"@sentry-internal/rrdom@2.11.0":
version "2.11.0"
resolved "https://registry.yarnpkg.com/@sentry-internal/rrdom/-/rrdom-2.11.0.tgz#f7c8f54705ad84ece0e97e53f12e87c687749b32"
@@ -7971,11 +8066,29 @@
resolved "https://registry.yarnpkg.com/@sentry/babel-plugin-component-annotate/-/babel-plugin-component-annotate-2.16.0.tgz#c831713b85516fb3f9da2985836ddf444dc634e6"
integrity sha512-+uy1qPkA5MSNgJ0L9ur/vNTydfdHwHnBX2RQ+0thsvkqf90fU788YjkkXwUiBBNuqNyI69JiOW6frixAWy7oUg==
+"@sentry/babel-plugin-component-annotate@2.19.0":
+ version "2.19.0"
+ resolved "https://registry.yarnpkg.com/@sentry/babel-plugin-component-annotate/-/babel-plugin-component-annotate-2.19.0.tgz#70dcccb336bcec24148e1c9cd4e37724cebf5673"
+ integrity sha512-N2k8cMYu/7X6mzAH5j6bMeNcXQBJLL0lVAF63TDS57hUiT1v2uEqbeYFdH2CZBHb2LepLbMRXmvErIwy76FLTw==
+
"@sentry/babel-plugin-component-annotate@2.20.1":
version "2.20.1"
resolved "https://registry.yarnpkg.com/@sentry/babel-plugin-component-annotate/-/babel-plugin-component-annotate-2.20.1.tgz#204c63ed006a048f48f633876e1b8bacf87a9722"
integrity sha512-4mhEwYTK00bIb5Y9UWIELVUfru587Vaeg0DQGswv4aIRHIiMKLyNqCEejaaybQ/fNChIZOKmvyqXk430YVd7Qg==
+"@sentry/browser@8.11.0":
+ version "8.11.0"
+ resolved "https://registry.yarnpkg.com/@sentry/browser/-/browser-8.11.0.tgz#9e0282a9136d138c8b6c001f0ac9face9a9ce18b"
+ integrity sha512-++5IrBpzkaAptNjAYnGTnQ2lCjmU6nlu/ABFjUTgi7Vu+ZNiY8qYKEUw65mSxD3EoFLt8IwtjvfAwSMVTB2q8w==
+ dependencies:
+ "@sentry-internal/browser-utils" "8.11.0"
+ "@sentry-internal/feedback" "8.11.0"
+ "@sentry-internal/replay" "8.11.0"
+ "@sentry-internal/replay-canvas" "8.11.0"
+ "@sentry/core" "8.11.0"
+ "@sentry/types" "8.11.0"
+ "@sentry/utils" "8.11.0"
+
"@sentry/bundler-plugin-core@2.16.0":
version "2.16.0"
resolved "https://registry.yarnpkg.com/@sentry/bundler-plugin-core/-/bundler-plugin-core-2.16.0.tgz#0c33e7a054fb56e43bd160ac141f71dfebf6dda5"
@@ -7990,6 +8103,20 @@
magic-string "0.27.0"
unplugin "1.0.1"
+"@sentry/bundler-plugin-core@2.19.0":
+ version "2.19.0"
+ resolved "https://registry.yarnpkg.com/@sentry/bundler-plugin-core/-/bundler-plugin-core-2.19.0.tgz#c21935ff5aea9daccfa4c9e0db405aecdec292f6"
+ integrity sha512-PGTwpue2k4HnLlCuvLeg+cILPWHJorzheNq8KVlXed8mpb8kxKeY9EWQFxBqPS+XyktOMAxZmCMZfKdnHNaJVQ==
+ dependencies:
+ "@babel/core" "^7.18.5"
+ "@sentry/babel-plugin-component-annotate" "2.19.0"
+ "@sentry/cli" "^2.22.3"
+ dotenv "^16.3.1"
+ find-up "^5.0.0"
+ glob "^9.3.2"
+ magic-string "0.30.8"
+ unplugin "1.0.1"
+
"@sentry/bundler-plugin-core@2.20.1":
version "2.20.1"
resolved "https://registry.yarnpkg.com/@sentry/bundler-plugin-core/-/bundler-plugin-core-2.20.1.tgz#c9dd35e2177a4c22ecf675558eb84fbc2607e465"
@@ -8058,6 +8185,88 @@
"@sentry/cli-win32-i686" "2.32.1"
"@sentry/cli-win32-x64" "2.32.1"
+"@sentry/core@8.11.0":
+ version "8.11.0"
+ resolved "https://registry.yarnpkg.com/@sentry/core/-/core-8.11.0.tgz#bd78d9b598b6658ad18c8e0457fdffcd5f95b51e"
+ integrity sha512-rZaM55j5Fw0IGb8lNXOTVoq7WR6JmUzm9x5cURGsjL9gzAurGl817oK3iyOvYQ3JZnfijjh0QF0SQr4NZHKbIg==
+ dependencies:
+ "@sentry/types" "8.11.0"
+ "@sentry/utils" "8.11.0"
+
+"@sentry/node@8.11.0":
+ version "8.11.0"
+ resolved "https://registry.yarnpkg.com/@sentry/node/-/node-8.11.0.tgz#773a25cf9f10dda7f39357bc9a94294aa301150c"
+ integrity sha512-hvPa2aUz1NAJ5AEcXVbll7ZM0LFgfYCvNBn6ZWb7d+segv/vbGwusTT1Xs7OlbF0UrNAx6rX5BJSAjQXQ2dlHg==
+ dependencies:
+ "@opentelemetry/api" "^1.9.0"
+ "@opentelemetry/context-async-hooks" "^1.25.0"
+ "@opentelemetry/core" "^1.25.0"
+ "@opentelemetry/instrumentation" "^0.52.0"
+ "@opentelemetry/instrumentation-connect" "0.37.0"
+ "@opentelemetry/instrumentation-express" "0.40.1"
+ "@opentelemetry/instrumentation-fastify" "0.37.0"
+ "@opentelemetry/instrumentation-graphql" "0.41.0"
+ "@opentelemetry/instrumentation-hapi" "0.39.0"
+ "@opentelemetry/instrumentation-http" "0.52.0"
+ "@opentelemetry/instrumentation-ioredis" "0.41.0"
+ "@opentelemetry/instrumentation-koa" "0.41.0"
+ "@opentelemetry/instrumentation-mongodb" "0.45.0"
+ "@opentelemetry/instrumentation-mongoose" "0.39.0"
+ "@opentelemetry/instrumentation-mysql" "0.39.0"
+ "@opentelemetry/instrumentation-mysql2" "0.39.0"
+ "@opentelemetry/instrumentation-nestjs-core" "0.38.0"
+ "@opentelemetry/instrumentation-pg" "0.42.0"
+ "@opentelemetry/instrumentation-redis-4" "0.40.0"
+ "@opentelemetry/resources" "^1.25.0"
+ "@opentelemetry/sdk-trace-base" "^1.25.0"
+ "@opentelemetry/semantic-conventions" "^1.25.0"
+ "@prisma/instrumentation" "5.15.0"
+ "@sentry/core" "8.11.0"
+ "@sentry/opentelemetry" "8.11.0"
+ "@sentry/types" "8.11.0"
+ "@sentry/utils" "8.11.0"
+ optionalDependencies:
+ opentelemetry-instrumentation-fetch-node "1.2.0"
+
+"@sentry/opentelemetry@8.11.0":
+ version "8.11.0"
+ resolved "https://registry.yarnpkg.com/@sentry/opentelemetry/-/opentelemetry-8.11.0.tgz#09d7f0aed6245b1fedddcad906c6d3a2255b7d87"
+ integrity sha512-OukaRoGNZbnCSN/neJGI72GwxpSZ0jg/44Rc8C//d8JKIFAZUn2in61k7fSbET0PSTKxw5erguvjcv/9BvLJOg==
+ dependencies:
+ "@sentry/core" "8.11.0"
+ "@sentry/types" "8.11.0"
+ "@sentry/utils" "8.11.0"
+
+"@sentry/solid@8.11.0":
+ version "8.11.0"
+ resolved "https://registry.yarnpkg.com/@sentry/solid/-/solid-8.11.0.tgz#a5b6eea83d198afe51d7e6c3c2181ee275af2398"
+ integrity sha512-0B3oM5DrehXVAgf+Po7T+MYYIDfK1JyWHQke3/eSB1zwHzke0H6Jxh2zNT72Xhl83UEBBtbeD0c4p/753sCRtg==
+ dependencies:
+ "@sentry/browser" "8.11.0"
+ "@sentry/core" "8.11.0"
+ "@sentry/types" "8.11.0"
+ "@sentry/utils" "8.11.0"
+
+"@sentry/types@8.11.0":
+ version "8.11.0"
+ resolved "https://registry.yarnpkg.com/@sentry/types/-/types-8.11.0.tgz#613da07f91d58ad5b460b95550e64aa6159ee97f"
+ integrity sha512-kz9/d2uw7wEXcK8DnCrCuMI75hZnpVAjYr8mq1uatltOx+2JOYPNdaK6ispxXlhb5KXOnVWNgfVDbGlLp0w+Gg==
+
+"@sentry/utils@8.11.0":
+ version "8.11.0"
+ resolved "https://registry.yarnpkg.com/@sentry/utils/-/utils-8.11.0.tgz#b8856db2c1cfc1835df8854cba20cea82f6c6e08"
+ integrity sha512-iDt5YVMYNgT151bPYVGo8XlpM0MHWy8DH+czmAiAlFTV7ns7lAeHGF6tsFYo7wOZOPDHxtF6F2CM7AvuYnOZGw==
+ dependencies:
+ "@sentry/types" "8.11.0"
+
+"@sentry/vite-plugin@2.19.0":
+ version "2.19.0"
+ resolved "https://registry.yarnpkg.com/@sentry/vite-plugin/-/vite-plugin-2.19.0.tgz#c7938fb13eee15036963b87d7b12c4fc851e488b"
+ integrity sha512-xmntz/bvRwhhU9q2thZas1vQQch9CLMyD8oCfYlNqN57t5XKhIs2dsCU/uS7HCnxIXuuUb/cZtIS7AXVg16fFA==
+ dependencies:
+ "@sentry/bundler-plugin-core" "2.19.0"
+ unplugin "1.0.1"
+
"@sentry/vite-plugin@2.20.1", "@sentry/vite-plugin@^2.20.1":
version "2.20.1"
resolved "https://registry.yarnpkg.com/@sentry/vite-plugin/-/vite-plugin-2.20.1.tgz#80d5639fca3f68fbf81c316883272ffb34dbc544"
@@ -8720,6 +8929,27 @@
resolved "https://registry.yarnpkg.com/@solidjs/router/-/router-0.13.6.tgz#210ca2761d4bf294f06ac0f9e25c16fafdabefac"
integrity sha512-CdpFsBYoiJ/FQ4wZIamj3KEFRkmrYu5sVXM6PouNkmSENta1YJamsm9wa/VjaPmkw2RsnDnO0UvZ705v6EgOXQ==
+"@solidjs/start@^1.0.0":
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/@solidjs/start/-/start-1.0.2.tgz#b1585e61e1ad32ecdf7310da20932a83d108576c"
+ integrity sha512-SRoFvSnL47O1hg4/Er2es2AVoOWRdGBm0C8h2KsHFjbiRe1r2AxsONHR9job+Hmzbl5icSaGmNoXoQ8qpTy4UA==
+ dependencies:
+ "@vinxi/plugin-directives" "^0.3.1"
+ "@vinxi/server-components" "^0.3.3"
+ "@vinxi/server-functions" "^0.3.2"
+ defu "^6.1.2"
+ error-stack-parser "^2.1.4"
+ glob "^10.3.10"
+ html-to-image "^1.11.11"
+ radix3 "^1.1.0"
+ seroval "^1.0.2"
+ seroval-plugins "^1.0.2"
+ shikiji "^0.9.12"
+ source-map-js "^1.0.2"
+ terracotta "^1.0.4"
+ vite-plugin-inspect "^0.7.33"
+ vite-plugin-solid "^2.10.2"
+
"@solidjs/testing-library@0.8.5":
version "0.8.5"
resolved "https://registry.yarnpkg.com/@solidjs/testing-library/-/testing-library-0.8.5.tgz#97061b2286d8641bd43bf474e624c3bb47e486a6"
@@ -10245,6 +10475,47 @@
node-gyp-build "^4.2.2"
resolve-from "^5.0.0"
+"@vinxi/plugin-directives@0.3.1", "@vinxi/plugin-directives@^0.3.1":
+ version "0.3.1"
+ resolved "https://registry.yarnpkg.com/@vinxi/plugin-directives/-/plugin-directives-0.3.1.tgz#cac2edb51108c2fc1f29cceb32e71b02b19ac1a7"
+ integrity sha512-4qz5WifjmJ864VS8Ik9nUG0wAkt/xIcxFpP29RXogGLgccRnceBpWQi+ghw5rm0F6LP/YMAhhO5iFORXclWd0Q==
+ dependencies:
+ "@babel/parser" "^7.23.5"
+ acorn "^8.10.0"
+ acorn-jsx "^5.3.2"
+ acorn-loose "^8.3.0"
+ acorn-typescript "^1.4.3"
+ astring "^1.8.6"
+ magicast "^0.2.10"
+ recast "^0.23.4"
+ tslib "^2.6.2"
+
+"@vinxi/server-components@^0.3.3":
+ version "0.3.3"
+ resolved "https://registry.yarnpkg.com/@vinxi/server-components/-/server-components-0.3.3.tgz#22f8be3fd30ac9d44938c013150fadcbff8b2b16"
+ integrity sha512-xaW92nj9HUMLyswPcCmsIXOsS3TJll0m9u3WEjWjLrtZWheHggina6+kTCSeltp/Qe8WlUfNU5G02Xy8L4xQxA==
+ dependencies:
+ "@vinxi/plugin-directives" "0.3.1"
+ acorn "^8.10.0"
+ acorn-loose "^8.3.0"
+ acorn-typescript "^1.4.3"
+ astring "^1.8.6"
+ magicast "^0.2.10"
+ recast "^0.23.4"
+
+"@vinxi/server-functions@^0.3.2":
+ version "0.3.3"
+ resolved "https://registry.yarnpkg.com/@vinxi/server-functions/-/server-functions-0.3.3.tgz#a50c73d23d9f0b03586fe0cf3552a8b3229b23b1"
+ integrity sha512-yUrHov1gc+NM/YCEOekM1DCdu2tNSH1/j0mZPyIOhPZH/yAZKWA+t3dP79Q3g4QLDHchf6xf8z9u1INEADTlXw==
+ dependencies:
+ "@vinxi/plugin-directives" "0.3.1"
+ acorn "^8.10.0"
+ acorn-loose "^8.3.0"
+ acorn-typescript "^1.4.3"
+ astring "^1.8.6"
+ magicast "^0.2.10"
+ recast "^0.23.4"
+
"@vitejs/plugin-vue-jsx@^4.0.0":
version "4.0.0"
resolved "https://registry.yarnpkg.com/@vitejs/plugin-vue-jsx/-/plugin-vue-jsx-4.0.0.tgz#7bb65d57153ebf63b2e6ab0cc81029e82206036c"
@@ -11258,6 +11529,23 @@ acorn-jsx@^5.3.1:
resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-5.3.1.tgz#fc8661e11b7ac1539c47dbfea2e72b3af34d267b"
integrity sha512-K0Ptm/47OKfQRpNQ2J/oIN/3QYiK6FwW+eJbILhsdxh2WTLdl+30o8aGdTbm5JbffpFFAg/g+zi1E+jvJha5ng==
+acorn-jsx@^5.3.2:
+ version "5.3.2"
+ resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-5.3.2.tgz#7ed5bb55908b3b2f1bc55c6af1653bada7f07937"
+ integrity sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==
+
+acorn-loose@^8.3.0:
+ version "8.4.0"
+ resolved "https://registry.yarnpkg.com/acorn-loose/-/acorn-loose-8.4.0.tgz#26d3e219756d1e180d006f5bcc8d261a28530f55"
+ integrity sha512-M0EUka6rb+QC4l9Z3T0nJEzNOO7JcoJlYMrBlyBCiFSXRyxjLKayd4TbQs2FDRWQU1h9FR7QVNHt+PEaoNL5rQ==
+ dependencies:
+ acorn "^8.11.0"
+
+acorn-typescript@^1.4.3:
+ version "1.4.13"
+ resolved "https://registry.yarnpkg.com/acorn-typescript/-/acorn-typescript-1.4.13.tgz#5f851c8bdda0aa716ffdd5f6ac084df8acc6f5ea"
+ integrity sha512-xsc9Xv0xlVfwp2o7sQ+GCQ1PgbkdcpWdTzrwXxO3xDMTAywVS3oXVOcOHuRjAPkS4P9b+yc/qNF15460v+jp4Q==
+
acorn-walk@^7.1.1:
version "7.2.0"
resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-7.2.0.tgz#0de889a601203909b0fbe07b8938dc21d2e967bc"
@@ -11273,7 +11561,7 @@ acorn-walk@^8.1.1:
resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-8.2.0.tgz#741210f2e2426454508853a2f44d0ab83b7f69c1"
integrity sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA==
-acorn@8.12.0, acorn@^8.6.0:
+acorn@8.12.0, acorn@^8.11.0, acorn@^8.6.0:
version "8.12.0"
resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.12.0.tgz#1627bfa2e058148036133b8d9b51a700663c294c"
integrity sha512-RTvkC4w+KNXrM39/lWCUaG0IbRkWdCv7W/IOW9oU6SawyxulvkQy5HQPVTKxEjczcUvapcrw3cFx/60VN/NRNw==
@@ -12034,6 +12322,11 @@ astral-regex@^2.0.0:
resolved "https://registry.yarnpkg.com/astral-regex/-/astral-regex-2.0.0.tgz#483143c567aeed4785759c0865786dc77d7d2e31"
integrity sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ==
+astring@^1.8.6:
+ version "1.8.6"
+ resolved "https://registry.yarnpkg.com/astring/-/astring-1.8.6.tgz#2c9c157cf1739d67561c56ba896e6948f6b93731"
+ integrity sha512-ISvCdHdlTDlH5IpxQJIex7BWBywFWgjJSVdwst+/iQCoEYnyOaQ95+X1JGshuBjGp6nxKUy1jMgE3zPqN7fQdg==
+
astro@^3.5.0:
version "3.5.0"
resolved "https://registry.yarnpkg.com/astro/-/astro-3.5.0.tgz#45f0852e9384dc997d4285b567c8a0ee89b58c9b"
@@ -12630,6 +12923,11 @@ before-after-hook@^2.2.0:
resolved "https://registry.yarnpkg.com/before-after-hook/-/before-after-hook-2.2.3.tgz#c51e809c81a4e354084422b9b26bad88249c517c"
integrity sha512-NzUnlZexiaH/46WDhANlyR2bXRopNg4F/zuSA3OpZnllCUgRaOF2znDioDWrmbNVsuZk6l9pMquQB38cfBZwkQ==
+big-integer@^1.6.44:
+ version "1.6.52"
+ resolved "https://registry.yarnpkg.com/big-integer/-/big-integer-1.6.52.tgz#60a887f3047614a8e1bffe5d7173490a97dc8c85"
+ integrity sha512-QxD8cf2eVqJOOz63z6JIN9BzvVs/dlySa5HGSBH5xtR8dPteIRQnBxxKqkNTiT6jbDTF6jAfrd4oMcND9RGbQg==
+
big.js@^5.2.2:
version "5.2.2"
resolved "https://registry.yarnpkg.com/big.js/-/big.js-5.2.2.tgz#65f0af382f578bcdc742bd9c281e9cb2d7768328"
@@ -12847,6 +13145,13 @@ boxen@^7.1.1:
widest-line "^4.0.1"
wrap-ansi "^8.1.0"
+bplist-parser@^0.2.0:
+ version "0.2.0"
+ resolved "https://registry.yarnpkg.com/bplist-parser/-/bplist-parser-0.2.0.tgz#43a9d183e5bf9d545200ceac3e712f79ebbe8d0e"
+ integrity sha512-z0M+byMThzQmD9NILRniCUXYsYpjwnlO8N5uCFaCqIOpqRsJCrQL9NK3JsD67CN5a08nF5oIL2bD6loTdHOuKw==
+ dependencies:
+ big-integer "^1.6.44"
+
brace-expansion@^1.1.7:
version "1.1.11"
resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd"
@@ -13594,6 +13899,13 @@ bun-types@latest:
resolved "https://registry.yarnpkg.com/bun-types/-/bun-types-1.0.1.tgz#8bcb10ae3a1548a39f0932fdb365f4b3a649efba"
integrity sha512-7NrXqhMIaNKmWn2dSWEQ50znMZqrN/5Z0NBMXvQTRu/+Y1CvoXRznFy0pnqLe024CeZgVdXoEpARNO1JZLAPGw==
+bundle-name@^3.0.0:
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/bundle-name/-/bundle-name-3.0.0.tgz#ba59bcc9ac785fb67ccdbf104a2bf60c099f0e1a"
+ integrity sha512-PKA4BeSvBpQKQ8iPOGCSiell+N8P+Tf1DlwqmYhpe2gAhKPHn8EYOxVT+ShuGmhg8lN8XiSlS80yiExKXrURlw==
+ dependencies:
+ run-applescript "^5.0.0"
+
bundle-name@^4.1.0:
version "4.1.0"
resolved "https://registry.yarnpkg.com/bundle-name/-/bundle-name-4.1.0.tgz#f3b96b34160d6431a19d7688135af7cfb8797889"
@@ -15517,11 +15829,29 @@ deepmerge@^4.2.2:
resolved "https://registry.yarnpkg.com/deepmerge/-/deepmerge-4.2.2.tgz#44d2ea3679b8f4d4ffba33f03d865fc1e7bf4955"
integrity sha512-FJ3UgI4gIl+PHZm53knsuSFpE+nESMr7M4v9QcgB7S63Kj/6WqMiFQJpBBYz1Pt+66bZpP3Q7Lye0Oo9MPKEdg==
+default-browser-id@^3.0.0:
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/default-browser-id/-/default-browser-id-3.0.0.tgz#bee7bbbef1f4e75d31f98f4d3f1556a14cea790c"
+ integrity sha512-OZ1y3y0SqSICtE8DE4S8YOE9UZOJ8wO16fKWVP5J1Qz42kV9jcnMVFrEE/noXb/ss3Q4pZIH79kxofzyNNtUNA==
+ dependencies:
+ bplist-parser "^0.2.0"
+ untildify "^4.0.0"
+
default-browser-id@^5.0.0:
version "5.0.0"
resolved "https://registry.yarnpkg.com/default-browser-id/-/default-browser-id-5.0.0.tgz#a1d98bf960c15082d8a3fa69e83150ccccc3af26"
integrity sha512-A6p/pu/6fyBcA1TRz/GqWYPViplrftcW2gZC9q79ngNCKAeR/X3gcEdXQHl4KNXV+3wgIJ1CPkJQ3IHM6lcsyA==
+default-browser@^4.0.0:
+ version "4.0.0"
+ resolved "https://registry.yarnpkg.com/default-browser/-/default-browser-4.0.0.tgz#53c9894f8810bf86696de117a6ce9085a3cbc7da"
+ integrity sha512-wX5pXO1+BrhMkSbROFsyxUm0i/cJEScyNhA4PPxc41ICuv05ZZB/MX28s8aZx6xjmatvebIapF6hLEKEcpneUA==
+ dependencies:
+ bundle-name "^3.0.0"
+ default-browser-id "^3.0.0"
+ execa "^7.1.1"
+ titleize "^3.0.0"
+
default-browser@^5.2.1:
version "5.2.1"
resolved "https://registry.yarnpkg.com/default-browser/-/default-browser-5.2.1.tgz#7b7ba61204ff3e425b556869ae6d3e9d9f1712cf"
@@ -17087,6 +17417,13 @@ error-stack-parser-es@^0.1.1:
resolved "https://registry.yarnpkg.com/error-stack-parser-es/-/error-stack-parser-es-0.1.4.tgz#b470e8fba110f70b8b39b748c985b436a6575659"
integrity sha512-l0uy0kAoo6toCgVOYaAayqtPa2a1L15efxUMEnQebKwLQX2X0OpS6wMMQdc4juJXmxd9i40DuaUHq+mjIya9TQ==
+error-stack-parser@^2.1.4:
+ version "2.1.4"
+ resolved "https://registry.yarnpkg.com/error-stack-parser/-/error-stack-parser-2.1.4.tgz#229cb01cdbfa84440bfa91876285b94680188286"
+ integrity sha512-Sk5V6wVazPhq5MhpO+AUxJn5x7XSXGl1R93Vn7i+zS15KDVxQijejNCrz8340/2bgLBjR9GtEG8ZVKONDjcqGQ==
+ dependencies:
+ stackframe "^1.3.4"
+
error@^7.0.0:
version "7.2.1"
resolved "https://registry.yarnpkg.com/error/-/error-7.2.1.tgz#eab21a4689b5f684fc83da84a0e390de82d94894"
@@ -18128,7 +18465,7 @@ execa@^5.0.0, execa@^5.1.1:
signal-exit "^3.0.3"
strip-final-newline "^2.0.0"
-execa@^7.2.0:
+execa@^7.1.1, execa@^7.2.0:
version "7.2.0"
resolved "https://registry.yarnpkg.com/execa/-/execa-7.2.0.tgz#657e75ba984f42a70f38928cedc87d6f2d4fe4e9"
integrity sha512-UduyVP7TLB5IcAQl+OzLyLcS/l32W/GLg+AhHJ+ow40FOk2U3SAllPwR44v4vmdFwIWqpdwxxpQbF1n5ta9seA==
@@ -20461,6 +20798,11 @@ html-tags@^3.3.1:
resolved "https://registry.yarnpkg.com/html-tags/-/html-tags-3.3.1.tgz#a04026a18c882e4bba8a01a3d39cfe465d40b5ce"
integrity sha512-ztqyC3kLto0e9WbNp0aeP+M3kTt+nbaIveGmUxAtZa+8iFgKLUOD4YKM5j+f3QD89bra7UeumolZHKuOXnTmeQ==
+html-to-image@^1.11.11:
+ version "1.11.11"
+ resolved "https://registry.yarnpkg.com/html-to-image/-/html-to-image-1.11.11.tgz#c0f8a34dc9e4b97b93ff7ea286eb8562642ebbea"
+ integrity sha512-9gux8QhvjRO/erSnDPv28noDZcPZmYE7e1vFsBLKLlRlKDSqNJYebj6Qz1TGd5lsRV+X+xYyjCKjuZdABinWjA==
+
html-void-elements@^2.0.0:
version "2.0.1"
resolved "https://registry.yarnpkg.com/html-void-elements/-/html-void-elements-2.0.1.tgz#29459b8b05c200b6c5ee98743c41b979d577549f"
@@ -20791,6 +21133,26 @@ import-in-the-middle@1.4.2:
cjs-module-lexer "^1.2.2"
module-details-from-path "^1.0.3"
+import-in-the-middle@1.7.4:
+ version "1.7.4"
+ resolved "https://registry.yarnpkg.com/import-in-the-middle/-/import-in-the-middle-1.7.4.tgz#508da6e91cfa84f210dcdb6c0a91ab0c9e8b3ebc"
+ integrity sha512-Lk+qzWmiQuRPPulGQeK5qq0v32k2bHnWrRPFgqyvhw7Kkov5L6MOLOIU3pcWeujc9W4q54Cp3Q2WV16eQkc7Bg==
+ dependencies:
+ acorn "^8.8.2"
+ acorn-import-attributes "^1.9.5"
+ cjs-module-lexer "^1.2.2"
+ module-details-from-path "^1.0.3"
+
+import-in-the-middle@1.8.0:
+ version "1.8.0"
+ resolved "https://registry.yarnpkg.com/import-in-the-middle/-/import-in-the-middle-1.8.0.tgz#c94d88d53701de9a248f9710b41f533e67f598a4"
+ integrity sha512-/xQjze8szLNnJ5rvHSzn+dcVXqCAU6Plbk4P24U/jwPmg1wy7IIp9OjKIO5tYue8GSPhDpPDiApQjvBUmWwhsQ==
+ dependencies:
+ acorn "^8.8.2"
+ acorn-import-attributes "^1.9.5"
+ cjs-module-lexer "^1.2.2"
+ module-details-from-path "^1.0.3"
+
import-in-the-middle@^1.8.1:
version "1.8.1"
resolved "https://registry.yarnpkg.com/import-in-the-middle/-/import-in-the-middle-1.8.1.tgz#8b51c2cc631b64e53e958d7048d2d9463ce628f8"
@@ -23689,6 +24051,15 @@ magicast@0.2.8:
"@babel/types" "^7.21.5"
recast "^0.23.2"
+magicast@^0.2.10:
+ version "0.2.11"
+ resolved "https://registry.yarnpkg.com/magicast/-/magicast-0.2.11.tgz#d5d9339ec59e5322cf331460d8e3db2f6585f5d5"
+ integrity sha512-6saXbRDA1HMkqbsvHOU6HBjCVgZT460qheRkLhJQHWAbhXoWESI3Kn/dGGXyKs15FFKR85jsUqFx2sMK0wy/5g==
+ dependencies:
+ "@babel/parser" "^7.22.16"
+ "@babel/types" "^7.22.17"
+ recast "^0.23.4"
+
magicast@^0.3.3, magicast@^0.3.4:
version "0.3.4"
resolved "https://registry.yarnpkg.com/magicast/-/magicast-0.3.4.tgz#bbda1791d03190a24b00ff3dd18151e7fd381d19"
@@ -26463,6 +26834,16 @@ open@^8.0.9:
is-docker "^2.1.1"
is-wsl "^2.2.0"
+open@^9.1.0:
+ version "9.1.0"
+ resolved "https://registry.yarnpkg.com/open/-/open-9.1.0.tgz#684934359c90ad25742f5a26151970ff8c6c80b6"
+ integrity sha512-OS+QTnw1/4vrf+9hh1jc1jnYjzSG4ttTBB8UxOwAnInG3Uo4ssetzC1ihqaIHjLJnA5GGlRl6QlZXOTQhRBUvg==
+ dependencies:
+ default-browser "^4.0.0"
+ define-lazy-prop "^3.0.0"
+ is-inside-container "^1.0.0"
+ is-wsl "^2.2.0"
+
openapi-typescript@^6.7.5:
version "6.7.6"
resolved "https://registry.yarnpkg.com/openapi-typescript/-/openapi-typescript-6.7.6.tgz#4f387199203bd7bfb94545cbc613751b52e3fa37"
@@ -28697,7 +29078,7 @@ quote-unquote@^1.0.0:
resolved "https://registry.yarnpkg.com/quote-unquote/-/quote-unquote-1.0.0.tgz#67a9a77148effeaf81a4d428404a710baaac8a0b"
integrity sha512-twwRO/ilhlG/FIgYeKGFqyHhoEhqgnKVkcmqMKi2r524gz3ZbDTcyFt38E9xjJI2vT+KbRNHVbnJ/e0I25Azwg==
-radix3@^1.1.2:
+radix3@^1.1.0, radix3@^1.1.2:
version "1.1.2"
resolved "https://registry.yarnpkg.com/radix3/-/radix3-1.1.2.tgz#fd27d2af3896c6bf4bcdfab6427c69c2afc69ec0"
integrity sha512-b484I/7b8rDEdSDKckSSBA8knMpcdsXudlE/LNL639wFoHKwLbEkQFZHWEYwDC0wa0FKUcCY+GAF73Z7wxNVFA==
@@ -29106,6 +29487,17 @@ recast@^0.23.2:
source-map "~0.6.1"
tslib "^2.0.1"
+recast@^0.23.4:
+ version "0.23.9"
+ resolved "https://registry.yarnpkg.com/recast/-/recast-0.23.9.tgz#587c5d3a77c2cfcb0c18ccce6da4361528c2587b"
+ integrity sha512-Hx/BGIbwj+Des3+xy5uAtAbdCyqK9y9wbBcDFDYanLS9JnMqf7OeF87HQwUimE87OEc72mr6tkKUKMBBL+hF9Q==
+ dependencies:
+ ast-types "^0.16.1"
+ esprima "~4.0.0"
+ source-map "~0.6.1"
+ tiny-invariant "^1.3.3"
+ tslib "^2.0.1"
+
rechoir@^0.6.2:
version "0.6.2"
resolved "https://registry.yarnpkg.com/rechoir/-/rechoir-0.6.2.tgz#85204b54dba82d5742e28c96756ef43af50e3384"
@@ -29968,6 +30360,13 @@ rsvp@~3.2.1:
resolved "https://registry.yarnpkg.com/rsvp/-/rsvp-3.2.1.tgz#07cb4a5df25add9e826ebc67dcc9fd89db27d84a"
integrity sha1-B8tKXfJa3Z6Cbrxn3Mn9idsn2Eo=
+run-applescript@^5.0.0:
+ version "5.0.0"
+ resolved "https://registry.yarnpkg.com/run-applescript/-/run-applescript-5.0.0.tgz#e11e1c932e055d5c6b40d98374e0268d9b11899c"
+ integrity sha512-XcT5rBksx1QdIhlFOCtgZkB99ZEouFZ1E2Kc2LHqNW13U3/74YGdkQRmThTwxy4QIyookibDKYZOPqX//6BlAg==
+ dependencies:
+ execa "^5.0.0"
+
run-applescript@^7.0.0:
version "7.0.0"
resolved "https://registry.yarnpkg.com/run-applescript/-/run-applescript-7.0.0.tgz#e5a553c2bffd620e169d276c1cd8f1b64778fbeb"
@@ -30323,12 +30722,12 @@ serialize-javascript@^6.0.1:
dependencies:
randombytes "^2.1.0"
-seroval-plugins@^1.0.3:
+seroval-plugins@^1.0.2, seroval-plugins@^1.0.3:
version "1.0.7"
resolved "https://registry.yarnpkg.com/seroval-plugins/-/seroval-plugins-1.0.7.tgz#c02511a1807e9bc8f68a91fbec13474fa9cea670"
integrity sha512-GO7TkWvodGp6buMEX9p7tNyIkbwlyuAWbI6G9Ec5bhcm7mQdu3JOK1IXbEUwb3FVzSc363GraG/wLW23NSavIw==
-seroval@^1.0.4:
+seroval@^1.0.2, seroval@^1.0.4:
version "1.0.7"
resolved "https://registry.yarnpkg.com/seroval/-/seroval-1.0.7.tgz#ee48ad8ba69f1595bdd5c55d1a0d1da29dee7455"
integrity sha512-n6ZMQX5q0Vn19Zq7CIKNIo7E75gPkGCFUEqDpa8jgwpYr/vScjqnQ6H09t1uIiZ0ZSK0ypEGvrYK2bhBGWsGdw==
@@ -30514,6 +30913,11 @@ shiki@1.3.0:
dependencies:
"@shikijs/core" "1.3.0"
+shikiji-core@0.9.19:
+ version "0.9.19"
+ resolved "https://registry.yarnpkg.com/shikiji-core/-/shikiji-core-0.9.19.tgz#227975e998eb2a579cf83de30977762be3802507"
+ integrity sha512-AFJu/vcNT21t0e6YrfadZ+9q86gvPum6iywRyt1OtIPjPFe25RQnYJyxHQPMLKCCWA992TPxmEmbNcOZCAJclw==
+
shikiji@^0.6.8:
version "0.6.12"
resolved "https://registry.yarnpkg.com/shikiji/-/shikiji-0.6.12.tgz#2cd28f32380337ef2117cdd5328f868a31e6c416"
@@ -30521,6 +30925,13 @@ shikiji@^0.6.8:
dependencies:
hast-util-to-html "^9.0.0"
+shikiji@^0.9.12:
+ version "0.9.19"
+ resolved "https://registry.yarnpkg.com/shikiji/-/shikiji-0.9.19.tgz#351a32b291a04cf9a6b69933f8044fe135b70f6f"
+ integrity sha512-Kw2NHWktdcdypCj1GkKpXH4o6Vxz8B8TykPlPuLHOGSV8VkhoCLcFOH4k19K4LXAQYRQmxg+0X/eM+m2sLhAkg==
+ dependencies:
+ shikiji-core "0.9.19"
+
shimmer@^1.2.1:
version "1.2.1"
resolved "https://registry.yarnpkg.com/shimmer/-/shimmer-1.2.1.tgz#610859f7de327b587efebf501fb43117f9aff337"
@@ -30854,6 +31265,11 @@ solid-refresh@^0.6.3:
"@babel/helper-module-imports" "^7.22.15"
"@babel/types" "^7.23.6"
+solid-use@^0.8.0:
+ version "0.8.0"
+ resolved "https://registry.yarnpkg.com/solid-use/-/solid-use-0.8.0.tgz#d46258c45edb0f4c621285e0ad1aa6b6a674d79b"
+ integrity sha512-YX+XmcKLvSx3bwMimMhFy40ZkDnShnUcEw6cW6fSscwKEgl1TG3GlgAvkBmQ3AeWjvQSd8+HGTr82ImsrjkkqA==
+
sorcery@0.11.0:
version "0.11.0"
resolved "https://registry.yarnpkg.com/sorcery/-/sorcery-0.11.0.tgz#310c80ee993433854bb55bb9aa4003acd147fca8"
@@ -31203,6 +31619,11 @@ stackback@0.0.2:
resolved "https://registry.yarnpkg.com/stackback/-/stackback-0.0.2.tgz#1ac8a0d9483848d1695e418b6d031a3c3ce68e3b"
integrity sha512-1XMJE5fQo1jGH6Y/7ebnwPOBEkIEnT4QF32d5R1+VXdXveM0IBMJt8zfaxX1P3QhVwrYe+576+jkANtSS2mBbw==
+stackframe@^1.3.4:
+ version "1.3.4"
+ resolved "https://registry.yarnpkg.com/stackframe/-/stackframe-1.3.4.tgz#b881a004c8c149a5e8efef37d51b16e412943310"
+ integrity sha512-oeVtt7eWQS+Na6F//S4kJ2K2VbRlS9D43mAlMyVpVWovy9o+jfgH8O9agzANzaiLjclA0oYzUXEM4PurhSUChw==
+
stacktrace-parser@^0.1.10:
version "0.1.10"
resolved "https://registry.yarnpkg.com/stacktrace-parser/-/stacktrace-parser-0.1.10.tgz#29fb0cae4e0d0b85155879402857a1639eb6051a"
@@ -31972,6 +32393,13 @@ terminal-link@^2.0.0:
ansi-escapes "^4.2.1"
supports-hyperlinks "^2.0.0"
+terracotta@^1.0.4:
+ version "1.0.5"
+ resolved "https://registry.yarnpkg.com/terracotta/-/terracotta-1.0.5.tgz#633d3aa630f686f383e2577d156c14d261f7eb4c"
+ integrity sha512-4jkpXGKemeWjsBGDoBK1tnovGfIEMM8+Fa99T0TD4VYUaZq6hXHEWMfHshxy1h+DzsanDAwSBIBM0NnOohzijw==
+ dependencies:
+ solid-use "^0.8.0"
+
terser-webpack-plugin@^1.4.3:
version "1.4.5"
resolved "https://registry.yarnpkg.com/terser-webpack-plugin/-/terser-webpack-plugin-1.4.5.tgz#a217aefaea330e734ffacb6120ec1fa312d6040b"
@@ -32186,7 +32614,7 @@ tiny-invariant@^1.0.2:
resolved "https://registry.yarnpkg.com/tiny-invariant/-/tiny-invariant-1.1.0.tgz#634c5f8efdc27714b7f386c35e6760991d230875"
integrity sha512-ytxQvrb1cPc9WBEI/HSeYYoGD0kWnGEOR8RY6KomWLBVhqz0RgTwVO9dLrGz7dC+nN9llyI7OKAgRq8Vq4ZBSw==
-tiny-invariant@^1.1.0:
+tiny-invariant@^1.1.0, tiny-invariant@^1.3.3:
version "1.3.3"
resolved "https://registry.yarnpkg.com/tiny-invariant/-/tiny-invariant-1.3.3.tgz#46680b7a873a0d5d10005995eb90a70d74d60127"
integrity sha512-+FbBPE1o9QAYvviau/qC5SE3caw21q3xkvWKBtja5vgqOWIHHJ3ioaq1VPfn/Szqctz2bU/oYeKd9/z5BL+PVg==
@@ -32223,6 +32651,11 @@ tinyspy@^2.2.0:
resolved "https://registry.yarnpkg.com/tinyspy/-/tinyspy-2.2.1.tgz#117b2342f1f38a0dbdcc73a50a454883adf861d1"
integrity sha512-KYad6Vy5VDWV4GH3fjpseMQ/XU2BhIYP7Vzd0LG44qRWm/Yt2WCOTicFdvmgo6gWaqooMQCawTtILVQJupKu7A==
+titleize@^3.0.0:
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/titleize/-/titleize-3.0.0.tgz#71c12eb7fdd2558aa8a44b0be83b8a76694acd53"
+ integrity sha512-KxVu8EYHDPBdUYdKZdKtU2aj2XfEx9AfjXxE/Aj0vT06w2icA09Vus1rh6eSu1y01akYg6BjIK/hxyLJINoMLQ==
+
tmp-promise@^3.0.2:
version "3.0.3"
resolved "https://registry.yarnpkg.com/tmp-promise/-/tmp-promise-3.0.3.tgz#60a1a1cc98c988674fcbfd23b6e3367bdeac4ce7"
@@ -33198,6 +33631,11 @@ untildify@^2.1.0:
dependencies:
os-homedir "^1.0.0"
+untildify@^4.0.0:
+ version "4.0.0"
+ resolved "https://registry.yarnpkg.com/untildify/-/untildify-4.0.0.tgz#2bc947b953652487e4600949fb091e3ae8cd919b"
+ integrity sha512-KK8xQ1mkzZeg9inewmFVDNkg3l5LUhoq9kN6iWYB/CC9YMG8HA+c1Q8HwDe6dEX7kErrEVNVBO3fWsVq5iDgtw==
+
untun@^0.1.3:
version "0.1.3"
resolved "https://registry.yarnpkg.com/untun/-/untun-0.1.3.tgz#5d10dee37a3a5737ff03d158be877dae0a0e58a6"
@@ -33620,6 +34058,20 @@ vite-plugin-checker@^0.6.4:
vscode-languageserver-textdocument "^1.0.1"
vscode-uri "^3.0.2"
+vite-plugin-inspect@^0.7.33:
+ version "0.7.42"
+ resolved "https://registry.yarnpkg.com/vite-plugin-inspect/-/vite-plugin-inspect-0.7.42.tgz#e055ad2ff82f3eca2f101fcfb29b5fabfe1e7366"
+ integrity sha512-JCyX86wr3siQc+p9Kd0t8VkFHAJag0RaQVIpdFGSv5FEaePEVB6+V/RGtz2dQkkGSXQzRWrPs4cU3dRKg32bXw==
+ dependencies:
+ "@antfu/utils" "^0.7.6"
+ "@rollup/pluginutils" "^5.0.5"
+ debug "^4.3.4"
+ error-stack-parser-es "^0.1.1"
+ fs-extra "^11.1.1"
+ open "^9.1.0"
+ picocolors "^1.0.0"
+ sirv "^2.0.3"
+
vite-plugin-inspect@^0.8.4:
version "0.8.4"
resolved "https://registry.yarnpkg.com/vite-plugin-inspect/-/vite-plugin-inspect-0.8.4.tgz#1fcdf6703164d651db3f13c8c6610e1ced5108e1"
@@ -33635,7 +34087,7 @@ vite-plugin-inspect@^0.8.4:
picocolors "^1.0.0"
sirv "^2.0.4"
-vite-plugin-solid@^2.8.2:
+vite-plugin-solid@^2.10.2, vite-plugin-solid@^2.8.2:
version "2.10.2"
resolved "https://registry.yarnpkg.com/vite-plugin-solid/-/vite-plugin-solid-2.10.2.tgz#180f5ec9d8ac03d19160dd5728b313fe9b62ee0d"
integrity sha512-AOEtwMe2baBSXMXdo+BUwECC8IFHcKS6WQV/1NEd+Q7vHPap5fmIhLcAzr+DUJ04/KHx/1UBU0l1/GWP+rMAPQ==
From b87c5c9a9ed4ea0308d7d724fd8da70726a9f35b Mon Sep 17 00:00:00 2001
From: Andrei Borza
Date: Thu, 27 Jun 2024 16:09:50 +0200
Subject: [PATCH 02/15] Rewriting types
---
packages/solidstart/package.json | 33 +--
packages/solidstart/rollup.npm.config.mjs | 2 +-
packages/solidstart/src/index.types.ts | 4 +-
packages/solidstart/src/server/solidrouter.ts | 42 ++--
.../tsconfig.solidrouter-types.json | 15 ++
yarn.lock | 212 +-----------------
6 files changed, 58 insertions(+), 250 deletions(-)
create mode 100644 packages/solidstart/tsconfig.solidrouter-types.json
diff --git a/packages/solidstart/package.json b/packages/solidstart/package.json
index bab6f28eb820..2cc74eb0bc91 100644
--- a/packages/solidstart/package.json
+++ b/packages/solidstart/package.json
@@ -1,6 +1,6 @@
{
"name": "@sentry/solidstart",
- "version": "8.11.0",
+ "version": "8.12.0",
"description": "Official Sentry SDK for Solid Start",
"repository": "git://github.com/getsentry/sentry-javascript.git",
"homepage": "https://github.com/getsentry/sentry-javascript/tree/master/packages/solidstart",
@@ -10,36 +10,38 @@
"node": ">=16"
},
"files": [
- "cjs",
- "esm",
- "index.types.d.ts",
- "solidrouter.types.d.ts",
- "types-ts3.8"
+ "/build",
+ "/client",
+ "/server",
+ "/*.d.ts",
+ "/*.d.ts.map"
],
"main": "build/cjs/index.server.js",
"module": "build/esm/index.server.js",
"browser": "build/esm/index.client.js",
- "types": "build/index.types.d.ts",
+ "types": "build/types/index.types.d.ts",
"exports": {
"./package.json": "./package.json",
".": {
- "types": "./build/index.types.d.ts",
"browser": {
+ "types": "./build/types/index.types.d.ts",
"import": "./build/esm/index.client.js",
"require": "./build/cjs/index.client.js"
},
"node": {
+ "types": "./build/types/index.types.d.ts",
"import": "./build/esm/index.server.js",
"require": "./build/cjs/index.server.js"
}
},
"./solidrouter": {
- "types": "./build/solidrouter.types.d.ts",
"browser": {
+ "types": "./solidrouter.types.d.ts",
"import": "./build/esm/solidrouter.client.js",
"require": "./build/cjs/solidrouter.client.js"
},
"node": {
+ "types": "./solidrouter.types.d.ts",
"import": "./build/esm/solidrouter.server.js",
"require": "./build/cjs/solidrouter.server.js"
}
@@ -58,12 +60,12 @@
}
},
"dependencies": {
- "@sentry/core": "8.11.0",
- "@sentry/node": "8.11.0",
- "@sentry/opentelemetry": "8.11.0",
- "@sentry/solid": "8.11.0",
- "@sentry/types": "8.11.0",
- "@sentry/utils": "8.11.0",
+ "@sentry/core": "8.12.0",
+ "@sentry/node": "8.12.0",
+ "@sentry/opentelemetry": "8.12.0",
+ "@sentry/solid": "8.12.0",
+ "@sentry/types": "8.12.0",
+ "@sentry/utils": "8.12.0",
"@sentry/vite-plugin": "2.19.0"
},
"devDependencies": {
@@ -72,7 +74,6 @@
"@solidjs/testing-library": "0.8.5",
"@testing-library/jest-dom": "^6.4.5",
"@testing-library/user-event": "^14.5.2",
- "solid-js": "^1.8.11",
"vite-plugin-solid": "^2.8.2"
},
"scripts": {
diff --git a/packages/solidstart/rollup.npm.config.mjs b/packages/solidstart/rollup.npm.config.mjs
index 0f6953887e04..55ca2b0f561a 100644
--- a/packages/solidstart/rollup.npm.config.mjs
+++ b/packages/solidstart/rollup.npm.config.mjs
@@ -15,7 +15,7 @@ export default makeNPMConfigVariants(
// prevent this internal nextjs code from ending up in our built package (this doesn't happen automatially because
// the name doesn't match an SDK dependency)
packageSpecificConfig: {
- external: ['solid-js', '@sentry/solid/solidrouter'],
+ external: ['solid-js', '@sentry/solid', '@sentry/solid/solidrouter'],
},
}),
);
diff --git a/packages/solidstart/src/index.types.ts b/packages/solidstart/src/index.types.ts
index 0da6f7c0c53b..a2c4d1ab7c06 100644
--- a/packages/solidstart/src/index.types.ts
+++ b/packages/solidstart/src/index.types.ts
@@ -9,7 +9,7 @@ import type { Integration, Options, StackParser } from '@sentry/types';
import type * as clientSdk from './client';
import type * as serverSdk from './server';
-/** Initializes Sentry SvelteKit SDK */
+/** Initializes Sentry Solid Start SDK */
export declare function init(options: Options | clientSdk.BrowserOptions | serverSdk.NodeOptions): void;
export declare const linkedErrorsIntegration: typeof clientSdk.linkedErrorsIntegration;
@@ -19,8 +19,6 @@ export declare const getDefaultIntegrations: (options: Options) => Integration[]
export declare const defaultStackParser: StackParser;
export declare const getClient: typeof clientSdk.getClient;
-// eslint-disable-next-line deprecation/deprecation
-export declare const getCurrentHub: typeof clientSdk.getCurrentHub;
export declare function close(timeout?: number | undefined): PromiseLike;
export declare function flush(timeout?: number | undefined): PromiseLike;
diff --git a/packages/solidstart/src/server/solidrouter.ts b/packages/solidstart/src/server/solidrouter.ts
index 877d18cf4249..1a17e309047a 100644
--- a/packages/solidstart/src/server/solidrouter.ts
+++ b/packages/solidstart/src/server/solidrouter.ts
@@ -1,8 +1,14 @@
-import type { HashRouter, MemoryRouter, RouteSectionProps, StaticRouter } from '@solidjs/router';
-// import { useBeforeLeave, useLocation } from '@solidjs/router';
-import type { Router as BaseRouter } from '@solidjs/router/dist/routers/Router';
+import type { Integration } from '@sentry/types';
+import type {
+ HashRouter,
+ MemoryRouter,
+ RouteSectionProps,
+ Router as BaseRouter,
+ StaticRouter,
+} from '@solidjs/router';
+import { mergeProps, splitProps } from 'solid-js';
import type { Component, JSX, ParentProps } from 'solid-js';
-import { createComponent, mergeProps, splitProps } from 'solid-js';
+import { createComponent } from 'solid-js/web';
/** Pass-through component in case user didn't specify a root **/
function SentryDefaultRoot(props: ParentProps): JSX.Element {
@@ -15,23 +21,6 @@ function SentryDefaultRoot(props: ParentProps): JSX.Element {
*/
function withSentryRouterRoot(Root: Component): Component {
const SentryRouterRoot = (props: RouteSectionProps): JSX.Element => {
- // TODO: This is a rudimentary first version of handling navigation spans
- // It does not
- // - use query params
- // - parameterize the route
-
- // useBeforeLeave(({ to }: BeforeLeaveEventArgs) => {
- // `to` could be `-1` if the browser back-button was used
- // eslint-disable-next-line no-console
- // console.log('[server] useBeforeLeave', to.toString());
- // });
-
- // const location = useLocation();
- // createEffect(() => {
- // eslint-disable-next-line no-console
- // console.log('[server] useLocation', location.pathname);
- // });
-
return createComponent(Root, props);
};
@@ -39,9 +28,16 @@ function withSentryRouterRoot(Root: Component): Component
Date: Thu, 27 Jun 2024 16:57:34 +0200
Subject: [PATCH 03/15] Update tsconfigs
---
packages/solidstart/.gitignore | 4 ++++
packages/solidstart/package.json | 22 ++++++++++---------
packages/solidstart/src/server/solidrouter.ts | 12 +++-------
packages/solidstart/tsconfig.json | 4 +---
.../tsconfig.solidrouter-types.json | 9 ++++++--
packages/solidstart/tsconfig.types.json | 12 ++++++++--
6 files changed, 37 insertions(+), 26 deletions(-)
create mode 100644 packages/solidstart/.gitignore
diff --git a/packages/solidstart/.gitignore b/packages/solidstart/.gitignore
new file mode 100644
index 000000000000..7015dd57a0ba
--- /dev/null
+++ b/packages/solidstart/.gitignore
@@ -0,0 +1,4 @@
+/server
+/client
+/*.d.ts
+/*.d.ts.map
diff --git a/packages/solidstart/package.json b/packages/solidstart/package.json
index 2cc74eb0bc91..7e3acd328067 100644
--- a/packages/solidstart/package.json
+++ b/packages/solidstart/package.json
@@ -1,6 +1,6 @@
{
"name": "@sentry/solidstart",
- "version": "8.12.0",
+ "version": "8.13.0",
"description": "Official Sentry SDK for Solid Start",
"repository": "git://github.com/getsentry/sentry-javascript.git",
"homepage": "https://github.com/getsentry/sentry-javascript/tree/master/packages/solidstart",
@@ -60,12 +60,12 @@
}
},
"dependencies": {
- "@sentry/core": "8.12.0",
- "@sentry/node": "8.12.0",
- "@sentry/opentelemetry": "8.12.0",
- "@sentry/solid": "8.12.0",
- "@sentry/types": "8.12.0",
- "@sentry/utils": "8.12.0",
+ "@sentry/core": "8.13.0",
+ "@sentry/node": "8.13.0",
+ "@sentry/opentelemetry": "8.13.0",
+ "@sentry/solid": "8.13.0",
+ "@sentry/types": "8.13.0",
+ "@sentry/utils": "8.13.0",
"@sentry/vite-plugin": "2.19.0"
},
"devDependencies": {
@@ -80,14 +80,16 @@
"build": "run-p build:transpile build:types",
"build:dev": "yarn build",
"build:transpile": "rollup -c rollup.npm.config.mjs",
- "build:types": "tsc -p tsconfig.types.json",
+ "build:types": "run-s build:types:core build:types:solidrouter",
+ "build:types:core": "tsc -p tsconfig.types.json",
+ "build:types:solidrouter": "tsc -p tsconfig.solidrouter-types.json",
"build:watch": "run-p build:transpile:watch build:types:watch",
"build:dev:watch": "yarn build:watch",
"build:transpile:watch": "rollup -c rollup.npm.config.mjs --watch",
"build:types:watch": "tsc -p tsconfig.types.json --watch",
- "build:tarball": "ts-node ../../scripts/prepack.ts && npm pack ./build",
+ "build:tarball": "npm pack",
"circularDepCheck": "madge --circular src/index.client.ts && madge --circular src/index.server.ts && madge --circular src/index.types.ts",
- "clean": "rimraf build coverage sentry-sveltekit-*.tgz",
+ "clean": "rimraf build coverage sentry-solidstart-*.tgz ./*.d.ts ./*.d.ts.map ./client ./server",
"fix": "eslint . --format stylish --fix",
"lint": "eslint . --format stylish",
"test": "yarn test:unit",
diff --git a/packages/solidstart/src/server/solidrouter.ts b/packages/solidstart/src/server/solidrouter.ts
index 1a17e309047a..aebb8497fc1c 100644
--- a/packages/solidstart/src/server/solidrouter.ts
+++ b/packages/solidstart/src/server/solidrouter.ts
@@ -1,11 +1,5 @@
import type { Integration } from '@sentry/types';
-import type {
- HashRouter,
- MemoryRouter,
- RouteSectionProps,
- Router as BaseRouter,
- StaticRouter,
-} from '@solidjs/router';
+import type { HashRouter, MemoryRouter, RouteSectionProps, Router as BaseRouter, StaticRouter } from '@solidjs/router';
import { mergeProps, splitProps } from 'solid-js';
import type { Component, JSX, ParentProps } from 'solid-js';
import { createComponent } from 'solid-js/web';
@@ -32,11 +26,11 @@ function withSentryRouterRoot(Root: Component): Component
Date: Fri, 28 Jun 2024 13:34:41 +0200
Subject: [PATCH 04/15] Try different type configuration
---
packages/solid/package.json | 2 +-
packages/solidstart/.gitignore | 6 +-
packages/solidstart/package.json | 65 ++++++++++++++-----
packages/solidstart/rollup.npm.config.mjs | 7 +-
packages/solidstart/src/server/solidrouter.ts | 7 +-
packages/solidstart/src/solidrouter.types.ts | 2 +-
.../tsconfig.solidrouter-types.json | 7 +-
packages/solidstart/tsconfig.types.json | 7 +-
8 files changed, 71 insertions(+), 32 deletions(-)
diff --git a/packages/solid/package.json b/packages/solid/package.json
index 1ecff5e8e284..b27ea8262d3d 100644
--- a/packages/solid/package.json
+++ b/packages/solid/package.json
@@ -78,7 +78,7 @@
"build:transpile:watch": "rollup -c rollup.npm.config.mjs --watch",
"build:types:watch": "tsc -p tsconfig.types.json --watch",
"build:tarball": "npm pack",
- "circularDepCheck": "madge --circular src/index.ts",
+ "circularDepCheck": "madge --circular src/index.ts && madge --circular src/solidrouter.ts",
"clean": "rimraf build coverage sentry-solid-*.tgz ./*.d.ts ./*.d.ts.map",
"fix": "eslint . --format stylish --fix",
"lint": "eslint . --format stylish",
diff --git a/packages/solidstart/.gitignore b/packages/solidstart/.gitignore
index 7015dd57a0ba..fd2584709d6a 100644
--- a/packages/solidstart/.gitignore
+++ b/packages/solidstart/.gitignore
@@ -1,4 +1,6 @@
-/server
-/client
+/client/*.d.ts
+/client/*.d.ts.map
+/server/*.d.ts
+/server/*.d.ts.map
/*.d.ts
/*.d.ts.map
diff --git a/packages/solidstart/package.json b/packages/solidstart/package.json
index 7e3acd328067..daa077eba3d7 100644
--- a/packages/solidstart/package.json
+++ b/packages/solidstart/package.json
@@ -24,26 +24,46 @@
"./package.json": "./package.json",
".": {
"browser": {
- "types": "./build/types/index.types.d.ts",
- "import": "./build/esm/index.client.js",
- "require": "./build/cjs/index.client.js"
+ "import": {
+ "types": "./build/types/index.types.d.ts",
+ "default": "./build/esm/index.client.js"
+ },
+ "require": {
+ "types": "./build/types/index.types.d.ts",
+ "default": "./build/cjs/index.client.js"
+ }
},
"node": {
- "types": "./build/types/index.types.d.ts",
- "import": "./build/esm/index.server.js",
- "require": "./build/cjs/index.server.js"
+ "import": {
+ "types": "./build/types/index.types.d.ts",
+ "default": "./build/esm/index.server.js"
+ },
+ "require": {
+ "types": "./build/types/index.types.d.ts",
+ "default": "./build/cjs/index.server.js"
+ }
}
},
"./solidrouter": {
"browser": {
- "types": "./solidrouter.types.d.ts",
- "import": "./build/esm/solidrouter.client.js",
- "require": "./build/cjs/solidrouter.client.js"
+ "import": {
+ "types": "./solidrouter.types.d.ts",
+ "default": "./build/esm/solidrouter.client.js"
+ },
+ "require": {
+ "types": "./solidrouter.types.d.ts",
+ "default": "./build/cjs/solidrouter.client.js"
+ }
},
"node": {
- "types": "./solidrouter.types.d.ts",
- "import": "./build/esm/solidrouter.server.js",
- "require": "./build/cjs/solidrouter.server.js"
+ "import": {
+ "types": "./solidrouter.types.d.ts",
+ "default": "./build/esm/solidrouter.server.js"
+ },
+ "require": {
+ "types": "./solidrouter.types.d.ts",
+ "default": "./build/cjs/solidrouter.server.js"
+ }
}
}
},
@@ -88,16 +108,31 @@
"build:transpile:watch": "rollup -c rollup.npm.config.mjs --watch",
"build:types:watch": "tsc -p tsconfig.types.json --watch",
"build:tarball": "npm pack",
- "circularDepCheck": "madge --circular src/index.client.ts && madge --circular src/index.server.ts && madge --circular src/index.types.ts",
- "clean": "rimraf build coverage sentry-solidstart-*.tgz ./*.d.ts ./*.d.ts.map ./client ./server",
+ "circularDepCheck": "madge --circular src/index.client.ts && madge --circular src/index.server.ts && madge --circular src/index.types.ts && madge --circular src/solidrouter.client.ts && madge --circular src/solidrouter.server.ts && madge --circular src/solidrouter.types.ts",
+ "clean": "rimraf build coverage sentry-solidstart-*.tgz ./*.d.ts ./*.d.ts.map ./client/*.d.ts ./client/*.d.ts.map ./server/*d.ts ./server/*d.ts.map",
"fix": "eslint . --format stylish --fix",
"lint": "eslint . --format stylish",
"test": "yarn test:unit",
"test:unit": "vitest run",
"test:watch": "vitest --watch",
- "yalc:publish": "ts-node ../../scripts/prepack.ts && yalc publish build --push --sig"
+ "yalc:publish": "yalc publish --push --sig"
},
"volta": {
"extends": "../../package.json"
+ },
+ "nx": {
+ "targets": {
+ "build:types": {
+ "outputs": [
+ "{projectRoot}/build/types",
+ "{projectRoot}/client/*.d.ts",
+ "{projectRoot}/client/*.d.ts.map",
+ "{projectRoot}/server/*.d.ts",
+ "{projectRoot}/server/*.d.ts.map",
+ "{projectRoot}/*.d.ts",
+ "{projectRoot}/*.d.ts.map"
+ ]
+ }
+ }
}
}
diff --git a/packages/solidstart/rollup.npm.config.mjs b/packages/solidstart/rollup.npm.config.mjs
index 55ca2b0f561a..55de8a263db5 100644
--- a/packages/solidstart/rollup.npm.config.mjs
+++ b/packages/solidstart/rollup.npm.config.mjs
@@ -3,10 +3,10 @@ import { makeBaseNPMConfig, makeNPMConfigVariants } from '@sentry-internal/rollu
export default makeNPMConfigVariants(
makeBaseNPMConfig({
entrypoints: [
- 'src/index.server.ts',
- 'src/solidrouter.server.ts',
'src/index.client.ts',
'src/solidrouter.client.ts',
+ 'src/index.server.ts',
+ 'src/solidrouter.server.ts',
'src/client/index.ts',
'src/client/solidrouter.ts',
'src/server/index.ts',
@@ -16,6 +16,9 @@ export default makeNPMConfigVariants(
// the name doesn't match an SDK dependency)
packageSpecificConfig: {
external: ['solid-js', '@sentry/solid', '@sentry/solid/solidrouter'],
+ output: {
+ dynamicImportInCjs: true,
+ },
},
}),
);
diff --git a/packages/solidstart/src/server/solidrouter.ts b/packages/solidstart/src/server/solidrouter.ts
index aebb8497fc1c..a20d3db79cb4 100644
--- a/packages/solidstart/src/server/solidrouter.ts
+++ b/packages/solidstart/src/server/solidrouter.ts
@@ -24,12 +24,9 @@ function withSentryRouterRoot(Root: Component): Component
Date: Mon, 1 Jul 2024 12:47:22 +0200
Subject: [PATCH 05/15] Remove unncessary server export of browser tracing
integration
---
packages/solidstart/src/server/solidrouter.ts | 12 +-----------
packages/solidstart/src/solidrouter.types.ts | 7 ++-----
2 files changed, 3 insertions(+), 16 deletions(-)
diff --git a/packages/solidstart/src/server/solidrouter.ts b/packages/solidstart/src/server/solidrouter.ts
index a20d3db79cb4..868ab454ecb2 100644
--- a/packages/solidstart/src/server/solidrouter.ts
+++ b/packages/solidstart/src/server/solidrouter.ts
@@ -1,4 +1,3 @@
-import type { Integration } from '@sentry/types';
import type { HashRouter, MemoryRouter, RouteSectionProps, Router as BaseRouter, StaticRouter } from '@solidjs/router';
import { mergeProps, splitProps } from 'solid-js';
import type { Component, JSX, ParentProps } from 'solid-js';
@@ -21,16 +20,7 @@ function withSentryRouterRoot(Root: Component): Component
Date: Mon, 1 Jul 2024 13:12:15 +0200
Subject: [PATCH 06/15] Fix type issue for solidstart package
---
packages/solidstart/package.json | 42 +++++--------------
.../tsconfig.solidrouter-types.json | 6 +--
packages/solidstart/tsconfig.types.json | 2 +-
3 files changed, 14 insertions(+), 36 deletions(-)
diff --git a/packages/solidstart/package.json b/packages/solidstart/package.json
index daa077eba3d7..e54707b1ba7a 100644
--- a/packages/solidstart/package.json
+++ b/packages/solidstart/package.json
@@ -23,47 +23,25 @@
"exports": {
"./package.json": "./package.json",
".": {
+ "types": "./build/types/index.types.d.ts",
"browser": {
- "import": {
- "types": "./build/types/index.types.d.ts",
- "default": "./build/esm/index.client.js"
- },
- "require": {
- "types": "./build/types/index.types.d.ts",
- "default": "./build/cjs/index.client.js"
- }
+ "import": "./build/esm/index.client.js",
+ "require": "./build/cjs/index.client.js"
},
"node": {
- "import": {
- "types": "./build/types/index.types.d.ts",
- "default": "./build/esm/index.server.js"
- },
- "require": {
- "types": "./build/types/index.types.d.ts",
- "default": "./build/cjs/index.server.js"
- }
+ "import": "./build/esm/index.server.js",
+ "require": "./build/cjs/index.server.js"
}
},
"./solidrouter": {
+ "types": "./solidrouter.types.d.ts",
"browser": {
- "import": {
- "types": "./solidrouter.types.d.ts",
- "default": "./build/esm/solidrouter.client.js"
- },
- "require": {
- "types": "./solidrouter.types.d.ts",
- "default": "./build/cjs/solidrouter.client.js"
- }
+ "import": "./build/esm/solidrouter.client.js",
+ "require": "./build/cjs/solidrouter.client.js"
},
"node": {
- "import": {
- "types": "./solidrouter.types.d.ts",
- "default": "./build/esm/solidrouter.server.js"
- },
- "require": {
- "types": "./solidrouter.types.d.ts",
- "default": "./build/cjs/solidrouter.server.js"
- }
+ "import": "./build/esm/solidrouter.server.js",
+ "require": "./build/cjs/solidrouter.server.js"
}
}
},
diff --git a/packages/solidstart/tsconfig.solidrouter-types.json b/packages/solidstart/tsconfig.solidrouter-types.json
index 556477dd5dfc..0638b12a76f6 100644
--- a/packages/solidstart/tsconfig.solidrouter-types.json
+++ b/packages/solidstart/tsconfig.solidrouter-types.json
@@ -8,14 +8,14 @@
"outDir": "./"
},
- "//": "These types are built separately because they are for a subpath export, which has problems if they are not in the root",
+ // These types are built separately because they are for a subpath export, which has problems if they are not in the root
"include": [
"src/solidrouter.client.ts",
"src/client/solidrouter.ts",
"src/solidrouter.server.ts",
"src/server/solidrouter.ts",
- "src/solidrouter.types.ts"
+ "src/solidrouter.types.ts",
],
- "//": "Without this, we cannot output into the root dir",
+ // Without this, we cannot output into the root dir
"exclude": []
}
diff --git a/packages/solidstart/tsconfig.types.json b/packages/solidstart/tsconfig.types.json
index 7d075377acb9..19651351b667 100644
--- a/packages/solidstart/tsconfig.types.json
+++ b/packages/solidstart/tsconfig.types.json
@@ -8,7 +8,7 @@
"outDir": "build/types"
},
- "//": "These are built separately in tsconfig.solidrouter-types.json",
+ // These are built separately in tsconfig.solidrouter-types.json
"exclude": [
"src/solidrouter.client.ts",
"src/client/solidrouter.ts",
From 0981ee0795e1c16cc1dfc8effe1f533e104f781b Mon Sep 17 00:00:00 2001
From: Andrei Borza
Date: Mon, 1 Jul 2024 15:45:08 +0200
Subject: [PATCH 07/15] First working version with bundler & node
moduleResolution
---
packages/solidstart/package.json | 4 +++-
packages/solidstart/rollup.npm.config.mjs | 1 +
.../solidstart/src/{solidrouter.types.ts => solidrouter.ts} | 0
packages/solidstart/tsconfig.solidrouter-types.json | 2 +-
packages/solidstart/tsconfig.types.json | 2 +-
5 files changed, 6 insertions(+), 3 deletions(-)
rename packages/solidstart/src/{solidrouter.types.ts => solidrouter.ts} (100%)
diff --git a/packages/solidstart/package.json b/packages/solidstart/package.json
index e54707b1ba7a..0217becc2ffd 100644
--- a/packages/solidstart/package.json
+++ b/packages/solidstart/package.json
@@ -34,12 +34,14 @@
}
},
"./solidrouter": {
- "types": "./solidrouter.types.d.ts",
+ "types": "./solidrouter.d.ts",
"browser": {
+ "types": "./solidrouter.d.ts",
"import": "./build/esm/solidrouter.client.js",
"require": "./build/cjs/solidrouter.client.js"
},
"node": {
+ "types": "./solidrouter.d.ts",
"import": "./build/esm/solidrouter.server.js",
"require": "./build/cjs/solidrouter.server.js"
}
diff --git a/packages/solidstart/rollup.npm.config.mjs b/packages/solidstart/rollup.npm.config.mjs
index 55de8a263db5..21f2ebd32bbe 100644
--- a/packages/solidstart/rollup.npm.config.mjs
+++ b/packages/solidstart/rollup.npm.config.mjs
@@ -11,6 +11,7 @@ export default makeNPMConfigVariants(
'src/client/solidrouter.ts',
'src/server/index.ts',
'src/server/solidrouter.ts',
+ 'src/solidrouter.ts',
],
// prevent this internal nextjs code from ending up in our built package (this doesn't happen automatially because
// the name doesn't match an SDK dependency)
diff --git a/packages/solidstart/src/solidrouter.types.ts b/packages/solidstart/src/solidrouter.ts
similarity index 100%
rename from packages/solidstart/src/solidrouter.types.ts
rename to packages/solidstart/src/solidrouter.ts
diff --git a/packages/solidstart/tsconfig.solidrouter-types.json b/packages/solidstart/tsconfig.solidrouter-types.json
index 0638b12a76f6..f800d830c511 100644
--- a/packages/solidstart/tsconfig.solidrouter-types.json
+++ b/packages/solidstart/tsconfig.solidrouter-types.json
@@ -14,7 +14,7 @@
"src/client/solidrouter.ts",
"src/solidrouter.server.ts",
"src/server/solidrouter.ts",
- "src/solidrouter.types.ts",
+ "src/solidrouter.ts",
],
// Without this, we cannot output into the root dir
"exclude": []
diff --git a/packages/solidstart/tsconfig.types.json b/packages/solidstart/tsconfig.types.json
index 19651351b667..f7cc8c3d1610 100644
--- a/packages/solidstart/tsconfig.types.json
+++ b/packages/solidstart/tsconfig.types.json
@@ -14,6 +14,6 @@
"src/client/solidrouter.ts",
"src/solidrouter.server.ts",
"src/server/solidrouter.ts",
- "src/solidrouter.types.ts"
+ "src/solidrouter.ts"
]
}
From 2346fa334ed236e0ec631a331981f95313479851 Mon Sep 17 00:00:00 2001
From: Andrei Borza
Date: Mon, 1 Jul 2024 16:18:32 +0200
Subject: [PATCH 08/15] Add comments to `package.json` explaining types
strategy
---
packages/solidstart/package.json | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/packages/solidstart/package.json b/packages/solidstart/package.json
index 0217becc2ffd..2da169afb6c4 100644
--- a/packages/solidstart/package.json
+++ b/packages/solidstart/package.json
@@ -20,6 +20,12 @@
"module": "build/esm/index.server.js",
"browser": "build/esm/index.client.js",
"types": "build/types/index.types.d.ts",
+ "//": [
+ "For `@sentry/solidstart/solidrouter` types to resolve correctly for both `moduleResolution: bundler` and `moduleResolution: node`",
+ "- type definitions have to be exported at root level (/build won't work)",
+ "- type definitions have to match in name (i.e. `solidrouter.d.ts`)",
+ "- the `types` entry needs to be set both at the root of the export and within `browser` and `node`"
+ ],
"exports": {
"./package.json": "./package.json",
".": {
@@ -89,7 +95,7 @@
"build:types:watch": "tsc -p tsconfig.types.json --watch",
"build:tarball": "npm pack",
"circularDepCheck": "madge --circular src/index.client.ts && madge --circular src/index.server.ts && madge --circular src/index.types.ts && madge --circular src/solidrouter.client.ts && madge --circular src/solidrouter.server.ts && madge --circular src/solidrouter.types.ts",
- "clean": "rimraf build coverage sentry-solidstart-*.tgz ./*.d.ts ./*.d.ts.map ./client/*.d.ts ./client/*.d.ts.map ./server/*d.ts ./server/*d.ts.map",
+ "clean": "rimraf build coverage sentry-solidstart-*.tgz ./*.d.ts ./*.d.ts.map ./client ./server",
"fix": "eslint . --format stylish --fix",
"lint": "eslint . --format stylish",
"test": "yarn test:unit",
From 7496bd3d1142c95699976335633330da38dce425 Mon Sep 17 00:00:00 2001
From: Andrei Borza
Date: Mon, 1 Jul 2024 17:00:53 +0200
Subject: [PATCH 09/15] Update nx entries
---
packages/solidstart/.gitignore | 7 +++----
packages/solidstart/package.json | 6 ++----
2 files changed, 5 insertions(+), 8 deletions(-)
diff --git a/packages/solidstart/.gitignore b/packages/solidstart/.gitignore
index fd2584709d6a..fd9d119b93d9 100644
--- a/packages/solidstart/.gitignore
+++ b/packages/solidstart/.gitignore
@@ -1,6 +1,5 @@
-/client/*.d.ts
-/client/*.d.ts.map
-/server/*.d.ts
-/server/*.d.ts.map
+# types for the solidrouter integration
+/client
+/server
/*.d.ts
/*.d.ts.map
diff --git a/packages/solidstart/package.json b/packages/solidstart/package.json
index 2da169afb6c4..a1d9f263b27b 100644
--- a/packages/solidstart/package.json
+++ b/packages/solidstart/package.json
@@ -111,10 +111,8 @@
"build:types": {
"outputs": [
"{projectRoot}/build/types",
- "{projectRoot}/client/*.d.ts",
- "{projectRoot}/client/*.d.ts.map",
- "{projectRoot}/server/*.d.ts",
- "{projectRoot}/server/*.d.ts.map",
+ "{projectRoot}/client",
+ "{projectRoot}/server",
"{projectRoot}/*.d.ts",
"{projectRoot}/*.d.ts.map"
]
From 8fa76dbe172ca76f7274c3fd6c84f63c047611a5 Mon Sep 17 00:00:00 2001
From: Andrei Borza
Date: Tue, 2 Jul 2024 09:08:23 +0200
Subject: [PATCH 10/15] Update README, expose solid sdk's error boundary
---
packages/solid/README.md | 2 +-
packages/solidstart/README.md | 353 +++++-------------------
packages/solidstart/src/server/index.ts | 4 +-
3 files changed, 79 insertions(+), 280 deletions(-)
diff --git a/packages/solid/README.md b/packages/solid/README.md
index 7e042887854f..06012bb34be8 100644
--- a/packages/solid/README.md
+++ b/packages/solid/README.md
@@ -52,7 +52,7 @@ render(
);
```
-# ErrorBoundary
+# Solid ErrorBoundary
To automatically capture exceptions from inside a component tree and render a fallback component, wrap the native Solid
JS `ErrorBoundary` component with `Sentry.withSentryErrorBoundary`.
diff --git a/packages/solidstart/README.md b/packages/solidstart/README.md
index 6a34fb675a33..eca4deb20def 100644
--- a/packages/solidstart/README.md
+++ b/packages/solidstart/README.md
@@ -4,48 +4,26 @@
-# Official Sentry SDK for Solid Start
+# Official Sentry SDK for Solid Start (EXPERIMENTAL)
-[![npm version](https://img.shields.io/npm/v/@sentry/sveltekit.svg)](https://www.npmjs.com/package/@sentry/sveltekit)
-[![npm dm](https://img.shields.io/npm/dm/@sentry/sveltekit.svg)](https://www.npmjs.com/package/@sentry/sveltekit)
-[![npm dt](https://img.shields.io/npm/dt/@sentry/sveltekit.svg)](https://www.npmjs.com/package/@sentry/sveltekit)
+[![npm version](https://img.shields.io/npm/v/@sentry/solidstart.svg)](https://www.npmjs.com/package/@sentry/solidstart)
+[![npm dm](https://img.shields.io/npm/dm/@sentry/solidstart.svg)](https://www.npmjs.com/package/@sentry/solidstart)
+[![npm dt](https://img.shields.io/npm/dt/@sentry/solidstart.svg)](https://www.npmjs.com/package/@sentry/solidstart)
-## Links
-
-- [Official SDK Docs](https://docs.sentry.io/platforms/javascript/guides/sveltekit/)
-
-## Compatibility
-
-The minimum supported version of SvelteKit is `1.0.0`. The SDK works best with Vite 4.2 and newer. Older Vite versions
-might not generate source maps correctly.
+This SDK is considered ⚠️ **experimental and in an alpha state**. It may experience breaking changes. Please reach out
+on [GitHub](https://github.com/getsentry/sentry-javascript/issues/new/choose) if you have any feedback or concerns.
+This SDK is for [Solid Start](https://start.solidjs.com/).
+If you're using [Solid](https://www.solidjs.com/) see our Solid SDK here.
-The SDK supports the following SvelteKit adapters:
-- `@sveltejs/adapter-auto` - for Vercel with the Node runtime. Other deployment targets might work but we don't
- guarantee compatibility.
-- `@sveltejs/adapter-vercel` - only for Node (Lambda) runtimes, not yet Vercel's edge runtime
-- `@sveltejs/adapter-node`
+## Links
-If you use the SDK with other adapters, we cannot guarantee that everything works as expected. You might need to
-[manually configure source maps upload](#-configuring-source-maps-upload). The SDK is currently not compatible with
-none-Node server runtimes, such as Vercel's Edge runtime or Cloudflare workers.
+- [Official SDK Docs](https://docs.sentry.io/platforms/javascript/guides/solidstart/)
## General
-This package is a wrapper around `@sentry/node` for the server and `@sentry/svelte` for the client side, with added
-functionality related to SvelteKit.
-
-## Automatic Setup
-
-We recommend installing the SDK by running the
-[Sentry wizard](https://docs.sentry.io/platforms/javascript/guides/sveltekit/#install) in the root directory of your
-project:
-
-```sh
-npx @sentry/wizard@latest -i sveltekit
-```
-
-Take a look at the sections below if you want to customize your SDK configuration.
+This package is a wrapper around `@sentry/node` for the server and `@sentry/solid` for the client side, with added
+functionality related to Solid Start.
## Manual Setup
@@ -53,283 +31,102 @@ If the setup through the wizard doesn't work for you, you can also set up the SD
### 1. Prerequesits & Installation
-1. Install the Sentry SvelteKit SDK:
+Install the Sentry Solid Start SDK:
```bash
# Using npm
- npm install @sentry/sveltekit
+ npm install @sentry/solidstart
# Using yarn
- yarn add @sentry/sveltekit
+ yarn add @sentry/solidstart
```
### 2. Client-side Setup
-The Sentry SvelteKit SDK mostly relies on [SvelteKit Hooks](https://kit.svelte.dev/docs/hooks) to capture error and
-performance data.
-
-1. If you don't already have a client hooks file, create a new one in `src/hooks.client.(js|ts)`.
-
-2. On the top of your `hooks.client.(js|ts)` file, initialize the Sentry SDK:
-
- ```javascript
- // hooks.client.(js|ts)
- import * as Sentry from '@sentry/sveltekit';
-
- Sentry.init({
- dsn: '__DSN__',
- tracesSampleRate: 1.0,
- // For instance, initialize Session Replay:
- replaysSessionSampleRate: 0.1,
- replaysOnErrorSampleRate: 1.0,
- integrations: [Sentry.replayIntegration()],
- });
- ```
-
-3. Add our `handleErrorWithSentry` function to the `handleError` hook:
+Initialize the SDK in `entry-client.jsx`
- ```javascript
- // hooks.client.(js|ts)
- import { handleErrorWithSentry } from '@sentry/sveltekit';
+```jsx
+import * as Sentry from '@sentry/solidstart';
+import { mount, StartClient } from "@solidjs/start/client";
- const myErrorHandler = ({ error, event }) => {
- console.error('An error occurred on the client side:', error, event);
- };
+Sentry.init({
+ dsn: '__PUBLIC_DSN__',
+ tracesSampleRate: 1.0, // Capture 100% of the transactions
+});
- export const handleError = handleErrorWithSentry(myErrorHandler);
- // or alternatively, if you don't have a custom error handler:
- // export const handleError = handleErrorWithSentry();
- ```
+mount(() => , document.getElementById("app"));
+```
### 3. Server-side Setup
-1. If you don't already have a server hooks file, create a new one in `src/hooks.server.(js|ts)`.
-
-2. On the top of your `hooks.server.(js|ts)` file, initialize the Sentry SDK:
-
- ```javascript
- // hooks.server.(js|ts)
- import * as Sentry from '@sentry/sveltekit';
-
- Sentry.init({
- dsn: '__DSN__',
- tracesSampleRate: 1.0,
- });
- ```
-
-3. Add our `handleErrorWithSentry` function to the `handleError` hook:
-
- ```javascript
- // hooks.server.(js|ts)
- import { handleErrorWithSentry } from '@sentry/sveltekit';
-
- const myErrorHandler = ({ error, event }) => {
- console.error('An error occurred on the server side:', error, event);
- };
-
- export const handleError = handleErrorWithSentry(myErrorHandler);
- // or alternatively, if you don't have a custom error handler:
- // export const handleError = handleErrorWithSentry();
- ```
-
-4. Add our request handler to the `handle` hook in `hooks.server.ts`:
-
- ```javascript
- // hooks.server.(js|ts)
- import { sentryHandle } from '@sentry/sveltekit';
-
- export const handle = sentryHandle();
- // or alternatively, if you already have a handler defined, use the `sequence` function
- // see: https://kit.svelte.dev/docs/modules#sveltejs-kit-hooks-sequence
- // export const handle = sequence(sentryHandle(), yourHandler());
- ```
-
-### 4. Vite Setup
-
-Add `sentrySvelteKit` to your Vite plugins in `vite.config.(js|ts)` file so that the Sentry SDK can apply build-time
-features. Make sure that it is added _before_ the `sveltekit` plugin:
+Create an instrumentation file named `instrument.server.mjs` and add your initialization code for the server-side SDK.
```javascript
-// vite.config.(js|ts)
-import { sveltekit } from '@sveltejs/kit/vite';
-import { sentrySvelteKit } from '@sentry/sveltekit';
-
-export default {
- plugins: [sentrySvelteKit(), sveltekit()],
- // ... rest of your Vite config
-};
-```
-
-This adds the
-[Sentry Vite Plugin](https://github.com/getsentry/sentry-javascript-bundler-plugins/tree/main/packages/vite-plugin) to
-your Vite config to automatically upload source maps to Sentry.
-
----
-
-## Uploading Source Maps
-
-After completing the [Vite Setup](#5-vite-setup), the SDK will automatically upload source maps to Sentry, when you
-build your project. However, you still need to specify your Sentry auth token as well as your org and project slugs. You
-can either set them as env variables (for example in a `.env` file):
-
-- `SENTRY_ORG` your Sentry org slug
-- `SENTRY_PROJECT` your Sentry project slug
-- `SENTRY_AUTH_TOKEN` your Sentry auth token
+import * as Sentry from "@sentry/solidstart";
-Or you can pass them in whatever form you prefer to `sentrySvelteKit`:
-
-```js
-// vite.config.(js|ts)
-import { sveltekit } from '@sveltejs/kit/vite';
-import { sentrySvelteKit } from '@sentry/sveltekit';
-
-export default {
- plugins: [
- sentrySvelteKit({
- sourceMapsUploadOptions: {
- org: 'my-org-slug',
- project: 'my-project-slug',
- authToken: process.env.SENTRY_AUTH_TOKEN,
- },
- }),
- sveltekit(),
- ],
- // ... rest of your Vite config
-};
-```
-
-### Configuring Source maps upload
-
-Under `sourceMapsUploadOptions`, you can also specify all additional options supported by the
-[Sentry Vite Plugin](https://www.npmjs.com/package/@sentry/vite-plugin). This might be useful if you're using adapters
-other than the Node adapter or have a more customized build setup.
-
-```js
-// vite.config.(js|ts)
-import { sveltekit } from '@sveltejs/kit/vite';
-import { sentrySvelteKit } from '@sentry/sveltekit';
-
-export default {
- plugins: [
- sentrySvelteKit({
- sourceMapsUploadOptions: {
- org: 'my-org-slug',
- project: 'my-project-slug',
- authToken: process.env.SENTRY_AUTH_TOKEN,
- include: ['dist'],
- cleanArtifacts: true,
- setCommits: {
- auto: true,
- },
- },
- }),
- sveltekit(),
- ],
- // ... rest of your Vite config
-};
+Sentry.init({
+ dsn: "https://0e67f7dd5326d51506e92d7f1eff887a@o447951.ingest.us.sentry.io/4507459091824640",
+ tracesSampleRate: 1.0, // Capture 100% of the transactions
+})
```
-### Disabeling automatic source map upload
+### 4. Run your application
-If you don't want to upload source maps automatically, you can disable it as follows:
+Then run your app
-```js
-// vite.config.(js|ts)
-import { sveltekit } from '@sveltejs/kit/vite';
-import { sentrySvelteKit } from '@sentry/sveltekit';
-
-export default {
- plugins: [
- sentrySvelteKit({
- autoUploadSourceMaps: false,
- }),
- sveltekit(),
- ],
- // ... rest of your Vite config
-};
+```bash
+NODE_OPTIONS='--import=./instrument.server.mjs' yarn start
+# or
+NODE_OPTIONS='--require=./instrument.server.cjs' yarn start
```
-## Configure Auto-Instrumentation
+# Solid Router
-The SDK mostly relies on [SvelteKit's hooks](https://kit.svelte.dev/docs/hooks) to collect error and performance data.
-However, SvelteKit doesn't yet offer a hook for universal or server-only `load` function calls. Therefore, the SDK uses
-a Vite plugin to auto-instrument `load` functions so that you don't have to add a Sentry wrapper to each function
-manually. Auto-instrumentation is enabled by default, as soon as you add the `sentrySvelteKit()` function call to your
-`vite.config.(js|ts)`. However, you can customize the behavior, or disable it entirely. In this case, you can still
-manually wrap specific `load` functions with the `withSentry` function.
+The Solid Router instrumentation uses the Solid Router library to create navigation spans to ensure you collect
+meaningful performance data about the health of your page loads and associated requests.
-Note: The SDK will only auto-instrument `load` functions in `+page` or `+layout` files that do not yet contain any
-Sentry code. If you already have custom Sentry code in such files, you'll have to
-[manually](#instrument-load-functions-manually) add our wrapper to your `load` functions.
+Wrap `Router`, `MemoryRouter` or `HashRouter` from `@solidjs/router` using `withSentryRouterRouting`. This creates a
+higher order component, which will enable Sentry to reach your router context.
-### Customize Auto-instrumentation
-
-By passing the `autoInstrument` option to `sentrySvelteKit` you can disable auto-instrumentation entirely, or customize
-which `load` functions should be instrumented:
-
-```javascript
-// vite.config.(js|ts)
-import { sveltekit } from '@sveltejs/kit/vite';
-import { sentrySvelteKit } from '@sentry/sveltekit';
-
-export default {
- plugins: [
- sentrySvelteKit({
- autoInstrument: {
- load: true, // universal load functions
- serverLoad: false, // server-only load functions
- },
- }),
- sveltekit(),
- ],
- // ... rest of your Vite config
-};
-```
-
-### Disable Auto-instrumentation
-
-If you set the `autoInstrument` option to `false`, the SDK won't auto-instrument any `load` function. You can still
-[manually instrument](#instrument-load-functions-manually) specific `load` functions.
-
-```javascript
-// vite.config.(js|ts)
-import { sveltekit } from '@sveltejs/kit/vite';
-import { sentrySvelteKit } from '@sentry/sveltekit';
-
-export default {
- plugins: [
- sentrySvelteKit({
- autoInstrument: false;
- }),
- sveltekit(),
- ],
- // ... rest of your Vite config
-};
+```js
+import { withSentryRouterRouting } from '@sentry/solid/solidrouter';
+import { Route, Router } from '@solidjs/router';
+
+const SentryRouter = Sentry.withSentryRouterRouting(Router);
+
+render(
+ () => (
+
+
+ ...
+
+ ),
+ document.getElementById('root'),
+);
```
-### Instrument `load` Functions Manually
-
-If you don't want to use auto-instrumentation, you can also manually instrument specific `load` functions with our load
-function wrappers:
+# Solid ErrorBoundary
-To instrument your universal `load` functions in `+(page|layout).(js|ts)`, wrap our `wrapLoadWithSentry` function around
-your load code:
+To automatically capture exceptions from inside a component tree and render a fallback component, wrap the native Solid
+JS `ErrorBoundary` component with `Sentry.withSentryErrorBoundary`.
-```javascript
-import { wrapLoadWithSentry } from '@sentry/sveltekit';
+```js
+import * as Sentry from '@sentry/solidstart';
+import { ErrorBoundary } from 'solid-js';
-export const load = wrapLoadWithSentry(event => {
- //... your load code
+Sentry.init({
+ dsn: '__PUBLIC_DSN__',
+ tracesSampleRate: 1.0, // Capture 100% of the transactions
});
-```
-
-To instrument server `load` functions in `+(page|layout).server.(js|ts)`, wrap our `wrapServerLoadWithSentry` function
-around your load code:
-```javascript
-import { wrapServerLoadWithSentry } from '@sentry/sveltekit';
+const SentryErrorBoundary = Sentry.withSentryErrorBoundary(ErrorBoundary);
-export const load = wrapServerLoadWithSentry(event => {
- //... your server load code
-});
+render(
+ () => (
+
Error: {err.message}
}>
+
+
+ ),
+ document.getElementById('root'),
+);
```
diff --git a/packages/solidstart/src/server/index.ts b/packages/solidstart/src/server/index.ts
index f8b50ec53a45..e6b0368b7878 100644
--- a/packages/solidstart/src/server/index.ts
+++ b/packages/solidstart/src/server/index.ts
@@ -121,6 +121,8 @@ export {
// We can still leave this for the carrier init and type exports
export * from '@sentry/node';
+export { withSentryErrorBoundary } from '@sentry/solid'
+
// -------------------------
-// SvelteKit SDK exports:
+// Solid Start SDK exports:
export { init } from './sdk';
From 5ceb1234a13b6b672202142052df057e0fec3183 Mon Sep 17 00:00:00 2001
From: Andrei Borza
Date: Tue, 2 Jul 2024 09:57:20 +0200
Subject: [PATCH 11/15] Housekeeping
---
packages/solidstart/.gitignore | 2 +-
packages/solidstart/rollup.npm.config.mjs | 10 +++++-----
packages/solidstart/src/client/sdk.ts | 4 +---
packages/solidstart/src/server/index.ts | 2 +-
packages/solidstart/src/server/sdk.ts | 3 +--
packages/solidstart/src/server/solidrouter.ts | 11 ++++++++---
6 files changed, 17 insertions(+), 15 deletions(-)
diff --git a/packages/solidstart/.gitignore b/packages/solidstart/.gitignore
index fd9d119b93d9..9d5e99bfb5a5 100644
--- a/packages/solidstart/.gitignore
+++ b/packages/solidstart/.gitignore
@@ -1,4 +1,4 @@
-# types for the solidrouter integration
+# types for the solidrouter integration that get output in root
/client
/server
/*.d.ts
diff --git a/packages/solidstart/rollup.npm.config.mjs b/packages/solidstart/rollup.npm.config.mjs
index 21f2ebd32bbe..5a36889c70f0 100644
--- a/packages/solidstart/rollup.npm.config.mjs
+++ b/packages/solidstart/rollup.npm.config.mjs
@@ -4,16 +4,16 @@ export default makeNPMConfigVariants(
makeBaseNPMConfig({
entrypoints: [
'src/index.client.ts',
- 'src/solidrouter.client.ts',
'src/index.server.ts',
- 'src/solidrouter.server.ts',
'src/client/index.ts',
- 'src/client/solidrouter.ts',
'src/server/index.ts',
- 'src/server/solidrouter.ts',
'src/solidrouter.ts',
+ 'src/solidrouter.client.ts',
+ 'src/solidrouter.server.ts',
+ 'src/client/solidrouter.ts',
+ 'src/server/solidrouter.ts',
],
- // prevent this internal nextjs code from ending up in our built package (this doesn't happen automatially because
+ // prevent this internal code from ending up in our built package (this doesn't happen automatially because
// the name doesn't match an SDK dependency)
packageSpecificConfig: {
external: ['solid-js', '@sentry/solid', '@sentry/solid/solidrouter'],
diff --git a/packages/solidstart/src/client/sdk.ts b/packages/solidstart/src/client/sdk.ts
index ded1f4f86c7f..1b5cf2359306 100644
--- a/packages/solidstart/src/client/sdk.ts
+++ b/packages/solidstart/src/client/sdk.ts
@@ -4,9 +4,7 @@ import { init as initSolidSDK } from '@sentry/solid';
import type { Client } from '@sentry/types';
/**
- * Initialize the client side of the Sentry SvelteKit SDK.
- *
- * @param options Configuration options for the SDK.
+ * Initializes the client side of the Solid Start SDK.
*/
export function init(options: BrowserOptions): Client | undefined {
const opts = {
diff --git a/packages/solidstart/src/server/index.ts b/packages/solidstart/src/server/index.ts
index e6b0368b7878..8b6ab6148fb8 100644
--- a/packages/solidstart/src/server/index.ts
+++ b/packages/solidstart/src/server/index.ts
@@ -121,7 +121,7 @@ export {
// We can still leave this for the carrier init and type exports
export * from '@sentry/node';
-export { withSentryErrorBoundary } from '@sentry/solid'
+export { withSentryErrorBoundary } from '@sentry/solid';
// -------------------------
// Solid Start SDK exports:
diff --git a/packages/solidstart/src/server/sdk.ts b/packages/solidstart/src/server/sdk.ts
index 0b37587e923d..86287f79ea75 100644
--- a/packages/solidstart/src/server/sdk.ts
+++ b/packages/solidstart/src/server/sdk.ts
@@ -3,8 +3,7 @@ import type { NodeClient, NodeOptions } from '@sentry/node';
import { init as initNodeSdk } from '@sentry/node';
/**
- *
- * @param options
+ * Initializes the server side of the Solid Start SDK
*/
export function init(options: NodeOptions): NodeClient | undefined {
const opts = {
diff --git a/packages/solidstart/src/server/solidrouter.ts b/packages/solidstart/src/server/solidrouter.ts
index 868ab454ecb2..e3ef7b4307ef 100644
--- a/packages/solidstart/src/server/solidrouter.ts
+++ b/packages/solidstart/src/server/solidrouter.ts
@@ -3,14 +3,18 @@ import { mergeProps, splitProps } from 'solid-js';
import type { Component, JSX, ParentProps } from 'solid-js';
import { createComponent } from 'solid-js/web';
+// We use @sentry/solid/solidrouter on the client.
+// On the server, we have to create matching components
+// in structure to avoid hydration errors.
+
/** Pass-through component in case user didn't specify a root **/
function SentryDefaultRoot(props: ParentProps): JSX.Element {
return props.children;
}
/**
- * Unfortunately, we cannot use router hooks directly in the Router, so we
- * need to wrap the `root` prop to instrument navigation.
+ * On the client, router hooks are used in the router's root render prop.
+ * This creates a matching structure that's purely pass-through to avoid hydration errors.
*/
function withSentryRouterRoot(Root: Component): Component {
const SentryRouterRoot = (props: RouteSectionProps): JSX.Element => {
@@ -23,7 +27,8 @@ function withSentryRouterRoot(Root: Component): Component[0]): JSX.Element => {
From 843812ecf766e3cdea39726d64729cda4e2007d1 Mon Sep 17 00:00:00 2001
From: Andrei Borza
Date: Tue, 2 Jul 2024 14:09:35 +0200
Subject: [PATCH 12/15] Add tests
---
packages/solid/test/errorboundary.test.tsx | 10 +-
packages/solid/test/sdk.test.ts | 2 +-
packages/solidstart/README.md | 31 ++-
.../test/client/errorboundary.test.tsx | 112 ++++++++++
packages/solidstart/test/client/sdk.test.ts | 42 ++++
.../test/client/solidrouter.test.tsx | 198 ++++++++++++++++++
.../test/server/errorboundary.test.tsx | 112 ++++++++++
packages/solidstart/test/server/sdk.test.ts | 42 ++++
.../test/server/solidrouter.test.tsx | 32 +++
packages/solidstart/test/tsconfig.json | 3 +
scripts/node-unit-tests.ts | 9 +-
11 files changed, 572 insertions(+), 21 deletions(-)
create mode 100644 packages/solidstart/test/client/errorboundary.test.tsx
create mode 100644 packages/solidstart/test/client/sdk.test.ts
create mode 100644 packages/solidstart/test/client/solidrouter.test.tsx
create mode 100644 packages/solidstart/test/server/errorboundary.test.tsx
create mode 100644 packages/solidstart/test/server/sdk.test.ts
create mode 100644 packages/solidstart/test/server/solidrouter.test.tsx
create mode 100644 packages/solidstart/test/tsconfig.json
diff --git a/packages/solid/test/errorboundary.test.tsx b/packages/solid/test/errorboundary.test.tsx
index f1e3f2c0e56a..ff907fc37af0 100644
--- a/packages/solid/test/errorboundary.test.tsx
+++ b/packages/solid/test/errorboundary.test.tsx
@@ -44,6 +44,7 @@ describe('withSentryErrorBoundary', () => {
it('calls `captureException` when an error occurs`', () => {
render(() => (
Ooops, an error occurred.}>
+ {/* @ts-expect-error: component doesn't exist on purpose */}
));
@@ -55,6 +56,7 @@ describe('withSentryErrorBoundary', () => {
it('renders the fallback component', async () => {
const { findByText } = render(() => (
Ooops, an error occurred.}>
+ {/* @ts-expect-error: component doesn't exist on purpose */}
));
@@ -65,11 +67,12 @@ describe('withSentryErrorBoundary', () => {
it('passes the `error` and `reset` function to the fallback component', () => {
const mockFallback = vi.fn();
- render(() => {
+ render(() => (
+ {/* @ts-expect-error: component doesn't exist on purpose */}
- ;
- });
+
+ ));
expect(mockFallback).toHaveBeenCalledTimes(1);
expect(mockFallback).toHaveBeenCalledWith(
@@ -81,6 +84,7 @@ describe('withSentryErrorBoundary', () => {
it('calls `captureException` again after resetting', async () => {
const { findByRole } = render(() => (
}>
+ {/* @ts-expect-error: component doesn't exist on purpose */}
));
diff --git a/packages/solid/test/sdk.test.ts b/packages/solid/test/sdk.test.ts
index 2b5547091ff7..c912eda2809a 100644
--- a/packages/solid/test/sdk.test.ts
+++ b/packages/solid/test/sdk.test.ts
@@ -6,7 +6,7 @@ import { init as solidInit } from '../src/sdk';
const browserInit = vi.spyOn(SentryBrowser, 'init');
-describe('Initialize Solid SDk', () => {
+describe('Initialize Solid SDK', () => {
beforeEach(() => {
vi.clearAllMocks();
});
diff --git a/packages/solidstart/README.md b/packages/solidstart/README.md
index eca4deb20def..0fa516148ac1 100644
--- a/packages/solidstart/README.md
+++ b/packages/solidstart/README.md
@@ -11,10 +11,9 @@
[![npm dt](https://img.shields.io/npm/dt/@sentry/solidstart.svg)](https://www.npmjs.com/package/@sentry/solidstart)
This SDK is considered ⚠️ **experimental and in an alpha state**. It may experience breaking changes. Please reach out
-on [GitHub](https://github.com/getsentry/sentry-javascript/issues/new/choose) if you have any feedback or concerns.
-This SDK is for [Solid Start](https://start.solidjs.com/).
-If you're using [Solid](https://www.solidjs.com/) see our Solid SDK here.
-
+on [GitHub](https://github.com/getsentry/sentry-javascript/issues/new/choose) if you have any feedback or concerns. This
+SDK is for [Solid Start](https://start.solidjs.com/). If you're using [Solid](https://www.solidjs.com/) see our Solid
+SDK here.
## Links
@@ -33,13 +32,13 @@ If the setup through the wizard doesn't work for you, you can also set up the SD
Install the Sentry Solid Start SDK:
- ```bash
- # Using npm
- npm install @sentry/solidstart
+```bash
+# Using npm
+npm install @sentry/solidstart
- # Using yarn
- yarn add @sentry/solidstart
- ```
+# Using yarn
+yarn add @sentry/solidstart
+```
### 2. Client-side Setup
@@ -47,14 +46,14 @@ Initialize the SDK in `entry-client.jsx`
```jsx
import * as Sentry from '@sentry/solidstart';
-import { mount, StartClient } from "@solidjs/start/client";
+import { mount, StartClient } from '@solidjs/start/client';
Sentry.init({
dsn: '__PUBLIC_DSN__',
tracesSampleRate: 1.0, // Capture 100% of the transactions
});
-mount(() => , document.getElementById("app"));
+mount(() => , document.getElementById('app'));
```
### 3. Server-side Setup
@@ -62,12 +61,12 @@ mount(() => , document.getElementById("app"));
Create an instrumentation file named `instrument.server.mjs` and add your initialization code for the server-side SDK.
```javascript
-import * as Sentry from "@sentry/solidstart";
+import * as Sentry from '@sentry/solidstart';
Sentry.init({
- dsn: "https://0e67f7dd5326d51506e92d7f1eff887a@o447951.ingest.us.sentry.io/4507459091824640",
- tracesSampleRate: 1.0, // Capture 100% of the transactions
-})
+ dsn: 'https://0e67f7dd5326d51506e92d7f1eff887a@o447951.ingest.us.sentry.io/4507459091824640',
+ tracesSampleRate: 1.0, // Capture 100% of the transactions
+});
```
### 4. Run your application
diff --git a/packages/solidstart/test/client/errorboundary.test.tsx b/packages/solidstart/test/client/errorboundary.test.tsx
new file mode 100644
index 000000000000..8ce4e31e89d2
--- /dev/null
+++ b/packages/solidstart/test/client/errorboundary.test.tsx
@@ -0,0 +1,112 @@
+/* eslint-disable @typescript-eslint/unbound-method */
+import type * as SentryBrowser from '@sentry/browser';
+import { createTransport, getCurrentScope, setCurrentClient } from '@sentry/core';
+import { render } from '@solidjs/testing-library';
+import userEvent from '@testing-library/user-event';
+import { vi } from 'vitest';
+
+import { ErrorBoundary } from 'solid-js';
+import { BrowserClient, withSentryErrorBoundary } from '../../src/client';
+
+const mockCaptureException = vi.fn();
+vi.mock('@sentry/browser', async () => {
+ const actual = await vi.importActual('@sentry/browser');
+ return {
+ ...actual,
+ captureException: (...args) => mockCaptureException(...args),
+ } as typeof SentryBrowser;
+});
+
+const user = userEvent.setup();
+const SentryErrorBoundary = withSentryErrorBoundary(ErrorBoundary);
+
+describe('withSentryErrorBoundary', () => {
+ function createMockBrowserClient(): BrowserClient {
+ return new BrowserClient({
+ integrations: [],
+ tracesSampleRate: 1,
+ transport: () => createTransport({ recordDroppedEvent: () => undefined }, _ => Promise.resolve({})),
+ stackParser: () => [],
+ });
+ }
+
+ beforeEach(() => {
+ vi.clearAllMocks();
+
+ const client = createMockBrowserClient();
+ setCurrentClient(client);
+ });
+
+ afterEach(() => {
+ getCurrentScope().setClient(undefined);
+ });
+
+ it('calls `captureException` when an error occurs`', () => {
+ render(() => (
+ Ooops, an error occurred.}>
+ {/* @ts-expect-error: component doesn't exist on purpose */}
+
+
+ ));
+
+ expect(mockCaptureException).toHaveBeenCalledTimes(1);
+ expect(mockCaptureException).toHaveBeenLastCalledWith(new ReferenceError('NonExistentComponent is not defined'));
+ });
+
+ it('renders the fallback component', async () => {
+ const { findByText } = render(() => (
+ Ooops, an error occurred.}>
+ {/* @ts-expect-error: component doesn't exist on purpose */}
+
+
+ ));
+
+ expect(await findByText('Ooops, an error occurred.')).toBeInTheDocument();
+ });
+
+ it('passes the `error` and `reset` function to the fallback component', () => {
+ const mockFallback = vi.fn();
+
+ render(() => (
+
+ {/* @ts-expect-error: component doesn't exist on purpose */}
+
+
+ ));
+
+ expect(mockFallback).toHaveBeenCalledTimes(1);
+ expect(mockFallback).toHaveBeenCalledWith(
+ new ReferenceError('NonExistentComponent is not defined'),
+ expect.any(Function),
+ );
+ });
+
+ it('calls `captureException` again after resetting', async () => {
+ const { findByRole } = render(() => (
+ }>
+ {/* @ts-expect-error: component doesn't exist on purpose */}
+
+
+ ));
+
+ expect(mockCaptureException).toHaveBeenCalledTimes(1);
+ expect(mockCaptureException).toHaveBeenNthCalledWith(1, new ReferenceError('NonExistentComponent is not defined'));
+
+ const button = await findByRole('button');
+ await user.click(button);
+
+ expect(mockCaptureException).toHaveBeenCalledTimes(2);
+ expect(mockCaptureException).toHaveBeenNthCalledWith(2, new ReferenceError('NonExistentComponent is not defined'));
+ });
+
+ it('renders children when there is no error', async () => {
+ const { queryByText } = render(() => (
+ Oops, an error occurred.}>
+