chore: vendor streaming-markdown@0.2.15, remove CDN dependency - #924
Closed
bsgdigital wants to merge 1 commit into
Closed
bsgdigital wants to merge 1 commit into
bsgdigital wants to merge 1 commit into
Conversation
Self-host smd.min.js (12.6 KB) under static/vendor/ so the app works fully offline and without any CDN availability requirement. - Add static/vendor/smd.min.js (npm:streaming-markdown@0.2.15) - Update index.html to import from /static/vendor/smd.min.js ES module `import` still cannot carry an integrity= attribute (W3C limitation applies equally to local paths), but the file is now committed to the repo and version-controlled rather than fetched from a third-party CDN at runtime. The sha384 hash is documented in a comment for auditing: sha384-T6r95ocN9t3W8tUK2Fa6FPaO7bJryyjyW0WCalrUnpgtm2qXr5xcN4vwPYEJ6vHa All 2060 tests pass.
Collaborator
|
Triage review — companion to #923 This PR directly addresses the CDN-dependency concern raised in the #923 review:
What it does:
Merge order note: This PR should be merged after #923, since it updates the same Verification:
Clean, focused change. Recommend reviewing alongside #923. |
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.
What
Self-hosts
streaming-markdown@0.2.15instead of loading it from jsDelivr CDN.static/vendor/smd.min.js(12.6 KB, committed from npm tarball)index.htmlimport to/static/vendor/smd.min.jsWhy
SRI note
ES module
importcannot carry anintegrity=attribute regardless of whether the URL is remote or local (W3C limitation). Self-hosting is the practical alternative — the file is repo-controlled. The sha384 hash is documented in a comment for auditing:This matches the hash already noted in the original PR #923 comment.
Tests
2060 tests pass (no changes to test suite needed).