-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
Improving module augmentation #13565
Comments
Checklist for migrating packages to the new structure:
// BEFORE
import Table from '@ckeditor/ckeditor5-table/src/table';
// AFTER
import { Table } from '@ckeditor/ckeditor5-table'; |
Below is a summary of the changes introduced in PR #13568 to fix module augmentation and testing within monorepo. The same changes (according to the checklist above) will be applied to all packages using module augmentation. Module augmentation not being loaded in all casesPreviously, module augmentation were spread across many files and not visible in some other files. To mitigate this, we added To mitigate this, we created an // BEFORE
import Table from '@ckeditor/ckeditor5-table/src/table';
// AFTER
import { Table } from '@ckeditor/ckeditor5-table'; Module augmentation in testsWe decided NOT to update import paths in tests, because tests often import internals that we don't want to export in the main To mitigate this, we added Fix loading of
|
…mentation-for-table-plugin Internal: Improve TypeScript configuration in the project and module augmentation in `table` plugin. Related to #13565.
Status page of porting all the packages to the new format: https://chill-saturn-f1f.notion.site/Augmentation-migration-62971d5b535e4f7c982fe78d2acd3f0e |
…mentation-for-essentials-and-more Internal: Improve TypeScript module augmentation. See #13565.
…mentation-for-packages Internal: Improve TypeScript module augmentation. See #13565.
…umentation-3 Other: Improve augmentation in some packages. Related to #13565.
…mentation-for-image-plugin Internal (image): Improve module augmentation in image plugin. Related to #13565.
…mentation-for-list-plugin Internal (list): Improve module augmentation in `list` plugin. Related to #13565.
…ntation-20230306 Internal: Improve module augmentation in numerous packages. Related to #13565.
…ntation-20230307 Internal: Improve module augmentation in numerous packages. Related to #13565.
…umentation-4 Internal: Improve TypeScript module augmentation. Related to #13565.
Internal: Fix `ts-loader` configs used in scripts. Related to #13565.
We need to improve how we deal with module augmentation (explained in more details here), to:
import './config'
imports.To encourage best practices and ensure that the
.d.ts
file with module augmentation is always imported, we will require importing all package contents from the mainindex
file instead from individual files in the built package, eg.:The text was updated successfully, but these errors were encountered: