Skip to content

[pull] master from tailwindlabs:master #148

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

Open
wants to merge 160 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
160 commits
Select commit Hold shift + click to select a range
4c702ac
Fix `classRegex` offset (#846)
bradlc Aug 21, 2023
1fb0019
Add WIP pre-release workflow
bradlc Aug 21, 2023
67eb02e
Fix lerna command scope in workflow
bradlc Aug 21, 2023
fc7e38d
Update workflow
bradlc Aug 21, 2023
ff3eac3
Update workflow
bradlc Aug 21, 2023
ac2f9fa
update workflow
bradlc Aug 21, 2023
d5268fd
Fix language server initialisation outside of VS Code (#803)
atgote Aug 22, 2023
0964dbf
Add basic build instructions (#830)
flostellbrink Aug 22, 2023
bac7e2e
Add tests
bradlc Aug 29, 2023
401a306
Fix recommended variant order linting in Tailwind v2 (#849)
bradlc Aug 29, 2023
e242535
Add test step to pre-release workflow
bradlc Aug 29, 2023
c1c811e
Run `test:prepare` script before running tests
bradlc Aug 29, 2023
31e28e8
Increase v2 test timeout
bradlc Aug 29, 2023
f202bab
Add global test timeout
bradlc Aug 29, 2023
9ccc34d
0.10.0
bradlc Aug 29, 2023
2599da8
Use `move-file-cli` in npm script for compatibility
bradlc Aug 30, 2023
1cc8e62
Add "Sort Selection" command (#851)
bradlc Aug 31, 2023
4bf3af2
Update npm lock files (#853)
Sep 4, 2023
045dc60
Update LICENSE
reinink Sep 20, 2023
d49a90b
Bump `vscode-css-languageservice`
bradlc Sep 26, 2023
d5dbede
Remove unused function
bradlc Sep 28, 2023
909d097
Tidy
bradlc Sep 28, 2023
5f69735
Bump postcss from 8.3.9 to 8.4.31 (#864)
dependabot[bot] Oct 6, 2023
d743b34
Bump postcss in /packages/tailwindcss-language-server (#865)
dependabot[bot] Oct 6, 2023
6ecb001
Bump postcss in /packages/tailwindcss-language-service (#866)
dependabot[bot] Oct 6, 2023
81fcd23
Add prettier config
thecrypticace Oct 11, 2023
61aa8e1
Fix type error
thecrypticace Oct 11, 2023
4f09c88
Update lockfile
thecrypticace Oct 11, 2023
83cd162
0.10.1
thecrypticace Oct 11, 2023
4dd6a7d
Update lockfile
thecrypticace Oct 13, 2023
9b9a98f
Add release script
thecrypticace Oct 13, 2023
a4ca640
Bump @babel/traverse in /packages/tailwindcss-language-service (#869)
dependabot[bot] Oct 17, 2023
3c0f17c
Add support for Glimmer(#867)
IgnaceMaes Oct 18, 2023
19cb859
Upgrade some dependencies (#871)
thecrypticace Oct 20, 2023
5742c36
Change version back
thecrypticace Oct 20, 2023
d6f4ea3
Fix workflows
thecrypticace Oct 20, 2023
ff9a280
Fix tests
thecrypticace Oct 20, 2023
dee6d42
Fix script
thecrypticace Oct 20, 2023
a80a74b
Update contributing guide
thecrypticace Oct 20, 2023
c3f2307
Update lockfile
thecrypticace Oct 20, 2023
3cd88c8
Fix pre-release workflow
thecrypticace Oct 20, 2023
df8857b
Update lockfile version
thecrypticace Oct 20, 2023
3df6999
Tweak build script
thecrypticace Oct 27, 2023
a13708b
Simplify type gen
thecrypticace Oct 27, 2023
2caebd1
Remove duplicate `variant` + `value` pairs from completions (#874)
thecrypticace Oct 27, 2023
c4e3018
Bump language service
thecrypticace Oct 30, 2023
1cd4b48
Change to a scoped package
thecrypticace Oct 30, 2023
dfef6c1
Update lockfile
thecrypticace Oct 30, 2023
ec100b6
Revert "Simplify type gen"
thecrypticace Oct 31, 2023
6eefb57
Bump language service
thecrypticace Oct 31, 2023
38c0e28
Update lockfile
thecrypticace Nov 1, 2023
aa3a050
Bump language server
thecrypticace Nov 1, 2023
4365208
0.10.2
thecrypticace Nov 1, 2023
0b83e8d
0.10.3
thecrypticace Nov 2, 2023
9fabf47
Enable Sort Selection on a remote host (#878)
thecrypticace Nov 9, 2023
6de5173
Bump vite from 4.4.11 to 4.5.1 (#882)
dependabot[bot] Dec 6, 2023
1ac2ec3
Show color decorators in split editors (#888)
thecrypticace Dec 19, 2023
1f7e9e9
Bump bundled version of Tailwind CSS to v3.4 (#889)
thecrypticace Dec 19, 2023
d923f5e
Fix tests
thecrypticace Dec 21, 2023
4c4d37a
Update changelog
thecrypticace Dec 21, 2023
3a46554
0.10.4
thecrypticace Dec 21, 2023
6045dc1
Bump language server version
thecrypticace Jan 3, 2024
9b300e4
Bump bundled Tailwind CSS to v3.4.1 (#898)
thecrypticace Jan 5, 2024
3b88d1d
0.10.5
thecrypticace Jan 5, 2024
d19cb81
Bump language server version
thecrypticace Jan 5, 2024
1f1b443
Fix crash when class regex matches an empty string (#897)
thecrypticace Jan 17, 2024
81b71ca
Bump vite from 5.0.11 to 5.0.12 (#901)
dependabot[bot] Jan 22, 2024
8d22df1
Fix Typescript bug
thecrypticace Jan 29, 2024
6772f50
Add preliminary support for v4 (#917)
thecrypticace Mar 5, 2024
2c16b01
Update v4 version
thecrypticace Mar 5, 2024
8f29a96
Disable CSS optimization temporarily
thecrypticace Mar 5, 2024
e389e3e
tweak formatting
thecrypticace Mar 5, 2024
dc6216f
Don’t use prettier to reformat CSS
thecrypticace Mar 5, 2024
74aad3d
wip
thecrypticace Mar 5, 2024
78b8ca4
Fix formatting
thecrypticace Mar 5, 2024
9ee88a2
Fix formatting
thecrypticace Mar 5, 2024
fd42dac
Don’t boot project when using Tailwind v4 with a config.js file
thecrypticace Mar 5, 2024
e871015
Remove old version check
thecrypticace Mar 5, 2024
c3c1755
Remove custom AST pretty printer
thecrypticace Mar 5, 2024
678d42f
Cleanup types a bit
thecrypticace Mar 5, 2024
c67c85f
Update tests
thecrypticace Mar 5, 2024
8764dc0
Perform a soft reload of some project state when editing theme files …
thecrypticace Mar 5, 2024
8781aa9
Revert "Update tests"
thecrypticace Mar 5, 2024
7c6cf45
Fix version check for alpha
thecrypticace Mar 5, 2024
5f91f5c
Update fixtures
thecrypticace Mar 5, 2024
ff6ad9b
Fix
thecrypticace Mar 5, 2024
c3bbd2f
Fix loading of ESM and TypeScript configs
thecrypticace Mar 7, 2024
4b46fc5
Add color format options (rgb, hex) (#831)
flostellbrink Mar 11, 2024
8285ebc
Fix project loading on Windows
thecrypticace Mar 12, 2024
948d520
Cleanup code a bit and fix some type errors (#922)
thecrypticace Mar 13, 2024
02c9e89
Fix type error
thecrypticace Mar 13, 2024
65f162b
Remove implicit node dep from the language service
thecrypticace Mar 13, 2024
81bfb90
Bump language service version
thecrypticace Mar 13, 2024
e191eb5
Support Astro's `class:list` attribute by default (#890)
yuheiy Mar 21, 2024
f7534ae
Fix hovers and conflicts in Vue `<style lang="sass">` blocks (#930)
thecrypticace Mar 22, 2024
381d70a
Add support for `<script type=“text/babel”>` (#932)
thecrypticace Mar 22, 2024
37c4b96
Show pixel equivalents in completions and hovers of the `theme()` hel…
thecrypticace Mar 26, 2024
cf97d7a
Handle `style` exports condition when processing `@import`s (#934)
thecrypticace Mar 26, 2024
ecce42b
Highlight `@theme` contents as a rule list (#937)
thecrypticace Mar 26, 2024
745c3ab
Show color decorators for `oklab` and `oklch` colors (#936)
thecrypticace Mar 27, 2024
67ebfa4
Update fallback version of Tailwind to `v3.4.2` (#938)
thecrypticace Mar 27, 2024
d25652b
Run prettier
thecrypticace Mar 29, 2024
48056f2
Fix errors thrown by detecting content files with oxide (#945)
hampustagerud Apr 4, 2024
551378c
Update deps
thecrypticace Apr 4, 2024
daa8bb2
Make test deterministic across filesystems
thecrypticace Apr 4, 2024
7f503d5
Don't break when generating rules produces an error (#954)
thecrypticace Apr 15, 2024
830dc0a
Add support for initializing when using `workspaceFolders` (#955)
thecrypticace Apr 16, 2024
273f6c0
Don’t throw when reading CSS file that might not exist (#956)
thecrypticace Apr 19, 2024
9d7006d
Use one server to handle all folders in a workspace (#957)
thecrypticace Apr 24, 2024
086ffff
Fix v4 theme reloading on Windows (#960)
thecrypticace May 2, 2024
396f3d3
Add setting for LSP tracing
thecrypticace May 17, 2024
b715097
Fix spacing
thecrypticace May 17, 2024
bbd7b5b
Show color decorators when utility has an opacity modifier in v4 (#969)
thecrypticace May 29, 2024
f029cf2
chore: bump enhanced-resolve version (#971)
43081j May 29, 2024
28cefbf
Bump minimum supported Node version to v18 (#978)
thecrypticace Jun 4, 2024
ff094cf
feat: remove is-builtin-module dependency (#970)
43081j Jun 4, 2024
73843f5
Bump braces from 3.0.2 to 3.0.3 (#979)
dependabot[bot] Jun 17, 2024
d561031
Fallback to global settings when requests for folder settings fail (#…
thecrypticace Jun 18, 2024
bb72017
Pass URI to configuration call not a file path (#982)
thecrypticace Jun 18, 2024
b39c8e0
Fix handling of added workspaces
thecrypticace Jun 18, 2024
2888047
Bump ws from 8.14.2 to 8.17.1 (#983)
dependabot[bot] Jun 18, 2024
3d0673b
Update changelog
thecrypticace Jun 22, 2024
e79550d
Tweak wording in changelog
thecrypticace Jun 24, 2024
d506235
Link PRs and commits in changelog
thecrypticace Jun 24, 2024
b2f8eee
Remove images from changelog
thecrypticace Jun 24, 2024
320e544
Bump bundled version of `tailwindcss` to `v3.4.4` (#987)
thecrypticace Jun 24, 2024
14c21a5
Update lockfiles
thecrypticace Jun 24, 2024
ea974b9
Update tests
thecrypticace Jun 24, 2024
3d15842
0.12.0
thecrypticace Jun 24, 2024
4d369f4
Bump language service version
thecrypticace Jun 24, 2024
c61f4c9
Bump language server version
thecrypticace Jun 24, 2024
52858d5
Normalize drive letter in file path (#980)
xt0rted Jun 25, 2024
77b65a9
0.12.1
thecrypticace Jun 25, 2024
486c239
Bump language server version
thecrypticace Jun 25, 2024
405502b
Fix loading projects on Windows network drives (#996)
thecrypticace Jun 26, 2024
413f4f1
Fix server not launching on older versions of VSCode (#998)
thecrypticace Jun 27, 2024
28c63d1
0.12.2
thecrypticace Jun 27, 2024
9a8ce41
Add logs and tweak detecting projects for documents (#999)
thecrypticace Jun 28, 2024
cb62a7f
Add one more log
thecrypticace Jun 28, 2024
aaa3b70
Normalize Windows drive letters in more places (#1001)
thecrypticace Jun 28, 2024
7555415
Cleanup some logging
thecrypticace Jun 29, 2024
567f71f
Update changelog
thecrypticace Jun 29, 2024
8df1bde
0.12.3
thecrypticace Jun 29, 2024
8fa5acb
Refactor
thecrypticace Jun 30, 2024
eb6e760
Add logs
thecrypticace Jul 1, 2024
b8ba251
Tweak class regex failure logs
thecrypticace Jun 30, 2024
2c981a3
Fix detection of v3 insiders builds (#1007)
thecrypticace Jul 2, 2024
f4b0e54
Make sure language specific settings are passed to the language serve…
thecrypticace Jul 2, 2024
a094787
Fix initialization when path has parentheses (#1009)
thecrypticace Jul 2, 2024
c27164b
Remove log
thecrypticace Jul 3, 2024
908ddd2
0.12.4
thecrypticace Jul 3, 2024
d9eaeb8
Bump language server version
thecrypticace Jul 3, 2024
cc2bb07
Use paths relative to opened folder when searching for projects (#1013)
thecrypticace Jul 5, 2024
fdb0df2
0.12.5
thecrypticace Jul 5, 2024
c91a63e
Bump language server version
thecrypticace Jul 5, 2024
abb0f9f
Merge user languages from initialization options and include language…
thecrypticace Jul 10, 2024
a0b6cc1
Bump language server version
thecrypticace Jul 12, 2024
e92420d
Tweak test
thecrypticace Jul 12, 2024
a6a29da
Add more tests
thecrypticace Jul 12, 2024
82f152d
Migrate to `pnpm` (#1029)
philipp-spiess Aug 6, 2024
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
18 changes: 18 additions & 0 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Contributing

Thanks for your interest in contributing to Tailwind CSS IntelliSense! Please take a moment to review this document **before submitting a pull request**.

## Pull requests

**Please ask first before starting work on any significant new features.**

It's never a fun experience to have your pull request declined after investing a lot of time and effort into a new feature. To avoid this from happening, we request that contributors create [a feature request](https://github.com/tailwindlabs/tailwindcss/discussions/new?category=ideas) to first discuss any significant new ideas.

## Building the Extension

You can build the VSIX package by running these commands in the project root.

```bash
pnpm install
pnpx run package --workspace=packages/vscode-tailwindcss
```
49 changes: 49 additions & 0 deletions .github/workflows/bump-version.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
import PackageJson from '@npmcli/package-json'
import assert from 'node:assert'
import semver from 'semver'

let res = await fetch('https://marketplace.visualstudio.com/_apis/public/gallery/extensionquery', {
method: 'POST',
headers: {
accept: 'application/json;api-version=7.2-preview.1;excludeUrls=true',
'content-type': 'application/json',
},
body: JSON.stringify({
assetTypes: null,
flags: 2151,
filters: [
{
criteria: [{ filterType: 7, value: 'bradlc.vscode-tailwindcss' }],
direction: 2,
pageSize: 100,
pageNumber: 1,
sortBy: 0,
sortOrder: 0,
pagingToken: null,
},
],
}),
})

let { results } = await res.json()

/** @type {string[]} */
let versions = results[0].extensions[0].versions.map(({ version }) => version)

// Determine the latest version of the extension
let latest = versions
.map((v) => semver.parse(v, { includePrerelease: true, loose: false }))
.filter((v) => v !== null)
.filter((v) => v.prerelease.length === 0)
.sort((a, b) => b.compare(a) || b.compareBuild(a))
.at(0)

// Require the minor version to be odd. This is done because
// the VSCode Marketplace suggests using odd numbers for
// pre-release builds and even ones for release builds
assert(latest && latest.minor % 2 === 1)

// Bump the patch version in `package.json`
let nextVersion = latest.inc('patch').format()
let pkg = await PackageJson.load('packages/vscode-tailwindcss')
await pkg.update({ version: nextVersion }).save()
32 changes: 32 additions & 0 deletions .github/workflows/manual-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Publish Release
concurrency: publish
on:
workflow_dispatch: {}

jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v3
with:
version: ^9.6.0
- uses: actions/setup-node@v3
with:
node-version: 18
registry-url: 'https://registry.npmjs.org'
cache: 'pnpm'
- name: Install dependencies
run: pnpm install
- name: Run tests
run: >
cd packages/tailwindcss-language-server &&
pnpm run build &&
pnpm run test:prepare &&
pnpm test
- name: Publish IntelliSense
env:
VSCODE_TOKEN: ${{ secrets.VSCODE_TOKEN }}
run: >
cd packages/vscode-tailwindcss &&
pnpm run publish -p $VSCODE_TOKEN
51 changes: 51 additions & 0 deletions .github/workflows/pre-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Publish pre-release
concurrency: publish
on:
push:
branches: [master]
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v3
with:
version: ^9.6.0
- uses: actions/setup-node@v3
with:
node-version: 18
registry-url: 'https://registry.npmjs.org'
cache: 'pnpm'
- name: Install dependencies
run: pnpm install
- name: Run tests
run: >
cd packages/tailwindcss-language-server &&
pnpm run build &&
pnpm run test:prepare &&
pnpm test
- name: Bump IntelliSense version
run: >
node .github/workflows/bump-version.mjs &&
cat packages/vscode-tailwindcss/package.json
- name: Publish IntelliSense
env:
VSCODE_TOKEN: ${{ secrets.VSCODE_TOKEN }}
run: >
cd packages/vscode-tailwindcss &&
pnpm run publish --pre-release -p $VSCODE_TOKEN
- name: Build LSP
run: pnpm run build --workspace=packages/tailwindcss-language-server
- name: Resolve LSP version
run: |
echo "SHA_SHORT=$(git rev-parse --short HEAD)" >> $GITHUB_ENV
- name: 'Version LSP based on commit: 0.0.0-insiders.${{ env.SHA_SHORT }}'
run: >
cd packages/tailwindcss-language-server &&
pnpm version 0.0.0-insiders.${{ env.SHA_SHORT }} --force --no-git-tag-version
- name: Publish LSP
run: >
cd packages/tailwindcss-language-server &&
pnpm publish --tag insiders --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
2 changes: 2 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
packages/*/dist
packages/*/bin
74 changes: 37 additions & 37 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -1,37 +1,37 @@
{
"version": "0.2.0",
// List of configurations. Add new configurations or edit existing ones.
"configurations": [
{
"type": "extensionHost",
"request": "launch",
"name": "Launch Client",
"runtimeExecutable": "${execPath}",
"args": ["--extensionDevelopmentPath=${workspaceRoot}/packages/vscode-tailwindcss"],
"stopOnEntry": false,
"sourceMaps": true,
"outFiles": ["${workspaceRoot}/packages/vscode-tailwindcss/dist/**/*.js"]
// "preLaunchTask": "npm: dev"
},
{
"type": "node",
"request": "attach",
"name": "Attach to Server 6011",
"address": "localhost",
"protocol": "inspector",
"port": 6011,
"sourceMaps": true,
"outFiles": ["${workspaceRoot}/packages/vscode-tailwindcss/dist/**/*.js"]
},
{
"type": "node",
"request": "attach",
"name": "Attach to Server 6012",
"address": "localhost",
"protocol": "inspector",
"port": 6012,
"sourceMaps": true,
"outFiles": ["${workspaceRoot}/packages/vscode-tailwindcss/dist/**/*.js"]
}
]
}
{
"version": "0.2.0",
// List of configurations. Add new configurations or edit existing ones.
"configurations": [
{
"type": "extensionHost",
"request": "launch",
"name": "Launch Client",
"runtimeExecutable": "${execPath}",
"args": ["--extensionDevelopmentPath=${workspaceRoot}/packages/vscode-tailwindcss"],
"stopOnEntry": false,
"sourceMaps": true,
"outFiles": ["${workspaceRoot}/packages/vscode-tailwindcss/dist/**/*.js"],
"preLaunchTask": "npm: dev"
},
{
"type": "node",
"request": "attach",
"name": "Attach to Server 6011",
"address": "localhost",
"protocol": "inspector",
"port": 6011,
"sourceMaps": true,
"outFiles": ["${workspaceRoot}/packages/vscode-tailwindcss/dist/**/*.js"]
},
{
"type": "node",
"request": "attach",
"name": "Attach to Server 6012",
"address": "localhost",
"protocol": "inspector",
"port": 6012,
"sourceMaps": true,
"outFiles": ["${workspaceRoot}/packages/vscode-tailwindcss/dist/**/*.js"]
}
]
}
58 changes: 29 additions & 29 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -1,29 +1,29 @@
{
"version": "2.0.0",
"tasks": [
{
"type": "npm",
"script": "build",
"group": "build",
"presentation": {
"panel": "dedicated",
"reveal": "never"
},
"problemMatcher": ["$tsc"]
},
{
"type": "npm",
"script": "dev",
"isBackground": true,
"group": {
"kind": "build",
"isDefault": true
},
"presentation": {
"panel": "dedicated",
"reveal": "never"
},
"problemMatcher": ["$tsc-watch"]
}
]
}
{
"version": "2.0.0",
"tasks": [
{
"type": "npm",
"script": "build",
"group": "build",
"presentation": {
"panel": "dedicated",
"reveal": "never"
},
"problemMatcher": ["$tsc"]
},
{
"type": "npm",
"script": "dev",
"isBackground": true,
"group": {
"kind": "build",
"isDefault": true
},
"presentation": {
"panel": "dedicated",
"reveal": "never"
},
"problemMatcher": ["$tsc-watch"]
}
]
}
31 changes: 21 additions & 10 deletions esbuild.js → esbuild.mjs
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
const esbuild = require('esbuild')
const path = require('path')
const fs = require('fs')
const mri = require('mri')
import esbuild from 'esbuild'
import fs from 'fs'
import { createRequire } from 'module'
import minimist from 'minimist'

const resolve = (...args) => path.resolve(__dirname, ...args)
const require = createRequire(import.meta.url)

const args = mri(process.argv.slice(2), {
const args = minimist(process.argv.slice(2), {
boolean: ['watch', 'minify'],
string: ['outfile', 'outdir', 'external'],
string: ['outfile', 'outdir'],
})

esbuild.build({
console.log('- Preparing')
let ctx = await esbuild.context({
entryPoints: args._,
bundle: true,
platform: 'node',
external: [].concat(args.external),
external: ['pnpapi', 'vscode', 'lightningcss', '@tailwindcss/oxide'],
format: 'cjs',
outdir: args.outdir,
outfile: args.outfile,
watch: args.watch,
minify: args.minify,
plugins: [
{
Expand Down Expand Up @@ -74,3 +74,14 @@ esbuild.build({
},
],
})

console.log('- Building')
await ctx.rebuild()

if (args.watch) {
console.log('- Watching')
await ctx.watch()
} else {
console.log('- Cleaning up')
await ctx.dispose()
}
4 changes: 0 additions & 4 deletions lerna.json

This file was deleted.

Loading