Repository navigation
docs(Tokenizer): the deprecated experimental.presentation names astryx upgrade - #9820
imdreamrunner wants to merge 1 commit into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
AI review status for this pull request.
|
|
/approve-spec 6440b7f |
There was a problem hiding this comment.
Requesting changes. The @deprecated note and the three Tokenizer.doc.mjs entries are accurate, but the new sentence in the development warning points to a migration that does not apply where that warning fires.
- The warning at
Tokenizer.tsx:835fires only whenpresentationandexperimental.presentationare both set, andpromote-tokenizer-presentationdeclines exactly that case (it leaves a TODO when both are attributes, and whenpresentationcomes from an earlier spread it moves the experimental value after the spread, where the losing value starts to win), so please restore the previous message ("presentationwins. Removeexperimental.presentation.") and drop the warning from the Changeset's list.
The codemod's own test for that shape (case c in promote-tokenizer-presentation.test.mjs) shows the behavior.
[Automated review]
| useDevWarning( | ||
| 'Tokenizer', | ||
| '`presentation` and `experimental.presentation` are both set; `presentation` wins. Remove `experimental.presentation`.', | ||
| '`presentation` and `experimental.presentation` are both set; `presentation` wins. Remove `experimental.presentation`. Use the stable `presentation` prop; `astryx upgrade` rewrites static uses.', |
There was a problem hiding this comment.
This warning only fires when presentation and experimental.presentation are both set, and promote-tokenizer-presentation declines exactly that case: with both attributes it leaves a TODO (case c in its test), and with presentation from an earlier spread it moves the experimental value after the spread, so the losing value starts to win. Please keep the previous message here: `presentation` and `experimental.presentation` are both set; `presentation` wins. Remove `experimental.presentation`.
6440b7f to
e509abe
Compare
|
/approve-spec e509abe |
There was a problem hiding this comment.
No changes needed. The @deprecated note on experimental.presentation and the three Tokenizer.doc.mjs entries now name astryx upgrade, which matches what the promote-tokenizer-presentation codemod does for a static experimental={{presentation: x}}. The both-set development warning keeps its earlier advice, so the concern raised on the previous revision is resolved. CI on this revision stopped because CI was at capacity rather than on a failing test, so it needs a re-run before merging.
[Automated review]
|
Closing: the experimental |
Reader impact
A builder who still passes
experimental={{presentation: x}}to Tokenizer reads the deprecation and learns the replacement,presentation, but not thatastryx upgrademakes the change for them. After this PR, the deprecation note and the reference docs also name the migration command.Source of truth
spec:AST-017FR29b: "Every warning names the exact replacement, stable versioned instructions, and exact migration command when one exists."astryx upgraderuns the stagedpromote-tokenizer-presentationcodemod, which rewrites a staticexperimental={{presentation: x}}topresentation={x}(feat(Tokenizer): presentation is a stable prop, and adaptive is its default #9796).Correction
These places named only the replacement. They now say "Use the stable
presentationprop;astryx upgraderewrites static uses.":@deprecatedJSDoc onTokenizerProps.experimental.presentation;experimentalentries inTokenizer.doc.mjs(English, Chinese and dense).The development warning keeps its wording, "
presentationwins. Removeexperimental.presentation." It fires only when both spellings are set. The codemod leaves that case for a person, so the warning names the fix and not the command.Evidence
git diffis 4 changed lines inTokenizer.tsxandTokenizer.doc.mjs, plus the Changeset.Scope
api-report.mddoes not include JSDoc text, so it does not change.Testing
@astryxdesign/corebuild passes, andtsc --noEmitpasses for the package.check:changesets, Changeset coverage (it ships to@astryxdesign/core, which the Changeset names) andcheck:knowledgepass. Prettier is clean.