-
Notifications
You must be signed in to change notification settings - Fork 44
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
[New] add --entrypoints-legacy
CLI command
#156
Conversation
🦋 Changeset detectedLatest commit: ab6cd95 The changes in this PR will be included in the next version bump. This PR includes changesets to release 3 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@arethetypeswrong/core
always receives or fetches an npm tarball as an input. Isn’t using packlist/arborist redundant with that input? Can we just use all files it can see in the Package
object?
ah, hmm, i suppose that's true - i was assuming it runs in-situ, but i guess the pack option takes care of that? I'll refactor to just look at the files, and that should remove the need for |
thanks, that's much simpler. the snapshot still isn't matching the actual behavior of the built cli, tho. |
I checked this out locally, ran tests, and got a new snapshot:
I think this looks right? What are you getting? |
That's totally right! what i get is what's in this PR :-/ |
I was able to effectively start from scratch and get the md to update, but the json snapshot data still doesn't look right. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Almost ready to go; if you wouldn’t mind adding something to the CLI README too, that would be great. Thanks!
if (proxies.length === 0) { | ||
if (options?.entrypointsLegacy) { | ||
return fs.listFiles() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it was an existing bug that there are early returns in here; I don’t see why either “proxy directories” or these files shouldn’t interact with--include-entrypoints
and --exclude-entrypoints
. I can rearrange all this in a different PR though if you don’t want to touch it here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tbh I'm not actually sure what "proxy directories" is for, it seems to always be empty in my experience - as for include/exclude, i guess it does make sense to explicitly exclude things from the legacy list, but i'm not sure what the point would be for include
- what would you include that's not already there?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably nothing, but maybe files that have non-standard/non-JS file extensions
The JSON snapshot is running the core library with default options; only the CLI test is getting the |
Updated except for #156 (comment) I'm happy to expand the functionality, in this PR, so that |
Thanks @ljharb! |
Note that the snapshots here are incorrect - despite these changes working as expected on the actual project/version in question, it's not working when i run the tests locally.
Closes #153.