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

refactor!: remove exporting internal APIs #14583

Merged
merged 7 commits into from
Oct 13, 2023
Merged

refactor!: remove exporting internal APIs #14583

merged 7 commits into from
Oct 13, 2023

Conversation

bluwy
Copy link
Member

@bluwy bluwy commented Oct 11, 2023

Description

  • Remove internal APIs from config.ts: isDepsOptimizerEnabled and getDepOptimizationConfig
  • Export the types explicitly from config.ts
  • Rename ResolveWorkerOptions to ResolvedWorkerOptions (it was bugging me)
  • Remove internal types from ./optimizer

NOTE:

  • The removed internal type DepOptimizationOptions is only referenced via DepOptimizationOptions (exported), but I don't think it needs to also be exported. used by vitest
  • The removed internal type DepsOptimizer is only referenced at
    getDepsOptimizer?: (ssr: boolean) => DepsOptimizer | undefined
    , but I don't think that's an option users should use anyways.

Also it's odd that we export InternalResolveOptions and most props there are actually internal too.

Additional context


What is the purpose of this pull request?

  • Bug fix
  • New Feature
  • Documentation update
  • Other

@sapphi-red
Copy link
Member

it's odd that we export InternalResolveOptions and most props there are actually internal too.

The reason was because createResolver in ResolvedConfig uses InternalResolveOptions and api-extractor shows an warning if we don't export InternalResolveOptions.

@sapphi-red
Copy link
Member

/ecosystem-ci run

@vite-ecosystem-ci
Copy link

vite-ecosystem-ci bot commented Oct 12, 2023

📝 Ran ecosystem CI: Open

suite result
analogjs ✅ success
astro ✅ success
histoire ✅ success
ladle ✅ success
laravel ✅ success
marko ❌ failure
nuxt ✅ success
nx ❌ failure
previewjs ✅ success
qwik ❌ failure
rakkas ✅ success
sveltekit ✅ success
unocss ✅ success
vike ✅ success
vite-plugin-pwa ✅ success
vite-plugin-react ✅ success
vite-plugin-react-pages ✅ success
vite-plugin-react-swc ✅ success
vite-plugin-svelte ✅ success
vite-plugin-vue ✅ success
vite-setup-catalogue ✅ success
vitepress ✅ success
vitest ✅ success

sapphi-red
sapphi-red previously approved these changes Oct 12, 2023
Copy link
Member

@sapphi-red sapphi-red left a comment

Choose a reason for hiding this comment

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

sapphi-red
sapphi-red previously approved these changes Oct 12, 2023
@bluwy bluwy merged commit 7861a33 into main Oct 13, 2023
10 checks passed
@bluwy bluwy deleted the remove-internal-exports branch October 13, 2023 15:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants