Closed dappelt closed 7 years ago
@justmoon You are right! In fact, the problem is not only limited to the newly added modules ilp-routing
and five-bells-shared
, but also applies to other dependencies (i.e. ilp-core
, ilp
, ilp-plugin-bells
).
I implemented your suggested fix and it seems to work. However, the more I am thinking about it I am not sure if I like this solution. With this fix, we are removing the dependency version as defined in the package.json
and replace it with the latest version. On one hand, we make sure that all the latest versions of our modules work together, which is good. On the other hand, we have no guarantees that the tests would pass if the module is executed with the dependency version as defined in the package.json
and, hence, if we would npm install
a module the ordinary way it might not work.
Instead of "automatically" changing dependency versions, should we instead enforce that the referenced versions of our modules in package.json
are the latest version? This way we would know that 1) the latest version of our modules are compatible and 2) the version tested in integration testing is the same as the one obtained by an ordinary npm install
.
cc @emschwartz
Instead of "automatically" changing dependency versions, should we instead enforce that the referenced versions of our modules in package.json are the latest version?
I think we have to achieve several goals:
The way I'd try to achieve each is:
semantic-release
for all modulesdevelop
branch, use yarn
or npm shrinkwrap
to guarantee a specific set of modules and whenever we update master we run a test that ensures all modules are the latest version@dappelt @emschwartz @vhpoet Thoughts?
This is what five-bells-integration-test-loader should worry about
Agreed. The test loader could check that the package.json
of the tested module references the latest ilp/five-bells modules. If not, we could let the build fail or give a warning.
Perhaps we should deploy semantic-release for all modules
I had a quick look at the readme, semantic-release
might indeed be useful.
Hmm, this doesn't seem to work as intended. It's still installing different versions of those libraries.
The fix could be after
npm install
to go in and find and delete all folders matchingnode_modules/**/node_modules/[module]
where**
is an arbitrary string (which may contain additional levels ofnode_modules
) and[module]
is one of the modules listed in the DependencyManager options. Could be done using a module like glob.