Skip to content
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

fix(doc): improves package type exports #876

Merged
merged 4 commits into from
Nov 24, 2023
Merged

Conversation

sverweij
Copy link
Owner

@sverweij sverweij commented Nov 24, 2023

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?

With this PR

screen shot from Are the types wrong that evaluated the packed version of dependency-cruiser in the state of this RP

before

screen shot from Are the types wrong that evaluated dependency-cruiser@latest

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • Documentation only change
  • Refactor (non-breaking change which fixes an issue without changing functionality)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist

  • 📖

    • My change doesn't require a documentation update, or ...
    • it does and I have updated it
  • ⚖️

    • The contribution will be subject to The MIT license, and I'm OK with that.
    • The contribution is my own original work.
    • I am ok with the stuff in CONTRIBUTING.md.

Copy link

codeclimate bot commented Nov 24, 2023

Code Climate has analyzed commit 7312d97 and detected 0 issues on this pull request.

View more on Code Climate.

@sverweij sverweij merged commit 6d808db into main Nov 24, 2023
8 checks passed
@sverweij sverweij deleted the bugfix/betterize-type-exports branch November 24, 2023 12:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant