Skip to content

Version 4.0.0

Latest

Choose a tag to compare

@jaydenseric jaydenseric released this 25 Aug 23:44

Major

  • Updated Node.js support to ^14.17.0 || ^16.0.0 || >= 18.0.0.
  • Updated dev dependencies, some of which require newer Node.js versions than previously supported.
  • Removed the package main field.
  • Removed ./package from the package exports field; the full package.json filename must be used in a require path.
  • Renamed the index.js module to babelPluginSyntaxHighlight.js and added it to the package exports field so it can be deep imported.
  • Implemented TypeScript types via JSDoc comments.
  • Use the node: URL scheme for Node.js builtin module imports in tests.

Patch

  • Updated dependencies.
  • Simplified dev dependencies and config for ESLint.
  • Simplified package scripts.
  • Check TypeScript types via a new package types script.
  • Various type safety improvements.
  • Guard against the edge case where the specified Prism.js language name is the name of one of the Prism.languages methods, e.g. extend.
  • Gracefully error if a template literal string can’t be cooked, e.g. due to an invalid escape sequence with the Babel transform option parserOpts.errorRecovery enabled.
  • Updated GitHub Actions CI config:
    • No longer run tests with Windows.
    • Run tests with Node.js v14, v16, v18.
    • Updated actions/checkout to v3.
    • Updated actions/setup-node to v3.
  • Configured Prettier option singleQuote to the default, false.
  • Updated tests:
  • Added a license.md MIT License file.
  • Revamped the readme:
    • Removed the badges.
    • Changed headings.
    • Added a “Requirements” section.
    • Added information about TypeScript config and optimal JavaScript module design.
    • Added an “Exports” section.