Repository navigation
chore(deps): update dependency asciidoctor-kroki to v2 - #15
Open
renovate[bot] wants to merge 1 commit into
Open
renovate[bot] wants to merge 1 commit into
renovate[bot] wants to merge 1 commit into
Conversation
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
^0.18.1→^2.0.0Release Notes
asciidoctor/asciidoctor-kroki (asciidoctor-kroki)
v2.0.0Compare Source
It includes every change from the
2.0.0-rc.*prereleases. See What's New in 2.0 to upgrade from version 1.0.With JavaScript, this version requires Asciidoctor.js 4 (
@asciidoctor/core>=4.0.0 <5.0.0). It is not yet compatible with Antora, which still bundles an older Asciidoctor.js; keep using thelatest-0release line (currently 0.18.1) with Antora.Added
lini), which requires Kroki 0.34.0 or later.kroki-fetch-diagram. Since there is no disk to write to, diagrams are always embedded as data URIs, with or withoutdata-uriorkroki-data-uri. Previously, the diagram was skipped and replaced by akroki-errorblock.kroki-data-uri(and standarddata-uri) attribute to embed fetched diagrams as base64 data URIs instead of writing them to disk, matching the JavaScript/Node.js extension.pngtosvgfor all diagram types Kroki can only render as SVG (bpmn,bytefield,d2,dbml,excalidraw,goat,lini,nomnoml,pikchr,svgbob,wavedrom) whenkroki-default-formatis set topng. The JavaScript/Node.js extension had no such redirect, and the Ruby gem only applied it togoat,nomnoml,svgbobandwavedrom.!includedirectives (local, remote, and recursive — including!include_many,!include_once,!includeurl, and!includesub) before submitting the diagram to the Kroki server, matching the JavaScript/Node.js extension's preprocessor. Thekroki-plantuml-include-pathsattribute andkroki-plantuml-includeforc4plantumldiagrams are now supported in the Ruby gem as well (#259).data.urland link a PlantUML diagram to another page using Antora resource IDs (#376, #291).kroki-cacheandkroki-cache-dirattributes), available in both the JavaScript/Node.js extension and the Ruby gem. Diagrams with a stable, user-defined name now skip the download when their content hasn't changed, and the cache survives builds that clear the output directory, such as Antora (#90, #113).Changed
!include,kroki-plantuml-includeor Vega-Litedata.urlin a diagram written in the document is resolved from the document's base directory, likeinclude::. It was resolved from the current working directory, so the result depended on where the conversion was started. An!includethat does not exist in the base directory is still looked up in the current working directory (Ruby and JavaScript/Node.js, exceptkroki-plantuml-includein Ruby, which already used the base directory; the Ruby gem does not preprocess Vega-Lite).subsattribute is applied before the!includedirectives are resolved, like the JavaScript/Node.js extension.!include {dir}/file.pumlis now resolved, and the content of an included file is no longer substituted.include::directive. Insafeandservermodes, a PlantUML!include,kroki-plantuml-include,kroki-plantuml-include-paths, a Structurizr!includeand a Vega-Litedata.urlcan no longer read a local file outside of the base directory. A URL is only read ifallow-uri-readis set. Insecuremode, a block macro no longer reads a URL target, even ifallow-uri-readis set. A warning is logged, and the!includedirective is left for the Kroki server (a Vega-Lite diagram that references a local file becomes an error block). This does not apply in the browser or with a custom virtual file system that providesread(Ruby and JavaScript/Node.js).registeras a named export instead of a default export with aregistermethod. UpdateasciidoctorKroki.register(registry)toimport { register } from 'asciidoctor-kroki'; register(registry).src/index.jsand a top-leveltypes/directory, matching the layout used byasciidoctor.js. Consumers using the package's documentedexportsfield are unaffected; only direct imports of internal file paths need updating.existsandaddmethods are now expected to be asynchronous (return a promise), matchingread. A synchronous implementation still works (the extension always awaits the result), but update any implementation relying on synchronous completion.kroki-errorparagraph that keeps the title and the role, and logs a warning instead of an error, like the JavaScript/Node.js extension. Both now displayUnresolved block macro - plantuml::target[], with the target written in the document instead of its absolute path (Ruby and JavaScript/Node.js).Removed
Fixed
kroki-plantuml-includeaccepts a URL, as documented, read only ifallow-uri-readis set, like the JavaScript/Node.js extension. The URL was handled as a local path.formatattribute (e.g.[plantuml,format=]) or an emptykroki-default-formatattribute is ignored, like the JavaScript/Node.js extension, so the diagram uses the default format. The request URL had no format (e.g.https://kroki.io/plantuml//...).kroki-plantuml-includethat references a missing file or a directory: a warning is logged and the attribute is ignored. The Ruby extension failed withEISDIRon a directory, and the JavaScript/Node.js extension left the!includedirective in the diagram source without a warning (Ruby and JavaScript/Node.js).role(e.g.[plantuml,role=]) no longer adds akroki-format-svgclass, like the JavaScript/Node.js extension.kroki-server-urlattribute falls back tohttps://kroki.io(the image URLs were relative), and an emptykroki-plantuml-includeattribute is ignored (the conversion of PlantUML diagrams failed withEISDIR), like the JavaScript/Node.js extension.format,kroki-default-format,kroki-server-url,kroki-plantuml-include,kroki-plantuml-include-pathsorkroki-cache-dirattribute (e.g.format=" "), or one set totruethrough the API, is treated as unset. Surrounding whitespace is removed from their values (Ruby and JavaScript/Node.js).kroki-errorblock that replaces it when the diagram cannot be converted (e.g., the Kroki server is unreachable), like the JavaScript/Node.js extension. The title was dropped.http://orhttps://URL as target (e.g.plantuml::https://example.org/hello.puml[]): the URL is no longer turned into a local path, so the diagram source is downloaded as documented. Likeinclude::, the URL is only read whenallow-uri-readis set; otherwise, the macro is replaced by a link (Ruby and JavaScript/Node.js).kroki-server-urlare removed when building the request URLs and the cache key, so thathttps://my.domain.org/kroki/no longer produceshttps://my.domain.org/kroki//plantuml/svg/.... The Ruby extension already removed them from GET URLs, but not from POST URLs (kroki-http-methodset topost, oradaptivewhen the URI exceedskroki-max-uri-length); the JavaScript extension removed them nowhere (Ruby and JavaScript/Node.js).data-uriandkroki-data-urioutput whenkroki-fetch-diagramis enabled, avoiding repeated downloads of unchanged embedded images while preserving cache invalidation, disable, and refresh behavior. Embedded images are therefore now written to the cache directory; setkroki-cachetofalseto opt out.separation=falseoption used by asciidoctor-diagram into Kroki'sno-separationflag, so that adjacent boxes keep touching when migrating from asciidoctor-diagram. The unsupportedseparationoption is no longer sent to Kroki, and an explicitno-separationoption takes precedence.kroki-error-styled block showing the raw diagram source, matching the JavaScript/Node.js extension. Possibly breaking: a custom:http_clientnow receives an additionalexpected_content_typeargument onget/post.kroki-http-methodisgetand the diagram URI exceedskroki-max-uri-length, and fall back to the 4000 default instead of silently treating an invalidkroki-max-uri-lengthvalue as0. Both already matched the JavaScript/Node.js extension's intent but weren't implemented.inlineoption's fallback with the JavaScript/Node.js extension by resolving to a data URI whenallow-uri-readis not set. This stays inert until a released Asciidoctor gem picks up the fix for asciidoctor/asciidoctor#3791, merged upstream (already effective in the JavaScript/Node.js extension against Asciidoctor.js 4.0.2+).inlineoption withoutallow-uri-readnow actually embeds the diagram instead of a blank placeholder, provided Asciidoctor.js 4.0.2+ is used — that version decodes adata:URI image target directly instead of refusing to read it withoutallow-uri-read(asciidoctor/asciidoctor#3791). No code change was needed; the test suite's@asciidoctor/coredependency is bumped to 4.0.8 to cover it.registeron theExtensionsnamespace directly instead of on a registry instance.ReferenceError: Buffer is not definedwhen building adata:URI diagram in a real browser.imagesoutdirdiffers fromimagesdir, by setting animagesdiroverride on the generated image node instead of relying on the document-wide attribute (#373). Effective now in the JavaScript/Node.js extension (Asciidoctor.js 4.0+); the Ruby gem carries the same fix but it stays inert until Asciidoctor Ruby ships node-levelimagesdirsupport (merged upstream, not yet released).Security
safeandservermodes using theimagesoutdir,imagesdir,outdirorkroki-cache-dirattributes: a warning is logged, and the diagram is embedded as a data URI (or the default cache directory is used). Values set from the API or the CLI are not affected, nor is a custom virtual file system that providesadd(Ruby and JavaScript/Node.js).[plantuml,../../name]) can no longer write the file generated bykroki-fetch-diagramoutside of the output directory insafeandservermodes: a warning is logged, and a content-addressed name is used. A format with a path separator is rejected in all safe modes, as it is also part of the name of the cache entry (Ruby and JavaScript/Node.js).kroki-plantuml-includecan no longer read a file outside of the base directory insafeandservermodes, like the Ruby extension.httpoption ofregister(). Previously, requests had no timeout.v1.0.1Compare Source
Added
tsc --emitDeclarationOnlyintobuild/types). The package now declares atypesentry point so TypeScript consumers get typedregister,KrokiContextandVfsAPIs.v1.0.0Compare Source
First stable release. It includes every change from the
1.0.0-beta.*prereleases.This version requires Asciidoctor.js 4.0 (
@asciidoctor/core>=4.0.0 <5.0.0).It is not yet compatible with Antora, which still bundles an older Asciidoctor.js; keep using the
latest-0release line (currently 0.18.1) with Antora.See the installation guide.
Configuration
📅 Schedule: (UTC)
* 0-3 * * *)🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.