Skip to content
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

[labs/eleventy-plugin-lit] Use file URLs for resolved module paths #3203

Merged
merged 2 commits into from Aug 6, 2022

Conversation

augustjk
Copy link
Member

@augustjk augustjk commented Aug 6, 2022

Fixes #3059

Due to module file paths having C:\ for Windows, the imports fail due to unrecognized protocol. Converting them to file URLs fixes that.

Note:
This makes eleventy-plugin-lit now work in worker (default) mode for Windows users.
In vm mode, it still breaks due to an issue with ModuleLoader noted here #3202

I was also unable run the eleventy-plugin-lit package test suite in Windows as the testing rig has issues somewhere with the filesystem symlinking, writing, reading.

I did, however, manually test it by running the example eleventy project on a Windows machine and confirmed worker mode runs.

@changeset-bot
Copy link

changeset-bot bot commented Aug 6, 2022

🦋 Changeset detected

Latest commit: 31e99b1

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@lit-labs/eleventy-plugin-lit Patch

Not sure what this means? Click here to learn what changesets are.

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

@github-actions
Copy link
Contributor

github-actions bot commented Aug 6, 2022

📊 Tachometer Benchmark Results

Summary

nop-update

  • lit-html-kitchen-sink: unsure 🔍 -6% - +1% (-2.04ms - +0.36ms)
    this-change vs tip-of-tree

render

  • lit-element-list: 91.43ms - 97.02ms
  • lit-html-kitchen-sink: unsure 🔍 -1% - +4% (-0.41ms - +1.43ms)
    this-change vs tip-of-tree
  • lit-html-repeat: unsure 🔍 -6% - +3% (-0.74ms - +0.38ms)
    this-change vs tip-of-tree
  • lit-html-template-heavy: unsure 🔍 -1% - +3% (-0.90ms - +2.14ms)
    this-change vs tip-of-tree
  • reactive-element-list: unsure 🔍 -3% - +1% (-2.07ms - +0.81ms)
    this-change vs tip-of-tree

update

  • lit-element-list: 985.12ms - 1002.13ms
  • lit-html-kitchen-sink: unsure 🔍 -3% - +3% (-3.31ms - +2.89ms)
    this-change vs tip-of-tree
  • lit-html-repeat: unsure 🔍 -0% - +3% (-1.56ms - +11.03ms)
    this-change vs tip-of-tree
  • lit-html-template-heavy: unsure 🔍 -2% - +2% (-3.45ms - +3.41ms)
    this-change vs tip-of-tree
  • reactive-element-list: slower ❌ 0% - 2% (0.66ms - 20.89ms)
    this-change vs tip-of-tree

update-reflect

  • lit-element-list: 985.65ms - 1001.48ms
  • reactive-element-list: unsure 🔍 -4% - +0% (-46.07ms - +2.62ms)
    this-change vs tip-of-tree

Results

lit-element-list

render

VersionAvg timevs
91.43ms - 97.02ms-

update

VersionAvg timevs
985.12ms - 1002.13ms-

update-reflect

VersionAvg timevs
985.65ms - 1001.48ms-
lit-html-kitchen-sink

render

VersionAvg timevs this-change
vs tip-of-tree
tip-of-tree
vs previous-release
previous-release
this-change
35.20ms - 36.83ms-unsure 🔍
-1% - +4%
-0.41ms - +1.43ms
unsure 🔍
-5% - +4%
-1.80ms - +1.50ms
tip-of-tree
tip-of-tree
35.09ms - 35.93msunsure 🔍
-4% - +1%
-1.43ms - +0.41ms
-unsure 🔍
-6% - +2%
-2.15ms - +0.84ms
previous-release
previous-release
34.73ms - 37.60msunsure 🔍
-4% - +5%
-1.50ms - +1.80ms
unsure 🔍
-2% - +6%
-0.84ms - +2.15ms
-

update

VersionAvg timevs this-change
vs tip-of-tree
tip-of-tree
vs previous-release
previous-release
this-change
101.36ms - 105.35ms-unsure 🔍
-3% - +3%
-3.31ms - +2.89ms
unsure 🔍
-3% - +4%
-2.92ms - +3.67ms
tip-of-tree
tip-of-tree
101.20ms - 105.94msunsure 🔍
-3% - +3%
-2.89ms - +3.31ms
-unsure 🔍
-3% - +4%
-2.95ms - +4.12ms
previous-release
previous-release
100.36ms - 105.60msunsure 🔍
-4% - +3%
-3.67ms - +2.92ms
unsure 🔍
-4% - +3%
-4.12ms - +2.95ms
-

nop-update

VersionAvg timevs this-change
vs tip-of-tree
tip-of-tree
vs previous-release
previous-release
this-change
30.52ms - 31.70ms-unsure 🔍
-6% - +1%
-2.04ms - +0.36ms
unsure 🔍
-3% - +2%
-1.10ms - +0.61ms
tip-of-tree
tip-of-tree
30.91ms - 32.99msunsure 🔍
-1% - +7%
-0.36ms - +2.04ms
-unsure 🔍
-2% - +6%
-0.62ms - +1.81ms
previous-release
previous-release
30.73ms - 31.97msunsure 🔍
-2% - +4%
-0.61ms - +1.10ms
unsure 🔍
-6% - +2%
-1.81ms - +0.62ms
-
lit-html-repeat

render

VersionAvg timevs this-change
vs tip-of-tree
tip-of-tree
vs previous-release
previous-release
this-change
12.07ms - 12.41ms-unsure 🔍
-6% - +3%
-0.74ms - +0.38ms
unsure 🔍
-3% - +2%
-0.43ms - +0.20ms
tip-of-tree
tip-of-tree
11.88ms - 12.96msunsure 🔍
-3% - +6%
-0.38ms - +0.74ms
-unsure 🔍
-4% - +5%
-0.54ms - +0.67ms
previous-release
previous-release
12.08ms - 12.62msunsure 🔍
-2% - +4%
-0.20ms - +0.43ms
unsure 🔍
-5% - +4%
-0.67ms - +0.54ms
-

update

VersionAvg timevs this-change
vs tip-of-tree
tip-of-tree
vs previous-release
previous-release
this-change
360.33ms - 369.53ms-unsure 🔍
-0% - +3%
-1.56ms - +11.03ms
unsure 🔍
-1% - +2%
-4.55ms - +7.58ms
tip-of-tree
tip-of-tree
355.90ms - 364.49msunsure 🔍
-3% - +0%
-11.03ms - +1.56ms
-unsure 🔍
-2% - +1%
-9.05ms - +2.61ms
previous-release
previous-release
359.47ms - 367.36msunsure 🔍
-2% - +1%
-7.58ms - +4.55ms
unsure 🔍
-1% - +3%
-2.61ms - +9.05ms
-
lit-html-template-heavy

render

VersionAvg timevs this-change
vs tip-of-tree
tip-of-tree
vs previous-release
previous-release
this-change
64.94ms - 67.41ms-unsure 🔍
-1% - +3%
-0.90ms - +2.14ms
unsure 🔍
-1% - +3%
-0.80ms - +2.19ms
tip-of-tree
tip-of-tree
64.67ms - 66.44msunsure 🔍
-3% - +1%
-2.14ms - +0.90ms
-unsure 🔍
-2% - +2%
-1.15ms - +1.29ms
previous-release
previous-release
64.64ms - 66.33msunsure 🔍
-3% - +1%
-2.19ms - +0.80ms
unsure 🔍
-2% - +2%
-1.29ms - +1.15ms
-

update

VersionAvg timevs this-change
vs tip-of-tree
tip-of-tree
vs previous-release
previous-release
this-change
148.32ms - 153.04ms-unsure 🔍
-2% - +2%
-3.45ms - +3.41ms
unsure 🔍
-2% - +2%
-2.85ms - +3.49ms
tip-of-tree
tip-of-tree
148.21ms - 153.20msunsure 🔍
-2% - +2%
-3.41ms - +3.45ms
-unsure 🔍
-2% - +2%
-2.93ms - +3.62ms
previous-release
previous-release
148.24ms - 152.48msunsure 🔍
-2% - +2%
-3.49ms - +2.85ms
unsure 🔍
-2% - +2%
-3.62ms - +2.93ms
-
reactive-element-list

render

VersionAvg timevs this-change
vs tip-of-tree
tip-of-tree
vs previous-release
previous-release
this-change
65.60ms - 67.86ms-unsure 🔍
-3% - +1%
-2.07ms - +0.81ms
unsure 🔍
-2% - +3%
-1.17ms - +1.75ms
tip-of-tree
tip-of-tree
66.46ms - 68.25msunsure 🔍
-1% - +3%
-0.81ms - +2.07ms
-unsure 🔍
-1% - +3%
-0.37ms - +2.20ms
previous-release
previous-release
65.52ms - 67.36msunsure 🔍
-3% - +2%
-1.75ms - +1.17ms
unsure 🔍
-3% - +1%
-2.20ms - +0.37ms
-

update

VersionAvg timevs this-change
vs tip-of-tree
tip-of-tree
vs previous-release
previous-release
this-change
1020.90ms - 1034.59ms-slower ❌
0% - 2%
0.66ms - 20.89ms
unsure 🔍
-1% - +1%
-9.54ms - +10.74ms
tip-of-tree
tip-of-tree
1009.52ms - 1024.41msfaster ✔
0% - 2%
0.66ms - 20.89ms
-unsure 🔍
-2% - +0%
-20.73ms - +0.38ms
previous-release
previous-release
1019.67ms - 1034.62msunsure 🔍
-1% - +1%
-10.74ms - +9.54ms
unsure 🔍
-0% - +2%
-0.38ms - +20.73ms
-

update-reflect

VersionAvg timevs this-change
vs tip-of-tree
tip-of-tree
vs previous-release
previous-release
this-change
1073.09ms - 1105.38ms-unsure 🔍
-4% - +0%
-46.07ms - +2.62ms
unsure 🔍
-4% - +0%
-41.04ms - +4.42ms
tip-of-tree
tip-of-tree
1092.74ms - 1129.18msunsure 🔍
-0% - +4%
-2.62ms - +46.07ms
-unsure 🔍
-2% - +3%
-20.84ms - +27.66ms
previous-release
previous-release
1091.54ms - 1123.55msunsure 🔍
-0% - +4%
-4.42ms - +41.04ms
unsure 🔍
-2% - +2%
-27.66ms - +20.84ms
-

tachometer-reporter-action v2 for Benchmarks

Copy link
Member

@aomarks aomarks left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! Maybe file an issue about testing in windows if there isn't one already?

@augustjk
Copy link
Member Author

augustjk commented Aug 6, 2022

Maybe file an issue about testing in windows if there isn't one already?

Thanks! Filed #3205

@augustjk augustjk merged commit 2346231 into main Aug 6, 2022
@augustjk augustjk deleted the 11ty-plugin-windows branch August 6, 2022 00:58
@lit-robot lit-robot mentioned this pull request Aug 11, 2022
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.

[labs/eleventy-plugin-lit] in worker mode fails to resolve component modules on Windows
2 participants