Skip to content

fix: consolidate isolated node/link attributes#9069

Open
wraithgar wants to merge 1 commit intolatestfrom
gar/isolated-fake-node
Open

fix: consolidate isolated node/link attributes#9069
wraithgar wants to merge 1 commit intolatestfrom
gar/isolated-fake-node

Conversation

@wraithgar
Copy link
Member

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.

@manzoorwanijk Heads up here. This is step one of the "fake Node and Link" cleanup I was talking about.

@wraithgar wraithgar requested a review from a team as a code owner March 5, 2026 20:52
@wraithgar wraithgar force-pushed the gar/isolated-fake-node branch from 9632d28 to 8008fb0 Compare March 5, 2026 21:04
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 }
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I changed the abc here to the actual package _id

children: combined,
let wrapper
/* istanbul ignore next - untested! */
if (actualTree.isLink) {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the only "new" code path here and we are not testing a linked root tree in isolated mode.

@manzoorwanijk
Copy link
Contributor

@manzoorwanijk Heads up here. This is step one of the "fake Node and Link" cleanup I was talking about.

Thank you for the heads up. For now, I would want to backport #9066 to v10.

@wraithgar
Copy link
Member Author

Yeah we can do another backport PR next week. I'm still iterating on this, I have more consolidation I'm doing now.

@manzoorwanijk
Copy link
Contributor

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.

@wraithgar wraithgar force-pushed the gar/isolated-fake-node branch 2 times, most recently from 8977248 to ff5e96b Compare March 6, 2026 04:23
@wraithgar
Copy link
Member Author

@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.
@wraithgar wraithgar force-pushed the gar/isolated-fake-node branch from ff5e96b to e65ce49 Compare March 6, 2026 04:28
@wraithgar
Copy link
Member Author

@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 }
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the "top" I am talking about.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants