Skip to content

Commit

Permalink
fix(cli): prevent ExperimentalWarning messages form being printed (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
mirceanis authored Jun 12, 2023
1 parent 2e598da commit a2971aa
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .github/workflows/build-and-test-on-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,8 @@ jobs:
needs: [test-integration]
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/download-artifact@v3
with:
name: coverage-artifacts
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/build-test-publish-on-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,8 @@ jobs:
needs: [test-integration]
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/download-artifact@v3
with:
name: coverage-artifacts
Expand Down
15 changes: 14 additions & 1 deletion packages/cli/bin/veramo.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
#!/usr/bin/env node
#!/usr/bin/env node
const originalEmit = process.emit;
process.emit = function (name, data, ...args) {
if (
name === `warning` &&
typeof data === `object` &&
data.name === `ExperimentalWarning`
//if you want to only stop certain messages, test for the message here:
//&& data.message.includes(`Fetch API`)
) {
return false;
}
return originalEmit.apply(process, arguments);
};

import '../build/cli.js'

0 comments on commit a2971aa

Please sign in to comment.