-
Notifications
You must be signed in to change notification settings - Fork 41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
yarn.lock to package-lock.json conversion ignores workspaces #44
Comments
@qwelias if (fs.existsSync(nodeModulesPath)) { // TODO: and is dir
const nodeModulesPackages = fs.readdirSync(nodeModulesPath)
nodeModulesPackages
.filter(dir => !/^\./.test(dir)) // no hidden directories (eg. .bin)
.reduce((packages, dir) => mergeScopes(nodeModulesPath, packages, dir), [])
.forEach(nmPackage => nmTree(path.join(nodeModulesPath, nmPackage), tree))
}
UPD: It reads. It just overrides all the same named deps with the last found. |
I'll try to fix it on this weekend. |
Hey, @qwelias - I think now with @antongolub's fixed published we can close this, right? |
Hi, there's something strange. @antongolub If you run
|
@qwelias, |
I think it still doesn't work output on test repo
|
Thanks for the feedback. I'll let you know when I fix this issue. |
Btw test repo was linked in the initial issue comment, so you can test the implementation :) |
…r workspaces with cross-refs relates #44
* refactor: separate workspace utils * fix: adapt parentPackagePath resolver to relative paths closes #46 * fix(lockfileV2): add some missed relative paths handlers, add test for workspaces with cross-refs relates #44 * feat: enable lockfile v2 (workspaces) processing by cli flag * fix: use platform specific separators * fix: adapt parent path resolver to windows-based runtime * feat: replace workspace exception flow with warning
# 1.0.0 (2020-08-31) ### Bug Fixes * better cli errors ([1e05ade](1e05ade)) * check node_modules properly ([d866ee2](d866ee2)) * corrupted entries in yarn.lock file ([a8ef713](a8ef713)) * dependencies do not have duplicates and add optional deps ([a3289bc](a3289bc)) * eol formatting ([fe50c68](fe50c68)) * git & tarball support yarn -> npm ([#28](#28)) ([c0703ef](c0703ef)) * move tap-spec to devDeps ([4b57858](4b57858)) * parent path bug with relative paths ([4b8ed4a](4b8ed4a)) * parentPackagePath resolver ([#47](#47)) ([6395a7e](6395a7e)), closes [#46](#46) [#44](#44) * remove redundant exit condition ([73320c0](73320c0)) * support crlf line endings ([f555d0e](f555d0e)) * support npm integrities with several hashes, use legacy url.parse if exists ([610bf77](610bf77)) * **npm-to-yarn:** support github deps ([43a485d](43a485d)) * **tree:** properly handle root level hoisting conversion ([9a7eec9](9a7eec9)) ### Features * **ecosystem:** handle yarn workspaces and integrity fields ([#45](#45)) ([c84fb2c](c84fb2c)) * add primary TS typings ([#42](#42)) ([512378e](512378e)) * **cli:** --force ([#37](#37)) ([57a081c](57a081c)) * **conversion:** improve file dependencies support ([c1883f8](c1883f8)) * bundled dependencies and root devDependencies ([e26ae6c](e26ae6c)) * cli usage ([2b3b711](2b3b711)) * multiple level dependencies ([4ec40cc](4ec40cc)) * use node_modules dir for state ([31a1e6d](31a1e6d))
# 1.0.0 (2020-08-31) ### Bug Fixes * better cli errors ([1e05ade](1e05ade)) * check node_modules properly ([d866ee2](d866ee2)) * corrupted entries in yarn.lock file ([a8ef713](a8ef713)) * dependencies do not have duplicates and add optional deps ([a3289bc](a3289bc)) * eol formatting ([fe50c68](fe50c68)) * git & tarball support yarn -> npm ([#28](#28)) ([c0703ef](c0703ef)) * move tap-spec to devDeps ([4b57858](4b57858)) * parent path bug with relative paths ([4b8ed4a](4b8ed4a)) * parentPackagePath resolver ([#47](#47)) ([6395a7e](6395a7e)), closes [#46](#46) [#44](#44) * remove redundant exit condition ([73320c0](73320c0)) * support crlf line endings ([f555d0e](f555d0e)) * support npm integrities with several hashes, use legacy url.parse if exists ([610bf77](610bf77)) * **npm-to-yarn:** support github deps ([43a485d](43a485d)) * **tree:** properly handle root level hoisting conversion ([9a7eec9](9a7eec9)) ### Features * **ecosystem:** handle yarn workspaces and integrity fields ([#45](#45)) ([c84fb2c](c84fb2c)) * add primary TS typings ([#42](#42)) ([512378e](512378e)) * **cli:** --force ([#37](#37)) ([57a081c](57a081c)) * **conversion:** improve file dependencies support ([c1883f8](c1883f8)) * bundled dependencies and root devDependencies ([e26ae6c](e26ae6c)) * cli usage ([2b3b711](2b3b711)) * multiple level dependencies ([4ec40cc](4ec40cc)) * use node_modules dir for state ([31a1e6d](31a1e6d))
From v1.8.1 synp provides experimental support for workspaces. This feature could be enabled with |
Issue description:
Workspaces may have specific versions of dependencies which would not get hoisted to the root level, but synp accounts only for root node_modulesLooks like there's an issue withnmtree
, which leads to a loss of information in resultingpackage-lock.json
test repo
produced
package-lock.json
does not have other lodash versions:UPD: fixed repo link
The text was updated successfully, but these errors were encountered: