docs: fix the playground, and typecheck the examples in CI - #52
Open
david-chau wants to merge 1 commit into
Open
docs: fix the playground, and typecheck the examples in CI#52david-chau wants to merge 1 commit into
david-chau wants to merge 1 commit into
Conversation
The playground was a white screen:
does not provide an export named 'searchCurrencies'
0.10.0 moved the currency helpers to their own entry point.
examples/playground/src/App.tsx was updated by hand for the parse split;
CurrencyCombobox.tsx was missed, and kept importing searchCurrencies,
toFlagEmoji and their two types from the root.
Nothing caught it. The playground has its own tsconfig, but CI never
installed it, so it was the one piece of TypeScript in the repo that no
run ever compiled. StackBlitz serves it straight from main, so the demo
the README opens with was broken from 0.10.0 until now.
tsconfig-examples.json maps the package name onto lib/ and typechecks
the examples against the entry points as they are now — no install step,
and it fails on exactly this. Reverting the import reproduces four
TS2305s.
docs: only examples/ and the typecheck script change; nothing in the
published tarball moves, and StackBlitz reads main rather than npm.
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 playground was a white screen:
What happened
0.10.0 moved the currency helpers to their own entry point.
App.tsxwas updated by hand for the parse split;CurrencyCombobox.tsxwas missed, and kept importingsearchCurrencies,toFlagEmoji,CurrencyOptionandCurrencyPresetfrom the root.StackBlitz serves
examples/playgroundstraight frommain, so the demo the README opens with has been broken since 0.10.0.Why nothing caught it
The playground has its own
tsconfig.json, but CI never installs it — so it was the one piece of TypeScript in the repo that no run ever compiled. Unit tests cover the entry-point split (lib/entryPoints.test.ts) but say nothing about whether the examples follow it.The guard
tsconfig-examples.jsonmaps the package name ontolib/, so the examples typecheck against the entry points as they are now, with no install step. It is wired intonpm run typecheck, which CI already runs.Reverting the import reproduces the failure:
Release
docs:on purpose. Onlyexamples/and the typecheck script change — nothing in the published tarball moves, and StackBlitz readsmainrather than npm, so merging is the fix.