mongoose 6.13.11 → 6.13.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "mongoose",
3
3
  "description": "Mongoose MongoDB ODM",
4
- "version": "6.13.11",
4
+ "version": "6.13.13",
5
5
  "author": "Guillermo Rauch <guillermo@learnboost.com>",
6
6
  "keywords": [
7
7
  "mongodb",
@@ -23,7 +23,7 @@
23
23
  "kareem": "2.5.1",
24
24
  "mongodb": "4.17.2",
25
25
  "mpath": "0.9.0",
26
- "mquery": "4.0.3",
26
+ "mquery": "4.0.4",
27
27
  "ms": "2.1.3",
28
28
  "sift": "16.0.1"
29
29
  },
@@ -78,25 +78,20 @@
78
78
  "scripts": {
79
79
  "docs:clean": "npm run docs:clean:stable",
80
80
  "docs:clean:stable": "rimraf index.html && rimraf -rf ./docs/*.html && rimraf -rf ./docs/api && rimraf -rf ./docs/tutorials/*.html && rimraf -rf ./docs/typescript/*.html && rimraf -rf ./docs/*.html && rimraf -rf ./docs/source/_docs && rimraf -rf ./tmp",
81
- "docs:clean:5x": "rimraf index.html && rimraf -rf ./docs/5.x && rimraf -rf ./docs/source/_docs && rimraf -rf ./tmp",
82
81
  "docs:clean:6x": "rimraf index.html && rimraf -rf ./docs/6.x && rimraf -rf ./docs/source/_docs && rimraf -rf ./tmp",
83
82
  "docs:copy:tmp": "mkdirp ./tmp/docs/css && mkdirp ./tmp/docs/js && mkdirp ./tmp/docs/images && mkdirp ./tmp/docs/tutorials && mkdirp ./tmp/docs/typescript && mkdirp ./tmp/docs/api && ncp ./docs/css ./tmp/docs/css --filter=.css$ && ncp ./docs/js ./tmp/docs/js --filter=.js$ && ncp ./docs/images ./tmp/docs/images && ncp ./docs/tutorials ./tmp/docs/tutorials && ncp ./docs/typescript ./tmp/docs/typescript && ncp ./docs/api ./tmp/docs/api && cp index.html ./tmp && cp docs/*.html ./tmp/docs/",
84
- "docs:copy:tmp:5x": "rimraf ./docs/5.x && ncp ./tmp ./docs/5.x",
85
83
  "docs:move:6x:tmp": "mv ./docs/6.x ./tmp",
86
84
  "docs:copy:tmp:6x": "rimraf ./docs/6.x && ncp ./tmp ./docs/6.x",
87
85
  "docs:checkout:gh-pages": "git checkout gh-pages",
88
- "docs:checkout:5x": "git checkout 5.x",
89
86
  "docs:checkout:6x": "git checkout 6.x",
90
87
  "docs:generate": "node ./scripts/website.js",
91
88
  "docs:generate:search": "node ./scripts/generateSearch.js",
92
89
  "docs:generate:sponsorData": "node ./scripts/loadSponsorData.js",
93
90
  "docs:merge:stable": "git merge master",
94
- "docs:merge:5x": "git merge 5.x",
95
91
  "docs:merge:6x": "git merge 6.x",
96
92
  "docs:test": "npm run docs:generate && npm run docs:generate:search",
97
93
  "docs:view": "node ./scripts/static.js",
98
94
  "docs:prepare:publish:stable": "npm run docs:checkout:gh-pages && npm run docs:merge:stable && npm run docs:clean:stable && npm run docs:generate && npm run docs:generate:search",
99
- "docs:prepare:publish:5x": "npm run docs:checkout:5x && npm run docs:merge:5x && npm run docs:clean:stable && npm run docs:generate && npm run docs:copy:tmp && npm run docs:checkout:gh-pages && npm run docs:copy:tmp:5x",
100
95
  "docs:prepare:publish:6x": "npm run docs:checkout:6x && npm run docs:merge:6x && npm run docs:clean:stable && env DOCS_DEPLOY=true npm run docs:generate && npm run docs:move:6x:tmp && npm run docs:checkout:gh-pages && npm run docs:copy:tmp:6x",
101
96
  "docs:check-links": "blc http://127.0.0.1:8089 -ro",
102
97
  "lint": "eslint .",
@@ -106,7 +101,6 @@
106
101
  "build-browser": "(rm ./dist/* || true) && node ./scripts/build-browser.js",
107
102
  "prepublishOnly": "npm run build-browser",
108
103
  "release": "git pull && git push origin master --tags && npm publish",
109
- "release-5x": "git pull origin 5.x && git push origin 5.x && git push origin 5.x --tags && npm publish --tag 5x",
110
104
  "release-6x": "git pull origin 6.x && git push origin 6.x && git push origin 6.x --tags && npm publish --tag 6x",
111
105
  "mongo": "node ./tools/repl.js",
112
106
  "test": "mocha --exit ./test/*.test.js",
package/types/query.d.ts CHANGED
@@ -138,7 +138,15 @@ declare module 'mongoose' {
138
138
  */
139
139
  returnDocument?: 'before' | 'after';
140
140
  runValidators?: boolean;
141
- /* Set to `true` to automatically sanitize potentially unsafe user-generated query projections */
141
+ /**
142
+ * Set to `true` to automatically sanitize potentially unsafe user-generated query projections.
143
+ * Converts projection values that aren't numbers or booleans to `1`, including strings like `'$password'`
144
+ * and expressions like `{ $concat: ['$password'] }`, so projections can't copy one field's value into another.
145
+ * The only projection operators that are allowed are `$elemMatch`, `$slice` with numbers, and `$meta: 'textScore'`.
146
+ *
147
+ * In Mongoose 6, `sanitizeProjection` does **not** prevent projecting in fields that the schema deselects
148
+ * with `select: false`: `select('+password')` and `select({ password: 1 })` still include `password`.
149
+ */
142
150
  sanitizeProjection?: boolean;
143
151
  /**
144
152
  * Set to `true` to automatically sanitize potentially unsafe query filters by stripping out query selectors that
package/deno.lock DELETED
@@ -1,61 +0,0 @@
1
- {
2
- "version": "5",
3
- "redirects": {
4
- "https://deno.land/std/flags/mod.ts": "https://deno.land/std@0.224.0/flags/mod.ts"
5
- },
6
- "remote": {
7
- "https://deno.land/std@0.224.0/assert/assert_exists.ts": "43420cf7f956748ae6ed1230646567b3593cb7a36c5a5327269279c870c5ddfd",
8
- "https://deno.land/std@0.224.0/assert/assertion_error.ts": "ba8752bd27ebc51f723702fac2f54d3e94447598f54264a6653d6413738a8917",
9
- "https://deno.land/std@0.224.0/flags/mod.ts": "88553267f34519c8982212185339efdb2d2e62c159ec558f47eb50c8952a6be3"
10
- },
11
- "workspace": {
12
- "packageJson": {
13
- "dependencies": [
14
- "npm:@ark/attest@0.56.3",
15
- "npm:@eslint/js@^9.39.3",
16
- "npm:@mongodb-js/mongodb-downloader@1",
17
- "npm:@standard-schema/spec@^1.1.0",
18
- "npm:@types/node@^20.19.0",
19
- "npm:acquit-ignore@0.2.2",
20
- "npm:acquit-require@0.1.1",
21
- "npm:acquit@1.4.0",
22
- "npm:ajv@8.20.0",
23
- "npm:c8@11.0.0",
24
- "npm:cheerio@1.2.0",
25
- "npm:dox@1.0.0",
26
- "npm:eslint-plugin-mocha-no-only@1.2.0",
27
- "npm:eslint@10.8.0",
28
- "npm:express@5.2.1",
29
- "npm:fs-extra@11.4",
30
- "npm:glob@^13.0.6",
31
- "npm:globals@^17.4.0",
32
- "npm:highlight.js@11.11.1",
33
- "npm:kareem@3.3.0",
34
- "npm:linkinator@8",
35
- "npm:lodash.isequal@4.5.0",
36
- "npm:lodash.isequalwith@4.4.0",
37
- "npm:markdownlint-cli2@0.23.2",
38
- "npm:marked@18.0.7",
39
- "npm:mkdirp@^3.0.1",
40
- "npm:mocha@12.0.0-rc.5",
41
- "npm:moment@2.30.1",
42
- "npm:mongodb-client-encryption@^7.2.0",
43
- "npm:mongodb-memory-server@11.2.0",
44
- "npm:mongodb-runner@6",
45
- "npm:mongodb@7.5",
46
- "npm:mpath@0.9.0",
47
- "npm:mquery@6.0.0",
48
- "npm:ms@2.1.3",
49
- "npm:ncp@2",
50
- "npm:pug@3.0.4",
51
- "npm:sift@17.1.3",
52
- "npm:sinon@22.1.0",
53
- "npm:tstyche@7",
54
- "npm:typescript-eslint@^8.31.1",
55
- "npm:typescript@5.9.3",
56
- "npm:uuid@14.0.1",
57
- "npm:xss@1.0.15"
58
- ]
59
- }
60
- }
61
- }