-
Notifications
You must be signed in to change notification settings - Fork 403
chore(clerk-react,shared,types): Switch to tsc for type generation #5122
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| --- | ||
| '@clerk/shared': patch | ||
| '@clerk/clerk-react': patch | ||
| '@clerk/types': patch | ||
| --- | ||
|
|
||
| Internal change on how the TypeScript types are generated. If you run into type issues, please open an issue. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,8 +2,6 @@ | |
| "compilerOptions": { | ||
| "allowJs": true, | ||
| "baseUrl": ".", | ||
| "declaration": true, | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This was already defined in the declarations tsconfig so I removed this duplicate |
||
| "declarationMap": true, | ||
| "esModuleInterop": true, | ||
| "importHelpers": true, | ||
| "isolatedModules": true, | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -25,7 +25,7 @@ | |
| "exports": { | ||
| ".": { | ||
| "import": { | ||
| "types": "./dist/index.d.mts", | ||
| "types": "./dist/index.d.ts", | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Core of the problem, |
||
| "default": "./dist/index.mjs" | ||
| }, | ||
| "require": { | ||
|
|
@@ -35,7 +35,7 @@ | |
| }, | ||
| "./internal": { | ||
| "import": { | ||
| "types": "./dist/internal.d.mts", | ||
| "types": "./dist/internal.d.ts", | ||
| "default": "./dist/internal.mjs" | ||
| }, | ||
| "require": { | ||
|
|
@@ -45,7 +45,7 @@ | |
| }, | ||
| "./errors": { | ||
| "import": { | ||
| "types": "./dist/errors.d.mts", | ||
| "types": "./dist/errors.d.ts", | ||
| "default": "./dist/errors.mjs" | ||
| }, | ||
| "require": { | ||
|
|
@@ -64,11 +64,11 @@ | |
| "scripts": { | ||
| "build": "tsup", | ||
| "postbuild": "node ../../scripts/subpath-workaround.mjs react", | ||
| "clean": "rimraf ./dist", | ||
| "build:declarations": "tsc -p tsconfig.declarations.json", | ||
| "dev": "tsup --watch", | ||
| "dev:publish": "pnpm dev --env.publish", | ||
| "lint": "eslint src", | ||
| "lint:attw": "attw --pack .", | ||
| "lint:attw": "attw --pack . --ignore-rules false-cjs", | ||
| "lint:publint": "publint", | ||
| "publish:local": "pnpm yalc push --replace --sig", | ||
| "test": "vitest run", | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| { | ||
| "extends": "./tsconfig.json", | ||
| "compilerOptions": { | ||
| "declaration": true, | ||
| "declarationDir": "./dist", | ||
| "declarationMap": true, | ||
| "emitDeclarationOnly": true, | ||
| "skipLibCheck": true | ||
| }, | ||
| "exclude": ["**/__tests__/**/*"] | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| { | ||
| "extends": "./tsconfig.json", | ||
| "compilerOptions": { | ||
| "declaration": true, | ||
| "declarationDir": "./dist", | ||
| "declarationMap": true, | ||
| "emitDeclarationOnly": true, | ||
| "skipLibCheck": true | ||
| }, | ||
| "exclude": ["**/__tests__/**/*"] | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| { | ||
| "extends": "./tsconfig.json", | ||
| "compilerOptions": { | ||
| "declaration": true, | ||
| "declarationDir": "./dist/types", | ||
| "declarationMap": true, | ||
| "emitDeclarationOnly": true, | ||
| "skipLibCheck": true | ||
| }, | ||
| "exclude": ["**/__tests__/**/*"] | ||
| } |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was already defined in the declarations tsconfig so I removed this duplicate