Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: nestjs/nest
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v11.0.11
Choose a base ref
...
head repository: nestjs/nest
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: c58f49a3cc7b48916a98dcb81764ce77950d535a
Choose a head ref

Commits on Feb 28, 2025

  1. Copy the full SHA
    8fbca84 View commit details
  2. Merge pull request #14712 from nestjs/renovate/nest-monorepo

    fix(deps): update nest monorepo to v11.0.11
    kamilmysliwiec authored Feb 28, 2025
    Copy the full SHA
    2f64480 View commit details
  3. Copy the full SHA
    0c4e9b8 View commit details
  4. Merge pull request #14714 from nestjs/renovate/nest-monorepo

    fix(deps): update nest monorepo to v11.0.11
    kamilmysliwiec authored Feb 28, 2025
    Copy the full SHA
    8ca22f4 View commit details
  5. Copy the full SHA
    ddef630 View commit details
  6. Merge pull request #14713 from nestjs/renovate/nestjs-swagger-11.x

    fix(deps): update dependency @nestjs/swagger to v11.0.6
    kamilmysliwiec authored Feb 28, 2025
    Copy the full SHA
    703ac9a View commit details
  7. Copy the full SHA
    17421db View commit details

Commits on Mar 1, 2025

  1. Copy the full SHA
    d8b32ca View commit details
  2. Copy the full SHA
    603a446 View commit details

Commits on Mar 2, 2025

  1. Copy the full SHA
    2827ee0 View commit details

Commits on Mar 3, 2025

  1. chore(deps-dev): bump core-js from 3.40.0 to 3.41.0

    Bumps [core-js](https://github.com/zloirock/core-js/tree/HEAD/packages/core-js) from 3.40.0 to 3.41.0.
    - [Release notes](https://github.com/zloirock/core-js/releases)
    - [Changelog](https://github.com/zloirock/core-js/blob/master/CHANGELOG.md)
    - [Commits](https://github.com/zloirock/core-js/commits/v3.41.0/packages/core-js)
    
    ---
    updated-dependencies:
    - dependency-name: core-js
      dependency-type: direct:development
      update-type: version-update:semver-minor
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    dependabot[bot] authored Mar 3, 2025
    Copy the full SHA
    5f317c9 View commit details
  2. chore(deps): bump ansis from 3.16.0 to 3.17.0

    Bumps [ansis](https://github.com/webdiscus/ansis) from 3.16.0 to 3.17.0.
    - [Release notes](https://github.com/webdiscus/ansis/releases)
    - [Changelog](https://github.com/webdiscus/ansis/blob/master/CHANGELOG.md)
    - [Commits](webdiscus/ansis@v3.16.0...v3.17.0)
    
    ---
    updated-dependencies:
    - dependency-name: ansis
      dependency-type: direct:production
      update-type: version-update:semver-minor
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    dependabot[bot] authored Mar 3, 2025
    Copy the full SHA
    9f8d5fd View commit details
  3. chore(deps-dev): bump @types/node from 22.13.5 to 22.13.8

    Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 22.13.5 to 22.13.8.
    - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
    - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)
    
    ---
    updated-dependencies:
    - dependency-name: "@types/node"
      dependency-type: direct:development
      update-type: version-update:semver-patch
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    dependabot[bot] authored Mar 3, 2025
    Copy the full SHA
    3de3a63 View commit details
  4. chore(deps-dev): bump @types/amqplib from 0.10.6 to 0.10.7

    Bumps [@types/amqplib](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/amqplib) from 0.10.6 to 0.10.7.
    - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
    - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/amqplib)
    
    ---
    updated-dependencies:
    - dependency-name: "@types/amqplib"
      dependency-type: direct:development
      update-type: version-update:semver-patch
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    dependabot[bot] authored Mar 3, 2025
    Copy the full SHA
    8959b8e View commit details
  5. Copy the full SHA
    0edc8ee View commit details
  6. Merge pull request #14716 from nestjs/renovate/mongodb-6.x

    fix(deps): update dependency mongodb to v6.14.0
    kamilmysliwiec authored Mar 3, 2025
    Copy the full SHA
    d9138b0 View commit details
  7. Merge pull request #14731 from nestjs/renovate/prettier-3.x

    chore(deps): update dependency prettier to v3.5.3
    kamilmysliwiec authored Mar 3, 2025
    Copy the full SHA
    ddf876e View commit details
  8. Merge pull request #14730 from nestjs/dependabot/npm_and_yarn/types/a…

    …mqplib-0.10.7
    
    chore(deps-dev): bump @types/amqplib from 0.10.6 to 0.10.7
    kamilmysliwiec authored Mar 3, 2025
    Copy the full SHA
    612288e View commit details
  9. Merge pull request #14729 from nestjs/dependabot/npm_and_yarn/types/n…

    …ode-22.13.8
    
    chore(deps-dev): bump @types/node from 22.13.5 to 22.13.8
    kamilmysliwiec authored Mar 3, 2025
    Copy the full SHA
    1800ef0 View commit details
  10. Merge pull request #14727 from nestjs/dependabot/npm_and_yarn/ansis-3…

    ….17.0
    
    chore(deps): bump ansis from 3.16.0 to 3.17.0
    kamilmysliwiec authored Mar 3, 2025
    Copy the full SHA
    b83313e View commit details
  11. Merge pull request #14726 from nestjs/dependabot/npm_and_yarn/core-js…

    …-3.41.0
    
    chore(deps-dev): bump core-js from 3.40.0 to 3.41.0
    kamilmysliwiec authored Mar 3, 2025
    Copy the full SHA
    cfa8c7c View commit details
  12. Merge pull request #14718 from nestjs/renovate/node-22.x

    chore(deps): update dependency @types/node to v22.13.8
    kamilmysliwiec authored Mar 3, 2025
    Copy the full SHA
    0235baa View commit details
  13. Merge pull request #14722 from nestjs/renovate/ansis-3.x

    fix(deps): update dependency ansis to v3.17.0
    kamilmysliwiec authored Mar 3, 2025
    Copy the full SHA
    f6aa3a6 View commit details
  14. Merge pull request #14719 from nestjs/renovate/core-js-3.x

    chore(deps): update dependency core-js to v3.41.0
    kamilmysliwiec authored Mar 3, 2025
    Copy the full SHA
    ef641f3 View commit details
  15. Copy the full SHA
    f1f4886 View commit details
  16. Copy the full SHA
    b966c6e View commit details
  17. Copy the full SHA
    662485b View commit details
  18. Merge pull request #14732 from nestjs/renovate/nest-monorepo

    chore(deps): update dependency @nestjs/schematics to v11.0.2
    kamilmysliwiec authored Mar 3, 2025
    Copy the full SHA
    225f92c View commit details
  19. Merge pull request #14717 from nestjs/renovate/amqplib-0.x

    chore(deps): update dependency @types/amqplib to v0.10.7
    kamilmysliwiec authored Mar 3, 2025
    Copy the full SHA
    9fd7bb0 View commit details
  20. Merge pull request #14733 from nestjs/renovate/typeorm-0.x

    fix(deps): update dependency typeorm to v0.3.21
    kamilmysliwiec authored Mar 3, 2025
    Copy the full SHA
    3eaa07a View commit details
  21. Copy the full SHA
    545fa46 View commit details
  22. Copy the full SHA
    a313c9b View commit details

Commits on Mar 4, 2025

  1. Copy the full SHA
    a232b7b View commit details
  2. Copy the full SHA
    e295687 View commit details
  3. Copy the full SHA
    ede1888 View commit details
  4. Copy the full SHA
    ec34752 View commit details
  5. Merge pull request #14752 from nestjs/renovate/sequelize-6.x

    fix(deps): update dependency sequelize to v6.37.6
    kamilmysliwiec authored Mar 4, 2025
    Copy the full SHA
    e82b0e1 View commit details
  6. Merge pull request #14751 from nestjs/renovate/typescript-eslint-mono…

    …repo
    
    chore(deps): update typescript-eslint monorepo to v8.26.0
    kamilmysliwiec authored Mar 4, 2025
    Copy the full SHA
    efbdcd9 View commit details
  7. Merge pull request #14737 from nestjs/renovate/mongoose-8.x

    fix(deps): update dependency mongoose to v8.12.0
    kamilmysliwiec authored Mar 4, 2025
    Copy the full SHA
    4f41a6d View commit details
  8. Merge pull request #14748 from nestjs/renovate/graphql-tools-monorepo

    fix(deps): update graphql-tools monorepo
    kamilmysliwiec authored Mar 4, 2025
    Copy the full SHA
    b337bf2 View commit details
  9. Merge pull request #14747 from nestjs/renovate/cache-manager-6.x

    fix(deps): update dependency cache-manager to v6.4.1
    kamilmysliwiec authored Mar 4, 2025
    Copy the full SHA
    53fa011 View commit details
  10. Merge pull request #14740 from nestjs/renovate/mongodb-6.x

    fix(deps): update dependency mongodb to v6.14.1
    kamilmysliwiec authored Mar 4, 2025
    Copy the full SHA
    821005c View commit details
  11. Copy the full SHA
    de28319 View commit details
  12. Merge pull request #14739 from nestjs/renovate/node-22.x

    chore(deps): update dependency @types/node to v22.13.9
    kamilmysliwiec authored Mar 4, 2025
    Copy the full SHA
    978b399 View commit details
  13. Copy the full SHA
    573a625 View commit details
  14. Copy the full SHA
    1453b85 View commit details

Commits on Mar 5, 2025

  1. chore(deps-dev): bump @types/ws from 8.5.14 to 8.18.0

    Bumps [@types/ws](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/ws) from 8.5.14 to 8.18.0.
    - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
    - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/ws)
    
    ---
    updated-dependencies:
    - dependency-name: "@types/ws"
      dependency-type: direct:development
      update-type: version-update:semver-minor
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    dependabot[bot] authored Mar 5, 2025
    Copy the full SHA
    09197ee View commit details
  2. Merge pull request #14754 from nestjs/renovate/mongodb-6.x

    fix(deps): update dependency mongodb to v6.14.2
    kamilmysliwiec authored Mar 5, 2025
    Copy the full SHA
    36e969d View commit details
  3. Merge pull request #14757 from nestjs/dependabot/npm_and_yarn/types/w…

    …s-8.18.0
    
    chore(deps-dev): bump @types/ws from 8.5.14 to 8.18.0
    kamilmysliwiec authored Mar 5, 2025
    Copy the full SHA
    f4bcfa8 View commit details
  4. Merge pull request #14755 from nestjs/renovate/mongoose-8.x

    fix(deps): update dependency mongoose to v8.12.1
    kamilmysliwiec authored Mar 5, 2025
    Copy the full SHA
    00bb797 View commit details
Showing with 927 additions and 775 deletions.
  1. +30 −0 integration/lazy-modules/e2e/lazy-import-request-providers.spec.ts
  2. +10 −0 integration/lazy-modules/src/lazy.controller.ts
  3. +11 −0 integration/lazy-modules/src/request.module.ts
  4. +11 −0 integration/lazy-modules/src/request.service.ts
  5. +1 −1 lerna.json
  6. +374 −315 package-lock.json
  7. +21 −21 package.json
  8. +1 −1 packages/common/package.json
  9. +7 −1 packages/core/injector/instance-wrapper.ts
  10. +9 −1 packages/core/injector/module.ts
  11. +2 −2 packages/core/package.json
  12. +16 −5 packages/core/router/legacy-route-converter.ts
  13. +3 −3 packages/microservices/package.json
  14. +3 −3 packages/platform-express/package.json
  15. +2 −2 packages/platform-fastify/package.json
  16. +1 −1 packages/platform-socket.io/package.json
  17. +1 −1 packages/platform-ws/package.json
  18. +1 −1 packages/testing/package.json
  19. +3 −3 packages/websockets/package.json
  20. +10 −10 sample/01-cats-app/package.json
  21. +12 −12 sample/02-gateways/package.json
  22. +12 −12 sample/03-microservices/package.json
  23. +12 −12 sample/04-grpc/package.json
  24. +12 −12 sample/05-sql-typeorm/package.json
  25. +11 −11 sample/06-mongoose/package.json
  26. +12 −12 sample/07-sequelize/package.json
  27. +8 −8 sample/08-webpack/package.json
  28. +10 −10 sample/09-babel-example/package.json
  29. +10 −11 sample/10-fastify/package.json
  30. +11 −11 sample/11-swagger/package.json
  31. +11 −11 sample/12-graphql-schema-first/package.json
  32. +12 −12 sample/13-mongo-typeorm/package.json
  33. +11 −11 sample/14-mongoose-base/package.json
  34. +10 −10 sample/15-mvc/package.json
  35. +12 −12 sample/16-gateways-ws/package.json
  36. +11 −11 sample/17-mvc-fastify/package.json
  37. +8 −8 sample/18-context/package.json
  38. +10 −10 sample/19-auth-jwt/package.json
  39. +12 −12 sample/20-cache/package.json
  40. +11 −11 sample/21-serializer/package.json
  41. +14 −14 sample/22-graphql-prisma/package.json
  42. +10 −10 sample/23-graphql-code-first/package.json
  43. +10 −10 sample/24-serve-static/package.json
  44. +11 −11 sample/25-dynamic-modules/package.json
  45. +11 −11 sample/26-queues/package.json
  46. +11 −11 sample/27-scheduling/package.json
  47. +11 −11 sample/28-sse/package.json
  48. +11 −11 sample/29-file-upload/package.json
  49. +10 −10 sample/30-event-emitter/package.json
  50. +11 −11 sample/31-graphql-federation-code-first/gateway/package.json
  51. +12 −12 sample/31-graphql-federation-code-first/posts-application/package.json
  52. +12 −12 sample/31-graphql-federation-code-first/users-application/package.json
  53. +12 −12 sample/32-graphql-federation-schema-first/gateway/package.json
  54. +12 −12 sample/32-graphql-federation-schema-first/posts-application/package.json
  55. +12 −12 sample/32-graphql-federation-schema-first/users-application/package.json
  56. +10 −10 sample/33-graphql-mercurius/package.json
  57. +12 −5 tools/gulp/tasks/samples.ts
30 changes: 30 additions & 0 deletions integration/lazy-modules/e2e/lazy-import-request-providers.spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
import { INestApplication } from '@nestjs/common';
import { Test } from '@nestjs/testing';
import { expect } from 'chai';
import * as request from 'supertest';
import { LazyController } from '../src/lazy.controller';

describe('Lazy Requested Scoped providers', () => {
let app: INestApplication;

beforeEach(async () => {
const module = await Test.createTestingModule({
controllers: [LazyController],
}).compile();

app = module.createNestApplication();
await app.init();
});

it('should not recreate dependencies for default scope', async () => {
const resultOne = await request(app.getHttpServer()).get('/lazy/request');

expect(resultOne.text).to.be.equal('Hi! Counter is 1');
expect(resultOne.statusCode).to.be.equal(200);

const resultTwo = await request(app.getHttpServer()).get('/lazy/request');

expect(resultTwo.text).to.be.equal('Hi! Counter is 2');
expect(resultTwo.statusCode).to.be.equal(200);
});
});
10 changes: 10 additions & 0 deletions integration/lazy-modules/src/lazy.controller.ts
Original file line number Diff line number Diff line change
@@ -13,6 +13,16 @@ export class LazyController {
const { TransientService } = await import('./transient.service');
const _service = await moduleRef.resolve(TransientService);

return _service.eager();
}
@Get('request')
async execRequestScope() {
const { RequestLazyModule } = await import('./request.module');
const moduleRef = await this.lazyLoadModule.load(() => RequestLazyModule);

const { RequestService } = await import('./request.service');
const _service = await moduleRef.resolve(RequestService);

return _service.eager();
}
}
11 changes: 11 additions & 0 deletions integration/lazy-modules/src/request.module.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import { Module } from '@nestjs/common';
import { EagerService } from './eager.module';
import { GlobalService } from './global.module';
import { RequestService } from './request.service';

@Module({
imports: [],
providers: [RequestService, GlobalService, EagerService],
exports: [RequestService],
})
export class RequestLazyModule {}
11 changes: 11 additions & 0 deletions integration/lazy-modules/src/request.service.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import { Injectable, Scope } from '@nestjs/common';
import { EagerService } from './eager.module';

@Injectable({ scope: Scope.REQUEST })
export class RequestService {
constructor(private eagerService: EagerService) {}

eager() {
return this.eagerService.sayHello();
}
}
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
@@ -3,5 +3,5 @@
"packages": [
"packages/*"
],
"version": "11.0.11"
"version": "11.0.12"
}
Loading