diff --git a/CHANGELOG.md b/CHANGELOG.md index a1c627e..1eade2c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ ## Unreleased +### Refactoring + +- build: Declare the vendored Lua modules in `_extensions/code-window/_dependencies.yml` and move them to `_extensions/code-window/_vendor/`, so each one names the release it came from and can be checked against it. + ## 1.4.0 (2026-09-01) ### New Features diff --git a/_extensions/code-window/_dependencies.yml b/_extensions/code-window/_dependencies.yml new file mode 100644 index 0000000..c1090a7 --- /dev/null +++ b/_extensions/code-window/_dependencies.yml @@ -0,0 +1,23 @@ +schema: 1 +sources: + quarto-lua-modules: + origin: "https://github.com/mcanouil/quarto-lua-modules" + fetch: "{origin}/releases/download/{version}/{file}" + version: "2.0.0" + licence: MIT + files: + html.lua: + sha256: "8b612059099418d8d55c5a25c5362d3549c94e62febc73f659bc82ba06c2f067" + runtime: any + logging.lua: + sha256: "a69a69ce7cf41b02914889074eb7445cff72003e6dd8b55b6f47d32d09848ccd" + runtime: any + metadata.lua: + sha256: "3f82a6208c337ae9a2e4a0a6f294f894cc506e05aedfb1c13167e55b52b8c457" + runtime: any + pandoc-helpers.lua: + sha256: "492abe5dda9f2bd8569c716d747cdbb550944a04920eec6fb600eeaff4ca58b3" + runtime: any + string.lua: + sha256: "32b2c16f50ecf7e752441ed80bd7fbcee11af83c4ed1e9242cc745d200bc73e0" + runtime: any diff --git a/_extensions/code-window/_vendor/quarto-lua-modules/LICENSE b/_extensions/code-window/_vendor/quarto-lua-modules/LICENSE new file mode 100644 index 0000000..4b53bb8 --- /dev/null +++ b/_extensions/code-window/_vendor/quarto-lua-modules/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2026 Mickaël Canouil + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/_extensions/code-window/_modules/html.lua b/_extensions/code-window/_vendor/quarto-lua-modules/html.lua similarity index 99% rename from _extensions/code-window/_modules/html.lua rename to _extensions/code-window/_vendor/quarto-lua-modules/html.lua index 8212cc5..9c76ecc 100644 --- a/_extensions/code-window/_modules/html.lua +++ b/_extensions/code-window/_vendor/quarto-lua-modules/html.lua @@ -3,7 +3,7 @@ --- @license MIT --- @copyright 2026 Mickaël Canouil --- @author Mickaël Canouil ---- @version 1.0.0 +--- @version 2.0.0 local M = {} diff --git a/_extensions/code-window/_modules/logging.lua b/_extensions/code-window/_vendor/quarto-lua-modules/logging.lua similarity index 99% rename from _extensions/code-window/_modules/logging.lua rename to _extensions/code-window/_vendor/quarto-lua-modules/logging.lua index a538809..ebcc3a7 100644 --- a/_extensions/code-window/_modules/logging.lua +++ b/_extensions/code-window/_vendor/quarto-lua-modules/logging.lua @@ -3,7 +3,7 @@ --- @license MIT --- @copyright 2026 Mickaël Canouil --- @author Mickaël Canouil ---- @version 1.0.0 +--- @version 2.0.0 local M = {} diff --git a/_extensions/code-window/_modules/metadata.lua b/_extensions/code-window/_vendor/quarto-lua-modules/metadata.lua similarity index 99% rename from _extensions/code-window/_modules/metadata.lua rename to _extensions/code-window/_vendor/quarto-lua-modules/metadata.lua index 2e1b6d5..77ed7d4 100644 --- a/_extensions/code-window/_modules/metadata.lua +++ b/_extensions/code-window/_vendor/quarto-lua-modules/metadata.lua @@ -3,7 +3,7 @@ --- @license MIT --- @copyright 2026 Mickaël Canouil --- @author Mickaël Canouil ---- @version 1.0.0 +--- @version 2.0.0 local M = {} diff --git a/_extensions/code-window/_modules/pandoc-helpers.lua b/_extensions/code-window/_vendor/quarto-lua-modules/pandoc-helpers.lua similarity index 99% rename from _extensions/code-window/_modules/pandoc-helpers.lua rename to _extensions/code-window/_vendor/quarto-lua-modules/pandoc-helpers.lua index aad35cf..4ce0732 100644 --- a/_extensions/code-window/_modules/pandoc-helpers.lua +++ b/_extensions/code-window/_vendor/quarto-lua-modules/pandoc-helpers.lua @@ -3,7 +3,7 @@ --- @license MIT --- @copyright 2026 Mickaël Canouil --- @author Mickaël Canouil ---- @version 1.0.0 +--- @version 2.0.0 local M = {} diff --git a/_extensions/code-window/_modules/string.lua b/_extensions/code-window/_vendor/quarto-lua-modules/string.lua similarity index 99% rename from _extensions/code-window/_modules/string.lua rename to _extensions/code-window/_vendor/quarto-lua-modules/string.lua index 435c310..eb233fe 100644 --- a/_extensions/code-window/_modules/string.lua +++ b/_extensions/code-window/_vendor/quarto-lua-modules/string.lua @@ -3,7 +3,7 @@ --- @license MIT --- @copyright 2026 Mickaël Canouil --- @author Mickaël Canouil ---- @version 1.1.0 +--- @version 2.0.0 local M = {} diff --git a/_extensions/code-window/code-window.lua b/_extensions/code-window/code-window.lua index 1523271..b7a66a0 100644 --- a/_extensions/code-window/code-window.lua +++ b/_extensions/code-window/code-window.lua @@ -12,11 +12,11 @@ -- ============================================================================ local EXTENSION_NAME = 'code-window' -local str = require(quarto.utils.resolve_path('_modules/string.lua'):gsub('%.lua$', '')) -local log = require(quarto.utils.resolve_path('_modules/logging.lua'):gsub('%.lua$', '')) -local meta_mod = require(quarto.utils.resolve_path('_modules/metadata.lua'):gsub('%.lua$', '')) -local pdoc = require(quarto.utils.resolve_path('_modules/pandoc-helpers.lua'):gsub('%.lua$', '')) -local html_mod = require(quarto.utils.resolve_path('_modules/html.lua'):gsub('%.lua$', '')) +local str = require(quarto.utils.resolve_path('_vendor/quarto-lua-modules/string.lua'):gsub('%.lua$', '')) +local log = require(quarto.utils.resolve_path('_vendor/quarto-lua-modules/logging.lua'):gsub('%.lua$', '')) +local meta_mod = require(quarto.utils.resolve_path('_vendor/quarto-lua-modules/metadata.lua'):gsub('%.lua$', '')) +local pdoc = require(quarto.utils.resolve_path('_vendor/quarto-lua-modules/pandoc-helpers.lua'):gsub('%.lua$', '')) +local html_mod = require(quarto.utils.resolve_path('_vendor/quarto-lua-modules/html.lua'):gsub('%.lua$', '')) local cell_output = require(quarto.utils.resolve_path('_modules/cell-output.lua'):gsub('%.lua$', '')) local code_annotations = nil diff --git a/_extensions/code-window/main.lua b/_extensions/code-window/main.lua index 25b61da..20d3c52 100644 --- a/_extensions/code-window/main.lua +++ b/_extensions/code-window/main.lua @@ -6,7 +6,7 @@ --- Loads all submodules, wires dependencies, and assembles the filter list. local EXTENSION_NAME = 'code-window' -local log = require(quarto.utils.resolve_path('_modules/logging.lua'):gsub('%.lua$', '')) +local log = require(quarto.utils.resolve_path('_vendor/quarto-lua-modules/logging.lua'):gsub('%.lua$', '')) -- ============================================================================ -- LOAD SUBMODULES diff --git a/docs/_scripts/sync-extension.sh b/docs/_scripts/sync-extension.sh index 398293a..b62d544 100755 --- a/docs/_scripts/sync-extension.sh +++ b/docs/_scripts/sync-extension.sh @@ -3,9 +3,9 @@ # Documentation Extension Sync # Mirrors the repository's own extension into the documentation project. # -# @license %%license%% -# @copyright %%year%% %%author%% -# @author %%author%% +# @license MIT License +# @copyright 2026 Mickaël Canouil +# @author Mickaël Canouil # # The website demonstrates the extension it documents, so the extension has to # be resolvable from docs/. Quarto builds its extension registry while reading