From 4c57c4126320688c781d1f5637fb2fa5a33315e5 Mon Sep 17 00:00:00 2001 From: bashonly Date: Sat, 13 Dec 2025 17:21:03 -0600 Subject: [PATCH 1/8] README cleanup --- README.md | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 758c7bb..50d7de2 100644 --- a/README.md +++ b/README.md @@ -14,8 +14,8 @@ pip install -U yt-dlp-ejs The project provides lockfiles for every supported package manager. -If you only have Python and a JS runtime you may instead invoke `./hatch_build.py`, -which will transparently invoke one of the supported JS runtimes and run the build with it. +If you only have Python and a JS runtime, then you may instead run `./hatch_build.py`. +This will transparently invoke one of the supported JS runtimes for the build. If you notice differences between different runtimes' builds please open an issue [here](). @@ -67,7 +67,8 @@ node --test ## Upgrading packages When upgrading packages in package.json, all lockfiles must be updated simultaneously. -To do this, run the follosing commands: +To do this, run the following commands: + ```bash # Upgrade packages automatically (or manually adjust versions) pnpm upgrade --latest @@ -81,8 +82,11 @@ pnpm import bun pm migrate --force # Make sure to use a deno with lockfile v4 (<2.3) -deno install -# Ensure that `deno.json` is the same as `package-lock.json` +deno install --lockfile-only + +# Ensure that `deno.json` is the same as `package-lock.json`. +# Note: you may need to manually update the `ADDITIONAL_PACKAGES_NODE` +# and/or `ADDITIONAL_PACKAGES_DENO` variables in `./check.py`. python check.py ``` From 0019d510da01dcf0a3c48f671ad15c2edfbb1966 Mon Sep 17 00:00:00 2001 From: bashonly Date: Sat, 13 Dec 2025 17:23:47 -0600 Subject: [PATCH 2/8] check.py: provide explicit encoding --- check.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/check.py b/check.py index 05e4b4b..2cd646e 100755 --- a/check.py +++ b/check.py @@ -15,7 +15,8 @@ def parse_deno() -> dict[str, str]: path = BASE_PATH / "deno.lock" - with path.open("rb") as file: + # compat: py<3.15: Provide explicit encoding + with path.open("rb", encoding="utf-8") as file: lockfile = json.load(file) v = lockfile["version"] @@ -38,7 +39,8 @@ def parse_deno() -> dict[str, str]: def parse_node() -> dict[str, str]: path = BASE_PATH / "package-lock.json" - with path.open("rb") as file: + # compat: py<3.15: Provide explicit encoding + with path.open("rb", encoding="utf-8") as file: lockfile = json.load(file) v = lockfile["lockfileVersion"] From f6862ff626525aa9ab619329e46cff6344093737 Mon Sep 17 00:00:00 2001 From: bashonly Date: Sat, 13 Dec 2025 17:25:19 -0600 Subject: [PATCH 3/8] CI cleanup --- .github/workflows/ci.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 25f2ed0..74d4f20 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -174,8 +174,7 @@ jobs: version: 10 - uses: actions/setup-python@v6 with: - # minimum supported version - python-version: "3.10" + python-version: "3.10" # minimum supported version - name: Install Python requirements run: | python -m pip install -U build @@ -209,9 +208,9 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v6 - with: - fetch-depth: 0 - uses: actions/setup-python@v6 + with: + python-version: "3.10" # minimum supported version - name: Verify lockfile run: | python ./check.py From 1a6f7efdd6fb74f3a5fb3eda2ab60523873ce95c Mon Sep 17 00:00:00 2001 From: bashonly Date: Sat, 13 Dec 2025 17:27:12 -0600 Subject: [PATCH 4/8] =?UTF-8?q?Bump=20actions/upload-artifact=20=E2=86=92?= =?UTF-8?q?=20v6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/ci.yml | 4 ++-- .github/workflows/release.yml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 74d4f20..a12e8ca 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -129,7 +129,7 @@ jobs: sha256sum -- yt.solver.*.js | tee SHA2-256SUMS popd - name: Upload bundle hashes - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v6 with: name: bundle-hashes path: | @@ -153,7 +153,7 @@ jobs: --allow-sys=uid \ src/yt/solver/test/download.ts - name: Upload player JS artifact - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v6 with: name: player-js path: | diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 9f7f8cd..2c4f94c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -28,7 +28,7 @@ jobs: run: | python -m build - name: Upload Python artifacts - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v6 with: name: artifacts-py path: | @@ -40,7 +40,7 @@ jobs: deno install --frozen deno task bundle - name: Upload JavaScript artifacts - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v6 with: name: artifacts-js path: | From 3872622f7218f2bcfd1cd2b764d684de4c2aa67b Mon Sep 17 00:00:00 2001 From: bashonly Date: Sat, 13 Dec 2025 17:29:04 -0600 Subject: [PATCH 5/8] =?UTF-8?q?Bump=20actions/download-artifact=20?= =?UTF-8?q?=E2=86=92=20v7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/ci.yml | 14 +++++++------- .github/workflows/release.yml | 4 ++-- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a12e8ca..032fd62 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -194,7 +194,7 @@ jobs: run: | pnpm run bundle - name: Download bundle hashes - uses: actions/download-artifact@v5 + uses: actions/download-artifact@v7 with: path: dist name: bundle-hashes @@ -249,7 +249,7 @@ jobs: run: | deno task bundle - name: Download bundle hashes - uses: actions/download-artifact@v5 + uses: actions/download-artifact@v7 with: path: dist name: bundle-hashes @@ -272,7 +272,7 @@ jobs: run: | deno install --frozen - name: Download player JS artifact - uses: actions/download-artifact@v5 + uses: actions/download-artifact@v7 with: path: src/yt/solver/test/players name: player-js @@ -316,7 +316,7 @@ jobs: run: | bun --bun run bundle - name: Download bundle hashes - uses: actions/download-artifact@v5 + uses: actions/download-artifact@v7 with: path: dist name: bundle-hashes @@ -339,7 +339,7 @@ jobs: run: | bun install --frozen-lockfile - name: Download player JS artifact - uses: actions/download-artifact@v5 + uses: actions/download-artifact@v7 with: path: src/yt/solver/test/players name: player-js @@ -381,7 +381,7 @@ jobs: run: | npm run bundle - name: Download bundle hashes - uses: actions/download-artifact@v5 + uses: actions/download-artifact@v7 with: path: dist name: bundle-hashes @@ -404,7 +404,7 @@ jobs: run: | npm ci - name: Download player JS artifact - uses: actions/download-artifact@v5 + uses: actions/download-artifact@v7 with: path: src/yt/solver/test/players name: player-js diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 2c4f94c..a617dc1 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -56,7 +56,7 @@ jobs: contents: read id-token: write # required for PyPI trusted publishing steps: - - uses: actions/download-artifact@v5 + - uses: actions/download-artifact@v7 with: path: dist name: artifacts-py @@ -76,7 +76,7 @@ jobs: - uses: actions/checkout@v6 with: fetch-depth: 0 - - uses: actions/download-artifact@v5 + - uses: actions/download-artifact@v7 with: path: dist pattern: artifacts-* From 01ee1f8ece6ccd7ddd6438d7c24473c5d619fa74 Mon Sep 17 00:00:00 2001 From: bashonly Date: Sat, 13 Dec 2025 17:29:40 -0600 Subject: [PATCH 6/8] =?UTF-8?q?Bump=20actions/cache=20=E2=86=92=20v5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 032fd62..fb95171 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -136,7 +136,7 @@ jobs: dist/SHA2-256SUMS compression-level: 0 - name: Cache player JS files - uses: actions/cache@v4 + uses: actions/cache@v5 env: SEGMENT_DOWNLOAD_TIMEOUT_MINS: 1 with: From 190b04b206d05813035d9905ba9c49a65b95e275 Mon Sep 17 00:00:00 2001 From: bashonly Date: Sat, 13 Dec 2025 17:32:24 -0600 Subject: [PATCH 7/8] Revert "check.py: provide explicit encoding" This reverts commit 0019d510da01dcf0a3c48f671ad15c2edfbb1966. --- check.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/check.py b/check.py index 2cd646e..05e4b4b 100755 --- a/check.py +++ b/check.py @@ -15,8 +15,7 @@ def parse_deno() -> dict[str, str]: path = BASE_PATH / "deno.lock" - # compat: py<3.15: Provide explicit encoding - with path.open("rb", encoding="utf-8") as file: + with path.open("rb") as file: lockfile = json.load(file) v = lockfile["version"] @@ -39,8 +38,7 @@ def parse_deno() -> dict[str, str]: def parse_node() -> dict[str, str]: path = BASE_PATH / "package-lock.json" - # compat: py<3.15: Provide explicit encoding - with path.open("rb", encoding="utf-8") as file: + with path.open("rb") as file: lockfile = json.load(file) v = lockfile["lockfileVersion"] From 8c60168c8f36c48c6bd6c8fe82c13ac4da750bb6 Mon Sep 17 00:00:00 2001 From: bashonly Date: Sat, 13 Dec 2025 17:52:19 -0600 Subject: [PATCH 8/8] consistency the other way --- .github/workflows/ci.yml | 33 ++++++++++++++++++++++----------- 1 file changed, 22 insertions(+), 11 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index fb95171..ef40d31 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -174,7 +174,8 @@ jobs: version: 10 - uses: actions/setup-python@v6 with: - python-version: "3.10" # minimum supported version + # minimum supported version + python-version: "3.10" - name: Install Python requirements run: | python -m pip install -U build @@ -210,7 +211,8 @@ jobs: - uses: actions/checkout@v6 - uses: actions/setup-python@v6 with: - python-version: "3.10" # minimum supported version + # minimum supported version + python-version: "3.10" - name: Verify lockfile run: | python ./check.py @@ -226,10 +228,12 @@ jobs: - name: Install Deno uses: denoland/setup-deno@v2 with: - deno-version: "2.0.0" # minimum supported version + # minimum supported version + deno-version: "2.0.0" - uses: actions/setup-python@v6 with: - python-version: "3.10" # minimum supported version + # minimum supported version + python-version: "3.10" - name: Install Python requirements run: | python -m pip install -U build @@ -267,7 +271,8 @@ jobs: - name: Install Deno uses: denoland/setup-deno@v2 with: - deno-version: "2.0.0" # minimum supported version + # minimum supported version + deno-version: "2.0.0" - name: Install Deno requirements run: | deno install --frozen @@ -293,10 +298,12 @@ jobs: - name: Install Bun uses: oven-sh/setup-bun@v2 with: - bun-version: "1.0.31" # minimum supported version + # minimum supported version + bun-version: "1.0.31" - uses: actions/setup-python@v6 with: - python-version: "3.10" # minimum supported version + # minimum supported version + python-version: "3.10" - name: Install Python requirements run: | python -m pip install -U build @@ -334,7 +341,8 @@ jobs: - name: Install Bun uses: oven-sh/setup-bun@v2 with: - bun-version: "1.2.11" # XXX: We support 1.0.31, but test suite requires 1.2.11+ + # XXX: We support 1.0.31, but test suite requires 1.2.11+ + bun-version: "1.2.11" - name: Install Bun requirements run: | bun install --frozen-lockfile @@ -358,10 +366,12 @@ jobs: - name: Install Node uses: actions/setup-node@v6 with: - node-version: "20.0" # minimum supported version + # minimum supported version + node-version: "20.0" - uses: actions/setup-python@v6 with: - python-version: "3.10" # minimum supported version + # minimum supported version + python-version: "3.10" - name: Install Python requirements run: | python -m pip install -U build @@ -399,7 +409,8 @@ jobs: - name: Install Node uses: actions/setup-node@v6 with: - node-version: "22.18" # XXX: We support 20.0, but test suite requires 22.18+ + # XXX: We support 20.0, but test suite requires 22.18+ + node-version: "22.18" - name: Install Node requirements run: | npm ci