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

推荐订阅源

雷峰网
雷峰网
N
Netflix TechBlog - Medium
博客园_首页
J
Java Code Geeks
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Y
Y Combinator Blog
腾讯CDC
V
V2EX
Microsoft Security Blog
Microsoft Security Blog
大猫的无限游戏
大猫的无限游戏
Cyberwarzone
Cyberwarzone
N
News and Events Feed by Topic
L
LINUX DO - 最新话题
Schneier on Security
Schneier on Security
Microsoft Azure Blog
Microsoft Azure Blog
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
Hacker News: Ask HN
Hacker News: Ask HN
Martin Fowler
Martin Fowler
Google DeepMind News
Google DeepMind News
G
Google Developers Blog
U
Unit 42
WordPress大学
WordPress大学
N
News and Events Feed by Topic
S
Schneier on Security
T
The Blog of Author Tim Ferriss
B
Blog
博客园 - 叶小钗
Forbes - Security
Forbes - Security
F
Fortinet All Blogs
Project Zero
Project Zero
K
Kaspersky official blog
Apple Machine Learning Research
Apple Machine Learning Research
L
LINUX DO - 热门话题
The GitHub Blog
The GitHub Blog
H
Hacker News: Front Page
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
PCI Perspectives
PCI Perspectives
The Register - Security
The Register - Security
www.infosecurity-magazine.com
www.infosecurity-magazine.com
W
WeLiveSecurity
C
Cyber Attacks, Cyber Crime and Cyber Security
罗磊的独立博客
S
Security @ Cisco Blogs
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
T
Tailwind CSS Blog
P
Proofpoint News Feed
S
SegmentFault 最新的问题
D
Docker
量子位
M
MIT News - Artificial intelligence

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 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 Webhooks suck, but here are alternatives | Deno
Deno 1.43: Improved Language Server performance | Deno
2024-05-01 · via Deno

Programming should be simple. That’s why we made Deno a zero-config, batteries-included JavaScript runtime with native TypeScript support, enabling immediate productivity.

In version 1.43, we have enhanced the performance of Deno in IDEs by reducing auto-completion times from 6-8 seconds to under one second in large codebases and significantly decreasing memory usage. We have also achieved more complete npm compatibility by reworking our node:vm and node:worker_threads implementations, widely used in JavaScript CLI tools like test runners.

To upgrade to Deno 1.43, run the following in your terminal:

If Deno is not yet installed, learn how to install it here.

What’s New in Deno 1.43

  • Speeding up Deno’s Language Server
  • Node.js and npm compatibility
  • Using npm commands in deno.json tasks
  • Faster ES and CommonJS module loading
  • JSX precompile improvements
  • jsxImportSourceTypes
  • Introducing deno serve subcommand
  • Deno.serve() updates
    • Response completion
    • Simpler access to the server address
  • URL.parse() Web API
  • The Standard Library is moving closer to stabilization
  • Android builds for rusty_v8
  • V8 12.4
  • Try out Deno 2 features with DENO_FUTURE=1
  • Acknowledgments

Speeding up Deno’s Language Server

A few Deno users reached out to tell us that our Language Server struggled with bigger projects that had a large number of files. The Language Server (commonly referred to as Deno LSP) provides autocompletion, among other things, in your editor. When they shared what the editor experience was like in those projects, we realized that we could improve the responsiveness and memory consumption substantially.

This cycle, we spent most of our time reworking many aspects of the LSP, making it faster and more efficient. In larger projects, where auto-completion previously took about 6-8 seconds, we have reduced it to under one second. Similarly, memory consumption has improved significantly, allowing projects that previously caused out-of-memory errors in our LSP to operate without issue.

Before:

After:

Node.js and npm compatibility

This release includes many key improvements around the node:worker_threads and node:vm modules. Both modules are used frequently in test runners, like Jest and Vitest, as well as tools like Docusaurus. In fact, we’re now running Docusarus to power some of our documentation sites with Deno.

  • Implement process.kill in Rust to avoid run permission prompt. This makes ora, a popular CLI spinner library, work in Deno.
  • Add missing http.maxHeaderSize value to make undici work.
  • fs.cpSync: Always ensure the parent directory exists for SolidStart.
  • Support env option in node:worker_threads. This enables calling sveltekit build to complete successfully.
  • Correctly send ALPN on node TLS connections which confused upstream servers
  • Fix AsyncResource borrow panic which broke ng serve and vitest.
  • Fix Promise rejection in node:vm contexts which is used in docusaurus build.
  • Implement MessagePort.unref() used for @angular/cli serve.
  • Fix out of order writes of fs.createWriteStream which occured in koa-body.
  • Ensure hostname in node:http is a valid IPv4 address which fixes docusaurus serve.
  • Add module to builtinsModule for docusaurus build.
  • Fix node:worker_thread worker exiting prematurely.
  • Polyfill node:domain module to fix configuration discovery in web-ext.
  • Fix transferred MessagePort not having an .on handler which is needed for piscina used in Angular.
  • Fix parseArgs from node:util not supporting the default option.
  • Add missing fs.readv, fs.readvSync functions.

Other frameworks, like SolidStart, are inching closer to full support as well. We’ve got the basics down, but some work remains to be done to fully support their https server and auth-js:

Short clip showing launching a SolidStart project in Deno

SolidStart and other framework compatibility improvements are being done behind the new DENO_FUTURE=1 environment variable, which you can read about below.

Another area we tackled was improvements to AsyncResource which is necessary to make vitest work as it depends on the tinypool package, which in turn makes heavy use of Node’s AsyncResource under the hood.

And of course, we’re working on supporting Next.js too. We got the initialization wizard fully working thanks to some improvements around our handling of the layout in the node_modules directory.

~/my-app $ DENO_FUTURE=1 deno task dev
Task dev next dev
   ▲ Next.js 14.1.3
   - Local:        http://localhost:3000

 ✓ Ready in 2.2s
 ○ Compiling / ...
 ✓ Compiled / in 5.5s (511 modules)
 ✓ Compiled in 381ms (241 modules)

Running Next.js currently requires enabling some unstable flags in Deno, and we’re well underway in the process of stabilizing them.

Using npm commands in deno.json tasks

Executable npm commands like vite, typically managed through package.json scripts, can now be directly referenced in tasks defined in deno.json as well.

// deno.json
{
  "tasks": {
    "start": "vite"
  }
}

Faster ES and CommonJS module loading

This release adds support for V8 code caching (also known as bytecode caching), which can significantly improve the time your application spends on parsing and compiling JavaScript modules. The compiled bytecode is automatically cached on local disk when a module is loaded for the first time, and then reused on subsequent loads.

In our testing, we’ve observed startup time improvements between 5% and 240% depending on the application.

JSX precompile improvements

Since version v1.38 Deno comes out of the box with a precompile JSX transform that is optimized for server side rendering performance. In certain scenarios a framework might want to prevent an element to be precompiled to allow passing additional properties to it. Our transform learned a new trick to make this possible with the jsxPrecompileSkipElements compiler option.

// deno.json
{
  "compilerOptions": {
    "jsx": "precompile",
    "jsxImportSource": "preact",
    // Don't precompile <a>, <body>, and <img> elements
    "jsxPrecompileSkipElements": ["a", "body", "img"]
  }
}

You can pass an array of elements to that option to exempt them from being precompiled.


const a = <a href="#">click me</a>;


const $$_tpl_1 = ['<a href="#">click me</a>'];
const a = jsxTemplate($$_tpl_1);


const a = jsx("a", {
  href: "#",
  children: "click me",
});

jsxImportSourceTypes

A new jsxImportSourceTypes pragma and compiler option allows specifying the types for the automatic JSX transform. This is useful to use with libraries that don’t provide their types.




export function Hello() {
  return <div>Hello!</div>;
}

Alternatively, this can instead be specified in a deno.json file:

{
  "compilerOptions": {
    "jsx": "react-jsx",
    "jsxImportSource": "npm:react@^18.3",
    "jsxImportSourceTypes": "npm:@types/react@^18.3"
  }
}

Introducing deno serve subcommand

In this release we’ve added deno serve subcommand, that allows you to write servers in a declarative way:

export default {
  fetch(request) {
    return new Response("Hello world");
  },
};
$ deno serve server.ts
deno serve: Listening on http://localhost:8000/
$ curl http://localhost:8000/
Hello world

Notice that you don’t have to pass any permission flags - deno serve applies appropriate --allow-net permission automatically that allows it to listen for incoming HTTP connections. Still, you can pass extra permission flags as needed.

Additionally, you can use --host and --port flag to configure which interface the server binds to:

$ deno serve --host 0.0.0.0 --port 3000 server.ts
deno serve: Listening on http://0.0.0.0:3000/
$ curl http://0.0.0.0:3000/
Hello world

Our plan is to introduce automatic load-balancing in the future, that will run the server on multiple CPU cores allowing for better utilization of your system resources.

Deno.serve() updates

Response completion

You can now get information if the response was sent successfuly or there was a failure using the Deno.ServeHandlerInfo.completed promise:

Deno.serve((req, info) => {
  info.completed.then(() => {
    console.log("Response sent successfuly!");
  }).catch(() => {
    console.error("Failed sending the response.");
  });
  return new Response("Hello world");
});

Additionally, the AbortSignal attached to the Request argument will always be aborted when a transaction finishes - whether by client closing the connection or server sending the response.

Deno.serve((req, info) => {
  req.signal.addEventListener("abort", () => {
    console.log("Response finished");
  });
  return new Response("Hello world");
});

Simpler access to the server address

We added a minor quality of life improvement that makes it easier to get the server address from Deno.serve. Previously, you had to write something like this:

let listenPort: number | null = null;

Deno.serve(
  {
    onListen: ({ port }) => (listenPort = port),
  },
  () => new Response("hello world"),
);

By adding a new addr property directly on the server instance this becomes much simpler:

const server = Deno.serve(() => new Response("hello world"));
const port = server.addr.port;

URL.parse() Web API

The new Web API URL.parse() provides a simpler control flow when you need to parse URLs.

Before this addition, the way to parse was to construct a new URL instance. The crux is that new URL(input, base) throws an error if the url you’re parsing is not valid; while URL.parse(input, base) will just return null for invalid urls.

So if you’re parsing a URL and need to provide a fallback in case parsing fails, you can replace this code:

let url;
try {
  url = new URL(userProvidedValue, "http://deno.land");
} catch {
  url = new URL("http://deno.land");
}

With this code:

const url = URL.parse(userProvidedValue, "http://deno.land") ??
  new URL("https://deno.land");

Thank you to Kenta Moriuchi for implementing this API.

The Standard Library is moving closer to stabilization

The Deno Standard Library (deno_std) offers a set of high quality packages that are audited by the core team and guaranteed to work with Deno.

We’ll have a full blog post on this in the coming days, but starting in Deno 1.43, the Standard Library will be published exclusively to JSR under the @std scope. Existing versions of the Standard Library will continue to live at https://deno.land/std. This move, alongside Deno’s new workspaces functionality, is part of the changes coming in Deno 2. For more details, check out the Standard Library’s roadmap for stabilization.

Android builds for rusty_v8

Whilst we don’t provide Android builds ourselves, we received a great patch that makes it easier to build rusty_v8 for Android.

Thanks to @Taknok for contributing this.

V8 12.4

Deno 1.43 ships with V8 12.4, which adds support for a new TypedArray kind: Float16Array.

This API proves useful in several GPU related applications.

Try out Deno 2 features with DENO_FUTURE=1

In anticipation of the upcoming Deno 2 release, we’ve put breaking changes for Deno 2 behind the DENO_FUTURE=1 environment variable. Enabling it allows you to test compatibility of your project with Deno 2.

This includes the following:

  • Override BYONM with nodeModulesDir setting
  • Remove deprecated Deno.* APIs in Web Workers
  • Enable BYONM by default when package.json is present
  • Remove Deno.ConnectTlsOptions.certFile
  • Remove Deno.ConnectTlsOptions.certChain
  • Remove Deno.ConnectTlsOptions.privateKey
  • Remove Deno.ListenTlsOptions.keyFile
  • Remove Deno.ListenTlsOptions.certFile
  • Remove Deno.customInspect
  • Remove Deno.Conn.prototype.rid
  • Remove Deno.TlsConn.prototype.rid
  • Remove Deno.Listener.prototype.rid
  • Remove Deno.TlsListener.prototype.rid
  • Remove Deno.UnixConn.prototype.rid
  • Remove Deno.FsWatcher.prototype.rid
  • Make Deno.FsFile constructor illegal

Acknowledgments

We couldn’t build Deno without the help of our community! Whether by answering questions in our community Discord server or reporting bugs, we are incredibly grateful for your support. In particular, we’d like to thank the following people for their contributions to Deno 1.43: Alex Yang, Carlos Precioso, JOTSR, Javier Viola, Kenta Moriuchi, MAKS11060, nokazn, welfuture, youngwendy, 林炳权, chirsz-ever.

Would you like to join the ranks of Deno contributors? Check out our contribution docs here, and we’ll see you on the list next time.

Believe it or not, the changes listed above still don’t tell you everything that got better in 1.43. You can view the full list of pull requests merged in Deno 1.43 on GitHub here.

Thank you for catching up with our 1.43 release, and we hope you love building with Deno!

🍋 Fresh 2.0 is right around the corner.

Our next major Fresh release will be simpler with a more composable, routing API. Read more here.