Skip to content

Commit 83b01ee

Browse files
committed
refactor(common): Switch TypeScript module to node16
Switch Node.js compiler option `module` from `commonjs` to `node16`, to preserve dynamic import. With `commonjs` these are converted to `require`. This allows to deprecate the `load-esm` dependency, introduced in 1e43fcb.
1 parent 86eb46d commit 83b01ee

File tree

99 files changed

+102
-125
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

99 files changed

+102
-125
lines changed

integration/auto-mock/test/bar.service.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { Test } from '@nestjs/testing';
22
import * as chai from 'chai';
3-
import * as chaiAsPromised from 'chai-as-promised';
3+
import chaiAsPromised from 'chai-as-promised';
44
import * as sinon from 'sinon';
55
import { BarService } from '../src/bar.service';
66
import { FooService } from '../src/foo.service';

integration/cors/e2e/express.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { NestExpressApplication } from '@nestjs/platform-express';
22
import { Test } from '@nestjs/testing';
3-
import * as request from 'supertest';
3+
import request from 'supertest';
44
import { AppModule } from '../src/app.module';
55

66
describe('Express Cors', () => {

integration/cors/e2e/fastify.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import {
33
NestFastifyApplication,
44
} from '@nestjs/platform-fastify';
55
import { Test } from '@nestjs/testing';
6-
import * as request from 'supertest';
6+
import request from 'supertest';
77
import { AppModule } from '../src/app.module';
88

99
describe.skip('Fastify Cors', () => {

integration/graphql-code-first/e2e/code-first.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { INestApplication } from '@nestjs/common';
22
import { Test } from '@nestjs/testing';
3-
import * as request from 'supertest';
3+
import request from 'supertest';
44
import { AppModule } from '../src/app.module';
55

66
describe('GraphQL - Code-first', () => {

integration/graphql-code-first/e2e/guards-filters.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { INestApplication } from '@nestjs/common';
22
import { Test } from '@nestjs/testing';
3-
import * as request from 'supertest';
3+
import request from 'supertest';
44
import { AppModule } from '../src/app.module';
55

66
describe('GraphQL - Guards', () => {

integration/graphql-code-first/e2e/pipes.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { INestApplication, ValidationPipe } from '@nestjs/common';
22
import { Test } from '@nestjs/testing';
3-
import * as request from 'supertest';
3+
import request from 'supertest';
44
import { AppModule } from '../src/app.module';
55

66
describe('GraphQL Pipes', () => {

integration/graphql-schema-first/e2e/graphql-async-class.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { INestApplication } from '@nestjs/common';
22
import { NestFactory } from '@nestjs/core';
3-
import * as request from 'supertest';
3+
import request from 'supertest';
44
import { AsyncClassApplicationModule } from '../src/async-options-class.module';
55

66
describe('GraphQL (async class)', () => {

integration/graphql-schema-first/e2e/graphql-async-existing.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { INestApplication } from '@nestjs/common';
22
import { NestFactory } from '@nestjs/core';
3-
import * as request from 'supertest';
3+
import request from 'supertest';
44
import { AsyncExistingApplicationModule } from '../src/async-options-existing.module';
55

66
describe('GraphQL (async existing)', () => {

integration/graphql-schema-first/e2e/graphql-async.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { INestApplication } from '@nestjs/common';
22
import { NestFactory } from '@nestjs/core';
3-
import * as request from 'supertest';
3+
import request from 'supertest';
44
import { AsyncApplicationModule } from '../src/async-options.module';
55

66
describe('GraphQL (async configuration)', () => {

integration/graphql-schema-first/e2e/graphql-request-scoped.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { GraphQLModule } from '@nestjs/graphql';
44
import { Test } from '@nestjs/testing';
55
import { expect } from 'chai';
66
import { join } from 'path';
7-
import * as request from 'supertest';
7+
import request from 'supertest';
88
import { CatsRequestScopedService } from '../src/cats/cats-request-scoped.service';
99
import { CatsModule } from '../src/cats/cats.module';
1010

0 commit comments

Comments
 (0)