Skip to content

Commit

Permalink
fix: make generate_index_ts() deterministic (#1104)
Browse files Browse the repository at this point in the history
Fixes #1103
  • Loading branch information
SurferJeffAtGoogle authored May 27, 2021
1 parent 7c50355 commit c3e41da
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 c3e41da

Please sign in to comment.