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

推荐订阅源

MongoDB | Blog
MongoDB | Blog
AI
AI
B
Blog RSS Feed
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
T
Threatpost
I
Intezer
P
Proofpoint News Feed
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Scott Helme
Scott Helme
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
T
Threat Research - Cisco Blogs
Google DeepMind News
Google DeepMind News
GbyAI
GbyAI
H
Hackread – Cybersecurity News, Data Breaches, AI and More
S
Schneier on Security
Webroot Blog
Webroot Blog
Recorded Future
Recorded Future
aimingoo的专栏
aimingoo的专栏
L
Lohrmann on Cybersecurity
Simon Willison's Weblog
Simon Willison's Weblog
MyScale Blog
MyScale Blog
Project Zero
Project Zero
L
LangChain Blog
B
Blog
D
DataBreaches.Net
Microsoft Security Blog
Microsoft Security Blog
F
Fortinet All Blogs
美团技术团队
Engineering at Meta
Engineering at Meta
Cisco Talos Blog
Cisco Talos Blog
D
Docker
WordPress大学
WordPress大学
人人都是产品经理
人人都是产品经理
S
Security Affairs
Attack and Defense Labs
Attack and Defense Labs
N
News | PayPal Newsroom
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
量子位
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
W
WeLiveSecurity
V2EX - 技术
V2EX - 技术
TaoSecurity Blog
TaoSecurity Blog
博客园 - Franky
P
Proofpoint News Feed
Jina AI
Jina AI
Google DeepMind News
Google DeepMind News
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
雷峰网
雷峰网
The Hacker News
The Hacker News
G
GRAHAM CLULEY

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.26 Release Notes | Deno
2022-09-29 · via Deno

Deno 1.26 has been tagged and released with the following new features and changes:

  • Cache Web API
  • WebCrypto Secure Curves
  • --allow-sys permission flag
  • Improvements to npm support
  • Node.js compatibility improvements
  • Changes to Deno APIs
  • Improvements to Deno.serve() API
  • Performance improvements
  • Improved module download UI
  • Developer experience improvements
  • TypeScript 4.8

If you already have Deno installed, you can upgrade to 1.26 by running:

If you are installing Deno for the first time:


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


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

Click here for more installation options.

Cache Web API

We added support for the Cache API in this release.

The API allows you to cache Request/Response objects. This is helpful when you dynamically generate responses. It allows you to cache a response for a GET request and serve response from the cache for similar requests.

Here’s a small example that generates response based on name query:

import { serve } from "https://deno.land/std@0.158.0/http/server.ts";


const CACHE = await caches.open("v1");

serve(async (req: Request) => {
  
  const res = await CACHE.match(req);
  if (res) {
    res.headers.set("x-cache-hit", "true");
    return res;
  }

  const { searchParams } = new URL(req.url);
  const name = searchParams.get("name");
  const response = new Response(`Hello ${name}!`);
  
  await CACHE.put(req, response.clone());
  return response;
});

The cache is persisted to the file system. So restarting Deno will not flush the cache.

The following APIs are implemented:

Few things that are different compared to browsers:

  1. You cannot pass relative paths to the APIs. The request can be an instance of Request or URL or a url string.
  2. match() & delete() don’t support query options yet.

WebCrypto Secure Curves

The WebCrypto Secure Curves specification adds support for Curve25519 and Curve448 to the WebCrypto API.

Deno v1.26 implements the CFRG curves Ed25519 and X25519.

const key = await crypto.subtle.generateKey("X25519", true, ["deriveKey"]);

We plan to add support for Ed448 and X448 in future releases.

--allow-sys permission flag

Deno has a number of APIs that provide information about user’s operating system, eg. Deno.osRelease(), Deno.systemMemoryInfo().

Previously access to these APIs required the --allow-env flag, which was unfortunate as it meant you had to grant permission to read all environment variables in order to access information about the OS.

Deno v1.26 introduces a new --allow-sys permission flag, that guards access to these APIs, which means you no longer need to also make your environment variables available.

The following APIs require the --allow-sys flag:

  • Deno.hostname()
  • Deno.networkInterfaces()
  • Deno.loadavg()
  • Deno.getUid()
  • Deno.getGid()
  • Deno.osRelease()
  • Deno.systemMemoryInfo()

Similarly to other permission flags, you can grant access to APIs granularly by providing an allow list of APIs, eg. --allow-sys=hostname,osRelease.

Improvements to npm support

This release fixes a lot of bugs related to npm specifiers and adds several new features. Support for npm modules is still experimental and requires the --unstable flag.

--node-modules-dir flag

npm specifiers resolve npm packages to a central global npm cache. This works well in most cases and is ideal since it uses less space and doesn’t require a node_modules directory. That said, you may find cases where an npm package expects itself to be executing from a node_modules directory. To improve compatibility and support those packages, a new --node-modules-dir flag has been added.

For example, given main.ts:

import chalk from "npm:chalk@5";

console.log(chalk.green("Hello"));

Running this script with a --node-modules-dir like so…

deno run --unstable --node-modules-dir main.ts

…will create a node_modules folder in the current directory with a similar folder structure to pnpm.

Screenshot showing a node_modules directory with the chalk package

Note that this is all done automatically when calling deno run and there is no separate install command necessary.

In the case where you want to modify the contents of the node_modules directory before execution, you can run deno cache with --node-modules-dir, modify the contents, then run the script. For example:

deno cache --unstable --node-modules-dir main.ts
deno run --allow-read=. --allow-write=. scripts/your_script_to_modify_node_modules_dir.ts
deno run --unstable --node-modules-dir main.ts

--reload=npm: and --reload=npm:<package>

The --reload flag reloads external resources that were previously cached. This release adds more targeted --reload=npm: and --reload=npm:<package> support.

For example, to reload all npm packages use the --reload=npm: flag when running your script:

deno run --unstable --reload=npm: main.ts

Or to reload just a single package, such as chalk:

deno run --unstable --reload=npm:chalk main.ts

--compat mode removed

In order to not have two separate execution modes, the unstable --compat mode has been deprecated in favor of npm specifiers.

Future improvements

We’ll continue working on npm support and land TypeScript & editor integration within the coming weeks. For our full npm specifier roadmap, see https://github.com/denoland/deno/issues/15960

Node.js compatibility improvements

Deno v1.26 includes implementations for several previously unsupported APIs in the Node.js compatibility layer. Additionally, the entire compatibility layer’s test suite has been updated for compatibility with Node.js v18.8.0. Previously, the test suite targeted Node.js v16.13.0. This change was made in preparation for Node.js 18 entering Long Term Support (LTS) in October.

Please note that the entire Node.js compatibility layer still requires the use of the --unstable flag.

Streams refactoring

The Node.js streams implementation in Deno has been updated to use the readable-stream@4.1.0 npm module. This change will allow Deno to better keep up with breaking changes and new features. For more context on this decision, please see this blog post.

Within the compatibility layer, the stream and stream/promises modules are now implemented via readable-stream. This refactor also introduces several new APIs, including Readable.toWeb(), Writable.toWeb(), and Duplex.toWeb() which are used to convert various types of Node.js streams to Web streams.

The fs.ReadStream and fs.WriteStream implementations have also been updated to improve compatibility with the implementations in Node.js. Thanks to @PolarETech for this work.

child_process APIs

The child_process module has added support for spawnSync(), exec(), execSync(), and execFileSync().

Thanks to @iuioiua and @PolarETech for contributing spawnSync() and exec(), respectively.

process.getuid() and process.getgid()

On non-Windows platforms, the user identifier and group identifier of the process can be accessed via process.getuid() and process.getgid(). On Windows this functionality does not exist, and these methods are undefined.

Thanks to @iuioiua for contributing this feature.

Changes to Deno APIs

API stabilizations

The following APIs have been stabilized in this release and no longer require the --unstable flag to be used.

  • Deno.hostname()
  • Deno.refTimer()
  • Deno.unrefTimer()

Unstable Deno.stdin.setRaw() API

In this release, the unstable Deno.setRaw(rid) API has been removed in favor of Deno.stdin.setRaw(). We plan to stabilize this API in the next minor release.

Improvements to Deno.serve() API

We received a lot of positive feedback for the new unstable Deno.serve() API which provides a fast HTTP server.

In this release we fixed several reported bugs like spurious hangs on Windows, blocking of concurrent requests or partials writes.

We continue to improve our server implementation and want to stabilize this API in Deno v1.27.

Performance improvements

Over the last few releases, we have been making continual performance improvements as part of an internal initiative to find bottlenecks and reduce latency and processing overhead wherever we can. We will be writing about this work in more detail soon so keep an eye on the blog for updates. In the meantime, we can share some benchmarks we have done comparing the v1.24.3 release to the latest and greatest in this release.

Text encoding into an existing TypedArray sees a huge 5x improvement in max throughput for small payloads and up to 30x for larger payloads. See denoland/deno#15922.

TextEncoder.encodeInto Performance Improvement

Writing a small file is now 1.44x faster for synchronous write (Deno.writeFileSync()) and 1.15x faster for async (Deno.writeFile()).

Deno.writeFile Performance Improvement

CSV parsing performance regressed recently with a change we made in how we do our text encoding/decoding. We are working on bigger improvements here but this release sees a nice bump of 1.36x on Mac and 1.19x on Linux in benchmarks we have done.

CSV Performance Improvement

URL parsing is now up to 2.27x faster for Urls with no query string and 1.37x faster for a more complex Url with multiple query string parameters. See denoland/deno#15663.

URL Parsing Performance Improvement

There have been a number of recent improvements to file system operations with more to come. This is a summary of the kind of improvements you should see in this release compared to v1.24.3. On MacOS, Deno.copyFileSync now uses APFS’ copy-on-write clonefile syscall when possible. See denoland/deno#15873.

FileSystem Performance Improvement

console.log() is now 5x faster for small payloads! denoland/deno#15931.

Console Performance Improvement

TTY methods like Deno.consoleSize are up to 2.4x faster compared to v1.24.3. denoland/deno#15976.

TTY Performance Improvement

Improved module download UI

Deno got a new interactive “Download…” message display.

In non-TTY environments, Deno will fall back to previous way of displaying “Download …” on a separate line for each file.

Developer experience improvements

As mentioned recently we have been focusing on making Deno the smoothest developer experience. The past while we have had a team focused on doing that and one of the areas they have been tackling has been around discovery. Deno and the wider JavaScript/TypeScript ecosystem is vast and can be complex to navigate, and we have tried to make it easier for you to find what you are looking for.

Some of the things we have changed recently to try to make that experience better have been:

  • An overhaul of the search capability on deno.land providing searches across the manual, third party modules, and the ability to search symbols across the built-in APIs, the Deno standard library (std), and all third party modules.
  • Ranking search results and ordering third party module listing on deno.land/x by actual code usage. Previously this was ranked by GitHub stars, which provided a very skewed view of the Deno third party ecosystem.
  • Integrated documentation on deno.land for built-in APIs categorizing each API to help make discovering the breadth of built-in capabilities of Deno easier to discover.
  • An informative landing page and integrated auto-generated documentation for each third party module. For example checkout out the documentation for oak.
  • Improvements to how the documentation is indexed, discovered, and shared by search engines and social media. Just improving the search on deno.land may not benefit everyone trying to discover Deno or attempting to share information about Deno.
  • Upped our game in understanding how the Deno ecosystem behaves and is connected. We have been deep diving into the data available to try to continue to identify gaps in information and continually improve the discovery experience.

Things that will be coming in the near future:

  • Auto-linking between symbols within documentation, including between symbols and documentation. This will make it easier to explore a module or API.
  • A dependency listing for each third party module on the landing page, making it easier to understand how a third party module is connected.
  • Provide more information about the popularity, quality, and maintenance of third party modules.
  • A view of the npm ecosystem from a Deno perspective, making it easier to discover and use npm packages in Deno.
  • An overhaul and restructure of the manual to make the information contained more clear and relevant to those discovering and exploring Deno.

While we have been focused on the discovery aspect recently, we are also forming plans to re-focus on making the intelligent editor experience even better as well as improve the experience around the built-in tools within the Deno CLI.

TypeScript 4.8

Deno v1.26 ships with the latest stable version of TypeScript. For more information on new features in TypeScript see TypeScript’s 4.8 blog post