Skip to content
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

Implement inclusion/exclusion operators on VFS #80

Conversation

daniilsapa
Copy link
Collaborator

Resolves #66

Hi

 @illright

Sorry for the delay. I wanted to complete this task earlier, but a terrible force majeure happened at the beginning of the week.

… but finally here’s my solution.


Just a few annotations for it:


  • I saw that we already had a glob matching library “globby” in place but I then had to install "minimatch" because globby cannot just match file path to a pattern, it needs to traverse the real FS.
  • I just implemented the functionality and didn’t connect it to other parts as we discussed it would be done in further tasks
  • I had a question about test utils (and Ileft it on the specific line)

import { expect, it, describe } from 'vitest'

import applyGlobs from './apply-globs'
import { joinFromRoot, parseIntoFsdRoot } from '../../../steiger-plugin-fsd/src/_lib/prepare-test'
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Should we create a shared folder for test utilities for both Steiger and the fsd-plugin? Because, maybe it's just me, but I don't really like this import

Copy link
Member

Choose a reason for hiding this comment

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

I think we can just copy-paste that file, no need to set up a whole separate folder for it

Copy link
Member

Choose a reason for hiding this comment

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

Let me know if you'd like to do it before merging, because I'm honestly fine merging it as is

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I decided to copy that file after all, so Steiger package has a separate test utility. Also fixed several minor things in the code

Copy link
Member

@illright illright left a comment

Choose a reason for hiding this comment

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

Hey, thanks for this, this is huge! No stress about taking more time, hope everything is alright with you.

I'm very satisfied with this PR, especially the extensive test coverage. Great job!

import { expect, it, describe } from 'vitest'

import applyGlobs from './apply-globs'
import { joinFromRoot, parseIntoFsdRoot } from '../../../steiger-plugin-fsd/src/_lib/prepare-test'
Copy link
Member

Choose a reason for hiding this comment

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

I think we can just copy-paste that file, no need to set up a whole separate folder for it

@daniilsapa daniilsapa changed the title Implemente inclusion/exclusion operators on VFS Implement inclusion/exclusion operators on VFS Aug 12, 2024
@illright illright merged commit 3682e0d into feature-sliced:master Aug 13, 2024
7 checks passed
@daniilsapa daniilsapa deleted the feature/inclusion-exclusion-operators branch August 14, 2024 12:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement inclusion/exclusion operators on a VFS
2 participants