forked from refinedev/refine
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: better type declarations (refinedev#2440)
* fix(core): useResource `any` issue on ts compiler * chore: add changeset * refactor(core): add custom tsconfig file for declarations * chore(core): add `.npmignore` for smaller install size * refactor(core): separation of declarations from `tsup` to `tsc` * chore(core): add changeset * test(ui-tests): fix missing prop type * chore(ui-types): add changeset for fix * chore(antd-mui): add changeset for type declarations * chore: add `.npmignore` for smaller install sizes * chore: add type declaration changesets * refactor: update type declarations with declaration maps * chore: fix typo in changes Co-authored-by: Aydın <[email protected]> * fix: `ThemeProvider` export * chore(mui): add changeset for export change Co-authored-by: Aydın <[email protected]>
- Loading branch information
Showing
131 changed files
with
1,074 additions
and
155 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,5 @@ | ||
--- | ||
"@pankod/refine-core": minor | ||
--- | ||
|
||
Updated the generation of type declarations, moved the declarations from `tsup` to `tsc` for a better experience with `Peek Definition` and `Go to Definition` features. After this change, it's expected to navigate to the source code of the `refine` packages instead of the `dist` directory with combined declarations. |
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,5 @@ | ||
--- | ||
"@pankod/refine-mui": minor | ||
--- | ||
|
||
Update type declaration generation with `tsc` instead of `tsup` for better navigation throughout projects source code. |
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,31 @@ | ||
--- | ||
"@pankod/refine-ably": minor | ||
"@pankod/refine-airtable": minor | ||
"@pankod/refine-altogic": minor | ||
"@pankod/refine-antd-audit-log": minor | ||
"@pankod/refine-appwrite": minor | ||
"@pankod/refine-cloud": minor | ||
"@pankod/refine-demo-sidebar": minor | ||
"@pankod/refine-graphql": minor | ||
"@pankod/refine-hasura": minor | ||
"@pankod/refine-kbar": minor | ||
"@pankod/refine-medusa": minor | ||
"@pankod/refine-nestjsx-crud": minor | ||
"@pankod/refine-nextjs-router": minor | ||
"@pankod/refine-nhost": minor | ||
"@pankod/refine-react-hook-form": minor | ||
"@pankod/refine-react-location": minor | ||
"@pankod/refine-react-router-v6": minor | ||
"@pankod/refine-react-table": minor | ||
"@pankod/refine-remix-router": minor | ||
"@pankod/refine-sdk": minor | ||
"@pankod/refine-simple-rest": minor | ||
"@pankod/refine-strapi": minor | ||
"@pankod/refine-strapi-graphql": minor | ||
"@pankod/refine-strapi-v4": minor | ||
"@pankod/refine-supabase": minor | ||
"@pankod/refine-ui-tests": minor | ||
"@pankod/refine-ui-types": minor | ||
--- | ||
|
||
Update type declaration generation with `tsc` instead of `tsup` for better navigation throughout projects source code. |
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,5 @@ | ||
--- | ||
"@pankod/refine-ui-types": patch | ||
--- | ||
|
||
Update `TestWrapper` props with `children` prop type. |
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,5 @@ | ||
--- | ||
"@pankod/refine-antd": minor | ||
--- | ||
|
||
Update type declaration generation with `tsc` instead of `tsup` for better navigation throughout projects source code. |
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,5 @@ | ||
--- | ||
"@pankod/refine-core": patch | ||
--- | ||
|
||
Fixed the issue with the TS compiler and `useResource` hooks return type. |
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,5 @@ | ||
--- | ||
"@pankod/refine-mui": patch | ||
--- | ||
|
||
Update `ThemeProvider` export as value instead of type. |
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 @@ | ||
node_modules | ||
.DS_Store | ||
./test | ||
jest.config.js | ||
tsup.config.js | ||
tsconfig.test.json | ||
tsconfig.declarations.json |
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,21 @@ | ||
{ | ||
"extends": "./tsconfig.json", | ||
"exclude": [ | ||
"node_modules", | ||
"dist", | ||
"test", | ||
"../test/**/*", | ||
"**/*.spec.ts", | ||
"**/*.test.ts", | ||
"**/*.spec.tsx", | ||
"**/*.test.tsx" | ||
], | ||
"compilerOptions": { | ||
"outDir": "dist", | ||
"declarationDir": "dist", | ||
"declaration": true, | ||
"emitDeclarationOnly": true, | ||
"noEmit": false, | ||
"declarationMap": true | ||
} | ||
} |
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 |
---|---|---|
|
@@ -20,4 +20,5 @@ export default defineConfig({ | |
}, | ||
}), | ||
], | ||
onSuccess: "tsc --project tsconfig.declarations.json", | ||
}); |
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 @@ | ||
node_modules | ||
.DS_Store | ||
./test | ||
jest.config.js | ||
tsup.config.js | ||
tsconfig.test.json | ||
tsconfig.declarations.json |
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,21 @@ | ||
{ | ||
"extends": "./tsconfig.json", | ||
"exclude": [ | ||
"node_modules", | ||
"dist", | ||
"test", | ||
"../test/**/*", | ||
"**/*.spec.ts", | ||
"**/*.test.ts", | ||
"**/*.spec.tsx", | ||
"**/*.test.tsx" | ||
], | ||
"compilerOptions": { | ||
"outDir": "dist", | ||
"declarationDir": "dist", | ||
"declaration": true, | ||
"emitDeclarationOnly": true, | ||
"noEmit": false, | ||
"declarationMap": true | ||
} | ||
} |
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 |
---|---|---|
|
@@ -20,4 +20,5 @@ export default defineConfig({ | |
}, | ||
}), | ||
], | ||
onSuccess: "tsc --project tsconfig.declarations.json", | ||
}); |
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 @@ | ||
node_modules | ||
.DS_Store | ||
./test | ||
jest.config.js | ||
tsup.config.js | ||
tsconfig.test.json | ||
tsconfig.declarations.json |
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,21 @@ | ||
{ | ||
"extends": "./tsconfig.json", | ||
"exclude": [ | ||
"node_modules", | ||
"dist", | ||
"test", | ||
"../test/**/*", | ||
"**/*.spec.ts", | ||
"**/*.test.ts", | ||
"**/*.spec.tsx", | ||
"**/*.test.tsx" | ||
], | ||
"compilerOptions": { | ||
"outDir": "dist", | ||
"declarationDir": "dist", | ||
"declaration": true, | ||
"emitDeclarationOnly": true, | ||
"noEmit": false, | ||
"declarationMap": true | ||
} | ||
} |
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 |
---|---|---|
|
@@ -20,4 +20,5 @@ export default defineConfig({ | |
}, | ||
}), | ||
], | ||
onSuccess: "tsc --project tsconfig.declarations.json", | ||
}); |
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 @@ | ||
node_modules | ||
.DS_Store | ||
./test | ||
jest.config.js | ||
tsup.config.js | ||
tsconfig.test.json | ||
tsconfig.declarations.json |
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,21 @@ | ||
{ | ||
"extends": "./tsconfig.json", | ||
"exclude": [ | ||
"node_modules", | ||
"dist", | ||
"test", | ||
"../test/**/*", | ||
"**/*.spec.ts", | ||
"**/*.test.ts", | ||
"**/*.spec.tsx", | ||
"**/*.test.tsx" | ||
], | ||
"compilerOptions": { | ||
"outDir": "dist", | ||
"declarationDir": "dist", | ||
"declaration": true, | ||
"emitDeclarationOnly": true, | ||
"noEmit": false, | ||
"declarationMap": true | ||
} | ||
} |
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 @@ | ||
node_modules | ||
.DS_Store | ||
./test | ||
jest.config.js | ||
tsup.config.js | ||
tsconfig.test.json | ||
tsconfig.declarations.json |
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,37 @@ | ||
{ | ||
"extends": "./tsconfig.json", | ||
"exclude": [ | ||
"node_modules", | ||
"dist", | ||
"test", | ||
"../test/**/*", | ||
"**/*.spec.ts", | ||
"**/*.test.ts", | ||
"**/*.spec.tsx", | ||
"**/*.test.tsx" | ||
], | ||
"compilerOptions": { | ||
"outDir": "dist", | ||
"declarationDir": "dist", | ||
"declaration": true, | ||
"emitDeclarationOnly": true, | ||
"noEmit": false, | ||
"declarationMap": true, | ||
"paths": { | ||
"@components/*": ["src/components/*"], | ||
"@components": ["src/components"], | ||
"@containers/*": ["src/containers/*"], | ||
"@containers": ["src/containers"], | ||
"@pages/*": ["src/pages/*"], | ||
"@pages": ["src/pages"], | ||
"@contexts/*": ["src/contexts/*"], | ||
"@contexts": ["src/contexts"], | ||
"@dataProviders/*": ["src/dataProviders/*"], | ||
"@dataProviders": ["src/dataProviders"], | ||
"@hooks/*": ["src/hooks/*"], | ||
"@hooks": ["src/hooks"], | ||
"@definitions/*": ["src/definitions/*"], | ||
"@definitions": ["src/definitions"] | ||
} | ||
} | ||
} |
Oops, something went wrong.