Skip to content

feat(solid): Rename solidjs package to solid #12436

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1014,7 +1014,7 @@ jobs:
'react-router-6-use-routes',
'react-router-5',
'react-router-6',
'solidjs',
'solid',
'svelte-5',
'sveltekit',
'sveltekit-2',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "solidjs",
"name": "solid",
"version": "0.0.0",
"description": "",
"scripts": {
Expand Down Expand Up @@ -28,6 +28,6 @@
"dependencies": {
"@solidjs/router": "^0.13.5",
"solid-js": "^1.8.11",
"@sentry/solidjs": "latest || *"
"@sentry/solid": "latest || *"
}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* @refresh reload */
import * as Sentry from '@sentry/solidjs';
import * as Sentry from '@sentry/solid';
import { Router, useBeforeLeave, useLocation } from '@solidjs/router';
import { render } from 'solid-js/web';
import './index.css';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as Sentry from '@sentry/solidjs';
import * as Sentry from '@sentry/solid';
import { ErrorBoundary } from 'solid-js';

const SentryErrorBoundary = Sentry.withSentryErrorBoundary(ErrorBoundary);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export default function Home() {
class="border rounded-lg px-2 mb-2 border-red-500 text-red-500 cursor-pointer"
id="errorBtn"
onClick={() => {
throw new Error('Error thrown from SolidJS E2E test app');
throw new Error('Error thrown from Solid E2E test app');
}}
>
Throw error
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ import { startEventProxyServer } from '@sentry-internal/test-utils';

startEventProxyServer({
port: 3031,
proxyServerName: 'solidjs',
proxyServerName: 'solid',
});
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { expect, test } from '@playwright/test';
import { waitForError } from '@sentry-internal/test-utils';

test('captures an exception', async ({ page }) => {
const errorEventPromise = waitForError('solidjs', errorEvent => {
const errorEventPromise = waitForError('solid', errorEvent => {
return !errorEvent.type;
});

Expand All @@ -26,7 +26,7 @@ test('captures an exception', async ({ page }) => {
});

test('captures a second exception after resetting the boundary', async ({ page }) => {
const firstErrorEventPromise = waitForError('solidjs', errorEvent => {
const firstErrorEventPromise = waitForError('solid', errorEvent => {
return !errorEvent.type;
});

Expand All @@ -48,7 +48,7 @@ test('captures a second exception after resetting the boundary', async ({ page }
transaction: '/error-boundary-example',
});

const secondErrorEventPromise = waitForError('solidjs', errorEvent => {
const secondErrorEventPromise = waitForError('solid', errorEvent => {
return !errorEvent.type;
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { expect, test } from '@playwright/test';
import { waitForError } from '@sentry-internal/test-utils';

test('sends an error', async ({ page }) => {
const errorPromise = waitForError('solidjs', async errorEvent => {
const errorPromise = waitForError('solid', async errorEvent => {
return !errorEvent.type;
});

Expand All @@ -15,7 +15,7 @@ test('sends an error', async ({ page }) => {
values: [
{
type: 'Error',
value: 'Error thrown from SolidJS E2E test app',
value: 'Error thrown from Solid E2E test app',
mechanism: {
type: 'onerror',
handled: false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { expect, test } from '@playwright/test';
import { waitForTransaction } from '@sentry-internal/test-utils';

test('sends a pageload transaction', async ({ page }) => {
const transactionPromise = waitForTransaction('solidjs', async transactionEvent => {
const transactionPromise = waitForTransaction('solid', async transactionEvent => {
return !!transactionEvent?.transaction && transactionEvent.contexts?.trace?.op === 'pageload';
});

Expand All @@ -23,7 +23,7 @@ test('sends a pageload transaction', async ({ page }) => {
});

test('sends a navigation transaction', async ({ page }) => {
const transactionPromise = waitForTransaction('solidjs', async transactionEvent => {
const transactionPromise = waitForTransaction('solid', async transactionEvent => {
return !!transactionEvent?.transaction && transactionEvent.contexts?.trace?.op === 'navigation';
});

Expand All @@ -35,7 +35,7 @@ test('sends a navigation transaction', async ({ page }) => {
contexts: {
trace: {
op: 'navigation',
origin: 'auto.navigation.solidjs.solidrouter',
origin: 'auto.navigation.solid.solidrouter',
},
},
transaction: '/user/5',
Expand All @@ -49,7 +49,7 @@ test('updates the transaction when using the back button', async ({ page }) => {
// Solid Router sends a `-1` navigation when using the back button.
// The sentry solidRouterBrowserTracingIntegration tries to update such
// transactions with the proper name once the `useLocation` hook triggers.
const navigationTxnPromise = waitForTransaction('solidjs', async transactionEvent => {
const navigationTxnPromise = waitForTransaction('solid', async transactionEvent => {
return !!transactionEvent?.transaction && transactionEvent.contexts?.trace?.op === 'navigation';
});

Expand All @@ -61,7 +61,7 @@ test('updates the transaction when using the back button', async ({ page }) => {
contexts: {
trace: {
op: 'navigation',
origin: 'auto.navigation.solidjs.solidrouter',
origin: 'auto.navigation.solid.solidrouter',
},
},
transaction: '/user/5',
Expand All @@ -70,7 +70,7 @@ test('updates the transaction when using the back button', async ({ page }) => {
},
});

const backNavigationTxnPromise = waitForTransaction('solidjs', async transactionEvent => {
const backNavigationTxnPromise = waitForTransaction('solid', async transactionEvent => {
return !!transactionEvent?.transaction && transactionEvent.contexts?.trace?.op === 'navigation';
});

Expand All @@ -80,7 +80,7 @@ test('updates the transaction when using the back button', async ({ page }) => {
contexts: {
trace: {
op: 'navigation',
origin: 'auto.navigation.solidjs.solidrouter',
origin: 'auto.navigation.solid.solidrouter',
},
},
transaction: '/',
Expand Down
2 changes: 1 addition & 1 deletion dev-packages/e2e-tests/verdaccio-config/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ packages:
unpublish: $all
# proxy: npmjs # Don't proxy for E2E tests!

'@sentry/solidjs':
'@sentry/solid':
access: $all
publish: $all
unpublish: $all
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
"packages/replay-internal",
"packages/replay-canvas",
"packages/replay-worker",
"packages/solidjs",
"packages/solid",
"packages/svelte",
"packages/sveltekit",
"packages/types",
Expand Down
File renamed without changes.
File renamed without changes.
12 changes: 6 additions & 6 deletions packages/solidjs/README.md → packages/solid/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
</a>
</p>

# Official Sentry SDK for SolidJS
# Official Sentry SDK for Solid

[![npm version](https://img.shields.io/npm/v/@sentry/solidjs.svg)](https://www.npmjs.com/package/@sentry/solidjs)
[![npm dm](https://img.shields.io/npm/dm/@sentry/solidjs.svg)](https://www.npmjs.com/package/@sentry/solidjs)
[![npm dt](https://img.shields.io/npm/dt/@sentry/solidjs.svg)](https://www.npmjs.com/package/@sentry/solidjs)
[![npm version](https://img.shields.io/npm/v/@sentry/solid.svg)](https://www.npmjs.com/package/@sentry/solid)
[![npm dm](https://img.shields.io/npm/dm/@sentry/solid.svg)](https://www.npmjs.com/package/@sentry/solid)
[![npm dt](https://img.shields.io/npm/dt/@sentry/solid.svg)](https://www.npmjs.com/package/@sentry/solid)

This SDK is work in progress, and should not be used before officially released.

Expand All @@ -30,7 +30,7 @@ Wrap `Router`, `MemoryRouter` or `HashRouter` from `@solidjs/router` using `Sent
creates a higher order component, which will enable Sentry to reach your router context.

```js
import * as Sentry from '@sentry/solidjs';
import * as Sentry from '@sentry/solid';
import { Route, Router, useBeforeLeave, useLocation } from '@solidjs/router';

Sentry.init({
Expand Down Expand Up @@ -58,7 +58,7 @@ To automatically capture exceptions from inside a component tree and render a fa
JS `ErrorBoundary` component with `Sentry.withSentryErrorBoundary`.

```js
import * as Sentry from '@sentry/solidjs';
import * as Sentry from '@sentry/solid';
import { ErrorBoundary } from 'solid-js';

Sentry.init({
Expand Down
8 changes: 4 additions & 4 deletions packages/solidjs/package.json → packages/solid/package.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"name": "@sentry/solidjs",
"name": "@sentry/solid",
"version": "8.8.0",
"description": "Official Sentry SDK for SolidJS",
"description": "Official Sentry SDK for Solid",
"repository": "git://github.com/getsentry/sentry-javascript.git",
"homepage": "https://github.com/getsentry/sentry-javascript/tree/master/packages/solidjs",
"homepage": "https://github.com/getsentry/sentry-javascript/tree/master/packages/solid",
"author": "Sentry",
"license": "MIT",
"engines": {
Expand Down Expand Up @@ -71,7 +71,7 @@
"build:types:watch": "tsc -p tsconfig.types.json --watch",
"build:tarball": "ts-node ../../scripts/prepack.ts && npm pack ./build",
"circularDepCheck": "madge --circular src/index.ts",
"clean": "rimraf build coverage sentry-solidjs-*.tgz",
"clean": "rimraf build coverage sentry-solid-*.tgz",
"fix": "eslint . --format stylish --fix",
"lint": "eslint . --format stylish",
"test": "vitest run",
Expand Down
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions packages/solidjs/src/sdk.ts → packages/solid/src/sdk.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@ import { init as browserInit } from '@sentry/browser';
import { applySdkMetadata } from '@sentry/core';

/**
* Initializes the SolidJS SDK
* Initializes the Solid SDK
*/
export function init(options: BrowserOptions): void {
const opts = {
...options,
};

applySdkMetadata(opts, 'solidjs');
applySdkMetadata(opts, 'solid');

browserInit(opts);
}
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ function handleNavigation(location: string): void {
name: location,
attributes: {
[SEMANTIC_ATTRIBUTE_SENTRY_OP]: 'navigation',
[SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.navigation.solidjs.solidrouter',
[SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.navigation.solid.solidrouter',
[SEMANTIC_ATTRIBUTE_SENTRY_SOURCE]: 'url',
},
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { init as solidInit } from '../src/sdk';

const browserInit = vi.spyOn(SentryBrowser, 'init');

describe('Initialize SolidJS SDk', () => {
describe('Initialize Solid SDk', () => {
beforeEach(() => {
vi.clearAllMocks();
});
Expand All @@ -19,8 +19,8 @@ describe('Initialize SolidJS SDk', () => {
const expectedMetadata = {
_metadata: {
sdk: {
name: 'sentry.javascript.solidjs',
packages: [{ name: 'npm:@sentry/solidjs', version: SDK_VERSION }],
name: 'sentry.javascript.solid',
packages: [{ name: 'npm:@sentry/solid', version: SDK_VERSION }],
version: SDK_VERSION,
},
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ describe('solidRouterBrowserTracingIntegration', () => {
data: expect.objectContaining({
[SEMANTIC_ATTRIBUTE_SENTRY_SOURCE]: 'url',
[SEMANTIC_ATTRIBUTE_SENTRY_OP]: 'navigation',
[SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.navigation.solidjs.solidrouter',
[SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.navigation.solid.solidrouter',
}),
}),
);
Expand Down Expand Up @@ -173,7 +173,7 @@ describe('solidRouterBrowserTracingIntegration', () => {
data: expect.objectContaining({
[SEMANTIC_ATTRIBUTE_SENTRY_SOURCE]: 'url',
[SEMANTIC_ATTRIBUTE_SENTRY_OP]: 'navigation',
[SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.navigation.solidjs.solidrouter',
[SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.navigation.solid.solidrouter',
}),
}),
);
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion scripts/node-unit-tests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const DEFAULT_SKIP_TESTS_PACKAGES = [
'@sentry/vue',
'@sentry/react',
'@sentry/angular',
'@sentry/solidjs',
'@sentry/solid',
'@sentry/svelte',
'@sentry/profiling-node',
'@sentry-internal/browser-utils',
Expand Down
Loading
Loading