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

feat(typescript-estree): replaceglobby w/fast-glob#9518

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

Conversation

SukkaW
Copy link
Contributor

@SukkaWSukkaW commentedJul 8, 2024
edited by bradzacher
Loading

PR Checklist

Overview

Addresses#9453. All tests passed on my machine locally.

@typescript-eslint
Copy link
Contributor

Thanks for the PR,@SukkaW!

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.

@netlifyNetlify
Copy link

netlifybot commentedJul 8, 2024
edited
Loading

Deploy Preview fortypescript-eslint ready!

NameLink
🔨 Latest commit0dc3f09
🔍 Latest deploy loghttps://app.netlify.com/sites/typescript-eslint/deploys/66ca15c9405f470008fcd161
😎 Deploy Previewhttps://deploy-preview-9518--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: 99 (no change from production)
Accessibility: 100 (no change from production)
Best Practices: 92 (no change from production)
SEO: 90 (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.

@nx-cloudNx Cloud
Copy link

nx-cloudbot commentedJul 8, 2024
edited
Loading

☁️ Nx Cloud Report

CI is running/has finished running commands for commit0dc3f09. 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 30 targets

Sent with 💌 fromNxCloud.

@codecovCodecov
Copy link

codecovbot commentedJul 8, 2024
edited
Loading

Codecov Report

Attention: Patch coverage is88.88889% with1 line in your changes missing coverage. Please review.

Project coverage is 88.04%. Comparing base(88b44ce) to head(0dc3f09).
Report is 14 commits behind head on main.

FilesPatch %Lines
...ipt-estree/src/parseSettings/resolveProjectList.ts88.88%0 Missing and 1 partial⚠️
Additional details and impacted files
@@           Coverage Diff           @@##             main    #9518   +/-   ##=======================================  Coverage   88.04%   88.04%           =======================================  Files         407      407             Lines       13948    13951    +3       Branches     4078     4079    +1     =======================================+ Hits        12280    12283    +3  Misses       1355     1355             Partials      313      313
FlagCoverage Δ
unittest88.04% <88.88%> (+<0.01%)⬆️

Flags with carried forward coverage won't be shown.Click here to find out more.

FilesCoverage Δ
...ipt-estree/src/parseSettings/resolveProjectList.ts97.87% <88.88%> (+0.14%)⬆️

@SukkaWSukkaW changed the titlerefactor(espree): replaceglobby w/fast-globchore(espree): replaceglobby w/fast-globJul 8, 2024
@SukkaWSukkaW changed the titlechore(espree): replaceglobby w/fast-globchore(typescript-estree): replaceglobby w/fast-globJul 8, 2024
- <tsconfigRootDir>/tsconfig.extra.json
- <tsconfigRootDir>/tsconfig.json
Copy link
Contributor

Choose a reason for hiding this comment

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

(passerby comment) Is there a small difference how these libraries find files, or why did this change? I don’t think it matters in this test as it’s just error message. :)

Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

Is there a small difference how these libraries find files

Yes, and thus results in an order difference.

rubiesonthesky reacted with thumbs up emoji

Choose a reason for hiding this comment

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

Hmm, ordering changes would make this either a bug, a bugfix, or a breaking change.

It looks to me like this is a bug. Theproject: ['./**/tsconfig.json', './**/tsconfig.extra.json'], indicates thattsconfig.json should come first. No?

Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

@JoshuaKGoldberg Fixed in the latest commits. Comments are added to explain the change.

@SukkaWSukkaWforce-pushed thereplace-globby-with-fast-glob branch fromcde05a7 toae480b4CompareJuly 10, 2024 13:35
Comment on lines +59 to +67
).reduce<string[]>((acc, folder) => {
if (typeof folder === 'string') {
acc.push(
// prefix with a ! for not match glob
folder.startsWith('!') ? folder : `!${folder}`,
);
}
return acc;
}, []);
Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

A bonus change, replace the.reduce.map chain with a single.reduce to avoid unnecessary iteration.

JoshuaKGoldberg reacted with rocket emoji
@SukkaWSukkaWforce-pushed thereplace-globby-with-fast-glob branch from4bd11fc to15ac7beCompareAugust 23, 2024 13:54
@benmccann
Copy link
Contributor

@SukkaW would you consider updating this PR to usetinyglobby rather thanfast-glob astinyglobby has fewer dependencies?

I took a naive stab at it in#9878, but it's failing the CI. I see you have a lot of extra logic here that I don't have, so perhaps that is needed. It seems you're much more familiar with how this project is setup, so if you're able to update this to usetinyglobby perhaps I can just close my PR

I was also curious why this is in draft mode as it appears to be working. Perhaps if you're able to update it totinyglobby it could also be marked as ready for review?

@SukkaW
Copy link
ContributorAuthor

but it's failing the CI. I see you have a lot of extra logic here that I don't have, so perhaps that is needed.

You can check my comments.fast-glob returns files array in arbitrary order.globby instead matches patterns one by one (iterating file systems multiple times) and then concat the results to ensure the order is correct. I added extra codes to mimic this behavior. You can try this too.

@SukkaWSukkaW marked this pull request as ready for reviewAugust 24, 2024 17:18
benmccann added a commit to benmccann/typescript-eslint that referenced this pull requestAug 24, 2024
benmccann added a commit to benmccann/typescript-eslint that referenced this pull requestAug 24, 2024
benmccann added a commit to benmccann/typescript-eslint that referenced this pull requestAug 24, 2024
benmccann added a commit to benmccann/typescript-eslint that referenced this pull requestAug 25, 2024
benmccann added a commit to benmccann/typescript-eslint that referenced this pull requestAug 25, 2024
@bradzacherbradzacher added the 1 approval>=1 team member has approved this PR; we're now leaving it open for more reviews before we merge labelAug 26, 2024
@bradzacherbradzacher requested review froma team and removed request forrubiesontheskyAugust 26, 2024 00:36
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.

LGTM, thanks for the cleaup! 🧹

@bradzacherbradzacher changed the titlechore(typescript-estree): replaceglobby w/fast-globfeat(typescript-estree): replaceglobby w/fast-globAug 26, 2024
@bradzacherbradzacher merged commit692a3f5 intotypescript-eslint:mainAug 26, 2024
63 of 65 checks passed

if (globProjects.length > 0) {
// Although fast-glob supports multiple patterns, fast-glob returns arbitrary order of results
// to improve performance. To ensure the order is correct, we need to call fast-glob for each pattern

Choose a reason for hiding this comment

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

OOC, does the order matter?

Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

There is a unit test case against the order, so yes, it does matter.

Choose a reason for hiding this comment

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

But why does the order matter? Shouldn't the unit test just check that the needed files are linted?

Copy link
Member

@JoshuaKGoldbergJoshuaKGoldbergAug 30, 2024
edited
Loading

Choose a reason for hiding this comment

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

Folks sometimes do things like['packages/*/tsconfig.json', 'tsconfig.json'] - and/or entries like'tsconfig.eslint.json'. The order intent is to first try the lower-level TSConfigs first.

Choose a reason for hiding this comment

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

Gotcha, thanks!

@github-actionsgithub-actionsbot locked asresolvedand limited conversation to collaboratorsSep 8, 2024
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.
Reviewers

@alfaprojectalfaprojectalfaproject left review comments

@rubiesontheskyrubiesontheskyrubiesonthesky left review comments

@JoshuaKGoldbergJoshuaKGoldbergJoshuaKGoldberg approved these changes

@bradzacherbradzacherbradzacher approved these changes

Assignees
No one assigned
Labels
1 approval>=1 team member has approved this PR; we're now leaving it open for more reviews before we merge
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

Enhancement: replaceglobby withfast-glob
6 participants
@SukkaW@benmccann@alfaproject@rubiesonthesky@JoshuaKGoldberg@bradzacher

[8]ページ先頭

©2009-2025 Movatter.jp