fix: consolidate isolated node/link attributes#9069
Conversation
9632d28 to
8008fb0
Compare
| link.location = join(nmFolder, dep.name) | ||
| link.name = toKey | ||
| link.optional = optional | ||
| link.package = { _id: dep.package._id, bundleDependencies: undefined, deprecated: undefined, bin: target.package.bin, scripts: dep.package.scripts } |
There was a problem hiding this comment.
I changed the abc here to the actual package _id
| children: combined, | ||
| let wrapper | ||
| /* istanbul ignore next - untested! */ | ||
| if (actualTree.isLink) { |
There was a problem hiding this comment.
This is the only "new" code path here and we are not testing a linked root tree in isolated mode.
Thank you for the heads up. For now, I would want to backport #9066 to v10. |
|
Yeah we can do another backport PR next week. I'm still iterating on this, I have more consolidation I'm doing now. |
Sounds good. Thank you. |
8977248 to
ff5e96b
Compare
|
@owlstronaut this is ready for review now. |
We are making fake versions of nodes and links in isolated mode. With this we are at least being consistent w/ the default attributes. For example `isStoreLink` was not on workspace links, but it is now.
ff5e96b to
e65ce49
Compare
|
@manzoorwanijk given #9064 I think I see now why there is a "top" attribute here that seems out of place. It's left over from before the add omits to trash list refactor. We'll want to be sure to account for that either here or when we backport this refactor to v10. |
| } | ||
| }) | ||
| // XXX top is from place-dep not lib/link.js | ||
| link.top = { path: dep.root.localPath } |
There was a problem hiding this comment.
This is the "top" I am talking about.
We are making fake versions of nodes and links in isolated mode. With this we are at least being consistent w/ the default attributes. For example
isStoreLinkwas not on workspace links, but it is now.@manzoorwanijk Heads up here. This is step one of the "fake Node and Link" cleanup I was talking about.