diff --git a/bazel/api-golden/BUILD.bazel b/bazel/api-golden/BUILD.bazel index f0cd3fc42..b784a7a70 100644 --- a/bazel/api-golden/BUILD.bazel +++ b/bazel/api-golden/BUILD.bazel @@ -4,14 +4,14 @@ package(default_visibility = ["//visibility:public"]) exports_files([ "index.ts", - "index_npm_packages.ts", + "index_npm_packages.cts", ]) ts_project( name = "api-golden", srcs = [ "find_entry_points.ts", - "index_npm_packages.ts", + "index_npm_packages.cts", "interop_module_mappings.ts", "path-normalize.ts", "test_api_report.ts", diff --git a/bazel/api-golden/find_entry_points.ts b/bazel/api-golden/find_entry_points.ts index f442005a9..ce24ca364 100644 --- a/bazel/api-golden/find_entry_points.ts +++ b/bazel/api-golden/find_entry_points.ts @@ -9,7 +9,7 @@ import {dirname, join, relative} from 'path'; import {lstatSync, readFileSync, readdirSync} from 'fs'; -import {PackageJson} from './index_npm_packages.js'; +import {PackageJson} from './index_npm_packages.cjs'; /** Interface describing a resolved NPM package entry point. */ export interface PackageEntryPoint { diff --git a/bazel/api-golden/index_npm_packages.ts b/bazel/api-golden/index_npm_packages.cts similarity index 100% rename from bazel/api-golden/index_npm_packages.ts rename to bazel/api-golden/index_npm_packages.cts diff --git a/bazel/api-golden/index_rjs.bzl b/bazel/api-golden/index_rjs.bzl index e3d7680ce..4a91f5c4d 100644 --- a/bazel/api-golden/index_rjs.bzl +++ b/bazel/api-golden/index_rjs.bzl @@ -42,7 +42,7 @@ def api_golden_test_npm_package( js_test( name = name, data = data, - entry_point = "@devinfra//bazel/api-golden:index_npm_packages.js", + entry_point = "@devinfra//bazel/api-golden:index_npm_packages.cjs", args = [golden_dir, npm_package, "false", quoted_export_pattern] + type_names, env = {"RJS_MODE": "true" if not interop_mode else "false"}, **kwargs @@ -52,7 +52,7 @@ def api_golden_test_npm_package( name = name + ".accept", testonly = True, data = data, - entry_point = "@devinfra//bazel/api-golden:index_npm_packages.js", + entry_point = "@devinfra//bazel/api-golden:index_npm_packages.cjs", args = [golden_dir, npm_package, "true", quoted_export_pattern] + type_names, # TODO: Determine why this is needed but only for this `.accept` action # https://github.com/angular/dev-infra/issues/2742