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

Update twig #26

Open
piotrkulpinski opened this issue Apr 4, 2016 · 16 comments
Open

Update twig #26

piotrkulpinski opened this issue Apr 4, 2016 · 16 comments

Comments

@piotrkulpinski
Copy link

Hi guys,
Do you plan to update the package to use the latest Twig version?
It's using 0.8.6 while the latest Twig version is 1.24.0

Thanks, Piotrek

@sjova
Copy link

sjova commented Apr 22, 2016

+1

@luboskmetko
Copy link

I think versioning in gulp-twig refers to twig.js releases and it uses the latest one https://github.com/twigjs/twig.js/releases

@piotrkulpinski
Copy link
Author

You're right, but looks like twig.js lacks some of the original Twig functionalities.

@sjova
Copy link

sjova commented Apr 27, 2016

In latest version of twig.js, for example, they added support for source function: https://github.com/twigjs/twig.js/blob/master/CHANGELOG.md

But, source function not working in gulp-twig.

I suppose this line should be updated: https://github.com/zimmen/gulp-twig/blob/master/package.json#L16 0.8.6 -> 0.8.9

@luboskmetko
Copy link

Yep, you are right that it doesn't use the latest twig.js version, not sure why I thought otherwise. There is even a pull request for that here. Thanks for reopening.

@igidas
Copy link

igidas commented May 24, 2016

Please update to latest 0.9.5 version of TwigJS

@lazar-vuckovic
Copy link

+1

@stowball
Copy link

Sorry, but I couldn't wait any more so published an up-to-date package https://github.com/stowball/gulp-twig

@mdmoreau
Copy link

+1

@olets
Copy link
Collaborator

olets commented Sep 18, 2016

@stowball I believe that in npm pattern matching (e.g. ~) only works when applied to v>=1

fwiw this is also open as PR #27

@davidhellmann
Copy link

Hm I need twig >= 1.8.0 but when I try to type that in the package.json from gulp-twig-up-to-date he brings errors and said max 0.9.5 is Possible. @olets any Idea how I can fix that? What you mean with v>=1

@olets
Copy link
Collaborator

olets commented Oct 6, 2016

@davidhellmann it can get confusing: gulp-twig wraps twig.js, the js clone of Twig.

twig.js (currently v0.9.5) aims to match the latest Twig (currently v1.24.1 stable) (it does have some issues - bugs in embed and horizontal inheritance are the ones the average person is most likely to run into)

For a copy of gulp-twig using the latest version of twig.js link my fork (pr #27, with"gulp-twig": "olets/gulp-twig.git#update-dependencies") or @stowball's (#26 (comment), with "gulp-twig-up-to-date":""0.6.1") . (For now those two forks are identical except for the name change.)

What I was saying about pattern matching is stowball's fork added the dependency using "twig": "~0.9.5". That ~ made me think he might expect it to automatically update for 0.9.5 <= twig.js < 1.0, but as far as I know semver ranges (like the ~) don't work for npm dependencies until you pass v1.0 (so, for npm dependencies, ~x.y --> x.y <= v < x.(y+1) when x>1 but ~0.x --> v = 0.x). stowball may well already know this, but I wanted to give him a heads up that until twig.js passes 1.0 the dependency's version will need to be updated manually as if the ~ wasn't there.

(I'm not an expert in npm semver… there might be more nuance to it)

@davidhellmann
Copy link

OK thanks, I'm now using the twig u2d for the moment. And the version was a error in reasoning by myself. Sorry for that :)
And my embed problem was this one: http://twigfiddle.com/itfr4h
But I changed the If condition and now it works.

Thanks!

@ryuran
Copy link

ryuran commented Oct 27, 2016

#27 fix it

@simon-dt
Copy link
Owner

Update was merged.

@olets
Copy link
Collaborator

olets commented Sep 11, 2017

@stowball would you consider unpublishing your gulp-twig-up-to-date? It's now well behind and people are still downloading it, presumably thinking it's the latest. gulp-twig is more actively maintained now, and between #32 and twigjs/twig.js/issues/450 this problem won't come up again for a long time, if ever (it'll take Twig.jsv2). Thanks for stepping in when it was needed!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests