Skip to content

Allowing logging message to be of string type - #1316

Merged
Rich-Harris merged 1 commit into
rollup:masterfrom
diervo:logging-fix
Mar 9, 2017
Merged

Allowing logging message to be of string type#1316
Rich-Harris merged 1 commit into
rollup:masterfrom
diervo:logging-fix

Conversation

@diervo

@diervo diervo commented Feb 26, 2017

Copy link
Copy Markdown
Contributor

Before this change, in plugins like this:
https://github.com/rollup/rollup-plugin-babel/blob/master/src/index.js#L39
will just get undefined in the output when running standalone rollup cli

I haven't have the time to to look very in depth at all the code, but I found a couple of places (both in rollup itself and in external plugins) where the caller is passing a string, so since fixing all the plugins is probably a non-starter, I figure making the API support strings was the easiest.

You might want to change the param name of the function or do a more strict type check maybe.

Before this change, in plugins like this: 
https://github.com/rollup/rollup-plugin-babel/blob/master/src/index.js#L39
will just get `undefined` in the output.

I haven't have the time to to look very in depth at all the code, but I found a couple of places (both in rollup itself and in external plugins) where the caller is passing a string, so since fixing all the plugins is probably a non-starter, I figure making the API support strings was the easiest.

You might want to change the param name of the function or do a more strict check for strings.
@diervo diervo changed the title Allowing logging message to be type string Allowing logging message to be of string type Feb 26, 2017
@Rich-Harris
Rich-Harris merged commit 31a6e89 into rollup:master Mar 9, 2017
@Rich-Harris

Copy link
Copy Markdown
Contributor

This makes sense, thank you

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.

2 participants