diff --git a/CHANGELOG.md b/CHANGELOG.md index 2abb9ea..9183d25 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,10 @@ - docs: Serve the extension's social card as the Open Graph image, so a shared link shows the card rather than the first image on the page. (#55) +### Refactoring + +- build: Update the vendored Lua modules to 2.3.0, which includes the `schema-check` fix for an extension whose entry points are in a subdirectory. A module no longer carries a version line in its header, so its checksum changes only when its code changes. (#56) + ## 1.8.1 (2026-09-07) ### Bug Fixes diff --git a/_extensions/external/_dependencies.yml b/_extensions/external/_dependencies.yml index d786491..5e9a658 100644 --- a/_extensions/external/_dependencies.yml +++ b/_extensions/external/_dependencies.yml @@ -3,23 +3,23 @@ sources: quarto-lua-modules: origin: "https://github.com/mcanouil/quarto-lua-modules" fetch: "{origin}/releases/download/{version}/{file}" - version: "2.1.0" + version: "2.3.0" licence: MIT files: content-extraction.lua: - sha256: "a0233703f317f5ebd68b9a88bf3f91196b4382bcecc08bfe600a636dc39369b6" + sha256: "4185db1cd875076fa615d2f497d2911600a518728538fb7e7ba0e81976adead6" runtime: any html.lua: - sha256: "25fac7728686f7669d22fa10bf783ab16a557acd238387266809144b06f4c78b" + sha256: "a7aae5e69c4effce399b85e90f3ee3261d0f84a5ac2f6c7ddeb1e358ba22ddc8" runtime: any logging.lua: - sha256: "0c3ded6020d3739c91bb6a492328751b284d1ada5763a1b8ca6fc5536ac01c95" + sha256: "5d99ceb89c813fbe4491310e42b4a4cff62e11dda42f01b4f61f969aa58e0706" runtime: any schema-check.lua: - sha256: "2fda875db97479f69c2c4d49f3073ac6ec458cb502c08c380918fdfadcd1e799" + sha256: "7c4dc34f31b85ff7bc4e2511f73e2301377e964e57ea5374ad97e7817a10af4b" runtime: any string.lua: - sha256: "a80255adaf7b7f2588aecb127030d950379479a2a1b266efc5b943364ac96cf4" + sha256: "7801d2f217e803951313ef86f1f899cb6350a44cbb468b2d7c28dd6911a0fadc" runtime: any quarto-wizard: origin: "https://github.com/mcanouil/quarto-wizard" diff --git a/_extensions/external/_vendor/quarto-lua-modules/content-extraction.lua b/_extensions/external/_vendor/quarto-lua-modules/content-extraction.lua index f57946f..fd7b55b 100644 --- a/_extensions/external/_vendor/quarto-lua-modules/content-extraction.lua +++ b/_extensions/external/_vendor/quarto-lua-modules/content-extraction.lua @@ -3,7 +3,6 @@ --- @license MIT --- @copyright 2026 Mickaël Canouil --- @author Mickaël Canouil ---- @version 2.1.0 local M = {} diff --git a/_extensions/external/_vendor/quarto-lua-modules/html.lua b/_extensions/external/_vendor/quarto-lua-modules/html.lua index 0175f7e..ecb4870 100644 --- a/_extensions/external/_vendor/quarto-lua-modules/html.lua +++ b/_extensions/external/_vendor/quarto-lua-modules/html.lua @@ -3,7 +3,6 @@ --- @license MIT --- @copyright 2026 Mickaël Canouil --- @author Mickaël Canouil ---- @version 2.1.0 local M = {} diff --git a/_extensions/external/_vendor/quarto-lua-modules/logging.lua b/_extensions/external/_vendor/quarto-lua-modules/logging.lua index 155d425..81fba55 100644 --- a/_extensions/external/_vendor/quarto-lua-modules/logging.lua +++ b/_extensions/external/_vendor/quarto-lua-modules/logging.lua @@ -3,7 +3,6 @@ --- @license MIT --- @copyright 2026 Mickaël Canouil --- @author Mickaël Canouil ---- @version 2.1.0 local M = {} diff --git a/_extensions/external/_vendor/quarto-lua-modules/schema-check.lua b/_extensions/external/_vendor/quarto-lua-modules/schema-check.lua index 4ea93f7..e6204c8 100644 --- a/_extensions/external/_vendor/quarto-lua-modules/schema-check.lua +++ b/_extensions/external/_vendor/quarto-lua-modules/schema-check.lua @@ -3,11 +3,14 @@ --- @license MIT --- @copyright 2026 Mickaël Canouil --- @author Mickaël Canouil ---- @version 2.1.0 --- ---- Holds the wiring that every extension would otherwise copy: read ---- `_schema.yml` once, check the document configuration against it, check one ---- shortcode call against it, and report what it finds through `logging`. +--- Holds the wiring that every extension would otherwise copy: read the schema +--- once, check the document configuration against it, check one shortcode call +--- against it, and report what it finds through `logging`. +--- +--- The schema is `_schema.yml` beside the entry point that runs. An extension +--- whose entry points sit in a subdirectory names its own path instead, with +--- `'../_schema.yml'` for one level down. --- --- The validator arrives as an argument rather than through `require`. A --- vendored copy of this module then knows nothing about where the validator @@ -310,15 +313,23 @@ end -- PUBLIC API -- ============================================================================ ---- Build a checker for one extension, reading `_schema.yml` once. +--- Build a checker for one extension, reading its schema once. --- A schema that cannot be read is reported, and the checker it returns does --- nothing: `options` gives an empty table and `call` gives no message. +--- +--- The path is resolved with `quarto.utils.resolve_path`, which answers +--- relative to the entry point that is running rather than to the extension +--- directory. An entry point in a subdirectory therefore has to say where the +--- schema is, and the checker it builds belongs at file scope, so that the +--- schema is read once for the render and not once for each call. --- @param validator table The validator, with `load_schema`, `validate`, --- `validate_shortcode` and `extract_meta_options` --- @param extension_name string The extension name every message carries +--- @param schema_path string|nil The schema to read, relative to the entry +--- point that is running. Defaults to `_schema.yml`. --- @return Checker ---- @usage local checker = M.new(validator, 'iconify') -function M.new(validator, extension_name) +--- @usage local checker = M.new(validator, 'iconify', '../_schema.yml') +function M.new(validator, extension_name, schema_path) --- @type Checker local checker = setmetatable({ validator = validator, @@ -329,7 +340,11 @@ function M.new(validator, extension_name) options_checked = false, }, Checker) - local loaded, err = validator.load_schema(quarto.utils.resolve_path('_schema.yml')) + -- The default is chosen here rather than in the signature, so a caller that + -- passes two arguments reads the same file it read before this argument + -- existed. + local loaded, err = validator.load_schema( + quarto.utils.resolve_path(schema_path or '_schema.yml')) if err then checker:_report('schema', err) else diff --git a/_extensions/external/_vendor/quarto-lua-modules/string.lua b/_extensions/external/_vendor/quarto-lua-modules/string.lua index e3bacd8..e551066 100644 --- a/_extensions/external/_vendor/quarto-lua-modules/string.lua +++ b/_extensions/external/_vendor/quarto-lua-modules/string.lua @@ -3,7 +3,6 @@ --- @license MIT --- @copyright 2026 Mickaël Canouil --- @author Mickaël Canouil ---- @version 2.1.0 local M = {}