-
Notifications
You must be signed in to change notification settings - Fork 22.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reference for stage 3 regex-escaping #36928
Conversation
Preview URLs
Flaws (1)Note! 4 documents with no flaws that don't need to be listed. 🎉 URL:
External URLs (1)URL:
(comment last updated: 2024-11-29 02:59:28) |
files/en-us/web/javascript/reference/global_objects/regexp/escape/index.md
Show resolved
Hide resolved
files/en-us/web/javascript/reference/global_objects/regexp/escape/index.md
Outdated
Show resolved
Hide resolved
files/en-us/web/javascript/reference/global_objects/regexp/escape/index.md
Show resolved
Hide resolved
files/en-us/web/javascript/reference/global_objects/regexp/escape/index.md
Outdated
Show resolved
Hide resolved
@Josh-Cena Looks great. I don't fully understand this gist linked from the proposal. But I take it to mean there might be risky places to insert the literal, even escaped. I assume this is to an issue because you would have mentioned it. As an aside, you link to the escape sequence https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Regular_expressions#escape_sequences |
files/en-us/web/javascript/reference/global_objects/string/replaceall/index.md
Outdated
Show resolved
Hide resolved
Co-authored-by: Hamish Willee <[email protected]>
files/en-us/web/javascript/reference/global_objects/regexp/escape/index.md
Outdated
Show resolved
Hide resolved
files/en-us/web/javascript/reference/global_objects/regexp/escape/index.md
Outdated
Show resolved
Hide resolved
files/en-us/web/javascript/reference/global_objects/regexp/escape/index.md
Outdated
Show resolved
Hide resolved
files/en-us/web/javascript/reference/global_objects/regexp/escape/index.md
Outdated
Show resolved
Hide resolved
|
||
## See also | ||
|
||
- [Polyfill of `RegExp.escape` in `core-js`](https://github.com/zloirock/core-js#regexp-escaping) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
are you still only linking to core-js polyfills? if not, it'd be great to include https://www.npmjs.com/package/regexp.escape
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I personally would not object, but I would need to see what others say. In the meantime let's hold the same policy that other maintainers have found acceptable, which is to only consistently include core-js polyfills. Hope you would understand.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure. Where can I go to revisit this discussion? Last time I tried it never went anywhere, and another polyfill maintainer tried recently and it seemed to get overly heated.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll discuss it internally.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks we still hold https://github.com/orgs/mdn/discussions/475 as our conclusion; i.e. as long as someone steps out to endorse es-shims we are happy to add it, and we should formally document a list of trusted polyfill sources and reject everything not in this list (with another process to endorse more). I'm happy to add es-shims, but I'm too busy to initiate the process in the next few months.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Who would need to endorse it? Who endorsed core-js originally? Does it require an MDN team member to initiate the process, or can I?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Who endorsed core-js originally?
I think that endorsement was implicitly given due to its wide usage via Babel. Happy to formalize the decision in the meta docs.
Who would need to endorse it? Does it require an MDN team member to initiate the process, or can I?
Just someone who raised a PR and got it merged without any objections. We don't know exactly yet as it's entirely new to us. I bet you can, too, as long as you get multiple feedback on your PR. I imagine it would be put under either https://developer.mozilla.org/en-US/docs/MDN/Writing_guidelines/What_we_write/Criteria_for_inclusion or https://developer.mozilla.org/en-US/docs/MDN/Writing_guidelines/Writing_style_guide#external_links, as a new section called "Inclusion of polyfills" that basically restates the conclusion in https://github.com/orgs/mdn/discussions/475 and say "we only allow polyfills from trusted sources, which are the following:"
…ape/index.md Co-authored-by: Kevin Gibbons <[email protected]>
files/en-us/web/javascript/reference/global_objects/regexp/escape/index.md
Outdated
Show resolved
Hide resolved
files/en-us/web/javascript/reference/global_objects/regexp/escape/index.md
Outdated
Show resolved
Hide resolved
…laceall/index.md Co-authored-by: Hamish Willee <[email protected]>
…ape/index.md Co-authored-by: Hamish Willee <[email protected]>
This is good to go from my perspective. I'll approve this when you let me know the discussions with the technical experts have wound down. |
…ape/index.md Co-authored-by: Kevin Gibbons <[email protected]>
I believe I've addressed all reviews. |
Thanks very much for this @Josh-Cena - also @bakkot @ljharb |
Part of #36915