Skip to content

Commit

Permalink
chore(*)!: remove support for Nest v6 and Node <12
Browse files Browse the repository at this point in the history
Also removes the UMD bundle since this is only used in Node.js.
It has been replaced by a commonjs bundle.
  • Loading branch information
willsoto committed Aug 27, 2020
1 parent 937e023 commit d7506e8
Show file tree
Hide file tree
Showing 6 changed files with 1,258 additions and 3,385 deletions.
2 changes: 1 addition & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
"project": "./tsconfig.json"
},
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"@willsoto/eslint-config-base/typescript",
"prettier",
"prettier/@typescript-eslint"
],
Expand Down
2 changes: 2 additions & 0 deletions lib/core.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import {
BeforeApplicationShutdown,
DynamicModule,
FactoryProvider,
Global,
Inject,
Module,
Provider,
Expand All @@ -22,6 +23,7 @@ import {
ObjectionModuleOptionsFactory,
} from "./interfaces";

@Global()
@Module({})
export class ObjectionCoreModule implements BeforeApplicationShutdown {
constructor(
Expand Down
75 changes: 36 additions & 39 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
],
"license": "Apache-2.0",
"author": "Will Soto <willsoto@users.noreply.github.com> (https://github.com/willsoto)",
"main": "dist/nestjs-objection.umd.js",
"module": "dist/nestjs-objection.esm.js",
"main": "./dist/nestjs-objection.cjs.js",
"module": "./dist/nestjs-objection.esm.js",
"typings": "./typings/index.d.ts",
"files": [
"dist",
Expand All @@ -23,7 +23,7 @@
"build": "rollup --config rollup.config.js",
"postbuild": "yarn typings",
"clean": "rimraf dist",
"lint": "eslint lib --ext ts --fix",
"lint": "eslint lib tests --ext ts --fix",
"prerelease": "yarn build",
"release": "standard-version --sign",
"postrelease": "conventional-github-releaser -p angular",
Expand Down Expand Up @@ -51,46 +51,43 @@
]
},
"devDependencies": {
"@commitlint/cli": "9.1.2",
"@commitlint/config-conventional": "9.1.2",
"@godaddy/terminus": "4.4.1",
"@nestjs/common": "6.11.11",
"@nestjs/core": "6.11.11",
"@nestjs/terminus": "6.5.6",
"@nestjs/testing": "7.0.0",
"@types/jest": "~26.0.0",
"@typescript-eslint/eslint-plugin": "2.34.0",
"@typescript-eslint/parser": "2.34.0",
"@willsoto/eslint-config-base": "2.0.0",
"conventional-github-releaser": "3.1.5",
"eslint": "6.8.0",
"eslint-config-prettier": "6.11.0",
"husky": "4.2.5",
"jest": "26.4.2",
"knex": "0.21.5",
"lint-staged": "10.2.13",
"@commitlint/cli": "~9.1.2",
"@commitlint/config-conventional": "~9.1.2",
"@nestjs/common": "~7.4.2",
"@nestjs/core": "~7.4.2",
"@nestjs/testing": "~7.4.2",
"@rollup/plugin-typescript": "~5.0.2",
"@types/jest": "~26.0.10",
"@typescript-eslint/eslint-plugin": "~3.10.1",
"@typescript-eslint/parser": "~3.10.1",
"conventional-github-releaser": "~3.1.5",
"eslint": "~7.7.0",
"eslint-config-prettier": "~6.11.0",
"husky": "~4.2.5",
"jest": "~26.4.2",
"knex": "~0.21.5",
"lint-staged": "~10.2.13",
"markdown-toc": "~1.2.0",
"objection": "2.2.3",
"prettier": "2.1.1",
"prettier-plugin-organize-imports": "~1.1.0",
"prettier-plugin-packagejson": "~2.2.3",
"reflect-metadata": "0.1.13",
"rimraf": "3.0.2",
"rollup": "2.26.5",
"rollup-plugin-eslint": "7.0.0",
"rollup-plugin-filesize": "9.0.2",
"rollup-plugin-typescript": "1.0.1",
"rxjs": "6.6.2",
"sqlite3": "5.0.0",
"standard-version": "9.0.0",
"objection": "~2.2.3",
"prettier": "~2.1.1",
"prettier-plugin-organize-imports": "~1.1.1",
"prettier-plugin-packagejson": "~2.2.5",
"reflect-metadata": "~0.1.13",
"rimraf": "~3.0.2",
"rollup": "~2.26.6",
"rollup-plugin-filesize": "~9.0.2",
"rxjs": "~6.6.2",
"sqlite3": "~5.0.0",
"standard-version": "~9.0.0",
"ts-jest": "~26.3.0",
"typescript": "3.9.7"
"tslib": "~2.0.1",
"typescript": "~4.0.2"
},
"peerDependencies": {
"@nestjs/common": ">=6.2.0",
"@nestjs/core": ">=6.2.0",
"knex": ">=0.16.5",
"objection": ">=1.6.8"
"@nestjs/common": "^7.0.0",
"@nestjs/core": "^7.0.0",
"knex": "^0.16.0",
"objection": "^1.6.0 || ^2.0.0"
},
"volta": {
"node": "12.12.0",
Expand Down
30 changes: 6 additions & 24 deletions rollup.config.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,8 @@
import { eslint } from "rollup-plugin-eslint";
import typescript from "@rollup/plugin-typescript";
import filesize from "rollup-plugin-filesize";
import typescript from "rollup-plugin-typescript";
import pkg from "./package.json";

const formats = ["umd", "esm"];
const globals = {
"@nestjs/common": "nestjsCommon",
knex: "Knex",
objection: "Objection"
};
const formats = ["cjs", "esm"];

export default {
input: "lib/index.ts",
Expand All @@ -17,24 +11,12 @@ export default {
format,
name: "NestJSObjection",
sourcemap: true,
globals,
banner: `
/**
*
* ${pkg.name}@${pkg.version}
* ${pkg.license}
*
*/`
})),
external: Object.keys(globals),
external: Object.keys(pkg.peerDependencies),
plugins: [
eslint({
throwOnWarning: true,
throwOnError: true
}),
typescript({
tsconfig: "./tsconfig.build.json"
tsconfig: "./tsconfig.build.json",
}),
filesize()
]
filesize(),
],
};
5 changes: 3 additions & 2 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,13 @@
"esModuleInterop": true,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"lib": ["esnext"],
"lib": ["ES2019"],
"module": "es2015",
"moduleResolution": "node",
"skipLibCheck": true,
"sourceMap": true,
"strict": true
"strict": true,
"target": "ES2019"
},
"exclude": ["node_modules"],
"include": ["lib/**/*.ts", "tests/**/*.ts"]
Expand Down
Loading

0 comments on commit d7506e8

Please sign in to comment.