Skip to content

main is broken: recent merge dropped @nestjs/throttler, helmet, and all test tooling from package.json #59

Description

@TheDEV111

Summary

main at a93ee2b is currently broken: a merge between b82ed3e (PR #54) and a93ee2b (PRs #56 / #57) clobbered package.json and removed dependencies that the source code still imports, plus the entire test toolchain. As a result main does not build, cannot run its tests, and bun install --frozen-lockfile fails.

This surfaced while rebasing a feature branch onto main.

What was removed

git diff b82ed3e a93ee2b -- package.json shows these were dropped:

dependencies

  • @nestjs/throttler (^6.5.0)
  • helmet (^8.2.0)

devDependencies

  • @nestjs/testing (^11.1.27)
  • jest (^30.4.2)
  • ts-jest (^29.4.11)
  • supertest (^7.2.2)
  • @types/jest (^30.0.0)
  • @types/supertest (^7.2.0)
  • @types/helmet (^0.0.48)

(@nestjs/cache-manager and cache-manager were correctly added in the same range; only the removals above look accidental.)

Why it's a problem

The removed packages are still imported by code that remains on main:

  • src/main.tsimport helmet from 'helmet'
  • src/security/security.module.ts, src/security/guards/custom-throttler.guard.ts, src/security/decorators/throttle-override.decorator.ts@nestjs/throttler
  • jest.config.js and *.spec.ts (e.g. src/config/app-config.module.spec.ts, src/security/security.module.spec.ts) remain, but jest / ts-jest / @nestjs/testing are gone.

Reproduction

git checkout main           # a93ee2b
bun install --frozen-lockfile
# error migrating lockfile: NotAllPackagesGotResolved
# error: lockfile had changes, but lockfile is frozen

npx nest build
# error TS2307: Cannot find module '@nestjs/throttler' ...
# error TS2307: Cannot find module 'helmet' ...

package-lock.json is also missing resolutions for the removed packages, which is what makes the frozen install fail.

Suggested fix

Restore the accidentally-removed entries in package.json and regenerate the lockfile:

// dependencies
"@nestjs/throttler": "^6.5.0",
"helmet": "^8.2.0",
// devDependencies
"@nestjs/testing": "^11.1.27",
"jest": "^30.4.2",
"ts-jest": "^29.4.11",
"supertest": "^7.2.2",
"@types/jest": "^30.0.0",
"@types/supertest": "^7.2.0",
"@types/helmet": "^0.0.48"

Then regenerate the lockfile so bun install --frozen-lockfile passes again. Happy to open a small PR for this if useful.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions