Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: Automattic/mongoose
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: c86ef79c5d351510010fd3a23b6c204897c20704
Choose a base ref
...
head repository: Automattic/mongoose
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: f8d2721567ef3f0811cf591649e70bea20db68b4
Choose a head ref

Commits on Apr 25, 2017

  1. Copy the full SHA
    7bcc172 View commit details

Commits on Jun 9, 2017

  1. schema type boolean: strictBool option added

    c0d0g3n committed Jun 9, 2017
    Copy the full SHA
    e8057f1 View commit details
  2. schema type boolean: strictBool test added

    c0d0g3n committed Jun 9, 2017
    Copy the full SHA
    0fb09d9 View commit details

Commits on Jun 18, 2017

  1. strictBool test rewritten to support Node < 4

    c0d0g3n committed Jun 18, 2017
    Copy the full SHA
    aa6d05a View commit details

Commits on Aug 12, 2017

  1. test(document): repro #5470

    vkarpov15 committed Aug 12, 2017
    Copy the full SHA
    9e97444 View commit details
  2. Copy the full SHA
    14d7ca3 View commit details

Commits on Aug 28, 2017

  1. Copy the full SHA
    2a16f2a View commit details
  2. Copy the full SHA
    6bd3172 View commit details

Commits on Sep 5, 2017

  1. Merge branch 'master' into 4.12

    Conflicts:
    	package.json
    vkarpov15 committed Sep 5, 2017
    Copy the full SHA
    088c855 View commit details
  2. Copy the full SHA
    a55c991 View commit details

Commits on Sep 9, 2017

  1. Merge branch 'master' into 4.12

    Conflicts:
    	lib/model.js
    vkarpov15 committed Sep 9, 2017
    Copy the full SHA
    3955be5 View commit details

Commits on Sep 10, 2017

  1. Copy the full SHA
    6e5e567 View commit details
  2. style: fix lint

    vkarpov15 committed Sep 10, 2017
    Copy the full SHA
    1f29656 View commit details
  3. Merge branch 'master' into 4.12

    Conflicts:
    	package.json
    vkarpov15 committed Sep 10, 2017
    Copy the full SHA
    41f0999 View commit details
  4. Copy the full SHA
    324b4cb View commit details
  5. test: fix tests

    vkarpov15 committed Sep 10, 2017
    Copy the full SHA
    7b0da85 View commit details

Commits on Sep 12, 2017

  1. Copy the full SHA
    52c8b25 View commit details
  2. Copy the full SHA
    e5fd79d View commit details

Commits on Sep 16, 2017

  1. Merge branch 'master' into 4.12

    Conflicts:
    	package-lock.json
    	test/query.test.js
    vkarpov15 committed Sep 16, 2017
    Copy the full SHA
    81b8418 View commit details
  2. Copy the full SHA
    32303d8 View commit details
  3. Copy the full SHA
    5d8b19f View commit details
  4. test(query): repro #5613

    vkarpov15 committed Sep 16, 2017
    Copy the full SHA
    d5e0f23 View commit details
  5. Copy the full SHA
    d4d9ca8 View commit details
  6. Copy the full SHA
    8c39705 View commit details

Commits on Sep 19, 2017

  1. Copy the full SHA
    e12a1a3 View commit details

Commits on Sep 25, 2017

  1. Merge branch 'master' into 4.12

    Conflicts:
    	package-lock.json
    	package.json
    vkarpov15 committed Sep 25, 2017
    Copy the full SHA
    085343b View commit details
  2. Revert "fix(model): bind statics to model so statics can serve as exp…

    …ress middleware"
    
    This reverts commit e12a1a3.
    vkarpov15 committed Sep 25, 2017
    Copy the full SHA
    4e589da View commit details
  3. Copy the full SHA
    bef5646 View commit details

Commits on Sep 30, 2017

  1. chore: add missing comment

    vkarpov15 committed Sep 30, 2017
    Copy the full SHA
    33342bf View commit details
  2. Copy the full SHA
    abe39a6 View commit details
  3. Merge branch 'master' into 4.12

    Conflicts:
    	lib/model.js
    	package-lock.json
    	package.json
    vkarpov15 committed Sep 30, 2017
    Copy the full SHA
    fb68f68 View commit details
  4. chore: fix merge conflict

    vkarpov15 committed Sep 30, 2017
    Copy the full SHA
    1ee73ce View commit details
  5. Copy the full SHA
    25a1566 View commit details
  6. style: fix lint

    vkarpov15 committed Sep 30, 2017
    Copy the full SHA
    7880a77 View commit details

Commits on Oct 1, 2017

  1. Copy the full SHA
    97397cc View commit details
  2. Copy the full SHA
    a072f83 View commit details

Commits on Oct 2, 2017

  1. Copy the full SHA
    d6f65e7 View commit details

Commits on May 23, 2019

  1. Copy the full SHA
    eda7cac View commit details
  2. refactor(populate): allow arbitrary options to populate without modif…

    …ying positional args
    
    Re: #6520
    vkarpov15 committed May 23, 2019
    Copy the full SHA
    a33c82e View commit details
  3. test: fix tests re: #6520

    vkarpov15 committed May 23, 2019
    Copy the full SHA
    1efe40b View commit details
  4. test: fix tests re: #6520

    vkarpov15 committed May 23, 2019
    Copy the full SHA
    1897b6a View commit details
  5. feat(populate): support PopulateOptions#connection option to allow …

    …cross-db populate with refPath
    
    Fix #6520
    vkarpov15 committed May 23, 2019
    Copy the full SHA
    4129123 View commit details
  6. Copy the full SHA
    13f8073 View commit details
  7. Copy the full SHA
    baf8cba View commit details
  8. Copy the full SHA
    4d4286b View commit details

Commits on May 25, 2019

  1. Copy the full SHA
    ade5399 View commit details
  2. fix: avoid setting PopulateOptions#model to prevent confusion betwe…

    …en internal `model` and user-specified `model`
    
    Fix #6520
    vkarpov15 committed May 25, 2019
    Copy the full SHA
    e493bc5 View commit details
  3. Copy the full SHA
    2cc022d View commit details

Commits on May 31, 2019

  1. Copy the full SHA
    f14c706 View commit details
  2. Copy the full SHA
    da4688b View commit details
Showing 790 changed files with 105,816 additions and 103,725 deletions.
8 changes: 6 additions & 2 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
docs/
bin/
test/triage/
test/model.discriminator.test.js
tools/
test/es6/
test/es-next/
test/files/
dist/
benchmarks/

search.js
31 changes: 0 additions & 31 deletions .eslintrc.yml

This file was deleted.

5 changes: 5 additions & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# These are supported funding model platforms

github: vkarpov15
open_collective: mongoose
tidelift: npm/mongoose
8 changes: 6 additions & 2 deletions .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -5,8 +5,12 @@
**What is the current behavior?**

**If the current behavior is a bug, please provide the steps to reproduce.**
<!-- If you can, provide a standalone script / gist to reproduce your issue -->
<!-- If you can, provide a standalone script / gist to reproduce your issue. -->

<!-- If you are using TypeScript, please include your `tsconfig.json` -->

**What is the expected behavior?**

**Please mention your node.js, mongoose and MongoDB version.**
**What are the versions of Node.js, Mongoose and MongoDB you are using? Note that "latest" is not a version.**

<!-- You can print `mongoose.version` to get your current version of Mongoose: https://mongoosejs.com/docs/api.html#mongoose_Mongoose-version -->
10 changes: 6 additions & 4 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
<!-- Thanks for submitting a pull request! Please provide enough information so that others can review your pull request. The two fields below are mandatory. -->
Thanks for submitting a pull request! Please provide enough information so that others can review your pull request. The two fields below are mandatory.

If you're making a change to documentation, do **not** modify a `.html` file directly. Instead find the corresponding `.pug` file or test case in the `test/docs` directory.

**Summary**

<!-- Explain the **motivation** for making this change. What existing problem does the pull request solve? -->
<!-- Explain the **motivation** for making this change. What problem does the pull request solve? -->

**Test plan**
**Examples**

<!-- Demonstrate the code is solid. Example: The exact commands you ran and their output, screenshots / videos if the pull request changes UI. -->
<!-- If this code fixes a bug or adds a new feature, provide an example demonstrating the change, unless you added a test. -->
56 changes: 56 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: Test
on:
pull_request:
push:
jobs:
test:
runs-on: ubuntu-18.04
strategy:
fail-fast: false
matrix:
node: [4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]
name: Node ${{ matrix.node }}
steps:
- uses: actions/checkout@v2

- name: Setup node
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node }}

- name: Upgrade Node 5 npm
run: npm install -g npm@3
if: ${{ matrix.node == 5 }}

- run: npm install

- name: Setup
run: |
wget -q http://downloads.mongodb.org/linux/mongodb-linux-x86_64-ubuntu1804-4.0.2.tgz
tar xf mongodb-linux-x86_64-ubuntu1804-4.0.2.tgz
mkdir -p ./data/db/27017 ./data/db/27000
printf "\n--timeout 8000" >> ./test/mocha.opts
./mongodb-linux-x86_64-ubuntu1804-4.0.2/bin/mongod --fork --dbpath ./data/db/27017 --syslog --port 27017
sleep 2
mongod --version
mkdir ./test/typescript/node_modules
ln -s `pwd` ./test/typescript/node_modules/mongoose
echo `pwd`/mongodb-linux-x86_64-ubuntu1804-4.0.2/bin >> $GITHUB_PATH
- run: npm test

lint:
runs-on: ubuntu-latest
name: Linter
steps:
- uses: actions/checkout@v2

- name: Setup node
uses: actions/setup-node@v1
with:
node-version: 14

- run: npm install

- name: Linter
run: npm run lint
13 changes: 11 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
lib-cov
**.swp
*.swp
*.sw*
node_modules/
*.orig
@@ -18,6 +18,7 @@ bin/mongoose.min.js
coverage
npm-debug.log
data/
.nyc_output/

tools/31*

@@ -28,9 +29,17 @@ tools/31*
*.njsproj
*.sln

# Visual STudio Code
# Visual Studio Code
.vscode

*.key

docs/*.html

# Webpack output
dist
test/files/main.js

package-lock.json

.config*
26 changes: 23 additions & 3 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -10,10 +10,30 @@ test/
Makefile
CNAME
index.html
index.jade
index.pug
bin/
karma.*.js
format_deps.js
tools/31*
*.key
data/

*.txt
*.png

examples/
.github
.vscode
.eslintignore
CONTRIBUTING.md
History.*
format_deps.js
release-items.md
static.js
website.js

.config*

migrating_to_5.md
renovate.json
.travis.yml
webpack.config.js
webpack.base.config.js
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
package-lock=false
20 changes: 0 additions & 20 deletions .travis.yml

This file was deleted.

41 changes: 32 additions & 9 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -6,22 +6,21 @@ If you have a question about Mongoose (not a bug report) please post it to eithe

- Before opening a new issue, look for existing [issues](https://github.com/Automattic/mongoose/issues) to avoid duplication. If the issue does not yet exist, [create one](https://github.com/Automattic/mongoose/issues/new).
- Please post any relevant code samples, preferably a standalone script that
reproduces your issue. Do **not** describe your issue in prose, show your
code.
reproduces your issue. Do **not** describe your issue in prose. **Show your code.**
- If the bug involves an error, please post the stack trace.
- Please post the version of mongoose and mongodb that you're using.
- Please write bug reports in JavaScript (ES5 or ES2015), not coffeescript, typescript, etc.
- Please post the version of Mongoose and MongoDB that you're using.
 - Please write bug reports in JavaScript (ES5, ES6, etc) that runs in Node.js, **not** CoffeeScript, TypeScript, JSX, etc.

### Requesting new features

- Before opening a new issue, look for existing [issues](https://github.com/learnboost/mongoose/issues) to avoid duplication. If the issue does not yet exist, [create one](https://github.com/learnboost/mongoose/issues/new).
- Please describe a use case for it
- it would be ideal to include test cases as well
- Please include test cases if possible

### Fixing bugs / Adding features

- Before starting to write code, look for existing [issues](https://github.com/learnboost/mongoose/issues). That way you avoid working on something that might not be of interest or that has been addressed already in a different branch. You can create a new issue [here](https://github.com/learnboost/mongoose/issues/new).
- _The source of this project is written in javascript, not coffeescript, therefore your bug reports should be written in javascript_.
- _The source of this project is written in JavaScript, not CoffeeScript or TypeScript. Please write your bug reports in JavaScript that can run in vanilla Node.js_.
- Fork the [repo](https://github.com/Automattic/mongoose) _or_ for small documentation changes, navigate to the source on github and click the [Edit](https://github.com/blog/844-forking-with-the-edit-button) button.
- Follow the general coding style of the rest of the project:
- 2 space tabs
@@ -37,7 +36,7 @@ If you have a question about Mongoose (not a bug report) please post it to eithe
### Running the tests
- Open a terminal and navigate to the root of the project
- execute `npm install` to install the necessary dependencies
- start a mongodb instance on port 27017 if one isn't running already. `mongod --dbpath <path to store data> --port 27017`
- start a MongoDB instance on port 27017 if one isn't running already. `mongod --dbpath <path to store data>`. We typically use [MongoDB Enterprise](https://www.mongodb.com/try/download/enterprise) with the [in-memory storage engine](https://docs.mongodb.com/manual/core/inmemory/) in order to run tests faster.
- execute `npm test` to run the tests (we're using [mocha](http://mochajs.org/))
- or to execute a single test `npm test -- -g 'some regexp that matches the test description'`
- any mocha flags can be specified with `-- <mocha flags here>`
@@ -47,16 +46,40 @@ If you have a question about Mongoose (not a bug report) please post it to eithe

To contribute to the [API documentation](http://mongoosejs.com/docs/api.html) just make your changes to the inline documentation of the appropriate [source code](https://github.com/Automattic/mongoose/tree/master/lib) in the master branch and submit a [pull request](https://help.github.com/articles/using-pull-requests/). You might also use the github [Edit](https://github.com/blog/844-forking-with-the-edit-button) button.

To contribute to the [guide](http://mongoosejs.com/docs/guide.html) or [quick start](http://mongoosejs.com/docs/index.html) docs, make your changes to the appropriate `.jade` files in the [docs](https://github.com/Automattic/mongoose/tree/master/docs) directory of the master branch and submit a pull request. Again, the [Edit](https://github.com/blog/844-forking-with-the-edit-button) button might work for you here.
To contribute to the [guide](http://mongoosejs.com/docs/guide.html) or [quick start](http://mongoosejs.com/docs/index.html) docs, make your changes to the appropriate `.pug` files in the [docs](https://github.com/Automattic/mongoose/tree/master/docs) directory of the master branch and submit a pull request. Again, the [Edit](https://github.com/blog/844-forking-with-the-edit-button) button might work for you here.

If you'd like to preview your documentation changes, first commit your changes to your local master branch, then execute:

* `npm install`
* `make docclean`
* `make gendocs`
* `node static.js`

Visit `http://localhost:8088` and you should see the docs with your local changes. Make sure you `git reset --hard` before commiting, because changes to `docs/*` should **not** be in PRs.
Visit `http://localhost:8088` and you should see the docs with your local changes. Make sure you `git reset --hard` before committing, because changes to `docs/*` should **not** be in PRs.

### Plugins website

The [plugins](http://plugins.mongoosejs.io/) site is also an [open source project](https://github.com/vkarpov15/mongooseplugins) that you can get involved with. Feel free to fork and improve it as well!


## Financial contributions

We also welcome financial contributions in full transparency on our [open collective](https://opencollective.com/mongoose).
Anyone can file an expense. If the expense makes sense for the development of the community, it will be "merged" in the ledger of our open collective by the core contributors and the person who filed the expense will be reimbursed.


## Credits


### Contributors

Thank you to all the people who have already contributed to mongoose!
<a href="https://github.com/Automattic/mongoose/graphs/contributors"><img src="https://opencollective.com/mongoose/contributors.svg?width=890" /></a>


### Backers

Thank you to all our backers! [[Become a backer](https://opencollective.com/mongoose#backer)]

<a href="https://opencollective.com/mongoose#backers" target="_blank"><img src="https://opencollective.com/mongoose/backers.svg?width=890"></a>

Loading