feat: prototype - dependencies and dev dependencies #31065
Draft
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is still controversial internally. Just starting a PR.
In my opinion, we need a way to represent dev dependencies in Deno. Right now it's not possible to tell what are dev dependencies and what is actually used in the distributed code.
deno compiledeno auditcan figure out what are dev deps with this. Right now it has no clue.Idea from Nayeem is to introduce first-class support for
dependenciesanddevDependencies. The"imports"key remains as Deno having support for import maps, but this newdependencies/devDependencieswould be Deno specific.deno lint --fixto changeimportsintodependencieswhen able.Proposal
Imported as:
Why not
devImportsin addition toimports?This wouldn't be too bad, but it would be nice to move away from the import map standard for describing dependencies so the description can be more terse (not repeat the package name twice in the entry) and also to make it clear this is different than the import map standard. Perhaps we should still do this to reduce confusion with how imports are supposed to be done in Deno and make this more of an additive change.
Closes #26865
Closes #26865