Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 31 additions & 21 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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: |
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |
Expand All @@ -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: |
Expand All @@ -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
Expand All @@ -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-*
Expand Down
14 changes: 9 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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](<https://github.com/yt-dlp/ejs/issues/new>).
Expand Down Expand Up @@ -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
Expand All @@ -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
```

Expand Down