GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — feat(51000) - Flag Deprecation Plan by a-tarasyuk · Pull Request #51424 · microsoft/TypeScript

Conversation

@a-tarasyuk

@a-tarasyuk Oleksandr Tarasiuk (a-tarasyuk) commented Nov 7, 2022

Copy link
Copy Markdown
Contributor

Fixes #51000

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@typescript-bot TypeScript Bot (typescript-bot) assigned Ryan Cavanaugh (RyanCavanaugh) Nov 7, 2022
@typescript-bot TypeScript Bot (typescript-bot) added the For Milestone Bug PRs that fix a bug with a specific milestone label Nov 7, 2022
@a-tarasyuk
Oleksandr Tarasiuk (a-tarasyuk) force-pushed the feat/51000 branch from edb99cd to 8373d4c Compare November 7, 2022 11:14
@a-tarasyuk

Oleksandr Tarasiuk (a-tarasyuk) commented Nov 7, 2022

Copy link
Copy Markdown
Contributor Author

Many tests don't set target explicitly and rely on the ES3, therefore, the PR contains many changes related to tests

TypeScript/src/harness/harnessIO.ts

Line 393 in 896b922

options.target = ts.getEmitScriptTarget(options);

TypeScript/src/compiler/utilities.ts

Lines 6361 to 6366 in 896b922

export function getEmitScriptTarget(compilerOptions: {module?: CompilerOptions["module"], target?: CompilerOptions["target"]}) {
return compilerOptions.target ||
(compilerOptions.module === ModuleKind.Node16 && ScriptTarget.ES2022) ||
(compilerOptions.module === ModuleKind.NodeNext && ScriptTarget.ESNext) ||
ScriptTarget.ES3;
}

Is it acceptable to set globally ignoreDeprecations for tests?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@Jack-Works

Jack Works (Jack-Works) commented Nov 7, 2022

Copy link
Copy Markdown
Contributor

Many tests don't set target explicitly and rely on the ES3, therefore, the PR contains many changes related to tests

can you create a new pr to explicitly set tests target to es5?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@a-tarasyuk

Oleksandr Tarasiuk (a-tarasyuk) commented Nov 7, 2022

Copy link
Copy Markdown
Contributor Author

can you create a new pr to explicitly set tests target to es5?

I can, however many changes will remain due to the difference in output between es3 and es5.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@Jack-Works

Jack Works (Jack-Works) commented Nov 7, 2022

Copy link
Copy Markdown
Contributor

can you create a new pr to explicitly set tests target to es5?

I can, however many changes will remain due to the difference in output between es3 and es5.

but that PR won't need to be reviewed clearly

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@a-tarasyuk
feat(51000): add ignoreDeprecations option
e4ecc3f
@a-tarasyuk
Oleksandr Tarasiuk (a-tarasyuk) force-pushed the feat/51000 branch from 8373d4c to e4ecc3f Compare November 7, 2022 19:18
@Jack-Works

Jack Works (Jack-Works) commented Nov 8, 2022

Copy link
Copy Markdown
Contributor

I suggest to deprecate --experimentalDecorators and add a new flag --legacyDecorators to migrate

fatcerberus reacted with thumbs up emoji RyanCavanaugh reacted with thumbs down emoji
All reactions
  • 👍 1 reaction
  • 👎 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

Oleksandr Tarasiuk (a-tarasyuk) added 3 commits November 8, 2022 09:28
@a-tarasyuk
Merge branch 'main' of https://github.com/microsoft/TypeScript into f…
961d473
…eat/51000
@a-tarasyuk
Merge branch 'main' of https://github.com/microsoft/TypeScript into f…
d8f37a0
…eat/51000
@a-tarasyuk
Merge branch 'main' of https://github.com/microsoft/TypeScript into f…
8ca255a
…eat/51000
@RyanCavanaugh

Ryan Cavanaugh (RyanCavanaugh) commented Dec 2, 2022

Copy link
Copy Markdown
Member

Some notes from reviewing this:

  • Thanks for taking this on!
  • I'll send a PR shortly to change the default target to ES5. The test impact isn't too bad but it's big indeed.
  • In general, I think this code is "too maintanable" as it were. We'll need to update these things every 2.5 years or so, so simply hardcoding the disallowed values altogether should be simpler to read IMO. The "phases" as we have them don't need to be manifested in the code; when 5.5 comes around we'll (hopefully) simply be deleting values from enums. Hope that makes sense and can make this a bit shorter.
a-tarasyuk reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@a-tarasyuk
use constants of versions
ec71ffb
@a-tarasyuk

Oleksandr Tarasiuk (a-tarasyuk) commented Dec 3, 2022

Copy link
Copy Markdown
Contributor Author

In general, I think this code is "too maintanable" as it were. We'll need to update these things every 2.5 years or so, so simply hardcoding the disallowed values altogether should be simpler to read IMO. The "phases" as we have them don't need to be manifested in the code; when 5.5 comes around we'll (hopefully) simply be deleting values from enums. Hope that makes sense and can make this a bit shorter.

I've removed the parse versions in favor of the hardcoded versions and left only the type required for CompilerOptions. Maybe you have ideas for further simplification...

"too maintainable"

😂 - this is the first time I've seen such a polite synonym for "these changes don't meet expectations".

RyanCavanaugh reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

RyanCavanaugh
Ryan Cavanaugh (RyanCavanaugh) reviewed Dec 9, 2022
View reviewed changes
Comment thread tests/baselines/reference/deprecatedCompilerOptions4.errors.txt Resolved

Uh oh!

There was an error while loading. Please reload this page.

Oleksandr Tarasiuk (a-tarasyuk) added 4 commits December 9, 2022 09:13
@a-tarasyuk
Merge branch 'main' of https://github.com/microsoft/TypeScript into f…
abb514e
…eat/51000
@a-tarasyuk
change the ignoreDeprecations type to allow only one value - '5.0'
d6e9c2e
@a-tarasyuk
add tests
7cd82f2
@a-tarasyuk
Merge branch 'main' of https://github.com/microsoft/TypeScript into f…
5522627
…eat/51000
@a-tarasyuk
Oleksandr Tarasiuk (a-tarasyuk) force-pushed the feat/51000 branch from c0cc52f to 062e0a7 Compare December 9, 2022 20:11
@a-tarasyuk
update baseline
9ca08d7
@a-tarasyuk
Oleksandr Tarasiuk (a-tarasyuk) force-pushed the feat/51000 branch from 062e0a7 to 9ca08d7 Compare December 9, 2022 21:00
@a-tarasyuk
Merge branch 'main' of https://github.com/microsoft/TypeScript into f…
8efc7de
…eat/51000
@a-tarasyuk
Oleksandr Tarasiuk (a-tarasyuk) requested a review from Ryan Cavanaugh (RyanCavanaugh) December 13, 2022 08:14
RyanCavanaugh
Ryan Cavanaugh (RyanCavanaugh) reviewed Dec 13, 2022
View reviewed changes
Comment thread src/compiler/program.ts Resolved

Uh oh!

There was an error while loading. Please reload this page.

@RyanCavanaugh

Ryan Cavanaugh (RyanCavanaugh) commented Dec 13, 2022

Copy link
Copy Markdown
Member

I think the above comment is the only one I have left - LGTM otherwise. Great work!

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

Oleksandr Tarasiuk (a-tarasyuk) added 2 commits December 14, 2022 00:20
@a-tarasyuk
add typeScriptVersion to CreateProgramOptions
755ae6a
@a-tarasyuk
Merge branch 'main' of https://github.com/microsoft/TypeScript into f…
efea552
…eat/51000
@a-tarasyuk
update baseline
1f5b6e8
@a-tarasyuk
Oleksandr Tarasiuk (a-tarasyuk) requested a review from Ryan Cavanaugh (RyanCavanaugh) December 14, 2022 14:34
@a-tarasyuk
Oleksandr Tarasiuk (a-tarasyuk) marked this pull request as ready for review December 14, 2022 14:34
@typescript-bot

TypeScript Bot (typescript-bot) commented Dec 14, 2022

Copy link
Copy Markdown
Contributor

The TypeScript team hasn't accepted the linked issue #51000. If you can get it accepted, this PR will have a better chance of being reviewed.

RyanCavanaugh reacted with thumbs down emoji
All reactions
  • 👎 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

andrewbranch
Andrew Branch (andrewbranch) reviewed Dec 15, 2022
View reviewed changes
Comment thread tests/baselines/reference/es3-jsx-react-native.types Resolved

Uh oh!

There was an error while loading. Please reload this page.

andrewbranch
Andrew Branch (andrewbranch) reviewed Dec 15, 2022
View reviewed changes
Comment thread src/compiler/diagnosticMessages.json Resolved

Uh oh!

There was an error while loading. Please reload this page.

Oleksandr Tarasiuk (a-tarasyuk) added 2 commits December 15, 2022 20:12
@a-tarasyuk
change diagnostic message
be592c6
@a-tarasyuk
Merge branch 'main' of https://github.com/microsoft/TypeScript into f…
5b5f0f8
…eat/51000
andrewbranch
Andrew Branch (andrewbranch) approved these changes Dec 15, 2022
View reviewed changes

@andrewbranch Andrew Branch (andrewbranch) left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks Oleksandr Tarasiuk (@a-tarasyuk)!

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@RyanCavanaugh
Ryan Cavanaugh (RyanCavanaugh) merged commit fe18527 into microsoft:main Dec 15, 2022
@RyanCavanaugh

Ryan Cavanaugh (RyanCavanaugh) commented Dec 15, 2022

Copy link
Copy Markdown
Member

🎉!

a-tarasyuk reacted with hooray emoji
All reactions
  • 🎉 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@RyanCavanaugh Ryan Cavanaugh (RyanCavanaugh) mentioned this pull request Dec 15, 2022
Feedback: 5.0 deprecations #51909
Closed
@RyanCavanaugh Ryan Cavanaugh (RyanCavanaugh) mentioned this pull request Jun 25, 2025
6.0 Deprecation List #54500
Open
@microsoft Microsoft (microsoft) locked as resolved and limited conversation to collaborators Oct 22, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Reviewers

@andrewbranch Andrew Branch (andrewbranch) andrewbranch approved these changes
@RyanCavanaugh Ryan Cavanaugh (RyanCavanaugh) Awaiting requested review from RyanCavanaugh

Uh oh!

There was an error while loading. Please reload this page.

Assignees

@RyanCavanaugh Ryan Cavanaugh (RyanCavanaugh)

Labels

For Milestone Bug PRs that fix a bug with a specific milestone

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Flag Deprecation Plan

Uh oh!

There was an error while loading. Please reload this page.

5 participants

@a-tarasyuk @Jack-Works @RyanCavanaugh @typescript-bot @andrewbranch
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.