Skip to main content

recheck v4.4.0

· 2 min read

Here, we announce the new release of recheck v4.4.0.

You could see the complete CHANGELOG for detailed informations.

Changes

Allow all parameters to ESLint plugin options

Now, the ESLint plugin accepts all parameters.

It is useful for detailed behavior of the checker. For instance, when the system is busy, the fuzz checker reports a false positive by its timeout (See #447, thanks @falsandtru). We can prevent this by specifying attackTimeout to null (disabling timeout on the attack phase).

Fixes

Fix zero-width assertion in automaton checker

In the past, next character kinds are omitted after refining a transition, so it equates two states which should be distinguish. This fix makes it to include next character kind in state.

Now, we can check /^.+?aa[^@]@/ correctly.

Correct to increase steps on back-reference

In the past, since the back-reference increases step at one, the checker may estimate a lower complexity than actual. The step should be increased by the length of the read string, and has been corrected as such.

Now, we can check /^(.+)\1$/ correctly.

P.S.

We apologize you to delay for release the next major version. I have a few time to develop recheck recently, but we are preparing a big patch for the next major version. Please look forward it!

Thank you for your interesting!

recheck v4.3.0

· 3 min read

Here, we announce the new release of recheck v4.3.0.

It is a small release to go forward to a milestone. However, it has some important changes and improvements. We will describe them.

You could see the complete CHANGELOG for detailed informations.

New Features

worker backend for NPM package

The recheck NPM package now contains worker backend. It is pure JavaScript (Scala.js build) backend with worker_threads (for Node.js) or Web Workers API (for browsers). In other words, you can use recheck in asynchronous on JavaScript without any external commands depending on the settings. This should allow recheck to be used in many more environments.

You can use worker backend explicitly by the following way:

$ RECHECK_BACKEND=worker node
> await require('recheck').check('^(a|a)*$', '')

Especially, it is very comfortable to use in a browser. The code to run on workers is bundled inline, so no additional configuration is required to use.

However, Scala.js build is bundled twice for usual environment and workers. As a result, a file size after building may be larger than before. In order to avoid this, we consider it is effective to use conditional exports and provide a build of the ES module version that allows tree shaking. This will be addressed in the next version.

Changes

Rename hybrid to auto

Initially, we thought the name hybrid would be appropriate, since it uses both fuzzing and automata theory based algorithms. However, this name may have given a wrong impression, because the implementation actually automatically decides which algorithm is better.

To deal with this problem, we renamed hybrid to auto.

Rename labo to labs

MakeNowJust-Labo is renamed to makenowjust-labs now, and codes.quine.labo namespace is also renamed to codes.quine.labs. Please update dependencies and link names.

-libraryDependencies += "codes.quine.labo" %% "recheck-core" % "4.2.2"
+libraryDependencies += "codes.quine.labs" %% "recheck-core" % "4.3.0"

Miscellaneous

Website renewal

The website has been completely renewed using Docusaurus. Thanks Docusaurus team for providing such a good documentation tool.

The new website has detailed usages as a library and ESLint plugin, and a playground where all options can now be specified. It will be much more convenient than before.

P.S.

We continue to develop the project to release recheck v5. Some of the features planned for v5 and more futures are as follows:

  • A new parser to parse other dialect than JavaScript
  • To support to analysis other language's regex
  • To suggest a new regex to prevent ReDoS (auto repairing)

Thank you for your interesting!