2.0.0 / 2024.10.09
Read announcement blog post at: https://deno.com/blog/v2
- BREAKING:
DENO_FUTURE=1
by default, or welcome to Deno 2.0 (denoland#25213) - BREAKING: disallow
new Deno.FsFile()
(denoland#25478) - BREAKING: drop support for Deno.run.{clearEnv,gid,uid} (denoland#25371)
- BREAKING: improve types for
Deno.serve
(denoland#25369) - BREAKING: improved error code accuracy (denoland#25383)
- BREAKING: make supported compilerOptions an allow list (denoland#25432)
- BREAKING: move
width
andheight
options toUnsafeWindowSurface
constructor (denoland#24200) - BREAKING: remove --allow-hrtime (denoland#25367)
- BREAKING: remove "emit" and "map" from deno info output (denoland#25468)
- BREAKING: remove
--allow-none
flag (denoland#25337) - BREAKING: remove
--jobs
flag (denoland#25336) - BREAKING: remove
--trace-ops
(denoland#25344) - BREAKING: remove
--ts
flag (denoland#25338) - BREAKING: remove
--unstable
flag (denoland#25522) - BREAKING: remove
deno bundle
(denoland#25339) - BREAKING: remove
deno vendor
(denoland#25343) - BREAKING: remove
Deno.[Tls]Listener.prototype.rid
(denoland#25556) - BREAKING: remove
Deno.{Conn,TlsConn,TcpConn,UnixConn}.prototype.rid
(denoland#25446) - BREAKING: remove
Deno.{Reader,Writer}[Sync]
andDeno.Closer
(denoland#25524) - BREAKING: remove
Deno.Buffer
(denoland#25441) - BREAKING: remove
Deno.close()
(denoland#25347) - BREAKING: remove
Deno.ConnectTlsOptions.{certChain,certFile,privateKey}
and
Deno.ListenTlsOptions.certChain,certFile,keyFile}
(denoland#25525) - BREAKING: remove
Deno.copy()
(denoland#25345) - BREAKING: remove
Deno.customInspect
(denoland#25348) - BREAKING: remove
Deno.fdatasync[Sync]()
(denoland#25520) - BREAKING: remove
Deno.File
(denoland#25447) - BREAKING: remove
Deno.flock[Sync]()
(denoland#25350) - BREAKING: remove
Deno.FsFile.prototype.rid
(denoland#25499) - BREAKING: remove
Deno.fstat[Sync]()
(denoland#25351) - BREAKING: remove
Deno.FsWatcher.prototype.rid
(denoland#25444) - BREAKING: remove
Deno.fsync[Sync]()
(denoland#25448) - BREAKING: remove
Deno.ftruncate[Sync]()
(denoland#25412) - BREAKING: remove
Deno.funlock[Sync]()
(denoland#25442) - BREAKING: remove
Deno.futime[Sync]()
(denoland#25252) - BREAKING: remove
Deno.iter[Sync]()
(denoland#25346) - BREAKING: remove
Deno.read[Sync]()
(denoland#25409) - BREAKING: remove
Deno.readAll[Sync]()
(denoland#25386) - BREAKING: remove
Deno.seek[Sync]()
(denoland#25449) - BREAKING: remove
Deno.Seeker[Sync]
(denoland#25551) - BREAKING: remove
Deno.shutdown()
(denoland#25253) - BREAKING: remove
Deno.write[Sync]()
(denoland#25408) - BREAKING: remove
Deno.writeAll[Sync]()
(denoland#25407) - BREAKING: remove deprecated
UnsafeFnPointer
constructor type with untyped
Deno.PointerObject
parameter (denoland#25577) - BREAKING: remove deprecated files config (denoland#25535)
- BREAKING: Remove obsoleted Temporal APIs part 2 (denoland#25505)
- BREAKING: remove remaining web types for compatibility (denoland#25334)
- BREAKING: remove support for remote import maps in deno.json (denoland#25836)
- BREAKING: rename "deps" remote cache folder to "remote" (denoland#25969)
- BREAKING: soft-remove
Deno.isatty()
(denoland#25410) - BREAKING: soft-remove
Deno.run()
(denoland#25403) - BREAKING: soft-remove
Deno.serveHttp()
(denoland#25451) - BREAKING: undeprecate
Deno.FsWatcher.prototype.return()
(denoland#25623) - feat: add
--allow-import
flag (denoland#25469) - feat: Add a hint on error about 'Relative import path ... not prefixed with
...' (denoland#25430) - feat: Add better error messages for unstable APIs (denoland#25519)
- feat: Add suggestion for packages using Node-API addons (denoland#25975)
- feat: Allow importing .cjs files (denoland#25426)
- feat: default to TS for file extension and support ext flag in more scenarios
(denoland#25472) - feat: deprecate import assertions (denoland#25281)
- feat: Don't warn about --allow-script when using esbuild (denoland#25894)
- feat: hide several --unstable-* flags (denoland#25378)
- feat: improve lockfile v4 to store normalized version constraints and be more
terse (denoland#25247) - feat: improve warnings for deprecations and lifecycle script for npm packages
(denoland#25694) - feat: include version number in all --json based outputs (denoland#25335)
- feat: lockfile v4 by default (denoland#25165)
- feat: make 'globalThis.location' a configurable property (denoland#25812)
- feat: print
Listening on
messages on stderr instead of stdout (denoland#25491) - feat: remove
--lock-write
flag (denoland#25214) - feat: require jsr prefix for
deno install
anddeno add
(denoland#25698) - feat: require(esm) (denoland#25501)
- feat: Show hints when using
window
global (denoland#25805) - feat: stabilize
Deno.createHttpClient()
(denoland#25569) - feat: suggest
deno install --entrypoint
instead ofdeno cache
(denoland#25228) - feat: support DENO_LOG env var instead of RUST_LOG (denoland#25356)
- feat: TypeScript 5.6 and
npm:@types/node@22
(denoland#25614) - feat: Update no-window lint rule (denoland#25486)
- feat: update warning message for --allow-run with no list (denoland#25693)
- feat: warn when using
--allow-run
with no allow list (denoland#25215) - feat(add): Add npm packages to package.json if present (denoland#25477)
- feat(add): strip package subpath when adding a package (denoland#25419)
- feat(add/install): Flag to add dev dependency to package.json (denoland#25495)
- feat(byonm): support
deno run npm:<package>
when package is not in
package.json (denoland#25981) - feat(check): turn on noImplicitOverride (denoland#25695)
- feat(check): turn on useUnknownInCatchVariables (denoland#25465)
- feat(cli): evaluate code snippets in JSDoc and markdown (denoland#25220)
- feat(cli): give access to
process
global everywhere (denoland#25291) - feat(cli): use NotCapable error for permission errors (denoland#25431)
- feat(config): Node modules option for 2.0 (denoland#25299)
- feat(ext/crypto): import and export p521 keys (denoland#25789)
- feat(ext/crypto): X448 support (denoland#26043)
- feat(ext/kv): configurable limit params (denoland#25174)
- feat(ext/node): add abort helpers, process & streams fix (denoland#25262)
- feat(ext/node): add rootCertificates to node:tls (denoland#25707)
- feat(ext/node): buffer.transcode() (denoland#25972)
- feat(ext/node): export 'promises' symbol from 'node:timers' (denoland#25589)
- feat(ext/node): export missing constants from 'zlib' module (denoland#25584)
- feat(ext/node): export missing symbols from domain, puncode, repl, tls
(denoland#25585) - feat(ext/node): export more symbols from streams and timers/promises (denoland#25582)
- feat(ext/node): expose ES modules for _ modules (denoland#25588)
- feat(flags): allow double commas to escape values in path based flags (denoland#25453)
- feat(flags): support user provided args in repl subcommand (denoland#25605)
- feat(fmt): better error on malfored HTML files (denoland#25853)
- feat(fmt): stabilize CSS, HTML and YAML formatters (denoland#25753)
- feat(fmt): support vto and njk extensions (denoland#25831)
- feat(fmt): upgrade markup_fmt (denoland#25768)
- feat(install): deno install with entrypoint (denoland#25411)
- feat(install): warn repeatedly about not-run lifecycle scripts on explicit
installs (denoland#25878) - feat(lint): add
no-process-global
lint rule (denoland#25709) - feat(lsp): add a message when someone runs 'deno lsp' manually (denoland#26051)
- feat(lsp): auto-import types with 'import type' (denoland#25662)
- feat(lsp): html/css/yaml file formatting (denoland#25353)
- feat(lsp): quick fix for @deno-types="npm:@types/*" (denoland#25954)
- feat(lsp): turn on useUnknownInCatchVariables (denoland#25474)
- feat(lsp): unstable setting as list (denoland#25552)
- feat(permissions):
Deno.mainModule
doesn't require permissions (denoland#25667) - feat(permissions): allow importing from cdn.jsdelivr.net by default (denoland#26013)
- feat(serve): Support second parameter in deno serve (denoland#25606)
- feat(tools/doc): display subitems in symbol overviews where applicable
(denoland#25885) - feat(uninstall): alias to 'deno remove' if -g flag missing (denoland#25461)
- feat(upgrade): better error message on failure (denoland#25503)
- feat(upgrade): print info links for Deno 2 RC releases (denoland#25225)
- feat(upgrade): support LTS release channel (denoland#25123)
- fix: add link to env var docs (denoland#25557)
- fix: add suggestion how to fix importing CJS module (denoland#21764)
- fix: add test ensuring als works across dynamic import (denoland#25593)
- fix: better error for Deno.UnsafeWindowSurface, correct HttpClient name,
cleanup unused code (denoland#25833) - fix: cjs resolution cases (denoland#25739)
- fix: consistent with deno_config and treat
"experimentalDecorators"
as
deprecated (denoland#25735) - fix: delete old Deno 1.x headers file when loading cache (denoland#25283)
- fix: do not panic running invalid file specifier (denoland#25530)
- fix: don't include extensionless files in file collection for lint & fmt by
default (denoland#25721) - fix: don't prompt when using
Deno.permissions.request
with--no-prompt
(denoland#25811) - fix: eagerly error for specifier with empty version constraint (denoland#25944)
- fix: enable
Win32_Security
feature inwindows-sys
(denoland#26007) - fix: error on unsupported compiler options (denoland#25714)
- fix: error out if a valid flag is passed before a subcommand (denoland#25830)
- fix: fix jupyter display function type (denoland#25326)
- fix: Float16Array type (denoland#25506)
- fix: handle showing warnings while the progress bar is shown (denoland#25187)
- fix: Hide 'deno cache' from help output (denoland#25960)
- fix: invalid ipv6 hostname on
deno serve
(denoland#25482) - fix: linux canonicalization checks (denoland#24641)
- fix: lock down allow-run permissions more (denoland#25370)
- fix: make some warnings more standard (denoland#25324)
- fix: no cmd prefix in help output go links (denoland#25459)
- fix: only enable byonm if workspace root has pkg json (denoland#25379)
- fix: panic when require(esm) (denoland#25769)
- fix: precompile preserve SVG camelCase attributes (denoland#25945)
- fix: reland async context (denoland#25140)
- fix: remove --allow-run warning when using deno without args or subcommand
(denoland#25684) - fix: remove entrypoint hack for Deno 2.0 (denoland#25332)
- fix: remove recently added deno.json node_modules aliasing (denoland#25542)
- fix: remove the typo in the help message (denoland#25962)
- fix: removed unstable-htttp from deno help (denoland#25216)
- fix: replace
npm install
hint withdeno install
hint (denoland#25244) - fix: trim space around DENO_AUTH_TOKENS (denoland#25147)
- fix: update deno_doc (denoland#25290)
- fix: Update deno_npm to fix
deno install
with crossws (denoland#25837) - fix: update hint for
deno add <package>
(denoland#25455) - fix: update malva in deno to support astro css comments (denoland#25553)
- fix: update nodeModulesDir config JSON schema (denoland#25653)
- fix: update patchver to 0.2 (denoland#25952)
- fix: update sui to 0.4 (denoland#25942)
- fix: upgrade deno_ast 0.42 (denoland#25313)
- fix: upgrade deno_core to 0.307.0 (denoland#25287)
- fix(add/install): default to "latest" tag for npm packages in
deno add npm:pkg
(denoland#25858) - fix(bench): Fix table column alignments and NO_COLOR=1 (denoland#25190)
- fix(BREAKING): make dns record types have consistent naming (denoland#25357)
- fix(byonm): resolve npm deps of jsr deps (denoland#25399)
- fix(check): ignore noImplicitOverrides in remote modules (denoland#25854)
- fix(check): move is cjs check from resolving to loading (denoland#25597)
- fix(check): properly surface dependency errors in types file of js file
(denoland#25860) - fix(cli):
deno task
exit with status 0 (denoland#25637) - fix(cli): Default to auto with --node-modules-dir flag (denoland#25772)
- fix(cli): handle edge cases around
export
s in doc tests and default export
(denoland#25720) - fix(cli): Map error kind to
PermissionDenied
when symlinking fails due to
permissions (denoland#25398) - fix(cli): Only set allow net flag for deno serve if not already allowed all
(denoland#25743) - fix(cli): Warn on not-run lifecycle scripts with global cache (denoland#25786)
- fix(cli/tools): correct
deno init --serve
template behavior (denoland#25318) - fix(compile): support 'deno compile' in RC and LTS releases (denoland#25875)
- fix(config): validate export names (denoland#25436)
- fix(coverage): ignore urls from doc testing (denoland#25736)
- fix(doc): surface graph errors as warnings (denoland#25888)
- fix(dts): stabilize
fetch
declaration for use withDeno.HttpClient
(denoland#25683) - fix(ext/console): more precision in console.time (denoland#25723)
- fix(ext/console): prevent duplicate error printing when the cause is assigned
(denoland#25327) - fix(ext/crypto): ensure EC public keys are exported uncompressed (denoland#25766)
- fix(ext/crypto): fix identity test for x25519 derive bits (denoland#26011)
- fix(ext/crypto): reject empty usages in SubtleCrypto#importKey (denoland#25759)
- fix(ext/crypto): support md4 digest algorithm (denoland#25656)
- fix(ext/crypto): throw DataError for invalid EC key import (denoland#25181)
- fix(ext/fetch): fix lowercase http_proxy classified as https (denoland#25686)
- fix(ext/fetch): percent decode userinfo when parsing proxies (denoland#25229)
- fix(ext/http): do not set localhost to hostname unnecessarily (denoland#24777)
- fix(ext/http): gracefully handle Response.error responses (denoland#25712)
- fix(ext/node): add
FileHandle#writeFile
(denoland#25555) - fix(ext/node): add
vm.constants
(denoland#25630) - fix(ext/node): Add missing
node:path
exports (denoland#25567) - fix(ext/node): Add missing node:fs and node:constants exports (denoland#25568)
- fix(ext/node): add stubs for
node:trace_events
(denoland#25628) - fix(ext/node): attach console stream properties (denoland#25617)
- fix(ext/node): avoid showing
UNKNOWN
error from TCP handle (denoland#25550) - fix(ext/node): close upgraded socket when the underlying http connection is
closed (denoland#25387) - fix(ext/node): delay accept() call 2 ticks in net.Server#listen (denoland#25481)
- fix(ext/node): don't throw error for unsupported signal binding on windows
(denoland#25699) - fix(ext/node): emit
online
event after worker thread is initialized (denoland#25243) - fix(ext/node): export
process.allowedNodeEnvironmentFlags
(denoland#25629) - fix(ext/node): export JWK public key (denoland#25239)
- fix(ext/node): export request and response clases from
http2
module (denoland#25592) - fix(ext/node): fix
Cipheriv#update(string, undefined)
(denoland#25571) - fix(ext/node): fix Decipheriv when autoPadding disabled (denoland#25598)
- fix(ext/node): fix process.stdin.pause() (denoland#25864)
- fix(ext/node): Fix vm sandbox object panic (denoland#24985)
- fix(ext/node): http2session ready state (denoland#25143)
- fix(ext/node): Implement detached option in
child_process
(denoland#25218) - fix(ext/node): import EC JWK keys (denoland#25266)
- fix(ext/node): import JWK octet key pairs (denoland#25180)
- fix(ext/node): import RSA JWK keys (denoland#25267)
- fix(ext/node): register
node:wasi
built-in (denoland#25134) - fix(ext/node): remove unimplemented promiseHook stubs (denoland#25979)
- fix(ext/node): report freemem() on Linux in bytes (denoland#25511)
- fix(ext/node): Rewrite
node:v8
serialize/deserialize (denoland#25439) - fix(ext/node): session close during stream setup (denoland#25170)
- fix(ext/node): Stream should be instance of EventEmitter (denoland#25527)
- fix(ext/node): stub
inspector/promises
(denoland#25635) - fix(ext/node): stub
process.cpuUsage()
(denoland#25462) - fix(ext/node): stub cpu_info() for OpenBSD (denoland#25807)
- fix(ext/node): support x509 certificates in
createPublicKey
(denoland#25731) - fix(ext/node): throw when loading
cpu-features
module (denoland#25257) - fix(ext/node): update aead-gcm-stream to 0.3 (denoland#25261)
- fix(ext/node): use primordials in
ext/node/polyfills/console.ts
(denoland#25572) - fix(ext/node): use primordials in ext/node/polyfills/wasi.ts (denoland#25608)
- fix(ext/node): validate input lengths in
Cipheriv
andDecipheriv
(denoland#25570) - fix(ext/web): don't ignore capture in EventTarget.removeEventListener (denoland#25788)
- fix(ext/webgpu): allow to build on unsupported platforms (denoland#25202)
- fix(ext/webgpu): sync category comment (denoland#25580)
- fix(ext/webstorage): make
getOwnPropertyDescriptor
with symbol return
undefined
(denoland#13348) - fix(flags): --allow-all should conflict with lower permissions (denoland#25909)
- fix(flags): don't treat empty run command as task subcommand (denoland#25708)
- fix(flags): move some content from docs.deno.com into help output (denoland#25951)
- fix(flags): properly error out for urls (denoland#25770)
- fix(flags): require global flag for permission flags in install subcommand
(denoland#25391) - fix(fmt): --check was broken for CSS, YAML and HTML (denoland#25848)
- fix(fmt): fix incorrect quotes in components (denoland#25249)
- fix(fmt): fix tabs in YAML (denoland#25536)
- fix(fmt/markdown): fix regression with multi-line footnotes and inline math
(denoland#25222) - fix(info): error instead of panic for npm specifiers when using byonm (denoland#25947)
- fix(info): move "version" field to top of json output (denoland#25890)
- fix(inspector): Fix panic when re-entering runtime ops (denoland#25537)
- fix(install): compare versions directly to decide whether to create a child
node_modules dir for a workspace member (denoland#26001) - fix(install): Make sure target node_modules exists when symlinking (denoland#25494)
- fix(install): recommend using
deno install -g
when using a single http url
(denoland#25388) - fix(install): store tags associated with package in node_modules dir (denoland#26000)
- fix(install): surface package.json dependency errors (denoland#26023)
- fix(install): Use relative symlinks in deno install (denoland#25164)
- fix(installl): make bin entries executable even if not put in
node_modules/.bin
(denoland#25873) - fix(jupyter): allow unstable flags (denoland#25483)
- fix(lint): correctly handle old jsx in linter (denoland#25902)
- fix(lint): support linting jsr pkg without version field (denoland#25230)
- fix(lockfile): use loose deserialization for version constraints (denoland#25660)
- fix(lsp): encode url parts before parsing as uri (denoland#25509)
- fix(lsp): exclude missing import quick fixes with bad resolutions (denoland#26025)
- fix(lsp): panic on url_to_uri() (denoland#25238)
- fix(lsp): properly resolve jsxImportSource for caching (denoland#25688)
- fix(lsp): update diagnostics on npm install (denoland#25352)
- fix(napi): Don't run microtasks in napi_resolve_deferred (denoland#25246)
- fix(napi): Fix worker threads importing already-loaded NAPI addon (denoland#25245)
- fix(no-slow-types): better
override
handling (denoland#25989) - fix(node): Don't error out if we fail to statically analyze CJS re-export
(denoland#25748) - fix(node): fix worker_threads issues blocking Angular support (denoland#26024)
- fix(node): implement libuv APIs needed to support
npm:sqlite3
(denoland#25893) - fix(node): Include "node" condition during CJS re-export analysis (denoland#25785)
- fix(node): Pass NPM_PROCESS_STATE to subprocesses via temp file instead of env
var (denoland#25896) - fix(node/byonm): do not accidentally resolve bare node built-ins (denoland#25543)
- fix(node/cluster): improve stubs to make log4js work (denoland#25146)
- fix(npm): better error handling for remote npm deps (denoland#25670)
- fix(npm): root package has peer dependency on itself (denoland#26022)
- fix(permissions): disallow any
LD_
orDYLD_
prefixed env var without full
--allow-run permissions (denoland#25271) - fix(permissions): disallow launching subprocess with LD_PRELOAD env var
without full run permissions (denoland#25221) - fix(publish): ensure provenance is spec compliant (denoland#25200)
- fix(regression): do not expose resolved path in Deno.Command permission denied
error (denoland#25434) - fix(runtime): don't error
child.output()
on consumed stream (denoland#25657) - fix(runtime): use more null proto objects again (denoland#25040)
- fix(runtime/web_worker): populate
SnapshotOptions
forWebWorker
when
instantiated without snapshot (denoland#25280) - fix(task): correct name for scoped npm package binaries (denoland#25390)
- fix(task): support tasks with colons in name in
deno run
(denoland#25233) - fix(task): use current executable for deno even when not named deno (denoland#26019)
- fix(types): simplify mtls related types (denoland#25658)
- fix(upgrade): more informative information on invalid version (denoland#25319)
- fix(windows): Deno.Command - align binary resolution with linux and mac
(denoland#25429) - fix(workspace): handle when config has members when specified via --config
(denoland#25988) - perf: fast path for cached dyn imports (denoland#25636)
- perf: Use -O3 for sui in release builds (denoland#26010)
- perf(cache): single cache file for remote modules (denoland#24983)
- perf(cache): single cache file for typescript emit (denoland#24994)
- perf(ext/fetch): improve decompression throughput by upgrading
tower_http
(denoland#25806) - perf(ext/node): reduce some allocations in require (denoland#25197)
- perf(ext/web): optimize performance.measure() (denoland#25774)