Deno July Update: monorepo, workspace, and private npm registry support


Deno July Update

This month’s update includes Deno 1.45, JSR updates, and more! Let’s dive right in.

image.png Join us for a livestream next Tuesday, July 16th, 9am PT (UTC-7), where we cover how to setup monorepos and workspaces with Deno and answer your questions.

Deno 1.45: Workspaces, monorepos, private npm registries

We’ve had a busy summer so far, with added support for workspaces, monorepo, and private npm registries (as of 1.44).

Workspace support

There are two forms of supported workspaces: Deno-first workspaces (defined in a root-level deno.json ) and backwards-compatible npm workspaces.

To get started, define a "workspace" element inside your deno.json and list the member directories:

{
  "workspace": ["./add", "./subtract"]
}

npm workspaces also work in Deno, whether you’re including a Deno library in a larger npm workspace or vice versa.

To learn more about workspaces and to see examples, check out Deno Docs.

We’re also hosting a one-hour livestream on YouTube on Tuesday, July 16th, 9AM PT (UTC-7) to cover our new workspace support in detail and answer your questions.

Private npm registries

As of Deno 1.44, you can use an .npmrc file to configure Deno to fetch packages from a private registry. Here’s an example:

// .npmrc
@mycompany:registry=http://mycompany.com:8111/
//mycompany.com:8111/:_auth=secretToken
// deno.json
{
  "imports": {
    "@mycompany/package": "npm:@mycompany/package@1.0.0"
  }
}
// main.ts
import { hello } from "@mycompany/package";

console.log(hello());
$ deno run main.ts
Hello world!

You can also watch a short demo on how to use private npm registries on YouTube.

Other runtime updates

We’ve made a ton of improvements and bug fixes to the Deno runtime in 1.44 and 1.45. The most notable updates being:

And more!

Read the full 1.45 release notes ⇒

JSR: Hono, Deno Standard Library, and more

Everyday, we continue to see modules being added to JSR. Recent ones of note include the Deno Standard Library and Hono. Note that we are working towards stabilizing the Standard Library, which will be stabilized on a package-by-package basis. (As of this newsletter, we have stabilized 13 out of 38 utility packages.)

We also recently published a video that shows, side-by-side, publishing a TypeScript module to npm vs. JSR. There are a bunch of steps that one must take to make sure the right files are getting to npm, which are handled by JSR behind the scenes:

image.png

From the community

The 5th deco.cx Hackathon

That’s right, the HTMX Edition of this hackathon begins today, Friday, July 12th. It’s a great opportunity to turn your ideas into high-performance websites using HTMX. Plus, there’s also over $5k in prizes 💰️.

#Showcase

There have been plenty of new projects being shared in our Discord’s #showcase channel:

If you’ve created something with Deno and would like to share it with the Deno community, please use the Discord’s #showcase channel.

In case you missed it…

And that’s it for this issue! If you think someone might find this useful, please forward it to them.

— Andy


Get the latest Deno articles, projects, and other resources.