From c87ec6b084cdb95ec2503256bf2ef222fbca6b77 Mon Sep 17 00:00:00 2001 From: Alex Eagle Date: Mon, 11 Oct 2021 15:55:11 -0700 Subject: [PATCH] refactor(builtin): npm_umd_bundle no longer allows directory sources We plan to change behavior under exports_directories_only so that they produce TreeArtifacts. They will therefore be a subfolder of the real package. npm_umd_bundle is too hard to keep working with exports_directories_only because it relies on loading npm packages without the linker. BREAKING CHANGE: npm_umd_bundle users cannot use exports_directories_only --- internal/npm_install/npm_umd_bundle.bzl | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/internal/npm_install/npm_umd_bundle.bzl b/internal/npm_install/npm_umd_bundle.bzl index 31462bcc68..2822f3c63a 100644 --- a/internal/npm_install/npm_umd_bundle.bzl +++ b/internal/npm_install/npm_umd_bundle.bzl @@ -45,6 +45,10 @@ def _impl(ctx): sources = ctx.attr.package[ExternalNpmPackageInfo].sources.to_list() + for s in sources: + if s.is_directory: + fail("npm_umd_bundle does not work with directory artifacts") + if ctx.attr.package[ExternalNpmPackageInfo].has_directories: # If sources contain directories then we cannot filter by extension inputs = sources