Fixes the following npm warnings when installing SLDS React on React 17 and React 18 due to the currently included version of react-highlighter not having up to date peer dependencies.
Fix was done by migrating from abandoned react-highlighter to a maintained package react-highlighter-ts.
Confirmed through the SLDS project storybook to be working on React 17 and on codesandbox that it seems to also work for React 18:
CONTRIBUTOR checklist (do not remove)
Please complete for every pull request
[x] First-time contributors should sign the Contributor License Agreement. It's a fancy way of saying that you are giving away your contribution to this project. If you haven't before, wait a few minutes and a bot will comment on this pull request with instructions.
[x] npm run lint:fix has been run and linting passes.
[x] Mocha, Jest (Storyshots), and components/component-docs.json CI tests pass (npm test).
[x] Tests have been added for new props to prevent regressions in the future. See readme.
[ ] Add year-first date and commit SHA to last-slds-markup-review in package.json and push.
[ ] Request a review of the deployed Heroku app by the Salesforce UX Accessibility Team.
[ ] Add year-first review date, and commit SHA, last-accessibility-review, to package.json and push.
[ ] While the contributor's branch is checked out, run npm run local-update within locally cloned site repo to confirm the site will function correctly at the next release.
Fixes the following npm warnings when installing SLDS React on React 17 and React 18 due to the currently included version of
react-highlighter
not having up to date peer dependencies.Fix was done by migrating from abandoned
react-highlighter
to a maintained packagereact-highlighter-ts
.Confirmed through the SLDS project storybook to be working on React 17 and on codesandbox that it seems to also work for React 18:
CONTRIBUTOR checklist (do not remove)
Please complete for every pull request
npm run lint:fix
has been run and linting passes.components/component-docs.json
CI tests pass (npm test
).REVIEWER checklist (do not remove)
components/component-docs.json
tests.Required only if there are markup / UX changes
last-slds-markup-review
inpackage.json
and push.last-accessibility-review
, topackage.json
and push.npm run local-update
within locally cloned site repo to confirm the site will function correctly at the next release.