wooorm / refractor

Lightweight, robust, elegant virtual syntax highlighting using Prism

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Switching prismjs dependency from ~ to ^

sunknudsen opened this issue · comments

First, thanks so much for refractor.

Is there a reason why prismjs is the only dependency that uses ~ vs ^?

As a result, I believe one cannot update to 1.25.0 on legacy version.

Thanks for helping out!

commented

Yes. There is a tightly coupled integration between refractor and prism. For one because the syntax files are generated from prism at release time. For another that the integration uses hidden APIs which are not covered by semver and could break at any time.

Thanks for sharing! Are you planning on updating legacy version to 1.25.0?

I tried refactoring my codebase to ESM, but refactor is harder than expected… trying to find the best way to keep prismjs up to date without having to quickly upgrade refractor to pure ESM version.

Perhaps you know of a workaround?

commented

Are you planning on updating legacy version to 1.25.0?

No, I unfortunately don’t have the time to maintain multiple release lines for the 100s of package I work on, except for security vulnerabilities.

but refactor is harder than expected…

Did you see this guide? https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c.

No, I unfortunately don’t have the time to maintain multiple release lines for the 100s of package I work on, except for security vulnerabilities.

Feel you. Thanks so much for your outstanding contributions to open source.

Did you see this guide? https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c.

Yes, this is the guide I followed. I have a delicate CRA project with custom SSR. Everything blew up when I tried switching to ESM. That said, I am likely the problem… need to learn so much more about React.

commented

<3

Yeah. CRA. Also Jest. Those are having some problems. You’re likely not the problem ;)
You could take this time to try out some new things, maybe Next or Astro for example. But there’s no rush. Time will probably solve things in CRA and Jest!