Skip to content

Commit

Permalink
refactor(builtin): npm_umd_bundle no longer allows directory sources
Browse files Browse the repository at this point in the history
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
  • Loading branch information
alexeagle committed Oct 11, 2021
1 parent 8a48991 commit c87ec6b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions internal/npm_install/npm_umd_bundle.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit c87ec6b

Please sign in to comment.