Skip to content

Commit

Permalink
Merge pull request #10940 from quarto-dev/chore/deno-update-2024-09
Browse files Browse the repository at this point in the history
Chore/deno update 2024 09
  • Loading branch information
cscheid authored Oct 2, 2024
2 parents 01b2f04 + 6c6d7fc commit 23ea14b
Show file tree
Hide file tree
Showing 921 changed files with 45,389 additions and 12,181 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
*.Rproj
*.Rhistory
__pycache__/
build
quarto_cli.egg-info
.Rproj.user
package/dist/**
Expand All @@ -18,6 +17,9 @@ package/dist/**
src/resources/deno_std/cache
src/vendor-*

# deno lock file
deno.lock

# windows configuration file
win_configuration.bat
/package/pkg-working
Expand Down
4 changes: 2 additions & 2 deletions configuration
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
# deno_dom should match release at https://github.com/b-fuze/deno-dom/releases

# Binary dependencies
export DENO=v1.41.0
export DENO=v1.46.3
# TODO figure out where 0.1.41 apple silicon libs are available
export DENO_DOM=v0.1.35-alpha-artifacts
export DENO_DOM=v0.1.41-alpha-artifacts
export PANDOC=3.4
export DARTSASS=1.70.0
export ESBUILD=0.19.12
Expand Down
2 changes: 2 additions & 0 deletions dev-docs/add-typescript-dependency.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
## Adding a new Typescript dependency to the project

FIXME THIS ALL NEEDS UPDATING FOR 1.46.3 AND LATER

We vendor all external dependencies to avoid downloads during the execution of quarto in installed environments. To add a new dependency, edit the `./src/import_map.json` file.

- If the dependency comes from the Deno standard library, make sure you match the version number (otherwise we can end up with duplicate imports from different versions)
Expand Down
5 changes: 5 additions & 0 deletions news/changelog-1.6.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
All changes included in 1.6:

## Breaking changes

- The syntax for standard library imports in `quarto run` TypeScript files (`*.ts`) changed. Please see https://prerelease.quarto.org/docs/projects/scripts.html#deno-scripts for how to make the necessary changes.

## `quarto inspect`

- ([#10039](https://github.com/quarto-dev/quarto-cli/issues/10039)): `quarto inspect` properly handles `!expr` tag in metadata.
Expand Down Expand Up @@ -81,6 +85,7 @@ All changes included in 1.6:

- Upgrade `mermaidjs` to 11.2.0.
- Upgrade Pandoc to 3.4.
- Upgrade `deno` to 1.46.3.
- ([#10162](https://github.com/quarto-dev/quarto-cli/issues/10162)): Use Edge on `macOS` as a Chromium browser when available.
- ([#10235](https://github.com/quarto-dev/quarto-cli/issues/10235)): Configure the CI schedule trigger to activate exclusively for the upstream repository.
- ([#10295](https://github.com/quarto-dev/quarto-cli/issues/10235)): Fix regression to return error status to shell when `CommandError` is thrown.
Expand Down
4 changes: 2 additions & 2 deletions package/scripts/common/quarto
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ if [ -f "$DEV_PATH" ]; then
fi

# Local import map
QUARTO_IMPORT_MAP_ARG=--importmap=$QUARTO_SRC_PATH/dev_import_map.json
QUARTO_IMPORT_MAP_ARG=--importmap=$QUARTO_SRC_PATH/import_map.json

# Turn on type checking for dev version
QUARTO_DENO_OPTIONS=--check
Expand All @@ -63,7 +63,7 @@ if [ -f "$DEV_PATH" ]; then
if [ -z ${QUARTO_DEBUG+x} ]; then
export QUARTO_DEBUG=true
fi
QUARTO_CACHE_OPTIONS="--cached-only"
# QUARTO_CACHE_OPTIONS="--cached-only"

# Check for deno update
QUARTO_DIST_CONFIG=$QUARTO_BIN_PATH/../config
Expand Down
181 changes: 93 additions & 88 deletions package/scripts/deno_std/deno_std.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,43 +39,48 @@ import * as textproto from "https://deno.land/std@0.159.0/textproto/mod.ts";
import * as uuid from "https://deno.land/std@0.159.0/uuid/mod.ts";
*/

import * as tar from "https://deno.land/std@0.217.0/archive/tar.ts";
import * as async from "https://deno.land/std@0.217.0/async/mod.ts";
import * as bytes from "https://deno.land/std@0.217.0/bytes/mod.ts";
import * as collections from "https://deno.land/std@0.217.0/collections/mod.ts";
import * as crypto from "https://deno.land/std@0.217.0/crypto/mod.ts";
import * as datetime from "https://deno.land/std@0.217.0/datetime/mod.ts";
import * as dotenv from "https://deno.land/std@0.217.0/dotenv/mod.ts";
// The import map "run_import_map.json" needs to mirror these imports
// If you edit this file, you need to update the import map as well

import * as tar from "jsr:/@std/archive@^0.224.0/tar";
import * as async from "jsr:/@std/async@^0.224.0";
import * as bytes from "jsr:/@std/bytes@^0.224.0";
import * as collections from "jsr:/@std/collections@^0.224.0";
import * as crypto from "jsr:/@std/crypto@^0.224.0";
import * as datetime from "jsr:/@std/datetime@^0.224.0";
import * as dotenv from "jsr:/@std/dotenv@^0.224.0";

// encoding has no mod.ts
import * as ascii85 from "https://deno.land/std@0.217.0/encoding/ascii85.ts";
import * as base32 from "https://deno.land/std@0.217.0/encoding/base32.ts";
import * as base58 from "https://deno.land/std@0.217.0/encoding/base58.ts";
import * as base64 from "https://deno.land/std@0.217.0/encoding/base64.ts";
import * as base64url from "https://deno.land/std@0.217.0/encoding/base64url.ts";
import * as csv from "https://deno.land/std@0.217.0/csv/mod.ts";
import * as front_matter from "https://deno.land/std@0.217.0/front_matter/mod.ts";
import * as hex from "https://deno.land/std@0.217.0/encoding/hex.ts";
import * as jsonc from "https://deno.land/std@0.217.0/jsonc/mod.ts";
import * as toml from "https://deno.land/std@0.217.0/toml/mod.ts";
import * as varint from "https://deno.land/std@0.217.0/encoding/varint.ts";
import * as yaml from "https://deno.land/std@0.217.0/yaml/mod.ts";
import * as ascii85 from "https://deno.land/std@0.224.0/encoding/ascii85.ts";
import * as base32 from "https://deno.land/std@0.224.0/encoding/base32.ts";
import * as base58 from "https://deno.land/std@0.224.0/encoding/base58.ts";
import * as base64 from "https://deno.land/std@0.224.0/encoding/base64.ts";
import * as base64url from "https://deno.land/std@0.224.0/encoding/base64url.ts";
import * as csv from "jsr:/@std/csv@^0.224.0";
import * as front_matter from "jsr:/@std/front-matter@^0.224.0";
import * as hex from "https://deno.land/std@0.224.0/encoding/hex.ts";
import * as jsonc from "jsr:/@std/jsonc@^0.224.0";
import * as toml from "jsr:/@std/toml@^0.224.0";
import * as varint from "https://deno.land/std@0.224.0/encoding/varint.ts";
import * as yaml from "jsr:/@std/yaml@^0.224.0";

import * as flags from "jsr:/@std/flags@^0.224.0";
import * as fmt_bytes from "https://deno.land/std@0.224.0/fmt/bytes.ts";
import * as fmt_colors from "https://deno.land/std@0.224.0/fmt/colors.ts";
import * as fmt_printf from "https://deno.land/std@0.224.0/fmt/printf.ts";
import * as fs from "jsr:/@std/fs@^0.224.0";
import * as http from "jsr:/@std/http@^0.224.0";
import * as io from "jsr:/@std/io@^0.224.0";
import * as log from "jsr:/@std/log@^0.224.0";
import * as mediaTypes from "jsr:/@std/media-types@^0.224.0";
import * as path from "jsr:/@std/path@^0.224.0";
import * as permissions from "jsr:/@std/permissions@^0.224.0";
import * as semver from "jsr:/@std/semver@^0.224.0";
import * as streams from "jsr:/@std/streams@^0.224.0";
import * as uuid from "jsr:/@std/uuid@^0.224.0";

import * as flags from "https://deno.land/std@0.217.0/flags/mod.ts";
import * as fmt_bytes from "https://deno.land/std@0.217.0/fmt/bytes.ts";
import * as fmt_colors from "https://deno.land/std@0.217.0/fmt/colors.ts";
import * as fmt_printf from "https://deno.land/std@0.217.0/fmt/printf.ts";
import * as fs from "https://deno.land/std@0.217.0/fs/mod.ts";
import * as http from "https://deno.land/std@0.217.0/http/mod.ts";
import * as io from "https://deno.land/std@0.217.0/io/mod.ts";
import * as log from "https://deno.land/std@0.217.0/log/mod.ts";
import * as mediaTypes from "https://deno.land/std@0.217.0/media_types/mod.ts";
import * as path from "https://deno.land/std@0.217.0/path/mod.ts";
import * as permissions from "https://deno.land/std@0.217.0/permissions/mod.ts";
import * as semver from "https://deno.land/std@0.217.0/semver/mod.ts";
import * as streams from "https://deno.land/std@0.217.0/streams/mod.ts";
import * as uuid from "https://deno.land/std@0.217.0/uuid/mod.ts";
import * as version from "https://deno.land/std@0.217.0/version.ts";
// seems like jsr doesn't export version numbers?!
// import * as version from "jsr:/@std/version@^0.224.0";
import juice from "https://cdn.skypack.dev/juice@10.0.0";

/*
Expand All @@ -84,58 +89,58 @@ These would be useful imports to add, but they increase the
size of the download cache significantly, so we're skipping
them until they are needed.
import "https://deno.land/std@0.217.0/node/assert/strict.ts";
import "https://deno.land/std@0.217.0/node/dns/promises.ts";
import "https://deno.land/std@0.217.0/node/fs/promises.ts";
import "https://deno.land/std@0.217.0/node/path/mod.ts";
import "https://deno.land/std@0.217.0/node/readline/promises.ts";
import "https://deno.land/std@0.217.0/node/stream/web.ts";
import "https://deno.land/std@0.217.0/node/timers/promises.ts";
import "https://deno.land/std@0.217.0/node/util/types.ts";
import "https://deno.land/std@0.217.0/node/assert.ts";
import "https://deno.land/std@0.217.0/node/assertion_error.ts";
import "https://deno.land/std@0.217.0/node/async_hooks.ts";
import "https://deno.land/std@0.217.0/node/async_hooks.ts";
import "https://deno.land/std@0.217.0/node/buffer.ts";
import "https://deno.land/std@0.217.0/node/child_process.ts";
import "https://deno.land/std@0.217.0/node/cluster.ts";
import "https://deno.land/std@0.217.0/node/console.ts";
import "https://deno.land/std@0.217.0/node/constants.ts";
import "https://deno.land/std@0.217.0/node/crypto.ts";
import "https://deno.land/std@0.217.0/node/dgram.ts";
import "https://deno.land/std@0.217.0/node/diagnostics_channel.ts";
import "https://deno.land/std@0.217.0/node/dns.ts";
import "https://deno.land/std@0.217.0/node/domain.ts";
import "https://deno.land/std@0.217.0/node/events.ts";
import "https://deno.land/std@0.217.0/node/fs.ts";
import "https://deno.land/std@0.217.0/node/http.ts";
import "https://deno.land/std@0.217.0/node/http2.ts";
import "https://deno.land/std@0.217.0/node/https.ts";
import "https://deno.land/std@0.217.0/node/inspector.ts";
import "https://deno.land/std@0.217.0/node/module_all.ts";
import "https://deno.land/std@0.217.0/node/module_esm.ts";
import "https://deno.land/std@0.217.0/node/module.ts";
import "https://deno.land/std@0.217.0/node/net.ts";
import "https://deno.land/std@0.217.0/node/os.ts";
import "https://deno.land/std@0.217.0/node/path.ts";
import "https://deno.land/std@0.217.0/node/perf_hooks.ts";
import "https://deno.land/std@0.217.0/node/process.ts";
import "https://deno.land/std@0.217.0/node/punycode.ts";
import "https://deno.land/std@0.217.0/node/querystring.ts";
import "https://deno.land/std@0.217.0/node/readline.ts";
import "https://deno.land/std@0.217.0/node/repl.ts";
import "https://deno.land/std@0.217.0/node/stream.ts";
import "https://deno.land/std@0.217.0/node/string_decoder.ts";
import "https://deno.land/std@0.217.0/node/sys.ts";
import "https://deno.land/std@0.217.0/node/timers.ts";
import "https://deno.land/std@0.217.0/node/tls.ts";
import "https://deno.land/std@0.217.0/node/tty.ts";
import "https://deno.land/std@0.217.0/node/upstream_modules.ts";
import "https://deno.land/std@0.217.0/node/url.ts";
import "https://deno.land/std@0.217.0/node/util.ts";
import "https://deno.land/std@0.217.0/node/v8.ts";
import "https://deno.land/std@0.217.0/node/vm.ts";
import "https://deno.land/std@0.217.0/node/wasi.ts";
import "https://deno.land/std@0.217.0/node/worker_threads.ts";
import "https://deno.land/std@0.217.0/node/zlib.ts";
import "https://deno.land/std@0.224.0/node/assert/strict.ts";
import "https://deno.land/std@0.224.0/node/dns/promises.ts";
import "https://deno.land/std@0.224.0/node/fs/promises.ts";
import "https://deno.land/std@0.224.0/node/path/mod.ts";
import "https://deno.land/std@0.224.0/node/readline/promises.ts";
import "https://deno.land/std@0.224.0/node/stream/web.ts";
import "https://deno.land/std@0.224.0/node/timers/promises.ts";
import "https://deno.land/std@0.224.0/node/util/types.ts";
import "https://deno.land/std@0.224.0/node/assert.ts";
import "https://deno.land/std@0.224.0/node/assertion_error.ts";
import "https://deno.land/std@0.224.0/node/async_hooks.ts";
import "https://deno.land/std@0.224.0/node/async_hooks.ts";
import "https://deno.land/std@0.224.0/node/buffer.ts";
import "https://deno.land/std@0.224.0/node/child_process.ts";
import "https://deno.land/std@0.224.0/node/cluster.ts";
import "https://deno.land/std@0.224.0/node/console.ts";
import "https://deno.land/std@0.224.0/node/constants.ts";
import "https://deno.land/std@0.224.0/node/crypto.ts";
import "https://deno.land/std@0.224.0/node/dgram.ts";
import "https://deno.land/std@0.224.0/node/diagnostics_channel.ts";
import "https://deno.land/std@0.224.0/node/dns.ts";
import "https://deno.land/std@0.224.0/node/domain.ts";
import "https://deno.land/std@0.224.0/node/events.ts";
import "https://deno.land/std@0.224.0/node/fs.ts";
import "https://deno.land/std@0.224.0/node/http.ts";
import "https://deno.land/std@0.224.0/node/http2.ts";
import "https://deno.land/std@0.224.0/node/https.ts";
import "https://deno.land/std@0.224.0/node/inspector.ts";
import "https://deno.land/std@0.224.0/node/module_all.ts";
import "https://deno.land/std@0.224.0/node/module_esm.ts";
import "https://deno.land/std@0.224.0/node/module.ts";
import "https://deno.land/std@0.224.0/node/net.ts";
import "https://deno.land/std@0.224.0/node/os.ts";
import "https://deno.land/std@0.224.0/node/path.ts";
import "https://deno.land/std@0.224.0/node/perf_hooks.ts";
import "https://deno.land/std@0.224.0/node/process.ts";
import "https://deno.land/std@0.224.0/node/punycode.ts";
import "https://deno.land/std@0.224.0/node/querystring.ts";
import "https://deno.land/std@0.224.0/node/readline.ts";
import "https://deno.land/std@0.224.0/node/repl.ts";
import "https://deno.land/std@0.224.0/node/stream.ts";
import "https://deno.land/std@0.224.0/node/string_decoder.ts";
import "https://deno.land/std@0.224.0/node/sys.ts";
import "https://deno.land/std@0.224.0/node/timers.ts";
import "https://deno.land/std@0.224.0/node/tls.ts";
import "https://deno.land/std@0.224.0/node/tty.ts";
import "https://deno.land/std@0.224.0/node/upstream_modules.ts";
import "https://deno.land/std@0.224.0/node/url.ts";
import "https://deno.land/std@0.224.0/node/util.ts";
import "https://deno.land/std@0.224.0/node/v8.ts";
import "https://deno.land/std@0.224.0/node/vm.ts";
import "https://deno.land/std@0.224.0/node/wasi.ts";
import "https://deno.land/std@0.224.0/node/worker_threads.ts";
import "https://deno.land/std@0.224.0/node/zlib.ts";
*/
9 changes: 6 additions & 3 deletions package/scripts/windows/quarto.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ IF EXIST "!QUARTO_TS_PATH!" (
IF NOT DEFINED QUARTO_ACTION (
SET QUARTO_ACTION=run
)
SET "QUARTO_IMPORT_MAP_ARG=--importmap=""!QUARTO_SRC_PATH!\dev_import_map.json"""
SET "QUARTO_IMPORT_MAP_ARG=--importmap=""!QUARTO_SRC_PATH!\import_map.json"""

IF NOT DEFINED QUARTO_TARGET (
SET "QUARTO_TARGET=!QUARTO_TS_PATH!"
Expand Down Expand Up @@ -57,6 +57,8 @@ IF EXIST "!QUARTO_TS_PATH!" (
echo !DENO!>"!DENO_VERSION_FILE!"
)

SET QUARTO_CACHE_OPTIONS=

) ELSE (

IF NOT DEFINED QUARTO_SHARE_PATH (
Expand All @@ -78,6 +80,7 @@ IF EXIST "!QUARTO_TS_PATH!" (
SET "QUARTO_TARGET=%SCRIPT_PATH%\quarto.js"
SET "QUARTO_BIN_PATH=%SCRIPT_PATH%"
SET "QUARTO_IMPORT_MAP_ARG=--importmap=""%SCRIPT_PATH%\vendor\import_map.json"""
SET QUARTO_CACHE_OPTIONS="--cached-only"
)

IF "%1"=="--paths" (
Expand All @@ -99,7 +102,7 @@ IF NOT DEFINED QUARTO_DENO (

SET "DENO_TLS_CA_STORE=system,mozilla"
SET "DENO_NO_UPDATE_CHECK=1"
SET "QUARTO_DENO_OPTIONS=--unstable-kv --unstable-ffi --no-config --cached-only --allow-read --allow-write --allow-run --allow-env --allow-net --allow-ffi"
SET "QUARTO_DENO_OPTIONS=--unstable-kv --unstable-ffi --no-config --allow-read --allow-write --allow-run --allow-env --allow-net --allow-ffi"

REM Add expected V8 options to QUARTO_DENO_V8_OPTIONS
IF DEFINED QUARTO_DENO_V8_OPTIONS (
Expand Down Expand Up @@ -128,7 +131,7 @@ IF NOT DEFINED QUARTO_DENO_EXTRA_OPTIONS (
)
)

!QUARTO_DENO! !QUARTO_ACTION! !QUARTO_DENO_OPTIONS! !QUARTO_DENO_EXTRA_OPTIONS! !QUARTO_IMPORT_MAP_ARG! !QUARTO_TARGET! %*
!QUARTO_DENO! !QUARTO_ACTION! !QUARTO_CACHE_OPTIONS! !QUARTO_DENO_OPTIONS! !QUARTO_DENO_EXTRA_OPTIONS! !QUARTO_IMPORT_MAP_ARG! !QUARTO_TARGET! %*


:end
2 changes: 1 addition & 1 deletion package/src/common/compile-quarto-latexmk.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
*/
import { Command } from "cliffy/command/mod.ts";
import { basename, join } from "../../../src/deno_ral/path.ts";
import { ensureDirSync } from "fs/mod.ts";
import { ensureDirSync } from "../../../src/deno_ral/fs.ts";
import { info } from "../../../src/deno_ral/log.ts";

import { Configuration, readConfiguration } from "../common/config.ts";
Expand Down
2 changes: 1 addition & 1 deletion package/src/common/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ export function readConfiguration(
);
}

const importmap = join(src, "dev_import_map.json");
const importmap = join(src, "import_map.json");

return {
productName,
Expand Down
3 changes: 1 addition & 2 deletions package/src/common/configure.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@
* Copyright (C) 2020-2022 Posit Software, PBC
*/
import { dirname, join, SEP } from "../../../src/deno_ral/path.ts";
import { existsSync } from "fs/mod.ts";
import { ensureDirSync } from "fs/mod.ts";
import { existsSync, ensureDirSync } from "../../../src/deno_ral/fs.ts";
import { info, warning } from "../../../src/deno_ral/log.ts";

import { expandPath } from "../../../src/core/path.ts";
Expand Down
2 changes: 1 addition & 1 deletion package/src/common/create-deno-config.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { expandGlobSync } from "fs/mod.ts";
import { expandGlobSync } from "../../../src/deno_ral/fs.ts";

const json = JSON.parse(
Deno.readTextFileSync("package/src/common/deno-meta.json"),
Expand Down
2 changes: 1 addition & 1 deletion package/src/common/dependencies/dartsass.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Copyright (C) 2020-2022 Posit Software, PBC
*
*/
import { ensureDirSync, existsSync } from "fs/mod.ts";
import { ensureDirSync, existsSync } from "../../../../src/deno_ral/fs.ts";
import { dirname, join } from "../../../../src/deno_ral/path.ts";

import { unTar } from "../../util/tar.ts";
Expand Down
8 changes: 4 additions & 4 deletions package/src/common/dependencies/deno_dom.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
*
*/

import { ensureDir } from "fs/mod.ts";
import { ensureDir } from "../../../../src/deno_ral/fs.ts";
import { basename, dirname, join } from "../../../../src/deno_ral/path.ts";
import { Configuration } from "../config.ts";

Expand Down Expand Up @@ -34,8 +34,8 @@ export function deno_dom(version: string): Dependency {
};
};

const deno_dom_release_dragonstyle = (filename: string, targetFileName: string) => {
return deno_dom_release(filename, "https://github.com/dragonstyle/deno-dom", targetFileName)
const deno_dom_release_quarto_dev = (filename: string, targetFileName: string) => {
return deno_dom_release(filename, "https://github.com/quarto-dev/deno-dom-apple-silicon", targetFileName)
}

return {
Expand All @@ -50,7 +50,7 @@ export function deno_dom(version: string): Dependency {
},
"aarch64": {
linux: deno_dom_release("libplugin-linux-aarch64.so"),
darwin: deno_dom_release_dragonstyle("libplugin-aarch64.dylib", "libplugin.dylib")
darwin: deno_dom_release_quarto_dev("libplugin-aarch64.dylib", "libplugin.dylib")
},
},
};
Expand Down
2 changes: 1 addition & 1 deletion package/src/common/dependencies/esbuild.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* Copyright (C) 2020-2022 Posit Software, PBC
*/
import { ensureDirSync, existsSync } from "fs/mod.ts";
import { ensureDirSync, existsSync } from "../../../../src/deno_ral/fs.ts";
import { dirname, join } from "../../../../src/deno_ral/path.ts";

import { unTar } from "../../util/tar.ts";
Expand Down
Loading

0 comments on commit 23ea14b

Please sign in to comment.