Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

fix(type-utils): treat custom type roots as external#6870

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged

Conversation

RebeccaStevens
Copy link
Contributor

@RebeccaStevensRebeccaStevens commentedApr 8, 2023
edited by JoshuaKGoldberg
Loading

PR Checklist

Overview

@typescript-eslint
Copy link
Contributor

Thanks for the PR,@RebeccaStevens!

typescript-eslint is a 100% community driven project, and we are incredibly grateful that you are contributing to that community.

The core maintainers work on this in their personal time, so please understand that it may not be possible for them to review your work immediately.

Thanks again!


🙏Please, if you or your company is finding typescript-eslint valuable, help us sustain the project by sponsoring it transparently onhttps://opencollective.com/typescript-eslint.

@netlify
Copy link

netlifybot commentedApr 8, 2023
edited
Loading

Deploy Preview fortypescript-eslint ready!

NameLink
🔨 Latest commit189d04a
🔍 Latest deploy loghttps://app.netlify.com/sites/typescript-eslint/deploys/652ede0ff4a9620007242cdb
😎 Deploy Previewhttps://deploy-preview-6870--typescript-eslint.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 91 (🔴 down 4 from production)
Accessibility: 100 (no change from production)
Best Practices: 92 (no change from production)
SEO: 98 (no change from production)
PWA: 80 (no change from production)
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to yourNetlify site configuration.

@RebeccaStevens
Copy link
ContributorAuthor

@marekdedic

@nx-cloud
Copy link

nx-cloudbot commentedApr 8, 2023
edited
Loading

☁️ Nx Cloud Report

CI is running/has finished running commands for commit189d04a. As they complete they will appear below. Click to see the status, the terminal output, and the build insights.

📂 See all runs for this CI Pipeline Execution


✅ Successfully ran 19 targets

Sent with 💌 fromNxCloud.

@marekdedic
Copy link
Contributor

Oh, great! I was going to write in#6866 that I'd like to port that logic toPackageSpecifier :D

BTW, there'll be a merge conflict with#6780, but no big deal, they're both tiny changes...

@marekdedic
Copy link
Contributor

Adding a test for this would probably be quite convoluted, right?

@bradzacherbradzacher added the bugSomething isn't working labelApr 10, 2023
Copy link
Member

@JoshuaKGoldbergJoshuaKGoldberg left a comment

Choose a reason for hiding this comment

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

Yip, similar to the other one, seems reasonable but let's test 👍

@JoshuaKGoldbergJoshuaKGoldberg added the awaiting responseIssues waiting for a reply from the OP or another party labelApr 16, 2023
Copy link
Contributor

@marekdedicmarekdedic left a comment
edited
Loading

Choose a reason for hiding this comment

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

I think this is mixing#6861 and#6868 together - I don't know if that's a good thing, a bad thing, or neither :D

@@ -30,4 +30,15 @@ declare module 'typescript' {
*/
intrinsicName?: string;
}

Copy link
Contributor

Choose a reason for hiding this comment

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

Adding our own type declarations for the internalsourceFileToPackageName seems fishy to me, but that's a decision the maintainers need to do.

I presume you are aware of#6861 - however, there has been no response in the corresponding TS issue....

Choose a reason for hiding this comment

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

Yeah for now I think it's fine. If they change that API we should see breakages in the TS version upgrade PR.

@JoshuaKGoldberg
Copy link
Member

@RebeccaStevens I'm hoping to get through the last bits of v6 work today since we're set to launch on Monday. I think that'll just entail mergingv6 into this PR's branch and adding a few unit tests - which I'm fine to do on my own, and plan on doing in a few hours. Please let me know if you already started and I can hold off 😄

@JoshuaKGoldberg
Copy link
Member

Hmm, yeah, these unit tests are tough. I ran out of time tonight. Will try again tomorrow.

@JoshuaKGoldberg
Copy link
Member

😕 I can't figure this out.9b49480 shows a unit test that I would think should populateprogram.sourceFileToPackageName, but it'sMap(0) {size: 0}. Either I've misunderstood how to use the combination oftypeRoots +sourceFileToPackageName in this unit test(more likely), or that currently-internal API isn't made for this use case(also plausible), or there's a bug withsourceFileToPackageName(less likely).

To repro:

  1. Put a breakpoint onhttps://github.com/JoshuaKGoldberg/typescript-eslint/blob/9b4948056790f764b3864badc57823db82cc528e/packages/type-utils/src/TypeOrValueSpecifier.ts#L166
  2. OpenTypeOrValueSpecifier.test.ts
  3. Launch the VS Code debugger forRun currently open type-utils test (F5)
  4. Observe thatprogram.sourceFileToPackageName is empty, even though earlier in the call stack (https://github.com/JoshuaKGoldberg/typescript-eslint/blob/959819186291a93e17e99e52973a68f3a352c2f5/packages/type-utils/tests/TypeOrValueSpecifier.test.ts#L146),type is correctly resolved toexport interface Foo

@RebeccaStevens
Copy link
ContributorAuthor

Yeah, I gave up on the test too. I came to the conclusion that internal test API thingy isn't setup to do these sort of tests. I didn't want to open that can of worms of editing that.

If I remember right, local tests I tried using a separate repo passed. I can't really turn those into unit test though.

JoshuaKGoldberg reacted with thumbs up emojiJoshuaKGoldberg reacted with laugh emoji

@JoshuaKGoldbergJoshuaKGoldberg deleted the branchtypescript-eslint:mainJuly 10, 2023 17:52
@JoshuaKGoldberg
Copy link
Member

JoshuaKGoldberg commentedJul 10, 2023
edited
Loading

This was unintentionally auto-closed when we merged thev6 branch 🙃 it'll berecreated reopened.

@JoshuaKGoldbergJoshuaKGoldberg changed the base branch fromv6 tomainJuly 10, 2023 21:11
JoshuaKGoldberg
JoshuaKGoldberg previously approved these changesOct 17, 2023
Copy link
Member

@JoshuaKGoldbergJoshuaKGoldberg left a comment

Choose a reason for hiding this comment

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

Yeah, this is a tricky one. All the existing unit tests still pass, and I couldn't figure out how to add unit tests for the new behavior. It's been sitting for a while... let's ship it. 🤘

Sorry for taking so long!

Cartoon animation of a ship on water

marekdedic reacted with hooray emoji
@JoshuaKGoldbergJoshuaKGoldberg removed the awaiting responseIssues waiting for a reply from the OP or another party labelOct 17, 2023
@JoshuaKGoldbergJoshuaKGoldberg merged commitb85f744 intotypescript-eslint:mainOct 17, 2023
@github-actionsgithub-actionsbot locked asresolvedand limited conversation to collaboratorsOct 25, 2023
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.
Reviewers

@marekdedicmarekdedicmarekdedic left review comments

@JoshuaKGoldbergJoshuaKGoldbergJoshuaKGoldberg left review comments

Assignees
No one assigned
Labels
bugSomething isn't working
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

Bug: v6typeMatchesSpecifierPackageSpecifier should match custom type roots
4 participants
@RebeccaStevens@marekdedic@JoshuaKGoldberg@bradzacher

[8]ページ先頭

©2009-2025 Movatter.jp