Skip to content

build: Upgrade to Node 22, replace Serverless with OSLS#91

Open
corinja wants to merge 12 commits intomasterfrom
ENG-4041/upgrade-to-node-22
Open

build: Upgrade to Node 22, replace Serverless with OSLS#91
corinja wants to merge 12 commits intomasterfrom
ENG-4041/upgrade-to-node-22

Conversation

@corinja
Copy link
Member

@corinja corinja commented Oct 2, 2025

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.

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.
@corinja corinja self-assigned this Oct 2, 2025
@corinja corinja requested a review from seb-cr October 2, 2025 18: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.
@seb-cr seb-cr changed the title feat: Upgrade to Node 22 build: Upgrade to Node 22, replace Serverless with OSLS Mar 11, 2026
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