8000 adding a little more information to the workspace docs by thisisjofrank · Pull Request #1654 · denoland/docs · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

adding a little more information to the workspace docs #1654

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

Merged
merged 7 commits into from
May 1, 2025

Conversation

thisisjofrank
Copy link
Collaborator

No description provided.

@thisisjofrank thisisjofrank marked this pull request as ready for review April 23, 2025 12:15
Copy link
Member
@dsherret dsherret left a comment

Choose a reason for hiding this comment

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

LGTM! But there is one issue under "Managing Version Conflicts"

Comment on lines 491 to 494
The workspace root's import map takes precedence over member-specific imports,
which helps ensure consistent versions across your workspace. For example, if
both the root and a member specify different versions of the same dependency,
the root's version will be used.
Copy link
Member

Choose a reason for hiding this comment

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

It's the opposite. It will use the member's version when resolving the dependency within the member's folder. The member allows overwriting it. That said, when resolving dependency's outside the member's folder, it will resolve based on the workspace root's folder.

Member deno.json dependencies are restricted to the specific member's folder, but the workspace root's deno.json applies to the entire application (including jsr and https dependencies)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Have updated to:

When resolving dependencies, workspace members can override dependencies defined
in the root. If both the root and a member specify different versions of the
same dependency, the member's version will be used when resolving within that
member's folder. This allows individual packages to use specific dependency
versions when needed.

However, member-specific dependencies are scoped only to that member's folder.
Outside of member folders, or when working with files at the workspace root
level, the workspace root's import map will be used for resolving dependencies
(including JSR and HTTPS dependencies).

@thisisjofrank thisisjofrank enabled auto-merge (squash) May 1, 2025 10:59
@thisisjofrank thisisjofrank merged commit 870d5dd into main May 1, 2025
4 checks passed
@thisisjofrank thisisjofrank deleted the workspaces-addition branch May 1, 2025 11:09
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
0