Skip to content

fix(runtime): reset lastIndex before reusing regexes#564

Merged
danielroe merged 1 commit intofi3ework:mainfrom
justinbhopper:codeframe-regex-bug
Aug 25, 2025
Merged

fix(runtime): reset lastIndex before reusing regexes#564
danielroe merged 1 commit intofi3ework:mainfrom
justinbhopper:codeframe-regex-bug

Conversation

@justinbhopper
Copy link
Contributor

This fixes a bug where the codeFrameRE regex will sometimes return false when test(frame) is run, because the lastIndex is not being reset before each use. This causes a bug where the code frame will sometimes not display in the overlay.

@netlify
Copy link

netlify bot commented Aug 22, 2025

Deploy Preview for vite-plugin-checker ready!

Name Link
🔨 Latest commit 7bff249
🔍 Latest deploy log https://app.netlify.com/projects/vite-plugin-checker/deploys/68a87add69dee70008a3cf76
😎 Deploy Preview https://deploy-preview-564--vite-plugin-checker.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.

@pkg-pr-new
Copy link

pkg-pr-new bot commented Aug 22, 2025

Open in StackBlitz

npm i https://pkg.pr.new/vite-plugin-checker@564

commit: 7bff249

@danielroe danielroe changed the title fix: Reset lastIndex on before reusing regexes fix(runtime): reset lastIndex on before reusing regexes Aug 25, 2025
@danielroe danielroe changed the title fix(runtime): reset lastIndex on before reusing regexes fix(runtime): reset lastIndex before reusing regexes Aug 25, 2025
@danielroe danielroe merged commit f4072d2 into fi3ework:main Aug 25, 2025
10 checks passed
renovate bot added a commit to andrei-picus-tink/auto-renovate that referenced this pull request Sep 6, 2025
| datasource | package             | from   | to     |
| ---------- | ------------------- | ------ | ------ |
| npm        | vite-plugin-checker | 0.10.2 | 0.10.3 |


## [v0.10.3](https://github.com/fi3ework/vite-plugin-checker/releases/tag/vite-plugin-checker%400.10.3)

#####    🐞 Bug Fixes

- **biome**:
  - Use absolute path in biome diagnostics  -  by [@KurtGokhan](https://github.com/KurtGokhan) in [#555](fi3ework/vite-plugin-checker#555) [<samp>(4a38b)</samp>](fi3ework/vite-plugin-checker@4a38b03)
- **runtime**:
  - Check for existing overlay element before injecting one  -  by [@zouhangwithsweet](https://github.com/zouhangwithsweet) in [#563](fi3ework/vite-plugin-checker#563) [<samp>(c742e)</samp>](fi3ework/vite-plugin-checker@c742e7f)
  - Reset `lastIndex` before reusing regexes  -  by [@justinbhopper](https://github.com/justinbhopper) in [#564](fi3ework/vite-plugin-checker#564) [<samp>(f4072)</samp>](fi3ework/vite-plugin-checker@f4072d2)

#####     [View changes on GitHub](https://github.com/fi3ework/vite-plugin-checker/compare/vite-plugin-checker@0.10.2...vite-plugin-checker@0.10.3)
renovate bot added a commit to andrei-picus-tink/auto-renovate that referenced this pull request Sep 7, 2025
| datasource | package             | from   | to     |
| ---------- | ------------------- | ------ | ------ |
| npm        | vite-plugin-checker | 0.10.2 | 0.10.3 |


## [v0.10.3](https://github.com/fi3ework/vite-plugin-checker/releases/tag/vite-plugin-checker%400.10.3)

#####    🐞 Bug Fixes

- **biome**:
  - Use absolute path in biome diagnostics  -  by [@KurtGokhan](https://github.com/KurtGokhan) in [#555](fi3ework/vite-plugin-checker#555) [<samp>(4a38b)</samp>](fi3ework/vite-plugin-checker@4a38b03)
- **runtime**:
  - Check for existing overlay element before injecting one  -  by [@zouhangwithsweet](https://github.com/zouhangwithsweet) in [#563](fi3ework/vite-plugin-checker#563) [<samp>(c742e)</samp>](fi3ework/vite-plugin-checker@c742e7f)
  - Reset `lastIndex` before reusing regexes  -  by [@justinbhopper](https://github.com/justinbhopper) in [#564](fi3ework/vite-plugin-checker#564) [<samp>(f4072)</samp>](fi3ework/vite-plugin-checker@f4072d2)

#####     [View changes on GitHub](https://github.com/fi3ework/vite-plugin-checker/compare/vite-plugin-checker@0.10.2...vite-plugin-checker@0.10.3)
renovate bot added a commit to andrei-picus-tink/auto-renovate that referenced this pull request Sep 8, 2025
| datasource | package             | from   | to     |
| ---------- | ------------------- | ------ | ------ |
| npm        | vite-plugin-checker | 0.10.2 | 0.10.3 |


## [v0.10.3](https://github.com/fi3ework/vite-plugin-checker/releases/tag/vite-plugin-checker%400.10.3)

#####    🐞 Bug Fixes

- **biome**:
  - Use absolute path in biome diagnostics  -  by [@KurtGokhan](https://github.com/KurtGokhan) in [#555](fi3ework/vite-plugin-checker#555) [<samp>(4a38b)</samp>](fi3ework/vite-plugin-checker@4a38b03)
- **runtime**:
  - Check for existing overlay element before injecting one  -  by [@zouhangwithsweet](https://github.com/zouhangwithsweet) in [#563](fi3ework/vite-plugin-checker#563) [<samp>(c742e)</samp>](fi3ework/vite-plugin-checker@c742e7f)
  - Reset `lastIndex` before reusing regexes  -  by [@justinbhopper](https://github.com/justinbhopper) in [#564](fi3ework/vite-plugin-checker#564) [<samp>(f4072)</samp>](fi3ework/vite-plugin-checker@f4072d2)

#####     [View changes on GitHub](https://github.com/fi3ework/vite-plugin-checker/compare/vite-plugin-checker@0.10.2...vite-plugin-checker@0.10.3)
renovate bot added a commit to andrei-picus-tink/auto-renovate that referenced this pull request Sep 10, 2025
| datasource | package             | from   | to     |
| ---------- | ------------------- | ------ | ------ |
| npm        | vite-plugin-checker | 0.10.2 | 0.10.3 |


## [v0.10.3](https://github.com/fi3ework/vite-plugin-checker/releases/tag/vite-plugin-checker%400.10.3)

#####    🐞 Bug Fixes

- **biome**:
  - Use absolute path in biome diagnostics  -  by [@KurtGokhan](https://github.com/KurtGokhan) in [#555](fi3ework/vite-plugin-checker#555) [<samp>(4a38b)</samp>](fi3ework/vite-plugin-checker@4a38b03)
- **runtime**:
  - Check for existing overlay element before injecting one  -  by [@zouhangwithsweet](https://github.com/zouhangwithsweet) in [#563](fi3ework/vite-plugin-checker#563) [<samp>(c742e)</samp>](fi3ework/vite-plugin-checker@c742e7f)
  - Reset `lastIndex` before reusing regexes  -  by [@justinbhopper](https://github.com/justinbhopper) in [#564](fi3ework/vite-plugin-checker#564) [<samp>(f4072)</samp>](fi3ework/vite-plugin-checker@f4072d2)

#####     [View changes on GitHub](https://github.com/fi3ework/vite-plugin-checker/compare/vite-plugin-checker@0.10.2...vite-plugin-checker@0.10.3)
renovate bot added a commit to andrei-picus-tink/auto-renovate that referenced this pull request Sep 14, 2025
| datasource | package             | from   | to     |
| ---------- | ------------------- | ------ | ------ |
| npm        | vite-plugin-checker | 0.10.2 | 0.10.3 |


## [v0.10.3](https://github.com/fi3ework/vite-plugin-checker/releases/tag/vite-plugin-checker%400.10.3)

#####    🐞 Bug Fixes

- **biome**:
  - Use absolute path in biome diagnostics  -  by [@KurtGokhan](https://github.com/KurtGokhan) in [#555](fi3ework/vite-plugin-checker#555) [<samp>(4a38b)</samp>](fi3ework/vite-plugin-checker@4a38b03)
- **runtime**:
  - Check for existing overlay element before injecting one  -  by [@zouhangwithsweet](https://github.com/zouhangwithsweet) in [#563](fi3ework/vite-plugin-checker#563) [<samp>(c742e)</samp>](fi3ework/vite-plugin-checker@c742e7f)
  - Reset `lastIndex` before reusing regexes  -  by [@justinbhopper](https://github.com/justinbhopper) in [#564](fi3ework/vite-plugin-checker#564) [<samp>(f4072)</samp>](fi3ework/vite-plugin-checker@f4072d2)

#####     [View changes on GitHub](https://github.com/fi3ework/vite-plugin-checker/compare/vite-plugin-checker@0.10.2...vite-plugin-checker@0.10.3)
renovate bot added a commit to andrei-picus-tink/auto-renovate that referenced this pull request Sep 17, 2025
| datasource | package             | from   | to     |
| ---------- | ------------------- | ------ | ------ |
| npm        | vite-plugin-checker | 0.10.2 | 0.10.3 |


## [v0.10.3](https://github.com/fi3ework/vite-plugin-checker/releases/tag/vite-plugin-checker%400.10.3)

#####    🐞 Bug Fixes

- **biome**:
  - Use absolute path in biome diagnostics  -  by [@KurtGokhan](https://github.com/KurtGokhan) in [#555](fi3ework/vite-plugin-checker#555) [<samp>(4a38b)</samp>](fi3ework/vite-plugin-checker@4a38b03)
- **runtime**:
  - Check for existing overlay element before injecting one  -  by [@zouhangwithsweet](https://github.com/zouhangwithsweet) in [#563](fi3ework/vite-plugin-checker#563) [<samp>(c742e)</samp>](fi3ework/vite-plugin-checker@c742e7f)
  - Reset `lastIndex` before reusing regexes  -  by [@justinbhopper](https://github.com/justinbhopper) in [#564](fi3ework/vite-plugin-checker#564) [<samp>(f4072)</samp>](fi3ework/vite-plugin-checker@f4072d2)

#####     [View changes on GitHub](https://github.com/fi3ework/vite-plugin-checker/compare/vite-plugin-checker@0.10.2...vite-plugin-checker@0.10.3)
renovate bot added a commit to andrei-picus-tink/auto-renovate that referenced this pull request Sep 18, 2025
| datasource | package             | from   | to     |
| ---------- | ------------------- | ------ | ------ |
| npm        | vite-plugin-checker | 0.10.2 | 0.10.3 |


## [v0.10.3](https://github.com/fi3ework/vite-plugin-checker/releases/tag/vite-plugin-checker%400.10.3)

#####    🐞 Bug Fixes

- **biome**:
  - Use absolute path in biome diagnostics  -  by [@KurtGokhan](https://github.com/KurtGokhan) in [#555](fi3ework/vite-plugin-checker#555) [<samp>(4a38b)</samp>](fi3ework/vite-plugin-checker@4a38b03)
- **runtime**:
  - Check for existing overlay element before injecting one  -  by [@zouhangwithsweet](https://github.com/zouhangwithsweet) in [#563](fi3ework/vite-plugin-checker#563) [<samp>(c742e)</samp>](fi3ework/vite-plugin-checker@c742e7f)
  - Reset `lastIndex` before reusing regexes  -  by [@justinbhopper](https://github.com/justinbhopper) in [#564](fi3ework/vite-plugin-checker#564) [<samp>(f4072)</samp>](fi3ework/vite-plugin-checker@f4072d2)

#####     [View changes on GitHub](https://github.com/fi3ework/vite-plugin-checker/compare/vite-plugin-checker@0.10.2...vite-plugin-checker@0.10.3)
renovate bot added a commit to andrei-picus-tink/auto-renovate that referenced this pull request Sep 19, 2025
| datasource | package             | from   | to     |
| ---------- | ------------------- | ------ | ------ |
| npm        | vite-plugin-checker | 0.10.2 | 0.10.3 |


## [v0.10.3](https://github.com/fi3ework/vite-plugin-checker/releases/tag/vite-plugin-checker%400.10.3)

#####    🐞 Bug Fixes

- **biome**:
  - Use absolute path in biome diagnostics  -  by [@KurtGokhan](https://github.com/KurtGokhan) in [#555](fi3ework/vite-plugin-checker#555) [<samp>(4a38b)</samp>](fi3ework/vite-plugin-checker@4a38b03)
- **runtime**:
  - Check for existing overlay element before injecting one  -  by [@zouhangwithsweet](https://github.com/zouhangwithsweet) in [#563](fi3ework/vite-plugin-checker#563) [<samp>(c742e)</samp>](fi3ework/vite-plugin-checker@c742e7f)
  - Reset `lastIndex` before reusing regexes  -  by [@justinbhopper](https://github.com/justinbhopper) in [#564](fi3ework/vite-plugin-checker#564) [<samp>(f4072)</samp>](fi3ework/vite-plugin-checker@f4072d2)

#####     [View changes on GitHub](https://github.com/fi3ework/vite-plugin-checker/compare/vite-plugin-checker@0.10.2...vite-plugin-checker@0.10.3)
renovate bot added a commit to andrei-picus-tink/auto-renovate that referenced this pull request Sep 20, 2025
| datasource | package             | from   | to     |
| ---------- | ------------------- | ------ | ------ |
| npm        | vite-plugin-checker | 0.10.2 | 0.10.3 |


## [v0.10.3](https://github.com/fi3ework/vite-plugin-checker/releases/tag/vite-plugin-checker%400.10.3)

#####    🐞 Bug Fixes

- **biome**:
  - Use absolute path in biome diagnostics  -  by [@KurtGokhan](https://github.com/KurtGokhan) in [#555](fi3ework/vite-plugin-checker#555) [<samp>(4a38b)</samp>](fi3ework/vite-plugin-checker@4a38b03)
- **runtime**:
  - Check for existing overlay element before injecting one  -  by [@zouhangwithsweet](https://github.com/zouhangwithsweet) in [#563](fi3ework/vite-plugin-checker#563) [<samp>(c742e)</samp>](fi3ework/vite-plugin-checker@c742e7f)
  - Reset `lastIndex` before reusing regexes  -  by [@justinbhopper](https://github.com/justinbhopper) in [#564](fi3ework/vite-plugin-checker#564) [<samp>(f4072)</samp>](fi3ework/vite-plugin-checker@f4072d2)

#####     [View changes on GitHub](https://github.com/fi3ework/vite-plugin-checker/compare/vite-plugin-checker@0.10.2...vite-plugin-checker@0.10.3)
renovate bot added a commit to andrei-picus-tink/auto-renovate that referenced this pull request Sep 21, 2025
| datasource | package             | from   | to     |
| ---------- | ------------------- | ------ | ------ |
| npm        | vite-plugin-checker | 0.10.2 | 0.10.3 |


## [v0.10.3](https://github.com/fi3ework/vite-plugin-checker/releases/tag/vite-plugin-checker%400.10.3)

#####    🐞 Bug Fixes

- **biome**:
  - Use absolute path in biome diagnostics  -  by [@KurtGokhan](https://github.com/KurtGokhan) in [#555](fi3ework/vite-plugin-checker#555) [<samp>(4a38b)</samp>](fi3ework/vite-plugin-checker@4a38b03)
- **runtime**:
  - Check for existing overlay element before injecting one  -  by [@zouhangwithsweet](https://github.com/zouhangwithsweet) in [#563](fi3ework/vite-plugin-checker#563) [<samp>(c742e)</samp>](fi3ework/vite-plugin-checker@c742e7f)
  - Reset `lastIndex` before reusing regexes  -  by [@justinbhopper](https://github.com/justinbhopper) in [#564](fi3ework/vite-plugin-checker#564) [<samp>(f4072)</samp>](fi3ework/vite-plugin-checker@f4072d2)

#####     [View changes on GitHub](https://github.com/fi3ework/vite-plugin-checker/compare/vite-plugin-checker@0.10.2...vite-plugin-checker@0.10.3)
renovate bot added a commit to andrei-picus-tink/auto-renovate that referenced this pull request Sep 22, 2025
| datasource | package             | from   | to     |
| ---------- | ------------------- | ------ | ------ |
| npm        | vite-plugin-checker | 0.10.2 | 0.10.3 |


## [v0.10.3](https://github.com/fi3ework/vite-plugin-checker/releases/tag/vite-plugin-checker%400.10.3)

#####    🐞 Bug Fixes

- **biome**:
  - Use absolute path in biome diagnostics  -  by [@KurtGokhan](https://github.com/KurtGokhan) in [#555](fi3ework/vite-plugin-checker#555) [<samp>(4a38b)</samp>](fi3ework/vite-plugin-checker@4a38b03)
- **runtime**:
  - Check for existing overlay element before injecting one  -  by [@zouhangwithsweet](https://github.com/zouhangwithsweet) in [#563](fi3ework/vite-plugin-checker#563) [<samp>(c742e)</samp>](fi3ework/vite-plugin-checker@c742e7f)
  - Reset `lastIndex` before reusing regexes  -  by [@justinbhopper](https://github.com/justinbhopper) in [#564](fi3ework/vite-plugin-checker#564) [<samp>(f4072)</samp>](fi3ework/vite-plugin-checker@f4072d2)

#####     [View changes on GitHub](https://github.com/fi3ework/vite-plugin-checker/compare/vite-plugin-checker@0.10.2...vite-plugin-checker@0.10.3)
renovate bot added a commit to andrei-picus-tink/auto-renovate that referenced this pull request Sep 23, 2025
| datasource | package             | from   | to     |
| ---------- | ------------------- | ------ | ------ |
| npm        | vite-plugin-checker | 0.10.2 | 0.10.3 |


## [v0.10.3](https://github.com/fi3ework/vite-plugin-checker/releases/tag/vite-plugin-checker%400.10.3)

#####    🐞 Bug Fixes

- **biome**:
  - Use absolute path in biome diagnostics  -  by [@KurtGokhan](https://github.com/KurtGokhan) in [#555](fi3ework/vite-plugin-checker#555) [<samp>(4a38b)</samp>](fi3ework/vite-plugin-checker@4a38b03)
- **runtime**:
  - Check for existing overlay element before injecting one  -  by [@zouhangwithsweet](https://github.com/zouhangwithsweet) in [#563](fi3ework/vite-plugin-checker#563) [<samp>(c742e)</samp>](fi3ework/vite-plugin-checker@c742e7f)
  - Reset `lastIndex` before reusing regexes  -  by [@justinbhopper](https://github.com/justinbhopper) in [#564](fi3ework/vite-plugin-checker#564) [<samp>(f4072)</samp>](fi3ework/vite-plugin-checker@f4072d2)

#####     [View changes on GitHub](https://github.com/fi3ework/vite-plugin-checker/compare/vite-plugin-checker@0.10.2...vite-plugin-checker@0.10.3)
renovate bot added a commit to andrei-picus-tink/auto-renovate that referenced this pull request Sep 25, 2025
| datasource | package             | from   | to     |
| ---------- | ------------------- | ------ | ------ |
| npm        | vite-plugin-checker | 0.10.2 | 0.10.3 |


## [v0.10.3](https://github.com/fi3ework/vite-plugin-checker/releases/tag/vite-plugin-checker%400.10.3)

#####    🐞 Bug Fixes

- **biome**:
  - Use absolute path in biome diagnostics  -  by [@KurtGokhan](https://github.com/KurtGokhan) in [#555](fi3ework/vite-plugin-checker#555) [<samp>(4a38b)</samp>](fi3ework/vite-plugin-checker@4a38b03)
- **runtime**:
  - Check for existing overlay element before injecting one  -  by [@zouhangwithsweet](https://github.com/zouhangwithsweet) in [#563](fi3ework/vite-plugin-checker#563) [<samp>(c742e)</samp>](fi3ework/vite-plugin-checker@c742e7f)
  - Reset `lastIndex` before reusing regexes  -  by [@justinbhopper](https://github.com/justinbhopper) in [#564](fi3ework/vite-plugin-checker#564) [<samp>(f4072)</samp>](fi3ework/vite-plugin-checker@f4072d2)

#####     [View changes on GitHub](https://github.com/fi3ework/vite-plugin-checker/compare/vite-plugin-checker@0.10.2...vite-plugin-checker@0.10.3)
renovate bot added a commit to andrei-picus-tink/auto-renovate that referenced this pull request Sep 26, 2025
| datasource | package             | from   | to     |
| ---------- | ------------------- | ------ | ------ |
| npm        | vite-plugin-checker | 0.10.2 | 0.10.3 |


## [v0.10.3](https://github.com/fi3ework/vite-plugin-checker/releases/tag/vite-plugin-checker%400.10.3)

#####    🐞 Bug Fixes

- **biome**:
  - Use absolute path in biome diagnostics  -  by [@KurtGokhan](https://github.com/KurtGokhan) in [#555](fi3ework/vite-plugin-checker#555) [<samp>(4a38b)</samp>](fi3ework/vite-plugin-checker@4a38b03)
- **runtime**:
  - Check for existing overlay element before injecting one  -  by [@zouhangwithsweet](https://github.com/zouhangwithsweet) in [#563](fi3ework/vite-plugin-checker#563) [<samp>(c742e)</samp>](fi3ework/vite-plugin-checker@c742e7f)
  - Reset `lastIndex` before reusing regexes  -  by [@justinbhopper](https://github.com/justinbhopper) in [#564](fi3ework/vite-plugin-checker#564) [<samp>(f4072)</samp>](fi3ework/vite-plugin-checker@f4072d2)

#####     [View changes on GitHub](https://github.com/fi3ework/vite-plugin-checker/compare/vite-plugin-checker@0.10.2...vite-plugin-checker@0.10.3)
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