{
    "objectID": "/weblog/2024/10/10/deno2-is-out/",
    "type": "weblog",
    "title": "Deno 2 is out!",
    "file": "weblog/2024/deno2-is-out.md",
    "url": "/weblog/2024/10/10/deno2-is-out/",
    "date": 1728574376,
    "date_year": 2024,
    "tags": [
        "javascript","typescript","deno","opensource"
    ],
    "content": "Yesterday the Deno team announced version 2 of their JavaScript/TypeScript runtime with an awesome announcement video and a live-stream for a community Q\u0026amp;A. First of all, the opening of the video announcement was just hilarious going for something that\u0026rsquo;s somewhere between a Kickstarter demo and an Apple press-event. Just hilarious 😆\nAs for the new features in Deno 2, there are quite a few with compatibility for npm packages and NodeJS libraries being probably the most prominent here, making the deno binary also a package manager with add, remove, install and uninstall commands. Inside the source files, npm, NodeJS and other libraries have their own prefix to keep everything transparent:\n# Using a NodeJS core library: import { readdir } from \u0026#39;node:fs/promises\u0026#39;; await readdir(\u0026#39;.\u0026#39;); # Using a package from NPM: import * as chalk from \u0026#39;npm:chalk\u0026#39; # Using a package from JSR: import { toCamelCase } from \u0026#39;jsr:@std/text@1\u0026#39; The Deno standard library has …"
}
