Skip to content

Commit

Permalink
Merge 227d4fb into 89d84d2
Browse files Browse the repository at this point in the history
  • Loading branch information
jbpionnier committed Oct 5, 2018
2 parents 89d84d2 + 227d4fb commit e330793
Show file tree
Hide file tree
Showing 37 changed files with 3 additions and 39 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
"scripts": {
"coverage": "nyc report --reporter=text-lcov | coveralls",
"precommit": "lint-staged",
"test": "nyc --require ts-node/register mocha packages/**/*.spec.ts --reporter spec",
"integration-test": "mocha integration/**/*.spec.ts --reporter spec --require ts-node/register",
"test": "nyc --require ts-node/register mocha packages/**/*.spec.ts --reporter spec --require 'node_modules/reflect-metadata/Reflect.js'",
"integration-test": "mocha integration/**/*.spec.ts --reporter spec --require ts-node/register --require 'node_modules/reflect-metadata/Reflect.js'",
"lint": "tslint -p tsconfig.json -c tslint.json \"packages/**/*.ts\" -e \"*.spec.ts\"",
"format": "prettier **/**/*.ts --ignore-path ./.prettierignore --write && git status",
"build": "gulp build && gulp move",
Expand Down
1 change: 0 additions & 1 deletion packages/common/decorators/core/catch.decorator.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import 'reflect-metadata';
import { FILTER_CATCH_EXCEPTIONS } from '../../constants';
import { Type } from '../../interfaces';

Expand Down
1 change: 0 additions & 1 deletion packages/common/decorators/core/controller.decorator.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import 'reflect-metadata';
import { isUndefined } from '../../utils/shared.utils';
import { PATH_METADATA } from '../../constants';

Expand Down
1 change: 0 additions & 1 deletion packages/common/decorators/core/dependencies.decorator.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import 'reflect-metadata';
import { PARAMTYPES_METADATA } from '../../constants';

export function flatten(arr: any[]) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import 'reflect-metadata';
import { EXCEPTION_FILTERS_METADATA } from '../../constants';
import { ExceptionFilter } from '../../index';
import { extendArrayMetadata } from '../../utils/extend-metadata.util';
Expand Down
1 change: 0 additions & 1 deletion packages/common/decorators/core/inject.decorator.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import 'reflect-metadata';
import { SELF_DECLARED_DEPS_METADATA } from '../../constants';
import { isFunction } from '../../utils/shared.utils';

Expand Down
1 change: 0 additions & 1 deletion packages/common/decorators/core/optional.decorator.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import 'reflect-metadata';
import { OPTIONAL_DEPS_METADATA } from '../../constants';

/**
Expand Down
1 change: 0 additions & 1 deletion packages/common/decorators/http/header.decorator.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import 'reflect-metadata';
import { HEADERS_METADATA } from '../../constants';
import { extendArrayMetadata } from '../../utils/extend-metadata.util';

Expand Down
1 change: 0 additions & 1 deletion packages/common/decorators/http/redirect.decorator.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import 'reflect-metadata';
import { REDIRECT_METADATA } from '../../constants';

/**
Expand Down
1 change: 0 additions & 1 deletion packages/common/decorators/http/render.decorator.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import 'reflect-metadata';
import { RENDER_METADATA } from '../../constants';

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import 'reflect-metadata';
import { RequestMappingMetadata } from '../../interfaces/request-mapping-metadata.interface';
import { RequestMethod } from '../../enums/request-method.enum';
import { PATH_METADATA, METHOD_METADATA } from '../../constants';
Expand Down
1 change: 0 additions & 1 deletion packages/common/decorators/http/route-params.decorator.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import 'reflect-metadata';
import { ROUTE_ARGS_METADATA } from '../../constants';
import { RouteParamtypes } from '../../enums/route-paramtypes.enum';
import { PipeTransform } from '../../index';
Expand Down
1 change: 0 additions & 1 deletion packages/common/decorators/modules/global.decorator.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import 'reflect-metadata';
import { GLOBAL_MODULE_METADATA } from '../../constants';
/**
* Makes the module global-scoped.
Expand Down
1 change: 0 additions & 1 deletion packages/common/decorators/modules/module.decorator.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import * as deprecate from 'deprecate';
import 'reflect-metadata';
import { METADATA as metadataConstants } from '../../constants';
import { ModuleMetadata } from '../../interfaces/modules/module-metadata.interface';
import { InvalidModuleConfigException } from './exceptions/invalid-module-config.exception';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import 'reflect-metadata';
import { SHARED_MODULE_METADATA } from '../../constants';
/**
* Makes the module single-scoped (not singleton).
Expand Down
2 changes: 1 addition & 1 deletion packages/common/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* https://nestjs.com
* MIT Licensed
*/

import 'reflect-metadata';
export * from './cache';
export * from './decorators';
export * from './enums';
Expand Down
1 change: 0 additions & 1 deletion packages/common/test/decorators/catch.decorator.spec.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { expect } from 'chai';
import 'reflect-metadata';
import { FILTER_CATCH_EXCEPTIONS } from '../../constants';
import { Catch } from '../../decorators/core/catch.decorator';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import 'reflect-metadata';
import { expect } from 'chai';
import { Component, MiddlewareFunction, Interceptor, mixin, Injectable } from '../../index';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import 'reflect-metadata';
import { expect } from 'chai';
import { Controller } from '../../decorators/core/controller.decorator';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import 'reflect-metadata';
import { expect } from 'chai';
import { Dependencies } from '../../decorators/core/dependencies.decorator';
import { PARAMTYPES_METADATA } from '../../constants';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import 'reflect-metadata';
import { expect } from 'chai';
import { EXCEPTION_FILTERS_METADATA } from '../../constants';
import { UseFilters } from '../../decorators/core/exception-filters.decorator';
Expand Down
1 change: 0 additions & 1 deletion packages/common/test/decorators/global.decorator.spec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import 'reflect-metadata';
import { expect } from 'chai';
import { GLOBAL_MODULE_METADATA } from '../../constants';
import { Global } from '../../index';
Expand Down
1 change: 0 additions & 1 deletion packages/common/test/decorators/header.decorator.spec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import 'reflect-metadata';
import { expect } from 'chai';
import { Header } from '../../decorators/http';
import { HEADERS_METADATA } from '../../constants';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import 'reflect-metadata';
import { expect } from 'chai';
import { HttpCode } from '../../decorators/http/http-code.decorator';
import { HTTP_CODE_METADATA } from '../../constants';
Expand Down
1 change: 0 additions & 1 deletion packages/common/test/decorators/inject.decorator.spec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import 'reflect-metadata';
import { expect } from 'chai';
import { SELF_DECLARED_DEPS_METADATA } from '../../constants';
import { Inject } from '../../index';
Expand Down
1 change: 0 additions & 1 deletion packages/common/test/decorators/module.decorator.spec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import 'reflect-metadata';
import { expect } from 'chai';
import { Module } from '../../decorators/modules/module.decorator';
import { InvalidModuleConfigException } from '../../decorators/modules/exceptions/invalid-module-config.exception';
Expand Down
1 change: 0 additions & 1 deletion packages/common/test/decorators/redirect.decorator.spec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import 'reflect-metadata';
import { expect } from 'chai';
import { Redirect } from '../../decorators/http/redirect.decorator';
import { REDIRECT_METADATA } from '../../constants';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import 'reflect-metadata';
import { expect } from 'chai';
import { ReflectMetadata } from '../../decorators/core/reflect-metadata.decorator';

Expand Down
1 change: 0 additions & 1 deletion packages/common/test/decorators/render.decorator.spec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import 'reflect-metadata';
import { expect } from 'chai';
import { Render } from '../../decorators/http/render.decorator';
import { RENDER_METADATA } from '../../constants';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import 'reflect-metadata';
import { expect } from 'chai';
import { RequestMapping } from '../../decorators/http/request-mapping.decorator';
import { RequestMethod } from '../../enums/request-method.enum';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { Param } from '@nestjs/common';
import { expect } from 'chai';
import 'reflect-metadata';
import { Body, Query } from '../../decorators';
import { RequestMethod } from '../../enums/request-method.enum';
import { All, Delete, Get, Patch, Post, Put } from '../../index';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import 'reflect-metadata';
import { expect } from 'chai';
import { UseGuards } from '../../decorators/core/use-guards.decorator';
import { GUARDS_METADATA } from '../../constants';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import 'reflect-metadata';
import { expect } from 'chai';
import { UseInterceptors } from '../../decorators/core/use-interceptors.decorator';
import { INTERCEPTORS_METADATA } from '../../constants';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import 'reflect-metadata';
import { expect } from 'chai';
import { UsePipes } from '../../decorators/core/use-pipes.decorator';
import { PIPES_METADATA } from '../../constants';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import 'mocha';
import 'reflect-metadata';
import { expect } from 'chai';
import { BindResolveMiddlewareValues } from '../../utils/bind-resolve-values.util';
import { NestMiddleware } from '../../interfaces/middleware/nest-middleware.interface';
Expand Down
1 change: 0 additions & 1 deletion packages/common/test/utils/merge-with-values.util.spec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import 'reflect-metadata';
import { expect } from 'chai';
import { MergeWithValues } from '../../utils/merge-with-values.util';

Expand Down
2 changes: 0 additions & 2 deletions packages/common/utils/merge-with-values.util.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import 'reflect-metadata';

export interface Constructor<T> {
new (...args: any[]): T;
}
Expand Down

0 comments on commit e330793

Please sign in to comment.