Skip to content

refactor: centralise imports and cleanup exports#2900

Merged
marvinhagemeister merged 6 commits intodenoland:mainfrom
iuioiua:deno-jsons-clean
May 19, 2025
Merged

refactor: centralise imports and cleanup exports#2900
marvinhagemeister merged 6 commits intodenoland:mainfrom
iuioiua:deno-jsons-clean

Conversation

@iuioiua
Copy link
Contributor

@iuioiua iuioiua commented May 7, 2025

The benefits of these changes are:

  1. Managing and updating dependencies is easier. One only needs to run deno outdated at the root, instead of in each workspace.
  2. The versions of dependencies across workspaces is kept consistent.

Closes #2788

@iuioiua iuioiua marked this pull request as ready for review May 7, 2025 22:41
@iuioiua
Copy link
Contributor Author

iuioiua commented May 12, 2025

PTAL @marvinhagemeister

@marvinhagemeister
Copy link
Collaborator

I fee like this PR is a good argument why Deno should support workspace: outside of package.json. It's perfectly reasonable to centralise versioning of shared dependencies in the root deno.json file like done here, but you still want to be able to see what the dependencies of each package are. I'll bring it up with the CLI team.

@iuioiua
Copy link
Contributor Author

iuioiua commented May 13, 2025

We could just use deno.jsonc.

@marvinhagemeister
Copy link
Collaborator

We could just use deno.jsonc.

I'm not sure I'm following. What would change and what it would look like?

@iuioiua
Copy link
Contributor Author

iuioiua commented May 13, 2025

Imports within deno.jsonc sectioned off by comments indicating the workspace the group of imports is for. Happy to implement.

@iuioiua
Copy link
Contributor Author

iuioiua commented May 18, 2025

@marvinhagemeister, is not being able to know which dependencies each workspace uses a blocker for this PR? If so, I can rename the deno.json to deno.jsonc and section off each group of imports by workspace using a comment. But that'd need other small changes to the codebase that read the root config file. This PR would cure quite a few ills, including potential ones.

Copy link
Collaborator

@marvinhagemeister marvinhagemeister left a comment

Choose a reason for hiding this comment

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

LGTM

is not being able to know which dependencies each workspace uses a blocker for this PR?

No, I've changed my mind on this one since the recent issue where due to missing peerDependencies I published an alpha with duplicate Preact versions. Let's merge this.

@marvinhagemeister marvinhagemeister merged commit 3776ef3 into denoland:main May 19, 2025
7 checks passed
@iuioiua iuioiua deleted the deno-jsons-clean branch May 19, 2025 07:48
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.

Update jsr:@fresh/init's generated dependencies

2 participants