Skip to content

Conversation

@tim-lai
Copy link
Contributor

@tim-lai tim-lai commented Aug 18, 2020

  • includes prismjs@1.21.0 security update
  • fix(cypress): use less restrictive 'include.text' assertion

Description

  • update react-syntax-highlighter from 12.2.1 to 13.5.0
  • update Cypress multiple-examples tests to use a less restrictive include.text assertion instead of have.text. This change is backwards compatible with react-syntax-highlighter@12.2.1.

Motivation and Context

Addresses security update fixed in prismjs@1.21.0.

Note, prismjs is a dependency of react-syntax-highlighter, but swagger-ui does not use prismjs within react-syntax-highlighter

Also, react-syntax-highlighter@13.x also changes output from react-syntax-highlighter@12.2.1. Specifically adding leading and trailing double-quote to the <code> section. Cypress tests have been updated to reflect this change.

How Has This Been Tested?

Screenshots (if appropriate):

before (v12):
highlight-v12

after (v13):
highlight-v13

Checklist

My PR contains...

  • No code changes (src/ is unmodified: changes to documentation, CI, metadata, etc.)
  • Dependency changes (any modification to dependencies in package.json)
  • Bug fixes (non-breaking change which fixes an issue)
  • Improvements (misc. changes to existing features)
  • Features (non-breaking change which adds functionality)

My changes...

  • are breaking changes to a public API (config options, System API, major UI change, etc).
  • are breaking changes to a private API (Redux, component props, utility functions, etc.).
  • are breaking changes to a developer API (npm script behavior changes, new dev system dependencies, etc).
  • are not breaking changes.

Documentation

  • My changes do not require a change to the project documentation.
  • My changes require a change to the project documentation.
  • If yes to above: I have updated the documentation accordingly.

Automated tests

  • My changes can not or do not need to be tested.
  • My changes can and should be tested by unit and/or integration tests.
  • If yes to above: I have added tests to cover my changes.
  • If yes to above: I have taken care to cover edge cases in my tests.
  • All new and existing tests passed.

@tim-lai tim-lai merged commit a26bb92 into swagger-api:master Aug 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant