fix: dependency updates compatibility & code refactoring#59
Merged
this-is-tobi merged 4 commits intomainfrom Mar 11, 2026
Merged
fix: dependency updates compatibility & code refactoring#59this-is-tobi merged 4 commits intomainfrom
this-is-tobi merged 4 commits intomainfrom
Conversation
Contributor
|
🤖 Hey ! The security scan report for the current pull request is available here. |
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.
Description
This PR addresses several issues introduced by dependency updates and includes a minor code refactoring:
CI not failing on VitePress build errors — the build command was catching errors and logging them but exiting with code
0, so dead links and other VitePress build failures were silently swallowed in CI/CD pipelines. Addedprocess.exit(1)in the catch block.Lint errors after
@antfu/eslint-configupdate — the newe18e/prefer-static-regexrule requires regex literals to be declared at module scope rather than inline. Moved all inline regex literals to module-scope constants acrosssrc/utils/regex.ts,src/utils/functions.ts,public/templates/theme/index.ts, andvite.config.ts.Test failures after
vitestv4 update — vitest v4 changed hownew mockFn()works: it now callsnew implementation()internally, which fails for arrow functions. UpdatedOctokitconstructor mocks ingit.spec.tsto use regular function expressions. Also fixed a pre-existing bug wherewriteFileSyncwas called with a spread string ([...str1, ...str2]), which produced character arrays instead of concatenated strings.Regex centralisation refactoring — moved all regex constants into
src/utils/regex.ts(pure constants, no fs logic) and movedreplaceRelativePath/replaceReadmePathfunctions intosrc/utils/functions.tsto better separate concerns.Type of change
How Has This Been Tested?
All existing unit tests were updated to reflect the changes and pass locally.
Test Configuration:
Checklist: