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

Add warning message for deprecated addDependencyTo option #251

Merged
merged 1 commit into from
Nov 29, 2016

Conversation

RyanZim
Copy link
Collaborator

@RyanZim RyanZim commented Nov 26, 2016

@ai Not sure if this is done right.

@RyanZim RyanZim added this to the v9.0.0 milestone Nov 26, 2016
@@ -63,6 +63,9 @@ function AtImport(options) {
typeof options.addDependencyTo === "object" &&
typeof options.addDependencyTo.addDependency === "function"
) {
console.warn(
Copy link

@michael-ciniawsky michael-ciniawsky Nov 26, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@RyanZim addDependencyTo is deprecated in favour of result.messages.dependency, postcss-loader >= v1.0.0 will automatically add your imported files to webpack's file watcher. For more information consider https://github.com/postcss/postcss-import#dependency-message-support

http://api.postcss.org/Result.html#warn additionally or as replacement. postcss-loader will emit a warning about it then.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But let @ai approve it first 😛

@ai
Copy link
Member

ai commented Nov 26, 2016

Logic looks fine. But @michael-ciniawsky suggested better text.

@RyanZim
Copy link
Collaborator Author

RyanZim commented Nov 26, 2016

@ai Will update text; you're fine with console.warn()?

@ai
Copy link
Member

ai commented Nov 26, 2016

Yeap

@RyanZim
Copy link
Collaborator Author

RyanZim commented Nov 26, 2016

@ai Fixed; had to do some pretty bad formatting to keep eslint happy.

@RyanZim RyanZim merged commit dfe4c23 into v9-dev Nov 29, 2016
@RyanZim RyanZim deleted the addDependencyTo branch November 29, 2016 00:06
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.

3 participants