chore(lint): satisfy CI lint and CodeQL in DASH support files

- replace shell-built tar/npm commands with execFileSync arg arrays in
  the fixture generator (CodeQL: uncontrolled shell command)
- give jest stub methods explicit bodies (no-empty-function)
- compact the diagnostic label switches in WebPlayerViewComponent to
  stay under the max-lines budget

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
4grayandClaude Fable 5 committed 2026-07-23 23:40:40 +02:00
1 parent 95bd7f7fe0
commit c19c639ef2
3 files changed
+26 -29

No files matched your search

@@ -26,7 +26,7 @@
* Usage: node apps/web-e2e/src/fixtures/dash/generate-fixture.mjs
*/
import { execFileSync, execSync } from 'node:child_process';
import { execFileSync } from 'node:child_process';
import { chmodSync, mkdtempSync, readdirSync, rmSync } from 'node:fs';
import { createRequire } from 'node:module';
import { tmpdir } from 'node:os';
@@ -110,14 +110,17 @@ function resolvePackager() {
function fetchPackagerViaNpmPack() {
const workDir = mkdtempSync(join(tmpdir(), 'shaka-packager-'));
console.log(`Fetching shaka-packager via npm pack into ${workDir} ...`);
execSync('npm pack shaka-packager --silent', {
execFileSync('npm', ['pack', 'shaka-packager', '--silent'], {
cwd: workDir,
stdio: ['ignore', 'ignore', 'inherit'],
});
const tarball = readdirSync(workDir).find((name) =>
name.endsWith('.tgz')
);
execSync(`tar -xzf ${JSON.stringify(tarball)}`, { cwd: workDir });
if (!tarball) {
throw new Error('npm pack did not produce a shaka-packager tarball.');
}
execFileSync('tar', ['-xzf', tarball], { cwd: workDir });
const binaryName = {
darwin: { arm64: 'packager-osx-arm64', x64: 'packager-osx-x64' },