question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

A note about upgrading dependencies from version 9 version 10

See original GitHub issue

If your library (or a dependency) depends on v9 and you’re trying to upgrade to v10

Let’s say you want to help upgrade an open source package that depends on Highlight.js v9. You’d like to help upgrade it to v10 because it’s a dependency of your project but the maintainer seems busy, or no longer around - but you know JavaScript and you have some time to work on a PR. And of course even if the fix is easy if the author is no longer around getting that fix on NPM might require republishing the library or some such, but if so that’d just be what had to be done. Best case is the author is around (just busy) and could merge a PR if you could submit one.

So this can be SUPER easy or it can be insanely difficult - all depends on the library. lowlight is a popular dependent of Highlight.js. In prior versions (v9) they pretty much maintained their own fork of the library - because that’s what they had to do to hook into the internals they needed. Not a trivial upgrade scenario.

Yet several of the libraries I’ve see at a glance just call our public API (highlight, highlightAuto, etc)… Our public API between v9 and v10 was remarkably stable.

It’s possible some of these libraries might actually “just work” with ONLY a version bump:

# fetch the library
git clone older-library
cd older-library
# install the latest v10 version of Highlight.js
npm install highlight.js@latest 
# run tests maybe?
git commit
# make PR request

Obviously knowing a little about NPM and JavaScript will go a long ways if you wanted to help out here. If anyone has any specific questions about the process of upgrading or any of the breaking changes mentioned below, I’m happy to help as I can. I just don’t have time to update all the possible dependents because NPM says that’s almost 3000 packages. 😃

The biggest thing is we no longer support IE11 on the client-side… but if you’re only using our library on the server-side that wouldn’t matter at all.

Reference:

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:11 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
arpowerscommented, Nov 20, 2020

You can add the warning during yarn install or npm install

https://docs.npmjs.com/cli/v6/commands/npm-deprecate

0reactions
joshgoebelcommented, Dec 10, 2020

Closing this in favor of it’s mention at https://github.com/highlightjs/highlight.js/issues/2877.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Angular Upgrade 9 to 10 - Stack Overflow
The installed local Angular CLI version is older than the latest stable version. Installing a temporary version to perform the update. √ ...
Read more >
How to upgrade from Drupal 8 to Drupal 9
Next, you'll need to pull in both the Drupal 9 version of core-recommended and dev-dependencies packages as dependencies. We use --no-update ...
Read more >
Recommended Fixes - HMC Code Upgrades - IBM
This document lists the available upgrades and updates for the Hardware Management Consoles that manage IBM Power Systems hosting IBM i, AIX, and...
Read more >
Upgrade from version 8 to the modular Web SDK - Firebase
This guide assumes that you will take advantage of the version 9 compat libraries to facilitate your upgrade. These libraries allow you to...
Read more >
Upgrade Guide - The PHP Framework For Web Artisans
You should update the following dependencies in your application's composer.json file ... and verify you are using the proper version for Laravel 9...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found