@lykmapipo/mongoose-common 0.38.3 → 0.40.0

Sign up to get free protection for your applications and to get access to all the features.
package/package.json CHANGED
@@ -1,7 +1,32 @@
1
1
  {
2
2
  "name": "@lykmapipo/mongoose-common",
3
- "version": "0.38.3",
3
+ "version": "0.40.0",
4
4
  "description": "Re-usable helpers for mongoose",
5
+ "main": "lib/index.js",
6
+ "module": "es/index.js",
7
+ "scripts": {
8
+ "clean": "rimraf lib dist es umd logs",
9
+ "prepare": "husky install",
10
+ "prebuild": "npm test && npm run clean",
11
+ "build": "rollup -c",
12
+ "lint": "eslint --fix --ext .js src/ test/ examples/ rollup.config.js",
13
+ "prettier": "prettier --write '**/*.{md,json,yml,html}'",
14
+ "pretest": "npm run lint",
15
+ "test": "NODE_ENV=test nyc --reporter=html --reporter=text mocha --exit --timeout=8000 --require @babel/register test/**/*.spec.js",
16
+ "test:unit": "NODE_ENV=test npm run pretest && NODE_ENV=test mocha --exit --timeout=8000 --require @babel/register test/unit/**/*.spec.js",
17
+ "test:integration": "NODE_ENV=test npm run pretest && NODE_ENV=test mocha --exit --timeout=8000 --require @babel/register test/integration/**/*.spec.js",
18
+ "coverage": "nyc report --reporter=text-lcov | coveralls",
19
+ "docs": "doxdox 'lib/**/*.js' -p package.json -l markdown -o DOCUMENTATION.md",
20
+ "cmt": "git add -A && git-cz",
21
+ "changelog": "changelog",
22
+ "chore:deps": "ncu -u --timeout=60000 && npm install --save",
23
+ "lint:config": "eslint --print-config rollup.config.js",
24
+ "examples": "NODE_ENV=development BASE_PATH=./examples babel-node ./examples/index.js"
25
+ },
26
+ "repository": {
27
+ "type": "git",
28
+ "url": "https://github.com/lykmapipo/mongoose-common.git"
29
+ },
5
30
  "keywords": [
6
31
  "lykmapipo",
7
32
  "mongoose",
@@ -16,57 +41,95 @@
16
41
  "eachPath",
17
42
  "jsonschema"
18
43
  ],
19
- "main": "index.js",
20
- "scripts": {
21
- "test": "grunt test",
22
- "format": "prettier --write \"{lib,test,.}/**/*.js\" --loglevel silent",
23
- "docs": "doxdox 'index.js' -p package.json -l markdown -o DOCUMENTATION.md"
24
- },
25
- "repository": {
26
- "type": "git",
27
- "url": "https://github.com/lykmapipo/mongoose-common.git"
28
- },
29
44
  "author": {
30
45
  "name": "lykmapipo",
31
46
  "email": "lallyelias87@gmail.com",
32
47
  "url": "https://github.com/lykmapipo"
33
48
  },
34
- "license": "MIT",
35
- "bugs": {
36
- "url": "https://github.com/lykmapipo/mongoose-common/issues"
37
- },
38
- "homepage": "https://github.com/lykmapipo/mongoose-common",
39
49
  "contributors": [
40
50
  {
41
51
  "name": "lykmapipo",
42
- "github": "https://github.com/lykmapipo"
52
+ "email": "lallyelias87@gmail.com",
53
+ "url": "https://github.com/lykmapipo"
43
54
  }
44
55
  ],
56
+ "license": "MIT",
57
+ "bugs": {
58
+ "url": "https://github.com/lykmapipo/mongoose-common/issues",
59
+ "email": "lallyelias87@gmail.com"
60
+ },
61
+ "homepage": "https://github.com/lykmapipo/mongoose-common",
45
62
  "devDependencies": {
46
- "@lykmapipo/test-helpers": "^0.5.29",
47
- "chai": "^4.2.0",
63
+ "@babel/cli": "^7.15.7",
64
+ "@babel/core": "^7.15.5",
65
+ "@babel/node": "^7.15.4",
66
+ "@babel/preset-env": "^7.15.6",
67
+ "@babel/register": "^7.15.3",
68
+ "@commitlint/cli": "^13.1.0",
69
+ "@commitlint/config-conventional": "^13.1.0",
70
+ "@commitlint/travis-cli": "^13.1.0",
71
+ "@lykmapipo/test-helpers": ">=0.6.23",
72
+ "acorn": "^8.5.0",
73
+ "chai": "^4.3.4",
74
+ "commitizen": "^4.2.4",
75
+ "coveralls": "^3.1.1",
76
+ "cz-conventional-changelog": "^3.3.0",
48
77
  "doxdox": "^3.0.0",
49
- "grunt": "^1.2.1",
50
- "grunt-contrib-jshint": "^2.1.0",
51
- "grunt-contrib-watch": "^1.1.0",
52
- "grunt-mocha-test": "^0.13.3",
53
- "handlebars": "^4.7.6",
54
- "jshint-stylish": "^2.2.1",
55
- "mocha": "^8.0.1",
56
- "mongoose": ">=5.9.26",
57
- "prettier": "^2.0.5",
78
+ "eslint": "^7.32.0",
79
+ "eslint-config-airbnb-base": "^14.2.1",
80
+ "eslint-config-prettier": "^8.3.0",
81
+ "eslint-plugin-import": "^2.24.2",
82
+ "eslint-plugin-jsdoc": "^36.1.0",
83
+ "eslint-plugin-mocha": "^9.0.0",
84
+ "eslint-plugin-prettier": "^4.0.0",
85
+ "generate-changelog": "^1.8.0",
86
+ "handlebars": "^4.7.7",
87
+ "husky": "^7.0.2",
88
+ "kind-of": "^6.0.3",
89
+ "lint-staged": "^11.1.2",
90
+ "lodash.template": "^4.5.0",
91
+ "minimist": "^1.2.5",
92
+ "mocha": "^9.1.2",
93
+ "nyc": "^15.1.0",
94
+ "prettier": "^2.4.1",
95
+ "rimraf": "^3.0.2",
96
+ "rollup": "^2.57.0",
58
97
  "shelljs": "^0.8.4"
59
98
  },
60
- "peerDependencies": {
61
- "mongoose": ">=5.9.26"
62
- },
99
+ "peerDependencies": {},
63
100
  "dependencies": {
64
- "@lykmapipo/common": ">=0.38.1",
65
- "@lykmapipo/env": ">=0.17.15",
66
- "@lykmapipo/mongoose-connection": ">=0.3.3",
67
- "async": ">=3.2.0",
68
- "lodash": ">=4.17.19",
69
- "mongoose-schema-jsonschema": ">=1.4.4",
70
- "mongoose-valid8": ">=1.6.23"
101
+ "@lykmapipo/common": ">=0.44.4",
102
+ "@lykmapipo/env": ">=0.17.39",
103
+ "@lykmapipo/mongoose-connection": ">=0.5.2",
104
+ "async": ">=3.2.1",
105
+ "lodash": ">=4.17.21",
106
+ "mongoose": ">=6.0.7",
107
+ "mongoose-valid8": ">=1.7.1"
108
+ },
109
+ "engines": {
110
+ "node": ">=8.11.1",
111
+ "npm": ">=5.6.0"
112
+ },
113
+ "config": {
114
+ "commitizen": {
115
+ "path": "./node_modules/cz-conventional-changelog"
116
+ }
117
+ },
118
+ "commitlint": {
119
+ "extends": [
120
+ "@commitlint/config-conventional"
121
+ ]
122
+ },
123
+ "lint-staged": {
124
+ "src/**/*.js": [
125
+ "npm run lint",
126
+ "git add -A"
127
+ ]
128
+ },
129
+ "husky": {
130
+ "hooks": {
131
+ "pre-commit": "lint-staged",
132
+ "commit-msg": "commitlint -E HUSKY_GIT_PARAMS"
133
+ }
71
134
  }
72
135
  }
@@ -0,0 +1,26 @@
1
+ import { keys } from 'lodash';
2
+ import pkg from './package.json';
3
+
4
+ export default [
5
+ {
6
+ input: 'src/index.js',
7
+ external: [
8
+ 'path',
9
+ 'crypto',
10
+ 'mongoose/lib/utils',
11
+ ...keys(pkg.dependencies),
12
+ ...keys(pkg.peerDependencies),
13
+ ],
14
+ output: [
15
+ {
16
+ file: pkg.main,
17
+ format: 'cjs',
18
+ interop: false,
19
+ esModule: false,
20
+ preferConst: true,
21
+ strict: true,
22
+ },
23
+ { file: pkg.module, format: 'es' },
24
+ ],
25
+ },
26
+ ];
File without changes