mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2025-11-13 13:05:13 +00:00
[ie/youtube] Disable deno/bun caching (#14849)
Fix 6224a38988
Closes #14847
Authored by: seproDev, coletdjnz
Co-authored-by: coletdjnz <coletdjnz@protonmail.com>
This commit is contained in:
@@ -36,6 +36,7 @@ from yt_dlp.utils.networking import HTTPHeaderDict, clean_proxies
|
||||
# `--no-install` appears to disable the cache.
|
||||
# - npm auto-install may fail with an integrity error when using HTTP proxies
|
||||
# - npm auto-install HTTP proxy support may be limited on older Bun versions
|
||||
# - Cannot disable the transpiler / specify lang for stdin
|
||||
|
||||
|
||||
@register_provider
|
||||
@@ -100,6 +101,9 @@ class BunJCP(EJSBaseJCP, BuiltinIEContentProvider):
|
||||
if self.ie.get_param('nocheckcertificate'):
|
||||
options['NODE_TLS_REJECT_UNAUTHORIZED'] = '0'
|
||||
|
||||
# Disable Bun transpiler cache
|
||||
options['BUN_RUNTIME_TRANSPILER_CACHE_PATH'] = '0'
|
||||
|
||||
# Prevent segfault: <https://github.com/oven-sh/bun/issues/22901>
|
||||
options.pop('JSC_useJIT', None)
|
||||
if self.ejs_setting('jitless', ['false']) != ['false']:
|
||||
|
||||
@@ -25,13 +25,19 @@ from yt_dlp.extractor.youtube.pot.provider import provider_bug_report_message
|
||||
from yt_dlp.utils import Popen, remove_terminal_sequences
|
||||
from yt_dlp.utils.networking import HTTPHeaderDict, clean_proxies
|
||||
|
||||
# KNOWN ISSUES:
|
||||
# - Can't avoid analysis cache: https://github.com/yt-dlp/yt-dlp/pull/14849#issuecomment-3475840821
|
||||
|
||||
|
||||
@register_provider
|
||||
class DenoJCP(EJSBaseJCP, BuiltinIEContentProvider):
|
||||
PROVIDER_NAME = 'deno'
|
||||
JS_RUNTIME_NAME = 'deno'
|
||||
|
||||
_DENO_BASE_OPTIONS = ['--no-prompt', '--no-remote', '--no-lock', '--node-modules-dir=none', '--no-config']
|
||||
_DENO_BASE_OPTIONS = [
|
||||
'--ext=js', '--no-code-cache', '--no-prompt', '--no-remote',
|
||||
'--no-lock', '--node-modules-dir=none', '--no-config',
|
||||
]
|
||||
DENO_NPM_LIB_FILENAME = 'yt.solver.deno.lib.js'
|
||||
_NPM_PACKAGES_CACHED = False
|
||||
|
||||
|
||||
Reference in New Issue
Block a user