diff --git a/packages/tailwindcss-language-server/src/oxide.ts b/packages/tailwindcss-language-server/src/oxide.ts index 5dad7553..4dd529df 100644 --- a/packages/tailwindcss-language-server/src/oxide.ts +++ b/packages/tailwindcss-language-server/src/oxide.ts @@ -36,8 +36,8 @@ declare namespace OxideV2 { } } -// This covers the Oxide API from v4.0.0-alpha.20+ -declare namespace OxideV3 { +// This covers the Oxide API from v4.0.0-alpha.30+ +declare namespace OxideV3And4 { interface GlobEntry { base: string pattern: string @@ -58,10 +58,37 @@ declare namespace OxideV3 { } } +// This covers the Oxide API from v4.1.0+ +declare namespace OxideV5 { + interface GlobEntry { + base: string + pattern: string + } + + interface SourceEntry { + base: string + pattern: string + negated: boolean + } + + interface ScannerOptions { + sources: Array + } + + interface ScannerConstructor { + new (options: ScannerOptions): Scanner + } + + interface Scanner { + get files(): Array + get globs(): Array + } +} + interface Oxide { scanDir?(options: OxideV1.ScanOptions): OxideV1.ScanResult scanDir?(options: OxideV2.ScanOptions): OxideV2.ScanResult - Scanner?: OxideV3.ScannerConstructor + Scanner?: OxideV3And4.ScannerConstructor | OxideV5.ScannerConstructor } async function loadOxideAtPath(id: string): Promise { @@ -78,11 +105,17 @@ interface GlobEntry { pattern: string } +interface SourceEntry { + base: string + pattern: string + negated: boolean +} + interface ScanOptions { oxidePath: string oxideVersion: string basePath: string - sources: Array + sources: Array } interface ScanResult { @@ -118,38 +151,58 @@ export async function scan(options: ScanOptions): Promise { } // V2 - if (lte(options.oxideVersion, '4.0.0-alpha.19')) { + else if (lte(options.oxideVersion, '4.0.0-alpha.19')) { let result = oxide.scanDir({ base: options.basePath, - sources: options.sources, + sources: options.sources.map((g) => ({ base: g.base, pattern: g.pattern })), }) return { files: result.files, - globs: result.globs, + globs: result.globs.map((g) => ({ base: g.base, pattern: g.pattern })), } } // V3 - if (lte(options.oxideVersion, '4.0.0-alpha.30')) { - let scanner = new oxide.Scanner({ + else if (lte(options.oxideVersion, '4.0.0-alpha.30')) { + let scanner = new (oxide.Scanner as OxideV3And4.ScannerConstructor)({ detectSources: { base: options.basePath }, - sources: options.sources, + sources: options.sources.map((g) => ({ base: g.base, pattern: g.pattern })), }) return { files: scanner.files, - globs: scanner.globs, + globs: scanner.globs.map((g) => ({ base: g.base, pattern: g.pattern })), } } // V4 - let scanner = new oxide.Scanner({ - sources: [{ base: options.basePath, pattern: '**/*' }, ...options.sources], - }) + else if (lte(options.oxideVersion, '4.0.9999')) { + let scanner = new (oxide.Scanner as OxideV3And4.ScannerConstructor)({ + sources: [ + { base: options.basePath, pattern: '**/*' }, + ...options.sources.map((g) => ({ base: g.base, pattern: g.pattern })), + ], + }) - return { - files: scanner.files, - globs: scanner.globs, + return { + files: scanner.files, + globs: scanner.globs.map((g) => ({ base: g.base, pattern: g.pattern })), + } + } + + // V5 + else { + let scanner = new (oxide.Scanner as OxideV5.ScannerConstructor)({ + sources: [ + { base: options.basePath, pattern: '**/*', negated: false }, + ...options.sources.map((g) => ({ base: g.base, pattern: g.pattern, negated: g.negated })), + ], + }) + + return { + files: scanner.files, + globs: scanner.globs.map((g) => ({ base: g.base, pattern: g.pattern })), + } } } diff --git a/packages/tailwindcss-language-server/src/project-locator.test.ts b/packages/tailwindcss-language-server/src/project-locator.test.ts index 52af6446..ae3598e5 100644 --- a/packages/tailwindcss-language-server/src/project-locator.test.ts +++ b/packages/tailwindcss-language-server/src/project-locator.test.ts @@ -4,7 +4,7 @@ import { ProjectLocator } from './project-locator' import { URL, fileURLToPath } from 'url' import { Settings } from '@tailwindcss/language-service/src/util/state' import { createResolver } from './resolver' -import { css, defineTest, js, json, scss, Storage, TestUtils } from './testing' +import { css, defineTest, html, js, json, scss, Storage, symlinkTo, TestUtils } from './testing' import { normalizePath } from './utils' let settings: Settings = { @@ -141,58 +141,129 @@ testFixture('v4/workspaces', [ }, ]) -testFixture('v4/auto-content', [ - // - { - config: 'src/app.css', - content: [ - '{URL}/*', - '{URL}/package.json', - '{URL}/src/index.html', - '{URL}/src/components/example.html', - '{URL}/src/**/*.{aspx,astro,cjs,cts,eex,erb,gjs,gts,haml,handlebars,hbs,heex,html,jade,js,jsx,liquid,md,mdx,mjs,mts,mustache,njk,nunjucks,php,pug,py,razor,rb,rhtml,rs,slim,svelte,tpl,ts,tsx,twig,vue}', - ], +testLocator({ + name: 'automatic content detection with Oxide', + fs: { + 'package.json': json` + { + "dependencies": { + "tailwindcss": "^4.0.15", + "@tailwindcss/oxide": "^4.0.15" + } + } + `, + 'src/index.html': html`
Test
`, + 'src/app.css': css` + @import 'tailwindcss'; + `, + 'src/components/example.html': html`
Test
`, }, -]) + expected: [ + { + config: '/src/app.css', + content: [ + '/*', + '/package.json', + '/src/**/*.{aspx,astro,cjs,cts,eex,erb,gjs,gts,haml,handlebars,hbs,heex,html,jade,js,jsx,liquid,md,mdx,mjs,mts,mustache,njk,nunjucks,php,pug,py,razor,rb,rhtml,rs,slim,svelte,tpl,ts,tsx,twig,vue}', + '/src/components/example.html', + '/src/index.html', + ], + }, + ], +}) -testFixture('v4/auto-content-split', [ - { - config: 'src/app.css', - content: [ - '{URL}/*', - '{URL}/package.json', - '{URL}/src/index.html', - '{URL}/src/components/example.html', - '{URL}/src/**/*.{aspx,astro,cjs,cts,eex,erb,gjs,gts,haml,handlebars,hbs,heex,html,jade,js,jsx,liquid,md,mdx,mjs,mts,mustache,njk,nunjucks,php,pug,py,razor,rb,rhtml,rs,slim,svelte,tpl,ts,tsx,twig,vue}', - ], +testLocator({ + name: 'automatic content detection with Oxide using split config', + fs: { + 'package.json': json` + { + "dependencies": { + "tailwindcss": "^4.0.15", + "@tailwindcss/oxide": "^4.0.15" + } + } + `, + 'src/index.html': html`
Test
`, + 'src/app.css': css` + @import 'tailwindcss/preflight' layer(base); + @import 'tailwindcss/theme' layer(theme); + @import 'tailwindcss/utilities' layer(utilities); + `, + 'src/components/example.html': html`
Test
`, }, -]) + expected: [ + { + config: '/src/app.css', + content: [ + '/*', + '/package.json', + '/src/**/*.{aspx,astro,cjs,cts,eex,erb,gjs,gts,haml,handlebars,hbs,heex,html,jade,js,jsx,liquid,md,mdx,mjs,mts,mustache,njk,nunjucks,php,pug,py,razor,rb,rhtml,rs,slim,svelte,tpl,ts,tsx,twig,vue}', + '/src/components/example.html', + '/src/index.html', + ], + }, + ], +}) -testFixture('v4/custom-source', [ - // - { - config: 'admin/app.css', - content: [ - '{URL}/*', - '{URL}/admin/foo.bin', - '{URL}/admin/{**/*.bin,**/*.{aspx,astro,cjs,cts,eex,erb,gjs,gts,haml,handlebars,hbs,heex,html,jade,js,jsx,liquid,md,mdx,mjs,mts,mustache,njk,nunjucks,php,pug,py,razor,rb,rhtml,rs,slim,svelte,tpl,ts,tsx,twig,vue}}', - '{URL}/package.json', - '{URL}/shared.html', - '{URL}/web/**/*.{aspx,astro,cjs,cts,eex,erb,gjs,gts,haml,handlebars,hbs,heex,html,jade,js,jsx,liquid,md,mdx,mjs,mts,mustache,njk,nunjucks,php,pug,py,razor,rb,rhtml,rs,slim,svelte,tpl,ts,tsx,twig,vue}', - ], - }, - { - config: 'web/app.css', - content: [ - '{URL}/*', - '{URL}/admin/**/*.{aspx,astro,cjs,cts,eex,erb,gjs,gts,haml,handlebars,hbs,heex,html,jade,js,jsx,liquid,md,mdx,mjs,mts,mustache,njk,nunjucks,php,pug,py,razor,rb,rhtml,rs,slim,svelte,tpl,ts,tsx,twig,vue}', - '{URL}/package.json', - '{URL}/shared.html', - '{URL}/web/bar.bin', - '{URL}/web/{**/*.{aspx,astro,cjs,cts,eex,erb,gjs,gts,haml,handlebars,hbs,heex,html,jade,js,jsx,liquid,md,mdx,mjs,mts,mustache,njk,nunjucks,php,pug,py,razor,rb,rhtml,rs,slim,svelte,tpl,ts,tsx,twig,vue},*.bin}', - ], +testLocator({ + name: 'automatic content detection with custom sources', + fs: { + 'package.json': json` + { + "dependencies": { + "tailwindcss": "^4.0.15", + "@tailwindcss/oxide": "^4.0.15" + } + } + `, + 'admin/app.css': css` + @import './tw.css'; + @import './ui.css'; + `, + 'admin/tw.css': css` + @import 'tailwindcss'; + @source './**/*.bin'; + `, + 'admin/ui.css': css` + @theme { + --color-potato: #907a70; + } + `, + 'admin/foo.bin': html`

Admin

`, + + 'web/app.css': css` + @import 'tailwindcss'; + @source './*.bin'; + `, + 'web/bar.bin': html`

Web

`, + + 'shared.html': html`

I belong to no one!

`, }, -]) + expected: [ + { + config: '/admin/app.css', + content: [ + '/*', + '/admin/foo.bin', + '/admin/{**/*.bin,**/*.{aspx,astro,cjs,cts,eex,erb,gjs,gts,haml,handlebars,hbs,heex,html,jade,js,jsx,liquid,md,mdx,mjs,mts,mustache,njk,nunjucks,php,pug,py,razor,rb,rhtml,rs,slim,svelte,tpl,ts,tsx,twig,vue}}', + '/package.json', + '/shared.html', + '/web/**/*.{aspx,astro,cjs,cts,eex,erb,gjs,gts,haml,handlebars,hbs,heex,html,jade,js,jsx,liquid,md,mdx,mjs,mts,mustache,njk,nunjucks,php,pug,py,razor,rb,rhtml,rs,slim,svelte,tpl,ts,tsx,twig,vue}', + ], + }, + { + config: '/web/app.css', + content: [ + '/*', + '/admin/**/*.{aspx,astro,cjs,cts,eex,erb,gjs,gts,haml,handlebars,hbs,heex,html,jade,js,jsx,liquid,md,mdx,mjs,mts,mustache,njk,nunjucks,php,pug,py,razor,rb,rhtml,rs,slim,svelte,tpl,ts,tsx,twig,vue}', + '/package.json', + '/shared.html', + '/web/bar.bin', + '/web/{**/*.{aspx,astro,cjs,cts,eex,erb,gjs,gts,haml,handlebars,hbs,heex,html,jade,js,jsx,liquid,md,mdx,mjs,mts,mustache,njk,nunjucks,php,pug,py,razor,rb,rhtml,rs,slim,svelte,tpl,ts,tsx,twig,vue},*.bin}', + ], + }, + ], +}) testFixture('v4/missing-files', [ // diff --git a/packages/tailwindcss-language-server/src/project-locator.ts b/packages/tailwindcss-language-server/src/project-locator.ts index 460b1423..c75ae1de 100644 --- a/packages/tailwindcss-language-server/src/project-locator.ts +++ b/packages/tailwindcss-language-server/src/project-locator.ts @@ -627,12 +627,9 @@ async function* detectContentFiles( resolver: Resolver, ): AsyncIterable { try { - let oxidePath = await resolver.resolveJsId('@tailwindcss/oxide', path.dirname(base)) + let oxidePath = await resolver.resolveJsId('@tailwindcss/oxide', base) oxidePath = pathToFileURL(oxidePath).href - let oxidePackageJsonPath = await resolver.resolveJsId( - '@tailwindcss/oxide/package.json', - path.dirname(base), - ) + let oxidePackageJsonPath = await resolver.resolveJsId('@tailwindcss/oxide/package.json', base) let oxidePackageJson = JSON.parse(await fs.readFile(oxidePackageJsonPath, 'utf8')) let result = await oxide.scan({ diff --git a/packages/tailwindcss-language-server/tests/fixtures/v4/auto-content-split/package-lock.json b/packages/tailwindcss-language-server/tests/fixtures/v4/auto-content-split/package-lock.json deleted file mode 100644 index b829f613..00000000 --- a/packages/tailwindcss-language-server/tests/fixtures/v4/auto-content-split/package-lock.json +++ /dev/null @@ -1,217 +0,0 @@ -{ - "name": "auto-content-split", - "lockfileVersion": 3, - "requires": true, - "packages": { - "": { - "dependencies": { - "@tailwindcss/oxide": "^4.0.15", - "tailwindcss": "^4.0.15" - } - }, - "node_modules/@tailwindcss/oxide": { - "version": "4.0.15", - "resolved": "https://registry.npmjs.org/@tailwindcss/oxide/-/oxide-4.0.15.tgz", - "integrity": "sha512-e0uHrKfPu7JJGMfjwVNyt5M0u+OP8kUmhACwIRlM+JNBuReDVQ63yAD1NWe5DwJtdaHjugNBil76j+ks3zlk6g==", - "license": "MIT", - "engines": { - "node": ">= 10" - }, - "optionalDependencies": { - "@tailwindcss/oxide-android-arm64": "4.0.15", - "@tailwindcss/oxide-darwin-arm64": "4.0.15", - "@tailwindcss/oxide-darwin-x64": "4.0.15", - "@tailwindcss/oxide-freebsd-x64": "4.0.15", - "@tailwindcss/oxide-linux-arm-gnueabihf": "4.0.15", - "@tailwindcss/oxide-linux-arm64-gnu": "4.0.15", - "@tailwindcss/oxide-linux-arm64-musl": "4.0.15", - "@tailwindcss/oxide-linux-x64-gnu": "4.0.15", - "@tailwindcss/oxide-linux-x64-musl": "4.0.15", - "@tailwindcss/oxide-win32-arm64-msvc": "4.0.15", - "@tailwindcss/oxide-win32-x64-msvc": "4.0.15" - } - }, - "node_modules/@tailwindcss/oxide-android-arm64": { - "version": "4.0.15", - "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-android-arm64/-/oxide-android-arm64-4.0.15.tgz", - "integrity": "sha512-EBuyfSKkom7N+CB3A+7c0m4+qzKuiN0WCvzPvj5ZoRu4NlQadg/mthc1tl5k9b5ffRGsbDvP4k21azU4VwVk3Q==", - "cpu": [ - "arm64" - ], - "license": "MIT", - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@tailwindcss/oxide-darwin-arm64": { - "version": "4.0.15", - "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-darwin-arm64/-/oxide-darwin-arm64-4.0.15.tgz", - "integrity": "sha512-ObVAnEpLepMhV9VoO0JSit66jiN5C4YCqW3TflsE9boo2Z7FIjV80RFbgeL2opBhtxbaNEDa6D0/hq/EP03kgQ==", - "cpu": [ - "arm64" - ], - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@tailwindcss/oxide-darwin-x64": { - "version": "4.0.15", - "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-darwin-x64/-/oxide-darwin-x64-4.0.15.tgz", - "integrity": "sha512-IElwoFhUinOr9MyKmGTPNi1Rwdh68JReFgYWibPWTGuevkHkLWKEflZc2jtI5lWZ5U9JjUnUfnY43I4fEXrc4g==", - "cpu": [ - "x64" - ], - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@tailwindcss/oxide-freebsd-x64": { - "version": "4.0.15", - "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-freebsd-x64/-/oxide-freebsd-x64-4.0.15.tgz", - "integrity": "sha512-6BLLqyx7SIYRBOnTZ8wgfXANLJV5TQd3PevRJZp0vn42eO58A2LykRKdvL1qyPfdpmEVtF+uVOEZ4QTMqDRAWA==", - "cpu": [ - "x64" - ], - "license": "MIT", - "optional": true, - "os": [ - "freebsd" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@tailwindcss/oxide-linux-arm-gnueabihf": { - "version": "4.0.15", - "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-arm-gnueabihf/-/oxide-linux-arm-gnueabihf-4.0.15.tgz", - "integrity": "sha512-Zy63EVqO9241Pfg6G0IlRIWyY5vNcWrL5dd2WAKVJZRQVeolXEf1KfjkyeAAlErDj72cnyXObEZjMoPEKHpdNw==", - "cpu": [ - "arm" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@tailwindcss/oxide-linux-arm64-gnu": { - "version": "4.0.15", - "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-arm64-gnu/-/oxide-linux-arm64-gnu-4.0.15.tgz", - "integrity": "sha512-2NemGQeaTbtIp1Z2wyerbVEJZTkAWhMDOhhR5z/zJ75yMNf8yLnE+sAlyf6yGDNr+1RqvWrRhhCFt7i0CIxe4Q==", - "cpu": [ - "arm64" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@tailwindcss/oxide-linux-arm64-musl": { - "version": "4.0.15", - "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-arm64-musl/-/oxide-linux-arm64-musl-4.0.15.tgz", - "integrity": "sha512-342GVnhH/6PkVgKtEzvNVuQ4D+Q7B7qplvuH20Cfz9qEtydG6IQczTZ5IT4JPlh931MG1NUCVxg+CIorr1WJyw==", - "cpu": [ - "arm64" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@tailwindcss/oxide-linux-x64-gnu": { - "version": "4.0.15", - "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-x64-gnu/-/oxide-linux-x64-gnu-4.0.15.tgz", - "integrity": "sha512-g76GxlKH124RuGqacCEFc2nbzRl7bBrlC8qDQMiUABkiifDRHOIUjgKbLNG4RuR9hQAD/MKsqZ7A8L08zsoBrw==", - "cpu": [ - "x64" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@tailwindcss/oxide-linux-x64-musl": { - "version": "4.0.15", - "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-x64-musl/-/oxide-linux-x64-musl-4.0.15.tgz", - "integrity": "sha512-Gg/Y1XrKEvKpq6WeNt2h8rMIKOBj/W3mNa5NMvkQgMC7iO0+UNLrYmt6zgZufht66HozNpn+tJMbbkZ5a3LczA==", - "cpu": [ - "x64" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@tailwindcss/oxide-win32-arm64-msvc": { - "version": "4.0.15", - "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-win32-arm64-msvc/-/oxide-win32-arm64-msvc-4.0.15.tgz", - "integrity": "sha512-7QtSSJwYZ7ZK1phVgcNZpuf7c7gaCj8Wb0xjliligT5qCGCp79OV2n3SJummVZdw4fbTNKUOYMO7m1GinppZyA==", - "cpu": [ - "arm64" - ], - "license": "MIT", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@tailwindcss/oxide-win32-x64-msvc": { - "version": "4.0.15", - "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-win32-x64-msvc/-/oxide-win32-x64-msvc-4.0.15.tgz", - "integrity": "sha512-JQ5H+5MLhOjpgNp6KomouE0ZuKmk3hO5h7/ClMNAQ8gZI2zkli3IH8ZqLbd2DVfXDbdxN2xvooIEeIlkIoSCqw==", - "cpu": [ - "x64" - ], - "license": "MIT", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/tailwindcss": { - "version": "4.0.15", - "resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-4.0.15.tgz", - "integrity": "sha512-6ZMg+hHdMJpjpeCCFasX7K+U615U9D+7k5/cDK/iRwl6GptF24+I/AbKgOnXhVKePzrEyIXutLv36n4cRsq3Sg==", - "license": "MIT" - } - } -} diff --git a/packages/tailwindcss-language-server/tests/fixtures/v4/auto-content-split/package.json b/packages/tailwindcss-language-server/tests/fixtures/v4/auto-content-split/package.json deleted file mode 100644 index 908f1d2f..00000000 --- a/packages/tailwindcss-language-server/tests/fixtures/v4/auto-content-split/package.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "dependencies": { - "tailwindcss": "^4.0.15", - "@tailwindcss/oxide": "^4.0.15" - } -} diff --git a/packages/tailwindcss-language-server/tests/fixtures/v4/auto-content-split/src/app.css b/packages/tailwindcss-language-server/tests/fixtures/v4/auto-content-split/src/app.css deleted file mode 100644 index 7b4dcc31..00000000 --- a/packages/tailwindcss-language-server/tests/fixtures/v4/auto-content-split/src/app.css +++ /dev/null @@ -1,3 +0,0 @@ -@import "tailwindcss/preflight" layer(base); -@import "tailwindcss/theme" layer(theme); -@import "tailwindcss/utilities" layer(utilities); diff --git a/packages/tailwindcss-language-server/tests/fixtures/v4/auto-content-split/src/components/example.html b/packages/tailwindcss-language-server/tests/fixtures/v4/auto-content-split/src/components/example.html deleted file mode 100644 index 788b45c9..00000000 --- a/packages/tailwindcss-language-server/tests/fixtures/v4/auto-content-split/src/components/example.html +++ /dev/null @@ -1 +0,0 @@ -
Test
diff --git a/packages/tailwindcss-language-server/tests/fixtures/v4/auto-content-split/src/index.html b/packages/tailwindcss-language-server/tests/fixtures/v4/auto-content-split/src/index.html deleted file mode 100644 index a108a449..00000000 --- a/packages/tailwindcss-language-server/tests/fixtures/v4/auto-content-split/src/index.html +++ /dev/null @@ -1 +0,0 @@ -
Test
diff --git a/packages/tailwindcss-language-server/tests/fixtures/v4/auto-content/package-lock.json b/packages/tailwindcss-language-server/tests/fixtures/v4/auto-content/package-lock.json deleted file mode 100644 index 6b32300e..00000000 --- a/packages/tailwindcss-language-server/tests/fixtures/v4/auto-content/package-lock.json +++ /dev/null @@ -1,217 +0,0 @@ -{ - "name": "auto-content", - "lockfileVersion": 3, - "requires": true, - "packages": { - "": { - "dependencies": { - "@tailwindcss/oxide": "^4.0.15", - "tailwindcss": "^4.0.15" - } - }, - "node_modules/@tailwindcss/oxide": { - "version": "4.0.15", - "resolved": "https://registry.npmjs.org/@tailwindcss/oxide/-/oxide-4.0.15.tgz", - "integrity": "sha512-e0uHrKfPu7JJGMfjwVNyt5M0u+OP8kUmhACwIRlM+JNBuReDVQ63yAD1NWe5DwJtdaHjugNBil76j+ks3zlk6g==", - "license": "MIT", - "engines": { - "node": ">= 10" - }, - "optionalDependencies": { - "@tailwindcss/oxide-android-arm64": "4.0.15", - "@tailwindcss/oxide-darwin-arm64": "4.0.15", - "@tailwindcss/oxide-darwin-x64": "4.0.15", - "@tailwindcss/oxide-freebsd-x64": "4.0.15", - "@tailwindcss/oxide-linux-arm-gnueabihf": "4.0.15", - "@tailwindcss/oxide-linux-arm64-gnu": "4.0.15", - "@tailwindcss/oxide-linux-arm64-musl": "4.0.15", - "@tailwindcss/oxide-linux-x64-gnu": "4.0.15", - "@tailwindcss/oxide-linux-x64-musl": "4.0.15", - "@tailwindcss/oxide-win32-arm64-msvc": "4.0.15", - "@tailwindcss/oxide-win32-x64-msvc": "4.0.15" - } - }, - "node_modules/@tailwindcss/oxide-android-arm64": { - "version": "4.0.15", - "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-android-arm64/-/oxide-android-arm64-4.0.15.tgz", - "integrity": "sha512-EBuyfSKkom7N+CB3A+7c0m4+qzKuiN0WCvzPvj5ZoRu4NlQadg/mthc1tl5k9b5ffRGsbDvP4k21azU4VwVk3Q==", - "cpu": [ - "arm64" - ], - "license": "MIT", - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@tailwindcss/oxide-darwin-arm64": { - "version": "4.0.15", - "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-darwin-arm64/-/oxide-darwin-arm64-4.0.15.tgz", - "integrity": "sha512-ObVAnEpLepMhV9VoO0JSit66jiN5C4YCqW3TflsE9boo2Z7FIjV80RFbgeL2opBhtxbaNEDa6D0/hq/EP03kgQ==", - "cpu": [ - "arm64" - ], - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@tailwindcss/oxide-darwin-x64": { - "version": "4.0.15", - "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-darwin-x64/-/oxide-darwin-x64-4.0.15.tgz", - "integrity": "sha512-IElwoFhUinOr9MyKmGTPNi1Rwdh68JReFgYWibPWTGuevkHkLWKEflZc2jtI5lWZ5U9JjUnUfnY43I4fEXrc4g==", - "cpu": [ - "x64" - ], - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@tailwindcss/oxide-freebsd-x64": { - "version": "4.0.15", - "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-freebsd-x64/-/oxide-freebsd-x64-4.0.15.tgz", - "integrity": "sha512-6BLLqyx7SIYRBOnTZ8wgfXANLJV5TQd3PevRJZp0vn42eO58A2LykRKdvL1qyPfdpmEVtF+uVOEZ4QTMqDRAWA==", - "cpu": [ - "x64" - ], - "license": "MIT", - "optional": true, - "os": [ - "freebsd" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@tailwindcss/oxide-linux-arm-gnueabihf": { - "version": "4.0.15", - "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-arm-gnueabihf/-/oxide-linux-arm-gnueabihf-4.0.15.tgz", - "integrity": "sha512-Zy63EVqO9241Pfg6G0IlRIWyY5vNcWrL5dd2WAKVJZRQVeolXEf1KfjkyeAAlErDj72cnyXObEZjMoPEKHpdNw==", - "cpu": [ - "arm" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@tailwindcss/oxide-linux-arm64-gnu": { - "version": "4.0.15", - "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-arm64-gnu/-/oxide-linux-arm64-gnu-4.0.15.tgz", - "integrity": "sha512-2NemGQeaTbtIp1Z2wyerbVEJZTkAWhMDOhhR5z/zJ75yMNf8yLnE+sAlyf6yGDNr+1RqvWrRhhCFt7i0CIxe4Q==", - "cpu": [ - "arm64" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@tailwindcss/oxide-linux-arm64-musl": { - "version": "4.0.15", - "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-arm64-musl/-/oxide-linux-arm64-musl-4.0.15.tgz", - "integrity": "sha512-342GVnhH/6PkVgKtEzvNVuQ4D+Q7B7qplvuH20Cfz9qEtydG6IQczTZ5IT4JPlh931MG1NUCVxg+CIorr1WJyw==", - "cpu": [ - "arm64" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@tailwindcss/oxide-linux-x64-gnu": { - "version": "4.0.15", - "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-x64-gnu/-/oxide-linux-x64-gnu-4.0.15.tgz", - "integrity": "sha512-g76GxlKH124RuGqacCEFc2nbzRl7bBrlC8qDQMiUABkiifDRHOIUjgKbLNG4RuR9hQAD/MKsqZ7A8L08zsoBrw==", - "cpu": [ - "x64" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@tailwindcss/oxide-linux-x64-musl": { - "version": "4.0.15", - "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-x64-musl/-/oxide-linux-x64-musl-4.0.15.tgz", - "integrity": "sha512-Gg/Y1XrKEvKpq6WeNt2h8rMIKOBj/W3mNa5NMvkQgMC7iO0+UNLrYmt6zgZufht66HozNpn+tJMbbkZ5a3LczA==", - "cpu": [ - "x64" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@tailwindcss/oxide-win32-arm64-msvc": { - "version": "4.0.15", - "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-win32-arm64-msvc/-/oxide-win32-arm64-msvc-4.0.15.tgz", - "integrity": "sha512-7QtSSJwYZ7ZK1phVgcNZpuf7c7gaCj8Wb0xjliligT5qCGCp79OV2n3SJummVZdw4fbTNKUOYMO7m1GinppZyA==", - "cpu": [ - "arm64" - ], - "license": "MIT", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@tailwindcss/oxide-win32-x64-msvc": { - "version": "4.0.15", - "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-win32-x64-msvc/-/oxide-win32-x64-msvc-4.0.15.tgz", - "integrity": "sha512-JQ5H+5MLhOjpgNp6KomouE0ZuKmk3hO5h7/ClMNAQ8gZI2zkli3IH8ZqLbd2DVfXDbdxN2xvooIEeIlkIoSCqw==", - "cpu": [ - "x64" - ], - "license": "MIT", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/tailwindcss": { - "version": "4.0.15", - "resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-4.0.15.tgz", - "integrity": "sha512-6ZMg+hHdMJpjpeCCFasX7K+U615U9D+7k5/cDK/iRwl6GptF24+I/AbKgOnXhVKePzrEyIXutLv36n4cRsq3Sg==", - "license": "MIT" - } - } -} diff --git a/packages/tailwindcss-language-server/tests/fixtures/v4/auto-content/package.json b/packages/tailwindcss-language-server/tests/fixtures/v4/auto-content/package.json deleted file mode 100644 index 908f1d2f..00000000 --- a/packages/tailwindcss-language-server/tests/fixtures/v4/auto-content/package.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "dependencies": { - "tailwindcss": "^4.0.15", - "@tailwindcss/oxide": "^4.0.15" - } -} diff --git a/packages/tailwindcss-language-server/tests/fixtures/v4/auto-content/src/app.css b/packages/tailwindcss-language-server/tests/fixtures/v4/auto-content/src/app.css deleted file mode 100644 index d4b50785..00000000 --- a/packages/tailwindcss-language-server/tests/fixtures/v4/auto-content/src/app.css +++ /dev/null @@ -1 +0,0 @@ -@import 'tailwindcss'; diff --git a/packages/tailwindcss-language-server/tests/fixtures/v4/auto-content/src/components/example.html b/packages/tailwindcss-language-server/tests/fixtures/v4/auto-content/src/components/example.html deleted file mode 100644 index 788b45c9..00000000 --- a/packages/tailwindcss-language-server/tests/fixtures/v4/auto-content/src/components/example.html +++ /dev/null @@ -1 +0,0 @@ -
Test
diff --git a/packages/tailwindcss-language-server/tests/fixtures/v4/auto-content/src/index.html b/packages/tailwindcss-language-server/tests/fixtures/v4/auto-content/src/index.html deleted file mode 100644 index a108a449..00000000 --- a/packages/tailwindcss-language-server/tests/fixtures/v4/auto-content/src/index.html +++ /dev/null @@ -1 +0,0 @@ -
Test
diff --git a/packages/tailwindcss-language-server/tests/fixtures/v4/custom-source/admin/app.css b/packages/tailwindcss-language-server/tests/fixtures/v4/custom-source/admin/app.css deleted file mode 100644 index 41dcb5f8..00000000 --- a/packages/tailwindcss-language-server/tests/fixtures/v4/custom-source/admin/app.css +++ /dev/null @@ -1,2 +0,0 @@ -@import './tw.css'; -@import './ui.css'; diff --git a/packages/tailwindcss-language-server/tests/fixtures/v4/custom-source/admin/foo.bin b/packages/tailwindcss-language-server/tests/fixtures/v4/custom-source/admin/foo.bin deleted file mode 100644 index ec56c434..00000000 --- a/packages/tailwindcss-language-server/tests/fixtures/v4/custom-source/admin/foo.bin +++ /dev/null @@ -1 +0,0 @@ -

Admin

diff --git a/packages/tailwindcss-language-server/tests/fixtures/v4/custom-source/admin/tw.css b/packages/tailwindcss-language-server/tests/fixtures/v4/custom-source/admin/tw.css deleted file mode 100644 index 9c0a7919..00000000 --- a/packages/tailwindcss-language-server/tests/fixtures/v4/custom-source/admin/tw.css +++ /dev/null @@ -1,2 +0,0 @@ -@import 'tailwindcss'; -@source './**/*.bin'; diff --git a/packages/tailwindcss-language-server/tests/fixtures/v4/custom-source/admin/ui.css b/packages/tailwindcss-language-server/tests/fixtures/v4/custom-source/admin/ui.css deleted file mode 100644 index 24ea64d2..00000000 --- a/packages/tailwindcss-language-server/tests/fixtures/v4/custom-source/admin/ui.css +++ /dev/null @@ -1,3 +0,0 @@ -@theme { - --color-potato: #907a70; -} diff --git a/packages/tailwindcss-language-server/tests/fixtures/v4/custom-source/package-lock.json b/packages/tailwindcss-language-server/tests/fixtures/v4/custom-source/package-lock.json deleted file mode 100644 index ce004f1d..00000000 --- a/packages/tailwindcss-language-server/tests/fixtures/v4/custom-source/package-lock.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "name": "custom-source", - "lockfileVersion": 3, - "requires": true, - "packages": { - "": { - "dependencies": { - "tailwindcss": "^4.0.15" - } - }, - "node_modules/tailwindcss": { - "version": "4.0.15", - "resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-4.0.15.tgz", - "integrity": "sha512-6ZMg+hHdMJpjpeCCFasX7K+U615U9D+7k5/cDK/iRwl6GptF24+I/AbKgOnXhVKePzrEyIXutLv36n4cRsq3Sg==", - "license": "MIT" - } - } -} diff --git a/packages/tailwindcss-language-server/tests/fixtures/v4/custom-source/package.json b/packages/tailwindcss-language-server/tests/fixtures/v4/custom-source/package.json deleted file mode 100644 index b6cb53b1..00000000 --- a/packages/tailwindcss-language-server/tests/fixtures/v4/custom-source/package.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "dependencies": { - "tailwindcss": "^4.0.15" - } -} diff --git a/packages/tailwindcss-language-server/tests/fixtures/v4/custom-source/shared.html b/packages/tailwindcss-language-server/tests/fixtures/v4/custom-source/shared.html deleted file mode 100644 index 49b293bf..00000000 --- a/packages/tailwindcss-language-server/tests/fixtures/v4/custom-source/shared.html +++ /dev/null @@ -1 +0,0 @@ -

I belong to no one!

diff --git a/packages/tailwindcss-language-server/tests/fixtures/v4/custom-source/web/app.css b/packages/tailwindcss-language-server/tests/fixtures/v4/custom-source/web/app.css deleted file mode 100644 index 9357eb02..00000000 --- a/packages/tailwindcss-language-server/tests/fixtures/v4/custom-source/web/app.css +++ /dev/null @@ -1,2 +0,0 @@ -@import 'tailwindcss'; -@source './*.bin'; diff --git a/packages/tailwindcss-language-server/tests/fixtures/v4/custom-source/web/bar.bin b/packages/tailwindcss-language-server/tests/fixtures/v4/custom-source/web/bar.bin deleted file mode 100644 index 56ee61a2..00000000 --- a/packages/tailwindcss-language-server/tests/fixtures/v4/custom-source/web/bar.bin +++ /dev/null @@ -1 +0,0 @@ -

Web