Skip to content

Conversation

@DmitrySharabin
Copy link
Member

@DmitrySharabin DmitrySharabin commented Nov 8, 2025

Depends on #4018.

Summary

Most of the code was authored by @LeaVerou.

  • Create/update core classes + add corresponding utils + improve types
  • [languages] Use the updated API
  • [plugins] Fix auto-import + adopt the new API
  • [tests] Adopt the new API + improve tests coverage in bash and css-selector (actually, we didn't have tests for it at all 🤷‍♂️)
  • [build] Add the global.js entry point to work with bare Prism (without the autoloader plugin loaded automatically)
  • [benchmark] Adopt the new API
  • [GH actions] Bump up NodeJS versions
    We use the CustomEvent class, which became stable in v20.13.

Demo: https://codepen.io/dmitrysharabin/pen/qEbeEXv


This is part 1 of 2 in a stack made with GitButler:

@netlify
Copy link

netlify bot commented Nov 8, 2025

Deploy Preview for dev-prismjs-com ready!

Name Link
🔨 Latest commit 26bf9fb
🔍 Latest deploy log https://app.netlify.com/projects/dev-prismjs-com/deploys/693098f4d106c2000896cd96
😎 Deploy Preview https://deploy-preview-4029--dev-prismjs-com.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@github-actions
Copy link

github-actions bot commented Nov 8, 2025

No JS Changes

Generated by 🚫 dangerJS against 26bf9fb

@DmitrySharabin
Copy link
Member Author

DmitrySharabin commented Nov 8, 2025

Something weird is happening here: IDK why the tests fail. Locally, all the tests pass. Hm, I need to investigate it.

UPDATE: Fixed! The coverage task fails expectedly—Prism found a few regexes not covered by the tests we have. I'm not sure if it's a regression or if we previously missed those cases. 🤔

Anyway, it's a giant leap forward, since there are a few minor changes left in the simplify branch that we need to migrate, but they are tiny compared to that PR.

@DmitrySharabin
Copy link
Member Author

Something weird is happening here: IDK why the tests fail. Locally, all the tests pass. Hm, I need to investigate it.

Oh, I know why this happens. Locally, I have applied the changes from #4018. Therefore, the updated API leverages the new, more declarative language definitions. I'll update the PR's description to reflect that.

@DmitrySharabin DmitrySharabin merged commit 209ef96 into v2 Dec 4, 2025
13 of 14 checks passed
@DmitrySharabin DmitrySharabin deleted the simplify-js branch December 4, 2025 12:36
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.

3 participants