build: update to rules_nodejs 0.38 (#32889)

PR Close #32889
This commit is contained in:
Alex Eagle
2019-09-27 15:49:59 -07:00
committed by Alex Rickabaugh
parent 2265cb5938
commit f783244ad1
20 changed files with 122 additions and 50 deletions

View File

@ -30,7 +30,7 @@ ESM5Info = provider(
)
def _map_closure_path(file):
result = file.short_path[:-len(".closure.js")]
result = file.short_path[:-len(".mjs")]
# short_path is meant to be used when accessing runfiles in a binary, where
# the CWD is inside the current repo. Therefore files in external repo have a

View File

@ -44,7 +44,7 @@ function main(args) {
// ngc-wrapped is expecting POSIX paths and the TypeScript Bazel rules by default only pass
// POSIX paths as well.
angularCompilerOptions['expectedOut'] = angularCompilerOptions['expectedOut'].map(
f => f.replace(/\.closure\.js$/, '.js').replace(binDir, newOutputBase));
f => f.replace(/\.mjs$/, '.js').replace(binDir, newOutputBase));
}
fs.writeFileSync(output, JSON.stringify(data));
}

View File

@ -237,7 +237,7 @@ def _expected_outs(ctx):
continue
filter_summaries = ctx.attr.filter_summaries
closure_js = [f.replace(".js", ".closure.js") for f in devmode_js if not filter_summaries or not f.endswith(".ngsummary.js")]
closure_js = [f.replace(".js", ".mjs") for f in devmode_js if not filter_summaries or not f.endswith(".ngsummary.js")]
declarations = [f.replace(".js", ".d.ts") for f in devmode_js]
devmode_js_files += [ctx.actions.declare_file(basename + ext) for ext in devmode_js]
@ -262,7 +262,7 @@ def _expected_outs(ctx):
if _should_produce_flat_module_outs(ctx):
flat_module_out = _flat_module_out_file(ctx)
devmode_js_files.append(ctx.actions.declare_file("%s.js" % flat_module_out))
closure_js_files.append(ctx.actions.declare_file("%s.closure.js" % flat_module_out))
closure_js_files.append(ctx.actions.declare_file("%s.mjs" % flat_module_out))
bundle_index_typings = ctx.actions.declare_file("%s.d.ts" % flat_module_out)
declaration_files.append(bundle_index_typings)
if is_legacy_ngc: