Skip to content

Commit

Permalink
fix: Dont log TS preamble.
Browse files Browse the repository at this point in the history
  • Loading branch information
milesj committed Oct 29, 2020
1 parent 890d618 commit 91a0687
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions src/TypesArtifact.ts
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,14 @@ export default class TypesArtifact extends Artifact<TypesBuild> {
const result = Extractor.invoke(ExtractorConfig.loadFileAndPrepare(configPath), {
localBuild: process.env.NODE_ENV !== 'production',
messageCallback: (warn) => {
if (warn.messageId === 'ae-missing-release-tag' || warn.logLevel === 'verbose') {
// eslint-disable-next-line no-param-reassign
warn.handled = true;

if (
warn.messageId === 'ae-missing-release-tag' ||
warn.messageId === 'console-preamble' ||
warn.logLevel === 'verbose'
) {
return;
}

Expand All @@ -128,9 +135,6 @@ export default class TypesArtifact extends Artifact<TypesBuild> {
sourceFile: warn.sourceFilePath,
sourceLine: warn.sourceFileLine,
});

// eslint-disable-next-line no-param-reassign
warn.handled = true;
},
});

Expand Down

0 comments on commit 91a0687

Please sign in to comment.