fix(build): exclude client-v2 directory from deleteServerFiles#9446
Open
algojogacor wants to merge 1 commit into
Open
fix(build): exclude client-v2 directory from deleteServerFiles#9446algojogacor wants to merge 1 commit into
algojogacor wants to merge 1 commit into
Conversation
The deleteServerFiles function uses fast-glob to enumerate build output directories for cleanup. The '!client' exclusion pattern prevents the client directory from being deleted, but '!client-v2' was missing. On all platforms, the client-v2 build artifact was being silently deleted after compilation, causing runtime 404 errors for plugins that depend on the client-v2 lane. Fixes nocobase#9316
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 is a ...
Motivation
The
deleteServerFilesfunction silently deletes theclient-v2build artifact on all platforms, causing runtime 404 errors for plugins that depend on theclient-v2lane.Description
The
dirsglob pattern indeleteServerFilesalready excludesclientandnode_modulesdirectories from cleanup, but was missingclient-v2. This one-line fix adds'!client-v2'to the glob exclusion list, matching the existing pattern forclient.Root cause: When
deleteServerFilesruns afterbuildPluginClient('client-v2')completes,fast-globenumerates thedist/directory and theclient-v2directory (not excluded) gets passed tofs.removeSync().Related issues
Fixes #9316
Changelog
deleteServerFilesto preserveclient-v2build output by adding it to the glob exclusion list.Checklists