Skip to content

ref(core): Extract debug ID injection into separate plugins#230

Merged
lforst merged 8 commits into
mainfrom
lforst-extract-debug-id
May 3, 2023
Merged

ref(core): Extract debug ID injection into separate plugins#230
lforst merged 8 commits into
mainfrom
lforst-extract-debug-id

Conversation

@lforst
Copy link
Copy Markdown

@lforst lforst commented May 2, 2023

Simplifies debug id injection logic for esbuild and webpack and extracts the logic into separate plugins for every bundler.

@lforst lforst force-pushed the lforst-extract-debug-id branch from 9ef07df to 55235fc Compare May 2, 2023 15:16
const commentUseStrictRegex =
/^(?:\s*|\/\*(.|\r|\n)*?\*\/|\/\/.*?[\n\r])*(?:"use strict";|'use strict';)?/;

if (code.match(commentUseStrictRegex)?.[0]) {

Check failure

Code scanning / CodeQL

Polynomial regular expression used on uncontrolled data

This [regular expression](1) that depends on [library input](2) may run slow on strings starting with '//' and with many repetitions of '*///'.
@lforst lforst mentioned this pull request May 2, 2023
@lforst lforst marked this pull request as ready for review May 2, 2023 19:41
@lforst lforst requested review from AbhiPrasad and mydea May 3, 2023 07:26
@lforst lforst merged commit 66f7971 into main May 3, 2023
@lforst lforst deleted the lforst-extract-debug-id branch May 3, 2023 09:14
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