Skip to content
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

ref(solidstart): Simplify middleware structure without subexport #13494

Merged
merged 2 commits into from
Aug 28, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions packages/solidstart/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,10 @@ Sentry.init({

### 4. Server instrumentation

Complete the setup by adding the Sentry middlware to your `src/middleware.ts` file:
Complete the setup by adding the Sentry middleware to your `src/middleware.ts` file:

```typescript
import { sentryBeforeResponseMiddleware } from '@sentry/solidstart/middleware';
import { sentryBeforeResponseMiddleware } from '@sentry/solidstart';
import { createMiddleware } from '@solidjs/start/middleware';

export default createMiddleware({
Expand Down
13 changes: 1 addition & 12 deletions packages/solidstart/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,17 +39,6 @@
"require": "./build/cjs/index.server.js"
}
},
"./middleware": {
"types": "./middleware.d.ts",
"import": {
"types": "./middleware.d.ts",
"default": "./build/esm/middleware.js"
},
"require": {
"types": "./middleware.d.ts",
"default": "./build/cjs/middleware.js"
}
},
"./solidrouter": {
"types": "./solidrouter.d.ts",
"browser": {
Expand Down Expand Up @@ -106,7 +95,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.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.ts && madge --circular src/middleware.ts",
"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.ts",
"clean": "rimraf build coverage sentry-solidstart-*.tgz ./*.d.ts ./*.d.ts.map ./client ./server",
"fix": "eslint . --format stylish --fix",
"lint": "eslint . --format stylish",
Expand Down
1 change: 0 additions & 1 deletion packages/solidstart/rollup.npm.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ export default makeNPMConfigVariants(
'src/solidrouter.server.ts',
'src/client/solidrouter.ts',
'src/server/solidrouter.ts',
'src/middleware.ts',
],
// 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)
Expand Down
1 change: 1 addition & 0 deletions packages/solidstart/src/server/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -128,3 +128,4 @@ export { withSentryErrorBoundary } from '@sentry/solid';
export { init } from './sdk';

export * from './withServerActionInstrumentation';
export * from './middleware';
1 change: 0 additions & 1 deletion packages/solidstart/tsconfig.subexports-types.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
"src/solidrouter.server.ts",
"src/server/solidrouter.ts",
"src/solidrouter.ts",
"src/middleware.ts",
],
// Without this, we cannot output into the root dir
"exclude": []
Expand Down
1 change: 0 additions & 1 deletion packages/solidstart/tsconfig.types.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,5 @@
"src/solidrouter.server.ts",
"src/server/solidrouter.ts",
"src/solidrouter.ts",
"src/middleware.ts",
]
}
Loading