@vllnt/typescript 3.0.1-canary.31d5084 → 3.0.1-canary.411eca5
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/CHANGELOG.md +21 -2
- package/README.md +37 -22
- package/llms.txt +23 -9
- package/package.json +15 -9
package/CHANGELOG.md
CHANGED
|
@@ -4,9 +4,26 @@ All notable changes to this project are documented in this file. The format foll
|
|
|
4
4
|
|
|
5
5
|
## [Unreleased]
|
|
6
6
|
|
|
7
|
+
## [3.0.1] - 2026-11-27
|
|
8
|
+
|
|
9
|
+
Presets are unchanged from 3.0.0. This release changes package metadata and the shipped documentation.
|
|
10
|
+
|
|
11
|
+
### Added
|
|
12
|
+
|
|
13
|
+
- `README.md` and `llms.txt` have a "For coding agents" note: the documentation ships in `node_modules/@vllnt/typescript/` and matches the installed version. `llms.txt` links to the shipped `README.md` and `CHANGELOG.md` with relative paths and adds related-package and ecosystem links; the README adds a related-packages section and documents each preset's notable compiler options. Presets are unchanged.
|
|
14
|
+
- `scripts/check-package-contents.sh` checks the packed file list against an allowlist and the privacy denylist, and fails when a path listed in `.package-contents-required` is missing from the tarball. `pnpm check`, the canary job and the release job run it before publishing; it reads both the array-shaped and the npm 12 object-shaped `npm pack --json` output.
|
|
15
|
+
- A Privacy Guard workflow runs on every push and pull request. It checks commit author, committer and trailer emails against an allowlist of GitHub noreply addresses, rejects private hostnames and internal IPs in commit metadata, scans tracked files against a privacy denylist, and runs a gitleaks secret scan.
|
|
16
|
+
|
|
7
17
|
### Changed
|
|
8
18
|
|
|
9
|
-
-
|
|
19
|
+
- `package.json` `homepage` is https://oss.vllnt.com/packages/typescript, with more accurate `keywords`. Publish path filters include `README.md`, `llms.txt` and `CHANGELOG.md`, so a documentation-only change publishes a canary.
|
|
20
|
+
- Upgraded the development dependencies `vitest` and `@vitest/coverage-v8` to 5.1.1 and `prettier` to 3.10.1, and added a scoped override to a patched `minimatch` 11 (11.0.9) for GHSA-g3hv-75wg-m249 (moderate, reached only through the development lint toolchain). Removed the unused root development dependency `@types/react-dom` (the integration fixtures declare their own). Presets and the packed file list are unchanged.
|
|
21
|
+
- Upgraded the development dependency `@vllnt/eslint-config` to 2.1.0 and the integration fixtures to `next` 16.4.6 and `vite` 8.3.8. No change to the presets or the packed file list.
|
|
22
|
+
- Moved the repository package manager to pnpm 12.22.0 (`packageManager`; the lockfile now also pins pnpm itself). No change to the presets or the packed file list.
|
|
23
|
+
|
|
24
|
+
### Fixed
|
|
25
|
+
|
|
26
|
+
- `pnpm check` type-checks the repository scripts and tests (`pnpm typecheck`, TypeScript 6 and 7). The root `tsconfig.json` enabled `checkJs`, but nothing ran it, and it had 23 errors under TypeScript 7 and 21 under TypeScript 6. The root `tsconfig.json` sets `declaration: false`, because it only type-checks.
|
|
10
27
|
|
|
11
28
|
## [3.0.0] - 2026-11-16
|
|
12
29
|
|
|
@@ -73,7 +90,9 @@ The flags add diagnostics and leave JavaScript output unchanged, but inferred de
|
|
|
73
90
|
- Added `base.json`, `nodejs.json`, `node-library.json`, `react.json`, and `nextjs.json` presets.
|
|
74
91
|
- Documented Node.js 22+ and TypeScript 5+ expectations.
|
|
75
92
|
|
|
76
|
-
[Unreleased]: https://github.com/vllnt/typescript/compare/
|
|
93
|
+
[Unreleased]: https://github.com/vllnt/typescript/compare/v3.0.1...HEAD
|
|
94
|
+
[3.0.1]: https://github.com/vllnt/typescript/compare/v3.0.0...v3.0.1
|
|
95
|
+
[3.0.0]: https://github.com/vllnt/typescript/compare/v2.0.1...v3.0.0
|
|
77
96
|
[2.0.1]: https://github.com/vllnt/typescript/compare/v2.0.0...v2.0.1
|
|
78
97
|
[2.0.0]: https://github.com/vllnt/typescript/compare/v1.0.0...v2.0.0
|
|
79
98
|
[1.0.0]: https://github.com/vllnt/typescript/releases/tag/v1.0.0
|
package/README.md
CHANGED
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
# @vllnt/typescript
|
|
2
2
|
|
|
3
|
-
Shared TypeScript configurations for Node.js, libraries, React, and Next.js. Version
|
|
3
|
+
Shared TypeScript configurations for Node.js, libraries, React, and Next.js. Version 3 targets the native TypeScript 7 compiler while retaining a tested TypeScript 6 migration path.
|
|
4
4
|
|
|
5
5
|
Use these independently in any project; no vllnt monorepo or runtime dependency
|
|
6
6
|
is required. Extend a preset, then supply project-specific paths and ambient types.
|
|
7
7
|
|
|
8
|
+
## For coding agents
|
|
9
|
+
|
|
10
|
+
The documentation ships inside the package: `node_modules/@vllnt/typescript/` contains `README.md`, `llms.txt` and `CHANGELOG.md` next to the preset files, and they match the installed version. Read them before writing a `tsconfig.json`.
|
|
11
|
+
|
|
8
12
|
## Install
|
|
9
13
|
|
|
10
14
|
For TypeScript 7 projects:
|
|
@@ -29,13 +33,15 @@ This is the [official side-by-side migration arrangement](https://devblogs.micro
|
|
|
29
33
|
|
|
30
34
|
## Presets
|
|
31
35
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
|
35
|
-
|
|
|
36
|
-
| `
|
|
37
|
-
| `
|
|
38
|
-
| `
|
|
36
|
+
Extend one preset per project. Every preset extends `base.json`, so it inherits the [base defaults](#base-defaults).
|
|
37
|
+
|
|
38
|
+
| Preset | Extend it for | Module / resolution | Target / lib | Emit | Other options |
|
|
39
|
+
| ------------------- | ----------------------------------------------------------------- | ------------------- | ---------------------------------- | ------------------------------------- | -------------------------------------------------------------- |
|
|
40
|
+
| `base.json` | Other environments; you set `module`, `target` and `lib` yourself | Not set | Not set | Not set | Strictness and interop defaults only |
|
|
41
|
+
| `nodejs.json` | Node.js applications | NodeNext / NodeNext | ES2024 / ES2024 | JavaScript, declarations, source maps | None |
|
|
42
|
+
| `node-library.json` | Publishable npm packages | NodeNext / NodeNext | ES2024 / ES2024 | JavaScript, declarations, both maps | `declarationMap` |
|
|
43
|
+
| `react.json` | Bundled React applications (for example Vite) | ESNext / Bundler | ES2022 / DOM, DOM.Iterable, ES2024 | JavaScript, declarations, source maps | `jsx: "react-jsx"` |
|
|
44
|
+
| `nextjs.json` | Next.js applications | ESNext / Bundler | ES2022 / DOM, DOM.Iterable, ES2024 | None (`noEmit`) | `jsx: "preserve"`, `allowJs`, `incremental`, the `next` plugin |
|
|
39
45
|
|
|
40
46
|
Emitting presets do not enable `incremental`. Unless you opt in, a clean build emits every output even when a `.tsbuildinfo` file is left over. If you set `incremental: true`, delete the `.tsbuildinfo` file together with the output directory before a clean build. `nextjs.json` keeps `incremental` because it does not emit; if you override `noEmit`, also set `incremental: false`.
|
|
41
47
|
|
|
@@ -81,6 +87,8 @@ Emitting presets do not enable `incremental`. Unless you opt in, a clean build e
|
|
|
81
87
|
}
|
|
82
88
|
```
|
|
83
89
|
|
|
90
|
+
When a bundler such as Vite emits the JavaScript, replace `outDir` with `"noEmit": true` so `tsc` only type-checks.
|
|
91
|
+
|
|
84
92
|
### Next.js
|
|
85
93
|
|
|
86
94
|
```json
|
|
@@ -148,7 +156,7 @@ The same applies to call arguments and to props you pass to libraries: `use({ na
|
|
|
148
156
|
|
|
149
157
|
`exactOptionalPropertyTypes` also changes declaration emit. When TypeScript infers a type that has an optional property, it now prints `count?: number` where it used to print `count?: number | undefined`. Types you annotate yourself are copied as written. If you publish a library, compare the `.d.ts` files before and after upgrading.
|
|
150
158
|
|
|
151
|
-
To adopt the flags one at a time, set the ones you are not ready for to `false` in your own `compilerOptions` (after `extends`) and remove the override as you fix each one. The fixtures in `tests/fixtures/flags` show a failing and an accepted form of each pattern.
|
|
159
|
+
To adopt the flags one at a time, set the ones you are not ready for to `false` in your own `compilerOptions` (after `extends`) and remove the override as you fix each one. The [fixtures in `tests/fixtures/flags`](https://github.com/vllnt/typescript/tree/main/tests/fixtures/flags) show a failing and an accepted form of each pattern.
|
|
152
160
|
|
|
153
161
|
## Migrating from version 1
|
|
154
162
|
|
|
@@ -165,14 +173,15 @@ TypeScript 7 also removes ES5 targeting, legacy module formats and resolution, `
|
|
|
165
173
|
|
|
166
174
|
## Compatibility
|
|
167
175
|
|
|
168
|
-
| Surface | Supported version
|
|
169
|
-
| ---------------------- |
|
|
170
|
-
| Node.js consumers | `>=22`
|
|
171
|
-
| TypeScript | `>=6.0.2 <8`
|
|
172
|
-
| Tested compilers | TypeScript
|
|
173
|
-
| Next.js integration | 16.4.
|
|
174
|
-
| React integration | 19.3.1
|
|
175
|
-
|
|
|
176
|
+
| Surface | Supported version |
|
|
177
|
+
| ---------------------- | -------------------------------------------------------------------------------- |
|
|
178
|
+
| Node.js consumers | `>=22` |
|
|
179
|
+
| TypeScript | `>=6.0.2 <8` |
|
|
180
|
+
| Tested compilers | TypeScript 7.0.2, and `@typescript/typescript6` 6.0.2 (its `tsc6` reports 6.0.3) |
|
|
181
|
+
| Next.js integration | 16.4.6 |
|
|
182
|
+
| React integration | 19.3.1 |
|
|
183
|
+
| Vite integration | 8.3.8 |
|
|
184
|
+
| Repository development | Node.js 22.13+, pnpm 12.22.0 |
|
|
176
185
|
|
|
177
186
|
## Development
|
|
178
187
|
|
|
@@ -182,7 +191,7 @@ pnpm check
|
|
|
182
191
|
pnpm pack --dry-run
|
|
183
192
|
```
|
|
184
193
|
|
|
185
|
-
The checks compile every preset with TypeScript 6 and 7, prove that each inherited strictness flag is active, verify declaration emit, install and compile the packed package, enforce full test-helper coverage, and build real React/Vite and Next.js fixtures.
|
|
194
|
+
The checks type-check the repository scripts and tests and compile every preset with TypeScript 6 and 7, prove that each inherited strictness flag is active, verify declaration emit, install and compile the packed package, enforce full test-helper coverage, and build real React/Vite and Next.js fixtures.
|
|
186
195
|
|
|
187
196
|
## Versioning
|
|
188
197
|
|
|
@@ -194,18 +203,24 @@ The checks compile every preset with TypeScript 6 and 7, prove that each inherit
|
|
|
194
203
|
## Documentation and support
|
|
195
204
|
|
|
196
205
|
- [LLM index](llms.txt) · [Changelog](CHANGELOG.md)
|
|
197
|
-
- [Contributing](CONTRIBUTING.md) · [Issues](https://github.com/vllnt/typescript/issues)
|
|
198
|
-
- [Security policy and private reporting](SECURITY.md)
|
|
206
|
+
- [Contributing](https://github.com/vllnt/typescript/blob/main/CONTRIBUTING.md) · [Issues](https://github.com/vllnt/typescript/issues)
|
|
207
|
+
- [Security policy and private reporting](https://github.com/vllnt/typescript/blob/main/SECURITY.md)
|
|
199
208
|
|
|
200
|
-
npm `latest` is stable `3.0.
|
|
209
|
+
npm `latest` is stable `3.0.1` at this audit. `@canary` selects moving prereleases;
|
|
201
210
|
pin and test them before adoption. The compatibility matrix above describes
|
|
202
211
|
this version's tested integrations, not a requirement to use every framework.
|
|
203
212
|
|
|
213
|
+
## Related packages
|
|
214
|
+
|
|
215
|
+
- [`@vllnt/eslint-config`](https://oss.vllnt.com/packages/eslint-config): strict ESLint presets for TypeScript projects. Use it for lint rules and `@vllnt/typescript` for compiler options; they are installed and configured separately.
|
|
216
|
+
|
|
204
217
|
## Author
|
|
205
218
|
|
|
206
219
|
Built by [bntvllnt](https://github.com/bntvllnt) · [bntvllnt.com](https://bntvllnt.com).
|
|
207
|
-
|
|
220
|
+
[Sponsor the work](https://github.com/sponsors/bntvllnt).
|
|
208
221
|
|
|
209
222
|
## License
|
|
210
223
|
|
|
211
224
|
[MIT](LICENSE)
|
|
225
|
+
|
|
226
|
+
Part of vllnt oss: <https://oss.vllnt.com>
|
package/llms.txt
CHANGED
|
@@ -4,13 +4,17 @@
|
|
|
4
4
|
|
|
5
5
|
- npm: https://www.npmjs.com/package/@vllnt/typescript
|
|
6
6
|
- Repository: https://github.com/vllnt/typescript
|
|
7
|
-
- Documentation:
|
|
8
|
-
- Changelog:
|
|
7
|
+
- Documentation: [README](./README.md)
|
|
8
|
+
- Changelog: [CHANGELOG](./CHANGELOG.md)
|
|
9
9
|
- License: MIT
|
|
10
10
|
|
|
11
11
|
Install independently in any project; no vllnt monorepo is required. npm latest
|
|
12
|
-
is stable 3.0.
|
|
13
|
-
prereleases. See [Contributing](CONTRIBUTING.md) and the [Security policy](SECURITY.md).
|
|
12
|
+
is stable 3.0.1 at this audit; canary is a moving prerelease channel. Pin and test
|
|
13
|
+
prereleases. See [Contributing](https://github.com/vllnt/typescript/blob/main/CONTRIBUTING.md) and the [Security policy](https://github.com/vllnt/typescript/blob/main/SECURITY.md).
|
|
14
|
+
|
|
15
|
+
## For coding agents
|
|
16
|
+
|
|
17
|
+
The documentation ships inside the package: `node_modules/@vllnt/typescript/` contains `README.md`, `llms.txt` and `CHANGELOG.md` next to the preset files, and they match the installed version. Read them before writing a `tsconfig.json`.
|
|
14
18
|
|
|
15
19
|
## Compatibility
|
|
16
20
|
|
|
@@ -21,11 +25,13 @@ prereleases. See [Contributing](CONTRIBUTING.md) and the [Security policy](SECUR
|
|
|
21
25
|
|
|
22
26
|
## Presets
|
|
23
27
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
- `@vllnt/typescript/
|
|
27
|
-
- `@vllnt/typescript/
|
|
28
|
-
- `@vllnt/typescript/
|
|
28
|
+
Extend one preset per project; every preset extends `base.json`.
|
|
29
|
+
|
|
30
|
+
- `@vllnt/typescript/base.json`: strict shared defaults and explicit ambient types; sets no `module`, `target` or `lib`
|
|
31
|
+
- `@vllnt/typescript/nodejs.json`: Node.js applications; NodeNext, ES2024, emits declarations and source maps
|
|
32
|
+
- `@vllnt/typescript/node-library.json`: publishable npm packages; as `nodejs.json` plus `declarationMap` (declaration maps)
|
|
33
|
+
- `@vllnt/typescript/react.json`: bundled React applications; ESNext with Bundler resolution, ES2022, DOM libs, `jsx: "react-jsx"`, emits declarations and source maps; set `noEmit: true` when a bundler such as Vite emits
|
|
34
|
+
- `@vllnt/typescript/nextjs.json`: Next.js applications; ESNext with Bundler resolution, ES2022, DOM libs, `jsx: "preserve"`, `noEmit`, `incremental`, `allowJs`, the `next` plugin
|
|
29
35
|
|
|
30
36
|
Consumers should list required ambient packages in `types` and set `rootDir` in emitting projects.
|
|
31
37
|
Emitting presets do not enable `incremental`, so a clean build emits every output even when a `.tsbuildinfo` file is left over. Projects that set `incremental: true` should delete the `.tsbuildinfo` file with the output directory before a clean build.
|
|
@@ -42,3 +48,11 @@ Migrating from version 2 (the last four flags are new):
|
|
|
42
48
|
- `exactOptionalPropertyTypes` (TS2375, TS2379, TS2322): write `prop?: T | undefined` where `undefined` is a valid value, or omit the key.
|
|
43
49
|
- JavaScript output does not change. Under `exactOptionalPropertyTypes`, inferred declarations can: `count?: number | undefined` is emitted as `count?: number`.
|
|
44
50
|
- To adopt them gradually, set a flag to `false` in the project's own `compilerOptions` after `extends`.
|
|
51
|
+
|
|
52
|
+
## Related packages
|
|
53
|
+
|
|
54
|
+
- [@vllnt/eslint-config](https://oss.vllnt.com/packages/eslint-config): strict ESLint presets for TypeScript projects; lint rules, configured separately from these compiler presets.
|
|
55
|
+
|
|
56
|
+
## Ecosystem
|
|
57
|
+
|
|
58
|
+
- vllnt oss index: https://oss.vllnt.com/llms.txt
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vllnt/typescript",
|
|
3
|
-
"version": "3.0.1-canary.
|
|
3
|
+
"version": "3.0.1-canary.411eca5",
|
|
4
4
|
"description": "Shared TypeScript configurations for vllnt projects",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": {
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"type": "github",
|
|
12
12
|
"url": "https://github.com/sponsors/bntvllnt"
|
|
13
13
|
},
|
|
14
|
-
"homepage": "https://
|
|
14
|
+
"homepage": "https://oss.vllnt.com/packages/typescript",
|
|
15
15
|
"bugs": {
|
|
16
16
|
"url": "https://github.com/vllnt/typescript/issues"
|
|
17
17
|
},
|
|
@@ -23,9 +23,12 @@
|
|
|
23
23
|
"typescript",
|
|
24
24
|
"tsconfig",
|
|
25
25
|
"config",
|
|
26
|
-
"shared-config"
|
|
26
|
+
"shared-config",
|
|
27
|
+
"nodejs",
|
|
28
|
+
"react",
|
|
29
|
+
"nextjs"
|
|
27
30
|
],
|
|
28
|
-
"packageManager": "pnpm@
|
|
31
|
+
"packageManager": "pnpm@12.22.0",
|
|
29
32
|
"engines": {
|
|
30
33
|
"node": ">=22"
|
|
31
34
|
},
|
|
@@ -35,6 +38,7 @@
|
|
|
35
38
|
"nodejs.json",
|
|
36
39
|
"node-library.json",
|
|
37
40
|
"react.json",
|
|
41
|
+
"README.md",
|
|
38
42
|
"CHANGELOG.md",
|
|
39
43
|
"llms.txt"
|
|
40
44
|
],
|
|
@@ -53,8 +57,10 @@
|
|
|
53
57
|
"test": "vitest run",
|
|
54
58
|
"test:coverage": "vitest run --coverage",
|
|
55
59
|
"test:integration": "pnpm --dir tests/integration/react build && pnpm --dir tests/integration/nextjs build",
|
|
56
|
-
"check": "pnpm format:check && pnpm lint && pnpm test:coverage && pnpm test:integration",
|
|
57
|
-
"check:agents": "node -e \"const f=require('node:fs');if(!f.existsSync('AGENTS.md')||f.existsSync('CLAUDE.md')||f.existsSync('.claude'))process.exit(1)\""
|
|
60
|
+
"check": "pnpm format:check && pnpm lint && pnpm typecheck && pnpm test:coverage && pnpm test:integration && pnpm test:package",
|
|
61
|
+
"check:agents": "node -e \"const f=require('node:fs');if(!f.existsSync('AGENTS.md')||f.existsSync('CLAUDE.md')||f.existsSync('.claude'))process.exit(1)\"",
|
|
62
|
+
"test:package": "bash scripts/test-check-package-contents.sh && bash scripts/check-package-contents.sh",
|
|
63
|
+
"typecheck": "tsc --project tsconfig.json && tsc6 --project tsconfig.json"
|
|
58
64
|
},
|
|
59
65
|
"peerDependencies": {
|
|
60
66
|
"typescript": ">=6.0.2 <8"
|
|
@@ -63,12 +69,12 @@
|
|
|
63
69
|
"@types/node": "22.20.5",
|
|
64
70
|
"@types/react": "19.3.0",
|
|
65
71
|
"@typescript/native": "npm:typescript@7.0.2",
|
|
66
|
-
"@vitest/coverage-v8": "5.1.
|
|
67
|
-
"@vllnt/eslint-config": "2.
|
|
72
|
+
"@vitest/coverage-v8": "5.1.1",
|
|
73
|
+
"@vllnt/eslint-config": "2.1.0",
|
|
68
74
|
"eslint": "9.39.5",
|
|
69
75
|
"prettier": "3.10.1",
|
|
70
76
|
"typescript": "npm:@typescript/typescript6@6.0.2",
|
|
71
|
-
"vitest": "5.1.
|
|
77
|
+
"vitest": "5.1.1"
|
|
72
78
|
},
|
|
73
79
|
"publishConfig": {
|
|
74
80
|
"access": "public",
|