Bump version to 5.1, fix 'ignoreDeprecations', and update baselines. (#52975)

This commit is contained in:
Daniel Rosenwasser
2023-02-26 20:56:07 -08:00
committed by GitHub
parent 20d4479b24
commit 4374ffd628
5 changed files with 5 additions and 5 deletions

View File

@@ -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

View File

@@ -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) {