diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 25f2ed0..ef40d31 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -129,14 +129,14 @@ 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: | 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: @@ -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: | @@ -195,7 +195,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 @@ -209,9 +209,10 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v6 - with: - fetch-depth: 0 - uses: actions/setup-python@v6 + with: + # minimum supported version + python-version: "3.10" - name: Verify lockfile run: | python ./check.py @@ -227,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 @@ -250,7 +253,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 @@ -268,12 +271,13 @@ 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 - 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 @@ -294,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 @@ -317,7 +323,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 @@ -335,12 +341,13 @@ 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 - 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 @@ -359,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 @@ -382,7 +391,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 @@ -400,12 +409,13 @@ 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 - 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 9f7f8cd..a617dc1 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: | @@ -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-* 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 ```