Skip to content
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

Lockfile workspace property behaves poorly in a npm workspace #22176

Closed
dsherret opened this issue Jan 29, 2024 · 0 comments · Fixed by #22179
Closed

Lockfile workspace property behaves poorly in a npm workspace #22176

dsherret opened this issue Jan 29, 2024 · 0 comments · Fixed by #22179
Labels
bug Something isn't working correctly node compat

Comments

@dsherret
Copy link
Member

dsherret commented Jan 29, 2024

Given the following folder structure:

- deno.json
- package.json
- packages/package-a/package.json
- packages/package-b/package.json

If you run deno run packages/package-a/scripts/mod.ts it will resolve package.json in the packages/package-a folder and deno.json in the root folder. So the lockfile code will then be incorrectly told that the package.json dependendencies are for the most recently run package-a instead of understanding it's in an npm workspace.

To fix this, we should get Deno to understand npm workspaces beyond just for resolution with byonm, but probably a quick fix is to just not include a package.json in the "workspaces" area for now when the deno.json folder does not equal the package.json one.

Version: Deno 1.40.x

@dsherret dsherret added bug Something isn't working correctly node compat labels Jan 29, 2024
dsherret added a commit that referenced this issue Jan 30, 2024
littledivy pushed a commit that referenced this issue Feb 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working correctly node compat
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant