@codefast/typescript-config 0.11.0 → 0.12.0

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 CHANGED
@@ -1,5 +1,14 @@
1
1
  # @codefast/typescript-config
2
2
 
3
+ ## 0.12.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#1188](https://github.com/codefastlabs/codefast/pull/1188) Every `@codefast/*` package now requires Node.js 24.15 or later and drops Node 22. The packages ship as one set, so they
8
+ share one floor instead of each sitting on its own 22.x release. `@codefast/typescript-config` removes the `node22.json`
9
+ and `node22-dom.json` overlays; extend a preset alone. `codefast audit engines` reports a published package whose floor
10
+ differs from the highest one any published package declares.
11
+
3
12
  ## 0.11.0
4
13
 
5
14
  ### Minor Changes
package/README.md CHANGED
@@ -19,8 +19,7 @@ The presets are plain JSON `tsconfig` files. There's no runtime code, and nothin
19
19
  way Vite, esbuild, and friends resolve them.
20
20
  - **`lib` and `target` match the runtime floors**: both are `ES2025`, the newest edition that Node 24 and the browser
21
21
  floor both ship ([support policy](../../SUPPORT.md)). A builtin newer than that, such as `Map.prototype.getOrInsert`,
22
- is a type error here rather than a runtime crash on the floor. A package whose Node floor is 22 layers a floor overlay
23
- on top, which narrows both to what Node 22 ships.
22
+ is a type error here rather than a runtime crash on the floor.
24
23
  - **Ambient types follow the runtime.** No preset loads `@types/node` or lists `ESNext.Disposable`. A program that runs
25
24
  on Node adds `types: ["node"]`, which brings the Node globals and explicit resource management with it. A browser
26
25
  program leaves both out: Safari has not shipped explicit resource management yet.
@@ -33,7 +32,7 @@ The presets are plain JSON `tsconfig` files. There's no runtime code, and nothin
33
32
  pnpm add -D @codefast/typescript-config
34
33
  ```
35
34
 
36
- `@codefast/typescript-config` requires Node.js 22.12 or later, and `typescript` 7 or later as a peer dependency —
35
+ `@codefast/typescript-config` requires Node.js 24.15 or later, and `typescript` 7 or later as a peer dependency —
37
36
  TypeScript 7 is the one compiler the presets are checked against. The package is published on 0.x and versioned on its
38
37
  own track: breaking changes ship as minor versions, so pin the minor version when you need stability.
39
38
 
@@ -68,8 +67,6 @@ Options you set locally always win, so adjusting a preset takes one line — her
68
67
  | `library.json` | `base.json` | Headless packages: `lib` is `ES2025` only, so relying on a browser global is a type error. A package that runs on Node adds `types: ["node"]`. |
69
68
  | `react.json` | `base.json` | React with the automatic JSX runtime (`jsx: "react-jsx"`) — components need no `React` import. |
70
69
  | `next.json` | `base.json` | Next.js apps: `jsx: "preserve"`, `incremental` builds, and the `next` TypeScript plugin. |
71
- | `node22.json` | (overlay) | Node 22 floor for a headless package: `lib` is `ES2024` plus the Set methods and iterator helpers Node 22 ships, and `target` is `ES2024`. |
72
- | `node22-dom.json` | (overlay) | Node 22 floor for a package that also renders in a browser: the same, with `DOM` and `DOM.Iterable`. |
73
70
  | `library-build.json` | (overlay) | Build-emit overrides for a build config: `noEmit: false`, `declaration` + `isolatedDeclarations`, declaration and source maps, and `types: []`, so test-only ambient types stay out of the build. |
74
71
 
75
72
  ### Choosing a preset
@@ -117,22 +114,6 @@ Next.js 16.3 and later type-check with TypeScript 7 through its `tsc` CLI (`expe
117
114
  default). Earlier Next.js releases need TypeScript 6's compiler API, so an app on one of them stays on 0.9.x of this
118
115
  package.
119
116
 
120
- ### Targeting a Node 22 floor
121
-
122
- The presets assume Node 24. A package whose `engines.node` floor is on Node 22 lists a floor overlay last in `extends`,
123
- so `lib` and `target` drop to what Node 22 ships and `RegExp.escape`, `Promise.try`, `Float16Array` or a regular
124
- expression modifier become type errors rather than crashes on the floor:
125
-
126
- ```json
127
- {
128
- "extends": ["@codefast/typescript-config/react.json", "@codefast/typescript-config/node22-dom.json"],
129
- "include": ["src"]
130
- }
131
- ```
132
-
133
- `node22.json` replaces `lib` with no DOM, so a headless package pairs it with `library.json`; a package that renders in
134
- a browser takes `node22-dom.json` instead. A local `lib` still wins over both.
135
-
136
117
  ### Building with `tsc`
137
118
 
138
119
  `library-build.json` is an overlay, not a standalone preset. It carries only the emit options, so layer it over your
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codefast/typescript-config",
3
- "version": "0.11.0",
3
+ "version": "0.12.0",
4
4
  "description": "Shared TypeScript configuration for the monorepo",
5
5
  "keywords": [
6
6
  "browser",
@@ -35,8 +35,6 @@
35
35
  "./library.json": "./library.json",
36
36
  "./library-build.json": "./library-build.json",
37
37
  "./next.json": "./next.json",
38
- "./node22.json": "./node22.json",
39
- "./node22-dom.json": "./node22-dom.json",
40
38
  "./react.json": "./react.json"
41
39
  },
42
40
  "publishConfig": {
@@ -46,6 +44,6 @@
46
44
  "typescript": ">=7.0.0"
47
45
  },
48
46
  "engines": {
49
- "node": ">=22.12.0"
47
+ "node": ">=24.15.0"
50
48
  }
51
49
  }
package/node22-dom.json DELETED
@@ -1,8 +0,0 @@
1
- {
2
- "$schema": "https://json.schemastore.org/tsconfig",
3
- "compilerOptions": {
4
- "lib": ["DOM", "DOM.Iterable", "ES2024", "ES2025.Collection", "ES2025.Iterator"],
5
- "target": "ES2024"
6
- },
7
- "display": "Node 22 floor overlay for packages that also render in a browser"
8
- }
package/node22.json DELETED
@@ -1,8 +0,0 @@
1
- {
2
- "$schema": "https://json.schemastore.org/tsconfig",
3
- "compilerOptions": {
4
- "lib": ["ES2024", "ES2025.Collection", "ES2025.Iterator"],
5
- "target": "ES2024"
6
- },
7
- "display": "Node 22 floor overlay for headless packages"
8
- }