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) |
|
@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 |
Co-authored-by: Hamish Willee <hamishwillee@gmail.com>
|
|
||
| ## See also | ||
|
|
||
| - [Polyfill of `RegExp.escape` in `core-js`](https://github.com/zloirock/core-js#regexp-escaping) |
There was a problem hiding this comment.
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.
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.
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.
I'll discuss it internally.
There was a problem hiding this comment.
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.
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.
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 <bakkot@gmail.com>
…laceall/index.md Co-authored-by: Hamish Willee <hamishwillee@gmail.com>
…ape/index.md Co-authored-by: Hamish Willee <hamishwillee@gmail.com>
|
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 <bakkot@gmail.com>
|
I believe I've addressed all reviews. |
|
Thanks very much for this @Josh-Cena - also @bakkot @ljharb |
Part of #36915