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

feat: add globbing support for package roots #3

Merged
merged 3 commits into from
Jul 19, 2023

Conversation

r4vn
Copy link
Contributor

@r4vn r4vn commented Jul 18, 2023

This allows us to use globs for package roots in lerna.json.

Part of https://github.com/ExodusMovement/exodus-hydra/issues/1474.

It utilizes Glob to ensure wide globbing support.

However, this leads to a change in how we handle virtual filesystems in tests. Glob requires an fs-like object to function. With Volume this seems not to be the case and that is why createFsFromVolume exists in memfs. See vol vs fs.

I added a testing utility to handle this in one place and should be kept in mind when migrating other packages. I will do that most likely myself.

@r4vn r4vn self-assigned this Jul 18, 2023
@r4vn r4vn added the enhancement New feature or request label Jul 18, 2023
@r4vn r4vn marked this pull request as ready for review July 18, 2023 16:53
Copy link
Collaborator

@sparten11740 sparten11740 left a comment

Choose a reason for hiding this comment

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

utACK

However, this leads to a change in how we handle virtual filesystems in tests

I've used the real FS in a different repo in the past for a more integrated test (it's not actually too slow). Wondering if it would make sense to swap out eventually as this logic is quite reliant on things working as they would on the real FS and subtle differences in the memory FS implementation may lead to passing tests when it would fail on the real FS or the other way around (not to be done in this PR, but maybe to capture).

Once you release and add this to the lerna-release-action, would you mind testing a few scenarios in the test repo to see if the release tooling can cope with it?

  • creating a package that is a little more deeply nested
  • grouping 2 or more packages

@r4vn
Copy link
Contributor Author

r4vn commented Jul 19, 2023

Also thought about using the real FS with some fixtures, but didn't want to squeeze it in here, like you said. Captured in #4.

Will definitely do some testing with lerna-version-selectively before sending out the review for lerna-release-action!

@r4vn r4vn merged commit 92155c1 into master Jul 19, 2023
2 checks passed
@r4vn r4vn deleted the r4vn/feat/package-root-globbing branch July 19, 2023 08:23
github-actions bot pushed a commit that referenced this pull request Jul 19, 2023
# [1.4.0](v1.3.0...v1.4.0) (2023-07-19)

### Features

* add globbing support for package roots ([#3](#3)) ([92155c1](92155c1))
@github-actions
Copy link

🎉 This PR is included in version 1.4.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request released
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants