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

@netlify
Copy link

netlify bot commented Nov 8, 2025

Deploy Preview for dev-prismjs-com ready!

Name Link
🔨 Latest commit dd0af79
🔍 Latest deploy log https://app.netlify.com/projects/dev-prismjs-com/deploys/69135a6650677d000807ab80
😎 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 dd0af79

@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.

We use the `CustomEvent` class, which [became stable in `v20.13`](https://nodejs.org/api/events.html#class-customevent).
Found after running the `regex-coverage` npm script.
Found after running the `regex-coverage` npm script.
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