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

推荐订阅源

freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
AI
AI
L
LINUX DO - 最新话题
The Register - Security
The Register - Security
T
Threatpost
Y
Y Combinator Blog
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
Attack and Defense Labs
Attack and Defense Labs
T
Tailwind CSS Blog
P
Proofpoint News Feed
MongoDB | Blog
MongoDB | Blog
H
Heimdal Security Blog
小众软件
小众软件
D
Docker
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
T
The Exploit Database - CXSecurity.com
AWS News Blog
AWS News Blog
腾讯CDC
博客园 - 司徒正美
美团技术团队
L
LINUX DO - 热门话题
N
Netflix TechBlog - Medium
Stack Overflow Blog
Stack Overflow Blog
S
Security Affairs
阮一峰的网络日志
阮一峰的网络日志
爱范儿
爱范儿
N
News and Events Feed by Topic
J
Java Code Geeks
F
Fortinet All Blogs
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
U
Unit 42
V2EX - 技术
V2EX - 技术
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
T
Tor Project blog
H
Help Net Security
The GitHub Blog
The GitHub Blog
L
Lohrmann on Cybersecurity
Hugging Face - Blog
Hugging Face - Blog
S
Securelist
PCI Perspectives
PCI Perspectives
W
WeLiveSecurity
A
About on SuperTechFans
N
News and Events Feed by Topic
博客园 - 叶小钗
Cloudbric
Cloudbric
L
LangChain Blog
WordPress大学
WordPress大学
B
Blog
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed

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.27: Major IDE Improvements | Deno
2022-10-27 · via Deno

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

  • Language Server/IDE improvements
  • Improvements to npm compatibility
  • navigator.language Web API
  • Improvements to deno task
  • Upgrade checker
  • Changes to Deno APIs
  • Updates to deno lint
  • V8 10.8
  • Node.js compatibility improvements
  • Changes to standard library APIs

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

Language Server/IDE improvements

Inlay Hints

TypeScript added support for inlay hints in version 4.4; this release of Deno exposes this functionality to the LSP. Inlay hints are small snippets of information that are added inline into your code, displaying information about your code. In a lot of ways it is an “inline hover”.

A view of code without inlay hints:

A screenshot of an editor not displaying any inlay hints.

A view of code with inlay hints enabled:

A screenshot of an editor displaying inlay hints.

Inlay hints can make code a lot more readable, filling in gaps of information that isn’t present in code. Especially with type inference being common when working with TypeScript or type checked JavaScript, it can be really useful to “see” the hidden inferred types without having to hover over a variable to discover what it is, as well as reducing the number of explicit type annotations in the code while not decreasing the readability.

There are several options to configure the support for inlay hints which allow for customization of how inlay hints work:

  • deno.inlayHints.enumMemberValues.enabled - Enable/disable inlay hints for enum values. The default is false.
  • deno.inlayHints.functionLikeReturnTypes.enabled - Enable/disable inlay hints for implicit function return types. The default is false.
  • deno.inlayHints.parameterNames.enabled - Enable/disable inlay hints for parameter names. Values can be "none", "literals", "all". The default is "none".
  • deno.inlayHints.parameterNames.suppressWhenArgumentMatchesName - Do not display an inlay hint when the argument name matches the parameter. The default is true.
  • deno.inlayHints.parameterTypes.enabled - Enable/disable inlay hints for implicit parameter types. The default is false.
  • deno.inlayHints.propertyDeclarationTypes.enabled - Enable/disable inlay hints for implicit property declarations. The default is false.
  • deno.inlayHints.variableTypes.enabled - Enable/disable inlay hints for implicit variable types. The default is false.
  • deno.inlayHints.variableTypes.suppressWhenTypeMatchesName - Suppress type hints where the variable name matches the implicit type. The default is true.
  • editor.inlayHints.enabled - Controls whether inlay hints are enabled in VS Code. Values can be "off", "offUnlessPressed", "on", or "onUnlessPressed".

Visual Studio Code supports inlay hints and the latest release of the Deno VS Code extension supports the configuration options. You will need to check with out editors and plugins to see if they support inlay hints and how to set the configuration options.

Registry completions

While not tied specifically to the release, we recently improved registry completions in editors that support it. Now when typing a third party module name from deno.land/x in an intelligent editor, the search engine which powers the module search on deno.land is used, as well as providing a module description and popularity information.

There are also improvements when completing the import path, where documentation information is integrated into the display text and is also available on hovering over an import. Third party module authors can use the @module JSDoc tag in the first JSDoc block at the top of the module to provide this information all the way through to the editor.

In Visual Studio Code, registry completions for deno.land/x are enabled by default. Check how to configure deno.suggest.imports.hosts in other editors to make sure that https://deno.land is enabled to get the completions.

Take a peek at the video to see it in action:

Bug fixes

There are several bug fixes in this release related to the language server. Specifically the language server was not properly handling “snippet” strings which is now fixed. There were several issues when performing auto-imports and code completion in JSX that caused odd behaviors which are now fixed.

Improvements to npm compatibility

This release continues the steady improvement of using npm packages in Deno.

Type checking and LSP support

Deno will now automatically pull in TypeScript types from npm packages that distribute types.

For packages that don’t distribute types, you can use a @deno-types directive above the import in order to specify the corresponding @types package if one exists:


import chalk from "npm:chalk@4";

For packages that require @types/node, you can specify a triple-slash reference-types directive to pull in Node types:




import express from "npm:express@4.18";

Note that by doing this, Deno will use Node’s global types (ex. setTimeout(...): NodeJS.Timeout) instead of a browser compatible types (ex. setTimeout(...): number) in the types for npm packages. These globals will be isolated to the npm packages and shouldn’t affect the types of your Deno code.

Node-API

Deno now supports Node-API (formerly N-API) when used within npm packages. Node-API is a way to use native code in Node.js. It means that packages like parcel, sqlite3, usb or fs-xattr can now be used with Deno.

Note that this feature requires the --allow-ffi flag.

Lockfile v2

npm package resolution and integrities are now stored when using a lockfile.


deno cache --lock=lock.json --lock-write main.ts

Note that in the 1.28 release we are planning to write a lockfile by default if you are using a deno.json file. Follow issue #11971 for updates.

Dist tags in npm specifiers

The npm registry allows tagging versions with a name. For example, express has a “next” tag which, at the time of writing this, has tagged version 5.0.0-beta.1.

You can now specify these dist tags in version requirements for npm specifiers.


import express from "npm:express@next";

Note that dist tags are still not supported if they appear in a package’s package.json. This is a bug and will be resolved soon. Follow issue #16321 for updates.

Caching npm specifiers directly via arguments to deno cache

deno cache now supports providing npm specifiers on the command line:

deno cache --unstable npm:chalk@5 npm:express

This will download the package information and resolved versions of those packages to Deno’s global npm cache.

Deno v1.27 adds the navigator.language API. It’s a read-only property that returns a string representing the user’s system preferred language.

$ deno
> navigator.language
"en-EN"

The returned string that represents the language is a BCP 47 tag.

The value returned by this API can be influenced by environment variables that set the system locale, for example LC_ALL.

$ LC_ALL=es_ES deno
> navigator.language
"es-ES"

Additionally, navigator.languages API is supported as well. It returns an array of preferred locales with first value being identical to navigator.language.

Thanks to Luca Matei Pintilie for contributing this feature.

Improvements to deno task

The warning stating “deno task is unstable and may drastically change in the future” has been removed. deno task has proven useful and won’t drastically change going forward. That said, we may introduce some changes in its environment to make things easier going forward such as new cross platform commands or environment variables.

INIT_CWD environment variable

When a task is executed, it will have the same current working directory as the deno.json the task is defined in. This may not be desired in certain scenarios, or you may want to know what directory the user ran the task in. This is now possible by using the INIT_CWD environment variable, which will be set with the full path to the directory the task was run in, if not already set. This aligns with the same behavior as npm run.

For example, the following task will change the current working directory of the task to be in the same directory the user ran the task from and then output the current working directory which is now that directory (remember, this works on Windows too because deno task is cross platform).

{
  "tasks": {
    "my_task": "cd $INIT_CWD && pwd"
  }
}

Task will now fail on async command failure

You may have used deno task to start multiple commands at once, by using an async command:

{
  "tasks": {
    "start": "deno run --allow-net server.ts & deno run --allow-net client.ts"
  }
}

Previously, if the async command failed, the other would continue running and you might not notice. This was in line with how most shells work, but it’s not practical for the purposes of deno task.

Starting in this release, if an async command fails then it will also fail the entire task. Note that if you want the previous behavior, you can opt out by adding || true to the end of a command, which will force a 0 exit code:

{
  "tasks": {
    "start": "deno run --allow-net server.ts || true & deno run --allow-net client.ts || true"
  }
}

sleep time suffixes

The sleep command in deno task now supports providing a suffix to the time argument as specified in the linux man pages for sleep.

Thanks to @sigmaSd for contributing this feature.

Upgrade checker

Deno ships with the deno upgrade subcommand that allows you to easily get the latest version of Deno. Starting with this release, Deno will now automatically check for new versions and prompt you if one is available.

$ deno run app.ts
A new release of Deno is available: 1.26.2 → 1.27.0
Run `deno upgrade` to install it.

We took special care to ensure that these checks don’t impact the performance of your applications - they only happen in the background at most once a day. This feature can be disabled entirely by setting the environment variable: DENO_NO_UPDATE_CHECK=1

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.consoleSize()
  • Deno.futime()
  • Deno.futimeSync()
  • Deno.loadavg()
  • Deno.osRelease()
  • Deno.stdin.setRaw()
  • Deno.utime()
  • Deno.utimeSync()

Other updates

  • Deno.kill() no longer requires an argument, it will default to sending a SIGTERM signal if argument is omitted.

  • Deno.getGid() was renamed to Deno.gid(), in preparation for stabilization of this API

  • Deno.getUid() was renamed to Deno.uid(), in preparation for stabilization of this API

  • TcpListenOptions.reusePort option was added. It allows multiple processes to listen on the same address and port. This option requires the --unstable flag and is supported only on Linux.

Updates to deno lint

The built-in linter got a new “compact” report format, that might be familiar to users of ESLint. You can use this format by providing the --compact flag to the deno lint subcommand.

$ deno lint --compact
/dev/deno/foo.js: line 1, col 10 - `foo` is never used (no-unused-vars)
Found 1 problem
Checked 1 file

Additionally you can specify which report type you prefer inside your deno.json file:

{
  "lint": {
    "report": "compact"
  }
}

Thanks to Brenley Dueck for contributing this feature.

V8 10.8

This release upgrades to the latest release of V8 (10.8, previously 10.7).

The most notable new feature in this release is support for the Change Array by copy proposal

Node.js compatibility improvements

On October 25, Node.js 18 entered Long Term Support (LTS) with version 18.12.0. In Deno v1.27, the Node.js compatibility layer’s test suite has been updated to match Node.js v18.12.0, meaning that Deno is capable of running the latest Node.js LTS release.

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

Other updates

  • The readline/promises module has been implemented. This module provides a Promises based API for the readline module. Thanks to @PolarETech for contributing this feature.

  • 'base64url' encoding is now supported by hash.digest() in the crypto module. Thanks to Deniz Akşimşek for contributing this feature.

  • .node modules can now be loaded. See also (Node-API support)[#node-api].

  • Better Windows support has been added for fs.access().

  • The windowsVerbatimArguments option has been added to the child_process module’s APIs.

Changes to standard library APIs

In this release, several deprecated APIs have been removed:

  • The hash module has been removed. The functionality of this module is available via the crypto module.

  • The textproto module has been removed.

  • BSNode has been removed from the collections module in favor of BinarySearchNode.

  • BSTree has been removed from the collections module in favor of BinarySearchTree.

  • RBNode has been removed from the collections module in favor of RedBlackNode.

  • RBTree has been removed from the collections module in favor of RedBlackTree.

  • direction has been removed from the collections module in favor of Direction.

  • CSVStream has been removed from the encoding module in favor of CsvStream.

  • The CSVStreamOptions type has been removed from the encoding module in favor of the CsvStreamOptions type.

  • The encoding/csv_stringify.ts file has been removed in favor of the encoding/csv.ts file and other APIs.

  • JSONValue has been removed from the encoding module in favor of JsonValue.

  • JSONParseStream has been removed from the encoding module in favor of JsonParseStream.

  • JSONStringifyStream has been removed from encoding module in favor of JsonStringifyStream.

  • ConcatenatedJSONParseStream has been removed from the encoding module in favor of ConcatenatedJsonParseStream.

  • The listenAndServe() and listenAndServeTls() functions have been removed from the http module in favor of serve() and serveTls(), respectively.

  • The streaming functionality in the io module has been removed in favor of the streams module.

  • The functionality in the bufio.ts file of the io module has been removed in favor of the buffer.ts file.

  • The functionality in the ioutil.ts file of the io module has been removed in favor of the util.ts file.

  • The LineStream class has been removed from the streams module in favor of TextLineStream.

  • All benchmarking APIs have been removed from the testing module in favor of Deno.bench().

  • The assertThrows() and assertRejects() functions that take a callback function have been removed from the testing module in favor of their other signatures.

  • The generate() function has been removed from the uuid module in favor of the WebCrypto randomUUID() function.

Thanks to Asher Gomez for contributing these changes.

HN comments