From a7d08fea1e5038e342fabc34c3e089f135db8e69 Mon Sep 17 00:00:00 2001 From: Barret Schloerke Date: Wed, 8 May 2024 09:49:02 -0400 Subject: [PATCH 1/3] If cli_path method exists, use it --- _extensions/quarto-ext/shinylive/shinylive.lua | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/_extensions/quarto-ext/shinylive/shinylive.lua b/_extensions/quarto-ext/shinylive/shinylive.lua index 881ab7b..6890a7a 100644 --- a/_extensions/quarto-ext/shinylive/shinylive.lua +++ b/_extensions/quarto-ext/shinylive/shinylive.lua @@ -1,7 +1,4 @@ -- Notes: --- * 2024/05/03 - Christophe: --- `quarto run` needs to be called using the same quarto CLI that called the extension. --- This is done by using `quarto.cli_path` from Quarto 1.5 Lua API. -- * 2023/10/04 - Barret: -- Always use `callShinyLive()` to call a shinylive extension. -- `callPythonShinyLive()` and `callRShinyLive()` should not be used directly. @@ -396,6 +393,16 @@ function getShinyliveBaseDeps(language) return deps end +-- Legacy quarto cli location +quarto_cli_path = "quarto" +if quarto.config ~= nil and quarto.config.cli_path ~= nil then + -- * 2024/05/03 - Christophe: + -- `quarto run` needs to be called using the same quarto CLI that called the extension. + -- This is done by using `quarto.config.cli_path()` from Quarto 1.5 Lua API. + -- https://github.com/quarto-dev/quarto-cli/pull/9576 + quarto_cli_path = quarto.config.cli_path() +end + return { { CodeBlock = function(el) @@ -418,8 +425,7 @@ return { -- Convert code block to JSON string in the same format as app.json. local parsedCodeblockJson = pandoc.pipe( - -- Use quarto binary that called this extension - quarto.config.cli_path(), + quarto_cli_path, { "run", codeblockScript, language }, el.text ) From b842fae36bd7ef8f0214aad1335e1d01a0d483e5 Mon Sep 17 00:00:00 2001 From: Barret Schloerke Date: Wed, 8 May 2024 09:49:22 -0400 Subject: [PATCH 2/3] Remove dev quarto version requirement --- _extensions/quarto-ext/shinylive/_extension.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_extensions/quarto-ext/shinylive/_extension.yml b/_extensions/quarto-ext/shinylive/_extension.yml index 182997a..6634416 100644 --- a/_extensions/quarto-ext/shinylive/_extension.yml +++ b/_extensions/quarto-ext/shinylive/_extension.yml @@ -2,7 +2,7 @@ name: shinylive title: Embedded Shinylive applications author: Winston Chang version: 0.2.0 -quarto-required: ">= 1.5.32" +quarto-required: ">= 1.2.198" contributes: filters: - shinylive.lua From 9fad068bb45273bd6814aa83766247d9c1eb84a3 Mon Sep 17 00:00:00 2001 From: Barret Schloerke Date: Wed, 8 May 2024 09:52:14 -0400 Subject: [PATCH 3/3] Test on all PRs --- .github/workflows/deploy.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 07bf5d1..e2c555e 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -4,7 +4,6 @@ on: push: branches: [main] pull_request: - branches: [main] jobs: build: