Skip to content

Commit

Permalink
Merge branch 'master' into gh-10423
Browse files Browse the repository at this point in the history
  • Loading branch information
vkarpov15 committed May 29, 2022
2 parents 9babf9c + 283c472 commit 2e19312
Show file tree
Hide file tree
Showing 51 changed files with 1,321 additions and 960 deletions.
20 changes: 0 additions & 20 deletions .github/ISSUE_TEMPLATE.md

This file was deleted.

62 changes: 62 additions & 0 deletions .github/ISSUE_TEMPLATE/bug.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: 🪲 Bug report
description: Create a report to help us improve

body:
- type: checkboxes
id: prerequisites
attributes:
label: Prerequisites
options:
- label: I have written a descriptive issue title
required: true
- label: |
I have searched existing issues to ensure the bug has not already been reported
required: true
- type: input
id: mongoose-version
attributes:
label: Mongoose version
placeholder: 6.x.x
validations:
required: true

- type: input
id: node-version
attributes:
label: Node.js version
placeholder: 14.x
validations:
required: true

- type: input
id: mongo-version
attributes:
label: MongoDB server version
placeholder: 5.x
validations:
required: true

- type: textarea
id: description
attributes:
label: Description
description: A clear and concise description of what the bug is.
validations:
required: true

- type: textarea
id: steps-to-reproduce
attributes:
label: Steps to Reproduce
description: |
List of steps, sample code, or a link to code or a project that reproduces the behavior.
Make sure you place a stack trace inside a [code (```) block](https://docs.github.com/en/github/writing-on-github/creating-and-highlighting-code-blocks) to avoid linking unrelated issues.
validations:
required: true

- type: textarea
id: expected-behavior
attributes:
label: Expected Behavior
description: A clear and concise description of what you expected to happen.
5 changes: 5 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
blank_issues_enabled: false
documentation:
- name: 📘 Documentation
url: https://mongoosejs.com/docs/guide.html
about: Mongoose Docs
37 changes: 37 additions & 0 deletions .github/ISSUE_TEMPLATE/feature.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: 🚀 Feature Proposal
description: Submit a proposal for a new feature
labels: ['enhancement', 'new feature']

body:
- type: checkboxes
id: prerequisites
attributes:
label: Prerequisites
options:
- label: I have written a descriptive issue title
required: true
- label: |
I have searched existing issues to ensure the feature has not already been requested
required: true
- type: textarea
id: proposal
attributes:
label: 🚀 Feature Proposal
description: A clear and concise description of what the feature is.
validations:
required: true

- type: textarea
id: motivation
attributes:
label: Motivation
description: The motivation for the proposal.

- type: textarea
id: example
attributes:
label: Example
description: |
An example for how this feature would be used.
Make sure you place example code inside a [code (```) block](https://docs.github.com/en/github/writing-on-github/creating-and-highlighting-code-blocks) to avoid linking unrelated issues.
67 changes: 67 additions & 0 deletions .github/ISSUE_TEMPLATE/help.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
name: 🙋 Help
description: Open an issue and request for individual help
labels: ['help', 'help wanted']

body:
- type: markdown
attributes:
value: |
Before you submit an issue we recommend to read the [documentation](https://mongoosejs.com/docs/guide.html).
- type: checkboxes
id: prerequisites
attributes:
label: Prerequisites
options:
- label: I have written a descriptive issue title
required: true

- type: input
id: mongoose-version
attributes:
label: Mongoose version
placeholder: 6.x.x
validations:
required: true

- type: input
id: node-version
attributes:
label: Node.js version
placeholder: 14.x
validations:
required: true

- type: input
id: mongo-version
attributes:
label: MongoDB version
placeholder: 5.x
validations:
required: true

- type: dropdown
id: os
attributes:
label: Operating system
options:
- Linux
- macOS
- Windows
validations:
required: false

- type: input
id: os-version
attributes:
label: Operating system version (i.e. 20.04, 11.3, 10)
validations:
required: false

- type: textarea
id: text
attributes:
label: Issue
description: |
Give as much detail as you can to help us understand.
Make sure you place example code inside a [code (```) block](https://docs.github.com/en/github/writing-on-github/creating-and-highlighting-code-blocks) to avoid linking unrelated issues.
22 changes: 22 additions & 0 deletions .github/ISSUE_TEMPLATE/other.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: ❔ Other
description: Open an issue that is not feature or bug related

body:
- type: checkboxes
id: prerequisites
attributes:
label: Prerequisites
options:
- label: I have written a descriptive issue title
required: true
- label: |
I have searched existing issues to ensure the issue has not already been raised
required: true
- type: textarea
id: text
attributes:
label: Issue
description: |
Give as much detail as you can to help us understand.
Make sure you place example code inside a [code (```) block](https://docs.github.com/en/github/writing-on-github/creating-and-highlighting-code-blocks) to avoid linking unrelated issues.
63 changes: 63 additions & 0 deletions .github/ISSUE_TEMPLATE/performance.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
name: 🦥 Performance issue
description: Report a performance issue
labels: ['performance']

body:
- type: checkboxes
id: prerequisites
attributes:
label: Prerequisites
options:
- label: I have written a descriptive issue title
required: true
- label: |
I have searched existing issues to ensure the performance issue has not already been reported
required: true
- type: input
id: working-version
attributes:
label: Last performant version
placeholder: 1.x.x
validations:
required: true

- type: input
id: stopped-working-version
attributes:
label: Slowed down in version
placeholder: 2.x.x
validations:
required: true

- type: input
id: node-version
attributes:
label: Node.js version
placeholder: 14.x
validations:
required: true

- type: textarea
id: description
attributes:
label: 🦥 Performance issue
description: A clear and concise description of what the performance issue is.
validations:
required: true

- type: textarea
id: steps-to-reproduce
attributes:
label: Steps to Reproduce
description: |
List of steps, sample code, or a link to code or a project that reproduces the behavior.
Make sure you place a stack trace inside a [code (```) block](https://docs.github.com/en/github/writing-on-github/creating-and-highlighting-code-blocks) to avoid linking unrelated issues.
validations:
required: true

- type: textarea
id: expected-behavior
attributes:
label: Expected Behavior
description: A clear and concise description of what you expected to happen.
6 changes: 6 additions & 0 deletions .github/codeql/codeql-config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
name: "codeql config"

languages:
- 'javascript'
paths:
- lib
47 changes: 47 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: "Code Scanning - Action"

on:
pull_request:
paths:
- 'lib/**'
push:
branches:
- master
paths:
- 'lib/**'

jobs:
CodeQL-Build:
# CodeQL runs on ubuntu-latest, windows-latest, and macos-latest
runs-on: ubuntu-latest

permissions:
# required for all workflows
security-events: write

steps:
- name: Checkout repository
uses: actions/checkout@v3

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
config-file: ./.github/codeql/codeql-config.yml
# Override language selection by uncommenting this and choosing your languages
# with:
# languages: go, javascript, csharp, python, cpp, java

# ℹ️ Command-line programs to run using the OS shell.
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun

# ✏️ If the Autobuild fails above, remove it and uncomment the following
# three lines and modify them (or add more) to build your code if your
# project uses a compiled language

#- run: |
# make bootstrap
# make release

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
13 changes: 12 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -121,4 +121,15 @@ jobs:
uses: actions/upload-artifact@v3
with:
name: coverage
path: coverage
path: coverage
dependency-review:
name: Dependency Review
if: github.event_name == 'pull_request'
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Check out repo
uses: actions/checkout@v3
- name: Dependency review
uses: actions/dependency-review-action@v1
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
6.3.4 / 2022-05-19
==================
* fix(schema): disallow using schemas with schema-level projection with map subdocuments #11698
* fix(document): avoid setting nested paths to null when they're undefined #11723
* fix: allow using comment with findOneAndUpdate(), count(), `distinct()` and `hint` with `findOneAndUpdate()` #11793
* fix(document): clean modified subpaths when setting nested path to null after modifying subpaths #11764
* fix(types): allow calling `deleteModel()` with RegExp in TypeScript #11812
* docs(typescript): add section on PopulatedDoc to TypeScript populate docs #11685

6.3.3 / 2022-05-09
==================
* perf: avoid leaking memory when using populate() with QueryCursor because of reusing populate options with `_docs` #11641
Expand Down
2 changes: 1 addition & 1 deletion docs/populate.md
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ If you were to `populate()` using the `limit` option, you
would find that the 2nd story has 0 fans:

```javascript
const stories = Story.find().populate({
const stories = await Story.find().populate({
path: 'fans',
options: { limit: 2 }
});
Expand Down
2 changes: 1 addition & 1 deletion docs/typescript.md
Original file line number Diff line number Diff line change
Expand Up @@ -129,4 +129,4 @@ However, before you do, please [open an issue on Mongoose's GitHub page](https:/

### Next Up

Now that you've seen the basics of how to use Mongoose in TypeScript, let's take a look at [statics in TypeScript](/docs/typescript/statics.html).
Now that you've seen the basics of how to use Mongoose in TypeScript, let's take a look at [statics in TypeScript](/docs/typescript/statics-and-methods.html).

0 comments on commit 2e19312

Please sign in to comment.