Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions bin/dev.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
#!/usr/bin/env node

const __originalEmit = process.emit;
process.emit = function (name, data) {
if (
name === 'warning' &&
data?.name === 'ExperimentalWarning' &&
/JSON modules/i.test(data?.message ?? '')
) {
return false;
}
return __originalEmit.apply(process, arguments);
};

import { initTelemetry, captureError, shutdown } from '../dist/lib/telemetry.js';
import { execute } from '@oclif/core';

Expand Down
15 changes: 15 additions & 0 deletions bin/run.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,20 @@
#!/usr/bin/env node

// Suppress Node's "Importing JSON modules is an experimental feature" warning
// emitted by one of ink's transitive deps. Targeted by name + message so we
// don't accidentally swallow anything else.
const __originalEmit = process.emit;
process.emit = function (name, data) {
if (
name === 'warning' &&
data?.name === 'ExperimentalWarning' &&
/JSON modules/i.test(data?.message ?? '')
) {
return false;
}
return __originalEmit.apply(process, arguments);
};

import { initTelemetry, captureError, shutdown } from '../dist/lib/telemetry.js';
import { execute } from '@oclif/core';

Expand Down
Loading
Loading