Skip to content

Commit

Permalink
devdeps(typescript): upgrade to 5.2.2
Browse files Browse the repository at this point in the history
  • Loading branch information
hasezoey committed Nov 3, 2023
1 parent 9d2dc2d commit e5ce00b
Show file tree
Hide file tree
Showing 5 changed files with 42 additions and 17 deletions.
2 changes: 1 addition & 1 deletion docs/guides/quick-start-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ Like `public: string[]` is in reflection only `Array`.

### Requirements

- TypeScript version `^4.9` (since 10.0) is recommended, though older ones may also work
- TypeScript version `^5.2` (since 10.0) is recommended, though older ones may also work
- NodeJS `>=16.20.1` (and `@types/node@16`)
- Mongoose `~7.6.3`
- A IDE that supports TypeScript linting is recommended to be used (VSCode is recommended)
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
"@semantic-release/github": "^8.1.0",
"@semantic-release/npm": "^9.0.2",
"@semantic-release/release-notes-generator": "^10.0.3",
"@tsd/typescript": "~4.9.5",
"@tsd/typescript": "~5.2.2",
"@types/jest": "^29.5.6",
"@types/lodash": "^4.14.200",
"@types/node": "~16.11.7",
Expand All @@ -71,7 +71,7 @@
"rimraf": "^5.0.5",
"semantic-release": "^19.0.5",
"ts-jest": "^29.1.1",
"typescript": "~4.9.5"
"typescript": "~5.2.2"
},
"dependencies": {
"lodash": "^4.17.20",
Expand Down
30 changes: 25 additions & 5 deletions test/tests/errors.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,11 @@ describe('tests for "InvalidPropTypeError" [E013]', () => {
describe('PropType unknown (processProp)', () => {
it('should throw a Error when a unknown PropType is used for "processProp#Passthrough" [InvalidPropTypeError] [E013]', () => {
class ProcessPropPassthroughPropType {
@prop({ type: () => new Passthrough({}) }, -1)
@prop(
{ type: () => new Passthrough({}) },
// @ts-expect-error Using a invalid PropType to test handling of invalid number
-1
)
public test?: any;
}

Expand All @@ -311,7 +315,11 @@ describe('tests for "InvalidPropTypeError" [E013]', () => {

it('should throw a Error when a unknown PropType is used for "processProp#ref" [InvalidPropTypeError] [E013]', () => {
class ProcessPropRefPropType {
@prop({ ref: 'hi' }, -1)
@prop(
{ ref: 'hi' },
// @ts-expect-error Using a invalid PropType to test handling of invalid number
-1
)
public test?: any;
}

Expand All @@ -330,7 +338,11 @@ describe('tests for "InvalidPropTypeError" [E013]', () => {
@prop()
public hi?: string;

@prop({ refPath: 'hi' }, -1)
@prop(
{ refPath: 'hi' },
// @ts-expect-error Using a invalid PropType to test handling of invalid number
-1
)
public test?: any;
}

Expand All @@ -346,7 +358,11 @@ describe('tests for "InvalidPropTypeError" [E013]', () => {

it('should throw a Error when a unknown PropType is used for "processProp#primitive" [InvalidPropTypeError] [E013]', () => {
class ProcessPropRefPropType {
@prop({ type: () => String }, -1)
@prop(
{ type: () => String },
// @ts-expect-error Using a invalid PropType to test handling of invalid number
-1
)
public test?: string;
}

Expand All @@ -367,7 +383,11 @@ describe('tests for "InvalidPropTypeError" [E013]', () => {
}

class ProcessPropRefPropType {
@prop({ type: () => Sub }, -1)
@prop(
{ type: () => Sub },
// @ts-expect-error Using a invalid PropType to test handling of invalid number
-1
)
public test?: Sub;
}

Expand Down
7 changes: 6 additions & 1 deletion test/tests/warnings.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,12 @@ it('should allow mixed without warnings or error for "Mixed" if Severity.ALLOW i
});

it('should warn if property is "Mixed" and a invalid Severity is used', () => {
@modelOptions({ options: { allowMixed: -1 } })
@modelOptions({
options: {
// @ts-expect-error Using a invalid Severity to test handling of invalid number
allowMixed: -1,
},
})
class TestMixedWarning {
@prop({ type: () => mongoose.Schema.Types.Mixed })
public test?: any;
Expand Down
16 changes: 8 additions & 8 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1426,10 +1426,10 @@
resolved "https://registry.yarnpkg.com/@tsconfig/node16/-/node16-1.0.3.tgz#472eaab5f15c1ffdd7f8628bd4c4f753995ec79e"
integrity sha512-yOlFc+7UtL/89t2ZhjPvvB/DeAr3r+Dq58IgzsFkOAvVC6NMJXmCGjbptdXdR9qsX7pKcTL+s87FtYREi2dEEQ==

"@tsd/typescript@~4.9.5":
version "4.9.5"
resolved "https://registry.yarnpkg.com/@tsd/typescript/-/typescript-4.9.5.tgz#85daafcf51f4af92bd8caf0e82b655ceaf948f99"
integrity sha512-+UgxOvJUl5rQdPFSSOOwhmSmpThm8DJ3HwHxAOq5XYe7CcmG1LcM2QeqWwILzUIT5tbeMqY8qABiCsRtIjk/2g==
"@tsd/typescript@~5.2.2":
version "5.2.2"
resolved "https://registry.yarnpkg.com/@tsd/typescript/-/typescript-5.2.2.tgz#b3a11006737a41abb492fe5a16de17a1c3a0126e"
integrity sha512-VtjHPAKJqLJoHHKBDNofzvQB2+ZVxjXU/Gw6INAS9aINLQYVsxfzrQ2s84huCeYWZRTtrr7R0J7XgpZHjNwBCw==

"@types/babel__core@^7.1.14":
version "7.1.19"
Expand Down Expand Up @@ -6646,10 +6646,10 @@ type-fest@^1.0.2:
resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.0.2.tgz#891e1a90c5189d8506af64b9ef929fca99ba1ee5"
integrity sha512-wVORMBGO/FAs/++blGNeAVdbNKtIh1rbBL2EyQ1+J9lClJ93KiiKe8PmFIVdXhHcyv44SL9oglmfeSsndo0jRw==

typescript@~4.9.5:
version "4.9.5"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.9.5.tgz#095979f9bcc0d09da324d58d03ce8f8374cbe65a"
integrity sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==
typescript@~5.2.2:
version "5.2.2"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.2.2.tgz#5ebb5e5a5b75f085f22bc3f8460fba308310fa78"
integrity sha512-mI4WrpHsbCIcwT9cF4FZvr80QUeKvsUsUvKDoR+X/7XHQH98xYD8YHZg7ANtz2GtZt/CBq2QJ0thkGJMHfqc1w==

uglify-js@^3.1.4:
version "3.15.5"
Expand Down

0 comments on commit e5ce00b

Please sign in to comment.