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

feat: change all symbols to use a consistent name #13641

Merged
merged 1 commit into from
Jul 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/helpers/populate/assignRawDocsToIdStructure.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const utils = require('../../utils');

module.exports = assignRawDocsToIdStructure;

const kHasArray = Symbol('assignRawDocsToIdStructure.hasArray');
const kHasArray = Symbol('mongoose#assignRawDocsToIdStructure#hasArray');

/**
* Assign `vals` returned by mongo query to the `rawIds`
Expand Down
2 changes: 1 addition & 1 deletion lib/helpers/promiseOrCallback.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

const immediate = require('./immediate');

const emittedSymbol = Symbol('mongoose:emitted');
const emittedSymbol = Symbol('mongoose#emitted');

module.exports = function promiseOrCallback(callback, fn, ee, Promise) {
if (typeof callback === 'function') {
Expand Down
8 changes: 4 additions & 4 deletions lib/helpers/symbols.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,16 @@ exports.arrayAtomicsSymbol = Symbol('mongoose#Array#_atomics');
exports.arrayParentSymbol = Symbol('mongoose#Array#_parent');
exports.arrayPathSymbol = Symbol('mongoose#Array#_path');
exports.arraySchemaSymbol = Symbol('mongoose#Array#_schema');
exports.documentArrayParent = Symbol('mongoose:documentArrayParent');
exports.documentArrayParent = Symbol('mongoose#documentArrayParent');
exports.documentIsSelected = Symbol('mongoose#Document#isSelected');
exports.documentIsModified = Symbol('mongoose#Document#isModified');
exports.documentModifiedPaths = Symbol('mongoose#Document#modifiedPaths');
exports.documentSchemaSymbol = Symbol('mongoose#Document#schema');
exports.getSymbol = Symbol('mongoose#Document#get');
exports.modelSymbol = Symbol('mongoose#Model');
exports.objectIdSymbol = Symbol('mongoose#ObjectId');
exports.populateModelSymbol = Symbol('mongoose.PopulateOptions#Model');
exports.populateModelSymbol = Symbol('mongoose#PopulateOptions#Model');
exports.schemaTypeSymbol = Symbol('mongoose#schemaType');
exports.sessionNewDocuments = Symbol('mongoose:ClientSession#newDocuments');
exports.sessionNewDocuments = Symbol('mongoose#ClientSession#newDocuments');
exports.scopeSymbol = Symbol('mongoose#Document#scope');
exports.validatorErrorSymbol = Symbol('mongoose:validatorError');
exports.validatorErrorSymbol = Symbol('mongoose#validatorError');