Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(): v8 major release [WIP] #6349

Merged
merged 145 commits into from
Jun 25, 2021
Merged
Changes from 18 commits
Commits
Show all changes
145 commits
Select commit Hold shift + click to select a range
6026bda
refactor(common): improve `validatePath` function
Nov 28, 2019
40206a1
feat(core): Add RouterModule to the core
Nov 28, 2019
a0e9f69
feat(core): Add RouterModule#resolvePath
Mar 2, 2020
29957c1
fix(@core): Trying to Fix Failling tests
Mar 2, 2020
a66a183
feat: move from grpc to @grpc/grpc-js
gperdomor Jul 2, 2020
1e0852f
feat: force circle ci run
gperdomor Jul 2, 2020
47f05de
feat(core): exclude route from global prefix
Kiliandeca Aug 19, 2020
52e14b0
feat(core): address review comments
Kiliandeca Aug 19, 2020
c58036c
fix(): use class reference as injection token
tooleks Oct 28, 2020
2660984
fix(common): set name of httpexception as class name
DrPuneetGaur Dec 4, 2020
66b1a6a
fix(common): set name of httpexception as class name
DrPuneetGaur Dec 4, 2020
e54c0e1
fix(common): set name of httpexception as class name
DrPuneetGaur Dec 4, 2020
9e65d47
feat(websockets): messagebody param extract
jczacharia Dec 17, 2020
cdd51b0
feat(core): support http-errors library by the base filter
kamilmysliwiec Dec 21, 2020
1f2992b
chore(core): update is http error method comment
kamilmysliwiec Dec 21, 2020
f3ba3c8
refactor(): reimplement routes storage
kamilmysliwiec Dec 28, 2020
de27075
Merge branch 'fix/injector' of https://github.com/tooleks/nest into t…
kamilmysliwiec Jan 12, 2021
5bc15df
fix(core): add a missing alias provider for reflector class
kamilmysliwiec Jan 12, 2021
4cc2d18
feat(core): change listen to reject on server bind failures
branbranmuffin Nov 8, 2019
cc6d48b
feat(core): use class refs as keys (container)
kamilmysliwiec Jan 13, 2021
e2c9bd2
chore(core): fix typo
kamilmysliwiec Jan 13, 2021
1fca030
test(core): fix unit tests
kamilmysliwiec Jan 13, 2021
d8ea74d
fix(types) allows `mixin` type to be specified
dimitropoulos Jan 21, 2021
2f84e6e
chore(refactor) removes unnecessary type casts
dimitropoulos Jan 21, 2021
9b74f30
feat(common): built-in, console logger refactor
kamilmysliwiec Jan 22, 2021
da371c7
feat(@nestjs/common): add pipe transformer for parsing floats
kaufmo Jan 25, 2021
8f7362a
feat(core): use topological sort for lifecycle hooks
kamilmysliwiec Jan 25, 2021
0c6db0f
fix(core): use router.all for request method set to all
kamilmysliwiec Jan 25, 2021
849426e
test(core): fix router method factory unit test (replace use with all)
kamilmysliwiec Jan 26, 2021
2c7f76d
fix(deps): update socket.io packages
renovate-bot Jan 27, 2021
a69109e
Merge branch '8.0.0' into fix-set-name-property-of-exception-object-e…
kamilmysliwiec Jan 27, 2021
5d01d22
Merge pull request #5859 from coder-freestyle/fix-set-name-property-o…
kamilmysliwiec Jan 27, 2021
1433690
Update packages/common/test/utils/shared.utils.spec.ts
kamilmysliwiec Jan 27, 2021
714a5b0
Update package.json
kamilmysliwiec Jan 27, 2021
e0df01f
chore(): resolve merge conflicts
kamilmysliwiec Jan 27, 2021
e547172
Merge pull request #5990 from nestjs/feat/support-http-errors
kamilmysliwiec Jan 27, 2021
1320f4e
Merge pull request #6035 from nestjs/feat/router-module
kamilmysliwiec Jan 27, 2021
25ac73b
chore(): resolve merge conflicts
kamilmysliwiec Jan 27, 2021
87afafb
Merge pull request #6236 from nestjs/feat/topological-sort-hooks
kamilmysliwiec Jan 27, 2021
87991f6
Merge pull request #6237 from nestjs/fix/use-router-all
kamilmysliwiec Jan 27, 2021
0c5ed37
Merge pull request #6141 from nestjs/feat/class-references-as-tokens
kamilmysliwiec Jan 27, 2021
4fd664e
chore(): resolve merge conflicts
kamilmysliwiec Jan 27, 2021
46b1409
Merge pull request #6221 from nestjs/feat/logger-refactor
kamilmysliwiec Jan 27, 2021
fb14d96
Merge pull request #6216 from dimitropoulos/mixin-types
kamilmysliwiec Jan 27, 2021
036a9fb
chore(): resolve merge conflicts
kamilmysliwiec Jan 27, 2021
6b8a447
Merge branch 'gperdomor-feature/grpc-js' into 8.0.0
kamilmysliwiec Jan 27, 2021
cd0e2d2
Merge branch '8.0.0' of https://github.com/nestjs/nest into 8.0.0
kamilmysliwiec Jan 27, 2021
58812f5
fix(core): revert listen async and deprecate it
kamilmysliwiec Jan 27, 2021
e542f66
chore(): resolve merge conflicts
kamilmysliwiec Jan 27, 2021
701da56
feat(@nestjs/common): add pipe transformer to validate enum values
kaufmo Jan 25, 2021
b862e9c
feat(core): add file send capability
jmcdo29 Aug 15, 2020
6a786f0
feat(core): address file-send code review comments
jmcdo29 Aug 19, 2020
3ff7c8a
test: add non-file test case
jmcdo29 Nov 27, 2020
1c8ee54
feat(common): adds new class for file stream
jmcdo29 Dec 10, 2020
149bf82
test: adds test to check rxjs support
jmcdo29 Jan 28, 2021
9241905
fix(microservices): reject on error (on listen method call)
kamilmysliwiec Jan 28, 2021
8779a44
test(microservices): fix unit tests (nats and tcp servers)
kamilmysliwiec Jan 28, 2021
f8bc434
test(microservices): add unit tests (populate errors by servers)
kamilmysliwiec Jan 28, 2021
2101330
Merge pull request #6264 from nestjs/fix/microservice-reject-on-error
kamilmysliwiec Jan 29, 2021
1349050
test(): fix grpc invalid import
kamilmysliwiec Jan 29, 2021
0d17856
fix(core): fix fastify listen - run callback
kamilmysliwiec Jan 29, 2021
c7dce66
fix(microservices): fix on connect event listener (mqtt)
kamilmysliwiec Jan 29, 2021
cb37ecb
test(): remove deprecated methods usage, bump kafka timeout
kamilmysliwiec Jan 29, 2021
12aa576
chore(): resolve merge conflicts
kamilmysliwiec Jan 29, 2021
fc56e93
fix(): fix middleware tests, fix socketio deprecations
kamilmysliwiec Jan 29, 2021
3ffa76f
Merge pull request #5893 from nestjs/renovate/major-socket.io-packages
kamilmysliwiec Jan 29, 2021
142b39e
fix(websockets): require @nestjs/platform-socket.io correctly
merceyz Jan 21, 2021
9c3c486
Merge branch 'feat/send-files' of https://github.com/jmcdo29/nest int…
kamilmysliwiec Feb 1, 2021
f416235
refactor(common): small tweaks to the streamable file
kamilmysliwiec Feb 1, 2021
39c7dfa
Merge branch 'jmcdo29-feat/send-files' into 8.0.0
kamilmysliwiec Feb 1, 2021
fac13c6
Merge branch '8.0.0' of https://github.com/nestjs/nest into 8.0.0
kamilmysliwiec Feb 1, 2021
341f2dc
Merge branch 'ws-messagebody-param-extract' of https://github.com/jcz…
kamilmysliwiec Feb 1, 2021
e9024fe
feat(microservices): support property extraction in payload decorator
kamilmysliwiec Feb 1, 2021
20cbe3f
chore(): resolve conflicts
kamilmysliwiec Feb 1, 2021
f57d1c5
Merge branch 'merceyz/websockets-peer' of https://github.com/merceyz/…
kamilmysliwiec Feb 2, 2021
a6cf8be
fix(): flat platform socketio as an optional peer dep
kamilmysliwiec Feb 2, 2021
a0722d3
Merge branch 'merceyz-merceyz/websockets-peer' into 8.0.0
kamilmysliwiec Feb 2, 2021
9faeab9
Merge branch 'add-parse-float-and-enum-pipes' of https://github.com/k…
kamilmysliwiec Feb 2, 2021
f5598f7
test(common): update tests for streamable file, parse enum pipe
kamilmysliwiec Feb 2, 2021
c73adb6
Merge branch 'kaufmo-add-parse-float-and-enum-pipes' into 8.0.0
kamilmysliwiec Feb 2, 2021
c5d47bb
test(core): add tests for exclude global prefix methods
kamilmysliwiec Feb 2, 2021
1eb6827
Merge branch 'Kiliandeca-feat/exclude-route-global-prefix' into 8.0.0
kamilmysliwiec Feb 2, 2021
a86f2ae
chore(): add tsconfig paths to the base configuration
kamilmysliwiec Feb 3, 2021
a138be8
fix(websockets): support ws servers running on different paths
kamilmysliwiec Feb 4, 2021
d381e14
fix(websockets): allow to share a single server with multiple paths (ws)
kamilmysliwiec Feb 4, 2021
29ca9e1
chore(): resolve merge conflicts
kamilmysliwiec Feb 4, 2021
cb4a9d6
fix(websockets): allow multiple paths when http internal server is used
kamilmysliwiec Feb 4, 2021
470fcf8
chore(): resolve merge conflicts
kamilmysliwiec Feb 4, 2021
e473bd3
chore(): resolve merge conflicts
kamilmysliwiec Feb 4, 2021
949df4a
fix(): hotfix
kamilmysliwiec Feb 4, 2021
b711019
feat(microservices): support multiple event subscribers
kamilmysliwiec Feb 5, 2021
1e47bd9
sample(02-gateways): fix redis io adapter import
kamilmysliwiec Feb 5, 2021
b15914d
sample(02-gateways): fix redis io adapter import
kamilmysliwiec Feb 5, 2021
426b31f
Merge pull request #6321 from nestjs/fix/support-diff-ws-paths
kamilmysliwiec Feb 5, 2021
4133e46
Merge pull request #6334 from nestjs/feat/multiple-event-subscribers
kamilmysliwiec Feb 5, 2021
526cc5f
chore(): resolve conflicts
kamilmysliwiec Feb 8, 2021
7cb8f66
chore(): resolve conflicts
kamilmysliwiec Feb 8, 2021
6ede3ae
chore(common): deprecate http module
kamilmysliwiec Feb 8, 2021
8d8d3d0
hotfix(microservices): check if next function is present (event handler)
kamilmysliwiec Feb 8, 2021
3f2a9be
test(): bump shutdown hooks tests timeout
kamilmysliwiec Feb 8, 2021
530f835
hotfix(): fix integration tests script
kamilmysliwiec Feb 8, 2021
1eea03e
sample(02-gateways): fix redis adapter
kamilmysliwiec Feb 8, 2021
4c432a7
chore(): publish alpha release
kamilmysliwiec Feb 9, 2021
c212327
feat(core): add lazy module loader class
kamilmysliwiec Feb 11, 2021
a2b4c4a
fix(): fix unit tests, imports
kamilmysliwiec Feb 11, 2021
24ed6b4
chore(): exclude factories
kamilmysliwiec Feb 11, 2021
797ac43
test(): add basic test
kamilmysliwiec Feb 11, 2021
8ad9f0a
test(): add retries to kafka integration test (no leader error)
kamilmysliwiec Feb 11, 2021
73ae759
Merge pull request #6386 from nestjs/feat/lazy-module-loader
kamilmysliwiec Feb 11, 2021
08ace7d
test(): attempt to fix flaky kafka test
kamilmysliwiec Feb 12, 2021
d849726
Merge branch 'feat/lazy-module-loader' into 8.0.0
kamilmysliwiec Feb 12, 2021
fcf57a6
test(): skip flaky kafka integration test
kamilmysliwiec Feb 12, 2021
29b408b
feat(cache): allow for cache interceptor to be more easily extended
jmcdo29 Feb 17, 2021
070b81d
feat(common/core): api versioning
rich-w-lee Feb 17, 2021
6c9647a
chore(): fix merge conflicts, minor tweaks
kamilmysliwiec Feb 24, 2021
aaa8308
Merge branch 'rich-w-lee-feat/versioning' into 8.0.0
kamilmysliwiec Feb 24, 2021
d0e1faf
docs(common): versioning and path only supported by http apps
kamilmysliwiec Feb 24, 2021
ab4c783
chore(): publish 8.0.0-alpha.2 release
kamilmysliwiec Feb 24, 2021
040eb3c
fix(testing): add debug and verbose methods to testing logger
kamilmysliwiec Feb 25, 2021
1187212
test(): fix broken application config test
kamilmysliwiec Feb 25, 2021
ce291e7
feat: address comments to make new method for cache interceptor
jmcdo29 Feb 25, 2021
33b8095
fix(core): minor versioning tweaks (logging)
kamilmysliwiec Mar 5, 2021
6f20088
fix(core): fix path concatenating strategy
kamilmysliwiec Mar 10, 2021
e874d2d
chore(): publish release
kamilmysliwiec Mar 10, 2021
557b803
chore(): upgrade socket.io dependency
kamilmysliwiec Mar 12, 2021
74713d8
fix(websockets): fix missing transport type
kamilmysliwiec Mar 12, 2021
1f8560a
Merge pull request #6428 from jmcdo29/feat/extendable-cache-interceptor
kamilmysliwiec Mar 16, 2021
cf362d3
feat(microservices): support nats v2
kamilmysliwiec Mar 16, 2021
b36a147
fix(microservices): fix package json deps
kamilmysliwiec Mar 17, 2021
6043520
chore(): resolve conflicts
kamilmysliwiec May 14, 2021
00e9421
feat(): update to the latest rxjs (wip)
kamilmysliwiec May 14, 2021
18f66e8
fix(): fix rxjs breaking changes
kamilmysliwiec May 17, 2021
d2e9287
fix(websockets): fix package json file
kamilmysliwiec May 17, 2021
6186f6a
chore(): resolve conflicts
kamilmysliwiec May 17, 2021
6c1e23d
chore(): revert markdown-table
kamilmysliwiec May 17, 2021
3a2cbc0
test(): skip kafka tests
kamilmysliwiec May 17, 2021
25d49c7
sample(): upgrade rxjs version
kamilmysliwiec May 17, 2021
28e66a8
chore(): publish 8.0.0-alpha.4
kamilmysliwiec May 18, 2021
f9b5fb2
fix(core): add alias for http adapter host
kamilmysliwiec May 24, 2021
669b712
chore(): update package json files
kamilmysliwiec Jun 4, 2021
ccec0e8
fix(common): http status remove const
kamilmysliwiec Jun 4, 2021
8dd891b
chore(): publish alpha.7
kamilmysliwiec Jun 7, 2021
ca2a442
chore(): update package.json files
kamilmysliwiec Jun 17, 2021
6ba3f24
chore(): resolve conflicts
kamilmysliwiec Jun 25, 2021
3967c4e
chore(): resolve conflicts
kamilmysliwiec Jun 25, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions integration/graphql-code-first/e2e/pipes.spec.ts
Original file line number Diff line number Diff line change
@@ -33,6 +33,7 @@ describe('GraphQL Pipes', () => {
code: 'INTERNAL_SERVER_ERROR',
exception: {
message: 'Bad Request Exception',
name: 'BadRequestException',
response: {
message: [
'description must be longer than or equal to 30 characters',
77 changes: 77 additions & 0 deletions integration/hello-world/e2e/router-module-middleware.spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
import {
Controller,
Get,
INestApplication,
MiddlewareConsumer,
Module,
} from '@nestjs/common';
import { RouterModule } from '@nestjs/core';
import { Test } from '@nestjs/testing';
import * as request from 'supertest';
import { ApplicationModule } from '../src/app.module';

const RETURN_VALUE = 'test';
const SCOPED_VALUE = 'test_scoped';

@Controller()
class TestController {
@Get('test')
test() {
return RETURN_VALUE;
}

@Get('test2')
test2() {
return RETURN_VALUE;
}
}

@Module({
imports: [ApplicationModule],
controllers: [TestController],
})
class TestModule {
configure(consumer: MiddlewareConsumer) {
consumer
.apply((req, res, next) => res.send(SCOPED_VALUE))
.forRoutes(TestController);
}
}

describe('RouterModule with Middleware functions', () => {
let app: INestApplication;

beforeEach(async () => {
app = (
await Test.createTestingModule({
imports: [
TestModule,
RouterModule.register([
{
path: '/module-path/',
module: TestModule,
},
]),
],
}).compile()
).createNestApplication();

await app.init();
});

it(`forRoutes(TestController) - /test`, () => {
return request(app.getHttpServer())
.get('/module-path/test')
.expect(200, SCOPED_VALUE);
});

it(`forRoutes(TestController) - /test2`, () => {
return request(app.getHttpServer())
.get('/module-path/test2')
.expect(200, SCOPED_VALUE);
});

afterEach(async () => {
await app.close();
});
});
99 changes: 99 additions & 0 deletions integration/hello-world/e2e/router-module.spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
import { Controller, Get, INestApplication, Module } from '@nestjs/common';
import { RouterModule, Routes } from '@nestjs/core';
import { Test } from '@nestjs/testing';
import * as request from 'supertest';

describe('RouterModule', () => {
let app: INestApplication;

abstract class BaseController {
@Get()
getName() {
return this.constructor.name;
}
}

@Controller('/parent-controller')
class ParentController extends BaseController {}
@Controller('/child-controller')
class ChildController extends BaseController {}
@Controller('no-slash-controller')
class NoSlashController extends BaseController {}

class UnknownController {}
@Module({ controllers: [ParentController] })
class ParentModule {}

@Module({ controllers: [ChildController] })
class ChildModule {}

@Module({})
class AuthModule {}
@Module({})
class PaymentsModule {}

@Module({ controllers: [NoSlashController] })
class NoSlashModule {}

const routes1: Routes = [
{
path: 'parent',
module: ParentModule,
children: [
{
path: 'child',
module: ChildModule,
},
],
},
];
const routes2: Routes = [
{ path: 'v1', children: [AuthModule, PaymentsModule, NoSlashModule] },
];

@Module({
imports: [ParentModule, ChildModule, RouterModule.register(routes1)],
})
class MainModule {}

@Module({
imports: [
AuthModule,
PaymentsModule,
NoSlashModule,
RouterModule.register(routes2),
],
})
class AppModule {}

before(async () => {
const moduleRef = await Test.createTestingModule({
imports: [MainModule, AppModule],
}).compile();

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

it('should hit the "ParentController"', async () => {
return request(app.getHttpServer())
.get('/parent/parent-controller')
.expect(200, 'ParentController');
});

it('should hit the "ChildController"', async () => {
return request(app.getHttpServer())
.get('/parent/child/child-controller')
.expect(200, 'ChildController');
});

it('should hit the "NoSlashController"', async () => {
return request(app.getHttpServer())
.get('/v1/no-slash-controller')
.expect(200, 'NoSlashController');
});

afterEach(async () => {
await app.close();
});
});
Loading