You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The TS types for the Node APIs come from the "types/node" package,
published from the Definitely Typed project. Both Node and the types
package use semver versions ("major.minor.patch"). The types package
for a particular Node version will have matching "major" and "minor"
numbers, but not necessarily a matching "patch" number:
https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/README.md#how-do-definitely-typed-package-versions-relate-to-versions-of-the-corresponding-library
We should ensure that the types package we install matches the Node
version. We have a `check-node-versions` script to ensure this in other
places (riff-raff config, for example), but it currently only supports
matching exact versions (major, minor and patch). This change updates
the script to allow specifying a "level" to which a given Node version
should be matched, and adds the DCAR and AR types packages to these
checks.
Note: the "match level" for the types package should be "minor", but
there isn't yet a package available for the version of Node that we're
currently on (v22.18.0, latest types package is v22.17.x). Therefore
this change sets the "level" to "major", to at least ensure that we're
always on the correct major version. This can be updated once a new
types package is released.
: `Node version in ${filepath} (${foundNodeVersion}) does not match \`.nvmrc\` (${nodeVersion})`;
59
-
}),
122
+
returnmatches
123
+
? undefined
124
+
: `Node version in ${filepath} (${foundNodeVersion}) does not match \`.nvmrc\` (${nodeVersion}), expected them to match versions to the ${matchLevel} level`;
125
+
},
126
+
),
60
127
)
61
128
).filter(
62
129
/** @type {(problem?: string) => problem is string} */
0 commit comments