Skip to content

Filter falsey values from build configs before passing them to rollup#77

Merged
jaredpalmer merged 1 commit intojaredpalmer:masterfrom
jakegavin:filter-create-build-configs
May 3, 2019
Merged

Filter falsey values from build configs before passing them to rollup#77
jaredpalmer merged 1 commit intojaredpalmer:masterfrom
jakegavin:filter-create-build-configs

Conversation

@jakegavin
Copy link
Copy Markdown
Contributor

Fixes #76

I wasn't sure how to write a test for this. Sorry. I'd be happy to write a test if you point me to an example of a similar test that it should look like.

Details copied from commit message:

fix: remove falsey build configs

If the opts.format.includes call above returns false, a false value
is inserted into the array in place of a rollup config object. Each
element of the createBuildConfigs is eventually passed into rollup
as an inputOption. If one of these elements is false, the script will
pass that value as a config to rollup which results in a rollup error
stating: "You must supply an options object to rollup"

This commit fixes that issue by filtering out falsey values.

If the `opts.format.includes` call above returns false, a `false` value
is inserted into the array in place of a rollup config object. Each
element of the `createBuildConfigs` is eventually passed into rollup
as an `inputOption`. If one of these elements is `false`, the script will
pass that value as a config to rollup which results in a rollup error
stating: "You must supply an options object to rollup"

This commit fixes that issue by filtering out falsey values.
@agilgur5
Copy link
Copy Markdown
Collaborator

@allcontributors please add @jakegavin for bugs, code

@allcontributors
Copy link
Copy Markdown
Contributor

@agilgur5

I've put up a pull request to add @jakegavin! 🎉

joeflateau pushed a commit to joeflateau/tsdx that referenced this pull request Nov 12, 2021
* chore: use conventional-commits

* chore: release-it config

* chore: upgrade husky latest

* chore: add commitlint

* revert changelog
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Skipping a format results in warning about an unhandled promise rejection

3 participants