fix: add @types/node
to drizzle
and storybook
add-ons
#541
+29
−0
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
closes #509
This is an alternative to #536 and #539 where
@types/node
is added todevDependencies
by thedrizzle
andstorybook
add-ons.The version of
@types/node
is derived from the version of node from the current running process. Since@types/node
only publishes types forlts
versions of node, we'll need to install the nearestlts
version forcurrent
releases. To do this, we'll just decrement the major number by one (and chop off the minor and patch numbers) to target the previouslts
release version (note that we can detect whether a release islts
orcurrent
based on the if the major is an even or odd number, respectively)For example: if the installed node version is
22.14.0
(lts
), then^22
will be added to thepackage.json
. If the node version is23.11.0
(current
), then^22
will be added instead.