I am using the package "csv-file-validator": "^1.8.0" which comes with 3 dependencies
famulus "2.1.2"
lodash "4.17.15"
papaparse "^5.2.0"
I would like to update/force the version of lodash to be 4.17.20. I found about selective dependency resolution and did the following in my package.json
"resolutions": {
"csv-file-validator/lodash": "^4.17.20"
}
I removed my yarn.lock, the node_modules folder and ran yarn install once again. However, the lodash version is still 4.17.15
csv-file-validator#^1.8.0:
version "1.8.0"
resolved "https://pkgs.dev.azure.com/RCTechnologies/EMA/_packaging/EMA/npm/registry/csv-file-validator/-/csv-file-validator-1.8.0.tgz#f8b879f533ce8c84b115d0ed2eca8e691249ec22"
integrity sha1-+Lh59TPOjISxFdDtLsqOaRJJ7CI=
dependencies:
famulus "2.1.2"
lodash "4.17.15"
papaparse "^5.2.0"
Is it possible to achieve this? If so did I miss something, and what?
yarn.lock will always show the dependencies declared in that version's package.json. You needed to check lodash's entry instead which should look like
lodash#4.17.15, lodash#^4.17.20, <maybe other version strings>:
version "4.17.20"
...
while without that resolution you'd get
lodash#4.17.15, <maybe other version strings>:
version "4.17.15"
...
Or use yarn why lodash.
Related
I have a project with yarn (v1) workspaces.
project/
packages/
pkgA/
subPkgA1/
pkgB/
package.json has this:
"workspaces": {
"packages": [
"packages/pkgA",
"packages/pkgA/subPkgA1",
"packages/pkgB"]}
note that there's a nested workspace in there.
Top-level has jest#27.4.7 in its package.json.
pkgA has jest#24.9.0 because one of its dependencies requires that version; its package.json has no entry for jest.
pkgA/subPkgA1 has jest#27.4.7 in its package.json, BUT it actually gets 24.9.0 installed in its node_modules/.bin/jest, presumably because its parent workspace has that.
My main question is how to get jest#27.4.7 in the nested package subPkgA1? I tried adding an entry in pkgA's package.json, but that didn't help.
BTW, I know nested workspaces aren't fully supported until Yarn v2, but I can't upgrade right now, and I can't easily move my subpackage out of its parent, so any hacky solution would be better than nothing.
I am trying to migrate from rx5 to rx6 by following the guide here. Initially, I installed along with the rxjs-compat package and everything works fine. However, when I try to remove the rxjs-compat package, I am getting an exception Cannot find module 'rxjs-compat/Subscription'. I used the rxjs-5-to-6-migrate to perform the migration
I am using this statement for Subscription : import { Subscription } from "rxjs";
For reference this is my branch- https://github.com/akshita31/omnisharp-vscode/tree/rxjs_update and this is the corresponding pull request that lists all the changes - https://github.com/OmniSharp/omnisharp-vscode/pull/2830
I updated all the dependencies to the latest versions and used the rxjs-tslint-rules as follows
npm install rxjs-tslint-rules --save-dev
Then in my tslint.json add the rule "rxjs-no-compat" : true
Execute ./node_modules/.bin/tslint -c tslint.json -p tsconfig.json in the project folder. This will give all the set of invalid imports
Resolve the invalid imports and then try removing the rxjs-compat package.
I also cleaned my npm cache - npm cache clean --force
If there are no more errors, we can as well remove the above tslint dependency from the package.json
More details can be found in the issue.
Thanks #cartant for the help
Do you by any chance still have some imports that are still using rxjs-compat?
With the migration from rxjs 5 to 6, you need to be very careful about all the imports, since you don't want to import some module from wrong the wrong path. I believe rxjs-tslint can help you.
I'm using govendor for managing dependencies in a project. I have the following dependency in my vendor/vendor.json.
{
...
"package": [
{...},
{
"checksumSHA1": "8XAGmXqf+b4LW91wsWxa4kH1NN0=",
"path": "gopkg.in/h2non/bimg.v1",
"revision": "9bb3ae10c5ce30e72f7ac0834368536fc095d6a7",
"revisionTime": "2017-01-13T19:35:42Z"
}
],
...
}
Now I want to use master version of bimg package, which is newer than version 1.0.7 fetched by govendor. What is a proper way to achieve this, beside manually downloading master version from github and saving it to the vendor folder?
ps: all dependencies are committed.
I got help from #jbrandhorst in go slack:
you'll want to remove the old one as well, govendor remove gopkg.in/h2non/bimg.v1
[3:16] source repo appears to be github.com/h2non/bimg, so
govendor fetch github.com/h2non/bimg will install it to your vendor
folder
[3:16] if you just want to add it to your vendor.json, you use
govendor add I think
Somewhere in my yarn.lock file:
reactpack#^0.9.0:
resolved "https://registry.yarnpkg.com/reactpack/-/reactpack-0.9.0.tgz#ee3b7692a2c99231d5c235af87ad33d0d0cb6434"
dependencies:
...
react-hot-loader "^1.3.0"
...
I want to change react-hot-loader to "3.0.0-beta.6".
I tried to add following part to package.json:
"resolutions": {
"react-hot-loader": "3.0.0-beta.6"
}
but it is ignored by yarn :(.
Runing yarn --flat wants to flatten ALL packages (which is not what I want)...
Any other alternatives?
I am trying to install package Payum/PayumBundle,I add
"require-dev": {
"payum/payum-bundle": "1.0.0-BETA2"
}
to indicate I also need to download dev version.
this gives me an error:
Problem 1
- The requested package payum/payumbundle could not be found in any version, there may be a typo in the package name.
Potential causes:
- A typo in the package name
- The package is not available in a stable-enough version according to your minimum-stability setting
see <https://groups.google.com/d/topic/composer-dev/_g3ASeIFlrc/discussion> for more details.
how do we find the right version constraint from git tag ,branches?
what I tried :
2. tried the version constraint following
1.0.*#beta , 1.0.0 , 1.0.*#beta ,1.0.*#dev,1.0.0#beta
the result is still the same
the latest tag for this project is
1.0.0-BETA2
what is the correct version constraint for this? this post explains what a version constraint can be , but it doesn't explain how to find the right version constraint from git tag.
The easier way how to get proper version name, is go to package detail on packagist.org.
There you'll find out there are no BETA tags available. It might be caused by not triggering autoupdate by Github.
You can see, the last dev version is: 1.0.x-dev
So this command would normally do the trick:
composer require payum/payum-bundle:1.0.x-dev
But this package depends on another dev package, so you need to mention them both in your composer.json. Like this:
{
"require": {
"payum/payum-bundle": "1.0.x-dev",
"payum/core": "1.0.x-dev"
}
}
And run:
composer update
That's all :). Verified!