Skip to content

chore: vendor all third-party JS dependencies locally#4

Merged
hartmark merged 2 commits into
hartmark:mainfrom
marcusds:main
May 25, 2026
Merged

chore: vendor all third-party JS dependencies locally#4
hartmark merged 2 commits into
hartmark:mainfrom
marcusds:main

Conversation

@marcusds
Copy link
Copy Markdown
Contributor

Replaces CDN loads (Cloudflare, unpkg) and shields.io badge image with local copies in vendor/ so the app makes zero external network requests.

This increases privacy and security by not doing any 3rd party requests at all.

Replaces CDN loads (Cloudflare, unpkg) and shields.io badge image with
local copies in vendor/ so the app makes zero external network requests.
@hartmark
Copy link
Copy Markdown
Owner

Thanks for your contribution, I verified that the files was indeed the ones on CDN by these commands

$ gh pr checkout 4
remote: Enumerating objects: 13, done.
remote: Counting objects: 100% (13/13), done.
remote: Compressing objects: 100% (7/7), done.
remote: Total 10 (delta 3), reused 10 (delta 3), pack-reused 0 (from 0)
Unpacking objects: 100% (10/10), 145.72 KiB | 738.00 KiB/s, done.
From github.com:hartmark/DnaHacker
 * [new ref]         refs/pull/4/head -> marcusds/main
Switched to branch 'marcusds/main'

markus@bernard ~/code/DnaHacker (marcusds/main*) $ rm vendor/*
zsh: sure you want to delete all 5 files in /home/markus/code/DnaHacker/vendor [yn]? y
markus@bernard ~/code/DnaHacker (marcusds/main*) $ git status
On branch marcusds/main
Changes not staged for commit:
  (use "git add/rm <file>..." to update what will be committed)
  (use "git restore <file>..." to discard changes in working directory)
        deleted:    vendor/github-badge.svg
        deleted:    vendor/jspdf.plugin.autotable.min.js
        deleted:    vendor/jspdf.umd.min.js
        deleted:    vendor/papaparse.min.js
        deleted:    vendor/unzipit.module.js

no changes added to commit (use "git add" and/or "git commit -a")
markus@bernard ~/code/DnaHacker (marcusds/main*) $ curl -L "https://cdnjs.cloudflare.com/ajax/libs/PapaParse/5.3.0/papaparse.min.js" -o vendor/papaparse.min.js
curl -L "https://cdnjs.cloudflare.com/ajax/libs/jspdf/2.5.1/jspdf.umd.min.js" -o vendor/jspdf.umd.min.js
curl -L "https://cdnjs.cloudflare.com/ajax/libs/jspdf-autotable/3.5.23/jspdf.plugin.autotable.min.js" -o vendor/jspdf.plugin.autotable.min.js
curl -L "https://img.shields.io/badge/GitHub-Repository-blue?logo=github" -o vendor/github-badge.svg
curl -L "https://unpkg.com/unzipit@1.4.0/dist/unzipit.module.js" -o vendor/unzipit.module.js
  % Total    % Received % Xferd  Average Speed  Time    Time    Time   Current
                                 Dload  Upload  Total   Spent   Left   Speed
100  19104   0  19104   0      0 537.8k      0                              0
  % Total    % Received % Xferd  Average Speed  Time    Time    Time   Current
                                 Dload  Upload  Total   Spent   Left   Speed
100 355.9k   0 355.9k   0      0  7.81M      0                              0
  % Total    % Received % Xferd  Average Speed  Time    Time    Time   Current
                                 Dload  Upload  Total   Spent   Left   Speed
100  36270   0  36270   0      0  1.18M      0                              0
  % Total    % Received % Xferd  Average Speed  Time    Time    Time   Current
                                 Dload  Upload  Total   Spent   Left   Speed
100   2690   0   2690   0      0  72836      0                              0
  % Total    % Received % Xferd  Average Speed  Time    Time    Time   Current
                                 Dload  Upload  Total   Spent   Left   Speed
100  44953 100  44953   0      0  1.22M      0                              0
markus@bernard ~/code/DnaHacker (marcusds/main*) $ git status
On branch marcusds/main
Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git restore <file>..." to discard changes in working directory)
        modified:   vendor/github-badge.svg

no changes added to commit (use "git add" and/or "git commit -a")

It seems that the badge may have modified on github, the one you provided and the one I got is different. I've pushed a small fix replacing with the one I got.

image

@hartmark hartmark merged commit 58eff4e into hartmark:main May 25, 2026
@hartmark
Copy link
Copy Markdown
Owner

Merged! thanks for your contribution!

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.

2 participants