From 83e7cce6959b8df341dcc791a1ce5b0edca2ba81 Mon Sep 17 00:00:00 2001 From: Jordan Pittman Date: Fri, 25 Oct 2024 16:47:35 -0400 Subject: [PATCH] Prep for Oxide API changes --- .../tailwindcss-language-server/src/oxide.ts | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/packages/tailwindcss-language-server/src/oxide.ts b/packages/tailwindcss-language-server/src/oxide.ts index ba9f2b5d..7e10da7a 100644 --- a/packages/tailwindcss-language-server/src/oxide.ts +++ b/packages/tailwindcss-language-server/src/oxide.ts @@ -131,9 +131,21 @@ export async function scan(options: ScanOptions): Promise { } // V3 + if (lte(options.oxideVersion, '4.0.0-alpha.30')) { + let scanner = new oxide.Scanner({ + detectSources: { base: options.basePath }, + sources: options.sources, + }) + + return { + files: scanner.files, + globs: scanner.globs, + } + } + + // V4 let scanner = new oxide.Scanner({ - detectSources: { base: options.basePath }, - sources: options.sources, + sources: [{ base: options.basePath, pattern: '**/*' }, ...options.sources], }) return {