open-index/open-npm huggingface dataset:
npm package: @jazzer.js/bug-detectors
Description: Jazzer.js bug detectors
Author: Code Intelligence
Latest version: 2.1.0
Deprecated: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

# @jazzer.js/bug-detectors

The `@jazzer.js/bug-detectors` module is used by
[Jazzer.js](https://github.com/CodeIntelligenceTesting/jazzer.js#readme) to
detect and report bugs in JavaScript code.

## Install

Using npm:

```shell
npm install --save-dev @jazzer.js/bug-detectors
```

## Documentation

- Up-to-date
  [information](https://github.com/CodeIntelligenceTesting/jazzer.js/blob/main/docs/fuzz-settings.md#bug-detectors)
  about currently available bug detectors
npm package: @jazzer.js/core
Description: Jazzer.js CLI
Author: Code Intelligence
Latest version: 2.1.0
Deprecated: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

# @jazzer.js/core

This is the main entry point and all most users have to install as a
dev-dependency, so that they can fuzz their projects.

The `@jazzer.js/core` module provide a CLI interface via the `jazzer` command.
It can be used by `npx` or node script command. To display a command
documentation use the `--help` flag.

```shell
npx jazzer --help
```

The `core` module also provides the function `startFuzzing(options: Options)`as
entry point for further integrations and external tools.

## Install

Using npm:

```sh
npm install --save-dev @jazzer.js/core
```

## Documentation

See
[Jazzer.js README](https://github.com/CodeIntelligenceTesting/jazzer.js#readme)
for more information or the
[issues](https://github.com/CodeIntelligenceTesting/jazzer.js/issues?q=is%3Aissue+is%3Aopen)
associated with it.
npm package: @jazzer.js/fuzzer
Description: Jazzer.js libfuzzer-based fuzzer for Node.js
Author: Code Intelligence
Latest version: 2.1.0
Deprecated: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

# @jazzer.js/fuzzer

This module provides a native Node.js addon which loads libfuzzer into Node.js.
Users can install it with `npm install`, which tries to download a prebuilt
shared object from GitHub but falls back to compilation on the user's machine if
there is no suitable binary.

Loading the addon initializes libFuzzer and the sanitizer runtime. Users can
then start the fuzzer with the exported `startFuzzing` function; see
[the test](fuzzer.test.ts) for an example. For the time being, the fuzzer runs
on the main thread and therefore blocks Node's event loop; this is most likely
what users want, so that their JS fuzz target can run in its normal environment.

## Development

The project can be built with `npm run build` (which is incremental after the
first build); a subsequent `npm test` makes sure that the addon loads cleanly.
Binaries can be prebuilt with `npm run prebuild` and uploaded with
`npm run prebuild -- --upload`. Please format the code with `clang-format` (or
use the format functionality of `clangd`).

Internally, the build system uses several steps:

1. `package.json` defines the `npm` scripts.
2. Several of them use `prebuild` or `prebuild-install`; together, those two
   tools implement a binary cache via GitHub releases, so that users don't have
   to build the code themselves.
3. We run `prebuild` with the `cmake-js` backend, which makes it call `cmake-js`
   to build the code when necessary.
4. `cmake-js` is a wrapper around CMake; it expects CMake and the C++ toolchain
   to exist on the machine already.
5. In our CMake configuration, we set up compiler-rt as an external project;
   CMake fetches and builds it before compiling our own code against it.

To debug build issues, it's often useful to start with a plain
`cmake-js compile` or `cmake-js recompile`, which just invokes CMake with a few
extra arguments that help it find the Node.js headers and such.

When working on the addon's C++ code, you may want to use a language server like
`clangd` for IDE features. CMake is configured to emit a `compile_commands.json`
file, so the language server should work after the first `npm install`.
npm package: @jazzer.js/instrumentor
Description: Jazzer.js source code instrumentor
Author: Code Intelligence
Latest version: 2.1.0
Deprecated: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

# @jazzer.js/instrumentor

The `@jazzer.js/instrumentor` module is used to instrument code for fuzzing.

It provides and registers [Babel](https://babeljs.io/) plugins to transform code
in such a way that it provides feedback to the fuzzer. This feedback consists of
coverage statistics, so that the fuzzer can detect when new code paths are
reached, and comparison feedback, to enable the fuzzer to mutate it's input in a
meaningful way.

Code loading is intercepted using
[istanbul-lib-hook](https://github.com/istanbuljs/istanbuljs/tree/master/packages/istanbul-lib-hook)
, which also enables fine-grained control of when to apply the instrumentatino.

## Install

Using npm:

```sh
npm install --save-dev @jazzer.js/instrumentor
```

## Documentation

See
[Jazzer.js README](https://github.com/CodeIntelligenceTesting/jazzer.js#readme)
for more information or the
[issues](https://github.com/CodeIntelligenceTesting/jazzer.js/issues?q=is%3Aissue+is%3Aopen)
associated with it.
npm package: @jazzer.js/jest-runner
Description: Jazzer.js Jest runner
Author: Code Intelligence
Latest version: 2.1.0
Deprecated: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

# Jest Fuzz Runner

Custom Jest runner to executes fuzz tests via Jazzer.js, detailed documentation
can be found at the
[Jazzer.js GitHub page](https://github.com/CodeIntelligenceTesting/jazzer.js).

A fuzz test in Jest, in this case written in TypeScript, would look similar to
the following example:

```typescript
// file: "Target.fuzz.ts
// Import the fuzz testing extension to compile TS code.
import "@jazzer.js/jest-runner";
import * as target from "./target";

describe("Target", () => {
	test.fuzz("executes a method", (data: Buffer) => {
		target.fuzzMe(data);
	});
});
```