Unverified Commit 3f532101 authored by Gergő Gutyina's avatar Gergő Gutyina Committed by GitHub
Browse files

quarto: 1.7.34 -> 1.8.26 (#460030)

parents ba8256da c1d5548f
Loading
Loading
Loading
Loading
+2 −6
Original line number Diff line number Diff line
@@ -39,17 +39,13 @@ let
in
stdenv.mkDerivation (final: {
  pname = "quarto";
  version = "1.7.34";
  version = "1.8.26";

  src = fetchurl {
    url = "https://github.com/quarto-dev/quarto-cli/releases/download/v${final.version}/quarto-${final.version}-linux-amd64.tar.gz";
    hash = "sha256-3WsDCkS5Y9AflLlpa6y6ca/DF4621RqcwQUzK3fqa5o=";
    hash = "sha256-rYyqbTrsw/K2pKj7gpZnfvLvlBCkij7rp7H5ockQAPA=";
  };

  patches = [
    ./deno2.patch
  ];

  nativeBuildInputs = [
    makeWrapper
    which
+0 −59
Original line number Diff line number Diff line
diff --git a/bin/quarto.js b/bin/quarto.js
@@ -97360,6 +97360,7 @@
 class SAXParser extends ParserBase {
     _listeners = {};
     _controller;
+    _encoding;
     fireListeners(event) {
         const [name, ...args] = event;
         const list = this._listeners[name] || [];
@@ -97395,33 +97396,23 @@
     write(chunk, controller) {
         try {
             this._controller = controller;
-            this.chunk = new TextDecoder().decode(chunk);
+            this.chunk = new TextDecoder(this._encoding).decode(chunk);
             this.run();
         } finally{
             this._controller = undefined;
         }
     }
-    getStream() {
-        return new WritableStream(this);
-    }
-    getWriter() {
-        const streamWriter = this.getStream().getWriter();
-        return {
-            async write (p) {
-                await streamWriter.ready;
-                await streamWriter.write(p);
-                return p.length;
-            }
-        };
-    }
-    async parse(source) {
+    async parse(source, encoding) {
+        this._encoding = encoding;
         if (typeof source === 'string') {
             this.chunk = source;
             this.run();
         } else if (source instanceof Uint8Array) {
             this.write(source);
         } else {
-            await Deno.copy(source, this.getWriter());
+            await source.pipeThrough(new TextDecoderStream(this._encoding)).pipeTo(new WritableStream({
+                write: (str)=>this.parse(str, encoding)
+            }));
         }
     }
     on(event, listener) {
@@ -97532,8 +97523,7 @@
         }
     });
     const reader = await Deno.open(sitemapPath);
-    await parser.parse(reader);
-    reader.close();
+    await parser.parse(reader.readable);
     return urlset;
 }
 function writeSitemap(sitemapPath, urlset, draftMode) {