Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(gatsby): Pass
pluginName
to reporter.activityTimer
& `reporte…
…r.createProgress` (#37710)
- Loading branch information
Showing
7 changed files
with
131 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 17 additions & 0 deletions
17
...tsby/src/utils/__tests__/fixtures/api-runner-node/test-plugin-activity-map/gatsby-node.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
exports.onPreInit = ({ reporter }) => { | ||
reporter.setErrorMap({ | ||
1337: { | ||
text: context => `Error text is ${context.someProp}`, | ||
level: `ERROR`, | ||
docsUrl: `https://www.gatsbyjs.com/docs/gatsby-cli/#new`, | ||
}, | ||
}) | ||
|
||
const activity = reporter.activityTimer(`Test Activity`) | ||
activity.start() | ||
|
||
activity.panicOnBuild({ | ||
id: `1337`, | ||
context: { someProp: `Naruto` }, | ||
}) | ||
} |
17 changes: 17 additions & 0 deletions
17
...tsby/src/utils/__tests__/fixtures/api-runner-node/test-plugin-progress-map/gatsby-node.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
exports.onPreInit = ({ reporter }) => { | ||
reporter.setErrorMap({ | ||
1337: { | ||
text: context => `Error text is ${context.someProp}`, | ||
level: `ERROR`, | ||
docsUrl: `https://www.gatsbyjs.com/docs/gatsby-cli/#new`, | ||
}, | ||
}) | ||
|
||
const activity = reporter.createProgress(`Test Progress`) | ||
activity.start() | ||
|
||
activity.panicOnBuild({ | ||
id: `1337`, | ||
context: { someProp: `Naruto` }, | ||
}) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters