build: Upgrade to Node 22, replace Serverless with OSLS#91
Open
build: Upgrade to Node 22, replace Serverless with OSLS#91
Conversation
Numerous changes including: - Bump runtime in serverless.yml - Replace serverless with osls in package.json so we can use node 22 with sls framework v3 - Bump some package versions - Mess around with the tsconfig like a monkey trying to type Shakespeare until the TypeScript errors go away Tests pass running under Node 22.
None of the other changes made a difference; the `types` field by itself is sufficient to make the error go away. For future reference, the error is > error TS2688: Cannot find type definition file for 'minimatch'. > The file is in the program because: > Entry point for implicit type library 'minimatch' Will investigate further, as setting `types` is restrictive and I'd rather not have to do it.
Version 6 became a "stub" types package, as minimatch contains its own
types. It fails to provide a `types` field in its `package.json`.
It's included in this project through the following dependency tree:
```
serverless-plugin-typescript@2.1.5
> globby@10.0.2
> @types/glob@7.2.0
> @types/minimatch@*
```
As far as I can tell it was included accidentally in `globby@10`'s
runtime dependencies. In `globby@11` it was removed.
We previously (on `master`) had version 5.1.2 installed. During package
updates, the `*` semver range allowed this to bump to the broken v6.
The `resolutions` field forces it back to 5.1.2, and ensures it cannot
be auto-updated during future updates.
Hopefully `serverless-plugin-typescript` will release an update at some
point that bumps `globby` to v11, then this problem will go away.
Didn't think `^` would allow bumping out of beta releases. The SemVer spec states that prereleases are "unstable and might not satisfy the intended compatibility requirements" so it seems reckless to update to or from them automatically. Curious whether npm does the same.
It's not required for Node 22.
Still not really sure how these happened. I want to keep this PR scoped to Node upgrade-related updates only. Broad dependency updates are also required but can be done in their own dedicated piece of work.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Numerous changes including:
Tests pass running under Node 22.