惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

博客园 - 聂微东
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
L
LangChain Blog
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
博客园 - 司徒正美
WordPress大学
WordPress大学
T
The Blog of Author Tim Ferriss
Blog — PlanetScale
Blog — PlanetScale
J
Java Code Geeks
Y
Y Combinator Blog
H
Hackread – Cybersecurity News, Data Breaches, AI and More
GbyAI
GbyAI
Vercel News
Vercel News
大猫的无限游戏
大猫的无限游戏
T
Tailwind CSS Blog
Jina AI
Jina AI
B
Blog
Recorded Future
Recorded Future
MyScale Blog
MyScale Blog
I
InfoQ
aimingoo的专栏
aimingoo的专栏
博客园_首页
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
The Cloudflare Blog
雷峰网
雷峰网
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
腾讯CDC
爱范儿
爱范儿
Last Week in AI
Last Week in AI
博客园 - 三生石上(FineUI控件)
博客园 - Franky
Schneier on Security
Schneier on Security
V
V2EX
TaoSecurity Blog
TaoSecurity Blog
H
Hacker News: Front Page
Cloudbric
Cloudbric
D
DataBreaches.Net
B
Blog RSS Feed
P
Palo Alto Networks Blog
云风的 BLOG
云风的 BLOG
NISL@THU
NISL@THU
I
Intezer
Recent Commits to openclaw:main
Recent Commits to openclaw:main
Cyberwarzone
Cyberwarzone
F
Fortinet All Blogs
D
Darknet – Hacking Tools, Hacker News & Cyber Security
C
Cybersecurity and Infrastructure Security Agency CISA
C
Cisco Blogs
K
Kaspersky official blog
Forbes - Security
Forbes - Security

Deno

Deno 2.8 | Deno Claw Patrol: an open-source security firewall for agents | Deno Fresh 2.3: Zero JS by default, View Transitions, and Temporal support | Deno Deno 2.7: Temporal API, Windows ARM, and npm overrides | Deno Build a dinosaur runner game with Deno, pt. 6 | Deno Build a dinosaur runner game with Deno, pt. 5 | Deno Deno Deploy is Generally Available | Deno Introducing Deno Sandbox | Deno Build a dinosaur runner game with Deno, pt. 4 | Deno Build a dinosaur runner game with Deno, pt. 3 | Deno Build a dinosaur runner game with Deno, pt. 2 | Deno React / Next.js Denial-of-Service Vulnerability: Deno Deploy users protected | Deno Deno 2.6: dx is the new npx | Deno Build a dinosaur runner game with Deno, pt. 1 | Deno React Server Functions / Next.js Vulnerability: Deno Deploy users protected | Deno My highlights from the new Deno Deploy | Deno Deno's Other Open Source Projects | Deno How Deno protects against npm exploits | Deno Help Us Raise $200k to Free JavaScript from Oracle | Deno Deno 2.5: Permissions in the config file | Deno Fresh 2.0 Graduates to Beta, Adds Vite Support | Deno Deno 2.4: deno bundle is back | Deno JavaScript™ Trademark Update | Deno What's coming to JavaScript | Deno A brief history of JavaScript | Deno Reports of Deno's Demise Have Been Greatly Exaggerated | Deno An Update on Fresh | Deno How Plaid migrated 100 services to a new database platform 5x faster with Deno | Deno Deno 2.3: Improved deno compile, local npm packages, and more | Deno Add JSR packages with pnpm and Yarn | Deno Zero-config Debugging with Deno and OpenTelemetry | Deno Exploring Art with TypeScript, Jupyter, Polars, and Observable Plot | Deno Deno v Oracle Update 3: Fighting the JavaScript Trademark | Deno Build a custom RAG AI agent in TypeScript and Jupyter | Deno How to get deep traces in your Node.js backend with OTel and Deno | Deno toranoana.deno #20 登録受付中(2025年3月14日) | Deno Node just added TypeScript support. What does that mean for Deno? | Deno The Dino 🦕, the Llama 🦙, and the Whale 🐋 | Deno Publish a lint rule, get a prize | Deno Deno 2.2: OpenTelemetry, Lint Plugins, node:sqlite | Deno If you're not using npm specifiers, you're doing it wrong | Deno How Deno's documentation is evolving | Deno Oracle justified its JavaScript trademark with Node.js—now it wants that ignored | Deno Introducing the JSR open governance board | Deno Intro to Wasm in Deno | Deno Announcing OpenAI on JSR | Deno Deno in 2024 | Deno Goodbye WinterCG, welcome WinterTC | Deno Build a SolidJS app with Deno | Deno Run your Next.js SSR app on Deno Deploy | Deno Solve Advent of Code 2024 with Deno and Win Prizes! | Deno Deno v. Oracle: Canceling the JavaScript Trademark | Deno Deno 2.1: Wasm Imports and other enhancements | Deno Build a Typesafe API with tRPC and Deno | Deno Self-contained Executable Programs with Deno Compile | Deno Build a Database App with Drizzle ORM and Deno | Deno Introducing your new JavaScript package manager: Deno | Deno Announcing Growthbook on JSR | Deno Build an Astro site with Deno | Deno How to convert CommonJS to ESM | Deno Announcing Deno 2 | Deno The Final Touches: What’s New In v2.0.0-rc.10 | Deno Announcing Stable V8 Bindings for Rust | Deno Deno 2.0 Release Candidate | Deno Secure, efficient private npm registries with Cloudsmith and Deno | Deno Painting the Plane as We Fly It: Designing JSR | Deno Introducing Web Cache API support on Deno Deploy | Deno Deno 1.46: The Last 1.x Release | Deno Protect your cloud spend with new Deno Deploy spend limits | Deno What we got wrong about HTTP imports | Deno Benchmarking AWS Lambda Cold Starts Across JavaScript Runtimes | Deno Announcing Supabase on JSR | Deno Deno 1.45: Workspace and Monorepo Support | Deno Introducing KV Backup for Deno Subhosting | Deno A Gentle Intro to TypeScript | Deno Announcing Hono on JSR | Deno How We Made the Deno Language Server Ten Times Faster | Deno How the Guardian uses Deno to audit accessibility and performance across their 2.7 million articles | Deno Introducing More Flexible Domain Association for Deno Subhosting | Deno The stabilization process of the Standard Library has begun | Deno Deno 1.44: Private npm registries, improved Node.js compat, and performance boosts | Deno How we built a secure, performant, multi-tenant cloud platform to run untrusted code | Deno The Deno Standard Library is now available on JSR | Deno How to document your JavaScript package | Deno Your Low Code Solution Needs an Escape Hatch | Deno Deno 1.43: Improved Language Server performance | Deno How Slack used Deno to save months of engineering effort in launching their new platform | Deno JSR Is Not Another Package Manager | Deno Announcing the Hookdeck SDK on JSR | Deno Announcing the Neon Serverless Driver on JSR | Deno An intro to TSConfig for JavaScript Developers | Deno How we built JSR | Deno How Netlify used Deno Subhosting to build a successful edge functions product | Deno Introducing Simpler Project Creation in Deno Deploy | Deno Deno 1.42: Better dependency management with JSR | Deno Introducing deployctl, the command line interface for Deno Deploy | Deno Introducing JSR - the JavaScript Registry | Deno How to add Monaco to a Next.js app and securely run untrusted user code | Deno Survey Results and Roadmap | Deno Deno 1.41: smaller deno compile binaries | Deno
Deno 1.34: deno compile supports npm packages | Deno
2023-05-26 · via Deno

As we continue our development journey towards Deno 2, this minor release is primarily focused on boosting compatibility with npm and Node.js, enhancing the overall quality of life and developer experience, and establishing the foundation for future performance enhancements.

The most significant updates in this release include three highly anticipated features:

  • deno compile supports npm packages
  • Glob support in deno.json and CLI flags
  • TLS certificates with IP addresses

Besides the aforementioned features, there are many other improvements and bug fixes worth mentioning:

  • Configuration file improvements
  • Language server improvements
  • Deno API changes
  • Improvements to npm and Node compatibility
  • V8 11.5 and TypeScript 5.0.4

deno compile supports npm packages

Ever since v1.6, deno compile has allowed you to compile your project into a single binary executable. This development has proven to be substantial for a multitude of reasons, as it enables developers to:

  • distribute and execute binaries on all major platforms without needing to install Deno or dependencies
  • include assets inside executable for more portability
  • simplify deployment with a single binary
  • achieve faster startup time

Since then, we’ve continued to make deno compile more useful, by adding support for web workers and dynamic imports, and today, by supporting npm packages.

Here’s an example creating a single binary executable with cowsay:

$ cat main.ts
import { say } from "npm:cowsay@1.5.0";
console.log(say({ text: "Hello from Deno!" }));

$ deno compile --allow-read main.ts
$ ./main
 __________________
< Hello from Deno! >
 ------------------
        \   ^__^
         \  (oo)\_______
            (__)\       )\/\
                ||----w |
                ||     ||

cowsay is a simple example, but you can use deno compile with much more complex projects. Let’s try vite:

$ deno compile --allow-read --allow-write --allow-env --allow-net npm:vite
$ ./vite
  ➜  Local:   http://localhost:5173/
  ➜  Network: use --host to expose
  ➜  press h to show help

Or maybe eslint?

$ deno compile --allow-read --allow-write --allow-env --allow-net npm:eslint
$ cat .eslintrc.js
module.exports = {
    "env": {
        "es2021": true,
        "node": true
    },
    "extends": "eslint:recommended",
    "overrides": [
    ],
    "parserOptions": {
        "ecmaVersion": "latest",
        "sourceType": "module"
    },
    "rules": {
    }
}

$ cat foo.js
function foo() {
}

$ ./eslint
/dev/foo.js
  1:10  error  'foo' is defined but never used  no-unused-vars

✖ 1 problem (1 error, 0 warnings)

The difference between using deno compile to create an eslint binary and npm install -g eslint is that Deno packages eslint with all of its dependencies and configurations alongside the actual deno executable. This means that the produced executable ensures its dependencies will not be changed by accident and continue working the same way without interference from other dependencies on your system. Additionally, our testing suggests the binaries from deno compile tend to start up faster than executing the same program with dependencies cached locally.

There’s more work to improve deno compile, including minimizing total binary size, which we intend to address in upcoming releases.

Do you specific feedback on deno compile? Let us know.

Glob support in deno.json and CLI flags

Globs are now supported in the configuration file deno.json, deno task, and CLI arguments for specifying files. The glob syntax is cross platform, so you can confidently use it on Windows, macOS, and Linux.

In deno.json, you can use * to match any number of characters in a path, ? to match a single character, and ** to match any number of directories:

{
  "fmt": {
    "include": ["data/example?.txt"],
    "exclude": ["testdata/**/*.ts"]
  }
}

You can also use glob patterns as CLI arguments. Here’s the above example, but using deno fmt:

$ deno fmt --exclude="testdata/**/*.ts" "data/example?.txt"

⚠️ Notice that we put the glob in quotes to prevent the shell from expanding it.

With deno task, in addition to the glob syntax above, you can also use square brackets to match a range of characters:

{
  "task": {
    "files": "echo **/*.ts",
    "data": "echo data[0-9].txt"
  }
}

TLS certificates with IP addresses

One of the most wanted features is finally here. You can now use TLS certificates that contain IP addresses.

Quoting rustls team:

This is useful for things like Kubernetes pods, which often use IP addresses instead of domain names, and for DNS over HTTPS/TLS which needs an IP address for the server to avoid circular dependency on name resolution.

With Deno v1.34 any API that uses TLS will work with IP addresses. For example:

const resp = await fetch("https://1.1.1.1");
console.log(await resp.text());

Configuration file improvements

Exclude files or folders for all sub commands

Previously, if you wanted Deno to ignore a file or folder for every sub command, you would have to specify it repetitively:

{
  "fmt": {
    "exclude": ["target/"]
  },
  "lint": {
    "exclude": ["target/"]
  },
  "test": {
    "exclude": ["target/"]
  },
  "bench": {
    "exclude": ["target/"]
  }
}

Starting in this release, you can use a top level exclude property:

{
  "exclude": ["target/"]
}

Thank you to @scarf005 for implementing this feature.

nodeModulesDir property

A nodeModulesDir property can now be specified in the deno.json file for explicitly enabling or disabling Deno’s use of the node_modules directory.

{
  "nodeModulesDir": true
}

If you are using Deno with a package.json and node_modules directory, it is recommended to enable this setting as it will provide a better experience. For example, with it enabled, Deno’s language server will use the local node_modules directory for caching and resolving packages.

Language server improvements

Deno 1.33 introduced document preloading in the language server, which pre-loads modules in the workspace on initialize so Deno knows about them and their contents.

In some cases, the default 1000 file system entry limit was either too little or too much, so it’s now configurable by setting the deno.documentPreloadLimit property.

{
  "deno.enable": true,
  "deno.documentPreloadLimit": 2000
}

Additionally, the language server’s internal TypeScript isolate’s default max memory limit was increased to 3GB to match TypeScript in VS Code’s default. Lastly, this limit can be configured in the VSCode extension via deno.maxTsServerMemory:

{
  "deno.enable": true,
  "deno.maxTsServerMemory": 3072
}

Deno API changes

Deno.serve()

Last month, we hinted that we planned to stabilize the Deno.serve() API. After much deliberation, however, we decided to postpone the stabilization by another month in order to make this API more forward compatible.

The signature of Deno.serve() has been changed to return an instance of Deno.Server instead of Promise<void>. Deno.Server has a finished property that’s a Promise, which resolves when the server shuts down (using an AbortSignal). This gives more flexibility in controlling the server programmatically.

const ac = new AbortController();
const server = Deno.serve(
  { signal: ac.signal },
  (_req) => new Response("Hello world"),
);
setTimeout(() => {
  ac.abort();
}, 1000);
await server.finished;
console.log("Server has shut down");

Additionally, Deno.Server has ref() and unref() methods. You can use these methods to control whether the server should keep the process alive or not.

Deno.createHttpClient()

This unstable API now exposes a few more options that allow greater control over the created client:

const client = Deno.createHttpClient({
  
  poolMaxIdlePerHost: 10,

  
  
  poolIdleTimeout: 10_000,

  
  http1: false,

  
  http2: true,
});

const resp = await fetch("...", { client });

Deno.FileInfo

The Deno.FileInfo interface now includes the following new fields:

  • Deno.FileInfo.isBlockDevice
  • Deno.FileInfo.isCharDevice
  • Deno.FileInfo.isFifo
  • Deno.FileInfo.isSocket

The fields are available on Linux and macOS. On Windows, they are always null.

Thank you to Hirotaka Tagawa for the contribution.

Improvements to npm and Node compatibility

There are a couple other notable improvements to npm support:

  • deno vendor handles npm specifiers and will no longer error when they are encountered.
  • deno task runs pre and post scripts if present when executing a script from a package.json file similar to npm. Thanks to Marvin Hagemeister for implementing this feature.

We also polyfilled a few more built-in Node.js APIs:

  • crypto.createDiffieHellman
  • crypto.createDiffieHellmanGroup
  • http.Server.unref
  • Module.runMain
  • performance.markResourceTiming
  • process.release
  • worker_threads

Additionally, the following N-API symbols now work properly:

  • napi_async_init
  • napi_async_destroy
  • napi_add_finalizer

V8 11.5 and TypeScript 5.0.4

Finally, Deno v1.34 ships with V8 11.5 and TypeScript 5.0.4.

Take a look at Deno KV, our globally distributed database for Deno Deploy, now in beta