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
Types break in semver patch change #14462
Labels
can't reproduce
Mongoose devs have been unable to reproduce this issue. Close after 14 days of inactivity.
Stale
typescript
Types or Types-test related issue / Pull Request
Comments
2 tasks
vkarpov15
added
needs repro script
Maybe a bug, but no repro script. The issue reporter should create a script that demos the issue
typescript
Types or Types-test related issue / Pull Request
labels
Mar 29, 2024
2 tasks
Needs a fix |
@Anonymous4078 what does your schema look like? |
@vkarpov15 Simple schema which break is : import { Schema, model } from 'mongoose';
interface GuildConfig {
guildId: string;
channelIds: string[];
}
const schema = new Schema<GuildConfig>({
guildId: String,
channelIds: [String],
});
export const collection = model<GuildConfig>('cooldowns', schema); |
Worked perfectly fine till version 8.2.2 and breaks in v8.2.3 |
I'm unable to repro, the following script compiles fine: import { Schema, model } from 'mongoose';
interface GuildConfig {
guildId: string;
channelIds: string[];
}
const schema = new Schema<GuildConfig>({
guildId: String,
channelIds: [String],
});
const collection = model<GuildConfig>('cooldowns', schema);
const guildId = '42';
collection.findOneAndUpdate(
{ guildId },
{
$pull: { channelIds: 'test' },
},
); output:
|
vkarpov15
added
can't reproduce
Mongoose devs have been unable to reproduce this issue. Close after 14 days of inactivity.
and removed
needs repro script
Maybe a bug, but no repro script. The issue reporter should create a script that demos the issue
labels
Apr 10, 2024
This issue is stale because it has been open 14 days with no activity. Remove stale label or comment or this will be closed in 5 days |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
can't reproduce
Mongoose devs have been unable to reproduce this issue. Close after 14 days of inactivity.
Stale
typescript
Types or Types-test related issue / Pull Request
Prerequisites
Mongoose version
8.2.3
Node.js version
20.11.1
MongoDB server version
5.x
Typescript version (if applicable)
5.4.3
Description
My code used to work till v8.2.2 and types suddenly broke with 8.2.3
Steps to Reproduce
Expected Behavior
The types shouldn't break in a semver patch change
The text was updated successfully, but these errors were encountered: