Skip to content

Bump minimum version requirements #1297

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 29 commits into
base: feat/refactor-language-service-usage
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
8ec45eb
Simplify
thecrypticace Mar 31, 2025
08a200d
Refactor
thecrypticace Mar 31, 2025
3091243
Collect offset-based range information
thecrypticace Feb 6, 2025
f5c5020
Refactor language service
thecrypticace Mar 19, 2025
2135ef6
Represent language service diagnostics using the pull model
thecrypticace Apr 13, 2025
9ca3c9a
Add a virtual document abstraction to the language service
thecrypticace Apr 15, 2025
16c13de
Clear document store when settings are updated
thecrypticace Apr 15, 2025
2f7f86f
Refactor document colors provider
thecrypticace Apr 13, 2025
a82103a
Refactor document hover provider
thecrypticace Apr 15, 2025
2220391
Add tests
thecrypticace Apr 14, 2025
10b1e76
Add todos
thecrypticace Apr 15, 2025
0f172a4
Update CI workflow
thecrypticace Apr 15, 2025
4a54e4d
Bump Vitest
thecrypticace Apr 4, 2025
5ee2d47
Add `vite` as an explicit dep
thecrypticace Apr 4, 2025
b4fb5e3
Force inline CSS with a Vite plugin
thecrypticace Apr 3, 2025
856c5ff
Use ESM vitest config
thecrypticace Apr 4, 2025
d32b614
Hide logs unless test fails
thecrypticace Apr 3, 2025
58eb4d7
Bump `vite-tsconfig-paths`
thecrypticace Apr 4, 2025
1bb5bd4
Bump `vscode-*` deps
thecrypticace Apr 3, 2025
1762e34
Bump some more deps
thecrypticace Apr 3, 2025
7162dab
Bump esbuild
thecrypticace Apr 4, 2025
fc26abd
bump
thecrypticace Apr 4, 2025
e4121eb
wip
thecrypticace Apr 4, 2025
a1e7ec0
Bump minimum engine versions
thecrypticace Apr 4, 2025
4f915f5
Update lockfile
thecrypticace Apr 4, 2025
f3ab69e
wip
thecrypticace Apr 6, 2025
66d3731
wip
thecrypticace Apr 15, 2025
c53478c
wip
thecrypticace Apr 15, 2025
9d023a5
update lockfile
thecrypticace Apr 15, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 8 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
strategy:
fail-fast: false
matrix:
node: [18, 20, 22, 23]
node: [20, 22, 23]
os: [ubuntu-latest, macos-latest, windows-latest]

runs-on: ${{ matrix.os }}
Expand All @@ -26,8 +26,11 @@ jobs:
- name: Install dependencies
run: pnpm install

- name: Run tests
- name: Run service tests
working-directory: packages/tailwindcss-language-service
run: pnpm run build && pnpm run test

- name: Run server tests
working-directory: packages/tailwindcss-language-server
run: |
cd packages/tailwindcss-language-server &&
pnpm run build &&
pnpm run test
pnpm run build && pnpm run test
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
"name": "tailwindcss-intellisense",
"private": true,
"devDependencies": {
"@npmcli/package-json": "^5.0.0",
"@types/culori": "^2.1.0",
"@npmcli/package-json": "^5.2.1",
"@types/culori": "^2.1.1",
"culori": "^4.0.1",
"esbuild": "^0.25.0",
"esbuild": "^0.25.2",
"minimist": "^1.2.8",
"prettier": "^3.2.5",
"prettier": "^3.5.3",
"semver": "^7.7.1"
},
"prettier": {
Expand Down
61 changes: 31 additions & 30 deletions packages/tailwindcss-language-server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,27 +44,27 @@
"@parcel/watcher-linux-arm64-glibc": "2.5.1",
"@parcel/watcher-linux-arm64-musl": "2.5.1",
"@tailwindcss/aspect-ratio": "0.4.2",
"@tailwindcss/container-queries": "0.1.0",
"@tailwindcss/forms": "0.5.3",
"@tailwindcss/container-queries": "0.1.1",
"@tailwindcss/forms": "0.5.10",
"@tailwindcss/language-service": "workspace:*",
"@tailwindcss/line-clamp": "0.4.2",
"@tailwindcss/oxide": "^4.1.0",
"@tailwindcss/typography": "0.5.7",
"@types/braces": "3.0.1",
"@types/color-name": "^1.1.3",
"@types/culori": "^2.1.0",
"@tailwindcss/line-clamp": "0.4.4",
"@tailwindcss/oxide": "^4.1.2",
"@tailwindcss/typography": "0.5.16",
"@types/braces": "3.0.5",
"@types/color-name": "^1.1.5",
"@types/culori": "^2.1.1",
"@types/debounce": "1.2.0",
"@types/dlv": "^1.1.4",
"@types/find-up": "^4.0.0",
"@types/dlv": "^1.1.5",
"@types/find-up": "^4.0.2",
"@types/license-checker": "^25.0.6",
"@types/node": "^18.19.33",
"@types/node": "^20.14.8",
"@types/normalize-path": "^3.0.2",
"@types/picomatch": "^2.3.3",
"@types/picomatch": "^2.3.4",
"@types/postcss-import": "^14.0.3",
"@types/stack-trace": "^0.0.33",
"@types/vscode": "1.65.0",
"browserslist": "^4.23.0",
"bun-types": "^1.1.1",
"@types/vscode": "1.90.0",
"browserslist": "^4.24.4",
"bun-types": "^1.2.8",
"chokidar": "3.6.0",
"color-name": "1.1.4",
"culori": "^4.0.1",
Expand All @@ -73,17 +73,17 @@
"deepmerge": "4.2.2",
"dlv": "1.1.3",
"dset": "3.1.4",
"enhanced-resolve": "^5.16.1",
"esbuild": "^0.25.0",
"enhanced-resolve": "^5.18.1",
"esbuild": "^0.25.2",
"find-up": "5.0.0",
"jiti": "^2.3.3",
"jiti": "^2.4.2",
"klona": "2.0.4",
"license-checker": "25.0.1",
"minimist": "^1.2.8",
"normalize-path": "3.0.0",
"picomatch": "^4.0.1",
"picomatch": "^4.0.2",
"pkg-up": "3.1.0",
"postcss": "8.4.31",
"postcss": "^8.5.3",
"postcss-import": "^16.1.0",
"postcss-load-config": "3.0.1",
"postcss-selector-parser": "6.0.2",
Expand All @@ -93,20 +93,21 @@
"tailwindcss": "3.4.17",
"tailwindcss-v4": "npm:[email protected]",
"tinyglobby": "^0.2.12",
"tsconfck": "^3.1.4",
"tsconfck": "^3.1.5",
"tsconfig-paths": "^4.2.0",
"typescript": "5.3.3",
"vite-tsconfig-paths": "^4.3.1",
"vitest": "^3.0.9",
"vscode-css-languageservice": "6.3.3",
"vscode-jsonrpc": "8.2.0",
"vscode-languageclient": "8.1.0",
"vscode-languageserver": "8.1.0",
"typescript": "^5.8.2",
"vite": "^6.2.5",
"vite-tsconfig-paths": "^5.1.4",
"vitest": "^3.1.1",
"vscode-css-languageservice": "6.3.4",
"vscode-jsonrpc": "8.2.1",
"vscode-languageclient": "9.0.1",
"vscode-languageserver": "9.0.1",
"vscode-languageserver-protocol": "^3.17.5",
"vscode-languageserver-textdocument": "1.0.12",
"vscode-uri": "3.0.2"
"vscode-uri": "3.1.0"
},
"engines": {
"node": ">=18.0.0"
"node": ">=20.9.0"
}
}
27 changes: 13 additions & 14 deletions packages/tailwindcss-language-server/src/lsp/diagnosticsProvider.ts
Original file line number Diff line number Diff line change
@@ -1,22 +1,21 @@
import type { TextDocument } from 'vscode-languageserver-textdocument'
import type { State } from '@tailwindcss/language-service/src/util/state'
import { doValidate } from '@tailwindcss/language-service/src/diagnostics/diagnosticsProvider'
import isExcluded from '../util/isExcluded'
import type { LanguageService } from '@tailwindcss/language-service/src/service'

export async function provideDiagnostics(state: State, document: TextDocument) {
if (await isExcluded(state, document)) {
clearDiagnostics(state, document)
} else {
state.editor?.connection.sendDiagnostics({
uri: document.uri,
diagnostics: await doValidate(state, document),
})
}
}
export async function provideDiagnostics(
service: LanguageService,
state: State,
document: TextDocument,
) {
if (!state.enabled) return
let doc = await service.open(document.uri)
let report = await doc?.diagnostics()

// No need to send diagnostics if the document is unchanged
if (report.kind === 'unchanged') return

export function clearDiagnostics(state: State, document: TextDocument): void {
state.editor?.connection.sendDiagnostics({
uri: document.uri,
diagnostics: [],
diagnostics: report?.items ?? [],
})
}
Loading