open-index/open-npm huggingface dataset:
npm package: @serenity-tools/migrate
Description: This tools can be used to run migrations on Databases using WebSQL API. The migrate function accepts a list migrations that should run.
Latest version: 0.0.1

# Migrate

This tools can be used to run migrations on Databases using WebSQL API. The migrate function accepts a list migrations that should run.

The name is important to define the order and therefor the names must comply to simple JavaScript based string comparison `>` and `<`. The example has string resembling a datetime string and a description e.g. `"202110211000_init"`.

```sh
yarn add @serenity-tools/migrate
```

## Usage

```js
import Db from "react-native-sqlcipher"; // also works with node-websql
import { migrate } from "@serenity-tools/migrate";

const db = await Db.openDatabase({ name: "data" });

// during App initialization
try {
  await migrate({
    db,
    migrations: [
      {
        name: "202110211000_init",
        statements: [
          `CREATE TABLE "User" (
            "id" INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
            "name" TEXT
          );`,
        ],
      },
      {
        name: "202201010000_add_notes",
        statements: [
          `CREATE TABLE "Note" (
            "id" TEXT NOT NULL PRIMARY KEY,
            "content" TEXT
          );`,
        ],
      },
    ],
  });
} catch (err) {
  // Inform user about the error
}
```
npm package: @serenity-ui/rollup-preset-solid
Description: Rollup preset for solid libraries
Author: Alexandre Mouton-Brady
Latest version: 2.0.1-fix.1

<p>
  <img width="100%" src="https://assets.solidjs.com/banner?type=Rollup%20Preset&background=tiles&project=%20" alt="Solid Rollup Preset">
</p>

# Solid Rollup Preset

A small opinionated preset for rollup to bundle your [solid](https://github.com/ryansolid/solid) libraries with rollup.

Features out of the box:

- Automatic TypeScript
- Minimal - two lines config
- No lock-in - you are in total control of the rollup config
- Best practices for publishing solid libraries by compiling for `esm`, `cjs`, `jsx`, `umd` and `tsc`
- Automatically clean `dist` folder on build

## Usage

1. Install with your favorite package manager:

```sh
npm install -D rollup-preset-solid rollup
pnpm add -D rollup-preset-solid rollup
yarn add -D rollup-preset-solid rollup
```

2. Import `withConfig` in your `rollup.config.js`. The first and only argument is (optionally) your rollup config:

```js
// rollup.config.js
import withSolid from "rollup-preset-solid";

export default withSolid();
```

3. Configure your package.json

```json
{
  "name": "my-lib",

  "// This is optional but this remove the need to manually configure the source input for rollup": "",
  "source": "src/my-lib.tsx",

  "// All the following properties will be hinted during build": "",
  "// You will just have to copy paste them": "",

  "main": "dist/cjs/my-lib.js",
  "module": "dist/esm/my-lib.js",
  "types": "dist/types/my-lib.d.ts",
  "files": ["dist"],
  "exports": {
    ".": {
      "solid": "./dist/source/my-lib.jsx",
      "import": "./dist/esm/my-lib.js",
      "browser": "./dist/esm/my-lib.js",
      "require": "./dist/cjs/my-lib.js",
      "node": "./dist/cjs/my-lib.js"
    }
  }
}
```

## API

### withSolid(options?: Options | Options[]): RollupOptions | RollupOptions[]

The default export. A wrapper function that accepts all of the rollup options and a few extra to configure what to generate.

### Options

The options are the exact same as Rollup with a few extra that are
specific to the wrapper

#### Interface

```ts
interface Options extends RollupOptions {
  /**
   * Defines which target you want
   * @default ['esm']
   */
  targets?: ModuleFormat[];
  /**
   * Whether to generate a package.json or not
   * This is useful for sub packages
   * @default false
   */
  writePackageJson?: boolean;
  /**
   * Whether to hint what to put in your package.json or not
   * @default false
   */
  printInstructions?: boolean;
}
```

#### Example

```js
// rollup.config.js
import withSolid from "rollup-preset-solid";

export default withSolid([
  { input: "browser.ts", targets: ["esm"] },
  { input: "server.ts", targets: ["esm", "cjs"], writePackageJson: true },
]);
```
npm package: @serenityjs/binarystream
Description: Binarystream is a simple Rust package designed to simplify the streaming of binary data in Javascript and Typescript. While containing the super speeds of Rust, and the ecosystem of Javascript!
Latest version: 3.1.0

# @serenityjs/binarystream

Binarystream is a simple Rust package designed to simplify the streaming of binary data in Javascript and Typescript. While containing the super speeds of Rust, and the ecosystem of Javascript!

## Example Usage

```ts
import { BinaryStream } from '@serenityjs/binarystream'

// Create a new stream without a given buffer.
const stream = new BinaryStream()

// Reading / Writing is allowed on the fly,
// which will automatically update the cursor offset depending on the type of call.
stream.writeUint8(255)
stream.writeString16('Hello, World!')

// Converting the stream to a buffer!
const buffer = stream.getBuffer()

// Create another stream based on our output buffer from the previous stream.
const output = new BinaryStream(buffer)

// Reading the data in order.
stream.readUint8() // Expected output: 255
stream.readString16() // Expected output: "Hello, World!"
```