External JavaScript for yt-dlp supporting many runtimes
Project description
yt-dlp-ejs
External JavaScript for yt-dlp supporting many runtimes
Manual Installation
Install ejs into the same environment as yt-dlp:
pip install -U yt-dlp-ejs
Development
The project provides lockfiles for every supported package manager.
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.
Build
To build the Python package you need a PEP518 compatible builder.
The build hook will automatically invoke deno, bun or node as required.
Alternatively, to only build the JavaScript files you can run the bundle script manually:
python hatch_build.py
This will automatically select an available runtime and build using it.
Tests
First, make sure the project's dependencies are installed and download the player JS files:
# Deno:
deno install --frozen
deno run src/yt/solver/test/download.ts
# Bun:
bun install --frozen-lockfile
bun --bun run src/yt/solver/test/download.ts
# Node 22.6+:
npm ci
node --experimental-strip-types src/yt/solver/test/download.ts
Then the tests can be run:
# Deno
deno test
# Bun
bun test
# Node
node --test
Upgrading packages
When upgrading packages in package.json, all lockfiles must be updated simultaneously. To do this, run the following commands:
# Upgrade packages automatically (or manually adjust versions)
pnpm upgrade --latest
# Generate base `package-lock.json`
rm -rf node_modules
npm install
# Migrate to other package managers
pnpm import
bun pm migrate --force
# Make sure to use a deno with lockfile v4 (<2.3)
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
Licensing
This code is licensed under Unlicense.
An exception to this is the prebuilt wheels, which contain both
meriyah and astring,
licensed under ISC and MIT, respectively.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file yt_dlp_ejs-0.4.0.tar.gz.
File metadata
- Download URL: yt_dlp_ejs-0.4.0.tar.gz
- Upload date:
- Size: 96.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3c67e0beb6f9f3603fbcb56f425eabaa37c52243d90d20ccbcce1dd941cfbd07
|
|
| MD5 |
f34e777f86a3568a39bb55634a2d1d44
|
|
| BLAKE2b-256 |
e9804b6c7f91b373e01cdc18080f41fa399592945abce7db74c2e6d0fb8468db
|
Provenance
The following attestation bundles were made for yt_dlp_ejs-0.4.0.tar.gz:
Publisher:
release.yml on yt-dlp/ejs
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
yt_dlp_ejs-0.4.0.tar.gz -
Subject digest:
3c67e0beb6f9f3603fbcb56f425eabaa37c52243d90d20ccbcce1dd941cfbd07 - Sigstore transparency entry: 870342833
- Sigstore integration time:
-
Permalink:
yt-dlp/ejs@e91d03f58a9791da2300c5f10a2955af1c5d6d87 -
Branch / Tag:
refs/tags/0.4.0 - Owner: https://github.com/yt-dlp
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@e91d03f58a9791da2300c5f10a2955af1c5d6d87 -
Trigger Event:
push
-
Statement type:
File details
Details for the file yt_dlp_ejs-0.4.0-py3-none-any.whl.
File metadata
- Download URL: yt_dlp_ejs-0.4.0-py3-none-any.whl
- Upload date:
- Size: 53.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
19278cff397b243074df46342bb7616c404296aeaff01986b62b4e21823b0b9c
|
|
| MD5 |
372cf26ebdf879d8922fc03ecbb4b60d
|
|
| BLAKE2b-256 |
a4908911146822364666be47f184c4180cec20fcc537a268ef40d1ab077dd25b
|
Provenance
The following attestation bundles were made for yt_dlp_ejs-0.4.0-py3-none-any.whl:
Publisher:
release.yml on yt-dlp/ejs
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
yt_dlp_ejs-0.4.0-py3-none-any.whl -
Subject digest:
19278cff397b243074df46342bb7616c404296aeaff01986b62b4e21823b0b9c - Sigstore transparency entry: 870342848
- Sigstore integration time:
-
Permalink:
yt-dlp/ejs@e91d03f58a9791da2300c5f10a2955af1c5d6d87 -
Branch / Tag:
refs/tags/0.4.0 - Owner: https://github.com/yt-dlp
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@e91d03f58a9791da2300c5f10a2955af1c5d6d87 -
Trigger Event:
push
-
Statement type: