{"id":642910,"date":"2023-04-29T10:05:56","date_gmt":"2023-04-29T15:05:56","guid":{"rendered":"https:\/\/news.sellorbuyhomefast.com\/index.php\/2023\/04\/29\/deno-1-33-deno-2-is-coming\/"},"modified":"2023-04-29T10:05:56","modified_gmt":"2023-04-29T15:05:56","slug":"deno-1-33-deno-2-is-coming","status":"publish","type":"post","link":"https:\/\/newsycanuse.com\/index.php\/2023\/04\/29\/deno-1-33-deno-2-is-coming\/","title":{"rendered":"Deno 1.33: Deno 2 is coming"},"content":{"rendered":"<div>\n<p>As mentioned in the recent<br \/>\n<a href=\"https:\/\/www.youtube.com\/watch?v=LVEGRj3RZSA\" title=\"null\" rel=\"noopener noreferrer\">&#8220;Forced Optimization&#8221; presentation at Node Congress 2023<\/a>,<br \/>\nwe&#8217;re working diligently towards a major release of Deno 2 in the coming months.<br \/>\nThough our vision for Deno 2 is ambitious, our goals haven&#8217;t changed since we<br \/>\nstarted the project:<\/p>\n<p><strong>Effortless Coding<\/strong>: Whether that&#8217;s removing config, boilerplate code, or<br \/>\nbuild steps, we&#8217;ve continued to make it easy for you to dive into code and be<br \/>\nproductive immediately. This release made our LSP more robust, allowing any code<br \/>\neditor with LSP support to work great with Deno projects.<\/p>\n<p><strong>Best-in-Class Performance<\/strong>: Speed and efficiency is important for developers<br \/>\nand users. This release improved the performance of HTTP and WebSocket servers,<br \/>\nas well as set the foundation for further performance work.<\/p>\n<p><strong>Uncompromising Security<\/strong>. Security was built into Deno with an opt-in<br \/>\npermission model so you always know what your code has access to. In the coming<br \/>\nmonths, we&#8217;ll be introducing new features to Deno&#8217;s permission system, making it<br \/>\neasier and more flexible to work with.<\/p>\n<p><a href=\"https:\/\/github.com\/denoland\/deno\/releases\/tag\/v1.33.0\" title=\"null\" rel=\"noopener noreferrer\">Deno 1.33<\/a> is a step<br \/>\nfurther towards these ideals. With this release:<\/p>\n<ul>\n<li><a href=\"http:\/\/deno.com\/#built-in-kv-database\" title=\"null\">Built-in KV database<\/a><\/li>\n<li><a href=\"http:\/\/deno.com\/#flatter-denojson-configuration\" title=\"null\">Flatter <code>deno.json<\/code> configuration<\/a><\/li>\n<li><a href=\"http:\/\/deno.com\/#fewer-permission-checks-for-dynamic-imports\" title=\"null\">Fewer permission checks for dynamic imports<\/a><\/li>\n<li><a href=\"http:\/\/deno.com\/#improvements-to-npm-and-node-compatibility\" title=\"null\">Improvements to npm and Node compatibility<\/a><\/li>\n<li><a href=\"http:\/\/deno.com\/#performance-improvements\" title=\"null\">Performance improvements<\/a><\/li>\n<li><a href=\"http:\/\/deno.com\/#improvements-to-cli\" title=\"null\">Improvements to CLI<\/a><\/li>\n<li><a href=\"http:\/\/deno.com\/#lsp-document-preloading\" title=\"null\">LSP document preloading<\/a><\/li>\n<li><a href=\"http:\/\/deno.com\/#changes-to-deno-apis\" title=\"null\">Changes to <code>Deno<\/code> APIs<\/a><\/li>\n<li><a href=\"http:\/\/deno.com\/#changes-to-the-standard-library\" title=\"null\">Changes to the standard library<\/a><\/li>\n<li><a href=\"http:\/\/deno.com\/#v8-114\" title=\"null\">V8 11.4<\/a><\/li>\n<\/ul>\n<p>As we approach Deno 2, the next minor releases will focus on improving<br \/>\nperformance, creating a best-in-class developer experience, enhancing security,<br \/>\nand more robust Node\/npm compatibility.<\/p>\n<p><\/p>\n<h2 id=\"built-in-kv-database\">Built-in KV database<\/h2>\n<p><a href=\"http:\/\/deno.com\/kv\" title=\"null\" rel=\"noopener noreferrer\">Deno KV<\/a> is a seamlessly integrated database within Deno. With no<br \/>\ndependencies to install, you can start building apps right away. Plus, when you<br \/>\ndeploy to Deno Deploy, your data is supported by a consistent, geo-replicated<br \/>\nglobal database. Keep in mind that KV is currently an unstable API, so you&#8217;ll<br \/>\nneed the &#8211;unstable flag to use it.<\/p>\n<p>Get started with KV in no time, and with zero setup:<\/p>\n<div>\n<pre><span>const<\/span> kv <span>=<\/span> <span>await<\/span> <span>Deno<\/span><span>.<\/span><span>openKv<\/span><span>(<\/span><span>)<\/span><span>;<\/span>\n\n<span>const<\/span> key <span>=<\/span> <span>[<\/span><span>\"users\"<\/span><span>,<\/span> crypto<span>.<\/span><span>randomUUID<\/span><span>(<\/span><span>)<\/span><span>]<\/span><span>;<\/span>\n<span>const<\/span> value <span>=<\/span> <span>{<\/span> name<span>:<\/span> <span>\"Alice\"<\/span> <span>}<\/span><span>;<\/span>\n<span>await<\/span> kv<span>.<\/span><span>set<\/span><span>(<\/span>key<span>,<\/span> value<span>)<\/span><span>;<\/span>\n\n<span>const<\/span> result <span>=<\/span> <span>await<\/span> kv<span>.<\/span><span>get<\/span><span>(<\/span>key<span>)<\/span><span>;<\/span>\nresult<span>.<\/span><span>value<\/span><span>;<\/span> <\/pre>\n<\/div>\n<p>Of course, the data is both durable and persistent on disk, ensuring reliable<br \/>\nstorage and access even across program restarts.<\/p>\n<p>For comprehensive documentation,<br \/>\n<a href=\"https:\/\/deno.com\/manual@v1.33.0\/runtime\/kv\" title=\"null\" rel=\"noopener noreferrer\">explore the manual<\/a>.<\/p>\n<h2 id=\"flatter-denojson-configuration\">Flatter <code>deno.json<\/code> configuration<\/h2>\n<p><code>deno.json<\/code> schema has been flattened to make it easier to read and write.<\/p>\n<p>Nested options like <code>\"lint.files.exclude\"<\/code> or <code>\"fmt.options.lineWidth\"<\/code> are now<br \/>\navailable at the top level of their respective sections.<\/p>\n<p>Instead of writing this:<\/p>\n<div>\n<pre><span>{<\/span>\n  <span>\"lint\"<\/span><span>:<\/span> <span>{<\/span>\n    <span>\"files\"<\/span><span>:<\/span> <span>{<\/span>\n      <span>\"exclude\"<\/span><span>:<\/span> <span>[<\/span><span>\"gen.ts\"<\/span><span>]<\/span>\n    <span>}<\/span>\n  <span>}<\/span><span>,<\/span>\n  <span>\"fmt\"<\/span><span>:<\/span> <span>{<\/span>\n    <span>\"options\"<\/span><span>:<\/span> <span>{<\/span>\n      <span>\"lineWidth\"<\/span><span>:<\/span> <span>80<\/span>\n    <span>}<\/span>\n  <span>}<\/span>\n<span>}<\/span><\/pre>\n<\/div>\n<p>You can now write this to the same effect:<\/p>\n<div>\n<pre><span>{<\/span>\n  <span>\"lint\"<\/span><span>:<\/span> <span>{<\/span>\n    <span>\"exclude\"<\/span><span>:<\/span> <span>[<\/span><span>\"gen.ts\"<\/span><span>]<\/span>\n  <span>}<\/span><span>,<\/span>\n  <span>\"fmt\"<\/span><span>:<\/span> <span>{<\/span>\n    <span>\"lineWidth\"<\/span><span>:<\/span> <span>80<\/span>\n  <span>}<\/span>\n<span>}<\/span><\/pre>\n<\/div>\n<p>All changes:<\/p>\n<table readabilityDataTable=\"1\">\n<thead>\n<tr>\n<th>Before<\/th>\n<th>After<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><code>bench.files.include<\/code><\/td>\n<td><code>bench.include<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>bench.files.exclude<\/code><\/td>\n<td><code>bench.exclude<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>fmt.files.include<\/code><\/td>\n<td><code>fmt.include<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>fmt.files.exclude<\/code><\/td>\n<td><code>fmt.exclude<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>fmt.options.useTabs<\/code><\/td>\n<td><code>fmt.useTabs<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>fmt.options.lineWidth<\/code><\/td>\n<td><code>fmt.lineWidth<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>fmt.options.indentWidth<\/code><\/td>\n<td><code>fmt.indentWidth<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>fmt.options.singleQuote<\/code><\/td>\n<td><code>fmt.singleQuote<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>fmt.options.proseWrap<\/code><\/td>\n<td><code>fmt.proseWrap<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>fmt.options.semiColons<\/code><\/td>\n<td><code>fmt.semiColons<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>lint.files.include<\/code><\/td>\n<td><code>lint.include<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>lint.files.exclude<\/code><\/td>\n<td><code>lint.exclude<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>test.files.include<\/code><\/td>\n<td><code>test.include<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>test.files.exclude<\/code><\/td>\n<td><code>test.exclude<\/code><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>This change is backwards compatible, but we are gravitating towards deprecating<br \/>\nthe old schema in the future.<\/p>\n<p>Thank you to <a href=\"https:\/\/github.com\/scarf005\" title=\"null\" rel=\"noopener noreferrer\">@scarf005<\/a> for implementing this<br \/>\nchange.<\/p>\n<h2 id=\"fewer-permission-checks-for-dynamic-imports\">Fewer permission checks for dynamic imports<\/h2>\n<p>This release brings a huge quality of life improvement when working with dynamic<br \/>\nimports.<\/p>\n<p>If you use a string literal in an <code>import()<\/code> call (eg.<br \/>\n<code>import(\"https:\/\/deno.land\/std\/version.ts\")<\/code>) Deno will no longer require a<br \/>\npermission to execute this import. We have been able to download and analyze<br \/>\nthese kinds of imports for the long time and after discussions we decided it&#8217;s<br \/>\nbetter to not require permission to execute this code &#8211; it is already a part of<br \/>\nthe &#8220;module graph&#8221; of your program and shows up in the output of<br \/>\n<code>deno info main.ts<\/code>.<\/p>\n<p>This change will make it make easier to conditionally execute some code in<br \/>\ncertain situations &#8211; for example, if you have a CLI tool that include many<br \/>\nsubcommands, you might want to conditionally load their respective handlers only<br \/>\nwhen the subcommand is invoked. This greatly improves startup time of your tool.<br \/>\nAnother example is loading a polyfill only when it&#8217;s needed, or executing<br \/>\ndebugging code in your server application only in the presence of an<br \/>\nenvironmental variable.<\/p>\n<p>Keep in mind that permissions will still be checked for dynamic imports that are<br \/>\nnot statically analyzable (ie. don&#8217;t use string literals for the specifier):<\/p>\n<div>\n<pre><span>import<\/span><span>(<\/span><span>\"\"<\/span> <span>+<\/span> <span>\"https:\/\/deno.land\/std\/version.ts\"<\/span><span>)<\/span><span>;<\/span>\n\n<span>import<\/span><span>(<\/span><span><span>`<\/span><span>https:\/\/deno.land\/std@<\/span><span><span>${<\/span><span>STD_VERSION<\/span><span>}<\/span><\/span><span>\/version.ts<\/span><span>`<\/span><\/span><span>)<\/span><span>;<\/span>\n\n<span>const<\/span> someVariable <span>=<\/span> <span>\".\/my_mod.ts\"<\/span><span>;<\/span>\n<span>import<\/span><span>(<\/span>someVariable<span>)<\/span><span>;<\/span><\/pre>\n<\/div>\n<p>Thank you to <a href=\"https:\/\/github.com\/nayeemrmn\" title=\"null\" rel=\"noopener noreferrer\">Nayeem Rahman<\/a> for implementing this<br \/>\nchange.<\/p>\n<h2 id=\"improvements-to-npm-and-node-compatibility\">Improvements to npm and Node compatibility<\/h2>\n<p><code>node:crypto<\/code>, <code>node:http<\/code> and <code>node:vm<\/code> module have been greatly improved since<br \/>\nthe last release. We polyfilled most of the <code>node:crypto<\/code> APIs which unblocked<br \/>\nmany popular npm packages (including cloud provider SDKs). The changes to<br \/>\n<code>node:http<\/code> and <code>node:vm<\/code> are especially helpful for Vite users, and Vite should<br \/>\nnow be much more stable and performant when used with Deno.<\/p>\n<p>Full list of all the APIs that were implemented in this release:<\/p>\n<ul>\n<li><code>crypto.checkPrime<\/code><\/li>\n<li><code>crypto.checkPrimeSync<\/code><\/li>\n<li><code>crypto.createSecretKey<\/code><\/li>\n<li><code>crypto.createVerify<\/code><\/li>\n<li><code>crypto.ECDH<\/code><\/li>\n<li><code>crypto.generateKey<\/code><\/li>\n<li><code>crypto.generateKeyPair<\/code><\/li>\n<li><code>crypto.generateKeyPairSync<\/code><\/li>\n<li><code>crypto.generateKeySync<\/code><\/li>\n<li><code>crypto.generatePrime<\/code><\/li>\n<li><code>crypto.generatePrimeSync<\/code><\/li>\n<li><code>crypto.getCurves<\/code><\/li>\n<li><code>crypto.hkdf<\/code><\/li>\n<li><code>crypto.hkdfSync<\/code><\/li>\n<li><code>crypto.sign<\/code><\/li>\n<li><code>crypto.Sign<\/code><\/li>\n<li><code>crypto.verify<\/code><\/li>\n<li><code>crypto.Verify<\/code><\/li>\n<li><code>crypto.X509Certificate<\/code><\/li>\n<li><code>http.ClientRequest.setTimeout<\/code><\/li>\n<li><code>http.IncomingMessage.socket<\/code><\/li>\n<li><code>module.Module._preloadModules<\/code><\/li>\n<li><code>vm.runInThisContext<\/code><\/li>\n<\/ul>\n<p>In terms of npm support, we greatly improved cache handling for npm packages.<br \/>\nStarting with this release, Deno will try its best to retrieve information from<br \/>\nthe registry when it encounters a missing version (or a version mismatch) of a<br \/>\npackage in the cache. This should result in a lot fewer messages suggesting to<br \/>\nuse <code>--reload<\/code> flag to retrieve the latest registry information.<\/p>\n<h2 id=\"performance-improvements\">Performance improvements<\/h2>\n<p>This release we overhauled our implementations of the HTTP server and both<br \/>\nclient and server for WebSockets. Over the last few months we received feedback<br \/>\nthat <code>Deno.serve<\/code> and <code>WebSocket<\/code> APIs are not as performant and reliable as<br \/>\nthey should be.<\/p>\n<p>We took this feedback to heart and are working tirelessly to improve them. While<br \/>\nthe changes in RPS benchmarks might not yet be visible in your applications, we<br \/>\ntook radical steps towards improving overall performance of these APIs that we<br \/>\nwill present in the coming months.<\/p>\n<h2 id=\"improvements-to-cli\">Improvements to CLI<\/h2>\n<h3 id=\"deno-bench-----no-run-flag\"><code>deno bench<\/code> &#8211; <code>--no-run<\/code> flag<\/h3>\n<p>This releases adds a new <code>--no-run<\/code> flag to the <code>deno bench<\/code> subcommand to cache<br \/>\nall the resolved bench files without running them. This aligns <code>deno bench<\/code> with<br \/>\n<code>deno test<\/code>.<\/p>\n<pre><code>> deno bench --no-run\nDownload https:\/\/deno.land\/std@0.185.0\/path\/mod.ts\nDownload ...etc...\nCheck file:\/\/\/home\/user\/project\/main_bench.ts<\/code><\/pre>\n<p>Thanks to <a href=\"https:\/\/github.com\/GJZwiers\" title=\"null\" rel=\"noopener noreferrer\">Geert-Jan Zwiers<\/a> for contributing this<br \/>\nfeature.<\/p>\n<h3 id=\"deno-task---unset-command\"><code>deno task<\/code> &#8211; <code>unset<\/code> command<\/h3>\n<p>A cross platform <a href=\"https:\/\/man7.org\/linux\/man-pages\/man1\/unset.1p.html\" title=\"null\" rel=\"noopener noreferrer\"><code>unset<\/code><\/a><br \/>\ncommand was added to the shell in<br \/>\n<a href=\"https:\/\/deno.com\/manual@v1.33.0\/tools\/task_runner\" title=\"null\" rel=\"noopener noreferrer\"><code>deno task<\/code><\/a> to allow<br \/>\ndeleting environment and shell variables. This works the same as the POSIX<br \/>\n<code>unset<\/code> command and doing <code>MY_VAR=<\/code> now correctly sets a variable to being<br \/>\nempty.<\/p>\n<pre><code>{\n  \"tasks\": {\n    \/\/ `deno task example` outputs \"1\" then \"false\"\n    \"example\": \"export VAR=1 && echo $VAR && deno task next\",\n    \"next\": \"unset VAR && deno eval 'console.log(Deno.env.has(\"VAR\"))'\"\n  }\n}<\/code><\/pre>\n<h2 id=\"lsp-document-preloading\">LSP document preloading<\/h2>\n<p>In previous versions of Deno you might have found that certain functionality<br \/>\ndidn&#8217;t work unless you had previously opened a file. For example, doing &#8220;find<br \/>\nreferences&#8221; on some code might not have shown it being used in a test file<br \/>\nunless the test file had been previously opened. This issue is now mitigated by<br \/>\npre-loading files when initializing the language server, which should lead to a<br \/>\nmuch better experience.<\/p>\n<p>Note that as part of this preloading, the language server will walk a maximum of<br \/>\n1000 file system entries and output a log message when this is hit. In cases<br \/>\nwhere this is an issue and the workspace has a lot of non-Deno related files,<br \/>\nyou may want to take advantage of the <code>\"deno.enablePaths\"<\/code> option to<br \/>\n<a href=\"https:\/\/deno.com\/manual@v1.25.4\/vscode_deno#partially-deno-enabling-a-workspace\" title=\"null\" rel=\"noopener noreferrer\">partially enable a workspace<\/a>.<\/p>\n<h2 id=\"changes-to-deno-apis\">Changes to <code>Deno<\/code> APIs<\/h2>\n<p>We are deprecating the <code>Deno.run<\/code> API. With the stabilization of the<br \/>\n<a href=\"http:\/\/deno.com\/blog\/v1.31#changes-to-deno-apis\" title=\"null\" rel=\"noopener noreferrer\"><code>Deno.Command<\/code> API in v1.31<\/a> it is our<br \/>\nrecommended way to spawn subprocesses. <code>Deno.run<\/code> has a few quirks that proved<br \/>\nhard to be resolved and we channeled most of our efforts into designing a better<br \/>\nAPI that would be easier to use. <code>Deno.run<\/code> will be removed in v2.0, so we<br \/>\nstrongly encourage you to migrate your code to <code>Deno.Command<\/code>.<\/p>\n<p>The unstable <code>Deno.serve<\/code> API receives a breaking change by removing one of the<br \/>\nAPI overloads in preparation for stabilization of this API.<br \/>\n<code>Deno.serve(handler: Deno.ServeHandler, options: Deno.ServeOptions)<\/code> overload<br \/>\nhas been removed and is no longer available in v1.33.<\/p>\n<p>Please update your code to use one of the available overloads:<\/p>\n<div>\n<pre><span>Deno<\/span><span>.<\/span><span>serve<\/span><span>(<\/span><span>(<\/span>_req<span>)<\/span> <span>=><\/span> <span>new<\/span> <span><span>Response<\/span><\/span><span>(<\/span><span>\"Hello, world\"<\/span><span>)<\/span><span>)<\/span><span>;<\/span>\n\n<span>Deno<\/span><span>.<\/span><span>serve<\/span><span>(<\/span><span>{<\/span> port<span>:<\/span> <span>3000<\/span> <span>}<\/span><span>,<\/span> <span>(<\/span>_req<span>)<\/span> <span>=><\/span> <span>new<\/span> <span><span>Response<\/span><\/span><span>(<\/span><span>\"Hello, world\"<\/span><span>)<\/span><span>)<\/span><span>;<\/span>\n\n<span>Deno<\/span><span>.<\/span><span>serve<\/span><span>(<\/span><span>{<\/span>\n  <span>onListen<\/span><span>(<\/span><span>{<\/span> port<span>,<\/span> hostname <span>}<\/span><span>)<\/span> <span>{<\/span>\n    <span>console<\/span><span>.<\/span><span>log<\/span><span>(<\/span><span><span>`<\/span><span>Server started at http:\/\/<\/span><span><span>${<\/span>hostname<span>}<\/span><\/span><span>:<\/span><span><span>${<\/span>port<span>}<\/span><\/span><span>`<\/span><\/span><span>)<\/span><span>;<\/span>\n    \n  <span>}<\/span><span>,<\/span>\n  <span>handler<\/span><span>:<\/span> <span>(<\/span>_req<span>)<\/span> <span>=><\/span> <span>new<\/span> <span><span>Response<\/span><\/span><span>(<\/span><span>\"Hello, world\"<\/span><span>)<\/span><span>,<\/span>\n<span>}<\/span><span>)<\/span><span>;<\/span><\/pre>\n<\/div>\n<p>We intend to stabilize <code>Deno.serve<\/code> next month and it should will be the<br \/>\npreferred API to use over <code>Deno.serveHttp<\/code>.<\/p>\n<h2 id=\"changes-to-the-standard-library\">Changes to the standard library<\/h2>\n<h3 id=\"breaking-changes-to-stdencoding-module\">Breaking changes to <code>std\/encoding<\/code> module<\/h3>\n<p>As announced in<br \/>\n<a href=\"https:\/\/deno.com\/blog\/v1.32#breaking-changes-to-the-module-structure\" title=\"null\" rel=\"noopener noreferrer\">the previous release post<\/a>,<br \/>\nthe following 6 encoding modules have been moved to the top-level.<\/p>\n<ul>\n<li><code>std\/encoding\/csv<\/code> has been moved to <code>std\/csv<\/code><\/li>\n<li><code>std\/encoding\/yaml<\/code> has been moved to <code>std\/yaml<\/code><\/li>\n<li><code>std\/encoding\/toml<\/code> has been moved to <code>std\/toml<\/code><\/li>\n<li><code>std\/encoding\/json<\/code> has been moved to <code>std\/json<\/code><\/li>\n<li><code>std\/encoding\/jsonc<\/code> has been moved to <code>std\/jsonc<\/code><\/li>\n<li><code>std\/encoding\/front_matter<\/code> has been moved to <code>std\/front_matter<\/code><\/li>\n<\/ul>\n<p>In this release, these deprecated modules are completely removed. If you haven&#8217;t<br \/>\nmigrated to the new paths, please update your import specifiers to them.<\/p>\n<p>Note: If you don&#8217;t depend on these removed paths directly, but your transitive<br \/>\ndependencies depend on these paths incorrectly with an non-versioned module URL,<br \/>\nyou might be unable to fix the issue by updating your own source code. In that<br \/>\ncase, please use an import map of the following pattern:<\/p>\n<div>\n<pre><span>{<\/span>\n  <span>\"imports\"<\/span><span>:<\/span> <span>{<\/span>\n    <span>\"https:\/\/deno.land\/std\/encoding\/yaml.ts\"<\/span><span>:<\/span> <span>\"https:\/\/deno.land\/std@0.179.0\/encoding\/yaml.ts\"<\/span>\n  <span>}<\/span>\n<span>}<\/span><\/pre>\n<\/div>\n<p>This forces a remap of non-versioned standard library URLs (in this case<br \/>\n<code>https:\/\/deno.land\/std\/encoding\/yaml.ts<\/code>) to a versioned one<br \/>\n(<code>https:\/\/deno.land\/std@0.179.0\/encoding\/yaml.ts<\/code>) in your entire dependency<br \/>\ngraph, and will fix the issue in your dependencies.<\/p>\n<h3 id=\"deprecation-of-fsexists-has-been-canceled\">Deprecation of <code>fs.exists<\/code> has been canceled<\/h3>\n<p><code>exists<\/code> and <code>existsSync<\/code> in <code>std\/fs<\/code> module were once deprecated in<br \/>\n<a href=\"https:\/\/github.com\/denoland\/deno_std\/blob\/main\/Releases.md#01110--20211012\" title=\"null\" rel=\"noopener noreferrer\"><code>v0.111.0<\/code><\/a>,<br \/>\nbut their deprecations have been canceled in this release.<\/p>\n<p>These APIs were deprecated because of their error prone nature. They are easy to<br \/>\ncause race condition bug, known as<br \/>\n<a href=\"https:\/\/en.wikipedia.org\/wiki\/Time-of-check_to_time-of-use\" title=\"null\" rel=\"noopener noreferrer\">TOCTOU<\/a>. However<br \/>\nafter its deprecation there was a long<br \/>\n<a href=\"https:\/\/github.com\/denoland\/deno_std\/discussions\/2102\" title=\"null\" rel=\"noopener noreferrer\">discussion<\/a> about<br \/>\ncorrect\/decent usages about them. The balance between their convenience and<br \/>\nerror-proneness having been reconsidered, they were decided to be restored.<\/p>\n<h3 id=\"updates-to-stdcsv-module\">Updates to <code>std\/csv<\/code> module<\/h3>\n<p>In this release, the <code>CsvStringifyStream<\/code> API has been added. This API<br \/>\ntransforms the source streaming input into the stream of csv rows.<\/p>\n<div>\n<pre><span>import<\/span> <span><span>{<\/span> <span>CsvStringifyStream<\/span> <span>}<\/span><\/span> <span>from<\/span> <span>\"https:\/\/deno.land\/std@0.185.0\/csv\/mod.ts\"<\/span><span>;<\/span>\n<span>import<\/span> <span><span>{<\/span> readableStreamFromIterable <span>}<\/span><\/span> <span>from<\/span> <span>\"https:\/\/deno.land\/std@0.185.0\/streams\/mod.ts\"<\/span><span>;<\/span>\n\n<span>const<\/span> file <span>=<\/span> <span>await<\/span> <span>Deno<\/span><span>.<\/span><span>open<\/span><span>(<\/span><span>\"data.csv\"<\/span><span>,<\/span> <span>{<\/span> create<span>:<\/span> <span>true<\/span><span>,<\/span> write<span>:<\/span> <span>true<\/span> <span>}<\/span><span>)<\/span><span>;<\/span>\n<span>const<\/span> readable <span>=<\/span> <span>readableStreamFromIterable<\/span><span>(<\/span><span>[<\/span>\n  <span>{<\/span> id<span>:<\/span> <span>1<\/span><span>,<\/span> name<span>:<\/span> <span>\"one\"<\/span> <span>}<\/span><span>,<\/span>\n  <span>{<\/span> id<span>:<\/span> <span>2<\/span><span>,<\/span> name<span>:<\/span> <span>\"two\"<\/span> <span>}<\/span><span>,<\/span>\n  <span>{<\/span> id<span>:<\/span> <span>3<\/span><span>,<\/span> name<span>:<\/span> <span>\"three\"<\/span> <span>}<\/span><span>,<\/span>\n<span>]<\/span><span>)<\/span><span>;<\/span>\n\n<span>await<\/span> readable\n  <span>.<\/span><span>pipeThrough<\/span><span>(<\/span><span>new<\/span> <span><span>CsvStringifyStream<\/span><\/span><span>(<\/span><span>{<\/span> columns<span>:<\/span> <span>[<\/span><span>\"id\"<\/span><span>,<\/span> <span>\"name\"<\/span><span>]<\/span> <span>}<\/span><span>)<\/span><span>)<\/span>\n  <span>.<\/span><span>pipeThrough<\/span><span>(<\/span><span>new<\/span> <span><span>TextEncoderStream<\/span><\/span><span>(<\/span><span>)<\/span><span>)<\/span>\n  <span>.<\/span><span>pipeTo<\/span><span>(<\/span>file<span>.<\/span><span>writable<\/span><span>)<\/span><span>;<\/span><\/pre>\n<\/div>\n<p>Following the above addition, <code>CsvStream<\/code> has been renamed to <code>CsvParseStream<\/code><br \/>\nto clarify its purpose.<\/p>\n<p>Thank you to <a href=\"https:\/\/github.com\/uki00a\" title=\"null\" rel=\"noopener noreferrer\">Yuki Tanaka<\/a> for the contribution.<\/p>\n<h2 id=\"v8-114\">V8 11.4<\/h2>\n<p>This release upgrades to the latest release of V8 (11.4, previously 11.2).<\/p>\n<p>There are some new exciting JavaScript features available with this upgrade:<\/p>\n<ul>\n<li><a href=\"https:\/\/chromestatus.com\/feature\/4668361878274048\" title=\"null\" rel=\"noopener noreferrer\">Resizable <code>ArrayBuffer<\/code> and growable <code>SharedArrayBuffer<\/code><\/a><\/li>\n<li><a href=\"https:\/\/chromestatus.com\/feature\/5073244152922112\" title=\"null\" rel=\"noopener noreferrer\"><code>ArrayBuffer.prototype.transfer<\/code>, <code>ArrayBuffer.prototype.transferToFixedLength<\/code> and <code>ArrayBuffer.prototype.detached<\/code><\/a><\/li>\n<\/ul>\n<\/div>\n<p><a href=\"https:\/\/deno.com\/blog\/v1.33\" class=\"button purchase\" rel=\"nofollow noopener\" target=\"_blank\">Read More<\/a><br \/>\n Zonia Mote<\/p>\n","protected":false},"excerpt":{"rendered":"<p>As mentioned in the recent &#8220;Forced Optimization&#8221; presentation at Node Congress 2023, we&#8217;re working diligently towards a major release of Deno 2 in the coming months. Though our vision for Deno 2 is ambitious, our goals haven&#8217;t changed since we started the project: Effortless Coding: Whether that&#8217;s removing config, boilerplate code, or build steps, we&#8217;ve<\/p>\n","protected":false},"author":1,"featured_media":642911,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1156,46],"tags":[],"class_list":{"0":"post-642910","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","7":"category-coming","8":"category-technology"},"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/newsycanuse.com\/index.php\/wp-json\/wp\/v2\/posts\/642910","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/newsycanuse.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/newsycanuse.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/newsycanuse.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/newsycanuse.com\/index.php\/wp-json\/wp\/v2\/comments?post=642910"}],"version-history":[{"count":0,"href":"https:\/\/newsycanuse.com\/index.php\/wp-json\/wp\/v2\/posts\/642910\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/newsycanuse.com\/index.php\/wp-json\/wp\/v2\/media\/642911"}],"wp:attachment":[{"href":"https:\/\/newsycanuse.com\/index.php\/wp-json\/wp\/v2\/media?parent=642910"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/newsycanuse.com\/index.php\/wp-json\/wp\/v2\/categories?post=642910"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/newsycanuse.com\/index.php\/wp-json\/wp\/v2\/tags?post=642910"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}