Skip to content
Closed
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 package.json
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@
"turbo": "^2.0.14",
"turbo-ignore": "^2.0.6",
"typedoc": "0.27.6",
"typedoc-plugin-missing-exports": "3.1.0",
"typedoc-plugin-markdown": "4.4.1",
"typescript": "catalog:repo",
"typescript-eslint": "8.21.0",
"uuid": "8.3.2",
Expand Down
2 changes: 1 addition & 1 deletion packages/backend/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"allowSyntheticDefaultImports": true,
"baseUrl": ".",
"declaration": true,
"declarationMap": false,
"declarationMap": true,
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true,
"importHelpers": true,
Expand Down
2 changes: 1 addition & 1 deletion packages/expo-passkeys/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"allowJs": true,
"baseUrl": ".",
"declaration": true,
"declarationMap": false,
"declarationMap": true,
"esModuleInterop": true,
"importHelpers": true,
"incremental": true,
Expand Down
2 changes: 1 addition & 1 deletion packages/expo/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"moduleResolution": "NodeNext",
"importHelpers": true,
"declaration": true,
"declarationMap": false,
"declarationMap": true,
"noImplicitReturns": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
Expand Down
2 changes: 1 addition & 1 deletion packages/express/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"compilerOptions": {
"declaration": true,
"declarationMap": false,
"declarationMap": true,
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true,
"importHelpers": true,
Expand Down
2 changes: 1 addition & 1 deletion packages/react-router/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"moduleResolution": "Bundler",
"importHelpers": true,
"declaration": true,
"declarationMap": false,
"declarationMap": true,
"noImplicitReturns": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
Expand Down
7 changes: 4 additions & 3 deletions packages/react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"exports": {
".": {
"import": {
"types": "./dist/index.d.mts",
"types": "./dist/index.d.ts",
"default": "./dist/index.mjs"
},
"require": {
Expand All @@ -35,7 +35,7 @@
},
"./internal": {
"import": {
"types": "./dist/internal.d.mts",
"types": "./dist/internal.d.ts",
"default": "./dist/internal.mjs"
},
"require": {
Expand All @@ -45,7 +45,7 @@
},
"./errors": {
"import": {
"types": "./dist/errors.d.mts",
"types": "./dist/errors.d.ts",
"default": "./dist/errors.mjs"
},
"require": {
Expand All @@ -63,6 +63,7 @@
],
"scripts": {
"build": "tsup",
"build:declarations": "tsc --emitDeclarationOnly --declaration",
"postbuild": "node ../../scripts/subpath-workaround.mjs react",
"clean": "rimraf ./dist",
"dev": "tsup --watch",
Expand Down
6 changes: 4 additions & 2 deletions packages/react/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
"compilerOptions": {
"baseUrl": ".",
"declaration": true,
"declarationMap": false,
"declarationMap": true,
"declarationDir": "./dist",
"esModuleInterop": true,
"emitDeclarationOnly": true,
"importHelpers": true,
Expand All @@ -21,5 +22,6 @@
"strict": true,
"target": "ES2019"
},
"include": ["src"]
"include": ["src"],
"exclude": ["**/__tests__/**/*"]
}
8 changes: 5 additions & 3 deletions packages/react/tsup.config.ts
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
import type { Options } from 'tsup';
import { defineConfig } from 'tsup';

import { runAfterLast } from '../../scripts/utils';
import { version as clerkJsVersion } from '../clerk-js/package.json';
import { name, version } from './package.json';

export default defineConfig(overrideOptions => {
const isWatch = !!overrideOptions.watch;
const shouldPublish = !!overrideOptions.env?.publish;

return {
const options: Options = {
entry: {
index: 'src/index.ts',
internal: 'src/internal.ts',
errors: 'src/errors.ts',
},
dts: true,
onSuccess: shouldPublish ? 'pnpm publish:local' : undefined,
format: ['cjs', 'esm'],
bundle: true,
clean: true,
Expand All @@ -28,4 +28,6 @@ export default defineConfig(overrideOptions => {
__DEV__: `${isWatch}`,
},
};

return runAfterLast(['pnpm build:declarations', shouldPublish && 'pnpm publish:local'])(options)
});
2 changes: 1 addition & 1 deletion packages/remix/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"moduleResolution": "NodeNext",
"importHelpers": true,
"declaration": true,
"declarationMap": false,
"declarationMap": true,
"noImplicitReturns": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
Expand Down
13 changes: 7 additions & 6 deletions packages/shared/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"exports": {
".": {
"import": {
"types": "./dist/index.d.mts",
"types": "./dist/index.d.ts",
"default": "./dist/index.mjs"
},
"require": {
Expand All @@ -22,7 +22,7 @@
},
"./*": {
"import": {
"types": "./dist/*.d.mts",
"types": "./dist/*.d.ts",
"default": "./dist/*.mjs"
},
"require": {
Expand All @@ -32,7 +32,7 @@
},
"./react": {
"import": {
"types": "./dist/react/index.d.mts",
"types": "./dist/react/index.d.ts",
"default": "./dist/react/index.mjs"
},
"require": {
Expand All @@ -42,7 +42,7 @@
},
"./utils": {
"import": {
"types": "./dist/utils/index.d.mts",
"types": "./dist/utils/index.d.ts",
"default": "./dist/utils/index.mjs"
},
"require": {
Expand All @@ -52,7 +52,7 @@
},
"./workerTimers": {
"import": {
"types": "./dist/workerTimers/index.d.mts",
"types": "./dist/workerTimers/index.d.ts",
"default": "./dist/workerTimers/index.mjs"
},
"require": {
Expand All @@ -62,7 +62,7 @@
},
"./dom": {
"import": {
"types": "./dist/dom/index.d.mts",
"types": "./dist/dom/index.d.ts",
"default": "./dist/dom/index.mjs"
},
"require": {
Expand Down Expand Up @@ -119,6 +119,7 @@
],
"scripts": {
"build": "tsup",
"build:declarations": "tsc --emitDeclarationOnly --declaration",
"postbuild": "node ../../scripts/subpath-workaround.mjs shared",
"clean": "rimraf ./dist",
"dev": "tsup --watch",
Expand Down
2 changes: 1 addition & 1 deletion packages/shared/src/telemetry/throttler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ export class TelemetryEventThrottler {
#generateKey(event: TelemetryEvent): string {
const { sk: _sk, pk: _pk, payload, ...rest } = event;

const sanitizedEvent = {
const sanitizedEvent: Omit<TelemetryEvent, 'sk' | 'pk' | 'payload'> & TelemetryEvent['payload'] = {
...payload,
...rest,
};
Expand Down
4 changes: 2 additions & 2 deletions packages/shared/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@
"declarationMap": true,
"outDir": "dist",
"resolveJsonModule": true,
"declarationDir": "dist/types",
"declarationDir": "./dist",
"jsx": "react",
"lib": ["ES6", "DOM", "WebWorker"],
"allowJs": true
},
"exclude": ["node_modules"],
"exclude": ["node_modules", "**/__tests__/**/*"],
"include": ["src", "global.d.ts"]
}
2 changes: 1 addition & 1 deletion packages/shared/tsup.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export default defineConfig(overrideOptions => {
clean: true,
minify: false,
sourcemap: true,
dts: true,
onSuccess: 'pnpm build:declarations',
external: ['react', 'react-dom'],
esbuildPlugins: [WebWorkerMinifyPlugin as any],
define: {
Expand Down
7 changes: 7 additions & 0 deletions packages/shared/typedoc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"$schema": "https://typedoc.org/schema.json",
"entryPoints": ["./src/index.ts", "./src/react/index.ts"],
"compilerOptions": {
"noImplicitAny": false
}
}
4 changes: 2 additions & 2 deletions packages/types/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,14 @@
"license": "MIT",
"author": "Clerk",
"main": "dist/index.js",
"module": "dist/esm/index.js",
"module": "dist/index.mjs",
"types": "dist/index.d.ts",
"files": [
"dist"
],
"scripts": {
"build": "tsup --env.NODE_ENV production",
"clean": "rimraf ./dist",
"build:declarations": "tsc --emitDeclarationOnly --declaration",
"dev": "tsup --watch",
"lint": "eslint src"
},
Expand Down
Loading
Loading