open-index/open-npm huggingface dataset:
npm package: @ordzaar/jest
Description: `@ordzaar/jest`
Latest version: 3.1.2

# Jest

`@ordzaar/jest`

```json
{
  "jest": {
    "preset": "@ordzaar/jest"
  }
}
```

## Included Extensions

### `wait-for-expect`

```ts
import { waitForExpect } from "@ordzaar/jest";

it("should wait-for-expect", async () => {
  await waitForExpect(() => {}, 100);
});
```

### `jest-extended`

```ts
import "jest-extended";

it("should contain jest-extended", () => {
  expect(1).toBeOneOf([1, 2, 3]);
  expect("").toBeEmpty();
});
```
npm package: @ordzaar/standard-api-fastify
Description: --- Desktop ---
Latest version: 3.1.2

---
Desktop
---

`@ordzaar/standard-api-fastify`

Standard API tools for scaffolding API using Fastify. Our choice of framework is NestJS/Fastify as a default for our API projects.

This package also includes a `tsconfig.json` which is customized for web usage.

| Package | Description                                   |
| ------- | --------------------------------------------- |
| NestJS  | Used as the base library.                     |
| Fastify | Fixes the Fastify version required by Nest.js |
npm package: @ordzaar/standard-linter
Description: --- Linter ---
Latest version: 3.1.2

---
Linter
---

`@ordzaar/standard-linter`

Standard linter for TS projects that do not run with web frameworks. This module also installs `prettier`, `eslint`, `husky` and `lint-staged`.

Lint rules are extended from these packages

| Package                          | Description                                          |
| -------------------------------- | ---------------------------------------------------- |
| @typescript-eslint/parser        | Rules parser for TypeScript.                         |
| eslint-plugin-simple-import-sort | Rules defined for simple import sorting.             |
| prettier                         | Rules defined by prettier to have same code styles   |
| eslint-plugin-unused-imports     | Rules to auto remove unused import                   |
| eslint-plugin-check-file         | Rules to enforce file name checking (off by default) |
npm package: @ordzaar/standard-prettier
Description: --- Prettier ---
Latest version: 3.1.2

---
Prettier
---

`@ordzaar/standard-prettier`

Standard prettier for TS projects. This module also installs `prettier`, `eslint`, `nextjs`, `husky` and `lint-staged`.

Lint rules are extended from these packages

| Package  | Description                                        |
| -------- | -------------------------------------------------- |
| airbnb   | Rules defined by Airbnb. Uses TypeScript.          |
| prettier | Rules defined by prettier to have same code styles |
npm package: @ordzaar/standard-typescript
Description: `@ordzaar/standard-typescript`
Latest version: 3.1.2

# Typescript

`@ordzaar/standard-typescript`

Within your `tsconfig.json`:

```json
{
  "extends": "@ordzaar/standard-typescript/tsconfig.json",
  "compilerOptions": {
    "rootDir": "./src",
    "outDir": "./dist"
  },
  "include": ["src"]
}
```

Within your `tsconfig.build.json`:

```json
{
  "extends": "./tsconfig.json",
  "exclude": ["**/*.unit.ts"]
}
```
npm package: @ordzaar/standard-web
Description: --- Web ---
Latest version: 3.1.2

---
Web
---

`@ordzaar/standard-web`

Standard web tools for scaffolding web applications. Our choice of framework is Next.js as a default for our web projects.

This package also includes a `tsconfig.json` which is customized for web usage.

Packages that are included are based on the requirements of Next.js to avoid version mismatch.

| Package    | Description                                      |
| ---------- | ------------------------------------------------ |
| next       | Used as the base library.                        |
| react      | Fixes the react version required by Next.js      |
| react-dom  | Fixes the react version required by Next.js      |
| typescript | Fixes the TypeScript version required by Next.js |
npm package: @ordzaar/standard-web-linter
Description: --- Web Linter ---
Latest version: 3.1.2

---
Web Linter
---

`@ordzaar/standard-web-linter`

Standard linter for web applications. This module also installs `prettier`, `eslint`, `nextjs`, `husky` and `lint-staged`.

Lint rules are extended from these packages

| Package              | Description                                        |
| -------------------- | -------------------------------------------------- |
| next/core-web-vitals | Uses recommended rules from Next.js.               |
| airbnb               | Rules defined by airbnb. Uses TypeScript.          |
| prettier             | Rules defined by prettier to have same code styles |
npm package: @ordzaar/testcontainers
Description: `@ordzaar/testcontainers`
Latest version: 3.1.2

# Test Containers

`@ordzaar/testcontainers`

Providing opinionated containers that follows the `testcontainers-node` Fluent API design.

- `PostgreSqlContainer` - for a Postgres database docker container
- `LocalstackContainer` - for a Localstack cloud docker container
- `RedisContainer` - for a Redis docker container

Example with PostgresSqlContainer:

```ts
import { PostgreSqlContainer, StartedPostgreSqlContainer } from "@ordzaar/testcontainers";

let postgres: StartedPostgreSqlContainer;

beforeAll(async () => {
  postgres = await new PostgreSqlContainer().start();
});

afterAll(async () => {
  await postgres.stop();
});
```

With network:

```ts
import { PostgreSqlContainer, RedisContainer, Network } from "@ordzaar/testcontainers";

beforeAll(async () => {
  const network = await new Network().start();
  const postgres = await new PostgreSqlContainer().withNetwork(network).start();
  const redis = await new RedisContainer().withNetwork(network).start();
});

afterAll(async () => {
  await postgres.stop();
  await redis.stop();
  await network.stop();
});
```
npm package: @ordzaar/turbo
Description: `@ordzaar/turbo`
Latest version: 3.1.2

# Turbo

`@ordzaar/turbo`

An internal package for facilitating `@ordzaar/turbo-*` tools interoperability with `turbo.json` by
extending on top of it. Ultimately, we don't want to maintain or customize turborepo beyond light integration.

Some tools written within `@ordzaar/*` need to be aware of the turborepo pipelines for content-aware caching of tasks.
This internal package contains internal helpers for `@ordzaar/*` packages to provide a convention over configuration
experience.
npm package: @ordzaar/turbo-jest
Description: `@ordzaar/turbo-jest`
Latest version: 3.1.2

# Turbo Jest

`@ordzaar/turbo-jest`

Turbo aware `jest-preset`; automatically run `dependsOn` script before running jest. By taking advantage of
content-aware hashing from turborepo. `dependsOn` only run if the pipeline `inputs` have changed.

When you run your test with `@ordzaar/turbo-jest` preset, it uses `displayName` from your jest config to
figure out which `pipeline` to use. It will automatically pinpoint the corresponding `dependsOn` and run all the scripts
specified within.

E.g. `turbo.json` and `package.json`:

```json
{
  "pipeline": {
    "test:e2e": {
      "inputs": ["src/**", "**/*.e2e.ts"],
      "dependsOn": ["build:docker"]
    }
  }
}
```

```json
{
  "scripts": {
    "build:docker": "docker build ..."
  },
  "jest": {
    "preset": "@ordzaar/turbo-jest",
    "projects": [
      {
        "displayName": "test:e2e",
        "preset": "@ordzaar/turbo-jest",
        "testRegex": ".*\\.e2e\\.ts$"
      }
    ]
  }
}
```