fix: use verbatimModuleSyntax consistently in exports#2702
fix: use verbatimModuleSyntax consistently in exports#2702kettanaito merged 5 commits intomswjs:mainfrom
verbatimModuleSyntax consistently in exports#2702Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (92)
💤 Files with no reviewable changes (1)
✅ Files skipped from review due to trivial changes (88)
🚧 Files skipped from review as they are similar to previous changes (3)
📝 WalkthroughWalkthroughThis PR converts numerous imports and exports throughout the codebase from runtime imports to TypeScript type-only imports, and enables the Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
aee80f6 to
0c34cc6
Compare
0c34cc6 to
fb8cda5
Compare
verbatimModuleSyntax consistently in exports
|
Thanks for opening this, @christoph-fricke. I've discovered a bigger issue: we weren't using I've fixed that and updated everything we export/import publicly and internally. |
|
@kettanaito Awesome! When I tried to But I am glad it works now! Installed a local built into mswjs/playwright#48 and the tests run without crashing. Looks good to go from my POV. |
Released: v2.13.4 🎉This has been released in v2.13.4. Get these changes by running the following command: Predictable release automation by Release. |
The new network-source API is not usable as soon as a project tries to import from
msw/experimental. It crashes with a runtime error:This PR fixes the problem by using a type export in src/core/experimental/index.ts to ensure
DefineNetworkOptionsis stripped from the JS output.I initially tried to prevent such problems in the future by enabling
verbatimModulesyntax intsconfig.base.jsonand fixing multiple TS errors reported bypnpm exec tsc --noEmit -p src/tsconfig.src.json, but it caused strange problems in CI.Besides this, there appear to be multiple TS errors in the project. Some picked in the editor, some only reported by checking with one of the various TS config files such as
pnpm exec tsc --noEmit -p ./tsconfig.test.unit.json. Some source code errors I noticed:It does not look like the CI finds and reports the errors. Are you aware of these existing TypeScript problems?