Skip to content

Repo: Use less inconvenient ways of enforcing our usage of TypeScript APIs than patching #7956

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
JoshuaKGoldberg opened this issue Nov 19, 2023 · 1 comment · Fixed by #7968
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

@JoshuaKGoldberg
Copy link
Member

Suggestion

Splitting out of #7923 (comment): we're finding it rather inconvenient to have to work with yarn patch to apply our patches to TypeScript's .d.ts file.

For context, we want to enforce a few somewhat-specific-to-use ways of using TypeScript:

  • Adding in removed fields as @deprecated optionals for backwards compatibility
  • @deprecating fields not present in all our supported versions

Example patch: https://github.com/typescript-eslint/typescript-eslint/blob/8ec3800d6c4eef078ec20b5434805e731242a49d/.yarn/patches/typescript-npm-5.3.0-beta-33b1e90865.patch

Unfortunately, Yarn patching presents a couple inconveniences:

I'd rather we did something less getting-in-the-way-of-tooling / needing-manual-work-every-TS-version-change, such as declaration merging and/or linting.

@JoshuaKGoldberg JoshuaKGoldberg added triage Waiting for team members to take a look repo maintenance things to do with maintenance of the repo, and not with code/docs labels Nov 19, 2023
@bradzacher
Copy link
Member

I think we might be able to do declaration merging for this?
Just means we need to ensure the local decls are included in every package.

@JoshuaKGoldberg JoshuaKGoldberg added accepting prs Go ahead, send a pull request that resolves this issue and removed triage Waiting for team members to take a look labels Nov 20, 2023
@bradzacher bradzacher mentioned this issue Nov 21, 2023
3 tasks
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 5, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
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.

2 participants