-
-
Notifications
You must be signed in to change notification settings - Fork 639
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
Remove development artifacts from the NPM package #277
Remove development artifacts from the NPM package #277
Conversation
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.
As expressed in other threads, I think none of this should be excluded.
If flow users are seeing problems due to flaws in flow, can they not ignore node_modules/**/src/*
, for example?
This package is shipped by default with CRA. CRA posits zero config Flow integration (which worked before). The zero config-ness was broken by shipping Flow-annotated sources. Yes, people technically can work around this but it's a regression for our zero config promise. I realize ideally this should be solved at Flow level but it won't happen within the next few months (although the feature is in the pipeline). This seems like a practical compromise, and when Flow solves this we can revert. |
Is there a github issue tracking this flow fix I can follow? Even if a temporary concession was made for this flow issue, we'd still only need to exclude |
@ljharb @jessebeach could this be a reasonable compromise: |
@evcohen I could be convinced to do a temporary removal as @gaearon suggests, but your compromise sounds like it'd be a permanent change - and it doesn't solve the use case of "I went offline without knowing I'd need that code, and now I'm screwed" |
The feature is called lazy typechecking. Unfortunately I don't think Flow team uses GH to track feature development but I can create an issue if it helps. The feature is already available behind a flag but they expect to enable it by default some time this year. If I understand correctly just excluding src alone should be enough. |
@ljharb no, but that's a tradeoff that the consumer makes by saying that they need those things. they wouldn't get semver for free, but they'd have full offline support. it depends what they value more. "devDependencies": {
"eslint-plugin-jsx-a11y": "https://github.com/evcohen/eslint-plugin-jsx-a11y/tree/v6.0.0"
} (or whatever the correct syntax is) gives you all of |
IMO it's pretty important to eliminate friction in a plugin like this. Developers often resist caring about a11y, and even small friction can make people hesitant about using the plugin or including it in other preset-like packages. I don't mean to feamonger but that's my experience anyway. People take out optional things that's causing them trouble even if the real fix is simple. |
adf84cc
to
8505503
Compare
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'd still like to see this list of npmignore additions reduced to only adding src
- @jessebeach, do you mind making that change before merging?
@evcohen, I don't think "choose semver or choose offline access to all relevant parts of the dep" is a reasonable choice to ask someone to make, nor satisfies the concerns I've addressed. I think "remove for now, add everything back later" is a much better choice than that.
@jessebeach and @gaearon's points about "let's reduce ecosystem friction for now" and "a11y linting is a more important thing to propagate" are valid, and I'm convinced that it's the right choice to make for the time being.
@gaearon if you'd mind filing a github issue for Flow to make lazy typechecking the default, then we can file an issue on this repo to revert this PR once that lands.
@ljharb that's fine, but for what it's worth, I think offline support is such an edge case and isn't worth the package bloat. I think better debugging support is a more valuable consequence of providing the full source code, and directly correlates to better bug reports and PRs from contributors. You've said this before, but this is an npm problem, not a package author's problem. If we are willing to adjust our package because of an unsolved upstream issue, we should be willing to now (and you are, so thank you for your flexibility on the issue 😃 ). |
surely. The |
8505503
to
f9d3ba9
Compare
Package now includes:
|
@jessebeach feel free to merge |
@evcohen that should be good enough for a v6.0.1 |
v6.0.1 published |
Results in the following package