draft: add userscript @require loading#452
Draft
AlexTzib wants to merge 1 commit into
Draft
Conversation
Contributor
Author
|
Hi @Manuito83, I re-reviewed this draft and I think keeping it draft is the right call for now. The approach is conservative in one good way: it fetches @require dependencies when the script is saved/updated, then injects the cached source before the main script, so page loads do not need network calls. The main policy questions I see before this should be marked ready are:
I do not think these are CI issues. They are more about the security and UX policy we want for third-party dependency loading. |
Owner
|
I can't say. This would have to be @Kwack-Kwack |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hi @Manuito83, opening this one as a draft because @require support changes how third-party code is loaded and injected. I would like your opinion before treating it as ready.
This is a conservative first pass from the older DX/userscript compatibility work in #289. Instead of fetching dependencies during every page load, it resolves @require URLs when a script is added or updated, stores the fetched dependency source with the userscript model, and prepends those dependencies before the main script during injection.
What changed:
Questions before this should be considered mergeable:
I kept this separate from the safer grant-warning/docs/test PRs because the review surface and risk are higher.