From e557c2bd4eb4dd9d2208f443ecaaad7a59e5e676 Mon Sep 17 00:00:00 2001 From: Bob Ippolito Date: Sat, 20 Apr 2024 08:18:23 -0700 Subject: [PATCH] Update validate-tsc-types checks --- scripts/validate-tsc-types.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/validate-tsc-types.js b/scripts/validate-tsc-types.js index 3c9a1220f89..8696ee4bde1 100644 --- a/scripts/validate-tsc-types.js +++ b/scripts/validate-tsc-types.js @@ -28,7 +28,7 @@ const diagnosticsHost = { * `process.exit(1)` on failure. */ function validateTscTypes() { - const dtsFilesPattern = './.ts-temp/{lexical,lexical-*}/**/*.d.ts'; + const dtsFilesPattern = './.ts-temp/packages/{lexical,lexical-*}/**/*.d.ts'; const dtsFiles = glob.sync(dtsFilesPattern); if (dtsFiles.length === 0) { console.error( @@ -52,7 +52,7 @@ function validateTscTypes() { const specifier = /** @type {import('typescript').StringLiteral} */ ( node ); - if (/^shared(\/|$)/.test(specifier.text)) { + if (/^(shared|scripts)(\/|$)/.test(specifier.text)) { const start = specifier.getStart(ast); diagnostics.push({ category: ts.DiagnosticCategory.Error,