Make warning inhibitors work on Windows

This commit is contained in:
Will Temple 2022-01-24 12:38:56 -05:00
Родитель 5c4c828a10
Коммит d28baf05e5
1 изменённых файлов: 4 добавлений и 4 удалений

Просмотреть файл

@ -68,22 +68,22 @@ export type WarningInhibitor = (warning: RollupWarning) => boolean;
function ignoreNiseSinonEval(warning: RollupWarning): boolean { function ignoreNiseSinonEval(warning: RollupWarning): boolean {
return ( return (
warning.code === "EVAL" && warning.code === "EVAL" &&
(warning.id?.includes("node_modules/nise") || warning.id?.includes("node_modules/sinon")) === (warning.id?.includes(["node_modules", "nise"].join(path.sep)) ||
true warning.id?.includes(["node_modules", "sinon"].join(path.sep))) === true
); );
} }
function ignoreChaiCircularDependency(warning: RollupWarning): boolean { function ignoreChaiCircularDependency(warning: RollupWarning): boolean {
return ( return (
warning.code === "CIRCULAR_DEPENDENCY" && warning.code === "CIRCULAR_DEPENDENCY" &&
warning.importer?.includes("node_modules/chai") === true warning.importer?.includes(["node_modules", "chai"].join(path.sep)) === true
); );
} }
function ignoreOpenTelemetryThisIsUndefined(warning: RollupWarning): boolean { function ignoreOpenTelemetryThisIsUndefined(warning: RollupWarning): boolean {
return ( return (
warning.code === "THIS_IS_UNDEFINED" && warning.code === "THIS_IS_UNDEFINED" &&
warning.id?.includes("node_modules/@opentelemetry/api") === true warning.id?.includes(["node_modules", "@opentelemetry", "api"].join(path.sep)) === true
); );
} }