Skip to content

Conversation

@eggyal
Copy link

@eggyal eggyal commented May 29, 2015

The documentation for _.values(object) gives an example:

_.values(new Foo);
// → [1, 2] (iteration order is not guaranteed)

Since "iteration order is not guaranteed", the array of streams passed to factor-bundle may not be in the same order as the corresponding files in entries. Factor bundle depends on this correlation when building its pipeline.

This commit ensures that there is never a mismatch.

@eggyal
Copy link
Author

eggyal commented May 29, 2015

One should probably give users the choice of receiving full paths in return, instead of abbreviated versions (otherwise name collisions could arise: e.g. if foo.js exists in two separate folders). Moreover, full paths will be easier for them to reconcile with their entries when conducting further processing.

See https://github.com/eggyal/atomify-js/commit/4961bef94fac6ec1e0643b92315a92d34c3627a5

@joeybaker
Copy link
Contributor

Seems like a good idea. Can you take a look at the test failure?

@joeybaker
Copy link
Contributor

hmmm… I think the test failure will be resolved if you rebase on master.

eggyal added 2 commits May 30, 2015 00:28
The documentation for [`_.values(object)`](https://lodash.com/docs#values) gives an example:

>     _.values(new Foo);
>     // → [1, 2] (iteration order is not guaranteed)

Since "iteration order is not guaranteed", the array of streams passed to factor-bundle may not be in the same order as the corresponding files in `entries`.  Factor bundle [depends on this correlation](https://github.com/substack/factor-bundle/blob/master/index.js#L73) when building its pipeline.

This commit ensures that there is never a mismatch.
@eggyal
Copy link
Author

eggyal commented May 29, 2015

@joeybaker: Rebased; tests passing!

@joeybaker
Copy link
Contributor

@eggyal thanks! I like your idea of adding the option. Mind adding that into this PR?

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