Repository: vercel/next.js
Pull request: Turbopack: add ffmpeg-static NFT test

Include test added by https://github.com/vercel/nft/pull/539

Closes PACK-5340

Changed files:
filename: turbopack/crates/turbopack/tests/node-file-trace.rs
patch: @@ -100,8 +100,9 @@ static ALLOC: turbo_tasks_malloc::TurboMalloc = turbo_tasks_malloc::TurboMalloc;
 #[case::express("integration/express.js")]
 #[case::fast_glob("integration/fast-glob.js")]
 #[case::fetch_h2("integration/fetch-h2.js")]
-#[cfg_attr(target_arch = "x86_64", case::ffmpeg_js("integration/ffmpeg.js"))]
 // Could not find ffmpeg executable
+#[cfg_attr(target_arch = "x86_64", case::ffmpeg_js("integration/ffmpeg.js"))]
+#[case::ffmpeg_static("integration/ffmpeg-static.js")]
 #[case::firebase_admin("integration/firebase-admin.js")]
 #[case::firebase("integration/firebase.js")]
 #[case::firestore("integration/firestore.js")]

filename: turbopack/crates/turbopack/tests/node-file-trace/integration/ffmpeg-static.js
patch: @@ -0,0 +1,9 @@
+const { execFile } = require('child_process')
+const ffmpeg = require('ffmpeg-static')
+
+execFile(ffmpeg, ['-version'], (error, _stdout, stderr) => {
+  if (error || stderr) {
+    console.error('Error executing ffmpeg:', error || stderr)
+    process.exit(1)
+  }
+})

filename: turbopack/crates/turbopack/tests/node-file-trace/package.json
patch: @@ -51,8 +51,9 @@
     "express": "^4.17.1",
     "fast-glob": "^3.1.1",
     "fetch-h2": "^2.2.0",
-    "firebase": "^7",
+    "ffmpeg-static": "^5.2.0",
     "firebase-admin": "^9.7.0",
+    "firebase": "^7",
     "fluent-ffmpeg": "^2.1.2",
     "geo-tz": "^7.0.1",
     "geoip-lite": "^1.4.10",

filename: turbopack/crates/turbopack/tests/node-file-trace/pnpm-lock.yaml
patch: @@ -156,6 +156,9 @@ importers:
       fetch-h2:
         specifier: ^2.2.0
         version: 2.5.1
+      ffmpeg-static:
+        specifier: ^5.2.0
+        version: 5.2.0
       firebase:
         specifier: ^7
         version: 7.24.0
@@ -766,6 +769,10 @@ packages:
     resolution: {integrity: sha512-7KretVkHUANWe31u9cGJpxmUkyrXsCD+fmlZQUz/zk9mtQNC4uBIKX53VUFfrVj/bxAhEEIPw5XTYiMc5RJLsw==}
     engines: {node: '>=16'}
 
+  '@derhuerst/http-basic@8.2.4':
+    resolution: {integrity: sha512-F9rL9k9Xjf5blCz8HsJRO4diy111cayL2vkY2XE4r4t3n0yPXVYy3KD3nJ1qbrSn9743UWSXH4IwuCa/HWlGFw==}
+    engines: {node: '>=6.0.0'}
+
   '@emnapi/runtime@1.4.5':
     resolution: {integrity: sha512-++LApOtY0pEEz1zrd9vy1/zXVaVJJ/EbAF3u0fXIzPJEDtnITsBGbbK0EkM72amhl/R5b+5xx0Y/QhcVOpuulg==}
 
@@ -5160,6 +5167,10 @@ packages:
     resolution: {integrity: sha512-U+LQ+fHwF6TMg82A88wjljC5L174eoJfrc+0g4e7JWqL7U0w0QAoOkPDCGkO9KGH9BY55s4n45gLGOtlTAoqmw==}
     engines: {node: '>=10.4'}
 
+  ffmpeg-static@5.2.0:
+    resolution: {integrity: sha512-WrM7kLW+do9HLr+H6tk7LzQ7kPqbAgLjdzNE32+u3Ff11gXt9Kkkd2nusGFrlWMIe+XaA97t+I8JS7sZIrvRgA==}
+    engines: {node: '>=16'}
+
   file-contents@0.2.4:
     resolution: {integrity: sha512-PEz7U6YlXr+dvWCtW63DUY1LUTHOVs1rv4s1/I/39dpvvidQqMSTY6JklazQS60MMoI/ztpo5kMlpdvGagvLbA==}
     engines: {node: '>=0.10.0'}
@@ -5745,6 +5756,9 @@ packages:
     resolution: {integrity: sha512-T1gkAiYYDWYx3V5Bmyu7HcfcvL7mUrTWiM6yOfa3PIphViJ/gFPbvidQ+veqSOHci/PxBcDabeUNCzpOODJZig==}
     engines: {node: '>= 14'}
 
+  http-response-object@3.0.2:
+    resolution: {integrity: sha512-bqX0XTF6fnXSQcEJ2Iuyr75yVakyjIDCqroJQ/aHfSdlM743Cwqoi2nDYMzLGWUcuTWGWy8AAvOKXTfiv6q9RA==}
+
   http-signature@1.2.0:
     resolution: {integrity: sha512-CAbnr6Rz4CYQkLYUtSNXxQPUH2gK8f3iWexVlsnMeD+GjlsQ0Xsy1cOX+mN3dtxYomRy21CiOzU8Uhw6OwncEQ==}
     engines: {node: '>=0.8', npm: '>=1.3.7'}
@@ -11105,6 +11119,13 @@ snapshots:
       pprof-format: 2.1.0
       source-map: 0.7.4
 
+  '@derhuerst/http-basic@8.2.4':
+    dependencies:
+      caseless: 0.12.0
+      concat-stream: 2.0.0
+      http-response-object: 3.0.2
+      parse-cache-control: 1.0.1
+
   '@emnapi/runtime@1.4.5':
     dependencies:
       tslib: 2.8.1
@@ -16349,8 +16370,7 @@ snapshots:
 
   entities@4.5.0: {}
 
-  env-paths@2.2.1:
-    optional: true
+  env-paths@2.2.1: {}
 
   err-code@2.0.3:
     optional: true
@@ -16880,6 +16900,15 @@ snapshots:
       to-arraybuffer: 1.0.1
       tough-cookie: 4.1.2
 
+  ffmpeg-static@5.2.0:
+    dependencies:
+      '@derhuerst/http-basic': 8.2.4
+      env-paths: 2.2.1
+      https-proxy-agent: 5.0.1
+      progress: 2.0.3
+    transitivePeerDependencies:
+      - supports-color
+
   file-contents@0.2.4:
     dependencies:
       extend-shallow: 2.0.1
@@ -17725,6 +17754,10 @@ snapshots:
     transitivePeerDependencies:
       - supports-color
 
+  http-response-object@3.0.2:
+    dependencies:
+      '@types/node': 10.17.60
+
   http-signature@1.2.0:
     dependencies:
       assert-plus: 1.0.0