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

Deno v2 And Imports #54

Merged
merged 5 commits into from
Dec 21, 2024
Merged

Deno v2 And Imports #54

merged 5 commits into from
Dec 21, 2024

Conversation

jbolda
Copy link
Collaborator

@jbolda jbolda commented Dec 21, 2024

Motivation

Deno v2 has arrived. Updating the bits to support using it. I ran a deno fmt as well to handle any formatting changes coming along in v2.

Additionally, I made the swap to use imports in deno.json. This is more newly supported, but provides a few benefits over dep.ts. Do note, any local / dev dependencies (see scripts or testing) still use a direct import out of convenience and less need for central control. The tests still use test.ts however to handle all deps including the additional helper functions.

It means that all of our imports can be listed in a central place much the same, but at the actual import location, we are able to specify the dependency from which it originates. This makes it clear when we are using a dependency directly as opposed to an extend version.

import { type Operation } from 'effection'

The dnt script is able to use these just the same, and it allows us to remove the mapping for most values. It more centrally handles the versions. The one caveat, if we want to use a deno based import still, we specify it as such in the deno.json imports and then provide a mapping when using dnt.

@jbolda jbolda requested review from neurosnap and VldMrgnn December 21, 2024 06:40
Copy link
Owner

@neurosnap neurosnap left a comment

Choose a reason for hiding this comment

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

Thanks for spearheading, looks good to me!

@neurosnap neurosnap merged commit ce7d484 into main Dec 21, 2024
4 checks passed
@neurosnap neurosnap deleted the deno-v2-and-imports branch December 21, 2024 17:28
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