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

feat(extract): adds recognition of jsdoc @import type imports #965

Merged
merged 12 commits into from
Nov 17, 2024

Conversation

sverweij
Copy link
Owner

@sverweij sverweij commented Nov 16, 2024

Description

  • detects jsdoc @import imports added in TS5.5
  • adds a new jsdoc, jsdoc-import-tag dependency types
  • adds unit tests
  • dog foods the @import jsdoc tag
  • feature switches it in the configuration (otherwise it would be a breaking change) -
  • feature switch true implies parser set to tsc
  • document it (and add caveats (TS 5.5 and up - parser attribute set to tsc)
  • adds e2e test
  • 🏕️ disables the yarn berry integration test - for #reasons it now acts up on the ci (node 23 issue? Something else?), where it runs perfectly fine on local machine - something to figure out later.

Future work:

  • also detect jsdoc-bracket-import (/** @type {import('yadda').bla} */) statements in other jsdoc tags - see typescript jsdoc reference for a list => likely better in a separate PR.

Motivation and Context

Addresses #964

How Has This Been Tested?

  • green ci
  • additional automated non-regression tests

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.

@louwers
Copy link

louwers commented Nov 17, 2024

Test driving it, seems to work great already.

@sverweij
Copy link
Owner Author

Test driving it, seems to work great already.

Thanks! Good to hear it works 🎉

There will be small changes over time. E.g. since yesterday I've changed the names of dependencyTypes a bit (for regular cli use shouldn't matter) and I'll add a feature switch to (1) prevent this being a breaking change (2) auto-switch the javascript parser to tsc, which is the only one who can detect these.

@sverweij sverweij marked this pull request as ready for review November 17, 2024 15:33
.github/workflows/ci.yml Outdated Show resolved Hide resolved
doc/options-reference.md Outdated Show resolved Hide resolved
Copy link

codeclimate bot commented Nov 17, 2024

Code Climate has analyzed commit 2daf3d3 and detected 0 issues on this pull request.

View more on Code Climate.

@sverweij sverweij merged commit 09e9e41 into main Nov 17, 2024
9 checks passed
@sverweij sverweij deleted the feature/adds-recognition-of-jsdoc-at-import branch November 17, 2024 19:31
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.

2 participants