chore(deps): update dependency vitepress-sidebar to v1.40.0 - #62
Open
renovate[bot] wants to merge 1 commit into
Open
chore(deps): update dependency vitepress-sidebar to v1.40.0#62renovate[bot] wants to merge 1 commit into
renovate[bot] wants to merge 1 commit into
Conversation
Contributor
There was a problem hiding this comment.
Copilot wasn't able to review any files in this pull request.
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
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:
1.39.0→1.40.0Release Notes
jooy2/vitepress-sidebar (vitepress-sidebar)
v1.40.0Compare Source
gray-matterreturned nothing for a field, and never stopped at the closing delimiter, so akey: valueline written anywhere in the content was read as if it were frontmatter. A page that documents a frontmatter — anorder: 1inside a fenced code block, or anexclude: truein an example — was mis-sorted, given the wrong title, or dropped from the sidebar entirely. The block is now the only thing scanned, and the fallback still applies when the frontmatter is not valid YAML. A field that is present is also used when its value is falsy, soorder: 0andexclude: falsemean what they say instead of being treated as absent.sortMenusByFileDatePrefixnow sorts. It read the date prefix withsplitinstead ofmatch, which returns the part before the date and is therefore always the empty string, so every comparison wasNaNand the items were left in the order the directory happened to be read in. That order is the one the file system returns, so it only looked like a date order on a file system that returns its entries sorted, and was arbitrary elsewhere. A menu item that does not begin with a date carries nothing to sort by, and is now kept together with the other such items before the dated ones, instead of leaving the whole level unordered.documentRootPathandscanStartPathare now stripped from a link as the text they are, instead of as a regular expression. A., a(or a+in the name of a folder was read as a regular expression character, so a document root such asdocs (v2)was left in every link and every menu item pointed at a page that does not exist. AscanStartPathis also read the same way whether or not it is written with a surrounding slash.node_modulesor.vitepressonly when that is its name. The check matched those names anywhere in the absolute path of an entry, so a project that merely sits somewhere below a directory whose name holds one of them, such as~/my-node_modules-docs, produced an empty sidebar with nothing to explain it.prefixSeparatorwritten as a regular expression no longer prints itself inside a menu title. A title holding more than one match was split and then re-joined with the regular expression, so a name such as1.1.1-four-filebecame11/\./1-four-file. The first match is now removed and nothing is re-joined, which is what the documentation describes. A match that does not open the title is also no longer moved to the front of it.removePrefixAfterOrderingcan be used on its own again. It reported'prefixSeparator' should not use empty stringunless aprefixSeparatorwas written down as well, because the check ran before the documented default of'.'was applied. Only a separator that is written down and empty is an error now.sortMenusByFileCreateDatenow reads the time a file was created instead ofctime, which is the last time the metadata of a file changed. Achmod, a rename or anything else that touched a file moved it to the end of the menu without its content having changed. A file system that records no creation time still falls back toctime, which is the closest thing it has. Both this option andsortMenusByFileModifyDatealso keep the time in milliseconds now, so two files written in the same second are ordered by which of them came first instead of being left in the order the directory was read in.useTitleFromFileHeadingno longer reads a#written inside a fenced code block as the heading of a page. A shell snippet whose first line is a comment, such as# Install the package, became the title of any page that showed one before its own heading. A block is only closed by a fence of the same character and at least the same length, so a block that holds another one is read as the one block it is.withSidebarno longer writes to the VitePress configuration or to the sidebar options it is given. It replacedthemeConfig.sidebarwith an empty object, setdebugPrinttofalse, and appended its dev-server plugin to the veryvite.pluginsarray of the caller. VitePress evaluates its configuration again on every restart of the dev server, so that last one added the plugin once more each time. A configuration or an options object that is frozen, such as one written withas const, also no longer fails withCannot assign to read only property.sortMenusByFileDatePrefixandsortMenusByFileCreateDatefell back to it whenever two items compared equal. The comparison is by code unit rather than by locale, so the same project always builds the same sidebar. The documentation already described this order; only now is it the one that is actually used.rootGroupLinkorrootGroupCollapsedalone is now namedTable of Contents, the default the documentation describes, instead of being left with no name at all. The default is only used where a root group is actually made, so a sidebar still gets one only when one of therootGroupoptions asks for it.sortFolderTonow reads a folder as a folder even when it holds no items. It told the two apart by theitemsof a menu item, which a folder kept byincludeEmptyFolder, linked throughuseFolderLinkFromIndexFile, or emptied byexcludeByFolderDepthdoes not have, so such a folder was moved to the end with the files.resolvePathwritten twice by mistake silently dropped a whole sidebar.followSymlinksno longer fails the build on a symbolic link that leads back into the scan. A link pointing at a directory above itself was followed until the operating system stopped it withELOOP, which ended the build. Every directory on the way to the current one is now remembered by the path it really is, so a link that closes the circle is left out instead. A link pointing at nothing is skipped as well, rather than stopping the build withENOENT.documentRootPathorscanStartPaththat does not exist is now reported by name, together with the working directory it was resolved from. The build used to stop at a bareENOENT: scandir, which named neither the option that was wrong nor what it was resolved against../types.ts. Three source files imported their types with a.tsextension, which survives into the declaration file, andlibis not published, so those files named something the package does not ship. Nothing reachable from the entry point pointed at one of them, so it broke no one yet; a test now keeps it that way.statSyncat a time,manualSortFileNameByPriorityis read from a lookup instead of being searched per entry, the two collators are built once instead of once per folder, and looking for a dynamic route template stops at the first one found. Each of these is a small saving on its own; together they take a little off every build, and rather more off a deep tree, where the repeated walk cost the most.pathsloader is now given two minutes to resolve its routes. It is project code run in a child process, and one that never returned held the whole build open. The sidebar is then built without the generated pages, as it already is for a loader that fails.npm run buildno longer reformats the sources it is about to build. It ranprettier --writefirst, which meant thatpreparerewrote the working tree on every install, and that continuous integration silently repaired a formatting problem instead of reporting it. Formatting is checked by the newformat:checkscript, which runs in continuous integration together withlint, neither of which was run there before.useTitleFromFileHeading,useTitleFromFrontmatter,frontmatterTitleFieldName,excludeFilesByFrontmatterFieldName,sortMenusByFrontmatterOrderandsortMenusByFrontmatterDateused to read and parse the same file again each, up to four times over. On a 2,000 page project the combination of those options went from about 300 ms to about 100 ms, andfrontmatterTitleFieldNameno longer reads every file twice when the field it names is absent.Configuration
📅 Schedule: (UTC)
🚦 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.