cli icon indicating copy to clipboard operation
cli copied to clipboard

refactor(nx-plugin): explicit import extensions [DO NOT MERGE]

Open matejchalk opened this issue 9 months ago โ€ข 1 comments

matejchalk avatar Mar 10 '25 11:03 matejchalk

Code PushUp

๐Ÿคจ Code PushUp report has both improvements and regressions โ€“ compared current commit 4bacdaa925efff9829d8c4ba2921fcae8e82484e with previous commit c677fa25e8d9fd3cb4a58d42674b9f1ff5a5cf88.

๐Ÿ•ต๏ธ See full comparison in Code PushUp portal ๐Ÿ”

๐Ÿท๏ธ Categories

๐Ÿท๏ธ Category โญ Previous score โญ Current score ๐Ÿ”„ Score change
Performance ๐ŸŸก 55 ๐Ÿ”ด 50 โ†“ โˆ’4.9
Code coverage ๐ŸŸข 91 ๐ŸŸข 90 โ†“ โˆ’0.2
Documentation ๐Ÿ”ด 23 ๐Ÿ”ด 23 โ†“ โˆ’0.1
Security ๐ŸŸก 75 ๐ŸŸก 75 โ€“
Updates ๐ŸŸก 77 ๐ŸŸก 77 โ€“
Accessibility ๐ŸŸข 92 ๐ŸŸข 92 โ€“
Best Practices ๐ŸŸข 100 ๐ŸŸข 100 โ€“
SEO ๐ŸŸก 61 ๐ŸŸก 61 โ€“
Bug prevention ๐ŸŸข 100 ๐ŸŸข 100 โ€“
Code style ๐ŸŸข 100 ๐ŸŸข 100 โ€“
๐Ÿ‘Ž 3 groups regressed, ๐Ÿ‘ 1 audit improved, ๐Ÿ‘Ž 9 audits regressed, 10 audits changed without impacting score

๐Ÿ—ƒ๏ธ Groups

๐Ÿ”Œ Plugin ๐Ÿ—ƒ๏ธ Group โญ Previous score โญ Current score ๐Ÿ”„ Score change
Lighthouse Performance ๐ŸŸก 55 ๐Ÿ”ด 50 โ†“ โˆ’4.9
Code coverage Code coverage metrics ๐ŸŸข 91 ๐ŸŸข 90 โ†“ โˆ’0.2
JSDoc coverage Documentation coverage ๐Ÿ”ด 23 ๐Ÿ”ด 23 โ†“ โˆ’0.1

15 other groups are unchanged.

๐Ÿ›ก๏ธ Audits

๐Ÿ”Œ Plugin ๐Ÿ›ก๏ธ Audit ๐Ÿ“ Previous value ๐Ÿ“ Current value ๐Ÿ”„ Value change
Lighthouse Speed Index ๐ŸŸจ 4.8ย s ๐ŸŸฅ 7.7ย s โ†‘ +59.7โ€‰%
Lighthouse Time to Interactive ๐ŸŸฅ 12.7ย s ๐ŸŸฅ 17.5ย s โ†‘ +36.9โ€‰%
Lighthouse Total Blocking Time ๐ŸŸฅ 2,590ย ms ๐ŸŸฅ 9,530ย ms โ†‘ +268โ€‰%
Lighthouse Largest Contentful Paint ๐ŸŸจ 3.5ย s ๐ŸŸจ 3.4ย s โ†“ โˆ’3.3โ€‰%
Lighthouse First Contentful Paint ๐ŸŸจ 2.8ย s ๐ŸŸจ 2.8ย s โ†‘ +1.4โ€‰%
Code coverage Function coverage ๐ŸŸฉ 93 % ๐ŸŸฉ 92.8 % โ†“ โˆ’0.3โ€‰%
Code coverage Line coverage ๐ŸŸจ 90 % ๐ŸŸจ 89.8 % โ†“ โˆ’0.2โ€‰%
Code coverage Branch coverage ๐ŸŸจ 85.9 % ๐ŸŸจ 85.8 % โ†“ โˆ’0.2โ€‰%
JSDoc coverage Types coverage ๐ŸŸฅ 210 undocumented types ๐ŸŸฅ 212 undocumented types โ†‘ +1โ€‰%
JSDoc coverage Functions coverage ๐ŸŸฅ 451 undocumented functions ๐ŸŸฅ 452 undocumented functions โ†‘ +0.2โ€‰%
Lighthouse Minimizes main-thread work ๐ŸŸฅ 11.8ย s ๐ŸŸฅ 24.0ย s โ†‘ +103.4โ€‰%
Lighthouse JavaScript execution time ๐ŸŸฅ 6.1ย s ๐ŸŸฅ 10.8ย s โ†‘ +77.7โ€‰%
Lighthouse Metrics ๐ŸŸฉ 100% ๐ŸŸฉ 100% โ†‘ +36.9โ€‰%
Lighthouse Avoids enormous network payloads ๐ŸŸฉ Total size was 1,828ย KiB ๐ŸŸฉ Total size was 1,832ย KiB โ†‘ +0.2โ€‰%
Lighthouse Max Potential First Input Delay ๐ŸŸฅ 1,850ย ms ๐ŸŸฅ 3,410ย ms โ†‘ +84.2โ€‰%
Lighthouse Uses efficient cache policy on static assets ๐ŸŸจ 27 resources found ๐ŸŸจ 27 resources found โ†“ โˆ’0.1โ€‰%
Lighthouse Initial server response time was short ๐ŸŸฉ Root document took 440ย ms ๐ŸŸฉ Root document took 360ย ms โ†“ โˆ’17.4โ€‰%
Lighthouse Eliminate render-blocking resources ๐ŸŸฅ Potential savings of 810ย ms ๐ŸŸฅ Potential savings of 800ย ms โ†“ โˆ’1.2โ€‰%
Lighthouse Network Round Trip Times ๐ŸŸฉ 20ย ms ๐ŸŸฉ 20ย ms โ†‘ +26.2โ€‰%
Lighthouse Server Backend Latencies ๐ŸŸฉ 120ย ms ๐ŸŸฉ 120ย ms โ†“ โˆ’0.5โ€‰%

576 other audits are unchanged.

github-actions[bot] avatar Mar 10 '25 11:03 github-actions[bot]

@matejchalk we ran into the same error. What was the fix to not remove .js from all imports?

BioPhoton avatar Jul 23 '25 18:07 BioPhoton

we ran into the same error. What was the fix to not remove .js from all imports?

It's been a while, so I don't really remember the context. What's the error you're getting? Looks like in ba918503a2216d3b89f943f01893d1a34eaf2812 I just added .js extension to all imports in nx-plugin (compatible with both CJS and ESM) to check that all tests pass, so I don't think I encountered any errors.

matejchalk avatar Jul 24 '25 13:07 matejchalk