-
Notifications
You must be signed in to change notification settings - Fork 20
Use specific fork from iv‐org YouTube.js
Émilien (perso) edited this page Mar 25, 2025
·
5 revisions
This tutorial is for using a specific fork from iv-org/YouTube.js, like using new commits that are still not in YouTube.js itself.
- Create a new branch in https://github.com/iv-org/YouTube.js
- Update the master branch against the new commits from LuanRT/YouTube.js (can use the Sync fork button in GitHub)
- Do your things, like apply commits from an existing PR at https://github.com/LuanRT/YouTube.js
- Once your tests are correct, run these new commands:
This will create a folder called "deno".
npm ci npm run build:deno
- Delete existing deno branch if it exists:
git branch -D deno
. - Create a new branch:
git switch --orphan deno
- Now create a file called
deno.ts
with this content: https://github.com/LuanRT/YouTube.js/blob/deno/deno.tswget https://github.com/iv-org/YouTube.js/raw/refs/heads/deno/deno.ts
- Add deno.ts and deno folder to git tracking, commit and push:
git add deno.ts deno/ git commit -m "changes from branch XXX" git push -f origin deno
- Go to deno.json in invidious-companion code and change the URLs from
LuanRT/YouTube.js/refs/tags/vXX.X.X-deno
toiv-org/YouTube.js/LATEST_COMMITID_FROM_DENO_BRANCH
diff --git a/deno.json b/deno.json index 02ea3a2..bb78869 100644 --- a/deno.json +++ b/deno.json @@ -6,10 +6,10 @@ "imports": { "hono": "jsr:@hono/[email protected]", "@std/toml": "jsr:@std/[email protected]", - "youtubei.js": "https://raw.githubusercontent.com/LuanRT/YouTube.js/refs/tags/v13.1.0-deno/deno.ts", - "youtubei.js/Utils": "https://raw.githubusercontent.com/LuanRT/YouTube.js/refs/tags/v13.1.0-deno/deno/src/utils/Utils.ts", - "youtubei.js/NavigationEndpoint": "https://raw.githubusercontent.com/LuanRT/YouTube.js/refs/tags/v13.1.0-deno/deno/src/parser/classes/NavigationEndpoint.ts", - "youtubei.js/PlayerCaptionsTracklist": "https://raw.githubusercontent.com/LuanRT/YouTube.js/refs/tags/v13.1.0-deno/deno/src/parser/classes/PlayerCaptionsTracklist.ts", + "youtubei.js": "https://raw.githubusercontent.com/iv-org/YouTube.js/LATEST_COMMITID_FROM_DENO_BRANCH/deno.ts", + "youtubei.js/Utils": "https://raw.githubusercontent.com/iv-org/YouTube.js/LATEST_COMMITID_FROM_DENO_BRANCH/deno/src/utils/Utils.ts", + "youtubei.js/NavigationEndpoint": "https://raw.githubusercontent.com/iv-org/YouTube.js/LATEST_COMMITID_FROM_DENO_BRANCH/deno/src/parser/classes/NavigationEndpoint.ts", + "youtubei.js/PlayerCaptionsTracklist": "https://raw.githubusercontent.com/iv-org/YouTube.js/LATEST_COMMITID_FROM_DENO_BRANCH/deno/src/parser/classes/PlayerCaptionsTracklist.ts", "jsdom": "npm:[email protected]", "bgutils": "https://esm.sh/[email protected]", "estree": "https://esm.sh/@types/[email protected]",
- Update deno.lock using:
SERVER_SECRET_KEY=yoh3deiSh3Aih1iw deno task dev deno check src/**
- Create a PR for these changes and merge it if it's working great.
Once the changes are upstreamed to YouTube.js, please revert to YouTube.js repo.