-
-
Notifications
You must be signed in to change notification settings - Fork 25
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
Add Native Typescript Declarations #375
Add Native Typescript Declarations #375
Conversation
Some transitive dev dependencies in the lockfile were so old it locked development to Node versions under 18. The current LTS is 20, so I figured I'd `yarn upgrade` over switching to an old container. Pretty much everything that got updated were transitive dependencies. The only direct dependency was `eslint-plugin-vue`, which had a bug fix.
Thanks to @losfroger and @jim-toth in the related issue. This implementation was a merge of their recommended fixes and the official Vue 3 Options API Type Augmentation documentation. I've tested the module definitions against a real-world Vue 3 codebase in both Composition and Options API mode. Closes #15.
For my own sanity, imported library as |
Will resolve conflicts once the review process starts. No rush to maintainer, but don't want to have to do it again if the dependabot changes go through before this. 😅 |
@RobbieTheWagner Just a bump so this doesn't get lost. 😄 |
@Kenneth-Sills can you please update this for Shepherd 12.0.4? |
…d-typing into kesills-add-basic-typing [skip release]
Upstream's typing changed a bit, so I had to switch from namespace imports over to "real" imports. The distributable files have been rebuilt and the version bumped to the next breaking change. BREAKING CHANGE: Shepherd 12 is the new minimum, due to changes in typing.
Shepherd.js requires Node 18 or above, and yarn has had some bug fixes.
Sorry for the delay, @RobbieTheWagner, didn't have much free time to get back to it today. I think this should be good to go, with two asterisks.
I ran AreTheTypesWrong and it does complain about the use of ESM without Thank you for your time, I appreciate it! |
Awesome, Shepherd 12.0.5 has been integrated into this, which should resolve (1) above. |
@RobbieTheWagner is this merge ready then? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Thanks for the PR
It looks like the tests are choking on the CSS @Kenneth-Sills. Would you mind taking a look? |
This should fix the failed imports when using Shepherd ^12.
Of course, and I apologize for wasting your time not running |
Any updates on this? |
@Kenneth-Sills would you mind updating this to latest Shepherd and fixing the conflicts? Then I think we can merge. |
@josselinonduty I've been out, recovering from a surgery. I'll likely have some time to get to this in the coming week or so! EDIT: I went ahead and merged master. Passes |
…d-typing into kesills-add-basic-typing
@RobbieTheWagner I think we're going to need to coordinate a release, dependabot will keep invalidating my changes. 🤣 Just let me know what day and time would work best for you and I'll have the latest conflict resolved! |
…d-typing into kesills-add-basic-typing
@RobbieTheWagner @chuckcarpenter happy to see that this was merged :) can a new version be published though to get this through? |
Summary:
As requested in #15, this PR adds a very simple
.d.ts
file with Typescript declarations for both the Options and Components API.The types were tested with:
tour: null
changed totour: null as Shepherd.Tour|null
for type inference to work correctly. Otherwise it gets inferred as onlynull
.Additional Changes:
yarn upgrade
(non-breaking) to get the project working on Node 20 workstations. A transitive dependency was limiting me to Node 18. The only direct dependency we had that got updated waseslint-plugin-vue
, which just had a patch./dist/
files viayarn build
. Manual testing viatest:e2e
stills works.What I did NOT do:
shepherd.js
, so users will still need toimport Shepherd from 'shepherd.js'
in their projects when specifying types.I wanted to keep these changes to the bare minimum.
Notes:
I've only done a minor version bump here. However, adding real types may be considered a breaking change for downstream projects. Please let me know if you want me to change it to a4.0.0
release instead. 😄With the Shepherd.js version requirement moving to
^12
, this is now a bonafide breaking change.Special thanks to @jim-toth and @losfroger for your comments on the related issue.