Skip to content

Commit

Permalink
Bump version to 5.1, fix 'ignoreDeprecations', and update baselines. (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielRosenwasser committed Feb 27, 2023
1 parent 20d4479 commit 4374ffd
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "typescript",
"author": "Microsoft Corp.",
"homepage": "https://www.typescriptlang.org/",
"version": "5.0.0",
"version": "5.1.0",
"license": "Apache-2.0",
"description": "TypeScript is a language for application scale JavaScript development",
"keywords": [
Expand Down
2 changes: 1 addition & 1 deletion src/compiler/corePublic.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// WARNING: The script `configurePrerelease.ts` uses a regexp to parse out these values.
// If changing the text in this section, be sure to test `configurePrerelease` too.
export const versionMajorMinor = "5.0";
export const versionMajorMinor = "5.1";
// The following is baselined as a literal template type without intervention
/** The version of the TypeScript compiler release */
// eslint-disable-next-line @typescript-eslint/no-inferrable-types
Expand Down
2 changes: 1 addition & 1 deletion src/compiler/program.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4324,7 +4324,7 @@ export function createProgram(rootNamesOrOptions: readonly string[] | CreateProg
const version = typeScriptVersion || versionMajorMinor;
const ignoreDeprecations = options.ignoreDeprecations;
if (ignoreDeprecations) {
if (ignoreDeprecations === DeprecationVersion.v5_0 && (version === DeprecationVersion.v5_0 || version === DeprecationVersion.v5_5)) {
if (ignoreDeprecations === DeprecationVersion.v5_0 && version.startsWith("5.")) {
return;
}
else if (reportInvalidIgnoreDeprecations) {
Expand Down
2 changes: 1 addition & 1 deletion tests/baselines/reference/api/tsserverlibrary.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3989,7 +3989,7 @@ declare namespace ts {
responseRequired?: boolean;
}
}
const versionMajorMinor = "5.0";
const versionMajorMinor = "5.1";
/** The version of the TypeScript compiler release */
const version: string;
/**
Expand Down
2 changes: 1 addition & 1 deletion tests/baselines/reference/api/typescript.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ and limitations under the License.
***************************************************************************** */

declare namespace ts {
const versionMajorMinor = "5.0";
const versionMajorMinor = "5.1";
/** The version of the TypeScript compiler release */
const version: string;
/**
Expand Down

0 comments on commit 4374ffd

Please sign in to comment.