Giter VIP home page Giter VIP logo

Comments (24)

dsifford avatar dsifford commented on June 2, 2024 2

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.

dsifford avatar dsifford commented on June 2, 2024 1

I'll look into it when I get some extra time

from yarn-completion.

jasonkarns avatar jasonkarns commented on June 2, 2024 1

yep! i opened Homebrew/homebrew-core#28645 and it was merged beginning of August.

homebrew PR was noted here: #13 (comment)

from yarn-completion.

jasonkarns avatar jasonkarns commented on June 2, 2024 1

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.

benswinburne avatar benswinburne commented on June 2, 2024

from yarn-completion.

dsifford avatar dsifford commented on June 2, 2024

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.

kachkaev avatar kachkaev commented on June 2, 2024

@dsifford which particular rule in the guidelines do you find difficult to adhere? There are quite a few similar automcompletion formulae in homebrew already:

screen shot 2018-03-08 at 18 28 39

from yarn-completion.

dsifford avatar dsifford commented on June 2, 2024

The rule stating that new formulae must have an accompanying website

from yarn-completion.

dsifford avatar dsifford commented on June 2, 2024

@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.

kachkaev avatar kachkaev commented on June 2, 2024

👍

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.

jasonkarns avatar jasonkarns commented on June 2, 2024

Homebrew/homebrew-core#28645

from yarn-completion.

jasonkarns avatar jasonkarns commented on June 2, 2024

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.

dsifford avatar dsifford commented on June 2, 2024

Sure. Start a PR and I'd be happy to merge if everything works and checks out.

from yarn-completion.

jasonkarns avatar jasonkarns commented on June 2, 2024

PR here: #18

from yarn-completion.

jasonkarns avatar jasonkarns commented on June 2, 2024

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.

dsifford avatar dsifford commented on June 2, 2024

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.

jasonkarns avatar jasonkarns commented on June 2, 2024

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.

dsifford avatar dsifford commented on June 2, 2024

Sounds good. Keep us posted.

Just pushed a release: https://github.com/dsifford/yarn-completion/releases/tag/v0.7.4

from yarn-completion.

dsifford avatar dsifford commented on June 2, 2024

@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.

jasonkarns avatar jasonkarns commented on June 2, 2024

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.

jasonkarns avatar jasonkarns commented on June 2, 2024

I can open a PR to set up a similar release process here if you like.

from yarn-completion.

dsifford avatar dsifford commented on June 2, 2024

Sounds lovely. Thanks 👍

from yarn-completion.

dsifford avatar dsifford commented on June 2, 2024

Just pushed a release @jasonkarns --- what do I do now?

from yarn-completion.

dsifford avatar dsifford commented on June 2, 2024

All set Homebrew/homebrew-core#32637

Thanks

from yarn-completion.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.