Closed ycherniavskyi closed 7 years ago
I forget why I did the clone and delete rather then just rename. I remember there was an issue with what you suggest here, but I don't remember exactly what it was.
Let's merge this, and test heavily. I'll make a release of this after we test this a few other places.
Thanks!
Thanks. I run tests and they all pass :smile:.
@RobLoach maybe it is time to create next version with last modification and publish it to npm? :blush:
The previous implementation technically correct, but it breaks plugins metalsmith flow.
For example in my case
metalsmith-collections
->metalsmith-jstransformer
->metalsmith-better-excerpts
->metalsmith-jstransformer
file objects in collections (created bymetalsmith-collections
plugin) after clone on rename is dirrefent from file objects in globalfiles
collection and as result updating/changing metadata in last one does affect first one, which complitly break the intention ofmetalsmith-collections
plugin.