fix(nodejs): support pnpm workspaces with overlapping packages (#10894)