Repository navigation
Support Chartist 2 (1.0.1) - #115
Merged
Merged
Conversation
Widen the chartist peer range to ^1.5.0 || ^2.0.0, document the opt-in compat plugin for 1.x-style events, and test against Chartist 2. Refs #114
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.
Refs #114
Chartist 2 is out, and the stock
ChartistGraphalready works with it. The only blocker is the peer range, which makes npm fail withERESOLVEnext to chartist 2. This PR prepares a 1.0.1 patch.Changes
1.0.1, peer"chartist": "^1.5.0 || ^2.0.0". The devDependency stayschartist@^1.5.0, and a new alias dev dependencychartist-2(npm:chartist@^2.1.0) lets onenpm testrun cover both majors.vi.mock("chartist", () => import("chartist-2"))so the component runs on Chartist 2 in this file. It checks that v2 is really loaded, that Line, Bar and Pie render an SVG, thatdetach()is called on unmount, and thatdrawandcreatedlisteners fire withoptions={{ plugins: [compat] }}.compatplugin, with an example, a note on memoizing options, a note that theoverridesworkaround is no longer needed, and a note that SSR/hydration isn't supported yet. Intro and migration notes are updated too.1.0.1 - Unreleasedentry.No changes to
src/. SSR/hydration is out of scope.Verified locally (Node 20.19)
npm run checkpassed with:chartist: 11/11 testschartist: 11/11 testsThe README example
options={{ plugins: [compat] }}also type-checks without a cast against Chartist 2's types. The test file needs anas unknown as Plugincast, because tsc sees 1.5's types there and 1.5 typesPluginas a function, while v2'scompatis an object.Suggested follow-up: CI job
This PR doesn't change the workflow, because the token used to push it lacks
workflowscope. A job like this would run the full check with v2 aschartistitself, covering v2 types as well as the runtime:Release
Merging does not publish.
release.ymlonly runs when a GitHub release is published. Per CONTRIBUTING, set the CHANGELOG date and then create thev1.0.1release.