Ryan Dahl: From Node.js and Deno to the 'Modern' JSR Registry

https://thenewstack.io/ryan-dahl-from-node-js-and-deno-to-the-modern-jsr-registry/

Join our community of software engineering leaders and aspirational developers. Always stay in-the-know by getting the most important news and exclusive content delivered fresh to your inbox to learn more about at-scale software development.

It seems that you've previously unsubscribed from our newsletter in the past. Click the button below to open the re-subscribe form in a new tab. When you're done, simply close that tab and continue with this form to complete your subscription.

The New Stack does not sell your information or share it with unaffiliated third parties. By continuing, you agree to our Terms of Use and Privacy Policy.

Welcome and thank you for joining The New Stack community!

Please answer a few simple questions to help us deliver the news and resources you are interested in.

Great to meet you!

Tell us a bit about your job so we can cover the topics you find most relevant.

REQUIRED

REQUIRED

REQUIRED

REQUIRED

REQUIRED

REQUIRED

Welcome!

We’re so glad you’re here. You can expect all the best TNS content to arrive Monday through Friday to keep you on top of the news and at the top of your game.

What’s next?

Check your inbox for a confirmation email where you can adjust your preferences and even join additional groups.

Follow TNS on your favorite social media networks.

Become a TNS follower on LinkedIn.

Check out the latest featured and trending stories while you wait for your first TNS newsletter.

As a JavaScript developer, what non-React tools do you use most often?

I don't use JavaScript

0%

Thanks for your opinion! Subscribe below to get the final results, published exclusively in our TNS Update newsletter:

The creator of Node.js and Deno has a new mission: Securing JavaScript packages against malicious users.

Featued image for: Ryan Dahl: From Node.js and Deno to the ‘Modern’ JSR Registry

Ryan Dahl keeps finding new approaches to familiar tech. More than once, he’s played a central role in the evolution of an existing ecosystem. Now he’s part of an effort to modernize the many modules of code that developers import into their projects every day. And it’s not just upgrading repositories and supply chains, but ultimately the way that secure development gets performed.

On a recent episode of Stack Overflow’s podcast that featured Dahl, StackOverflow editor Ryan Donovan began by acknowledging that Dahl “started the whole JavaScript-on-the-backend movement” — before following it up in 2018 with the Deno runtime for JavaScript, TypeScript, and WebAssembly. On the podcast, Dahl succinctly summarized much of the commercial effort at the Deno project today: “to build, let’s call it, a cloud runtime, a multitenant JavaScript runtime that spans data center regions — spans clouds, even — and is set up to handle many, many users at once.”

But Dahl also recorded the interview just two weeks after Deno had announced the launch of the new JavaScript Registry, which Dahl said will ensure that its published packages “are modern and doing best practices.”

Dahl used the podcast to explain the multiple ambitions behind the project, offering a vision for what a secure repository will look like in the future.

And along the way, he even offered a prediction about what lies ahead for JavaScript…

Why JSR?

Among other things, JSR packages include type declaration files. But Dahl said the new repository is attempting to address the fact that JavaScript has two different module systems that “do not play well with each other” — CommonJS and ECMAScript modules (or ESM). As Dahl sees it, ESM is “now kind of embedded into all of the web browsers, the real way of doing modules.” (“ECMAScript modules have arrived as a standard,” explains the FAQ for the repository.) So the JSR supports ES modules only.

But in addition, “There are more JavaScript runtimes than just Node.js and browsers. With the emergence of Deno, Bun, workerd, and other new JavaScript environments, a Node.js-centric package registry no longer makes sense for the entire JS ecosystem.” And with TypeScript emerging as a de facto standard, “A modern registry should be designed with TypeScript in mind.”

Yet beyond that, Dahl sees it all in a larger context. “Deno in general is attempting to level up JavaScript…” he said on the podcast. “It’s incumbent on us as developers to really move this ecosystem into the future. And Deno is trying to do this at the runtime layer, but what we perceive is, really, a problem at the registry layer where you share code.”

The JSR isn’t meant as a replacement of the current npm package registry, but as an extension, Dahl explained. “In some sense, you can think of it as a superset of npm, kind of in the same way that TypeScript itself is a superset of JavaScript.”

Did you know that JSR packages can be used from Node.js with no configuration?

⬇️⬇️⬇️ pic.twitter.com/4AtwLtmX4q

— JSR (@jsr_io) March 6, 2024

But Dahl has given a lot of thought to npm. “For a very long time, they did not even keep checksums of npm packages. And there have been instances where hackers have gotten into the registry and potentially changed tarballs that were published, and there is no way to know because there is no checksum of those tarballs.” There’s also supply chain issues — the problem of not just malicious pull requests, but malicious code coming from upstream…

JSR attempts to provide more visibility with a simple way to give packages cryptographic signatures. Packages built on GitHub (using GitHub Actions) can provide an OpenID Connect token to JSR that will ultimately publish the corresponding cryptographic signature on the Sigstore blockchain. “We can do these ‘cryptographic attestations’, as they’re called, of where packages got built — and publish them in the package pages and expose these details to users.” In short, it provides a record of where the code is coming from. “And that is important for trust, right?

“It’s building up a web of trust.”

Later Dahl calls it in some ways “an extension of signed commits…”

“Things that I invented in 2010 for Node.js are just not where browsers are going now. And I think there’s a real need to close the gap between browsers.”

—Ryan Dahl

It’s all part of a vision for a more secure future. “At the end of the day, you’re going to take a number of dependencies and build your microservice and then run that as a Docker container in some Kubernetes infrastructure. And it would be very nice… to be able to say all software running inside this Docker container has attestations that trace it all the way back to a verified user somewhere and that there is no code that is running here that we don’t know where it came from.

“We’re kind of building up the infrastructure for this. And what likely will happen is, in the future, every microservice will have clear attribution for all of your dependencies. And that’s very nice — then you have really mitigated the supply chain risk.”

Dahl also stresses that the new repository (unlike npm) “is completely open source. The back end, the front end — the whole thing is open sourced and MIT licensed.”

JSR is not part of the commercial operations of the Deno company. “JSR is for the JavaScript community. It is an attempt to level up JavaScript, and it’s designed to be able to run very cheaply on commodity cloud software… We would eventually like to have this thing be in a foundation and kind of operating independently. We’re trying to build an institution here for the future of JavaScript.”

Now in its “public beta” stage at jsr.io, the JSR is officially billed as a package registry “for modern JavaScript and TypeScript.”

Dahl emphasized on the podcast that it’s not a package manager. “You can use your existing package manager but connect it to this new registry…”

Looking Ahead

At one point Dahl acknowledged that TypeScript was “very, very useful. It has clear utility.” So much so that he predicts its JavaScript-superset-with-types concept “is likely to be codified in standards. Maybe not this year or next year or the year after, but I think over time TypeScript will find its way into the standards and really become part of what JavaScript is.”

When asked for predictions about the future of JavaScript, Dahl started by saying the language is “deeply embedded” in today’s web ecosystem, and “It’s definitely not going away anytime soon… Unlike many other technologies in the world, I feel confident saying that JavaScript will be here five years from now, if not 10, if not 20 years from now.”

He even put it in the most pragmatic possible terms. “Like, your bank depends on JavaScript. It is not going away anytime soon.”

But looking specifically toward what’s to come, Dahl said “The future of JavaScript is browsers. Browsers will always dictate the future of JavaScript.”

So while there’s obviously a large community writing server-side JavaScript, “any server-side code must narrow the gap to browser JavaScript.” It’s part of why they’re pushing ECMAScript modules over CommonJS modules.

“Things that I invented in 2010 for Node.js are just not where browsers are going now. And I think there’s a real need to close the gap between browsers.”

YOUTUBE.COM/THENEWSTACK

Tech moves fast, don't miss an episode. Subscribe to our YouTube channel to stream all our podcasts, interviews, demos, and more.

SUBSCRIBE

Group Created with Sketch.

TNS owner Insight Partners is an investor in: Deno, Docker.

TNS DAILY NEWSLETTER Receive a free roundup of the most recent TNS articles in your inbox each day.

The New Stack does not sell your information or share it with unaffiliated third parties. By continuing, you agree to our Terms of Use and Privacy Policy.

{
"by": "MilnerRoute",
"descendants": 0,
"id": 40247761,
"score": 1,
"time": 1714744905,
"title": "Ryan Dahl: From Node.js and Deno to the 'Modern' JSR Registry",
"type": "story",
"url": "https://thenewstack.io/ryan-dahl-from-node-js-and-deno-to-the-modern-jsr-registry/"
}
{
"author": "David Cassel",
"date": "2024-04-30T20:39:59.000Z",
"description": "The creator of Node.js and Deno has a new mission: Securing JavaScript packages against malicious users.",
"image": "https://cdn.thenewstack.io/media/2024/05/8829729f-jsr.jpg",
"logo": "https://logo.clearbit.com/thenewstack.io",
"publisher": "The New Stack",
"title": "Ryan Dahl: From Node.js and Deno to the ‘Modern’ JSR Registry",
"url": "https://thenewstack.io/ryan-dahl-from-node-js-and-deno-to-the-modern-jsr-registry/"
}
{
"url": "https://thenewstack.io/ryan-dahl-from-node-js-and-deno-to-the-modern-jsr-registry/",
"title": "Ryan Dahl: From Node.js and Deno to the ‘Modern’ JSR Registry",
"description": "Join our community of software engineering leaders and aspirational developers. Always stay in-the-know by getting the most important news and exclusive content delivered fresh to your inbox to learn more...",
"links": [
"https://thenewstack.io/ryan-dahl-from-node-js-and-deno-to-the-modern-jsr-registry/",
"https://thenewstack.io/?p=22741308"
],
"image": "https://cdn.thenewstack.io/media/2024/05/8829729f-jsr.jpg",
"content": "<div>\n<div>\n<p>\nJoin our community of software engineering leaders and aspirational developers. Always\nstay in-the-know by getting the most important news and exclusive content delivered\nfresh to your inbox to learn more about at-scale software development.\n</p>\n<div>\n<div>\n<p>\nIt seems that you've previously unsubscribed from our newsletter\nin the past. Click the button below to open the re-subscribe form\nin a new tab. When you're done, simply close that tab and continue\nwith this form to complete your subscription.\n</p>\n</div>\n<p>\nThe New Stack does not sell your information or share it with\nunaffiliated third parties. By continuing, you agree to our\n<a target=\"_blank\" href=\"https://thenewstack.io/terms-of-use/\">Terms of Use</a> and\n<a target=\"_blank\" href=\"https://thenewstack.io/privacy-policy/\">Privacy Policy</a>.\n</p>\n</div>\n</div>\n<div>\n<p>\nWelcome and thank you for joining The New Stack community!\n</p>\n<p>\nPlease answer a few simple questions to help us deliver the news and resources you are interested in.\n</p>\n</div>\n<div>\n<p>\nGreat to meet you!\n</p>\n<p>\nTell us a bit about your job so we can cover the topics you find most relevant.\n</p>\n<div>\n<div>\n<p><label>What is your job level?</label>\n</p>\n<p>\nREQUIRED\n</p>\n</div>\n<div>\n<p><label>Which of these most closely describes your job role?</label>\n</p>\n<p>\nREQUIRED\n</p>\n</div>\n<div>\n<p><label>How many employees are in the organization you work with?</label>\n</p>\n<p>\nREQUIRED\n</p>\n</div>\n<div>\n<p><label>What option best describes the type of organization you work for?</label>\n</p>\n<p>\nREQUIRED\n</p>\n</div>\n<div>\n<p><label>Which of the following best describes your organization's primary industry?</label>\n</p>\n<p>\nREQUIRED\n</p>\n</div>\n<div>\n<p><label>LINKEDIN PROFILE URL</label>\n</p>\n<p>\nREQUIRED\n</p>\n</div>\n</div>\n</div>\n<div>\n<p>\nWelcome!\n</p>\n<div>\n<p>\nWe’re so glad you’re here. You can expect all the best TNS content to arrive\nMonday through Friday to keep you on top of the news and at the top of your game.\n</p>\n<p>\nWhat’s next?\n</p>\n<p>\nCheck your inbox for a confirmation email where you can adjust your preferences\nand even join additional groups.\n</p>\n<p>\nFollow TNS on your favorite social media networks.\n</p>\n<p>\nBecome a <a href=\"https://www.linkedin.com/company/the-new-stack\" target=\"_blank\">TNS follower on LinkedIn</a>.\n</p>\n<p>\nCheck out <a target=\"_blank\" href=\"https://thenewstack.io/\">the latest featured and trending stories</a> while you wait for your\nfirst TNS newsletter.\n</p>\n</div>\n</div>\n</div>\n<div>\n<div>\n<div>\n<p>\nAs a JavaScript developer, what non-React tools do you use most often? </p>\n</div>\n<div>\n<p>✓</p>\n<p>\nI don't use JavaScript </p>\n<p>0%</p>\n</div>\n</div>\n<div>\n<p>\nThanks for your opinion! Subscribe below to get the final results, published\nexclusively in our TNS Update newsletter:\n</p>\n</div>\n</div>\n<div>\n<div>\n<div>\n<p>\nThe creator of Node.js and Deno has a new mission: Securing JavaScript packages against malicious users. </p>\n</div>\n<p><img src=\"https://cdn.thenewstack.io/media/2024/05/8829729f-jsr.jpg\" alt=\"Featued image for: Ryan Dahl: From Node.js and Deno to the ‘Modern’ JSR Registry\" />\n</p>\n<div>\n<p><a target=\"_blank\" href=\"https://thenewstack.io/denos-ryan-dahl-is-an-asynchronous-guy/\">Ryan Dahl</a> keeps finding new approaches to familiar tech. More than once, he’s <a target=\"_blank\" href=\"https://thenewstack.io/how-node-js-is-addressing-the-challenge-of-ryan-dahls-deno/\">played a central role</a> in the evolution of an existing ecosystem. Now he’s part of an effort to modernize the many modules of code that developers import into their projects every day. And it’s not just upgrading repositories and supply chains, but ultimately the way that secure development gets performed.</p>\n<p>On a <a target=\"_blank\" href=\"https://the-stack-overflow-podcast.simplecast.com/episodes/why-the-creator-of-nodejs-created-a-new-javascript-runtime/\">recent episode</a> of Stack Overflow’s podcast that featured Dahl, StackOverflow editor Ryan Donovan began by acknowledging that Dahl “started the whole JavaScript-on-the-backend movement” — before following it up in 2018 with the <a target=\"_blank\" href=\"https://thenewstack.io/5-tips-to-build-like-a-pro-with-slacks-deno-sdk-and-new-cli/\">Deno runtime</a> for <a target=\"_blank\" href=\"https://thenewstack.io/JavaScript/\">JavaScript</a>, <a target=\"_blank\" href=\"https://thenewstack.io/what-is-typescript/\">TypeScript</a>, and <a target=\"_blank\" href=\"https://thenewstack.io/WebAssembly/\">WebAssembly</a>. On the podcast, Dahl succinctly summarized much of the commercial effort at the Deno project today: “to build, let’s call it, a cloud runtime, a multitenant JavaScript runtime that spans data center regions — spans clouds, even — and is set up to handle many, many users at once.”</p>\n<p>But Dahl also recorded the interview just two weeks after Deno had <a target=\"_blank\" href=\"https://deno.com/blog/jsr_open_beta\">announced</a> the<a target=\"_blank\" href=\"https://t.co/mO7nWABnjh\"> launch</a> of the new <a target=\"_blank\" href=\"https://jsr.io/\">JavaScript Registry</a>, which Dahl said will ensure that its published packages “are modern and doing best practices.”</p>\n<p>Dahl used the podcast to explain the multiple ambitions behind the project, offering a vision for what a <a target=\"_blank\" href=\"https://thenewstack.io/stacklok-builds-on-sigstore-to-identify-safe-open-source-libraries/\">secure repository</a> will look like in the future.</p>\n<p>And along the way, he even offered a prediction about what lies ahead for JavaScript…</p>\n<h2>Why JSR?</h2>\n<p>Among other things, JSR packages include <a target=\"_blank\" href=\"https://www.typescriptlang.org/docs/handbook/declaration-files/introduction.html\">type declaration files</a>. But Dahl said the new repository is attempting to address the fact that JavaScript has two different module systems that “do not play well with each other” — CommonJS and ECMAScript modules (or ESM). As Dahl sees it, ESM is “now kind of embedded into all of the web browsers, the real way of doing modules.” (“ECMAScript modules have arrived as a standard,” explains <a target=\"_blank\" href=\"https://jsr.io/docs/why\">the FAQ</a> for the repository.) So the JSR supports ES modules only.</p>\n<p>But in addition, “There are more JavaScript runtimes than just Node.js and browsers. With the emergence of Deno, Bun, workerd, and other new JavaScript environments, a Node.js-centric package registry no longer makes sense for the entire JS ecosystem.” And with TypeScript emerging as a de facto standard, “A modern registry should be designed with TypeScript in mind.”</p>\n<p>Yet beyond that, Dahl sees it all in a larger context. “Deno in general is attempting to level up JavaScript…” he said on the podcast. “It’s incumbent on us as developers to really move this ecosystem into the future. And Deno is trying to do this at the runtime layer, but what we perceive is, really, a problem at the registry layer where you share code.”</p>\n<p>The JSR isn’t meant as a replacement of the current npm package registry, but as an <em>extension</em>, Dahl explained. “In some sense, you can think of it as a superset of npm, kind of in the same way that TypeScript itself is a superset of JavaScript.”</p>\n<blockquote>\n<p>Did you know that JSR packages can be used from Node.js with no configuration?</p>\n<p>⬇️⬇️⬇️ <a target=\"_blank\" href=\"https://t.co/4AtwLtmX4q\">pic.twitter.com/4AtwLtmX4q</a></p>\n<p>— JSR (@jsr_io) <a target=\"_blank\" href=\"https://twitter.com/jsr_io/status/1765389860100088286?ref_src=twsrc%5Etfw\">March 6, 2024</a></p></blockquote>\n<p>But Dahl has given a lot of thought to npm. “For a very long time, they did not even keep checksums of npm packages. And there have been instances where hackers have gotten into the registry and potentially changed tarballs that were published, and there is no way to know because there is no checksum of those tarballs.” There’s also supply chain issues — the problem of not just malicious pull requests, but malicious code coming from upstream…</p>\n<p>JSR attempts to provide more visibility with a simple way to give packages cryptographic signatures. Packages built on GitHub (using GitHub Actions) can provide an OpenID Connect token to JSR that will ultimately publish the corresponding cryptographic signature on the Sigstore blockchain. “We can do these ‘cryptographic attestations’, as they’re called, of where packages got built — and publish them in the package pages and expose these details to users.” In short, it provides a record of where the code is coming from. “And that is important for trust, right?</p>\n<p>“It’s building up a web of trust.”</p>\n<p>Later Dahl calls it in some ways “an extension of signed commits…”</p>\n<blockquote><p>“Things that I invented in 2010 for Node.js are just not where browsers are going now. And I think there’s a real need to close the gap between browsers.”</p>\n<p>—Ryan Dahl</p></blockquote>\n<p>It’s all part of a vision for a more secure future. “At the end of the day, you’re going to take a number of dependencies and build your microservice and then run that as a Docker container in some Kubernetes infrastructure. And it would be very nice… to be able to say all software running inside this Docker container has attestations that trace it all the way back to a verified user somewhere and that there is no code that is running here that we don’t know where it came from.</p>\n<p>“We’re kind of building up the infrastructure for this. And what likely will happen is, in the future, every microservice will have clear attribution for all of your dependencies. And that’s very nice — then you have really mitigated the supply chain risk.”</p>\n<p>Dahl also stresses that the new repository (unlike npm) “is completely open source. The back end, the front end — the whole thing is open sourced and MIT licensed.”</p>\n<p>JSR is not part of the commercial operations of the Deno company. “JSR is for the JavaScript community. It is an attempt to level up JavaScript, and it’s designed to be able to run very cheaply on commodity cloud software… We would eventually like to have this thing be in a foundation and kind of operating independently. We’re trying to build an institution here for the future of JavaScript.”</p>\n<p>Now in its “public beta” stage at <a target=\"_blank\" href=\"https://jsr.io/\">jsr.io</a>, the JSR is officially billed as a package registry “for modern JavaScript and TypeScript.”</p>\n<p>Dahl emphasized on the podcast that it’s not a package <em>manager</em>. “You can use your existing package manager but connect it to this new registry…”</p>\n<h2>Looking Ahead</h2>\n<p>At one point Dahl acknowledged that TypeScript was “very, very useful. It has clear utility.” So much so that he predicts its JavaScript-superset-with-types concept “is likely to be codified in standards. Maybe not this year or next year or the year after, but I think over time TypeScript will find its way into the standards and really become part of what JavaScript is.”</p>\n<p>When asked for predictions about the future of JavaScript, Dahl started by saying the language is “deeply embedded” in today’s web ecosystem, and “It’s definitely not going away anytime soon… Unlike many other technologies in the world, I feel confident saying that JavaScript will be here five years from now, if not 10, if not 20 years from now.”</p>\n<p>He even put it in the most pragmatic possible terms. “Like, your <em>bank</em> depends on JavaScript. It is not going away anytime soon.”</p>\n<p>But looking specifically toward what’s to come, Dahl said “The future of JavaScript is browsers. Browsers will always dictate the future of JavaScript.”</p>\n<p>So while there’s obviously a large community writing server-side JavaScript, “any server-side code must narrow the gap to browser JavaScript.” It’s part of why they’re pushing ECMAScript modules over CommonJS modules.</p>\n<p>“Things that I invented in 2010 for Node.js are just not where browsers are going now. And I think there’s a real need to close the gap between browsers.”</p>\n<a href=\"https://youtube.com/thenewstack?sub_confirmation=1\" target=\"_blank\">\n<div>\n<p>\nYOUTUBE.COM/THENEWSTACK\n</p>\n<p>\nTech moves fast, don't miss an episode. Subscribe to our YouTube\nchannel to stream all our podcasts, interviews, demos, and more.\n</p>\n</div>\n<p>\nSUBSCRIBE\n</p>\n</a>\n<p>\n<svg width=\"68px\" height=\"31px\">\nGroup\nCreated with Sketch.\n</svg> </p>\n</div>\n</div>\n<div>\n<p>TNS owner Insight Partners is an investor in: Deno, Docker.</p> </div>\n<div>\n<p><span>TNS DAILY NEWSLETTER</span>\nReceive a free roundup of the most recent TNS articles in your inbox each day. </p>\n<div>\n<p>\nThe New Stack does not sell your information or share it with\nunaffiliated third parties. By continuing, you agree to our\n<a target=\"_blank\" href=\"https://thenewstack.io/terms-of-use/\">Terms of Use</a> and\n<a target=\"_blank\" href=\"https://thenewstack.io/privacy-policy/\">Privacy Policy</a>.\n</p>\n</div>\n</div>\n</div>",
"author": "@https://twitter.com/DavidCasselTNS",
"favicon": "https://thenewstack.io/favicon.ico",
"source": "thenewstack.io",
"published": "2024-04-30T20:39:59+00:00",
"ttr": 332,
"type": "article"
}