Skip to content

dependency resolution loops infinitely for erroneous dependencies #13

@davidgwking

Description

@davidgwking

Within lib/flok.js.sortMigrationsUp, efforts are made to resolve dependencies. However, if a dependency is not satisfiable, a call to this function invokes an infinite while loop.

Consider a migration with this set of dependencies

module.exports.dependencies = ['1',, '2'];

Assume '1' and '2' are valid migration ids. unresolvedDeps is filtered down to [undefined], but undefined is never identified as a valid migration id, resulting in an infinite loop.

In this situation, I would expect that the function calls back with an error detailing what dependencies cannot be met.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions