Skip to content

Commit

Permalink
chore(repo): Remove sdk-node references and dependencies (#4861)
Browse files Browse the repository at this point in the history
  • Loading branch information
wobsoriano authored Jan 10, 2025
1 parent b18307c commit 04276fe
Show file tree
Hide file tree
Showing 44 changed files with 180 additions and 3,949 deletions.
2 changes: 2 additions & 0 deletions .changeset/ten-tools-exist.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
---
---
3 changes: 0 additions & 3 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,6 @@ react-router:
remix:
- packages/remix/**

sdk-node:
- packages/sdk-node/**

tanstack:
- packages/tanstack-start/**

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ jobs:
run: |
if [ "${{ matrix.node-version }}" == "18" ]; then
echo "Running tests on Node 18 only for packages with LTS support."
pnpm turbo test $TURBO_ARGS --filter="@clerk/astro" --filter="@clerk/backend" --filter="@clerk/express" --filter="@clerk/nextjs" --filter="@clerk/clerk-react" --filter="@clerk/clerk-sdk-node" --filter="@clerk/shared" --filter="@clerk/remix" --filter="@clerk/tanstack-start" --filter="@clerk/elements" --filter="@clerk/vue" --filter="@clerk/nuxt" --filter="@clerk/clerk-expo"
pnpm turbo test $TURBO_ARGS --filter="@clerk/astro" --filter="@clerk/backend" --filter="@clerk/express" --filter="@clerk/nextjs" --filter="@clerk/clerk-react" --filter="@clerk/shared" --filter="@clerk/remix" --filter="@clerk/tanstack-start" --filter="@clerk/elements" --filter="@clerk/vue" --filter="@clerk/nuxt" --filter="@clerk/clerk-expo"
else
echo "Running tests for all packages on Node 22."
pnpm turbo test $TURBO_ARGS
Expand Down
3 changes: 0 additions & 3 deletions .jit/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,6 @@ folders:
- path: /packages/remix
exclude:
- ./**/*.test.ts
- path: /packages/sdk-node
exclude:
- ./**/*.test.ts
- path: /packages/shared
exclude:
- ./**/*.test.ts
Expand Down
1 change: 0 additions & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ coverage
coverage
dist
/packages/nextjs/examples
/packages/sdk-node/examples
node_modules
package-lock.json
pnpm-lock.yaml
Expand Down
3 changes: 1 addition & 2 deletions integration/presets/express.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,11 @@ import { linkPackage } from './utils';
const vite = applicationConfig()
.setName('express-vite')
.useTemplate(templates['express-vite'])
.setEnvFormatter('public', key => `VITE_${key}`)
.addScript('setup', 'pnpm install')
.addScript('dev', 'pnpm dev')
.addScript('build', 'pnpm build')
.addScript('serve', 'pnpm start')
.addDependency('@clerk/clerk-sdk-node', constants.E2E_CLERK_VERSION || linkPackage('sdk-node'));
.addDependency('@clerk/express', constants.E2E_CLERK_VERSION || linkPackage('express'));

export const express = {
vite,
Expand Down
11 changes: 5 additions & 6 deletions integration/templates/express-vite/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,16 @@
"start": "PORT=$PORT ts-node src/server/main.ts"
},
"dependencies": {
"dotenv": "^16.3.1",
"dotenv": "^16.4.7",
"ejs": "^3.1.6",
"express": "^4.18.2",
"ts-node": "^10.9.1",
"typescript": "^5.6.3",
"vite-express": "^0.11.0"
"vite-express": "^0.20.0"
},
"devDependencies": {
"@types/express": "^4.17.21",
"@types/node": "^18.19.33",
"nodemon": "^2.0.22",
"vite": "^4.0.4"
"@types/node": "^20.9.3",
"typescript": "^5.6.3",
"vite": "^5.0.2"
}
}
26 changes: 17 additions & 9 deletions integration/templates/express-vite/src/server/main.ts
Original file line number Diff line number Diff line change
@@ -1,44 +1,52 @@
// Should be at the top of the file - used to load clerk secret key
import * as dotenv from 'dotenv';
dotenv.config();
import 'dotenv/config';

import { clerkClient } from '@clerk/clerk-sdk-node';
import { clerkMiddleware } from '@clerk/express';
import express from 'express';
import ViteExpress from 'vite-express';

const app = express();

app.use(clerkMiddleware());
app.set('view engine', 'ejs');
app.set('views', 'src/views');

app.get('/api/protected', [clerkClient.expressRequireAuth() as any], (_req: any, res: any) => {
res.send('Protected API response').end();
const legacyRequireAuth = (req: any, _res: any, next: any) => {
if (!req.auth.userId) {
return next(new Error('Unauthenticated'));
}

next();
};

app.get('/api/protected', legacyRequireAuth, (_req: any, res: any, _next: any) => {
return res.send('Protected API response');
});

app.get('/sign-in', (_req: any, res: any) => {
return res.render('sign-in.ejs', {
publishableKey: process.env.VITE_CLERK_PUBLISHABLE_KEY,
publishableKey: process.env.CLERK_PUBLISHABLE_KEY,
signInUrl: process.env.CLERK_SIGN_IN_URL,
});
});

app.get('/', (_req: any, res: any) => {
return res.render('index.ejs', {
publishableKey: process.env.VITE_CLERK_PUBLISHABLE_KEY,
publishableKey: process.env.CLERK_PUBLISHABLE_KEY,
signInUrl: process.env.CLERK_SIGN_IN_URL,
});
});

app.get('/sign-up', (_req: any, res: any) => {
return res.render('sign-up.ejs', {
publishableKey: process.env.VITE_CLERK_PUBLISHABLE_KEY,
publishableKey: process.env.CLERK_PUBLISHABLE_KEY,
signUpUrl: process.env.CLERK_SIGN_UP_URL,
});
});

app.get('/protected', (_req: any, res: any) => {
return res.render('protected.ejs', {
publishableKey: process.env.VITE_CLERK_PUBLISHABLE_KEY,
publishableKey: process.env.CLERK_PUBLISHABLE_KEY,
signInUrl: process.env.CLERK_SIGN_IN_URL,
signUpUrl: process.env.CLERK_SIGN_UP_URL,
});
Expand Down
4 changes: 0 additions & 4 deletions packages/sdk-node/.eslintrc.js

This file was deleted.

8 changes: 0 additions & 8 deletions packages/sdk-node/.gitignore

This file was deleted.

3 changes: 0 additions & 3 deletions packages/sdk-node/.npmignore

This file was deleted.

Loading

0 comments on commit 04276fe

Please sign in to comment.