Skip to content

Commit

Permalink
fix: make generate_index_ts() deterministic
Browse files Browse the repository at this point in the history
  • Loading branch information
SurferJeffAtGoogle committed May 27, 2021
1 parent 7c50355 commit 5bab278
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions synthtool/languages/node.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,9 @@ def generate_index_ts(versions: List[str], default_version: str) -> None:
logger.error(err_msg)
raise AttributeError(err_msg)

# To make sure the output is always deterministic.
versions = sorted(versions)

# compose default version's index.ts file path
versioned_index_ts_path = Path("src") / default_version / "index.ts"
clients = extract_clients(versioned_index_ts_path)
Expand Down

0 comments on commit 5bab278

Please sign in to comment.