Small Changes

- package.json: minimize "clean" script
- npmignore: add "github-page/" to the ignore
- readme: change migrate link to the github-page link
- typegoose.ts: remove console.error, use "deprecate" instead
pull/22/head
hasezoey 4 years ago
parent 3bb701879b
commit 984a2e8899
No known key found for this signature in database
GPG Key ID: 9F8C99E834CC54FB
  1. 1
      .mocharc.yml
  2. 3
      .npmignore
  3. 2
      README.md
  4. 5
      package.json
  5. 3
      src/typegoose.ts

@ -1,5 +1,6 @@
color: true
recursive: true
bail: false # to see which tests are failing, not just the first
require:
- 'ts-node/register'
- 'source-map-support/register'

@ -182,3 +182,6 @@ test
# CI only files
ghPagesPre.sh
# ignore entire github-page
github-page/

@ -127,7 +127,7 @@ You also need to install `mongoose`, since version 5 it is listed as a peer-depe
*Note: typegoose uses the package `object.fromEntries` as a polyfill for node versions <12*
## [Migrate to 6.0.0](migrate_to_6.md)
## [Migrate to 6.0.0](https://hasezoey.github.io/typegoose/guides/migrate-to-6/)
## Testing

@ -3,6 +3,7 @@
"version": "6.0.0-22",
"description": "Define Mongoose models using TypeScript classes",
"main": "lib/typegoose.js",
"types": "lib/typegoose.d.ts",
"engines": {
"node": ">=8.10.0"
},
@ -19,14 +20,12 @@
"test": "npm run buildtests && npm run mocha",
"mocha": "nyc mocha \"./test/index.test.ts\" --timeout 15000",
"coverage": "nyc report --reporter=text-lcov | coveralls",
"clean": "rimraf lib && rm .tsbuildinfo && rimraf .nyc_output && rimraf coverage && rimraf doc && rimraf build",
"clean": "rimraf lib .tsbuildinfo .nyc_output coverage doc build",
"doc": "typedoc --out ./doc ./src --mode modules --exclude \"**/internal/*\"",
"doc:all": "typedoc --out ./doc ./src --mode modules",
"prepublish": "npm run build"
},
"repository": "github:hasezoey/typegoose",
"types": "lib/typegoose.d.ts",
"typings": "lib/typegoose.d.ts",
"author": "Akos Szokodi <akos@codingsans.com> (http://codingsans.com)",
"contributors": [
"Ben305",

@ -115,8 +115,7 @@ export function buildSchema<T, U extends NoParamConstructor<T>>(cl: U) {
while (parentCtor && parentCtor.name !== 'Object') {
/* istanbul ignore next */
if (parentCtor.name === 'Typegoose') { // TODO: remove this if, if the Typegoose class gets removed [DEPRECATION]
// tslint:disable-next-line:no-console
console.error('The Typegoose Class is deprecated, please try to remove it');
deprecate(() => undefined, 'The Typegoose Class is deprecated, please try to remove it')();
}
// extend schema
sch = _buildSchema(parentCtor, sch);

Loading…
Cancel
Save