Skip to content

build(deps): Bump @nestjs/serve-static from 5.0.5 to 12.0.0 - #8604

Open
dependabot[bot] wants to merge 1 commit into
masterfrom
dependabot/npm_and_yarn/nestjs/serve-static-12.0.0
Open

build(deps): Bump @nestjs/serve-static from 5.0.5 to 12.0.0#8604
dependabot[bot] wants to merge 1 commit into
masterfrom
dependabot/npm_and_yarn/nestjs/serve-static-12.0.0

Conversation

@dependabot

@dependabot dependabot Bot commented on behalf of github Sep 1, 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 dependabot Bot added dependencies Pull requests that update a dependency file javascript Pull requests that update Javascript code labels Sep 1, 2026
@dependabot
dependabot Bot force-pushed the dependabot/npm_and_yarn/nestjs/serve-static-12.0.0 branch from 1cd73b7 to 3ee22ad Compare September 1, 2026 01:31
@github-actions
github-actions Bot enabled auto-merge September 1, 2026 01:45
@dependabot
dependabot Bot force-pushed the dependabot/npm_and_yarn/nestjs/serve-static-12.0.0 branch 23 times, most recently from 1f86f8b to d16f88a Compare September 5, 2026 03:10
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 force-pushed the dependabot/npm_and_yarn/nestjs/serve-static-12.0.0 branch from d16f88a to 9359f31 Compare September 5, 2026 03:28
@sonarqubecloud

sonarqubecloud Bot commented Sep 5, 2026

Copy link
Copy Markdown

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