@vllnt/typescript 1.0.0-canary.bd3fb92 → 2.0.0-canary.08285b5
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 +39 -0
- package/README.md +83 -21
- package/base.json +4 -0
- package/llms-full.txt +70 -0
- package/llms.txt +27 -0
- package/package.json +53 -8
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project are documented in this file. The format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project uses semantic versioning.
|
|
4
|
+
|
|
5
|
+
## [Unreleased]
|
|
6
|
+
|
|
7
|
+
## [2.0.0] - 2026-08-31
|
|
8
|
+
|
|
9
|
+
### Added
|
|
10
|
+
|
|
11
|
+
- Added compiler-backed fixtures for every preset under TypeScript 6 and TypeScript 7.
|
|
12
|
+
- Added installed-tarball, declaration-emit, React/Vite, and Next.js integration checks.
|
|
13
|
+
- Added pnpm, formatting, linting, Vitest, and 100% test-helper coverage gates.
|
|
14
|
+
- Added explicit JSON package exports and public package documentation.
|
|
15
|
+
|
|
16
|
+
### Changed
|
|
17
|
+
|
|
18
|
+
- Prepared the package as version `2.0.0` so merges publish `2.0.0-canary.<sha>` to the npm `canary` tag.
|
|
19
|
+
- Upgraded the primary compiler to TypeScript 7.0.2 while retaining the TypeScript 6 compatibility API for dependent tooling.
|
|
20
|
+
- Made ambient types explicit with `types: []`, enabled `noUncheckedSideEffectImports` and stable type ordering, and disabled library replacement.
|
|
21
|
+
- Updated CI and trusted publishing workflows for deterministic pnpm installs, current actions, pinned OIDC-capable npm, provenance, and generated GitHub release notes.
|
|
22
|
+
|
|
23
|
+
### Breaking
|
|
24
|
+
|
|
25
|
+
- Dropped TypeScript 5; supported compilers are now TypeScript `>=6.0.2 <8`.
|
|
26
|
+
- Ambient `@types` packages must be listed explicitly by consumers.
|
|
27
|
+
- Emitting projects must set `rootDir` explicitly to retain their intended output layout.
|
|
28
|
+
|
|
29
|
+
## [1.0.0] - 2026-03-05
|
|
30
|
+
|
|
31
|
+
### Added
|
|
32
|
+
|
|
33
|
+
- Initial public release of shared TypeScript configuration presets for VLLNT projects.
|
|
34
|
+
- Added `base.json`, `nodejs.json`, `node-library.json`, `react.json`, and `nextjs.json` presets.
|
|
35
|
+
- Documented Node.js 22+ and TypeScript 5+ expectations.
|
|
36
|
+
|
|
37
|
+
[Unreleased]: https://github.com/vllnt/typescript/compare/v2.0.0...HEAD
|
|
38
|
+
[2.0.0]: https://github.com/vllnt/typescript/compare/v1.0.0...v2.0.0
|
|
39
|
+
[1.0.0]: https://github.com/vllnt/typescript/releases/tag/v1.0.0
|
package/README.md
CHANGED
|
@@ -1,26 +1,38 @@
|
|
|
1
1
|
# @vllnt/typescript
|
|
2
2
|
|
|
3
|
-
Shared TypeScript configurations for
|
|
3
|
+
Shared TypeScript configurations for Node.js, libraries, React, and Next.js. Version 2 targets the native TypeScript 7 compiler while retaining a tested TypeScript 6 migration path.
|
|
4
4
|
|
|
5
5
|
## Install
|
|
6
6
|
|
|
7
|
+
For TypeScript 7 projects:
|
|
8
|
+
|
|
7
9
|
```sh
|
|
8
|
-
|
|
10
|
+
pnpm add --save-dev @vllnt/typescript@^2 typescript@^7
|
|
9
11
|
```
|
|
10
12
|
|
|
11
|
-
|
|
13
|
+
For tools that still require the TypeScript JavaScript API, install TypeScript 7 as the build compiler and TypeScript 6 under the canonical package name:
|
|
14
|
+
|
|
15
|
+
```json
|
|
16
|
+
{
|
|
17
|
+
"devDependencies": {
|
|
18
|
+
"@typescript/native": "npm:typescript@^7.0.2",
|
|
19
|
+
"@vllnt/typescript": "^2.0.0",
|
|
20
|
+
"typescript": "npm:@typescript/typescript6@^6.0.2"
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
```
|
|
12
24
|
|
|
13
|
-
|
|
14
|
-
|--------|----------|--------|--------|
|
|
15
|
-
| `base.json` | Foundation (extended by others) | - | - |
|
|
16
|
-
| `nodejs.json` | Node.js applications | NodeNext | ES2024 |
|
|
17
|
-
| `node-library.json` | Publishable npm packages | NodeNext | ES2024 |
|
|
18
|
-
| `react.json` | React apps (Vite, CRA, etc.) | ESNext | ES2022 |
|
|
19
|
-
| `nextjs.json` | Next.js applications | ESNext | ES2022 |
|
|
25
|
+
This is the [official side-by-side migration arrangement](https://devblogs.microsoft.com/typescript/announcing-typescript-7-0/): `tsc` runs TypeScript 7, `tsc6` runs TypeScript 6, and tools such as `typescript-eslint` can continue importing the TypeScript 6 API.
|
|
20
26
|
|
|
21
|
-
##
|
|
27
|
+
## Presets
|
|
22
28
|
|
|
23
|
-
|
|
29
|
+
| Preset | Use case | Module resolution | Target | Emit |
|
|
30
|
+
| ------------------- | ------------------------------------ | ----------------- | --------- | ------------------------------------- |
|
|
31
|
+
| `base.json` | Foundation extended by other presets | Inherited | Inherited | Inherited |
|
|
32
|
+
| `nodejs.json` | Node.js applications | NodeNext | ES2024 | JavaScript, declarations, source maps |
|
|
33
|
+
| `node-library.json` | Publishable npm packages | NodeNext | ES2024 | JavaScript, declarations and maps |
|
|
34
|
+
| `react.json` | Bundled React applications | Bundler | ES2022 | JavaScript, declarations, source maps |
|
|
35
|
+
| `nextjs.json` | Next.js applications | Bundler | ES2022 | None |
|
|
24
36
|
|
|
25
37
|
### Node.js application
|
|
26
38
|
|
|
@@ -29,20 +41,22 @@ Extend a preset in your `tsconfig.json`:
|
|
|
29
41
|
"extends": "@vllnt/typescript/nodejs.json",
|
|
30
42
|
"compilerOptions": {
|
|
31
43
|
"outDir": "dist",
|
|
32
|
-
"rootDir": "src"
|
|
44
|
+
"rootDir": "src",
|
|
45
|
+
"types": ["node"]
|
|
33
46
|
},
|
|
34
47
|
"include": ["src"]
|
|
35
48
|
}
|
|
36
49
|
```
|
|
37
50
|
|
|
38
|
-
### Node library
|
|
51
|
+
### Node library
|
|
39
52
|
|
|
40
53
|
```json
|
|
41
54
|
{
|
|
42
55
|
"extends": "@vllnt/typescript/node-library.json",
|
|
43
56
|
"compilerOptions": {
|
|
44
57
|
"outDir": "dist",
|
|
45
|
-
"rootDir": "src"
|
|
58
|
+
"rootDir": "src",
|
|
59
|
+
"types": ["node"]
|
|
46
60
|
},
|
|
47
61
|
"include": ["src"]
|
|
48
62
|
}
|
|
@@ -55,7 +69,8 @@ Extend a preset in your `tsconfig.json`:
|
|
|
55
69
|
"extends": "@vllnt/typescript/react.json",
|
|
56
70
|
"compilerOptions": {
|
|
57
71
|
"outDir": "dist",
|
|
58
|
-
"rootDir": "src"
|
|
72
|
+
"rootDir": "src",
|
|
73
|
+
"types": ["react"]
|
|
59
74
|
},
|
|
60
75
|
"include": ["src"]
|
|
61
76
|
}
|
|
@@ -66,26 +81,73 @@ Extend a preset in your `tsconfig.json`:
|
|
|
66
81
|
```json
|
|
67
82
|
{
|
|
68
83
|
"extends": "@vllnt/typescript/nextjs.json",
|
|
84
|
+
"compilerOptions": {
|
|
85
|
+
"types": ["node", "react"]
|
|
86
|
+
},
|
|
69
87
|
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"],
|
|
70
88
|
"exclude": ["node_modules"]
|
|
71
89
|
}
|
|
72
90
|
```
|
|
73
91
|
|
|
74
|
-
##
|
|
92
|
+
## Base defaults
|
|
75
93
|
|
|
76
|
-
|
|
94
|
+
Every specialized preset inherits:
|
|
77
95
|
|
|
78
96
|
- `strict: true`
|
|
79
97
|
- `isolatedModules: true`
|
|
80
98
|
- `noUncheckedIndexedAccess: true`
|
|
99
|
+
- `noUncheckedSideEffectImports: true`
|
|
100
|
+
- `forceConsistentCasingInFileNames: true`
|
|
81
101
|
- `skipLibCheck: true`
|
|
82
102
|
- `esModuleInterop: true`
|
|
83
103
|
- `resolveJsonModule: true`
|
|
104
|
+
- `stableTypeOrdering: true`
|
|
105
|
+
- `libReplacement: false`
|
|
106
|
+
- `types: []`
|
|
107
|
+
|
|
108
|
+
Ambient type packages are intentionally opt-in. List every required package in the consuming project's `types` array. Emitting projects must also set `rootDir` explicitly.
|
|
109
|
+
|
|
110
|
+
`stableTypeOrdering` aligns TypeScript 6 output with TypeScript 7. It can make TypeScript 6 type-checking slower; TypeScript 7 always uses stable ordering.
|
|
111
|
+
|
|
112
|
+
## Migrating from version 1
|
|
113
|
+
|
|
114
|
+
Version 2 supports TypeScript `>=6.0.2 <8` and drops TypeScript 5. Before upgrading:
|
|
115
|
+
|
|
116
|
+
1. Remove `baseUrl` and make `paths` targets relative to the project root.
|
|
117
|
+
2. Replace legacy `moduleResolution: "node"` with `"NodeNext"` for Node.js or `"Bundler"` for bundled applications.
|
|
118
|
+
3. Set `rootDir` in projects that emit files.
|
|
119
|
+
4. List required ambient packages in `types`, such as `node` or `vitest/globals`.
|
|
120
|
+
5. Use Next.js 16.3 or newer when building with TypeScript 7.
|
|
121
|
+
6. Keep TypeScript 6 available through the side-by-side setup while ESLint or other tools require the legacy JavaScript API.
|
|
122
|
+
|
|
123
|
+
TypeScript 7 also removes ES5 targeting, legacy module formats and resolution, `downlevelIteration`, and the ability to disable `esModuleInterop`, `allowSyntheticDefaultImports`, or strict mode.
|
|
124
|
+
|
|
125
|
+
## Compatibility
|
|
126
|
+
|
|
127
|
+
| Surface | Supported version |
|
|
128
|
+
| ---------------------- | ------------------------------------------------------- |
|
|
129
|
+
| Node.js consumers | `>=22` |
|
|
130
|
+
| TypeScript | `>=6.0.2 <8` |
|
|
131
|
+
| Tested compilers | TypeScript 6 compatibility package and TypeScript 7.0.2 |
|
|
132
|
+
| Next.js integration | 16.3.3 |
|
|
133
|
+
| React integration | 19.2.8 |
|
|
134
|
+
| Repository development | Node.js 22.13+, pnpm 11.24.0 |
|
|
135
|
+
|
|
136
|
+
## Development
|
|
137
|
+
|
|
138
|
+
```sh
|
|
139
|
+
pnpm install --frozen-lockfile
|
|
140
|
+
pnpm check
|
|
141
|
+
pnpm pack --dry-run
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
The checks compile every preset with TypeScript 6 and 7, verify declaration emit, install and compile the packed package, enforce full test-helper coverage, and build real React/Vite and Next.js fixtures.
|
|
84
145
|
|
|
85
|
-
##
|
|
146
|
+
## Versioning
|
|
86
147
|
|
|
87
|
-
-
|
|
88
|
-
-
|
|
148
|
+
- **Major:** raised TypeScript floor, stricter diagnostics, target/module/emit changes, or removed/renamed presets.
|
|
149
|
+
- **Minor:** additive presets or backward-compatible options.
|
|
150
|
+
- **Patch:** fixes, documentation, tests, or CI changes without consumer-visible behavior changes.
|
|
89
151
|
|
|
90
152
|
## License
|
|
91
153
|
|
package/base.json
CHANGED
package/llms-full.txt
ADDED
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
# @vllnt/typescript full reference
|
|
2
|
+
|
|
3
|
+
`@vllnt/typescript` publishes strict JSON compiler presets for Node.js 22+, npm libraries, React, and Next.js. Version 2 supports TypeScript `>=6.0.2 <8` and is validated with the TypeScript 6 compatibility package and native TypeScript 7.0.2.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
TypeScript 7-only projects install:
|
|
8
|
+
|
|
9
|
+
```sh
|
|
10
|
+
pnpm add --save-dev @vllnt/typescript@^2 typescript@^7
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
Tools that still import the legacy compiler API use the official side-by-side arrangement:
|
|
14
|
+
|
|
15
|
+
```json
|
|
16
|
+
{
|
|
17
|
+
"devDependencies": {
|
|
18
|
+
"@typescript/native": "npm:typescript@^7.0.2",
|
|
19
|
+
"@vllnt/typescript": "^2.0.0",
|
|
20
|
+
"typescript": "npm:@typescript/typescript6@^6.0.2"
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
This exposes native TypeScript 7 as `tsc`, TypeScript 6 as `tsc6`, and TypeScript 6's JavaScript API through the `typescript` package name.
|
|
26
|
+
|
|
27
|
+
## Presets
|
|
28
|
+
|
|
29
|
+
| Preset | Use case | Module resolution | Target | Emit |
|
|
30
|
+
| --- | --- | --- | --- | --- |
|
|
31
|
+
| `base.json` | Shared foundation | Inherited | Inherited | Inherited |
|
|
32
|
+
| `nodejs.json` | Node.js applications | NodeNext | ES2024 | JavaScript, declarations, maps |
|
|
33
|
+
| `node-library.json` | Publishable npm packages | NodeNext | ES2024 | JavaScript, declarations and maps |
|
|
34
|
+
| `react.json` | Bundled React applications | Bundler | ES2022 | JavaScript, declarations, maps |
|
|
35
|
+
| `nextjs.json` | Next.js applications | Bundler | ES2022 | None |
|
|
36
|
+
|
|
37
|
+
## Shared compiler contract
|
|
38
|
+
|
|
39
|
+
All specialized presets inherit:
|
|
40
|
+
|
|
41
|
+
- `strict: true`
|
|
42
|
+
- `isolatedModules: true`
|
|
43
|
+
- `noUncheckedIndexedAccess: true`
|
|
44
|
+
- `noUncheckedSideEffectImports: true`
|
|
45
|
+
- `forceConsistentCasingInFileNames: true`
|
|
46
|
+
- `skipLibCheck: true`
|
|
47
|
+
- `esModuleInterop: true`
|
|
48
|
+
- `resolveJsonModule: true`
|
|
49
|
+
- `stableTypeOrdering: true`
|
|
50
|
+
- `libReplacement: false`
|
|
51
|
+
- `types: []`
|
|
52
|
+
|
|
53
|
+
Ambient types are opt-in. Consumers should add entries such as `node`, `react`, or `vitest/globals` to `types`. Emitting projects must set `rootDir` explicitly.
|
|
54
|
+
|
|
55
|
+
## Migration from version 1
|
|
56
|
+
|
|
57
|
+
Version 2 drops TypeScript 5. Consumers must remove `baseUrl`, avoid legacy module formats and resolution, use explicit `rootDir` and `types`, and run Next.js 16.3 or newer for native TypeScript 7 builds. Keep the TypeScript 6 compatibility API installed while tools such as `typescript-eslint` need it.
|
|
58
|
+
|
|
59
|
+
## Package validation
|
|
60
|
+
|
|
61
|
+
The repository compiles every preset with TypeScript 6 and 7, verifies strictness and declaration emit, installs the generated tarball into an isolated consumer, enforces its exact file surface, and builds real React/Vite and Next.js fixtures. The package has no runtime dependencies; TypeScript is a peer dependency.
|
|
62
|
+
|
|
63
|
+
## Resources
|
|
64
|
+
|
|
65
|
+
- Main documentation: `README.md`
|
|
66
|
+
- Release history: `CHANGELOG.md`
|
|
67
|
+
- Contributions: `CONTRIBUTING.md`
|
|
68
|
+
- Security policy: `SECURITY.md`
|
|
69
|
+
- Repository: https://github.com/vllnt/typescript
|
|
70
|
+
- License: MIT
|
package/llms.txt
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# @vllnt/typescript
|
|
2
|
+
|
|
3
|
+
> Strict shared TypeScript presets for Node.js, libraries, React, and Next.js, tested with TypeScript 6 and the native TypeScript 7 compiler.
|
|
4
|
+
|
|
5
|
+
- npm: https://www.npmjs.com/package/@vllnt/typescript
|
|
6
|
+
- Repository: https://github.com/vllnt/typescript
|
|
7
|
+
- Documentation: https://github.com/vllnt/typescript#readme
|
|
8
|
+
- Changelog: https://github.com/vllnt/typescript/blob/main/CHANGELOG.md
|
|
9
|
+
- Full reference: https://github.com/vllnt/typescript/blob/main/llms-full.txt
|
|
10
|
+
- License: MIT
|
|
11
|
+
|
|
12
|
+
## Compatibility
|
|
13
|
+
|
|
14
|
+
- Node.js consumers: 22 or newer
|
|
15
|
+
- TypeScript: `>=6.0.2 <8`
|
|
16
|
+
- TypeScript 7 migration: native `tsc` can run beside the TypeScript 6 compatibility API
|
|
17
|
+
- Runtime dependencies: none; TypeScript is a peer dependency
|
|
18
|
+
|
|
19
|
+
## Presets
|
|
20
|
+
|
|
21
|
+
- `@vllnt/typescript/base.json`: strict shared defaults and explicit ambient types
|
|
22
|
+
- `@vllnt/typescript/nodejs.json`: NodeNext Node.js applications targeting ES2024
|
|
23
|
+
- `@vllnt/typescript/node-library.json`: publishable NodeNext libraries with declaration maps
|
|
24
|
+
- `@vllnt/typescript/react.json`: bundled React applications using `react-jsx`
|
|
25
|
+
- `@vllnt/typescript/nextjs.json`: no-emit Next.js applications
|
|
26
|
+
|
|
27
|
+
Consumers should list required ambient packages in `types` and set `rootDir` in emitting projects.
|
package/package.json
CHANGED
|
@@ -1,13 +1,23 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vllnt/typescript",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0-canary.08285b5",
|
|
4
4
|
"description": "Shared TypeScript configurations for vllnt projects",
|
|
5
5
|
"license": "MIT",
|
|
6
|
-
"author":
|
|
6
|
+
"author": {
|
|
7
|
+
"name": "bntvllnt",
|
|
8
|
+
"url": "https://bntvllnt.com"
|
|
9
|
+
},
|
|
10
|
+
"funding": {
|
|
11
|
+
"type": "github",
|
|
12
|
+
"url": "https://github.com/sponsors/bntvllnt"
|
|
13
|
+
},
|
|
7
14
|
"homepage": "https://github.com/vllnt/typescript#readme",
|
|
15
|
+
"bugs": {
|
|
16
|
+
"url": "https://github.com/vllnt/typescript/issues"
|
|
17
|
+
},
|
|
8
18
|
"repository": {
|
|
9
19
|
"type": "git",
|
|
10
|
-
"url": "https://github.com/vllnt/typescript.git"
|
|
20
|
+
"url": "git+https://github.com/vllnt/typescript.git"
|
|
11
21
|
},
|
|
12
22
|
"keywords": [
|
|
13
23
|
"typescript",
|
|
@@ -15,6 +25,7 @@
|
|
|
15
25
|
"config",
|
|
16
26
|
"shared-config"
|
|
17
27
|
],
|
|
28
|
+
"packageManager": "pnpm@11.24.0",
|
|
18
29
|
"engines": {
|
|
19
30
|
"node": ">=22"
|
|
20
31
|
},
|
|
@@ -23,13 +34,47 @@
|
|
|
23
34
|
"nextjs.json",
|
|
24
35
|
"nodejs.json",
|
|
25
36
|
"node-library.json",
|
|
26
|
-
"react.json"
|
|
37
|
+
"react.json",
|
|
38
|
+
"CHANGELOG.md",
|
|
39
|
+
"llms.txt",
|
|
40
|
+
"llms-full.txt"
|
|
27
41
|
],
|
|
42
|
+
"exports": {
|
|
43
|
+
"./base.json": "./base.json",
|
|
44
|
+
"./nextjs.json": "./nextjs.json",
|
|
45
|
+
"./nodejs.json": "./nodejs.json",
|
|
46
|
+
"./node-library.json": "./node-library.json",
|
|
47
|
+
"./react.json": "./react.json",
|
|
48
|
+
"./package.json": "./package.json"
|
|
49
|
+
},
|
|
28
50
|
"scripts": {
|
|
29
|
-
"
|
|
30
|
-
"
|
|
51
|
+
"format": "prettier --write .",
|
|
52
|
+
"format:check": "prettier --check .",
|
|
53
|
+
"lint": "eslint .",
|
|
54
|
+
"test": "vitest run",
|
|
55
|
+
"test:coverage": "vitest run --coverage",
|
|
56
|
+
"test:integration": "pnpm --dir tests/integration/react build && pnpm --dir tests/integration/nextjs build",
|
|
57
|
+
"check": "pnpm format:check && pnpm lint && pnpm test:coverage && pnpm test:integration",
|
|
58
|
+
"prepublishOnly": "pnpm check"
|
|
59
|
+
},
|
|
60
|
+
"peerDependencies": {
|
|
61
|
+
"typescript": ">=6.0.2 <8"
|
|
62
|
+
},
|
|
63
|
+
"devDependencies": {
|
|
64
|
+
"@types/node": "22.20.1",
|
|
65
|
+
"@types/react": "19.2.18",
|
|
66
|
+
"@types/react-dom": "19.2.5",
|
|
67
|
+
"@typescript/native": "npm:typescript@7.0.2",
|
|
68
|
+
"@vitest/coverage-v8": "4.1.11",
|
|
69
|
+
"@vllnt/eslint-config": "1.0.1",
|
|
70
|
+
"eslint": "9.39.5",
|
|
71
|
+
"prettier": "3.9.6",
|
|
72
|
+
"typescript": "npm:@typescript/typescript6@6.0.2",
|
|
73
|
+
"vitest": "4.1.11"
|
|
31
74
|
},
|
|
32
75
|
"publishConfig": {
|
|
33
|
-
"access": "public"
|
|
34
|
-
|
|
76
|
+
"access": "public",
|
|
77
|
+
"provenance": true
|
|
78
|
+
},
|
|
79
|
+
"sideEffects": false
|
|
35
80
|
}
|