Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Feb 12, 2026

The highlight.js upgrade from 10.5.0 to 11.11.1 introduced breaking API changes that caused build failures.

Changes:

  • Updated import statement to use default export: import hljs from "highlight.js" instead of import * as hljs
  • Migrated to v11 API signature: hljs.highlight(code, {language: "java"}) instead of hljs.highlight("java", code)

Affected file:

  • src/formatter-settings/assets/features/formatterSettings/components/Highlight.tsx
// Before (v10 API)
import * as hljs from "highlight.js";
const highlighted = hljs.highlight("java", content);

// After (v11 API)
import hljs from "highlight.js";
const highlighted = hljs.highlight(content, { language: "java" });

✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 2 commits February 12, 2026 02:24
Co-authored-by: chagong <831821+chagong@users.noreply.github.com>
Co-authored-by: chagong <831821+chagong@users.noreply.github.com>
Copilot AI changed the title [WIP] Bump highlight.js from 10.5.0 to 11.11.1 Fix highlight.js v11 API compatibility Feb 12, 2026
Copilot AI requested a review from chagong February 12, 2026 02:30
@chagong chagong marked this pull request as ready for review February 12, 2026 02:36
@chagong chagong merged commit 28ae9c6 into dependabot/npm_and_yarn/highlight.js-11.11.1 Feb 12, 2026
1 check passed
@chagong chagong deleted the copilot/sub-pr-1561 branch February 12, 2026 02:36
wenytang-ms pushed a commit that referenced this pull request Feb 12, 2026
* build(deps): bump highlight.js from 10.5.0 to 11.11.1

Bumps [highlight.js](https://github.com/highlightjs/highlight.js) from 10.5.0 to 11.11.1.
- [Release notes](https://github.com/highlightjs/highlight.js/releases)
- [Changelog](https://github.com/highlightjs/highlight.js/blob/main/CHANGES.md)
- [Commits](highlightjs/highlight.js@10.5.0...11.11.1)

---
updated-dependencies:
- dependency-name: highlight.js
  dependency-version: 11.11.1
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

* Fix highlight.js v11 API compatibility (#1568)

* Initial plan

* Initial plan for highlight.js upgrade

Co-authored-by: chagong <831821+chagong@users.noreply.github.com>

* Fix highlight.js API usage for v11 compatibility

Co-authored-by: chagong <831821+chagong@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: chagong <831821+chagong@users.noreply.github.com>

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>
Co-authored-by: chagong <831821+chagong@users.noreply.github.com>
Co-authored-by: Changyong Gong <shawn.gong@hotmail.com>
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.

2 participants