From d28baf05e50b507d6d471eb41f1f44c8f3aa6869 Mon Sep 17 00:00:00 2001 From: Will Temple Date: Mon, 24 Jan 2022 12:38:56 -0500 Subject: [PATCH] Make warning inhibitors work on Windows --- common/tools/dev-tool/src/config/rollup.base.config.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/common/tools/dev-tool/src/config/rollup.base.config.ts b/common/tools/dev-tool/src/config/rollup.base.config.ts index 2bb88943ebf..be740d039c9 100644 --- a/common/tools/dev-tool/src/config/rollup.base.config.ts +++ b/common/tools/dev-tool/src/config/rollup.base.config.ts @@ -68,22 +68,22 @@ export type WarningInhibitor = (warning: RollupWarning) => boolean; function ignoreNiseSinonEval(warning: RollupWarning): boolean { return ( warning.code === "EVAL" && - (warning.id?.includes("node_modules/nise") || warning.id?.includes("node_modules/sinon")) === - true + (warning.id?.includes(["node_modules", "nise"].join(path.sep)) || + warning.id?.includes(["node_modules", "sinon"].join(path.sep))) === true ); } function ignoreChaiCircularDependency(warning: RollupWarning): boolean { return ( 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 { return ( warning.code === "THIS_IS_UNDEFINED" && - warning.id?.includes("node_modules/@opentelemetry/api") === true + warning.id?.includes(["node_modules", "@opentelemetry", "api"].join(path.sep)) === true ); }