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

Making node-sass a fully-fledged dependency #166

Closed
wants to merge 1 commit into from

Conversation

stevemao
Copy link

In npm3, peerDeps aren't auto-installed anymore.

In npm3, peerDeps aren't auto-installed anymore.
@jhnns
Copy link
Member

jhnns commented Sep 29, 2015

Sorry, specifying node-sass as peerDependency is far more useful for most users.

Since node-sass/libsass processes your files, you should be able to specify the exact version you need. The sass-loader is just using an API which is not affected by most changes.

In other words: Your API surface to node-sass is much bigger than ours. Otherwise we would have tons of issues and PRs like "Update node-sass to x.y.z plz"

@jhnns jhnns closed this Sep 29, 2015
@stevemao
Copy link
Author

I'm using npm3 now and it doesn't install node-sass automatically.

@stevemao
Copy link
Author

Also I think this is the same with any other wrappers. You could keep the same semver as node-sass, you could lock the version of it if there is any bug etc. If there is an API breaking change in node-sass your module would not break for people before you bump it and make the changes. I could give you a ton of projects that do it.

@jhnns
Copy link
Member

jhnns commented Sep 29, 2015

I'm using npm3 now and it doesn't install node-sass automatically.

I know and that's good. node-sass should be the dependency of your project.

I could give you a ton of projects that do it.

It's true, people are handling this differently. And while there are projects where your suggested approach is very reasonable (like for the phantomjs-package for example), I don't think that it fits here.

The sass-loader is a link between webpack and node-sass. Following node-sass versions would ignore the fact that we also have to stay up-to-date with webpack: So, which version number should we follow then? Imho, the most robust solution to this problem is to have an own version number and to specify both as peerDependency.

But you're right. I forgot to add webpack as peerDependency. 😁

@stevemao
Copy link
Author

Hmm... I don't know if this is the recommended approach. @iarna and @othiym23 may know more details. :)

@jhnns
Copy link
Member

jhnns commented Sep 29, 2015

I would love to hear alternatives from @iarna or @othiym23, but I guess there no new insights than already discussed at npm/npm#5080 npm/npm#6565 npm/npm#7495...

@stevemao
Copy link
Author

hm..alright..

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

Successfully merging this pull request may close these issues.

2 participants