Skip to content

Commit 4b6f5e3

Browse files
committed
Merge branch 'main' of github.com:quarto-dev/quarto-cli into main
2 parents a8b3871 + 5bfd772 commit 4b6f5e3

File tree

535 files changed

+99560
-146
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

535 files changed

+99560
-146
lines changed

configure-linux.sh

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@ if [ ! -z "$DENO_CANARY_COMMIT" ]; then
4747
echo [Upgrading Deno to Canary]
4848
./deno upgrade --canary --version $DENO_CANARY_COMMIT
4949
fi
50-
./deno cache --reload ../../../../src/quarto.ts --unstable --importmap=../../../../src/import_map.json
5150

5251
popd
5352
popd
@@ -61,6 +60,16 @@ pushd $QUARTO_PACKAGE_DIR/src/
6160

6261
popd
6362

63+
if [[ "$CI" != "true" && ( ( "./src/import_map.json" -nt "./src/dev_import_map.json" ) || ( "./src/vendor/import_map.json" -nt "./src/dev_import_map.json" ) ) ]]; then
64+
echo [Revendoring quarto dependencies]
65+
66+
mv ./src/vendor ./src/vendor-`date +%Y-%m-%d`
67+
pushd src
68+
../package/dist/bin/tools/deno vendor quarto.ts ../tests/test-deps.ts --importmap=./import_map.json
69+
popd
70+
./package/dist/bin/tools/deno run --unstable --allow-all --importmap=./src/import_map.json package/src/common/create-dev-import-map.ts
71+
fi
72+
6473
echo "Downloading Deno Stdlib"
6574
./package/scripts/deno_std/download.sh
6675

configure-macos.sh

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ if [ ! -z "$DENO_CANARY_COMMIT" ]; then
3737
echo [Upgrading Deno to Canary]
3838
./deno upgrade --canary --version $DENO_CANARY_COMMIT
3939
fi
40-
./deno cache --reload ../../../../src/quarto.ts --unstable --importmap=../../../../src/import_map.json
4140

4241
popd
4342
popd
@@ -51,6 +50,16 @@ pushd $QUARTO_PACKAGE_DIR/src/
5150

5251
popd
5352

53+
if [[ "$CI" != "true" && ( ( "./src/import_map.json" -nt "./src/dev_import_map.json" ) || ( "./src/vendor/import_map.json" -nt "./src/dev_import_map.json" ) ) ]]; then
54+
echo [Revendoring quarto dependencies]
55+
56+
mv ./src/vendor ./src/vendor-`date +%Y-%m-%d`
57+
pushd src
58+
../package/dist/bin/tools/deno vendor quarto.ts ../tests/test-deps.ts --importmap=./import_map.json
59+
popd
60+
./package/dist/bin/tools/deno run --unstable --allow-all --importmap=./src/import_map.json package/src/common/create-dev-import-map.ts
61+
fi
62+
5463
echo "Downloading Deno Stdlib"
5564
./package/scripts/deno_std/download.sh
5665

configure-windows.cmd

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@ REM Update to deno canary commit if it is set
6161
IF NOT "%DENO_CANARY_COMMIT%"=="" (
6262
deno upgrade --canary --version %DENO_CANARY_COMMIT%
6363
)
64-
deno cache --reload ..\..\..\..\src\quarto.ts --unstable --importmap=..\..\..\..\src\import_map.json
6564

6665
POPD
6766

package/scripts/common/quarto

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ if [ -f "$DEV_PATH" ]; then
2020
fi
2121

2222
# Local import map
23-
QUARTO_IMPORT_ARGMAP=--importmap=$QUARTO_SRC_DIR/import_map.json
23+
QUARTO_IMPORT_ARGMAP=--importmap=$QUARTO_SRC_DIR/dev_import_map.json
2424

2525
# Allow calls to override the target
2626
if [ -z ${QUARTO_TARGET+x} ]; then

package/scripts/windows/quarto.cmd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ IF EXIST "%QUARTO_TS_PATH%" (
2323
IF "%QUARTO_ACTION%"=="" (
2424
SET QUARTO_ACTION=run
2525
)
26-
SET QUARTO_IMPORT_ARGMAP=--importmap="%SRC_PATH%import_map.json"
26+
SET QUARTO_IMPORT_ARGMAP=--importmap="%SRC_PATH%dev_import_map.json"
2727

2828
IF "%QUARTO_TARGET%"=="" (
2929
SET QUARTO_TARGET="%QUARTO_TS_PATH%"

package/src/common/config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ export function readConfiguration(
5353
bin,
5454
};
5555

56-
const importmap = join(src, "import_map.json");
56+
const importmap = join(src, "dev_import_map.json");
5757

5858
return {
5959
productName,
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
/*
2+
* create-dev-import-map.ts
3+
*
4+
* Copyright (C) 2022 by RStudio, PBC
5+
*
6+
*/
7+
8+
import { mergeImportMaps } from "../../../src/core/deno/import-maps.ts";
9+
10+
const importMapSpecs = [
11+
{
12+
importMap: JSON.parse(Deno.readTextFileSync("./src/import_map.json")),
13+
prefix: "",
14+
},
15+
{
16+
importMap: JSON.parse(
17+
Deno.readTextFileSync("./src/vendor/import_map.json"),
18+
),
19+
prefix: "vendor",
20+
},
21+
];
22+
23+
Deno.writeTextFileSync(
24+
"./src/dev_import_map.json",
25+
JSON.stringify(mergeImportMaps(...importMapSpecs), null, 2),
26+
);

package/src/import_map.json

Lines changed: 0 additions & 116 deletions
This file was deleted.

package/src/quarto-bld

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@ source ../../configuration
66

77
# TODO: Consider generating a source map or something to get a good stack
88
# Create the Deno bundle
9-
../$QUARTO_DIST_DIR/$QUARTO_BIN_DIR/tools/deno run --unstable --allow-env --allow-read --allow-write --allow-run --allow-net --allow-ffi --importmap=import_map.json bld.ts $@
9+
../$QUARTO_DIST_DIR/$QUARTO_BIN_DIR/tools/deno run --unstable --allow-env --allow-read --allow-write --allow-run --allow-net --allow-ffi --importmap=../../src/dev_import_map.json bld.ts $@
1010

package/src/quarto-bld.cmd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ REM and convert any export statements into set statements
66
REM (allows reuse of variables)
77
FOR /F "tokens=*" %%A IN (..\..\configuration) DO CALL :convertExportToSet %%A
88

9-
..\%QUARTO_DIST_DIR%\%QUARTO_BIN_DIR%\tools\deno run --unstable --allow-read --allow-write --allow-run --allow-env --allow-net --allow-ffi --importmap=import_map.json bld.ts %*
9+
..\%QUARTO_DIST_DIR%\%QUARTO_BIN_DIR%\tools\deno run --unstable --allow-read --allow-write --allow-run --allow-env --allow-net --allow-ffi --importmap=..\..\src\dev_import_map.json bld.ts %*
1010

1111
GOTO :eof
1212

0 commit comments

Comments
 (0)