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

feat(turbopack-ecmascript): use import attributes for annotations #6732

Merged
merged 2 commits into from
May 16, 2024

Conversation

ForsakenHarmony
Copy link
Contributor

@ForsakenHarmony ForsakenHarmony commented Dec 7, 2023

Description

No more magic string literal 🎉

This also enables with { type: "json }

Blocked by vercel/next.js#59494

Closes PACK-2119

Copy link

vercel bot commented Dec 7, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
examples-nonmonorepo ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 15, 2024 10:23pm
examples-tailwind-web 🔄 Building (Inspect) Visit Preview 💬 Add feedback May 15, 2024 10:23pm
examples-vite-web 🔄 Building (Inspect) Visit Preview 💬 Add feedback May 15, 2024 10:23pm
rust-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 15, 2024 10:23pm
7 Ignored Deployments
Name Status Preview Comments Updated (UTC)
examples-basic-web ⬜️ Ignored (Inspect) Visit Preview May 15, 2024 10:23pm
examples-designsystem-docs ⬜️ Ignored (Inspect) Visit Preview May 15, 2024 10:23pm
examples-gatsby-web ⬜️ Ignored (Inspect) Visit Preview May 15, 2024 10:23pm
examples-kitchensink-blog ⬜️ Ignored (Inspect) Visit Preview May 15, 2024 10:23pm
examples-native-web ⬜️ Ignored (Inspect) Visit Preview May 15, 2024 10:23pm
examples-svelte-web ⬜️ Ignored (Inspect) Visit Preview May 15, 2024 10:23pm
turbo-site ⬜️ Ignored (Inspect) May 15, 2024 10:23pm

Copy link
Contributor

github-actions bot commented Dec 7, 2023

🟢 Turbopack Benchmark CI successful 🟢

Thanks

Copy link
Contributor

github-actions bot commented Dec 7, 2023

✅ This change can build next-swc

Copy link
Contributor

github-actions bot commented Dec 7, 2023

⚠️ CI failed ⚠️

The following steps have failed in CI:

  • Turbopack Rust tests (linux)
  • Turbopack Rust tests (mac/win, non-blocking)

See workflow summary for details

Copy link
Contributor

github-actions bot commented Dec 7, 2023

Linux Benchmark for 22d3e14

Click to view benchmark
Test Base PR % Significant %
bench_hmr_to_commit/Turbopack CSR/1000 modules 24.18ms ± 0.74ms 24.23ms ± 0.75ms +0.21%
bench_hmr_to_eval/Turbopack CSR/1000 modules 23.65ms ± 0.69ms 23.68ms ± 0.72ms +0.15%
bench_startup/Turbopack CSR/1000 modules 1363.28ms ± 3.79ms 1363.75ms ± 4.91ms +0.03%

@ForsakenHarmony ForsakenHarmony force-pushed the hrmny/import-attribute-annotations branch from 243047d to da02f16 Compare April 24, 2024 21:15
@ForsakenHarmony ForsakenHarmony force-pushed the hrmny/import-attribute-annotations branch from da02f16 to bcb047d Compare April 25, 2024 14:22
@ForsakenHarmony ForsakenHarmony force-pushed the hrmny/import-attribute-annotations branch from bcb047d to 968934c Compare April 25, 2024 15:53
@ForsakenHarmony ForsakenHarmony force-pushed the hrmny/import-attribute-annotations branch from 968934c to 61f64d2 Compare April 26, 2024 17:01
@ForsakenHarmony ForsakenHarmony force-pushed the hrmny/import-attribute-annotations branch from 61f64d2 to 98c813c Compare April 26, 2024 17:30
@ForsakenHarmony ForsakenHarmony force-pushed the hrmny/import-attribute-annotations branch from 98c813c to edc69b8 Compare May 8, 2024 22:05
@ForsakenHarmony ForsakenHarmony force-pushed the hrmny/import-attribute-annotations branch from edc69b8 to 96a1fee Compare May 13, 2024 20:34
reference_type.into_value(),
ReferenceType::EcmaScriptModules(EcmaScriptModulesReferenceSubType::ImportWithType(_))
) {
options.extensions.clear();
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Is this correct for with { type: "json" }?

for (i, rule) in options.await?.rules.iter().enumerate() {
if has_type_attribute && current_module_type.is_some() {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Is this correct for with { type: "json" }?

@ForsakenHarmony
Copy link
Contributor Author

If the with { type: "json" } support needs changes, it can be done in a follow-up PR

@ForsakenHarmony ForsakenHarmony merged commit 993891f into main May 16, 2024
46 of 50 checks passed
@ForsakenHarmony ForsakenHarmony deleted the hrmny/import-attribute-annotations branch May 16, 2024 00:10
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