File tree Expand file tree Collapse file tree 1 file changed +16
-5
lines changed
Expand file tree Collapse file tree 1 file changed +16
-5
lines changed Original file line number Diff line number Diff line change 11'use strict' ;
22
3- function handleCircularDependancyWarning ( warning , rollupWarn ) {
3+ /**
4+ * @typedef {import('rollup') } rollup
5+ * @typedef {import('rollup').WarningHandlerWithDefault } rollup.WarningHandlerWithDefault
6+ */
7+
8+ /**
9+ * @type {rollup.WarningHandlerWithDefault }
10+ */
11+ function handleCircularDependancyWarning ( warning , warningHandler ) {
412 const packagesWithCircularDependencies = [
513 'util/' ,
614 'assert/' ,
@@ -10,12 +18,15 @@ function handleCircularDependancyWarning(warning, rollupWarn) {
1018 if (
1119 ! (
1220 warning . code === 'CIRCULAR_DEPENDENCY' &&
13- packagesWithCircularDependencies . some ( ( modulePath ) =>
14- warning . importer . includes ( modulePath )
15- )
21+ packagesWithCircularDependencies . some ( ( modulePath ) => {
22+ if ( typeof warning . importer !== 'string' ) {
23+ return false ;
24+ }
25+ return warning . importer . includes ( modulePath ) ;
26+ } )
1627 )
1728 ) {
18- rollupWarn ( warning ) ;
29+ warningHandler ( warning ) ;
1930 }
2031}
2132
You can’t perform that action at this time.
0 commit comments