-
Notifications
You must be signed in to change notification settings - Fork 248
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(doc): improves package type exports (#876)
## Description - swaps the order of the `types` and `import` exports in package.json (which is less incorrect) - renames all .d.ts files to .d.mts (as package.json doesn't tell it's ESM, we have to do that with the module names) - adds a rule to .dependency-cruiser.json to ensure all dependencies in .d.mts files are _type only_ - adds type definitions for the sample reporter plugins (even though I'm pretty sure they're never used as they weren't bundled - updates here, there and everywhere to reflect usage of .d.mts (/.mjs) instead of .d.ts (.js/ no extension) This _does not_ integrate the _are the types wrong_ cli in the ci - _it does not work_. The online one does, though so that's what we've used for validation. ## Motivation and Context - For API consumers should make dependency-cruiser easier to use. - A love for green tickboxes ## How Has This Been Tested? - [x] green ci - [x] checked against [are the types wrong](https://github.com/arethetypeswrong/arethetypeswrong.github.io) #### With this PR <img width="2840" alt="screen shot from Are the types wrong that evaluated the packed version of dependency-cruiser in the state of this RP" src="https://github.com/sverweij/dependency-cruiser/assets/4822597/d65520af-ed4f-4a67-8333-2afa0fec6bed"> #### before <img width="2840" alt="screen shot from Are the types wrong that evaluated dependency-cruiser@latest" src="https://github.com/sverweij/dependency-cruiser/assets/4822597/5ae58d2d-0708-4ef6-8a25-2265f7207c54">
- Loading branch information
Showing
61 changed files
with
1,551 additions
and
571 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
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
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
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
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,4 +1,4 @@ | ||
// workaround to nodenext shenanigans with the TypeScript compiler | ||
// see https://github.com/sverweij/dependency-cruiser/issues/754 | ||
// eslint-disable-next-line node/no-unpublished-import | ||
export * from "../../types/dependency-cruiser"; | ||
export type * from "../../types/dependency-cruiser.mjs"; |
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.