You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@zeppelin.apache.org by "voidmatcha (via GitHub)" <gi...@apache.org> on 2026/09/04 14:03:30 UTC

[PR] [MINOR] Upgrade highlight.js to 10.x in the React remote [zeppelin]

voidmatcha opened a new pull request, #5455:
URL: https://github.com/apache/zeppelin/pull/5455

   ### What is this PR for?
   
   The highlight.js 9.x line that `projects/zeppelin-react` depends on is end of life. Its lockfile entry carries `"deprecated": "Support has ended for 9.x series"`.
   
   Dependabot opened #5454 for `^10.4.1`, but bumping the runtime alone leaves two things behind. **10.x bundles its own types**, so `@types/highlight.js` stays on as a second, stale type source for the same module. And **`highlightBlock` logs a deprecation warning on every call from 10.7 onward**, which `^10.4.1` reaches: the lockfile resolves it to 10.7.3.
   
   ```
   highlight.js         ^9.15.8 to ^10.7.3
   @types/highlight.js  removed
   highlightBlock       replaced by highlightElement
   ```
   
   The range moves together with the API because `highlightElement` only exists from 10.7. Keeping `^10.4.1` and changing the call alone would break on a 10.4.x install. While editing that line I also replaced the `as HTMLElement` assertion with `querySelector<HTMLElement>`.
   
   This supersedes #5454.
   
   ### What type of PR is it?
   
   Improvement
   
   ### Todos
   
   None
   
   ### What is the Jira issue?
   
   N/A
   
   ### How should this be tested?
   
   ```
   cd zeppelin-web-angular/projects/zeppelin-react
   npm ci && npx vitest run && npx tsc --noEmit -p tsconfig.json
   ```
   
   11 files / 66 tests pass. Installing this package on its own, with no parent `node_modules` reachable, still resolves the bundled types and reports no highlight.js errors.
   
   I also checked the rendered result in a running instance. Serving the React remote at 9.18.5 and at 10.7.3 in turn, then opening a `%md` code block as a published paragraph with `?react=true`, gives **an identical screen** either way, with no deprecation warning in the console. The classes `github.css` defines are the same 31 in both versions.
   
   The shell stays on `^9.15.8`. The two packages are not in the Module Federation `shared` scope, so each bundles its own copy.
   
   ### Screenshots (if appropriate)
   
   Nothing to show: the rendered result is unchanged.
   
   ### Questions:
   
   * Does the license files need to update? No
   * Is there breaking changes for older versions? No
   * Does this needs documentation? No
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@zeppelin.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [MINOR] Upgrade highlight.js to 10.x in the React remote [zeppelin]

Posted by "tbonelee (via GitHub)" <gi...@apache.org>.
tbonelee commented on PR #5455:
URL: https://github.com/apache/zeppelin/pull/5455#issuecomment-5541884745

   Merged into master


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@zeppelin.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [MINOR] Upgrade highlight.js to 10.x in the React remote [zeppelin]

Posted by "tbonelee (via GitHub)" <gi...@apache.org>.
tbonelee merged PR #5455:
URL: https://github.com/apache/zeppelin/pull/5455


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@zeppelin.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org