Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add usePushEach flag to Mongoose Schema Options #26639

Merged
merged 1 commit into from Jun 18, 2018
Merged

Add usePushEach flag to Mongoose Schema Options #26639

merged 1 commit into from Jun 18, 2018

Conversation

EtienneBoutet
Copy link

@EtienneBoutet EtienneBoutet commented Jun 18, 2018

In order for devs to be able to work around the issues described in
Automattic/mongoose#5574 we need to be able
to supply the usePushEach flag to the Mongoose SchemaOptions. This
options functionality is described in
Automattic/mongoose#4455 and is required for
anyone who modifies arrays inline who is using Mongoose 4 and MongoDB
3.6+

Testing:
Copied changes to local project and verified compilation worked.

Please fill in this template.

  • Use a meaningful title for the pull request. Include the name of the package modified.
  • Test the change in your own code. (Compile and run.)
  • Add or edit tests to reflect the change. (Run with npm test.)
  • Follow the advice from the readme.
  • Avoid common mistakes.
  • Run npm run lint package-name (or tsc if no tslint.json is present).

Select one of these and delete the others:

If adding a new definition:

  • The package does not already provide its own types, or cannot have its .d.ts files generated via --declaration
  • If this is for an NPM package, match the name. If not, do not conflict with the name of an NPM package.
  • Create it with dts-gen --dt, not by basing it on an existing project.
  • tslint.json should be present, and tsconfig.json should have noImplicitAny, noImplicitThis, strictNullChecks, and strictFunctionTypes set to true.

If changing an existing definition:

  • Provide a URL to documentation or source code which provides context for the suggested changes: <>
  • Increase the version number in the header if appropriate.
  • If you are making substantial changes, consider adding a tslint.json containing { "extends": "dtslint/dt.json" }.

If removing a declaration:

  • If a package was never on DefinitelyTyped, you don't need to do anything. (If you wrote a package and provided types, you don't need to register it with us.)
  • Delete the package's directory.
  • Add it to notNeededPackages.json.

In order for devs to be able to work around the issues described in
Automattic/mongoose#5574 we need to be able
to supply the `usePushEach` flag to the Mongoose SchemaOptions. This
options functionality is described in
Automattic/mongoose#4455 and is required for
anyone who modifies arrays inline who is using Mongoose 4 and MongoDB
3.6+

Testing:
  Copied changes to local project and verified compilation worked.
@typescript-bot typescript-bot added Popular package This PR affects a popular package (as counted by NPM download counts). Awaiting reviewer feedback Unmerged The author did not merge the PR when it was ready. labels Jun 18, 2018
@typescript-bot
Copy link
Contributor

typescript-bot commented Jun 18, 2018

@EtienneBoutet Thank you for submitting this PR!

🔔 @horiuchi @sindrenm @lukasz-zak @Alorel @jendrikw @ethanresnick @vologab - please review this PR in the next few days. Be sure to explicitly select Approve or Request Changes in the GitHub UI so I know what's going on.

If no reviewer appears after a week, a DefinitelyTyped maintainer will review the PR instead.

@typescript-bot
Copy link
Contributor

After 5 days, no one has reviewed the PR 😞. A maintainer will be reviewing the PR in the next few days and will either merge it or request revisions. Thank you for your patience!

@sandersn sandersn merged commit 085e63e into DefinitelyTyped:master Jun 18, 2018
@jendrikw
Copy link
Contributor

Can you please add a test that sets this option to a boolean?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Popular package This PR affects a popular package (as counted by NPM download counts). Unmerged The author did not merge the PR when it was ready.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants