Skip to content

Commit

Permalink
chore: clean up packages (NangoHQ#2932)
Browse files Browse the repository at this point in the history
## Describe your changes

- Upgrade some non consequential packages
- Remove some unused packages
- Add missing packages
  • Loading branch information
bodinsamuel authored Nov 4, 2024
1 parent f62f0d0 commit e0636fe
Show file tree
Hide file tree
Showing 16 changed files with 311 additions and 415 deletions.
631 changes: 262 additions & 369 deletions package-lock.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion packages/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
"js-yaml": "^4.1.0",
"npm-package-arg": "^10.1.0",
"promptly": "^3.2.0",
"semver": "^7.5.2",
"semver": "^7.5.4",
"ts-json-schema-generator": "^2.3.0",
"ts-node": "^10.9.1",
"tsup": "^8.1.0",
Expand Down
8 changes: 4 additions & 4 deletions packages/connect-ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"@nangohq/types": "file:../types",
"@radix-ui/react-label": "2.1.0",
"@radix-ui/react-slot": "1.1.0",
"@tabler/icons-react": "3.17.0",
"@tabler/icons-react": "3.21.0",
"@tanstack/react-query": "5.56.2",
"@tanstack/react-router": "1.58.3",
"@types/react": "18.3.3",
Expand All @@ -24,14 +24,14 @@
"class-variance-authority": "0.7.0",
"clsx": "2.1.1",
"globals": "15.9.0",
"postcss": "8.4.45",
"postcss": "8.4.47",
"react": "18.3.1",
"react-dom": "18.3.1",
"react-error-boundary": "4.0.13",
"react-hook-form": "7.53.0",
"react-use": "17.5.1",
"tailwind-merge": "2.5.2",
"tailwindcss": "3.4.11",
"tailwind-merge": "2.5.4",
"tailwindcss": "3.4.14",
"tailwindcss-animate": "1.0.7",
"typescript": "5.5.3",
"vite": "5.4.6",
Expand Down
6 changes: 3 additions & 3 deletions packages/jobs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,21 +23,21 @@
"@nangohq/nango-runner": "file:../runner",
"@nangohq/shared": "file:../shared",
"@nangohq/records": "file:../records",
"@nangohq/types": "file:../types",
"@nangohq/utils": "file:../utils",
"@nangohq/webhooks": "file:../webhooks",
"axios": "^1.7.4",
"dd-trace": "5.21.0",
"dotenv": "16.0.3",
"get-port": "7.1.0",
"express": "4.20.0",
"node-cron": "3.0.3",
"zod": "3.23.8"
},
"devDependencies": {
"@types/node": "^20.12.2",
"nodemon": "^3.0.1",
"nodemon": "3.1.7",
"typescript": "5.3.3",
"type-fest": "4.25.0",
"type-fest": "4.26.1",
"vitest": "1.6.0"
}
}
3 changes: 3 additions & 0 deletions packages/jobs/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@
{
"path": "../runner"
},
{
"path": "../types"
},
{
"path": "../utils"
},
Expand Down
15 changes: 8 additions & 7 deletions packages/logs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,18 @@
"@elastic/elasticsearch": "8.13.1",
"@nangohq/kvstore": "file:../kvstore",
"@nangohq/utils": "file:../utils",
"@opentelemetry/api": "^1.9.0",
"@opentelemetry/exporter-trace-otlp-http": "^0.54.0",
"@opentelemetry/resources": "^1.27.0",
"@opentelemetry/sdk-trace-base": "^1.27.0",
"@opentelemetry/sdk-trace-node": "^1.27.0",
"@opentelemetry/semantic-conventions": "^1.27.0",
"@opentelemetry/api": "1.9.0",
"@opentelemetry/core": "1.27.0",
"@opentelemetry/exporter-trace-otlp-http": "0.54.0",
"@opentelemetry/resources": "1.27.0",
"@opentelemetry/sdk-trace-base": "1.27.0",
"@opentelemetry/sdk-trace-node": "1.27.0",
"@opentelemetry/semantic-conventions": "1.27.0",
"zod": "3.23.8"
},
"devDependencies": {
"@nangohq/types": "file:../types",
"type-fest": "4.25.0",
"type-fest": "4.26.1",
"vitest": "1.6.0"
},
"files": [
Expand Down
2 changes: 1 addition & 1 deletion packages/orchestrator/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
},
"devDependencies": {
"@nangohq/types": "file:../types",
"type-fest": "4.25.0",
"type-fest": "4.26.1",
"@types/node": "20.12.2",
"vitest": "1.6.0"
}
Expand Down
1 change: 1 addition & 0 deletions packages/persist/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
"@nangohq/logs": "file:../logs",
"@nangohq/records": "file:../records",
"@nangohq/shared": "file:../shared",
"@nangohq/types": "file:../types",
"@nangohq/utils": "file:../utils",
"dd-trace": "5.21.0",
"express": "^4.20.0",
Expand Down
3 changes: 3 additions & 0 deletions packages/persist/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@
{
"path": "../shared"
},
{
"path": "../types"
},
{
"path": "../utils"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/scheduler/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"uuidv7": "0.6.3"
},
"devDependencies": {
"type-fest": "4.25.0",
"type-fest": "4.26.1",
"vitest": "1.6.0"
}
}
10 changes: 5 additions & 5 deletions packages/server/lib/services/connectSession.service.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type knex from 'knex';
import type { Knex } from '@nangohq/database';
import * as keystore from '@nangohq/keystore';
import type { ConnectSession } from '@nangohq/types';
import { Err, Ok } from '@nangohq/utils';
Expand Down Expand Up @@ -57,7 +57,7 @@ export class ConnectSessionError extends Error {
}

export async function createConnectSession(
db: knex.Knex,
db: Knex,
{
endUserId,
accountId,
Expand Down Expand Up @@ -87,7 +87,7 @@ export async function createConnectSession(
}

export async function getConnectSession(
db: knex.Knex,
db: Knex,
{
id,
accountId,
Expand All @@ -105,7 +105,7 @@ export async function getConnectSession(
return Ok(ConnectSessionMapper.from(session));
}

export async function getConnectSessionByToken(db: knex.Knex, token: string): Promise<Result<ConnectSession, ConnectSessionError>> {
export async function getConnectSessionByToken(db: Knex, token: string): Promise<Result<ConnectSession, ConnectSessionError>> {
const getSession = await keystore.getPrivateKey(db, token);
if (getSession.isErr()) {
return Err(new ConnectSessionError({ code: 'not_found', message: `Token not found`, payload: { token: `${token.substring(0, 32)}...` } }));
Expand All @@ -119,7 +119,7 @@ export async function getConnectSessionByToken(db: knex.Knex, token: string): Pr
}

export async function deleteConnectSession(
db: knex.Knex,
db: Knex,
{
id,
accountId,
Expand Down
14 changes: 7 additions & 7 deletions packages/server/lib/services/endUser.service.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type knex from 'knex';
import type { Knex } from '@nangohq/database';
import type { DBEndUser, DBInsertEndUser, EndUser, StoredConnection } from '@nangohq/types';
import { Err, Ok } from '@nangohq/utils';
import type { Result } from '@nangohq/utils';
Expand Down Expand Up @@ -52,7 +52,7 @@ export class EndUserError extends Error {
}

export async function createEndUser(
db: knex.Knex,
db: Knex,
{
endUserId,
email,
Expand Down Expand Up @@ -85,7 +85,7 @@ export async function createEndUser(
}

export async function getEndUser(
db: knex.Knex,
db: Knex,
props: { endUserId: string; accountId: number; environmentId: number } | { id: number; accountId: number; environmentId: number }
): Promise<Result<EndUser, EndUserError>> {
const endUser = await db<DBEndUser>(END_USERS_TABLE)
Expand All @@ -108,7 +108,7 @@ export async function getEndUser(
}

export async function updateEndUser(
db: knex.Knex,
db: Knex,
{
endUserId,
accountId,
Expand Down Expand Up @@ -141,7 +141,7 @@ export async function updateEndUser(
}

export async function deleteEndUser(
db: knex.Knex,
db: Knex,
{ endUserId, accountId, environmentId }: { endUserId: string; accountId: number; environmentId: number }
): Promise<Result<void, EndUserError>> {
const deleted = await db<DBEndUser>(END_USERS_TABLE).where({ end_user_id: endUserId, account_id: accountId, environment_id: environmentId }).delete();
Expand All @@ -151,10 +151,10 @@ export async function deleteEndUser(
return Ok(undefined);
}

export async function linkConnection(db: knex.Knex, { endUserId, connection }: { endUserId: number; connection: Pick<StoredConnection, 'id'> }) {
export async function linkConnection(db: Knex, { endUserId, connection }: { endUserId: number; connection: Pick<StoredConnection, 'id'> }) {
await db<StoredConnection>('_nango_connections').where({ id: connection.id! }).update({ end_user_id: endUserId });
}

export async function unlinkConnection(db: knex.Knex, { connection }: { connection: Pick<StoredConnection, 'id'> }) {
export async function unlinkConnection(db: Knex, { connection }: { connection: Pick<StoredConnection, 'id'> }) {
await db<StoredConnection>('_nango_connections').where({ id: connection.id! }).update({ end_user_id: null });
}
4 changes: 2 additions & 2 deletions packages/server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,8 @@
"@types/uuid": "8.3.4",
"@types/ws": "8.5.4",
"get-port": "7.1.0",
"nodemon": "3.0.1",
"type-fest": "4.25.0",
"nodemon": "3.1.7",
"type-fest": "4.26.1",
"typescript": "5.3.3",
"vitest": "1.6.0"
}
Expand Down
11 changes: 3 additions & 8 deletions packages/shared/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,12 @@
"@nangohq/nango-yaml": "^0.42.20",
"@nangohq/node": "^0.42.20",
"@nangohq/utils": "file:../utils",
"@sentry/node": "^7.106.0",
"@sentry/node": "^7.119.2",
"ajv": "^8.12.0",
"ajv-formats": "^3.0.1",
"archiver": "^6.0.1",
"axios": "^1.7.4",
"braintree": "^3.15.0",
"dayjs": "^1.11.7",
"dayjs-plugin-utc": "^0.1.2",
"dd-trace": "5.21.0",
"exponential-backoff": "^3.1.1",
"form-data": "4.0.0",
Expand All @@ -42,7 +40,7 @@
"ms": "3.0.0-canary.1",
"oauth-1.0a": "2.2.6",
"parse-link-header": "^2.0.0",
"posthog-node": "^3.1.3",
"posthog-node": "^3.6.3",
"qs": "^6.11.2",
"redis": "4.6.13",
"semver": "^7.5.4",
Expand All @@ -56,12 +54,9 @@
"devDependencies": {
"@nangohq/logs": "file:../logs",
"@nangohq/nango-orchestrator": "file:../orchestrator",
"@nangohq/records": "file:../records",
"@nangohq/types": "^0.42.20",
"@nangohq/webhooks": "file:../webhooks",
"@sentry/types": "7.112.2",
"@types/braintree": "^3.3.12",
"@types/ip": "^1.1.0",
"@types/js-yaml": "^4.0.5",
"@types/json-schema": "7.0.15",
"@types/lodash-es": "^4.17.10",
Expand All @@ -71,7 +66,7 @@
"express": "^4.20.0",
"json-schema": "0.4.0",
"knex": "3.1.0",
"type-fest": "4.25.0",
"type-fest": "4.26.1",
"typescript": "^5.3.3",
"vitest": "1.6.0"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/types/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"@types/json-schema": "7.0.15",
"axios": "^1.7.4",
"json-schema": "0.4.0",
"type-fest": "4.25.0"
"type-fest": "4.26.1"
},
"license": "SEE LICENSE IN LICENSE FILE IN GIT REPOSITORY",
"files": [
Expand Down
12 changes: 6 additions & 6 deletions packages/webapp/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@
"@radix-ui/react-select": "2.1.1",
"@radix-ui/react-toast": "1.2.1",
"@radix-ui/react-tooltip": "1.1.2",
"@sentry/react": "8.27.0",
"@tabler/icons-react": "3.14.0",
"@sentry/react": "8.36.0",
"@tabler/icons-react": "3.21.0",
"@tailwindcss/forms": "0.5.8",
"@tanstack/react-table": "8.20.5",
"@types/lodash": "4.17.7",
Expand All @@ -66,9 +66,9 @@
"env-cmd": "10.1.0",
"httpsnippet-lite": "3.0.5",
"lodash": "4.17.21",
"postcss": "8.4.41",
"postcss": "8.4.47",
"postcss-loader": "8.1.1",
"posthog-js": "1.158.3",
"posthog-js": "1.179.0",
"react": "18.3.1",
"react-day-picker": "8.10.1",
"react-dom": "18.3.1",
Expand All @@ -80,8 +80,8 @@
"recharts": "2.12.7",
"stringify-object": "5.0.0",
"swr": "2.2.5",
"tailwind-merge": "2.5.2",
"tailwindcss": "3.4.10",
"tailwind-merge": "2.5.4",
"tailwindcss": "3.4.14",
"typescript": "5.3.3",
"vaul": "0.9.1",
"web-vitals": "2.1.4",
Expand Down

0 comments on commit e0636fe

Please sign in to comment.