Skip to content

Commit

Permalink
chore: call non-hermetic functions since we're installing node_module…
Browse files Browse the repository at this point in the history
…s directly from the library (#1870)

* chore: call non-hermetic functions since we're installing node_modules directly from the library
  • Loading branch information
sofisl committed Sep 25, 2023
1 parent ee41a29 commit 4c4063f
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions synthtool/languages/node.py
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,8 @@ def fix(hide_output=False):
shell.run(["npm", "run", "fix"], hide_output=hide_output)


# TODO: delete these functions if it turns out we no longer
# need them to be hermetic.
def fix_hermetic(hide_output=False):
"""
Fixes the formatting in the current Node.js library. It assumes that gts
Expand Down Expand Up @@ -241,6 +243,8 @@ def compile_protos(hide_output=False):
shell.run(["npx", "compileProtos", "src"], hide_output=hide_output)


# TODO: delete these functions if it turns out we no longer
# need them to be hermetic.
def compile_protos_hermetic(hide_output=False):
"""
Compiles protos into .json, .js, and .d.ts files using
Expand All @@ -265,8 +269,8 @@ def postprocess_gapic_library(hide_output=False):

def postprocess_gapic_library_hermetic(hide_output=False):
logger.debug("Post-processing GAPIC library...")
fix_hermetic(hide_output=hide_output)
compile_protos_hermetic(hide_output=hide_output)
fix(hide_output=hide_output)
compile_protos(hide_output=hide_output)
logger.debug("Post-processing completed")


Expand Down

0 comments on commit 4c4063f

Please sign in to comment.