Comments (24)
Apparently a kind samaritan already went and tackled this back in August.
https://github.com/Homebrew/homebrew-core/blob/master/Formula/yarn-completion.rb
Closing this as resolved. Thanks @DomT4! 🎉
from yarn-completion.
I'll look into it when I get some extra time
from yarn-completion.
yep! i opened Homebrew/homebrew-core#28645 and it was merged beginning of August.
homebrew PR was noted here: #13 (comment)
from yarn-completion.
Well, short story (because I haven't gotten the scripts PR open for you yet)...
HOMEBREW_DEVELOPER=true brew bump-formula-pr --url="https://github.com/dsifford/yarn-completion/archive/v0.9.0.tar.gz" --sha256="$(curl -fsSL "https://github.com/dsifford/yarn-completion/archive/v0.9.0.tar.gz" | shasum -a 256 -b | awk '{print $1}')" yarn-completion
That should make the branch in your brew git repo, create a homebrew fork for you (if you don't already have one), push the branch to your fork, and open a PR to bump the formula version.
You can also add a --dry-run
flag to the brew command if you want to see what it'll do.
from yarn-completion.
from yarn-completion.
Doesn't appear like adding support for this would be allowed per the homebrew guidelines.
@benswinburne If you'd really like to see this land in homebrew, perhaps consider reaching out to the maintainers of the yarn formula and see if they can add it as an optional dependency.
from yarn-completion.
@dsifford which particular rule in the guidelines do you find difficult to adhere? There are quite a few similar automcompletion formulae in homebrew already:
from yarn-completion.
The rule stating that new formulae must have an accompanying website
from yarn-completion.
@kachkaev I'll check out those formulae when I get some time. Technically, if I'm reading the guidelines correctly, those shouldn't be allowed to exist. But if they're letting those slide, I suppose they'd have to let this one slide too...
from yarn-completion.
👍
I'm quite sure they will accept your brew formulae @dsifford! Yarn is a very popular tool these days and your repo seems to be pretty much the only yarn autocompletion that exists! I wish you be the first who claims yarn-completion
package name in Homebrew!
from yarn-completion.
from yarn-completion.
Sooo... issue...
In order to accepted into homebrew, the formula is supposed to have a non trivial test. I'm using the same test as for other completion scripts currently in homebrew (rails, vagrant), which sources the completion script, runs complete -p yarn
, and verifies the output is as expected.
Wrinkle: the homebrew tests are run on travis CI using macOS which uses the 3.2 version of bash.
I realize that 3.2 support is already out of the question, but would it be possible to at least make sourcing on 3.2 succeed so the brew tests can pass?
from yarn-completion.
Sure. Start a PR and I'd be happy to merge if everything works and checks out.
from yarn-completion.
PR here: #18
from yarn-completion.
Thanks for merging #18. I believe all we need is a new release (brew formulae need to point to specific versions) and we can get this into homebrew!
from yarn-completion.
Sure, I'll do that in a bit.
Does homebrew have any notion of dependencies between formulae? If possible, to avoid the headache, could we make the package dependent on bash 4?
from yarn-completion.
Having that discussion now on the brew PR. If we declare bash as a dep (which would imply the v4 bash from homebrew itself), it would actually install bash as part of installing yarn-completion. Which would be a bad experience. (Installing yarn-completion and getting an entirely new shell?)
Perhaps it can be noted as a recommended dep? Unsure, still investigating (and checking other completion scripts in homebrew.)
from yarn-completion.
Sounds good. Keep us posted.
Just pushed a release: https://github.com/dsifford/yarn-completion/releases/tag/v0.7.4
from yarn-completion.
@jasonkarns is this set to track off of github releases or does someone need to manually go in and update? If the latter, I'll try and make a mental note to do that.
from yarn-completion.
Needs to be manually updated via a PR similar to: Homebrew/homebrew-core@4f418e6
However, homebrew has a command that can automate the PR creation process: brew bump-formula-pr
I actually have an npm package that wraps this command for use as a postversion npm hook: https://github.com/jasonkarns/brew-publish
Example use: https://github.com/nodenv/nodenv/blob/18489d7bf319fde4edc942cce7f3b1caf1b12214/package.json#L31-L36
With it set up this way, npm version <major|minor|patch>
does the npm version bumping, then npm invokes the postversion
script which is set as "npm run publish:github && npm run publish:brew"
. publish:github
script being: "git push --follow-tags && script/release-github"
and the publish:brew
script invokes my module: "brew-publish $npm_package_name v$npm_package_version"
from yarn-completion.
I can open a PR to set up a similar release process here if you like.
from yarn-completion.
Sounds lovely. Thanks 👍
from yarn-completion.
Just pushed a release @jasonkarns --- what do I do now?
from yarn-completion.
All set Homebrew/homebrew-core#32637
Thanks
from yarn-completion.
Related Issues (20)
- Feature request: support workspaces run through scripts HOT 3
- use package name instead of directory basename for workspace HOT 1
- How can we plug this into our own bash autocompletions? HOT 9
- Feature request: NPM repository autocomplete HOT 1
- Colon-contained completion glitches HOT 2
- Zsh support? HOT 6
- Version number error with 1.14.0? HOT 1
- Homebrew 0.14.0 upgrade issue HOT 1
- Tests are failing HOT 4
- Workspace package completion HOT 11
- Tests fail on latest yarn HOT 1
- Add it to bashit HOT 2
- Git-Bash completions HOT 2
- installing yarn completions under .local/share/bash-completion fails HOT 1
- Targets with a : don't work correctly (special characters require escaping) HOT 12
- Yarn v2/berry support ? HOT 3
- Excellent work HOT 1
- Fix build HOT 1
- Incorrect suggestion with script name with colon :
- Incorrect suggestion with script name with colon `:`
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from yarn-completion.