Skip to content

Commit

Permalink
Set plugin property on dependency messages (#380)
Browse files Browse the repository at this point in the history
  • Loading branch information
nodaguti authored and RyanZim committed Oct 23, 2018
1 parent f98dd1a commit 67f4553
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions index.js
Expand Up @@ -199,6 +199,7 @@ function resolveImportId(result, stmt, options, state) {
resolved.forEach(file => {
result.messages.push({
type: "dependency",
plugin: "postcss-import",
file: file,
parent: sourceFile,
})
Expand Down
2 changes: 2 additions & 0 deletions test/import-events.js
Expand Up @@ -22,11 +22,13 @@ test("should add dependency message for each import", t => {
const expected = [
{
type: "dependency",
plugin: "postcss-import",
file: resolve("test/fixtures/imports/media-import-level-2.css"),
parent: resolve("test/fixtures/media-import.css"),
},
{
type: "dependency",
plugin: "postcss-import",
file: resolve("test/fixtures/imports/media-import-level-3.css"),
parent: resolve("test/fixtures/imports/media-import-level-2.css"),
},
Expand Down

0 comments on commit 67f4553

Please sign in to comment.