@sebastienrousseau/tsconfig-config 0.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.editorconfig +12 -0
- package/LICENSE +8 -0
- package/README.md +283 -0
- package/base.json +18 -0
- package/index.cjs +9 -0
- package/index.d.ts +14 -0
- package/index.js +1 -0
- package/index.mjs +12 -0
- package/node.json +10 -0
- package/package.json +62 -0
- package/tsconfig-config.svg +1 -0
- package/web.json +10 -0
package/.editorconfig
ADDED
package/LICENSE
ADDED
package/README.md
ADDED
|
@@ -0,0 +1,283 @@
|
|
|
1
|
+
<!-- SPDX-License-Identifier: Apache-2.0 OR MIT -->
|
|
2
|
+
|
|
3
|
+
<p align="center">
|
|
4
|
+
<img src="./tsconfig-config.svg" alt="tsconfig-config logo" width="128" />
|
|
5
|
+
</p>
|
|
6
|
+
|
|
7
|
+
<h1 align="center">@sebastienrousseau/tsconfig-config</h1>
|
|
8
|
+
|
|
9
|
+
<p align="center">
|
|
10
|
+
Shared TypeScript compiler configuration rules adhering to modern 2026 standards
|
|
11
|
+
</p>
|
|
12
|
+
|
|
13
|
+
<p align="center">
|
|
14
|
+
<a href="https://github.com/sebastienrousseau/tsconfig-config/actions"><img src="https://img.shields.io/github/actions/workflow/status/sebastienrousseau/tsconfig-config/ci.yml?branch=main&style=for-the-badge&logo=github" alt="Build Status" /></a>
|
|
15
|
+
<a href="https://www.npmjs.com/package/@sebastienrousseau/tsconfig-config"><img src="https://img.shields.io/npm/v/%40sebastienrousseau%2Ftsconfig-config.svg?style=for-the-badge&color=fc8d62&logo=npm" alt="npm package" /></a>
|
|
16
|
+
<a href="https://sebastienrousseau.com/tsconfig-config/"><img src="https://img.shields.io/badge/docs-sebastienrousseau.com-brightgreen.svg?style=for-the-badge&logo=github" alt="Documentation" /></a>
|
|
17
|
+
<a href="https://scorecard.dev/viewer/?uri=github.com/sebastienrousseau/tsconfig-config"><img src="https://img.shields.io/ossf-scorecard/github.com/sebastienrousseau/tsconfig-config?style=for-the-badge&label=OpenSSF%20Scorecard&logo=openssf" alt="OpenSSF Scorecard" /></a>
|
|
18
|
+
<a href="https://www.bestpractices.dev/projects/14522"><img src="https://img.shields.io/cii/level/14522?style=for-the-badge&label=OpenSSF%20Best%20Practices&logo=openssf" alt="OpenSSF Best Practices" /></a>
|
|
19
|
+
<a href="LICENSE-APACHE"><img src="https://img.shields.io/badge/license-Apache--2.0%20OR%20MIT-blue.svg?style=for-the-badge" alt="License: Apache-2.0 OR MIT" /></a>
|
|
20
|
+
<a href="#minimum-toolchain-policy"><img src="https://img.shields.io/badge/node->=%2018.0.0-93450a.svg?style=for-the-badge&logo=node.js" alt="Node >= 18.0.0" /></a>
|
|
21
|
+
</p>
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
## Contents
|
|
26
|
+
|
|
27
|
+
**Getting started**
|
|
28
|
+
|
|
29
|
+
- [Install](#install) — npm, pnpm, yarn, bun, source
|
|
30
|
+
- [Requirements](#requirements) — runtime floor, platform support
|
|
31
|
+
- [Quick Start](#quick-start) — import and extend in seconds
|
|
32
|
+
|
|
33
|
+
**The configuration ecosystem**
|
|
34
|
+
|
|
35
|
+
- [The configuration ecosystem](#the-configuration-ecosystem) — `@sebastienrousseau/config` family map at a glance
|
|
36
|
+
|
|
37
|
+
**Configuration reference**
|
|
38
|
+
|
|
39
|
+
- [Why this approach?](#why-this-approach) — design rationale and engineering principles
|
|
40
|
+
- [Strict Type Checking & Modern Module Resolution](#strict-type-checking--modern-module-resolution) — before and after rule comparison
|
|
41
|
+
- [Module compatibility](#module-compatibility) — dual CJS/ESM exports and TypeScript declarations
|
|
42
|
+
|
|
43
|
+
**Operational**
|
|
44
|
+
|
|
45
|
+
- [When not to use this configuration](#when-not-to-use-this-configuration) — boundaries and limitations
|
|
46
|
+
- [Development](#development) — make targets, validation, test suite
|
|
47
|
+
- [Security](#security) — supply chain, audit policies, commit integrity
|
|
48
|
+
- [Documentation](#documentation) — all reference docs
|
|
49
|
+
- [Stability guarantees](#stability-guarantees) — SemVer axis, deprecation window
|
|
50
|
+
- [Minimum-toolchain policy](#minimum-toolchain-policy) — runtime floor guarantees
|
|
51
|
+
- [License](#license) — dual license terms
|
|
52
|
+
|
|
53
|
+
---
|
|
54
|
+
|
|
55
|
+
## Install
|
|
56
|
+
|
|
57
|
+
### Using a package manager
|
|
58
|
+
|
|
59
|
+
Install `@sebastienrousseau/tsconfig-config` as a development dependency:
|
|
60
|
+
|
|
61
|
+
```bash
|
|
62
|
+
# npm
|
|
63
|
+
npm install --save-dev @sebastienrousseau/tsconfig-config
|
|
64
|
+
|
|
65
|
+
# pnpm
|
|
66
|
+
pnpm add -D @sebastienrousseau/tsconfig-config
|
|
67
|
+
|
|
68
|
+
# yarn
|
|
69
|
+
yarn add -D @sebastienrousseau/tsconfig-config
|
|
70
|
+
|
|
71
|
+
# bun
|
|
72
|
+
bun add -d @sebastienrousseau/tsconfig-config
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
### Build from source
|
|
76
|
+
|
|
77
|
+
```bash
|
|
78
|
+
git clone https://github.com/sebastienrousseau/tsconfig-config.git
|
|
79
|
+
cd tsconfig-config
|
|
80
|
+
make # check + test
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
---
|
|
84
|
+
|
|
85
|
+
## Requirements
|
|
86
|
+
|
|
87
|
+
- **Node.js 18.0.0 or newer.** Every package manifest declares `engines.node`, and CI enforces the runtime floor on every push across macOS, Linux, and Windows.
|
|
88
|
+
- **npm 9.0.0 or newer** (or modern pnpm / yarn / bun).
|
|
89
|
+
- **Module systems.** Full native support for ECMAScript Modules (ESM) and CommonJS (CJS).
|
|
90
|
+
- **TypeScript 5.0 or newer** (optional, recommended for type checking).
|
|
91
|
+
|
|
92
|
+
---
|
|
93
|
+
|
|
94
|
+
## Quick Start
|
|
95
|
+
|
|
96
|
+
### In `package.json`
|
|
97
|
+
|
|
98
|
+
```json
|
|
99
|
+
{
|
|
100
|
+
"tsconfig": "@sebastienrousseau/tsconfig-config"
|
|
101
|
+
}
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
### In CommonJS Configuration
|
|
105
|
+
|
|
106
|
+
```js
|
|
107
|
+
module.exports = require("@sebastienrousseau/tsconfig-config");
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
### In ES Module Configuration
|
|
111
|
+
|
|
112
|
+
```js
|
|
113
|
+
import config from "@sebastienrousseau/tsconfig-config";
|
|
114
|
+
export default config;
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
---
|
|
118
|
+
|
|
119
|
+
## The configuration ecosystem
|
|
120
|
+
|
|
121
|
+
`@sebastienrousseau/tsconfig-config` is a focused satellite of the [`@sebastienrousseau/config`](https://github.com/sebastienrousseau/config) suite — a unified ecosystem of 21 single-purpose, zero-overhead developer configurations designed to share a single design philosophy, strict typing, and zero runtime dependencies.
|
|
122
|
+
|
|
123
|
+
| Configuration | Target / Purpose | Native Standard |
|
|
124
|
+
| :--- | :--- | :--- |
|
|
125
|
+
| [`@sebastienrousseau/biome-config`](https://github.com/sebastienrousseau/biome-config) | Rust-powered linting & formatting | Biome 1.9+ |
|
|
126
|
+
| [`@sebastienrousseau/browserslist-config`](https://github.com/sebastienrousseau/browserslist-config) | Target browser matrix | Browserslist 4+ |
|
|
127
|
+
| [`@sebastienrousseau/c8-config`](https://github.com/sebastienrousseau/c8-config) | V8 native code coverage thresholds | c8 / V8 |
|
|
128
|
+
| [`@sebastienrousseau/commitlint-config`](https://github.com/sebastienrousseau/commitlint-config) | Conventional Commits standard | Commitlint 19+ |
|
|
129
|
+
| [`@sebastienrousseau/docker-config`](https://github.com/sebastienrousseau/docker-config) | Multi-stage Docker hardening | Hadolint / BuildKit |
|
|
130
|
+
| [`@sebastienrousseau/eslint-config`](https://github.com/sebastienrousseau/eslint-config) | Strict ECMAScript & TypeScript linting | ESLint 9+ Flat Config |
|
|
131
|
+
| [`@sebastienrousseau/jsdoc-config`](https://github.com/sebastienrousseau/jsdoc-config) | Structured API documentation generation | JSDoc 4+ |
|
|
132
|
+
| [`@sebastienrousseau/knip-config`](https://github.com/sebastienrousseau/knip-config) | Unused files, exports & dependencies audit | Knip 5+ |
|
|
133
|
+
| [`@sebastienrousseau/lefthook-config`](https://github.com/sebastienrousseau/lefthook-config) | Fast, parallel Git hook automation | Lefthook 1.7+ |
|
|
134
|
+
| [`@sebastienrousseau/markdownlint-config`](https://github.com/sebastienrousseau/markdownlint-config) | Markdown document style & structure | markdownlint-cli2 |
|
|
135
|
+
| [`@sebastienrousseau/mocha-config`](https://github.com/sebastienrousseau/mocha-config) | BDD testing settings & reporting | Mocha 10+ |
|
|
136
|
+
| [`@sebastienrousseau/oxlint-config`](https://github.com/sebastienrousseau/oxlint-config) | Sub-millisecond Rust JavaScript linting | Oxlint |
|
|
137
|
+
| [`@sebastienrousseau/playwright-config`](https://github.com/sebastienrousseau/playwright-config) | Cross-browser end-to-end testing | Playwright 1.40+ |
|
|
138
|
+
| [`@sebastienrousseau/prettier-config`](https://github.com/sebastienrousseau/prettier-config) | Deterministic code formatting | Prettier 3+ |
|
|
139
|
+
| [`@sebastienrousseau/remark-config`](https://github.com/sebastienrousseau/remark-config) | AST-based markdown verification | Remark 13+ |
|
|
140
|
+
| [`@sebastienrousseau/semantic-release-config`](https://github.com/sebastienrousseau/semantic-release-config) | Tag-driven automated releases & changelogs | semantic-release 24+ |
|
|
141
|
+
| [`@sebastienrousseau/size-limit-config`](https://github.com/sebastienrousseau/size-limit-config) | Performance bundle budget enforcement | Size Limit 11+ |
|
|
142
|
+
| [`@sebastienrousseau/stylelint-config`](https://github.com/sebastienrousseau/stylelint-config) | Modern CSS & SCSS quality assurance | Stylelint 16+ |
|
|
143
|
+
| [`@sebastienrousseau/tailwindcss-config`](https://github.com/sebastienrousseau/tailwindcss-config) | Utility-first design tokens & typography | Tailwind CSS 4+ |
|
|
144
|
+
| [`@sebastienrousseau/tsconfig-config`](https://github.com/sebastienrousseau/tsconfig-config) | Strict type checking & modern module resolution | TypeScript 5+ |
|
|
145
|
+
| [`@sebastienrousseau/vitest-config`](https://github.com/sebastienrousseau/vitest-config) | Lightning-fast Vite-native unit testing | Vitest 2+ |
|
|
146
|
+
|
|
147
|
+
To adopt the complete suite with a single import, install the master meta-package:
|
|
148
|
+
|
|
149
|
+
```bash
|
|
150
|
+
npm install --save-dev @sebastienrousseau/config
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
---
|
|
154
|
+
|
|
155
|
+
## Why this approach?
|
|
156
|
+
|
|
157
|
+
Configuration rot is one of the most common vectors for project decay. Ad-hoc tool configurations copied between repositories quickly drift, leaving security vulnerabilities unpatched, formatting rules inconsistent, and CI times bloated.
|
|
158
|
+
|
|
159
|
+
`@sebastienrousseau/tsconfig-config` solves this with three deliberate engineering choices:
|
|
160
|
+
|
|
161
|
+
1. **Zero Runtime Dependencies**: The configuration contains only static, serialisable declarative definitions and clean programmatic adapters.
|
|
162
|
+
2. **Dual CJS/ESM Architecture**: Ships dedicated CommonJS (`index.cjs`) and ES Module (`index.mjs`) entrypoints alongside comprehensive TypeScript declarations (`index.d.ts`).
|
|
163
|
+
3. **Deterministic Governance**: Versioned strictly by `+0.0.1` per release, cryptographically signed with published PGP keys, and audited continuously.
|
|
164
|
+
|
|
165
|
+
---
|
|
166
|
+
|
|
167
|
+
## Strict Type Checking & Modern Module Resolution
|
|
168
|
+
|
|
169
|
+
Includes strict null checks, NodeNext module resolution, and declaration map generation.
|
|
170
|
+
|
|
171
|
+
### Before (Unstandardized)
|
|
172
|
+
|
|
173
|
+
```javascript
|
|
174
|
+
// tsconfig.json
|
|
175
|
+
{
|
|
176
|
+
"compilerOptions": {}
|
|
177
|
+
}
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
### After (@sebastienrousseau/tsconfig-config Enforced)
|
|
181
|
+
|
|
182
|
+
```javascript
|
|
183
|
+
// tsconfig.json
|
|
184
|
+
{
|
|
185
|
+
"extends": "@sebastienrousseau/tsconfig-config/node.json"
|
|
186
|
+
}
|
|
187
|
+
```
|
|
188
|
+
|
|
189
|
+
---
|
|
190
|
+
|
|
191
|
+
## Module Compatibility
|
|
192
|
+
|
|
193
|
+
This package exports dual module entrypoints via `package.json` `exports`:
|
|
194
|
+
|
|
195
|
+
```json
|
|
196
|
+
"exports": {
|
|
197
|
+
".": {
|
|
198
|
+
"types": "./index.d.ts",
|
|
199
|
+
"import": "./index.mjs",
|
|
200
|
+
"require": "./index.cjs"
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
```
|
|
204
|
+
|
|
205
|
+
Full TypeScript declarations (`index.d.ts`) are included out of the box, providing rich IDE autocomplete and JSDoc documentation inline.
|
|
206
|
+
|
|
207
|
+
---
|
|
208
|
+
|
|
209
|
+
## When not to use this configuration
|
|
210
|
+
|
|
211
|
+
When writing non-typechecked loose JavaScript or legacy TypeScript < 4.5 requiring outdated emit targets like ES3.
|
|
212
|
+
|
|
213
|
+
---
|
|
214
|
+
|
|
215
|
+
## Development
|
|
216
|
+
|
|
217
|
+
Contributors use a standard POSIX `Makefile` as the convention-based task runner:
|
|
218
|
+
|
|
219
|
+
| Task | Command | Purpose |
|
|
220
|
+
| :--- | :--- | :--- |
|
|
221
|
+
| Default gate | `make` | Runs full test and lint battery |
|
|
222
|
+
| Unit tests | `make test` | Executes native validation test suite |
|
|
223
|
+
| Lints | `make lint` | Runs syntax and code quality checks |
|
|
224
|
+
| Clean | `make clean` | Removes node_modules and temporary cache |
|
|
225
|
+
|
|
226
|
+
```bash
|
|
227
|
+
git clone https://github.com/sebastienrousseau/tsconfig-config.git
|
|
228
|
+
cd tsconfig-config
|
|
229
|
+
make test
|
|
230
|
+
```
|
|
231
|
+
|
|
232
|
+
---
|
|
233
|
+
|
|
234
|
+
## Security
|
|
235
|
+
|
|
236
|
+
- **Private Reporting**: Report security vulnerabilities by emailing **sebastian.rousseau@gmail.com**. Expect an initial response within 48 hours and a mitigation plan within 7 days.
|
|
237
|
+
- **Commit Integrity**: All commits on `main` and release tags are cryptographically signed.
|
|
238
|
+
- **Release Signing Key**: The release-signing PGP key is published in [`KEYS.asc`](KEYS.asc):
|
|
239
|
+
```text
|
|
240
|
+
4B7F16C909C7A8EE9BED338A4F047EDF5F90F638
|
|
241
|
+
```
|
|
242
|
+
Signing key `Sebastien Rousseau <sebastian.rousseau@gmail.com>`, ed25519, expires 2028-08-16.
|
|
243
|
+
- **Supply Chain**: Monitored continuously via Dependabot, CodeQL, and SLSA provenance. See [`SECURITY.md`](SECURITY.md) for details.
|
|
244
|
+
|
|
245
|
+
---
|
|
246
|
+
|
|
247
|
+
## Documentation
|
|
248
|
+
|
|
249
|
+
- **[Architecture](docs/ARCHITECTURE.md)** — Architectural design, directory structure, and invariants.
|
|
250
|
+
- **[Development Guide](DEVELOPMENT.md)** — Toolchain prerequisites, task reproduction, and CI gates.
|
|
251
|
+
- **[Governance](GOVERNANCE.md)** — Maintainer-led project model and decision-making framework.
|
|
252
|
+
- **[Support Guide](SUPPORT.md)** — Channels for help, bug reports, and feature requests.
|
|
253
|
+
- **[Ecosystem Suite](https://github.com/sebastienrousseau/config)** — The `@sebastienrousseau/config` family repository.
|
|
254
|
+
|
|
255
|
+
---
|
|
256
|
+
|
|
257
|
+
## Stability guarantees
|
|
258
|
+
|
|
259
|
+
- **SemVer Discipline**: Versioning increments strictly by `+0.0.1` following the repository lifecycle standard.
|
|
260
|
+
- **Output Stability**: A rule change that alters linting or formatting output in consumer code is treated as a notable breaking event, clearly documented in [`CHANGELOG.md`](CHANGELOG.md).
|
|
261
|
+
- **Deprecation Window**: Deprecated options or configurations remain supported for at least two release cycles before removal.
|
|
262
|
+
|
|
263
|
+
---
|
|
264
|
+
|
|
265
|
+
## Minimum-toolchain policy
|
|
266
|
+
|
|
267
|
+
The minimum supported Node.js version is **18.0.0**. The floor may raise only when:
|
|
268
|
+
|
|
269
|
+
1. An upstream LTS version reaches official End-of-Life (EOL).
|
|
270
|
+
2. The reason is explicitly recorded in `CHANGELOG.md` and `DEVELOPMENT.md`.
|
|
271
|
+
|
|
272
|
+
---
|
|
273
|
+
|
|
274
|
+
## License
|
|
275
|
+
|
|
276
|
+
Dual-licensed under either:
|
|
277
|
+
|
|
278
|
+
- **Apache License, Version 2.0** ([`LICENSE-APACHE`](LICENSE-APACHE))
|
|
279
|
+
- **MIT License** ([`LICENSE-MIT`](LICENSE-MIT))
|
|
280
|
+
|
|
281
|
+
at your option.
|
|
282
|
+
|
|
283
|
+
`SPDX-License-Identifier: Apache-2.0 OR MIT`
|
package/base.json
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json.schemastore.org/tsconfig",
|
|
3
|
+
"compilerOptions": {
|
|
4
|
+
"target": "ES2022",
|
|
5
|
+
"module": "NodeNext",
|
|
6
|
+
"moduleResolution": "NodeNext",
|
|
7
|
+
"esModuleInterop": true,
|
|
8
|
+
"strict": true,
|
|
9
|
+
"skipLibCheck": true,
|
|
10
|
+
"forceConsistentCasingInFileNames": true,
|
|
11
|
+
"allowSyntheticDefaultImports": true,
|
|
12
|
+
"resolveJsonModule": true,
|
|
13
|
+
"isolatedModules": true,
|
|
14
|
+
"declaration": true,
|
|
15
|
+
"declarationMap": true,
|
|
16
|
+
"sourceMap": true
|
|
17
|
+
}
|
|
18
|
+
}
|
package/index.cjs
ADDED
package/index.d.ts
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export interface TSConfig {
|
|
2
|
+
compilerOptions?: Record<string, unknown>;
|
|
3
|
+
extends?: string;
|
|
4
|
+
include?: string[];
|
|
5
|
+
exclude?: string[];
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
declare const configs: {
|
|
9
|
+
base: TSConfig;
|
|
10
|
+
node: TSConfig;
|
|
11
|
+
web: TSConfig;
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
export default configs;
|
package/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
module.exports = require("./index.cjs");
|
package/index.mjs
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { createRequire } from "module";
|
|
2
|
+
|
|
3
|
+
const require = createRequire(import.meta.url);
|
|
4
|
+
const base = require("./base.json");
|
|
5
|
+
const node = require("./node.json");
|
|
6
|
+
const web = require("./web.json");
|
|
7
|
+
|
|
8
|
+
export default {
|
|
9
|
+
base,
|
|
10
|
+
node,
|
|
11
|
+
web,
|
|
12
|
+
};
|
package/node.json
ADDED
package/package.json
ADDED
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@sebastienrousseau/tsconfig-config",
|
|
3
|
+
"version": "0.0.3",
|
|
4
|
+
"description": "Shared TypeScript compiler configuration rules adhering to modern 2026 standards",
|
|
5
|
+
"author": "Sebastien Rousseau <sebastienrousseau@users.noreply.github.com>",
|
|
6
|
+
"license": "Apache-2.0 OR MIT",
|
|
7
|
+
"homepage": "https://github.com/sebastienrousseau/tsconfig-config#readme",
|
|
8
|
+
"repository": {
|
|
9
|
+
"type": "git",
|
|
10
|
+
"url": "git+https://github.com/sebastienrousseau/tsconfig-config.git"
|
|
11
|
+
},
|
|
12
|
+
"bugs": {
|
|
13
|
+
"url": "https://github.com/sebastienrousseau/tsconfig-config/issues"
|
|
14
|
+
},
|
|
15
|
+
"keywords": [
|
|
16
|
+
"tsconfig",
|
|
17
|
+
"typescript",
|
|
18
|
+
"compiler-options",
|
|
19
|
+
"tsc"
|
|
20
|
+
],
|
|
21
|
+
"main": "./index.cjs",
|
|
22
|
+
"module": "./index.mjs",
|
|
23
|
+
"types": "./index.d.ts",
|
|
24
|
+
"exports": {
|
|
25
|
+
".": {
|
|
26
|
+
"types": "./index.d.ts",
|
|
27
|
+
"import": "./index.mjs",
|
|
28
|
+
"require": "./index.cjs"
|
|
29
|
+
},
|
|
30
|
+
"./base.json": "./base.json",
|
|
31
|
+
"./node.json": "./node.json",
|
|
32
|
+
"./web.json": "./web.json"
|
|
33
|
+
},
|
|
34
|
+
"files": [
|
|
35
|
+
"index.js",
|
|
36
|
+
"index.mjs",
|
|
37
|
+
"index.cjs",
|
|
38
|
+
"index.d.ts",
|
|
39
|
+
"base.json",
|
|
40
|
+
"node.json",
|
|
41
|
+
"web.json",
|
|
42
|
+
"tsconfig-config.svg",
|
|
43
|
+
"LICENSE",
|
|
44
|
+
".editorconfig"
|
|
45
|
+
],
|
|
46
|
+
"publishConfig": {
|
|
47
|
+
"access": "public"
|
|
48
|
+
},
|
|
49
|
+
"scripts": {
|
|
50
|
+
"test": "node --test --experimental-test-coverage --test-coverage-exclude=\"tests/**\" --test-coverage-lines=98 --test-coverage-branches=98 --test-coverage-functions=98 tests/unit.test.js tests/integration.test.js tests/bench.test.js",
|
|
51
|
+
"test:coverage": "node --test --experimental-test-coverage --test-coverage-exclude=\"tests/**\" --test-coverage-lines=98 --test-coverage-branches=98 --test-coverage-functions=98 tests/unit.test.js tests/integration.test.js tests/bench.test.js",
|
|
52
|
+
"bench": "node benches/bench_load.js",
|
|
53
|
+
"examples": "node examples/basic.js && node examples/advanced.js && node examples/features.js && node examples/esm.mjs",
|
|
54
|
+
"docs:build": "bash scripts/build-docs.sh"
|
|
55
|
+
},
|
|
56
|
+
"peerDependencies": {
|
|
57
|
+
"typescript": ">=5.0.0"
|
|
58
|
+
},
|
|
59
|
+
"devDependencies": {
|
|
60
|
+
"typescript": "^7.0.2"
|
|
61
|
+
}
|
|
62
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg height="4096" viewBox="0 0 4096 4096" width="4096" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><mask id="a" fill="#fff"><path d="m0 0h4096v4096h-4096z" fill="#fff" fill-rule="evenodd"/></mask><g fill="none" fill-rule="evenodd"><path d="m2704.64965 297.996359c-.90222 2.564486-1.80443 5.123812-2.71183 7.688298 36.9079 16.666579 74.26174 32.425009 110.63557 50.164853 157.30194 76.712701 302.85951 171.041407 434.67643 286.319435 154.97381 135.525599 286.18406 290.669257 391.2456 467.278225 155.48714 261.37117 231.20072 545.75563 241.93917 848.02957 4.73923 133.36875-6.06663 265.89127-30.4161 397.1754-41.81306 225.42709-123.39105 435.80265-243.93545 631.03898-119.08219 192.87307-268.07751 359.69366-445.00525 501.86525-105.7719 84.99439-219.03635 158.20865-342.55703 215.23622-33.07608 15.27339-66.22994 30.37651-99.3475 45.56219.92814 2.29101 1.85628 4.58718 2.78443 6.87819 66.03808-23.37965 133.62653-43.22475 197.73575-71.0213 82.88983-35.94408 164.99151-74.68484 243.91989-118.49782 210.57937-116.87761 388.16562-272.98617 537.75724-460.88508 227.07852-285.23585 343.25184-612.2981 365.40799-973.16822 10.87845-177.23333-4.52145-353.02187-44.29675-526.82384-86.90314-379.75547-285.88851-688.649607-589.26135-932.513126-133.78209-107.543291-280.47521-194.601653-437.74604-262.774667-95.16308-41.253652-193.7691-74.633248-290.82477-111.552558m828.07913 1737.426311c-1.01118-118.92094-12.90073-236.69122-42.89165-351.95377-106.37338-408.82652-342.2874-722.66903-706.06725-938.859837-300.25657-178.430428-626.28852-239.720093-970.70183-182.506774-381.95381 63.446517-691.36217 255.695242-925.933233 559.481041-271.950822 352.19628-374.383489 751.07446-291.664768 1190.2259 67.318821 357.38201 247.839868 652.72617 523.866221 888.39056 231.12812 197.32609 501.23303 307.40291 805.5029 332.89297 192.34319 16.11447 380.42938-3.68935 564.6941-61.47542 601.44646-188.62129 1043.40284-784.99069 1043.19551-1436.19467m-1435.99147 2060.57733c-597.28796-12.47155-1073.99523-197.70793-1465.712677-581.59651-303.056546-297.00049-506.392259-652.47849-587.6487672-1070.24718-101.9556326-524.19743-27.5590799-1022.22885 259.0916462-1477.778554 295.538076-469.672438 721.783448-767.178604 1259.820688-906.4245128 193.54615-50.08745433 390.9656-68.65288757 590.40208-56.21745285 425.48316 26.52720745 809.7651 166.44390765 1148.61993 424.76039465 288.27368 219.761479 505.01819 496.287364 644.92395 830.016245 123.37549 294.29153 167.98854 602.31364 143.16203 919.60298-45.90414 586.72548-301.05508 1068.6476-748.48179 1449.17706-270.51454 230.07618-585.6836 372.30453-935.92502 433.40328-117.81183 20.55201-238.01401 27.53339-308.25207 35.30425" fill="#202d33" mask="url(#a)"/><path d="m1076.3244 3010.47169c83.96834 91.11923 180.29809 167.14566 286.44851 230.92757 6.54366 3.93187 18.4695 4.37046 25.56279 1.22806 170.27519-75.40724 316.55868-179.74105 417.04692-340.40583 113.9074-182.10946 364.88429-185.36022 484.22055-7.10007 15.7473 23.52929 28.64796 49.26187 46.4797 71.0471 101.07934 123.46684 226.61704 214.8131 374.04126 276.2524 7.8918 3.28688 20.86505 2.80701 27.96353-1.56861 106.79856-65.80461 204.57496-142.83207 289.86033-235.00908 71.67953-71.36185 130.17323-152.77525 185.32768-237.04725 14.59102-22.2909 8.63328-28.6531-12.64658-37.86358-160.76562-69.57651-307.64022-162.04764-444.34674-270.80868-142.81981-113.61137-271.28712-241.78406-388.25895-381.45309-10.29253-12.29095-15.93397-18.72539-26.54798.54696-118.83848 215.70061-453.53482 224.46217-579.51326 5.20121-12.27325-21.36212-18.18951-19.53034-33.1746-2.00206-151.07457 176.74313-317.26905 337.41308-509.46187 470.15231-102.32896 70.67558-209.81197 132.08393-324.258628 181.27871-9.675493 4.15891-25.319095 5.52629-13.564357 23.94209 57.441108 89.9892 119.170335 176.62961 194.821695 252.68184m314.54684-825.14012c73.01212-75.37111 148.78792-148.30158 218.45562-226.61386 140.89612-158.37894 265.73382-329.31199 385.67674-503.77959 18.21026-26.48593 36.69014-52.79126 56.13964-80.74776 5.81774 8.32296 9.62364 13.94213 13.60584 19.4323 108.00152 148.99818 213.5712 299.82813 324.7927 446.41146 94.71716 124.83422 200.06906 241.00492 317.88089 345.29229 80.16244 65.03062 157.93453 133.28103 241.07843 194.27142 104.88524 76.9449 218.65784 139.87542 339.79334 188.81221 12.51696 5.0619 21.92801 10.76362 29.62796-8.26621 52.1004-128.77125 86.71129-261.78396 101.5823-399.84824 1.75258-8.37457 4.28294-16.6769 5.10737-25.14435 2.03258-20.79968-.20222-36.72323-20.34134-52.95637-117.5785-94.7931-235.76365-189.17857-348.23996-289.79723-91.58014-81.92423-177.86625-170.13842-262.13014-259.63743-110.6304-117.48648-218.87043-237.34653-324.53345-359.27571-78.56023-90.64967-152.70789-185.200255-226.36297-279.905637-60.00257-77.140974-116.33406-157.114751-174.36109-235.777906-17.12137-23.209371-21.37837-23.596366-36.32717-2.321969-157.37971 223.925544-324.36751 440.384662-508.31595 643.469252-93.99124 103.76106-187.32915 208.28579-285.40629 308.14594-83.6676 85.18531-171.9811 166.09819-261.40422 245.37022-81.495025 72.2442-165.038185 142.65146-252.148729 207.95555-37.058277 27.78624-55.647045 54.97907-47.029323 99.67956 1.887395 8.94216 4.365897 17.80692 5.568852 26.84196 15.825083 119.2615 44.141194 235.37543 87.442394 347.80518 17.162851 44.56633 16.825816 44.73145 60.329237 26.29501 210.838629-89.34937 394.833729-218.2909 559.519319-375.71009m2141.84614-149.90632c.21769 651.20398-441.73869 1247.56822-1043.18514 1436.19467-184.26473 57.78607-372.35091 77.58989-564.6941 61.47542-304.26988-25.49522-574.37478-135.57204-805.50291-332.89813-276.02635-235.65923-456.547397-531.00855-523.866218-888.39056-82.718721-439.15144 19.713946-838.02446 291.664768-1190.22074 234.57107-303.790959 543.98461-496.034524 925.93842-559.486201 344.40812-57.213319 670.44526 4.076346 970.69664 182.511934 363.78504 216.185647 599.69906 530.033317 706.06725 938.859837 29.99092 115.26255 41.88047 233.03283 42.88129 351.95377" fill="#fcfcfc"/><path d="m2704.64965 297.996359c97.05567 36.91931 195.66169 70.298906 290.82477 111.552558 157.27083 68.173014 303.96395 155.231376 437.74604 262.774667 303.37284 243.863519 502.35821 552.757656 589.26135 932.513126 39.7753 173.80197 55.1752 349.59051 44.29675 526.82384-22.15615 360.87012-138.32947 687.93237-365.40799 973.16822-149.59162 187.89891-327.17787 344.00747-537.75724 460.88508-78.92838 43.81298-161.03006 82.55374-243.91989 118.49782-64.10922 27.79655-131.69767 47.64165-197.73575 71.0213-.92815-2.29101-1.85629-4.58718-2.78443-6.87819 33.11756-15.18568 66.27142-30.2888 99.3475-45.56219 123.52068-57.02757 236.78513-130.24183 342.55703-215.23622 176.92774-142.17159 325.92306-308.99218 445.00525-501.86525 120.5444-195.23633 202.12239-405.61189 243.93545-631.03898 24.34947-131.28413 35.15533-263.80665 30.4161-397.1754-10.73845-302.27394-86.45203-586.6584-241.93917-848.02957-105.06154-176.608968-236.27179-331.752626-391.2456-467.278225-131.81692-115.278028-277.37449-209.606734-434.67643-286.319435-36.37383-17.739844-73.72767-33.498274-110.63557-50.164853.9074-2.564486 1.80961-5.123812 2.71183-7.688298" fill="#c8232e"/><path d="m678.013512 2160.10003c-8.617722-44.70049 9.971046-71.89333 47.029323-99.67956 87.110544-65.30925 170.653704-135.71136 252.148729-207.95556 89.417936-79.27202 177.731436-160.18491 261.399036-245.37021 98.08233-99.86016 191.42024-204.38489 285.40629-308.15111 183.95362-203.07942 350.93624-419.538542 508.31595-643.469246 14.95398-21.269237 19.21099-20.882242 36.32717 2.327129 58.03222 78.663155 114.3637 158.631772 174.36628 235.777906 73.65507 94.705382 147.80274 189.255961 226.35778 279.905641 105.6682 121.92918 213.90824 241.78923 324.53344 359.2757 84.26909 89.49901 170.55519 177.70804 262.13533 259.63743 112.47631 100.61867 230.66147 195.00413 348.23996 289.79723 20.13394 16.23315 22.37393 32.15669 20.34135 52.95638-.82444 8.46745-3.35479 16.76977-5.11256 25.14434-18.2621-4.72133-37.42124-7.33226-54.64631-14.51488-83.09205-34.6541-165.66559-70.53111-248.42061-105.97984-50.19745-31.66649-100.34823-63.41039-150.67013-94.87565-5.01404-3.13724-10.90956-5.39729-16.70655-6.70791-85.415-19.38071-166.32411-51.04721-243.87842-90.90768-245.89543-126.37188-446.32228-306.56184-618.41745-519.99725-11.78067-14.61292-23.7117-29.10717-36.39458-44.65404-4.94145 5.95972-8.24958 9.79871-11.39178 13.7667-120.83477 152.61013-256.89833 290.0449-413.1062 406.94315-138.2828 103.48758-286.53665 188.1311-455.93036 231.22168-12.41325 3.15788-25.72872 5.72753-36.42051 12.18776-50.81448 30.70675-100.86156 62.66221-151.178271 94.17907-13.159914 6.22288-26.345754 12.38384-39.464187 18.67895-85.415 40.99566-171.281107 80.80453-264.86272 100.46387" fill="#d7dada"/><path d="m1076.3244 3010.4722c-75.65136-76.05223-137.380587-162.69263-194.821695-252.68184-11.754738-18.41579 3.888864-19.78317 13.564357-23.94208 114.446658-49.19479 221.929668-110.60313 324.258628-181.27871 192.19282-132.73924 358.3873-293.40918 509.46187-470.15231 14.98509-17.52829 20.90135-19.36006 33.1746 2.00205 125.97844 219.26097 460.67478 210.4994 579.51326-5.20637 10.61401-19.26718 16.25545-12.83275 26.54798-.54179 116.97183 139.66902 245.43914 267.84172 388.25895 381.45309 136.70652 108.76103 283.58112 201.23216 444.34674 270.80868 21.27986 9.20532 27.2376 15.57267 12.64658 37.86358-55.15445 84.272-113.64815 165.68539-185.32768 237.04725-150.36939 3.21979-288.99441-41.44457-421.28318-106.89314-152.43827-75.41756-287.13813-176.44902-406.9618-296.44322-47.89524-47.96157-91.66829-100.03043-136.62355-150.84028-10.68141-12.06908-17.38063-12.65215-27.89093.0774-77.31061 93.58568-162.5908 179.07542-256.63907 256.38151-111.76076 91.86226-231.9059 169.64307-365.81762 225.13813-82.78094 34.30838-167.49595 62.59513-258.31906 67.76022-26.12279 1.48606-52.0641 6.2074-78.08838 9.44783" fill="#29607e"/><path d="m982.338864 2040.95515c50.321896-31.51171 100.368976-63.47232 151.178276-94.17907 10.69178-6.45508 24.00725-9.02472 36.4205-12.1826 169.3989-43.09575 317.65275-127.7341 455.93037-231.22169 156.20787-116.89824 292.27143-254.33818 413.1062-406.94315 3.1422-3.96799 6.45551-7.80698 11.39696-13.77186 12.67769 15.55204 24.60873 30.04112 36.39458 44.65405 172.08999 213.4354 372.51683 393.62537 618.41227 520.00241 77.55431 39.85531 158.46341 71.52697 243.8836 90.90251 5.79699 1.31578 11.68733 3.57067 16.70655 6.70791 50.3219 31.47042 100.4675 63.21432 150.64939 94.87566-60.97738 94.5867-150.95531 143.66797-260.40349 154.32323-48.77153 4.74714-99.01565-5.40245-148.59088-8.79252-117.81183-104.29254-223.16373-220.46323-317.8809-345.29745-111.22149-146.58334-216.79118-297.40813-324.7927-446.40631-3.98219-5.49533-7.78809-11.11449-13.61102-19.43746-19.44432 27.96167-37.9242 54.26184-56.13445 80.74776-119.94292 174.46761-244.78063 345.40581-385.67675 503.77959-69.66769 78.31228-145.44349 151.24791-218.45561 226.61387-10.28216.55211-20.55913 1.4035-30.84647 1.62022-51.2967 1.07326-103.90525 9.66455-153.62566 1.3003-94.43198-15.87711-170.99593-65.61885-224.060766-147.2954" fill="#c8232e"/><g fill="#202d33"><path d="m1076.3244 3010.4722c26.02428-3.24043 51.96559-7.96177 78.08838-9.44783 90.82311-5.16509 175.53812-33.45184 258.31906-67.76022 133.91172-55.49506 254.05686-133.27587 365.81762-225.13813 94.04827-77.30609 179.32846-162.79583 256.63907-256.38151 10.5103-12.72955 17.20952-12.14648 27.89093-.0774 44.95526 50.80985 88.72831 102.87871 136.62355 150.84028 119.82367 119.9942 254.52353 221.02566 406.9618 296.44322 132.28877 65.44857 270.91379 110.11293 421.28318 106.89314-85.28537 92.17701-183.06177 169.20447-289.86033 235.00907-7.09848 4.37562-20.07173 4.8555-27.96353 1.56862-147.42422-61.4393-272.96192-152.78557-374.04126-276.25241-17.83174-21.78523-30.7324-47.51781-46.4797-71.04709-119.33626-178.26531-370.31315-175.0094-484.22055 7.10006-100.48824 160.66479-246.77173 264.9986-417.04692 340.40584-7.09329 3.1424-19.01913 2.69864-25.56279-1.22807-106.15042-63.78191-202.48017-139.80834-286.44851-230.92757"/><path d="m982.338864 2040.95566c53.064836 81.67656 129.628786 131.41829 224.060766 147.2954 49.72041 8.36425 102.32896-.22703 153.62566-1.3003 10.28734-.21672 20.56431-1.0681 30.84647-1.62022-164.68559 157.41919-348.68069 286.36072-559.519321 375.71009-43.50342 18.43643-43.166385 18.27132-60.329236-26.28985-43.3012-112.43491-71.617312-228.54884-87.442394-347.81034-1.202955-9.02988-3.681458-17.89464-5.568853-26.84196 93.586798-19.65934 179.452906-59.46305 264.86272-100.46387 13.123619-6.29511 26.309459-12.45607 39.464188-18.67895"/><path d="m2707.42526 2185.32796c49.57524 3.39008 99.81417 13.54482 148.59089 8.79253 109.44817-10.65526 199.42611-59.73653 260.40349-154.32323 82.77057 35.44873 165.34411 71.33089 248.43616 105.97983 17.22507 7.18778 36.37902 9.79871 54.64631 14.52005-14.87102 138.05912-49.4819 271.07699-101.5823 399.84824-7.69995 19.02983-17.10582 13.32294-29.62796 8.26621-121.13551-48.93679-234.90291-111.87247-339.78816-188.81221-83.14909-60.99555-160.92117-129.2408-241.07843-194.27142"/></g></g></svg>
|