In my package.json I have a dependency
installs a package that is on your local file system. This is useful to test out other packages of yours that haven’t been published to the registry.
yarn add file:/path/to/local/folder
I believe your solution doesn't work because
jasminewd2 is a transitive dependency (of
protractor) and not a direct one. So when you add it directly, the transitive one isn't affected.
You can work around that using two approaches:
yarn linkas described in the documentation.
jasminewd2packages and reference them in the respective
package.jsons syntax for that is
From my experience, the second approach has a caveat in the form of npm's cache: your git repo's
HEAD is only pulled when that dependency is first installed. After that, it is kept cached and keeps getting reinstalled every time - even when your repo's
HEAD has changed.
That's why I usually reference a commit hash as part of the dependency like so:
"dependency": "user/repo.git#aef38fb2adc73304ae1ea87b0d607ad7fadc4d0g". I didn't try this trick with
yarn, but assume it behaves the exact same way (by design via the lockfile).