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

推荐订阅源

M
MIT News - Artificial intelligence
博客园 - Franky
H
Help Net Security
A
About on SuperTechFans
Know Your Adversary
Know Your Adversary
罗磊的独立博客
Help Net Security
Help Net Security
腾讯CDC
博客园 - 三生石上(FineUI控件)
月光博客
月光博客
Project Zero
Project Zero
有赞技术团队
有赞技术团队
Blog — PlanetScale
Blog — PlanetScale
T
Threat Research - Cisco Blogs
The Hacker News
The Hacker News
Engineering at Meta
Engineering at Meta
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
Simon Willison's Weblog
Simon Willison's Weblog
T
Threatpost
Google DeepMind News
Google DeepMind News
V
V2EX
B
Blog
人人都是产品经理
人人都是产品经理
J
Java Code Geeks
N
Netflix TechBlog - Medium
P
Privacy International News Feed
Recorded Future
Recorded Future
D
Darknet – Hacking Tools, Hacker News & Cyber Security
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
Stack Overflow Blog
Stack Overflow Blog
Cisco Talos Blog
Cisco Talos Blog
C
CXSECURITY Database RSS Feed - CXSecurity.com
S
Securelist
NISL@THU
NISL@THU
The GitHub Blog
The GitHub Blog
T
Troy Hunt's Blog
S
Security @ Cisco Blogs
Vercel News
Vercel News
L
LINUX DO - 热门话题
博客园_首页
The Register - Security
The Register - Security
GbyAI
GbyAI
TaoSecurity Blog
TaoSecurity Blog
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
V2EX - 技术
V2EX - 技术
L
LangChain Blog
T
Tor Project blog
P
Privacy & Cybersecurity Law Blog
Security Latest
Security Latest
K
Kaspersky official 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.23 Release Notes | Deno
2022-06-16 · via Deno

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

  • No type-checking by default
  • Remove unstable Deno.sleepSync API
  • File watcher watches dynamic imports
  • Updates to deno task
  • Updates to deno fmt
  • New unstable Deno.getGid() API
  • deno info supports --config and --no-config flags
  • Force a new line in the REPL
  • Updates to FFI API
  • SIGINT and SIGBREAK signal listening support on Windows
  • Support for "deflate-raw" in CompressionStream and DecompressionStream
  • TypeScript 4.7
  • Changes to flags standard module
  • Changes to assertThrows and assertRejects

If you already have Deno installed, you can upgrade to 1.23 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

No type-checking by default

Deno has always run a type-checking pass when asked to execute a program. Evaluation and type-checking however are completely different operations, involving completely different compilers, each with completely different execution speeds. Evaluating code uses Google’s V8 while Type-Checking uses Microsoft’s TypeScript Compiler. Type-checking is quite slow - often taking many seconds to complete. V8 startup and evaluation on the other hand are very fast.

Most programmers these days interact with the type-checker through their editor via the LSP. This means they’re getting hints and completion continuously while they program. Inserting, by default, a full other type-check pass into the deno run operation does not make sense. Type-checking is much more of a lint-like operation - something you do to during CI to make sure there are no type errors.

It should also be highlighted that type-stripping, unlike type-checking, is a fast operation (linear time in the size of the source code). Deno will be type-stripping by default rather than type-checking.

If you still want the previous behavior (type-check then execute) use the --check flag.

We have been planning this change for months, making sure to give users warning and introducing the --check flag. See the notes in v1.22.

This change affects deno run, deno eval, and deno cache. The following table describes the type-checking behavior of various subcommands. Here “Local” means that only errors from local code will induce type-errors, modules imported from https URLs (remote) may have type errors that are not reported. (To turn on type-checking for all modules, use --check=all.)

Subcommand Type checking mode
deno bench 📁 Local
deno bundle 📁 Local
deno cache ❌ None
deno check 📁 Local
deno compile 📁 Local
deno eval ❌ None
deno repl ❌ None
deno run ❌ None
deno test 📁 Local

Remove unstable Deno.sleepSync API

In this release, Deno.sleepSync has been removed because there was no clear necessity for it since this functionality is already available via existing Web APIs. Furthermore, it’s a function that is likely to cause problems: Deno.sleepSync completely blocked the event loop. For example, if it was called in a web server handler function, the server will stop serving requests until it returned.

If you really want this functionality, you can implement it by using the following function:

function sleepSync(timeout) {
  const sab = new SharedArrayBuffer(1024);
  const int32 = new Int32Array(sab);
  Atomics.wait(int32, 0, 0, timeout);
}

File watcher watches dynamic imports

Starting with v1.23 the built-in file watcher (that you can activate using --watch flag) will also watch for changes in files that were dynamically imported.


import foo from "./foo.ts"; 

console.log(foo);

const bar = await import("./bar.ts"); 

This feature has allowed for a much better developer experience in the Fresh web framework.

Updates to deno task

Deno includes an unstable deno task sub command that provides a cross platform way to define and execute custom commands specific to a codebase. This release includes several improvements.

New --cwd <path> flag

deno task has a property where by default it executes commands with the directory of the Deno configuration file (ex. deno.json) as the current working directory. This allows tasks to use relative paths and continue to work regardless of where in the descendant directory tree you happen to execute the deno task from.

Although this behavior is mostly desired, there are scenarios where it’s not. In those situations, you may now provide a --cwd <path> flag.

For example, given a task called wasmbuild in a deno.json file:

# use the sub directory project1 as the cwd for the task
deno task --cwd project1 wasmbuild
# use the cwd (project2) as the cwd for the task
cd project2 && deno task --cwd . wasmbuild

Redirects in task definitions

Some redirect support has been added to provide a way to pipe stdout and/or stderr to a file.

For example, the following redirects stdout of deno run main.ts to a file called file.txt on the file system when defined in a deno task and running deno task collect:

{
  "tasks": {
    "collect": "deno run main.ts > file.txt"
  }
}

To instead redirect stderr, use 2> instead of >:

deno run main.ts 2> file.txt

To redirect both stdout and stderr, use &>:

deno run main.ts &> file.txt

To append to a file, instead of overwriting an existing one, use two right angle brackets instead of one:

deno run main.ts >> file.txt

Suppressing either stdout, stderr, or both of a command is possible by redirecting to /dev/null. This works in a cross platform way including on Windows.


deno run main.ts > /dev/null

deno run main.ts 2> /dev/null

deno run main.ts &> /dev/null

Note that multiple redirects were not implemented and are currently not supported.

Cross platform cat and xargs

deno task features several built in cross platform commands to help reduce verbosity. This update adds a basic implementation of cat and xargs that works on Linux, Mac, and Windows.

Note that not every flag is implemented and please report any issues to the deno_task_shell repo. Also remember that you can always run the native system commands in a non-cross platform way by running it through sh on Linux and Mac (sh -c <command>).

Updates to deno fmt

deno fmt now formats .cjs, .cts, .mjs, and .mts files by default.

Additionally, some unnecessary parenthesis in types will be automatically removed. For example…

type Test = (string | number);

…will now format as…

type Test = string | number;

New unstable Deno.getGid() API

In v1.23 we’ve added a new unstable API: Deno.getGid().

Using this API you can retrieve the ID of the user group. Note that this API works on Linux and macOS, but will return null on Windows.

console.log(Deno.getGid());

This API requires the --allow-env permission flag.

Thank you to James Bradlee for contributing this feature.

deno info supports --config and --no-config flags

This release adds support for --config and --no-config flags. In previous releases, deno info automatically looked up deno.json files, but there was no way to manually specify the config file or disable it entirely.

Thank you to Mark Ladyshau for contributing this feature.

Force a new line in the REPL

This release brings a small quality-of-life improvement to the REPL.

Using ctrl + s combination you can now force a new line when editing code in the REPL.

Thank you to @sigmaSd for contributing this feature.

Updates to FFI API

Previously when functions called via FFI returned 64-bit numbers, normal JavaScript numbers were returned. However, JavaScript numbers only have 53 bits of integer precision—meaning you’d get incorrect results at times. With this change a BigInt is returned instead. The change also allows passing BigInt values as parameters.

Thanks to Elias Sjögreen who contributed this feature.

SIGINT and SIGBREAK signal listening support on Windows

This release adds the ability to listen for SIGINT (ctrl+c) and SIGBREAK (ctrl+break) on Windows.

Deno.addSignalListener("SIGINT", () => {
  console.log("Received ctrl+c");
});

Deno.addSignalListener("SIGBREAK", () => {
  console.log("Received ctrl+break");
});

Read more about OS signals in the manual.

For Deno.kill SIGINT and SIGBREAK support on Windows, please follow issue #14866.

Thanks to Geert-Jan Zwiers and @juzi5201314 for their contributions on this feature.

Support for "deflate-raw" in CompressionStream and DecompressionStream

Deno now suppoorts “The DEFLATE algorithm” RFC1951 via the "deflate-raw" format string as specified in the spec. (Not to be confused with "deflate" which is the “ZLIB Compressed Data Format” RFC1950.)

let input = await Deno.open("README.md");
const compressed = input.readable.pipeThrough(
  new CompressionStream("deflate-raw"),
);
let output = await Deno.open("README.md.zz", { create: true, write: true });
compressed.pipeTo(output.writable);

TypeScript 4.7

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

Changes to flags standard module

std/flags started as a fork of minimist and there haven’t been any substantial changes introduced to it until recently.

In this release, there are two breaking changes to the parse function.

collect option

The collect option is a new option to specify that the option argument is collectible. When you specify an argument name in a collect option, then multiple occurrences of the same argument are collected into the array.

import { parse } from "https://deno.land/std@0.144.0/flags/mod.ts";

console.log(parse(Deno.args, { string: "foo", collect: "foo" }));

This executes as follows:

$ deno run cli.js
{ _: [], foo: [] }
$ deno run cli.js --foo 1
{ _: [], foo: [ "1" ] }
$ deno run cli.js --foo 1 --foo 2
{ _: [], foo: [ "1", "2" ] }
$ deno run cli.js --foo 1 --foo 2 --foo 3
{ _: [], foo: [ "1", "2", "3" ] }

Note that foo in the parsed result always has a string[] type.

Before this change, all arguments were automatically collectible and it had a type of T | T[] where T was typically boolean or string.

We found this behavior not reasonable because in most cases, most arguments are not supposed to be specified multiple times, but because of this behavior, a tool author would always needs to check the type of arguments with Array.isArray().

So this behavior was made optional, and this collecting feature only happens when it’s explicitly specified in the collect option.

To migrate, specify the argument name in the collect option if your CLI tool uses array type arguments.

negatable option

The negatable option is a new option. If you specify the argument name in negatable, then the flags of the form of --no-arg are considered as --arg=false.

Here is an example:

import { parse } from "https://deno.land/std@0.144.0/flags/mod.ts";
console.log(parse(Deno.args, { boolean: "foo", negatable: "foo" }));

This executes as follows:

$ deno run cli.js
{ _: [], foo: false }
$ deno run cli.js --foo
{ _: [], foo: true }
$ deno run cli.js --no-foo
{ _: [], foo: false }

negatable also can be used with string:

import { parse } from "https://deno.land/std@0.144.0/flags/mod.ts";
console.log(
  parse(Deno.args, {
    string: "foo",
    negatable: "foo",
    default: { foo: "bar" },
  }),
);

This executes like:

$ deno run cli.js
{ _: [], foo: "bar" }
$ deno run cli.js --foo baz
{ _: [], foo: "baz" }
$ deno run cli.js --no-foo
{ _: [], foo: false }

foo becomes false even if foo is specified as a string option. This is useful for removing the default value of the option as illustrated in the above example.

This negatable behavior was applied to every argument by default in the previous version, but we found that wasn’t reasonable. So this was changed to be optional.

To migrate, specify the argument name in the negatable option, if your CLI tool depends on this --no-arg type argument.

Thanks to Benjamin Fischer who contributed this feature.

Changes to assertThrows and assertRejects

The signature of assertThrows that accepts an errorCallback as the 2nd argument has been deprecated. Instead assertThrows now returns the thrown error value.

If you use any assertions like the below:

import { assertThrows } from "https://deno.land/std@0.144.0/testing/asserts.ts";

assertThrows(
  () => someFunc(),
  (err) => {
    
  },
);

Then please update it to the following form:

import { assertThrows } from "https://deno.land/std@0.144.0/testing/asserts.ts";

const err = assertThrows(
  () => someFunc(),
);

The motivation behind this change is that the errorCallback only accepts synchronous assertions on the thrown value. With this change, you can perform whatever assertions on the thrown value, including asynchronous operations.

The same change is also applied to the assertRejects function. The promise it returns now resolves with the error retrieved from the inner promise rejection.

Thanks Mark Ladyshau for contributing this feature.