mirror of
https://github.com/Equicord/Equicord.git
synced 2025-06-18 19:07:08 -04:00
WebpackPatcher: Improve getBuildNumber; Allow reporter to check for buildNumber
Allows replacements to define noWarn too
This commit is contained in:
parent
dd714ff3c2
commit
3e524f9d92
2 changed files with 40 additions and 34 deletions
|
@ -41,7 +41,12 @@ export interface PatchReplacement {
|
|||
match: string | RegExp;
|
||||
/** The replacement string or function which returns the string for the patch replacement */
|
||||
replace: string | ReplaceFn;
|
||||
/** A function which returns whether this patch replacement should be applied */
|
||||
/** Do not warn if this replacement did no changes */
|
||||
noWarn?: boolean;
|
||||
/**
|
||||
* A function which returns whether this patch replacement should be applied.
|
||||
* This is ran before patches are registered, so if this returns false, the patch will never be registered.
|
||||
*/
|
||||
predicate?(): boolean;
|
||||
/** The minimum build number for this patch to be applied */
|
||||
fromBuild?: number;
|
||||
|
@ -61,7 +66,10 @@ export interface Patch {
|
|||
noWarn?: boolean;
|
||||
/** Only apply this set of replacements if all of them succeed. Use this if your replacements depend on each other */
|
||||
group?: boolean;
|
||||
/** A function which returns whether this patch should be applied */
|
||||
/**
|
||||
* A function which returns whether this patch replacement should be applied.
|
||||
* This is ran before patches are registered, so if this returns false, the patch will never be registered.
|
||||
*/
|
||||
predicate?(): boolean;
|
||||
/** The minimum build number for this patch to be applied */
|
||||
fromBuild?: number;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue