yaml plugin: provide file id to transform function#615
yaml plugin: provide file id to transform function#615NotWoods merged 5 commits intorollup:masterfrom janosh:master
Conversation
reason for this change: i need to apply different content transformations depending on which file the data came from without knowing the file, the transformer function has to rely on brittle heuristics to identify the file based on the content loaded from it (which can obviously change over time) non-breaking change since people don't have to use the extra transformer argument
NotWoods
left a comment
There was a problem hiding this comment.
We still need a test case to make sure the correct path is being sent through. You can modify some of the existing tests to add that check.
|
@NotWoods Odd. If I run |
|
Ah, different directory separators on UNIX ( |
|
I was able to get it. |
|
@NotWoods Can you say when this will be published? |
|
@janosh we typically make weekly publish rounds for plugins. we have a lot moving parts this week so don't be surprised if this takes until early next week to be seen on NPM. (We're not quite ready for automated publishing) |
Rollup Plugin Name:
YAMLThis PR contains:
Are tests included?
Breaking Changes?
Non-breaking change since people don't have to use the extra transformer argument.
Description
Reason for this change: I need to apply different content transformations depending on which file the data came from. Without knowing the file, the transformer function has to rely on brittle heuristics to identify the file based on its content (which can obviously change over time).
I think a new test case isn't needed for this but happy to provide one if someone thinks otherwise.