Skip to content

chore(deps): bump @nestjs/serve-static from 5.0.5 to 12.0.0 in /generators/node-server/resources - #1358

Open
dependabot[bot] wants to merge 1 commit into
mainfrom
dependabot/npm_and_yarn/generators/node-server/resources/nestjs/serve-static-12.0.0
Open

chore(deps): bump @nestjs/serve-static from 5.0.5 to 12.0.0 in /generators/node-server/resources#1358
dependabot[bot] wants to merge 1 commit into
mainfrom
dependabot/npm_and_yarn/generators/node-server/resources/nestjs/serve-static-12.0.0

Conversation

@dependabot

@dependabot dependabot Bot commented on behalf of github Aug 31, 2026

Copy link
Copy Markdown
Contributor

Bumps @nestjs/serve-static from 5.0.5 to 12.0.0.

Release notes

Sourced from @​nestjs/serve-static's releases.

Release 12.0.0

What's Changed

@nestjs/serve-static is now a native ES module, and the major version is aligned with the Nest 12 release line (there is no 6.x–11.x — 5.0.5 goes straight to 12.0.0).

ESM migration

The package is published as pure ESM ("type": "module", compiled with NodeNext) behind a proper exports map. The legacy root index.js / index.d.ts shims are gone, and deep imports into build internals are no longer resolvable — import from the package root.

The runtime was migrated too, not just the build output: the optional express and @fastify/static loads now go through createRequire(import.meta.url) instead of a bare require(). Under a native ESM loader the old code threw ReferenceError, which loadPackage swallowed before calling process.exit(1) — taking the host application down at startup.

If you pass rootPath: join(__dirname, '..', 'client') from an ESM app, switch to import.meta.dirname:

ServeStaticModule.forRoot({
  rootPath: join(import.meta.dirname, '..', 'client')
})

require(esm) — CommonJS still works

You do not need to convert your app to ESM. Thanks to Node's require(esm) support, CommonJS applications can keep using require('@nestjs/serve-static') unchanged.

TypeScript projects that compile to CommonJS need "module": "nodenext" in their tsconfig.json. The older "node16" setting predates require(esm) and will report TS1479.

Node.js requirement

An engines floor is now declared so npm blocks installs on versions without require(esm):

^20.19.0 || ^22.12.0 || >=23.0.0

Peer dependencies

  • @nestjs/common and @nestjs/core^12.0.0
  • @fastify/static^10.0.0 (the ^8 || ^9 range is dropped; v10 carries a security fix)
  • express ^5.0.1 and fastify ^5.2.1 are unchanged

Features

  • exclude now accepts a RegExp in addition to an array of path strings, for cases where a single pattern is clearer than enumerating routes (#1983):

    ServeStaticModule.forRoot({
      rootPath: join(import.meta.dirname, '..', 'client'),
      exclude: /^\/api(\/.*)?$/
    })

... (truncated)

Commits

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Bumps [@nestjs/serve-static](https://github.com/nestjs/serve-static) from 5.0.5 to 12.0.0.
- [Release notes](https://github.com/nestjs/serve-static/releases)
- [Commits](nestjs/serve-static@5.0.5...12.0.0)

---
updated-dependencies:
- dependency-name: "@nestjs/serve-static"
  dependency-version: 12.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot Bot added dependencies Pull requests that update a dependency file javascript Pull requests that update Javascript code labels Aug 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file javascript Pull requests that update Javascript code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants