Skip to content

Enhancement: Deprecate getSourceFileOfNode in type-utils #9797

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

Closed
4 tasks done
y-hsgw opened this issue Aug 15, 2024 · 2 comments · Fixed by #11284
Closed
4 tasks done

Enhancement: Deprecate getSourceFileOfNode in type-utils #9797

y-hsgw opened this issue Aug 15, 2024 · 2 comments · Fixed by #11284
Labels
accepting prs Go ahead, send a pull request that resolves this issue repo maintenance things to do with maintenance of the repo, and not with code/docs

Comments

@y-hsgw
Copy link
Contributor

y-hsgw commented Aug 15, 2024

Before You File a Proposal Please Confirm You Have Done The Following...

Relevant Package

type-utils

My proposal is suitable for this project

  • I believe my proposal would be useful to the broader TypeScript community (meaning it is not a niche proposal).

Description

It appears that the getSourceFileOfNode function is not being used. I think it's safe to delete.

export function getSourceFileOfNode(node: ts.Node): ts.SourceFile {

Additional Info

No response

@y-hsgw y-hsgw added enhancement New feature or request triage Waiting for team members to take a look labels Aug 15, 2024
@JoshuaKGoldberg
Copy link
Member

Indeed, good catch. The only problem is, this would be a breaking change as it's publicly exported now... and we're a long time away from a v9/v10. Marking as blocked for now.

@JoshuaKGoldberg JoshuaKGoldberg added blocked by another issue Issues which are not ready because another issue needs to be resolved first and removed triage Waiting for team members to take a look labels Aug 15, 2024
@Josh-Cena Josh-Cena added breaking change This change will require a new major version to be released and removed blocked by another issue Issues which are not ready because another issue needs to be resolved first labels Aug 15, 2024
@JoshuaKGoldberg
Copy link
Member

Oh actually, in the meantime we can just mark it as @deprecated. That's not a breaking change. And we generally do a full sweep of deprecated code in majors.

@JoshuaKGoldberg JoshuaKGoldberg changed the title Enhancement: Remove getSourceFileOfNode from type-utils Enhancement: Deprecate getSourceFileOfNode in type-utils Dec 30, 2024
@JoshuaKGoldberg JoshuaKGoldberg added repo maintenance things to do with maintenance of the repo, and not with code/docs accepting prs Go ahead, send a pull request that resolves this issue and removed breaking change This change will require a new major version to be released enhancement New feature or request labels Dec 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
accepting prs Go ahead, send a pull request that resolves this issue repo maintenance things to do with maintenance of the repo, and not with code/docs
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants