-
Notifications
You must be signed in to change notification settings - Fork 259
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(sdks): Add sdkMetadata to Clerk singleton, populate it for each …
…SDK (#1857) * feat(repo): Add sdkMetadata to Clerk singleton, populate it for each SDK * chore(repo): Add changeset * chore(repo): Adjust changeset * feat(chrome-extension): Fix types * chore(chrome-extension): Fix jest config * fix(nextjs): Fix variable names * feat(repo): Introduce tsup to all remaining packages * chore(repo): Excldue .tsbuildinfo files from git * feat(clerk-expo): Adjust how we set sdkMetadata
- Loading branch information
Showing
33 changed files
with
315 additions
and
88 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
--- | ||
'gatsby-plugin-clerk': patch | ||
'@clerk/clerk-js': patch | ||
'@clerk/chrome-extension': patch | ||
'@clerk/fastify': patch | ||
'@clerk/nextjs': patch | ||
'@clerk/clerk-react': patch | ||
'@clerk/remix': patch | ||
'@clerk/types': patch | ||
'@clerk/clerk-expo': patch | ||
--- | ||
|
||
Introduce a new property on the core Clerk singleton, `sdkMetadata`. This will be populated by each host SDK. This metadata will be used to make logging and debugging easier. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -39,6 +39,7 @@ yarn-error.log | |
testem.log | ||
/typings | ||
**/coverage/** | ||
*.tsbuildinfo | ||
|
||
# System Files | ||
.DS_Store | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
export {}; | ||
|
||
declare global { | ||
const PACKAGE_NAME: string; | ||
const PACKAGE_VERSION: string; | ||
const __DEV__: boolean; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
export {}; | ||
|
||
declare global { | ||
const PACKAGE_NAME: string; | ||
const PACKAGE_VERSION: string; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
"extends": "./tsconfig.json", | ||
"compilerOptions": { | ||
"skipLibCheck": true, | ||
"noEmit": false, | ||
"declaration": true, | ||
"emitDeclarationOnly": true, | ||
"declarationMap": true, | ||
"sourceMap": false, | ||
"declarationDir": "./dist" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,26 @@ | ||
{ | ||
"extends": "./tsconfig.build.json", | ||
"compilerOptions": { | ||
"outDir": "dist", | ||
"baseUrl": ".", | ||
"lib": ["es6", "dom"], | ||
"jsx": "react", | ||
"module": "commonjs", | ||
"moduleResolution": "node", | ||
"importHelpers": true, | ||
"declaration": true, | ||
"declarationMap": false, | ||
"noImplicitReturns": true, | ||
"noUnusedLocals": true, | ||
"noUnusedParameters": true, | ||
"resolveJsonModule": true, | ||
"sourceMap": false, | ||
"strict": true, | ||
"esModuleInterop": true, | ||
"skipLibCheck": true, | ||
"allowJs": true, | ||
"target": "ES2019", | ||
"noEmitOnError": false, | ||
"incremental": true | ||
} | ||
}, | ||
"include": ["src"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
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; | ||
|
||
const options: Options = { | ||
format: 'cjs', | ||
outDir: './dist', | ||
entry: ['./src/**/*.{ts,tsx,js,jsx}'], | ||
bundle: false, | ||
clean: true, | ||
minify: false, | ||
sourcemap: true, | ||
legacyOutput: true, | ||
define: { | ||
PACKAGE_NAME: `"${name}"`, | ||
PACKAGE_VERSION: `"${version}"`, | ||
JS_PACKAGE_VERSION: `"${clerkJsVersion}"`, | ||
__DEV__: `${isWatch}`, | ||
}, | ||
}; | ||
|
||
return runAfterLast(['npm run build:declarations', shouldPublish && 'npm run publish:local'])(options); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
export {}; | ||
|
||
declare global { | ||
const PACKAGE_NAME: string; | ||
const PACKAGE_VERSION: string; | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
"extends": "./tsconfig.json", | ||
"compilerOptions": { | ||
"skipLibCheck": true, | ||
"noEmit": false, | ||
"declaration": true, | ||
"emitDeclarationOnly": true, | ||
"declarationMap": true, | ||
"sourceMap": false, | ||
"declarationDir": "./dist" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,26 @@ | ||
{ | ||
"extends": "./tsconfig.build.json", | ||
"compilerOptions": { | ||
"outDir": "dist", | ||
"baseUrl": ".", | ||
"lib": ["es6", "dom"], | ||
"jsx": "react", | ||
"module": "commonjs", | ||
"moduleResolution": "node", | ||
"importHelpers": true, | ||
"declaration": true, | ||
"declarationMap": false, | ||
"noImplicitReturns": true, | ||
"noUnusedLocals": true, | ||
"noUnusedParameters": true, | ||
"resolveJsonModule": true, | ||
"sourceMap": false, | ||
"strict": true, | ||
"esModuleInterop": true, | ||
"skipLibCheck": true, | ||
"allowJs": true, | ||
"target": "ES2019", | ||
"noEmitOnError": false, | ||
"incremental": true | ||
} | ||
}, | ||
"include": ["src"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
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; | ||
|
||
const options: Options = { | ||
format: 'cjs', | ||
outDir: './dist', | ||
entry: ['./src/**/*.{ts,tsx,js,jsx}'], | ||
bundle: false, | ||
clean: true, | ||
minify: false, | ||
sourcemap: true, | ||
legacyOutput: true, | ||
define: { | ||
PACKAGE_NAME: `"${name}"`, | ||
PACKAGE_VERSION: `"${version}"`, | ||
JS_PACKAGE_VERSION: `"${clerkJsVersion}"`, | ||
__DEV__: `${isWatch}`, | ||
}, | ||
}; | ||
|
||
return runAfterLast(['npm run build:declarations', shouldPublish && 'npm run publish:local'])(options); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.