Description: use older branch of crate vergen
 This essentially reverts upstream git commit da52930.
Author: Jonas Smedegaard <dr@jones.dk>
Forwarded: not-needed
Last-Update: 2024-11-05
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -117,7 +117,7 @@
   unicode-id-start          = "1.2.0"
   unicode-width             = "0.1.4"
   url                       = "2.5.4"
-  vergen                    = { version = "9.0.0", default-features = false }
+  vergen                    = { version = "8.3.2", default-features = false }
   walkdir                   = "2.4.0"
   wasm-bindgen              = "0.2.91"
   wasm-bindgen-futures      = "0.4.41"
--- a/crates/swc_core/build.rs
+++ b/crates/swc_core/build.rs
@@ -5,7 +5,7 @@
     path::Path,
 };
 
-use vergen::{CargoBuilder, Emitter};
+use vergen::EmitBuilder;
 
 // Validate conflict between host / plugin features
 #[cfg(all(
@@ -22,8 +22,6 @@
 );
 
 fn main() {
-    let cargo = CargoBuilder::all_cargo().unwrap();
-
     // Creates a static compile time constants for the version of swc_core.
     let pkg_version = env::var("CARGO_PKG_VERSION").unwrap();
     let out_dir = env::var("OUT_DIR").expect("Outdir should exist");
@@ -35,10 +33,5 @@
 
     // Attempt to collect some build time env values but will skip if there are any
     // errors.
-
-    Emitter::default()
-        .add_instructions(&cargo)
-        .unwrap()
-        .emit()
-        .unwrap();
+    let _ = EmitBuilder::builder().all_cargo().emit();
 }
--- a/crates/swc_plugin_runner/Cargo.toml
+++ b/crates/swc_plugin_runner/Cargo.toml
@@ -29,10 +29,6 @@
 __rkyv    = []
 rkyv-impl = ["__rkyv", "swc_common/plugin-rt", "swc_plugin_proxy/plugin-rt"]
 
-[build-dependencies]
-vergen = { workspace = true, features = ["build", "cargo"] }
-
-
 [dependencies]
 anyhow       = { workspace = true }
 parking_lot  = { workspace = true }
--- a/crates/swc_plugin_runner/build.rs
+++ /dev/null
@@ -1,18 +0,0 @@
-use std::error::Error;
-
-use vergen::{BuildBuilder, CargoBuilder, Emitter};
-
-fn main() -> Result<(), Box<dyn Error>> {
-    let build = BuildBuilder::all_build()?;
-    let cargo = CargoBuilder::default()
-        .dependencies(true)
-        .name_filter("*_ast")
-        .build()?;
-
-    Emitter::default()
-        .add_instructions(&build)?
-        .add_instructions(&cargo)?
-        .emit()?;
-
-    Ok(())
-}
