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

推荐订阅源

cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
博客园 - 【当耐特】
博客园 - 聂微东
MyScale Blog
MyScale Blog
T
The Blog of Author Tim Ferriss
F
Full Disclosure
aimingoo的专栏
aimingoo的专栏
H
Help Net Security
Engineering at Meta
Engineering at Meta
Last Week in AI
Last Week in AI
D
DataBreaches.Net
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
宝玉的分享
宝玉的分享
Cyberwarzone
Cyberwarzone
S
Schneier on Security
Know Your Adversary
Know Your Adversary
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
云风的 BLOG
云风的 BLOG
T
Threatpost
D
Darknet – Hacking Tools, Hacker News & Cyber Security
博客园 - 司徒正美
酷 壳 – CoolShell
酷 壳 – CoolShell
Recent Announcements
Recent Announcements
罗磊的独立博客
L
LangChain Blog
L
Lohrmann on Cybersecurity
The GitHub Blog
The GitHub Blog
P
Palo Alto Networks Blog
The Cloudflare Blog
Hacker News - Newest:
Hacker News - Newest: "LLM"
M
MIT News - Artificial intelligence
WordPress大学
WordPress大学
博客园 - Franky
C
Cyber Attacks, Cyber Crime and Cyber Security
S
Securelist
NISL@THU
NISL@THU
L
LINUX DO - 最新话题
PCI Perspectives
PCI Perspectives
V2EX - 技术
V2EX - 技术
IT之家
IT之家
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
N
News | PayPal Newsroom
人人都是产品经理
人人都是产品经理
Google DeepMind News
Google DeepMind News
T
The Exploit Database - CXSecurity.com
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
Cisco Talos Blog
Cisco Talos Blog
H
Heimdal Security Blog
Help Net Security
Help Net Security
V
V2EX

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.37: Modern JavaScript in Jupyter Notebooks | Deno
2023-09-21 · via Deno

Deno’s mission is to dramatically simplify software development. In Deno 1.37, we’re happy to extend this to interactive Jupyter notebooks. Starting in 1.37, you can use the new deno jupyter command to create a Deno kernel that can be used within notebooks. Additionally, Deno 1.37 comes with stronger Visual Studio Code and LSP support, better testing performance, improved Node compatibility, and many bug fixes.

If you already have Deno installed, upgrade to version 1.37 in your terminal with:

If you don’t yet have Deno installed, you can install it with one of the following commands, or many other ways.

MacOS / Linux Install

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

Windows Install

irm https://deno.land/install.ps1 | iex

Here’s an overview of what’s new in Deno 1.37.

Deno 1.37 at a glance

  • 📒 Jupyter notebooks Deno now smoothly integrates with Jupyter notebooks, bridging the gap between scripting and analysis.
  • 🖥️ VSCode extension and language server The vscode extension continues to improve with better detection of `deno.json`, the introduction of `deno.disablePaths` configuration, better support of file renaming, npm specifier completions, a new configuration called `deno.suggest.completeFunctionCalls`, and many more fixes.
  • 🧪 Testing improvements Simpler, faster, better! We’ve revamped our testing suite, making it more intuitive to write tests and ensuring quicker feedback loops.
  • Node.js compatibility improvements Continued improvements to built-in Node APIs means that Deno now supports modules like `npm:mssql`, `npm:mineflayer`, and `npm:web-push`. Most NPM modules work out of the box in Deno.
  • 🏝️ Quality of life improvements Support for new import attributes syntax, graceful shutdown using `Deno.serve()`, and numerous performance improvements.

Jupyter notebook integration

Deno v1.37 ships with a built-in support for Jupyter notebook kernel, which brings modern JavaScript and TypeScript and unlocks a whole new set of data science and machine learning possibilities.

If you haven’t already, start by installing Jupyter - this command assumes Python and pip are installed on your system.

pip install jupyterlab

If you have Python 3 installed, you might need to use the pip3 command instead. Other install options are covered here.

To get started using Deno in Jupyter, run:

deno jupyter --unstable

and then follow the prompts to complete the installation. More documentation on deno jupyter --unstable can be found here.

You can now create interactive REPL sessions using either Jupyter Lab or your favorite IDE which supports these notebooks.

Using the Deno kernel in a Jupyter notebook

Using the Deno kernel in a Jupyter notebook

Using the Deno kernel in a CLI

Using the Deno kernel in a CLI

You have access to all of Deno’s APIs, as well as npm modules right from your notebook.

Not only can you use modern JavaScript in Jupyter notebooks, but you can also import D3 from npm to visualize your data:

D3 example with Deno and Jupyter

Screenshot contributed by Elijah Meeks

In addition, you can also provide rich output from your cells by returning an object that contains the Symbol.for("Jupyter.display") function:

Using `Symbol.for("Jupyter.display")` in a notebook

You can even connect to your hosted Deno KV with Deno KV Connect and pull live data straight into a notebook:

Using Deno KV in a Jupyter notebook

Finally, if you’re using Noteable.io, you can use Deno in your hosted Jupyter notebooks today. Noteable.io’s Chief Architect and a core maintainer of the Jupyter project, Kyle Kelley, describes the possibilities unlocked from this integration:

Deno’s new Jupyter kernel unlocks tremendous potential for data science workflows by people who can write JavaScript. I’m thrilled by the possibilities enabled by native access to Deno’s modern JavaScript runtime and built-in TypeScript support. JavaScript developers can create notebooks to analyze data, build models, and create interactive reports.

Gone are the days of configuring Babel and TypeScript with a Jupyter JavaScript kernel. Since Deno supports ESM imports based on URLs, the Deno kernel makes it incredibly easy to share notebooks that run anywhere. Dependencies are declarative. Organizations can take advantage of existing Jupyter deployments and immediately get access to Deno’s secure runtime sandbox without giving up the flexible workflow Jupyter enables.

For more details on using Deno’s Jupyter integration, check out our docs. We’re looking for feedback from the community on this feature, so please try it out and let us know if you find any problems or missing features.

VSCode extension and language server

Enable via detection of deno.json

The Deno extension is disabled by default for the convenience of users working on non-Deno TypeScript projects. Previously, you must have specified "deno.enable": true in your editor’s workspace settings to enable it. Now, as long as your project root contains a deno.json file, you may leave it unspecified. You can still specify "deno.enable": false to override this.

"deno.disablePaths"

To assist with cases like the above, a new "deno.disablePaths" setting has been introduced. This is a complement to the existing "deno.enablePaths" setting. If you have nested non-Deno sub-projects, it will disable the Deno extension for the specified paths.


{
  "deno.disablePaths": ["./node_api/", "./vsc_extension/"]
}

Update imports on file rename automatically

This is a widely used refactor among many languages. Deno’s language server now offers this functionality – upon renaming a JS/TS file, you will be prompted to optionally update import specifiers discovered across your project which point to that file.

NPM specifier completions

When typing an npm: URL in an import specifier, you will now be shown autocomplete options for NPM packages. These are retrieved by searching the NPM registry.

But potentially more useful: If you’ve typed npm:<package_name>@, you’ll see autocomplete options for the latest published versions of that package. Looking up valid versions was a tedious part of using NPM specifiers. Now this is done for you.

Function call completions

Set "deno.suggest.completeFunctionCalls": true to include parentheses and argument placeholders when selecting an autocomplete option for a function whose signature is known. This is a re-implementation of "typescript.suggest.completeFunctionCalls" and "javascript.suggest.completeFunctionCalls".

// Type the following:
addEventLi
// and select the autocomplete option for `addEventListener`.

// `"deno.suggest.completeFunctionCalls": false`:
addEventListener

// `"deno.suggest.completeFunctionCalls": true`:
addEventListener(type, listener)

deno.cacheOnSave

A new "deno.cacheOnSave" setting has been introduced. When enabled, the extension will automatically cache new dependencies when you save a file. This is a huge convenience for users who are frequently adding new dependencies to their projects and removes the need to run “Cache dependencies” command from the command pallete. Currently this setting is off by default, but we plan to enable it by default in a future release.

Test explorer and code lens fixes

Many testing API bugs have been fixed since 1.36.0:

  • The test explorer no longer freezes when executing tests with steps.
  • Test steps are properly replaced in the explorer when their names are changed. Previously a new step would be registered for each character typed, and you had to reset the language server to clean it up.
  • In some cases, nested test steps with the same name would not be registered uniquely from one another and share the same entry in the explorer. The ID allocation is fixed now.
  • Running all tests via the test explorer no longer evaluates modules which don’t contain any tests.
  • Modules without tests are no longer shown in the test explorer.
  • Running a single test via code lens, while another test in the file has { only: true }, would previously not run any tests and log a failure because the only option was used. Now it behaves as expected and properly ignores other tests.
  • Running a test named foo via the code lens no longer runs other tests in the same file whose names contain foo (eg. foobar). Thanks @Leokuma!
  • The set of files that are included in the test explorer and show the Run test code lens are now filtered based on deno.json fields exclude, test.exclude and test.include.

Other fixes

  • Show source module in the label description for auto-import completion entries.
  • Relative and bare specifiers are prioritized over remote URLs for auto-import completion entries.
  • Formatting preferences are respected when inserting auto-import code.
  • JSON module specifiers which don’t end in .json no longer show an erroneous diagnostic about not having a default export. This affects data URLs and specifiers containing a query string or fragment.
  • Quickfix actions are sorted by tsc, deno, then deno-lint.
  • Import completions now include local JSON modules.
  • Match "deno.enablePaths" entries by whole path components. Previously file names that were string-prefixed by an entry would be enabled (eg. foo would enable both foo.ts and foobar.ts). Now it must be path-prefixed, i.e. an entry must be the exact name of the file or one of its parent directories.
  • Always use --inspect-wait over --inspect-brk when debugging a test. There were still cases where the less suitable --inspect-brk was used. Thanks @jeiea!
  • Correct handling of language server clients which don’t support workspace/configuration requests. These requests were sent to clients incapable of handling them in some cases.
  • Remove dead "deno.testing.enable" setting. This didn’t do anything.

Testing improvements

Continuing improvements to Deno’s testing APIs from the last release, we have some exciting updates this month as well.

Speed improvements

We improved performance of running tests and Deno can now run up to 14,000 tests per second. This was achieved by optimizing the sanitizers that Deno’s test runner has built-in, lowering baseline overhead from 3ms to less that 0.1ms per test case.

We have further plans to improve testing performance and you can expect more speed ups in the next release.

TAP test reporter

deno test can now output test results in the Test Anything Protocol. You can enable it by using --reporter=tap flag:

$ deno test --reporter=tap ./test.ts
TAP version 14

ok 1 - test 0
ok 2 - test 1
ok 3 - test 2
ok 4 - test 3
ok 5 - test 4
ok 6 - test 5
ok 7 - test 6
ok 8 - test 7
ok 9 - test 8
ok 10 - test 9
1..10

Thank you to Valentin Anger for implementing this feature.

Shorthand methods for focusing and ignoring tests

You can now focus and ignore tests using shorthand methods Deno.test.only and Deno.test.ignore, like so:


Deno.test.only(function myTest() {
  
});


Deno.test.ignore(function myTest() {
  
});

It’s a little change, but makes it easier and faster to iterate than having to specify an option bag like Deno.test({ only : true }, function myTest() ....

Quality of life improvements

Besides changes described above, we have plethora of other small changes that makes testing experience in Deno better:

Filtered suites are not displayed

If you use --filter <name> flag to run only a subset of tests, the test runner will now only show the filtered tests in the output. This makes it easier to focus on the tests you care about.

Before Deno v1.37:

`deno test --filter` before Deno v1.37

In Deno v1.37:

`deno test --filter` in Deno v1.37

ASCII escape characters no longer mangle test names

Characters like \n, \t, etc are now properly escaped in test names, so you if you really need to include them in the test name, the reporter output won’t get broken.

--trace-ops shows more details

If you have leaking ops in your tests, --trace-ops flag can help you catch where the leak is coming from. With this release, this flag got smarter and can show useful information in more cases.

Filtering by name takes precedence over only option

If you have a test suite with the only option set to true, but you want to run some other test filtered by a name (using --filter <name> flag), the test will be properly run.

JUnit reporter includes more information

File, line and column attributes are properly added to the produced report.

Exclude internal code from coverage report

The coverage just got faster and less noisy, by excluding internal Deno code from the generated report.

If you have other ideas how to make Deno’s test runner better, please let us know by opening an issue in Deno’s bug tracker.

Node.js compatibility improvements

A bunch of very important fixes to Node.js APIs landed in this release:

  • child_process no longer throws if env var is undefined or null
  • crypto module implements AES GCM cipher
  • http now correctly handles Content-Length header, emits "error" event, destroying request properly cleans up allocated resources
  • http2 adds support for ClientHttp2Session and connect API
  • process.title no longer throws
  • repl._builtinLibs is now supported
  • tls now implements TLSSocket._start method
  • worker_threads.Worker now correctly handles process.argv
  • zlib supports dictionary option
  • require now uses canonicalized paths for loading content
  • Additonal npm modules tested and working: mssql, mineflayer, infiscal, and web-push

If you want to know more about Node.js compatibility in Deno, check out our Node.js compatibility list.

Quality of life improvements

Vendor as cache override (unstable)

It is now possible to vendor dependencies by simply adding the following to your deno.json:

The next time you run or cache (ex. deno cache mod.ts), Deno will populate a ./vendor folder with the remote https/http dependencies used by the program.

Alternatively, vendoring is possible via the --vendor flag.

Note that Deno treats the ./vendor folder differently because it is not always possible to map urls directly to a file system.

You will probably find this feature much easier to use than the deno vendor subcommand as it takes very little overhead to manage and works in more scenarios. For that reason, it might make sense for the deno vendor subcommand to be removed from the CLI and distributed as a separate tool instead (for more details, see issue #20584).

Import attributes

This release adds support for the Import Attributes proposal. The proposal was earlier know as “import assertions”, and Deno had support for it since version 1.17.

Import attributes allow you to import JSON files using import declarations:

import jsonData from "./data.json" with { type: "json" };

It also works with dynamic imports:

const jsonData = await import("./data.json", { with: { type: "json" } });

The old syntax using assert is still supported, but deprecated. We are going to phase it out over the next few releases; in the next releases Deno will print a warning if you use the deprecated assert syntax in your own code.

Deno.Server.prototype.shutdown()

This release brings a new, unstable API: Deno.Server.prototype.shutdown(): Promise<void>.


const server = Deno.serve((_req) => new Response("hello world!"));


setTimeout(async () => {
  await server.shutdown();
}, 3000);

Before this release, it was only possible to close the server “abruptly”, by using the AbortSignal passed to the server during construction. However it’s not always desirable to close the server in such fashion, in most cases you want to wait for all the in-flight requests to finish before closing down the server.

This new API is unstable, because we want to gather feedback from the community before stabilizing it; additionally we want to add a timeout parameter, that will control how long the server waits for the pending requests to complete before closing them forcefully.

Performance improvements

This release we optimized numerous Web APIs as well HTTP related APIs (both in Deno APIs as well as built-in Node.js APIs). Here’s the full list:

  • Event and addEventListener have undergone a deep optimization, making them much faster; Event.timeStamp is now always set to 0

  • Headers was optimized for iteration and lookup scenarios, additionally validation of header names was optimized

  • node:http got optimizations for handling headers - IncomingMessageForServer.headers now uses caching to not compute headers on every access

  • node:buffer was rewritten from ground up to provide faster result when outputting strings

  • node:net received an optimization for socket reads, which makes npm:ws package much more performant

All these optimizations provide up to 10% more RPS in HTTP benchmarks.

Thank you to Marcos Casagrande for implementing a lot of these optimizations.

Lockfile v3

The Lockfile format has been updated to version 3. Deno 1.37 will automatically migrate your existing lockfile to the new format on first run, but loading v3 in older versions of Deno will error.

The new format includes information on redirects, which is used by Deno to lock http(s) redirects to the destination they were resolved to at the time they were inserted into the lockfile.

std/url

In this release, std/url module has been added to the Deno Standard Library. std/url supports various path-like operations on URLs, which are not supported by the Web standard URL methods or properties.

Currently std/url has the below 5 methods:

  • basename
  • dirname
  • extname
  • join
  • normalize
import {
  basename,
  dirname,
  extname,
  join,
  normalize,
} from "https://deno.land/std@0.202.0/std/url/mod.ts";

const url = new URL("https://example.com/home/page.html?foo=bar");

basename(url); 
dirname(url); 
extname(url); 
join("https://example.com", "foo", "bar.html"); 
normalize("https://example.com///about///page.html"); 

Thank you to Aritra Karak for implementing this module.

std/ulid

std/ulid has been added to the Deno Standard Library in this release. std/ulid supports generating ULID and decoding the timestamp from the given ULID.

import { decodeTime, ulid } from "https://deno.land/std@0.202.0/ulid/mod.ts";

const id = ulid(); 
const timestamp = decode(id); 

ULID is alternative to UUID, and because the leading part of a ULID is generated from a timestamp, these IDs are lexically sorted in generation time order. This property is convenient when you use it for a part of keys for Deno KV items.

Thank you to Asher Gomez for suggesting this feature and thank you to Lino Le Van for implementing it.

V8 11.8 and TypeScript 5.2.2

Finally, Deno v1.37 ships with V8 11.8 and TypeScript 5.2.2.

Still want to learn more?

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

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.37: Adam Powers, Alexander Michaud, Curran McConnell, Evan, Fabian, Filip Skokan, Jakub Jirutka, Jonathan Rezende, Juan Gonzalez, Kira, Kyle Kelley, Laurence Rowe, Leigh McCulloch, Marcos Casagrande, Shreyas, Valentin Anger, VlkrS, await-ovo, lionel-rowe, osddeitf, sigmaSd, zuisong, 林炳权, 第二扩展.

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

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

🍋 Did you know? Fresh got even fresher.

Deno Fresh v1.4 released a few weeks ago, featuring faster page loads with an optional AOT compile step, async layouts, route groups, and more. Learn more about the latest release of the modern web framework for Deno.