Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@justinfagnani
Copy link
Collaborator

@justinfagnani justinfagnani commented Oct 22, 2024

Mostly a bunch of infrastructure work and the initial rule for the LanguageService.

The rule setup is extremely minimal. There's no rule interface, no configuration support - just one ad-hoc rule instance to show where things would go when their fleshed out, and how the template parser can initially be used.

Rules should eventually live in another package that's also accessible by the linter. It's just easiest to build them in the tsserver plugin for now.

I do some tricks to write our language service as a class that extends the typescript language service. It's a little overkill, but I like being about to write it as a class. I also load JS modules, which makes loading async. This works in VS Code, and only requires a small trick to get it working in tests. The TypeScript teams says that already have async plugin loading workin on the web and they just need to get to it for Node, so the hack will be able to away. It can also go away with require(esm) support that is rolling out in Node.

Based on #4267, so that should go in first.

@changeset-bot
Copy link

changeset-bot bot commented Oct 22, 2024

⚠️ No Changeset found

Latest commit: 4ef1933

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@github-actions
Copy link
Contributor

github-actions bot commented Oct 22, 2024

📊 Tachometer Benchmark Results

Summary

nop-update

  • this-change, tip-of-tree, previous-release: unsure 🔍 -6% - +8% (-0.78ms - +0.95ms)
    this-change vs tip-of-tree

render

  • this-change: 43.38ms - 51.68ms
  • this-change, tip-of-tree, previous-release: slower ❌ 0% - 9% (0.02ms - 1.74ms)
    this-change vs tip-of-tree
  • this-change, tip-of-tree, previous-release: unsure 🔍 -2% - +3% (-0.57ms - +1.05ms)
    this-change vs tip-of-tree
  • this-change, tip-of-tree, previous-release: unsure 🔍 -30% - +19% (-16.04ms - +10.22ms)
    this-change vs tip-of-tree

update

  • this-change: 502.15ms - 513.44ms
  • this-change, tip-of-tree, previous-release: unsure 🔍 -7% - +5% (-2.97ms - +2.01ms)
    this-change vs tip-of-tree
  • this-change, tip-of-tree, previous-release: unsure 🔍 -1% - +3% (-0.94ms - +2.57ms)
    this-change vs tip-of-tree
  • this-change, tip-of-tree, previous-release: unsure 🔍 -1% - +1% (-6.83ms - +6.29ms)
    this-change vs tip-of-tree

update-reflect

  • this-change: 486.59ms - 496.13ms
  • this-change, tip-of-tree, previous-release: unsure 🔍 -2% - +1% (-10.05ms - +4.86ms)
    this-change vs tip-of-tree

Results

this-change

render

VersionAvg timevs
43.38ms - 51.68ms-

update

VersionAvg timevs
502.15ms - 513.44ms-

update-reflect

VersionAvg timevs
486.59ms - 496.13ms-
this-change, tip-of-tree, previous-release

render

VersionAvg timevs this-change
vs tip-of-tree
tip-of-tree
vs previous-release
previous-release
this-change
20.57ms - 21.92ms-slower ❌
0% - 9%
0.02ms - 1.74ms
unsure 🔍
-2% - +6%
-0.45ms - +1.26ms
tip-of-tree
tip-of-tree
19.83ms - 20.91msfaster ✔
0% - 8%
0.02ms - 1.74ms
-unsure 🔍
-6% - +1%
-1.23ms - +0.28ms
previous-release
previous-release
20.31ms - 21.37msunsure 🔍
-6% - +2%
-1.26ms - +0.45ms
unsure 🔍
-1% - +6%
-0.28ms - +1.23ms
-

update

VersionAvg timevs this-change
vs tip-of-tree
tip-of-tree
vs previous-release
previous-release
this-change
39.79ms - 43.41ms-unsure 🔍
-7% - +5%
-2.97ms - +2.01ms
unsure 🔍
-4% - +6%
-1.78ms - +2.65ms
tip-of-tree
tip-of-tree
40.37ms - 43.79msunsure 🔍
-5% - +7%
-2.01ms - +2.97ms
-unsure 🔍
-3% - +7%
-1.22ms - +3.05ms
previous-release
previous-release
39.89ms - 42.44msunsure 🔍
-6% - +4%
-2.65ms - +1.78ms
unsure 🔍
-7% - +3%
-3.05ms - +1.22ms
-

nop-update

VersionAvg timevs this-change
vs tip-of-tree
tip-of-tree
vs previous-release
previous-release
this-change
11.69ms - 13.06ms-unsure 🔍
-6% - +8%
-0.78ms - +0.95ms
unsure 🔍
-3% - +11%
-0.30ms - +1.32ms
tip-of-tree
tip-of-tree
11.76ms - 12.82msunsure 🔍
-8% - +6%
-0.95ms - +0.78ms
-unsure 🔍
-2% - +9%
-0.26ms - +1.11ms
previous-release
previous-release
11.42ms - 12.30msunsure 🔍
-11% - +2%
-1.32ms - +0.30ms
unsure 🔍
-9% - +2%
-1.11ms - +0.26ms
-
this-change, tip-of-tree, previous-release

render

VersionAvg timevs this-change
vs tip-of-tree
tip-of-tree
vs previous-release
previous-release
this-change
36.90ms - 38.09ms-unsure 🔍
-2% - +3%
-0.57ms - +1.05ms
unsure 🔍
-2% - +2%
-0.77ms - +0.87ms
tip-of-tree
tip-of-tree
36.70ms - 37.81msunsure 🔍
-3% - +2%
-1.05ms - +0.57ms
-unsure 🔍
-3% - +2%
-0.98ms - +0.60ms
previous-release
previous-release
36.88ms - 38.01msunsure 🔍
-2% - +2%
-0.87ms - +0.77ms
unsure 🔍
-2% - +3%
-0.60ms - +0.98ms
-

update

VersionAvg timevs this-change
vs tip-of-tree
tip-of-tree
vs previous-release
previous-release
this-change
82.22ms - 84.79ms-unsure 🔍
-1% - +3%
-0.94ms - +2.57ms
unsure 🔍
-2% - +2%
-2.02ms - +1.88ms
tip-of-tree
tip-of-tree
81.49ms - 83.88msunsure 🔍
-3% - +1%
-2.57ms - +0.94ms
-unsure 🔍
-3% - +1%
-2.78ms - +1.00ms
previous-release
previous-release
82.11ms - 85.04msunsure 🔍
-2% - +2%
-1.88ms - +2.02ms
unsure 🔍
-1% - +3%
-1.00ms - +2.78ms
-
this-change, tip-of-tree, previous-release

render

VersionAvg timevs this-change
vs tip-of-tree
tip-of-tree
vs previous-release
previous-release
this-change
39.51ms - 57.60ms-unsure 🔍
-30% - +19%
-16.04ms - +10.22ms
unsure 🔍
-36% - +10%
-20.83ms - +6.31ms
tip-of-tree
tip-of-tree
41.95ms - 60.98msunsure 🔍
-22% - +34%
-10.22ms - +16.04ms
-unsure 🔍
-32% - +16%
-18.23ms - +9.54ms
previous-release
previous-release
45.70ms - 65.92msunsure 🔍
-15% - +45%
-6.31ms - +20.83ms
unsure 🔍
-20% - +37%
-9.54ms - +18.23ms
-

update

VersionAvg timevs this-change
vs tip-of-tree
tip-of-tree
vs previous-release
previous-release
this-change
499.64ms - 509.36ms-unsure 🔍
-1% - +1%
-6.83ms - +6.29ms
unsure 🔍
-1% - +2%
-5.08ms - +8.82ms
tip-of-tree
tip-of-tree
500.37ms - 509.17msunsure 🔍
-1% - +1%
-6.29ms - +6.83ms
-unsure 🔍
-1% - +2%
-4.50ms - +8.78ms
previous-release
previous-release
497.66ms - 507.59msunsure 🔍
-2% - +1%
-8.82ms - +5.08ms
unsure 🔍
-2% - +1%
-8.78ms - +4.50ms
-

update-reflect

VersionAvg timevs this-change
vs tip-of-tree
tip-of-tree
vs previous-release
previous-release
this-change
504.55ms - 513.10ms-unsure 🔍
-2% - +1%
-10.05ms - +4.86ms
unsure 🔍
-1% - +1%
-5.16ms - +7.21ms
tip-of-tree
tip-of-tree
505.31ms - 517.52msunsure 🔍
-1% - +2%
-4.86ms - +10.05ms
-unsure 🔍
-1% - +2%
-3.94ms - +11.18ms
previous-release
previous-release
503.33ms - 512.26msunsure 🔍
-1% - +1%
-7.21ms - +5.16ms
unsure 🔍
-2% - +1%
-11.18ms - +3.94ms
-

tachometer-reporter-action v2 for Benchmarks

@github-actions
Copy link
Contributor

The size of lit-html.js and lit-core.min.js are as expected.

Base automatically changed from analyzer-template-2 to main August 22, 2025 03:46
@justinfagnani justinfagnani merged commit f570059 into main Aug 22, 2025
10 checks passed
@justinfagnani justinfagnani deleted the tsserver-plugin-next branch August 22, 2025 17:48
@lit-robot lit-robot mentioned this pull request Dec 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants