You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on May 29, 2019. It is now read-only.
Since #14 dropped peer dependency on loopback, there is no mechanism notifying developers when they use incompatible loopback and loopback-testing versions.
We should implement a runtime version check.
The text was updated successfully, but these errors were encountered:
The problem with this check is that loopback must be requireable from loopback-testing, which goes against the current design, where the app/model dependencies are injected by the caller.
Here is what I would like to do instead:
modify loopback/lib/application.js to provide access to loopback or loopback.version.
modify loopback/lib/models/mode.js to provide access to loobpack or loopback.version.
the version checking code will be moved to helpers:
_beforeEach.withApp=function(app){assertLoopBackVersionIsCompatible(app.loopback.version);// the original code of `withApp`}// shared by all helpersfunctionassertLoopBackVersionIsCompatible(loopbackVersion){varpkg=require('./package.json');varisCompatible=semver.satisfies(loopbackVersion,pkg.loopbackVersion);if(!isCompatible){thrownewError('incompatible loopback version');}}
Since #14 dropped peer dependency on loopback, there is no mechanism notifying developers when they use incompatible loopback and loopback-testing versions.
We should implement a runtime version check.
The text was updated successfully, but these errors were encountered: