joliss / broccoli-sass

Sass compiler for Broccoli, using libsass
MIT License
44 stars 97 forks source link

Issues with node-sass v3.0 beta versions #61

Closed simonexmachina closed 9 years ago

simonexmachina commented 9 years ago

I'm getting several bug reports on ember-cli-sass that are resulting from the node-sass betas being incompatible with some very popular CSS libraries (such as Foundation and Bourbon). I think that broccoli-sass should use a beta version when it's using a beta version of node-sass, then if people want the new features they can use the beta, but everyone else doesn't have to deal with failing builds when the package gets updated.

One possible action here would be to create broccoli-sass@1.0.0-beta.1 that uses node-sass@3.0.0-beta.x and revert broccoli-sass@0.x to node-sass@2.x.

ember-cli-sass actually uses broccoli-sass-source-maps (which is a fork of this project), and though I'd ideally like to keep the versions in-sync, I think the best strategy for the end-users is to do this in broccoli-sass-source-maps to sort it out for the majority of ember-cli-sass users, and provide the v1.0 betas for those that do need node-sass v3.

joliss commented 9 years ago

Hm, what stops people who don't want the beta from sticking with 0.5.x? E.g. ember-cli-sass could depend on broccoli-sass ^0.5.0 until node-sass 3.0.0 is stable.

joliss commented 9 years ago

(I've been avoiding beta tags in version numbers because I can never seem to remember how npm handles version ranges and sort order for those. I don't think it makes much of a difference though?)

simonexmachina commented 9 years ago

Also, I think that node-sass should be a peerDependency - that way people can specify a specific version in their package.json if they're having issues with a specific version of node-sass. This is what I've done in broccoli-sass-source-maps.

dylanfoster commented 9 years ago

peerDependencies are being deprecated in npm 3+ so this will fail for many who make the upgrade.

simonexmachina commented 9 years ago

Nothing stops then sticking with the previous version, I just think we're throwing people a curveball because one day they do a clean install and suddenly they've got a beta SASS compiler that chokes on common libs like Foundation and Bourbon.

I don't have a reference handy for the way npm handles beta versions but it works "as expected": if you depend on ^0.1.0 then you won't get 1.0.0-beta.1 until you update your dependency.

@dylanfoster thanks for pointing that out, looks like peerDependencies are indeed being deprecated.

ghost commented 9 years ago

updating to node-sass3.0.0-beta7 allowed foundation 5.5.x to build again. It was definitely broken during 3.0.0-beta5

joliss commented 9 years ago

updating to node-sass3.0.0-beta7 allowed foundation 5.5.x to build again. It was definitely broken during 3.0.0-beta5

I pushed broccoli-sass 0.6.5 which depends on beta7, in case it doesn't auto-update for someone.

Nothing stops then sticking with the previous version, I just think we're throwing people a curveball because one day they do a clean install and suddenly they've got a beta SASS compiler that chokes on common libs like Foundation and Bourbon.

Fair point. Let's stick with 0.6.x for the node-sass 3.0.0 betas for now; and next time it comes up I'll look into beta version handling on npm.