Skip to content

Commit

Permalink
chore: Remove deprecated methods
Browse files Browse the repository at this point in the history
  • Loading branch information
nhaajt committed Dec 12, 2023
1 parent 18a188b commit 03be9b7
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 66 deletions.
10 changes: 0 additions & 10 deletions core/src/main/scala/weaponregex/model/mutation/TokenMutator.scala
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,6 @@ trait TokenMutator {
*/
val levels: Seq[Int]

@deprecated(
"This member is deprecated and will be removed in a later version. " +
"For now, this will return the same value as `name`." +
"Description is now generated for each mutant instead of the mutator.",
"v1.2.0"
)
/** A short description of the mutator
*/
def description: String = name

/** Generate the default description for the mutants of this mutator
* @param original
* The original token string being mutated
Expand Down
14 changes: 0 additions & 14 deletions core/src/main/scala/weaponregex/mutator/BuiltinMutators.scala
Original file line number Diff line number Diff line change
Expand Up @@ -66,18 +66,4 @@ object BuiltinMutators {
* Sequence of all the tokens mutators in that levels, if any
*/
def atLevels(mutationLevels: Seq[Int]): Seq[TokenMutator] = mutationLevels flatMap atLevel

@deprecated(
"This member is deprecated and will be removed in a later version. " +
"Use `BuiltinMutators.byLevel` instead.",
"v0.6.0"
)
lazy val levels: Map[Int, Seq[TokenMutator]] = byLevel

@deprecated(
"This member is deprecated and will be removed in a later version. " +
"Use `BuiltinMutators.atLevel` instead.",
"v0.6.0"
)
def level(mutationLevel: Int): Seq[TokenMutator] = atLevel(mutationLevel)
}
21 changes: 0 additions & 21 deletions core/src/main/scalajs/weaponregex/WeaponRegeXJS.scala
Original file line number Diff line number Diff line change
Expand Up @@ -44,25 +44,4 @@ object WeaponRegeXJS {
case Left(msg) => throw new RuntimeException(msg)
}
}

/** Mutate a regex pattern with the given options.
*
* @param pattern
* Input regex string
* @param options
* JavaScript object for Mutation options
* {{{
* {
* mutators: [Mutators to be used for mutation. If this is `null`, all built-in mutators will be used.],
* mutationLevels: [Target mutation levels. If this is `null`, the `mutators`, will not be filtered.],
* flavor: [Regex flavor. By the default, `ParerFlavorJS` will be used.]
* }
* }}}
* @return
* A JavaScript Array of [[weaponregex.model.mutation.Mutant]] if can be parsed, or throw an exception otherwise
*/
@deprecated("Use `mutate(pattern, flags, options)` instead. This will be removed in the future.", "0.7.x")
@JSExportTopLevel("mutate")
def mutate(pattern: String, options: MutationOptions = new MutationOptions): js.Array[MutantJS] =
mutate(pattern, js.undefined, options)
}
21 changes: 0 additions & 21 deletions index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ export type ParserFlavor = typeof ParserFlavorJS | typeof ParserFlavorJVM;
export interface TokenMutator {
name: string;
levels: number[];
description: string;
}

export interface MutationOptions {
Expand Down Expand Up @@ -56,26 +55,6 @@ export interface Mutant {
description: string;
}

/** Mutate a regex pattern with the given options.
*
* @param pattern
* Input regex string
* @param options
* JavaScript object for Mutation options
* {{{
* {
* mutators: [Mutators to be used for mutation. If this is `null`, all built-in mutators will be used.],
* mutationLevels: [Target mutation levels. If this is `null`, the `mutators`, will not be filtered.],
* flavor: [Regex flavor. By the default, `ParerFlavorJS` will be used.]
* }
* }}}
* @return
* A JavaScript Array of [[weaponregex.model.mutation.Mutant]] if can be parsed, or throw an exception otherwise
* @deprecated
* Use `mutate(pattern, flags, options)` instead. This will be removed in the future.". @since 0.7.x
*/
export function mutate(pattern: string, options: MutationOptions): Mutant[];

/** Mutate a regex pattern and flags with the given options.
*
* @param pattern
Expand Down

0 comments on commit 03be9b7

Please sign in to comment.