text: """
  Helper macro for fetching esbuild versions for internal tests and examples in rules_nodejs
  """
  
  load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
  
  _VERSION = "0.8.34"
  
  def esbuild_dependencies():
      """Helper to install required dependencies for the esbuild rules"""
  
      version = _VERSION
  
      http_archive(
          name = "esbuild_darwin",
          urls = [
              "https://registry.npmjs.org/esbuild-darwin-64/-/esbuild-darwin-64-%s.tgz" % version,
          ],
          strip_prefix = "package",
          build_file_content = """exports_files(["bin/esbuild"])""",
          sha256 = "3bf980b5175df873dd84fd614d57722f3b1b9c7e74929504e26192d23075d5c3",
      )
  
      http_archive(
          name = "esbuild_windows",
          urls = [
              "https://registry.npmjs.org/esbuild-windows-64/-/esbuild-windows-64-%s.tgz" % version,
          ],
          strip_prefix = "package",
          build_file_content = """exports_files(["esbuild.exe"])""",
          sha256 = "826cd58553e7b6910dd22aba001cd72af34e05c9c3e9af567b5b2a6b1c9f3941",
      )
  
      http_archive(
          name = "esbuild_linux",
          urls = [
              "https://registry.npmjs.org/esbuild-linux-64/-/esbuild-linux-64-%s.tgz" % version,
          ],
          strip_prefix = "package",
          build_file_content = """exports_files(["bin/esbuild"])""",
          sha256 = "9dff3f5b06fd964a1cbb6aa9ea5ebf797767f1bd2bac71e084fb0bbefeba24a3",
      )
  