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

推荐订阅源

P
Proofpoint News Feed
Microsoft Azure Blog
Microsoft Azure Blog
Jina AI
Jina AI
博客园_首页
宝玉的分享
宝玉的分享
The Cloudflare Blog
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
量子位
T
Tailwind CSS Blog
雷峰网
雷峰网
Blog — PlanetScale
Blog — PlanetScale
Last Week in AI
Last Week in AI
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Hugging Face - Blog
Hugging Face - Blog
月光博客
月光博客
罗磊的独立博客
F
Fortinet All Blogs
酷 壳 – CoolShell
酷 壳 – CoolShell
Stack Overflow Blog
Stack Overflow Blog
J
Java Code Geeks
V
V2EX
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
The GitHub Blog
The GitHub Blog
Apple Machine Learning Research
Apple Machine Learning Research
博客园 - 聂微东
U
Unit 42
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
D
Docker
阮一峰的网络日志
阮一峰的网络日志
I
InfoQ
Simon Willison's Weblog
Simon Willison's Weblog
D
DataBreaches.Net
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
I
Intezer
Scott Helme
Scott Helme
B
Blog
M
MIT News - Artificial intelligence
K
Kaspersky official blog
H
Help Net Security
V
Vulnerabilities – Threatpost
C
CXSECURITY Database RSS Feed - CXSecurity.com
Engineering at Meta
Engineering at Meta
博客园 - 【当耐特】
L
Lohrmann on Cybersecurity
P
Privacy & Cybersecurity Law Blog
Project Zero
Project Zero
The Hacker News
The Hacker News
B
Blog RSS Feed
T
Tor Project 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.4 Release Notes | Deno
2020-09-13 · via Deno

Today we are releasing Deno 1.4.0, our largest feature release yet. Here are some highlights:

  • Web Standard WebSocket API: you can now communicate using WebSockets just like you would in a browser.
  • Automatic restarts on file change: start a script with deno run --watch to automatically reload it on file changes
  • Integrated test coverage: run your tests with deno test --coverage to get a summary of your test coverage

If you already have Deno installed you can upgrade to 1.4 by running deno upgrade. 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

New features and changes

WebSocket API

This release adds support for the web standard WebSocket API, available in all modern browsers. It can be used to communicate with remote servers over the WebSocket protocol.

Here is a short example of how it works:


const ws = new WebSocket("ws://echo.websocket.org/");


ws.onopen = () => {
  console.log("WebSocket ready!");

  
  ws.send("Hello World!");
};
ws.onmessage = (message) => {
  
  console.log("Received data:", message.data);

  
  ws.close();
};
ws.onclose = () => console.log("WebSocket closed!");
ws.onerror = (err) => console.log("WebSocket error:", err.error);





You can try it out locally: deno run --allow-net=echo.websocket.org https://deno.com/blog/v1.4/websocket.js

This release also removes the websocket connect methods from std/ws. Use the WebSocket API instead.

deno run --watch

Deno now has an integrated file watcher that can be used to restart a script when any of its dependencies change.

To use it, run your script like you usually would, but add the --watch flag. You additionally have to add the --unstable flag because this feature is not stable yet.

$ echo "console.log('Hello World!')" > mod.ts
$ deno run --watch --unstable mod.ts
Check file:///home/deno/mod.ts
Hello World
Watcher Process terminated! Restarting on file change...

Watcher File change detected! Restarting!
Check file:///home/deno/mod.ts
File watching works!
Watcher Process terminated! Restarting on file change...

The watch flag takes no arguments for directories or files to watch. Instead it automatically determines all of the local imports of your script, and watches those.

Currently file watching is only supported for deno run, but in the future it will also be added to deno test and possibly other subcommands.

deno test --coverage

You can now find code that is not covered by your tests using the --coverage flag for deno test. When enabled this will print a summary of your code coverage per file after all tests are run. You additionally have to add the --unstable flag because this feature is not stable yet.

$ git clone git@github.com:denosaurs/deno_brotli.git && cd deno_brotli
$ deno test --coverage --unstable
Debugger listening on ws://127.0.0.1:9229/ws/5a593019-d185-478b-a928-ebc33e5834be
Check file:///home/deno/deno_brotli/.deno.test.ts
running 2 tests
test compress ... ok (26ms)
test decompress ... ok (13ms)

test result: ok. 2 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out (40ms)

test coverage:
file:///home/deno/deno_brotli/mod.ts 100.000%
file:///home/deno/deno_brotli/wasm.js 100.000%

Currently the only available output format is the text summary. Other output formats like lcov and json will be added in the future.

Stricter type checks in --unstable

For all users using --unstable the isolatedModules and importsNotUsedAsValues TypeScript compiler options will be switched on by default now. We will enable these flags by default for everyone in the future. These flags enable some stricter checks in the TypeScript compiler that will likely lead to some new errors you have not seen before:

ERROR TS1205: Re-exporting a type when the '--isolatedModules' flag is provided requires using 'export type'.

ERROR TS1371: This import is never used as a value and must use 'import type' because the 'importsNotUsedAsValues' is set to 'error'.

These errors occur when interfaces or type aliases are imported or re-exported. To fix the error, change your imports and re-exports to use import type and export type. Example:


import { MyType } from "./mod.ts";
export { MyType } from "./mod.ts";


import type { MyType } from "./mod.ts";
export type { MyType } from "./mod.ts";

deno info improvements

The deno info tool for doing dependency analysis has gotten a major overhaul this update. It is now faster and less buggy. Additionally the file size of dependencies is now displayed making it very easy to figure out what dependencies are adding a lot of code to your project.

a screenshot of running `deno info https://deno.land/x/brotli/mod.ts`, which prints the a module graph for the `https://deno.land/x/brotli/mod.ts` module

CSS styling in console.log

Most modern browsers support styling console.log messages with CSS. In our ongoing effort to be as web compatible as possible, Deno now also supports CSS styling for console.log.

To style a message, add a %c format parameter to your message, and specify the styles to apply as an argument to console.log:

console.log("%cStop!", "color:red;font-weight:bold");

Deno supports the CSS properties color, background-color, font-weight, font-style, text-decoration-color, and text-decoration-line. Support for these properties, and custom rgb, hex, and hsl colors depend on your terminal’s support for ANSI.

a screenshot of running `deno run https://deno.com/blo/blogg/v1.4/rainbow.js`, which prints a rainbow with Deno 1.4 written on it to the console View the source code at https://deno.com/blog/v1.4/rainbow.js

In this release we’ve added support for the final rules required to get deno lint rules on par with recommended eslint and typescript-eslint ruleset. This means that deno lint should be able to catch all errors that @eslint/recommended and @typescript-eslint/recommended can. (At an order of magnitude better performance.) This is a major step towards stabilizing deno lint.

Updates to deno doc

deno doc and https://doc.deno.land has also gotten a round of new features and fixes this release. Support for the export { foo }; syntax has been added (exporting a statement after declaration), and re-exports of multiple symbols with the same name are now supported.

To try out these new features, just browse any module on https://doc.deno.land. It has been updated with the new release already.

Changes in deno.land/std

In this release the writeJson, writeJsonSync, readJson, and readJsonSync functions have been removed from the https://deno.land/std/fs. You can easily switch them out with these functions:

- const accounting = await readJson("accounting.json");
+ const accounting = JSON.parse(await Deno.readTextFile("accounting.json"));

- const accounting = readJsonSync("accounting.json");
+ const accounting = JSON.parse(Deno.readTextFileSync("accounting.json"));

- await writeJson("hello_world.json", { "hello": "world" });
+ await Deno.writeTextFile("hello_world.json", JSON.stringify({ "hello": "world" }));

- writeJsonSync("hello_world.json", { "hello": "world" });
+ Deno.writeTextFileSync("hello_world.json", JSON.stringify({ "hello": "world" }));

Changes to deno_core Rust API

The base subsystem for Deno, deno_core, continues to evolve as we improve the CLI. In 0.57.0, we’ve merged CoreIsoate and EsIsolate into a single struct called JsRuntime. Also an easier facility for creating ops has been exposed. Have a look at the example. to see how these APIs fit together.

Updates to the VS Code extension

The VS Code extension for Deno has had some major feature releases recently. Here is a quick summary:

Remote URL IntelliSense

A great new feature of the extension is IntelliSense for deno.land imports. It gives you autocomplete suggestions for module names on deno.land/x, all of their versions, and their full directory listing. All of this is done without actually downloading the module source code, instead it is all powered by the recent updates to deno.land/x.

Inline deno lint diagnostics

deno lint is now fully integrated with the extension. To enable it, just set the deno.unstable and deno.lint settings in the extension to true. After doing this you will get inline real-time diagnostics for your code:


The full release notes, including bug fixes, can be found at https://github.com/denoland/deno/releases/tag/v1.4.0.

HN Comments