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

推荐订阅源

阮一峰的网络日志
阮一峰的网络日志
IT之家
IT之家
H
Heimdal Security Blog
Jina AI
Jina AI
宝玉的分享
宝玉的分享
博客园 - 【当耐特】
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
爱范儿
爱范儿
T
Tailwind CSS Blog
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
Apple Machine Learning Research
Apple Machine Learning Research
有赞技术团队
有赞技术团队
酷 壳 – CoolShell
酷 壳 – CoolShell
WordPress大学
WordPress大学
AWS News Blog
AWS News Blog
C
Cisco Blogs
Cisco Talos Blog
Cisco Talos Blog
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
D
Darknet – Hacking Tools, Hacker News & Cyber Security
The Hacker News
The Hacker News
The Cloudflare Blog
Hugging Face - Blog
Hugging Face - Blog
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
T
Threatpost
S
Securelist
P
Privacy International News Feed
C
CXSECURITY Database RSS Feed - CXSecurity.com
博客园 - 聂微东
博客园 - 叶小钗
J
Java Code Geeks
V
V2EX
博客园 - Franky
Spread Privacy
Spread Privacy
K
Kaspersky official blog
C
Cyber Attacks, Cyber Crime and Cyber Security
Simon Willison's Weblog
Simon Willison's Weblog
Project Zero
Project Zero
大猫的无限游戏
大猫的无限游戏
S
SegmentFault 最新的问题
C
Cybersecurity and Infrastructure Security Agency CISA
C
CERT Recently Published Vulnerability Notes
Latest news
Latest news
NISL@THU
NISL@THU
罗磊的独立博客
W
WeLiveSecurity
Google DeepMind News
Google DeepMind News
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
博客园_首页
V
Visual Studio Blog

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.11 Release Notes | Deno
2021-06-09 · via Deno

Deno 1.11 has been tagged and released with the follow features:

  • Official Docker images
  • Abortable fetch: abort ongoing fetch requests in a web compatible way
  • More Web Crypto APIs: support for crypto.subtle.digest and crypto.randomUUID landed
  • deno lint now stable: lint projects 100% faster than ESLint
  • BroadcastChannel: Support for the browser API to broadcast messages amongst web workers.
  • TextEncoderStream and TextDecoderStream: web standard stream combinators for streaming text

If you already have Deno installed you can upgrade to 1.11 by running

If you are installing Deno for the first time, you can use one of the methods listed below:


curl -fsSL https://deno.land/x/install/install.sh | sh


iwr https://deno.land/x/install/install.ps1 -useb | iex


brew install deno


scoop install deno


choco install deno

Official Docker images

There are now official Docker images for Deno available on Dockerhub.

To start the deno repl:

$ docker run -it --init denoland/deno:1.11.0 repl

To shell into the docker runtime:

$ docker run -it --init --entrypoint sh denoland/deno:1.11.0

To run main.ts from your working directory:

$ docker run -it --init -p 1993:1993 -v $PWD:/app denoland/deno:1.11.0 run --allow-net /app/main.ts

Here, -p 1993:1993 maps port 1993 on the container to 1993 on the host, -v $PWD:/app mounts the host working directory to /app on the container, and --allow-net /app/main.ts is passed to deno on the container.

Thank you to Andy Hayden who maintained the Deno Docker images over the past two years.

More Web Crypto APIs supported

This release marks the start of our efforts to add the Web Crypto API to Deno. It exposes cryptographic primitives to your application, that can be used to easily build secure systems using cryptography. We have supported crypto.getRandomValues() since Deno 1.0, but we have now added support for hashing and UUID generation.

You can now securely hash data using the sha-256, sha-384, sha-512, or sha-1 algorithms using the SubtleCrypto.digest API, also available in browsers and Node.js. Here is an example:

import { encodeToString } from "https://deno.land/std@0.97.0/encoding/hex.ts";
const data = new TextEncoder().encode("Deno 1.11 has been released!");
const digest = await crypto.subtle.digest("sha-256", data.buffer);
console.log("Digest:", encodeToString(new Uint8Array(digest)));

Additionally we have added support for the recently standardized crypto.randomUUID function. It allows you to generate UUID v4 as per RFC 4122. This feature is already in Node.js and will ship in Chrome/Edge 92 by the end of next month.

console.log("Random UUID:", crypto.randomUUID());

We aim to expand the Web Crypto APIs in the next release, Deno 1.12, scheduled for July 13th.

Abortable fetch

Sometimes it is desirable to abort an ongoing fetch, for example if you want to time out a request if it has not responded after a few seconds. This release adds support for aborting fetch using an AbortSignal, the web standard API for aborting fetches. Here is an example of how this works:



const controller = new AbortController();


setTimeout(() => controller.abort(), 5000);




const response = await fetch("https://myslowapi.com/users", {
  signal: controller.signal,
});



const users = await response.json();

A request can be aborted in all parts of its lifecycle, so during sending headers to the server, sending a body to the server, receiving back headers, or receiving back the response body.

deno lint is now stable

Deno ships with a built-in linter available as deno lint sub-command.

It was first introduced in v1.1.0 back in June 2020, but as a precaution it required --unstable flag when using deno lint to signal that the linter is still early in development and might have bugs.

Over the following months deno_lint went through a few rounds of refactors to improve its stability as well as adding more rules to match recommended set from ESLint.

We were still receiving feedback that some users don’t want to use deno lint yet, because it’s unstable. In v1.10.0 we removed requirement for --unstable flag, and today we’re happy to announce that deno lint is considered stable. However, we still reserve the right to change set of recommended rules.

Thank you to Yusuke Tanaka who contributed countless PRs over the months and implemented a lot of rules.

Updates to deno compile

Producing self contained binaries has been the most requested feature in Deno’s issue tracker and first landed in v1.6.

The functionality provided was limited in scope and one of missing features that was highly requested was using dynamic imports inside produced binaries. This release adds support for dynamic imports using data URIs which allows to read a source file from disk or remote location and execute it. Please keep in mind that importing directly from file system or remote location is still not supported.

Example:


console.log("Hello Deno!");
const sourceCode = await Deno.readTextFile("./some_source_code.js");
const dataUrl = "data:text/javascript;base64," + btoa(sourceCode);
const c = await import(dataUrl);
console.log(c.default); 

Another highly requested feature for self contained binaries was access to the runtime compiler API (Deno.emit()). We’re happy to announce that this API is now be available in all produced binaries.

TextEncoderStream and TextDecoderStream

This release adds support for two modern web APIs: TextEncoderStream and TextDecoderStream. These stream combinators can be used with ReadableStream to easily decode a stream from bytes to string or from string to bytes.

Here is an example where we pipe a fetch response body stream through a TextDecoderStream. This converts the stream of raw bytes into a string of string segments. This example will print each segment to the console on a new line.

const response = await fetch("https://http2.golang.org/clockstream");
const body = response.body.pipeThrough(new TextDecoderStream());
for await (const chunk of body) {
  console.log("!!chunk start!!", chunk, "!!chunk end!!");
}

In addition we also now support the stream option on standard TextDecoder.

BroadcastChannel

In this release we are prototyping support for BroadcastChannel under --unstable. BroadcastChannel can be used to broadcast messages consisting of complex JavaScript objects between workers. Currently this is restricted to workers in the same process, but in the future we want to allow BroadcastChannel to communicate between multiple processes sharing an origin (an origin is the protocol, hostname, and port of the URL you can pass to --location).

Here is an example of broadcasting a message to three workers:

const c = new BroadcastChannel("foo");
const url = new URL("./worker.js", import.meta.url).href;

for (let i = 0; i < 3; i++) {
  const w = new Worker(url, { type: "module" });
  await new Promise((resolve) => w.onmessage = resolve); 
}

c.postMessage({ hello: [1, 2, 3] });

And the worker.js module:

const c = new BroadcastChannel("foo");
self.postMessage("ready");
c.onmessage = (e) => {
  console.log("got message", e.data);
};

More details about broadcast channels can be found on MDN.

Updates to deno lsp

This release brings a number of features to the language server:

Test code lens

LSP now provides code lenses for tests, which allow clients to launch the Deno CLI executing specific tests identified in the IDE.

test code lens

For Visual Studio Code, you need version 3.6.0 or later of the vscode_deno extension to take advantage of this feature.

Support for per resource configuration

The LSP now supports per resource configuration as part of the LSP protocol. In Visual Studio Code, this manifests itself as multi-root workspaces which allow you to have specific configurations for different folders. Also checkout out the workspace folders documentation in the vscode_deno extension for more information.

Registry auto discovery

In Deno 1.10 we added support for import completions for remote registries. Previously you had to manually register remote registries you want to get completions for in your LSP settings. With this release the Deno extension will prompt you if it discovers that an registry you are importing supports registry import completions. You can opt out of auto discovery by setting the deno.suggest.imports.autoDiscover extension option to false.

registry auto discover

Support formatting JSON(C) and Markdown files

In addition to formatting JavaScript, JSX, TypeScript and TSX file, LSP can now format JSON, JSONC and Markdown files as well.

LSP formatter

When serving source code CDNs can provide X-Deno-Warning header that will be displayed when first downloading the source code. Now LSP can show those warnings inline. For example: when using deno.land/x warnings are shown if URL has no version included.

X-Deno-Warning header

Show hints in the linter diagnostics

Deno LSP provides diagnostics from the built-in linter and with this release it will display hints alongside the diagnostics.

Previously (1.10):

linter hint before

Now (1.11):

linter hint after

Show diagnostics for @deno-types and triple-slash refs

LSP can now understand // @deno-types and /// <reference /> comments and will provide diagnostics for those comments.

Updates to stable APIs

Following Deno APIs added support for using argument of type URL instead of string for arguments that represent filepath (URL with scheme other than file:// will not work).

This change is backwards compatible.

TypeScript 4.3

Deno 1.11 ships with the latest stable version of TypeScript. For more information on new features in TypeScript see Announcing TypeScript 4.3

Web compatibility and ecosystem updates

With every release we are continuing our work on improving the compatibility between APIs in Deno and APIs in web browsers.

One way we are doing this is by sharing a test suite with browsers like Chrome, Firefox, Safari, and Servo. This shared web platform test suite checks that all browsers adhere to the same web platform specifications, so your code can be portable across engines.

You can now view our progress towards web compatibility on our new web platform test dashboard at https://wpt.deno.land. It displays the status of all the WPTs we execute in our continuous integration flow. We are also working with Philip Jägenstedt from the Chromium ecosystem infrastructure team to get Deno compatibility data on https://wpt.fyi. This will allow for comparisons between different versions of Deno, or between Deno and other browser engines.

We are also working on getting Deno compatibility data displayed on MDN so you can figure out what APIs Deno supports, right on the canonical source of documentation for Web APIs.