Skip to content

Commit fbf223a

Browse files
committed
(fix) use console.log for .js.js deprecation warning
Technically (with a build system) this code could end up in the browser, so we should use only APIs available in both browser and node.js. Resolves #3222.
1 parent 9268dc2 commit fbf223a

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

tools/build_node.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,8 @@ async function buildNodeLanguage(language, options) {
3434
const EMIT = `function emitWarning() {
3535
if (!emitWarning.warned) {
3636
emitWarning.warned = true;
37-
process.emitWarning(
38-
'Using file extension in specifier is deprecated, use "highlight.js/lib/languages/%%%%" instead of "highlight.js/lib/languages/%%%%.js"',
39-
'DeprecationWarning'
37+
console.log(
38+
'Deprecation (warning): Using file extension in specifier is deprecated, use "highlight.js/lib/languages/%%%%" instead of "highlight.js/lib/languages/%%%%.js"'
4039
);
4140
}
4241
}

0 commit comments

Comments
 (0)