Use the published @voltius/plugin-types instead of vendored types - #1
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The template vendored
types/index.d.ts+types/voltius-ui.d.tsand pointedtsconfig.jsonpathsat them, because@voltius/plugin-typesdid not exist on npm. It does now —0.15.0published with the Voltius 0.15.0 release — so the template can use what it tells authors to use.@voltius/plugin-types@^0.15.0becomes a dev dependency.d.tsfiles are deleted (746 lines)tsconfig.jsondropsbaseUrl/pathsentirely and narrowsincludetosrc## Typessection now documentsnpm install --save-dev @voltius/plugin-typesand the version-tracks-the-app rule@voltius/uistill resolves with nopathsmapping: the publishedindex.d.tspulls inui.d.tsthrough a///reference, and that file is byte-identical to the copy being deleted. The vendoredindex.d.tsdiffered from the published one by exactly one line — the///reference itself — so the API surface authors compile against does not change.Verified from a clean
node_modules:npm install,npm run typecheck,npm run buildandnpm run checkall exit 0.checkfetches the host specifier list live from voltiusmainand reportsreact, @voltius/ui, react/jsx-runtimeas the bundle imports, all host-provided.