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

推荐订阅源

N
News | PayPal Newsroom
P
Proofpoint News Feed
Cyberwarzone
Cyberwarzone
C
Cisco Blogs
SecWiki News
SecWiki News
Know Your Adversary
Know Your Adversary
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
Vercel News
Vercel News
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
罗磊的独立博客
NISL@THU
NISL@THU
WordPress大学
WordPress大学
Hacker News - Newest:
Hacker News - Newest: "LLM"
T
Threat Research - Cisco Blogs
AI
AI
Simon Willison's Weblog
Simon Willison's Weblog
Security Archives - TechRepublic
Security Archives - TechRepublic
有赞技术团队
有赞技术团队
L
LINUX DO - 热门话题
Hacker News: Ask HN
Hacker News: Ask HN
V
V2EX
G
GRAHAM CLULEY
TaoSecurity Blog
TaoSecurity Blog
Hugging Face - Blog
Hugging Face - Blog
D
Darknet – Hacking Tools, Hacker News & Cyber Security
F
Fortinet All Blogs
博客园 - 叶小钗
博客园 - 三生石上(FineUI控件)
云风的 BLOG
云风的 BLOG
Recorded Future
Recorded Future
Latest news
Latest news
The Hacker News
The Hacker News
aimingoo的专栏
aimingoo的专栏
T
Troy Hunt's Blog
S
Schneier on Security
I
Intezer
Google DeepMind News
Google DeepMind News
A
Arctic Wolf
Apple Machine Learning Research
Apple Machine Learning Research
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
T
Threatpost
爱范儿
爱范儿
The Register - Security
The Register - Security
S
SegmentFault 最新的问题
Blog — PlanetScale
Blog — PlanetScale
博客园 - 聂微东
宝玉的分享
宝玉的分享
Recent Commits to openclaw:main
Recent Commits to openclaw:main
美团技术团队
B
Blog 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.10 Release Notes | Deno
2021-05-11 · via Deno

Deno 1.10 has been tagged and released. It contains new features, performance improvements, and bug fixes.

Most notably:

  • Improvements to the built-in test runner
  • Structured clone supported in Web Workers
  • Web Storage API added
  • Support for remote import maps

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

Improvements to deno test

Deno 1.10 brings a major overhaul to built-in test runner.

Isolated and parallel execution of tests: Before this release, Deno ran all tests serially inside a single runtime instance. Now all discovered test modules are run in isolation using a new instance of a runtime for each of the modules. deno test now supports the --jobs flag that allows one to specify how many threads should be used when running tests. By default all tests are still run serially.

Configurable permissions for tests: Deno has a number of flags that allow to specify permissions a program is allowed to use. To ease testing of your program under different permissions sets, Deno.test now supports permissions option that allows to specify exact permissions to be applied to a test case.

Deno.test({
  name: "write only",
  permissions: { write: true, read: false },
  async fn() {
    await Deno.writeTextFile("./foo.txt", "I can write!");
    console.log(await Deno.readTextFile("./foo.txt"));
  },
});

Note we get the expected failure despite providing --allow-read:

$ deno test --allow-read --allow-write --unstable test_permissions.ts
Check file:///Users/ry/src/deno/test_permissions.ts
running 1 test from file:///Users/ry/src/deno/test_permissions.ts
test write only ... FAILED (5ms)

failures:

write only
PermissionDenied: Requires read access to "./foo.txt", run again with the --allow-read flag
    at deno:core/core.js:86:46
    at unwrapOpResult (deno:core/core.js:106:13)
    at async open (deno:runtime/js/40_files.js:46:17)
    at async Object.readTextFile (deno:runtime/js/40_read_file.js:40:18)
    at async fn (file:///Users/ry/src/deno/test_permissions.ts:6:17)
    at async asyncOpSanitizer (deno:runtime/js/40_testing.js:21:9)
    at async resourceSanitizer (deno:runtime/js/40_testing.js:58:7)
    at async exitSanitizer (deno:runtime/js/40_testing.js:85:9)
    at async runTest (deno:runtime/js/40_testing.js:199:7)
    at async Object.runTests (deno:runtime/js/40_testing.js:244:7)

failures:

    write only

test result: FAILED. 0 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out (37ms)

Keep in mind, permissions requested by a test case cannot exceed permissions granted to the process using --allow-* flags. If a key is omitted in permissions object then it inherits its value from the respective --allow-* flag.

This feature requires use of --unstable flag.

Better test runner output: When running a test suite a prompt will be displayed for each discovered module with number of tests and origin of those tests.

running 4 tests from file:///dev/deno/cli/tests/unit/tty_test.ts
test consoleSizeFile ... ok (11ms)
test consoleSizeError ... ok (4ms)
test isatty ... ok (4ms)
test isattyError ... ok (3ms)
running 6 tests from file:///dev/deno/cli/tests/unit/rename_test.ts
test renameSyncSuccess ... ok (17ms)
test renameSyncReadPerm ... ok (5ms)
test renameSyncWritePerm ... ok (6ms)
test renameSuccess ... ok (13ms)
test renameSyncErrorsUnix ... ok (34ms)
test renameSyncErrorsWin ... ignored (1ms)
...

Type check examples in documentation: Ensuring documentation stays up to date is crucial for all projects. It is easy to forget to update code samples after changing the API, leading to stale code samples. To prevent such situations deno test now supports the --doc flag that will type check code examples in the documentation comments.


export function example(): string {
  return "example";
}

Try it yourself:

$ deno test --doc https://deno.com/blog/v1.10/test_docs.ts

Check file:///dev/test_docs.ts:2-7
error: TS2367 [ERROR]: This condition will always return 'false' since the types 'string' and 'number' have no overlap.
console.assert(example() == 42);
               ~~~~~~~~~~~~~~~
    at file:///dev/test_docs.ts:2-7.ts:3:16

In the future releases we plan to add support for running code examples as regular tests.

Watch for file changes when running tests: deno test now supports the --watch flag that will keep the process alive after finishing tests and watch for file changes to re-run relevant test cases.

As in other subcommands that support --watch flag, the files that are needed to be watched are automatically discovered by Deno.

Thank you to Casper Beyer and Liam Murphy who contributed these features.

Worker.postMessage supports structured clone algorithm

Web Workers are the parallelization primitive of the web. They allow you to run multiple bits of JavaScript, TypeScript, or WASM concurrently, in separate execution environments (isolates). You can communicate between these workers and the main thread by passing messages from one to another.

Deno has supported web workers ever since our initial 1.0 release, but there was a major limitation: until now Worker.postMessage() used non-spec compliant algorithm that internally JSON-stringified messages. This solution led to some surprising pitfalls for users, because not all values and objects were serialized properly. This release changes that to allow any data which can be serialized using the structured clone algorithm.

Here is an example of sending a recursive JavaScript object to a Worker, which previously would have thrown an error:

const obj = { hello: "world" };
obj.self = obj;

const worker = new Worker(
  "data:application/javascript,self.onmessage = (e) => self.postMessage(e.data);",
  { type: "module" },
);

worker.onmessage = (e) => {
  console.log("Received event:", e.data);
};
worker.postMessage(obj);

Thank you to Tim Ramlot who contributed this feature.

Support for Web Storage API

This release adds support for the Web Storage API. This API consists of localStorage and sessionStorage, which can be used to store a small amount of data persistently, without direct file system access. Data is keyed by origin (which in Deno can be set with --location). You can make use of localStorage and sessionStorage without requiring any permissions.

The underlying storage layer and persistence is opaque to applications, and thus not security relevant.

The API works just like in the browser: localStorage can be used to persistently store up to 5 MB of data across process restarts, while sessionStorage can be used to store a small amount of data for the duration of the process.

Here is an example:



const key = Deno.args[0];

if (key === undefined) {
  
  console.log(localStorage.length);
} else {
  const value = Deno.args[1];

  if (value === undefined) {
    
    console.log(localStorage.getItem(key));
  } else {
    
    localStorage.setItem(key, value);
  }
}
$ deno run --location https://example.com ./kv.ts
0
$ deno run --location https://example.com ./kv.ts foo bar
$ deno run --location https://example.com ./kv.ts foo
bar
$ deno run --location https://example.com ./kv.ts
1

Thank you to crowlKats who contributed this feature.

Support denoD;fmt-ignore-file directive for Markdown files

deno fmt is a formatter based on dprint that is able to format JavaScript, TypeScript, JSON and Markdown files.

To skip formatting of a file one can use deno&#002D;fmt-ignore-file directive in a form of comment at the top of the file. Previously those directives were not working in Markdown files, but from 1.10 they are now supported.

To skip formatting a Markdown file use <!-- deno&#002D;fmt-ignore-file --> at the top of the file.

This release enables support for atomics and shared memory in WebAssembly. This feature is already enabled by default in Chrome and Firefox, and now also in Deno.

Setting the shared to true in the WebAssembly.Memory constructor enables atomics, and allows for shared array buffers as WASM memory the backing store.

const memory = new WebAssembly.Memory({
  initial: 1,
  maximum: 10,
  shared: true,
});
console.assert(memory.buffer instanceof SharedArrayBuffer);

WASM threading is not yet possible in Deno, because of the lack of support for transferring (shared) array buffers to workers. This is a feature we want to introduce soon. To learn more about WASM threads, you can read this blog post from Alex Danilo.

Support remote import maps

Deno stabilized import maps in Deno v1.8, after they were stabilized in Chrome 89. In 1.10 we have enabled the use of remote import maps. This means that import maps now do not have to be stored on the local file system, they can also be loaded over HTTP:

$ deno install --import-map=https://example.com/import_map.json -n example https://example.com/mod.ts

Updated plugin API

This release refreshes the plugin interface and allows them to leverage serde_v8 for interfacing between runtime and the native plugin. This update provides all necessary utilities to dispatch ops from native plugins without needing to use third party code. Additionally plugins are now allowed to access ResourceTable to store Rust objects inside the runtime infrastructure. Refer to the test_plugin example for how to use those APIs. The plugin system still requires the --unstable flag, as it’s an experimental feature.

Thank you to Elias Sjögreen who contributed this refactor.

Remove unstable flag for CLI features

Some parts of Deno are not yet stable and might undergo breaking changes before being stabilized - this refers mostly to JavaScript APIs. To use those APIs it is required to specify --unstable flag when running Deno. However this flag was also used to mark some of CLI features that were not yet stable (like deno lint). In 1.10 we have removed requirement to use --unstable flag for CLI features, and thus, from now on --unstable flag controls only the availability of unstable runtime APIs. Some of the CLI features that are still considered unstable have appropriate comments in their help text (UNSTABLE:). However they no longer require to use --unstable flag to run the subcommand, eg. deno compile, deno lint.