@foxglove/tsconfig 3.1.0 → 3.2.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.
Files changed (3) hide show
  1. package/README.md +11 -6
  2. package/base.json +0 -1
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -18,9 +18,13 @@ yarn add -D @foxglove/tsconfig
18
18
 
19
19
  Choose the config that matches your environment:
20
20
 
21
- ### Node.js applications and libraries
21
+ ### Node.js applications and published libraries
22
22
 
23
- Uses `module: "NodeNext"` which enforces Node.js ESM rules, where imports must include explicit file extensions (e.g., `import { foo } from "./bar.ts"`).
23
+ Uses `module: "NodeNext"`, which enforces Node.js ESM rules.
24
+
25
+ Use `node.json` for published libraries, even if your library will be used in bundled apps. Bundlers consume Node-style packages natively, just remember to avoid Node-specific APIs like `fs` or `process`.
26
+
27
+ Relative imports must include explicit file extensions (e.g., `import { foo } from "./bar.ts"`).
24
28
 
25
29
  ```json
26
30
  {
@@ -33,13 +37,14 @@ Uses `module: "NodeNext"` which enforces Node.js ESM rules, where imports must i
33
37
  }
34
38
  ```
35
39
 
36
- > **Note:** Uses `target: "ESNext"`. For older Node.js versions, set a lower target (e.g., `"ES2022"` for Node 18).
40
+ > [!TIP]
41
+ > `base.json` uses `target: "ESNext"`. For published libraries, you may wish to set a lower target (e.g., `"ES2022"` for Node 18).
37
42
 
38
- > **Cross-platform libraries:** Use `node.json` even if your library will be used in bundled apps. Bundlers consume Node-style packages natively, just remember to avoid Node-specific APIs like `fs` or `process`.
43
+ ### Bundled applications (Webpack, Vite, esbuild, etc)
39
44
 
40
- ### Bundled applications (Vite, Webpack, esbuild, etc)
45
+ Uses `module: "Preserve"`, which enables optimizations for code consumed directly by a bundler.
41
46
 
42
- Uses `module: "Preserve"` which allows extensionless imports (e.g., `import { foo } from "./bar"`, where the bundler handles resolution.
47
+ Supports extensionless relative imports (e.g., `import { foo } from "./bar"`).
43
48
 
44
49
  ```json
45
50
  {
package/base.json CHANGED
@@ -31,7 +31,6 @@
31
31
  // Emit
32
32
  "declaration": true,
33
33
  "declarationMap": true,
34
- "isolatedDeclarations": true,
35
34
  "newLine": "lf",
36
35
  "sourceMap": true,
37
36
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@foxglove/tsconfig",
3
- "version": "3.1.0",
3
+ "version": "3.2.0",
4
4
  "description": "Base TypeScript configuration for Foxglove projects",
5
5
  "license": "MIT",
6
6
  "repository": {