@4mbl/tsconfig 0.0.0-beta.049ea8d → 0.0.0-beta.090f642

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,25 +1,47 @@
1
- # @4mbl/tsconfig Changelog
2
-
3
- ## 4.0.0
4
-
5
- * Migrated from versioned templates to a single template per type. The package version is now used to determine the template version. This simplifies both the maintenance and usage of the package.
6
- * Enabled the following options in the base template:
7
- * `declarationMap`
8
- * `tsBuildInfoFile` set to `node_modules/.tmp/tsbuildinfo`
9
- * `verbatimModuleSyntax`
10
- * `allowSyntheticDefaultImports`
11
- * `noImplicitOverride`
12
- * In the Next.js all paths now use paths relative to the project.
13
- * Removed `tsBuildInfoFile` from browser template in favor of the base template value.
14
-
15
- ## 3.0.0
16
-
17
- * Enabled `erasableSyntaxOnly` option in the base template. Requires TypeScript 5.8.0+.
18
-
19
- ## 2.0.0
20
-
21
- * Changed path options to use `${configDir}` instead of relative paths in base template. Requires TypeScript 5.5.0+.
22
-
23
- ## 1.0.0
24
-
25
- * Initial release
1
+ # @4mbl/tsconfig Changelog
2
+
3
+ ## 4.1.3
4
+
5
+ ### Patch Changes
6
+
7
+ - 0957212: Migrate to monorepo setup internally. No changes to the package itself.
8
+
9
+ ## 4.1.2
10
+
11
+ - Setup npm trusted publishing. No changes to the package itself.
12
+
13
+ ## 4.1.1
14
+
15
+ - Fixed missing artifacts in the previous release.
16
+
17
+ ## 4.1.0
18
+
19
+ - Add vite-react template.
20
+
21
+ ## 4.0.1
22
+
23
+ - Move `baseUrl` definition from the base template to child templates to improve Next.js support.
24
+
25
+ ## 4.0.0
26
+
27
+ - Migrated from versioned templates to a single template per type. The package version is now used to determine the template version. This simplifies both the maintenance and usage of the package.
28
+ - Enabled the following options in the base template:
29
+ - `declarationMap`
30
+ - `tsBuildInfoFile` set to `node_modules/.tmp/tsbuildinfo`
31
+ - `verbatimModuleSyntax`
32
+ - `allowSyntheticDefaultImports`
33
+ - `noImplicitOverride`
34
+ - In the Next.js all paths now use paths relative to the project.
35
+ - Removed `tsBuildInfoFile` from browser template in favor of the base template value.
36
+
37
+ ## 3.0.0
38
+
39
+ - Enabled `erasableSyntaxOnly` option in the base template. Requires TypeScript 5.8.0+.
40
+
41
+ ## 2.0.0
42
+
43
+ - Changed path options to use `${configDir}` instead of relative paths in base template. Requires TypeScript 5.5.0+.
44
+
45
+ ## 1.0.0
46
+
47
+ - Initial release
package/README.md CHANGED
@@ -1,6 +1,18 @@
1
1
  # @4mbl/tsconfig
2
2
 
3
- > TypeScript configuration templates for various environments.
3
+ > Strict TypeScript configuration for various environments.
4
+
5
+ * [Usage](#usage)
6
+ * [Available templates](#available-templates)
7
+ * [Base (tsconfig)](#base-tsconfig)
8
+ * [Node (tsconfig)](#node-tsconfig)
9
+ * [Node-TS (tsconfig)](#node-ts-tsconfig)
10
+ * [Browser (tsconfig)](#browser-tsconfig)
11
+ * [Next (tsconfig)](#next-tsconfig)
12
+ * [Vite React (app | node)](#vite-react-app--node)
13
+ * [Versioning](#versioning)
14
+
15
+ ---
4
16
 
5
17
  ## Usage
6
18
 
@@ -15,31 +27,35 @@ Create a `tsconfig.json` file in the root of your project and extend the desired
15
27
  ```jsonc
16
28
  {
17
29
  "extends": "@4mbl/tsconfig/node"
18
- /* your custom settings */
30
+ // your custom configuration...
19
31
  }
20
32
  ```
21
33
 
22
34
  ## Available templates
23
35
 
24
- There are currently four `tsconfig` templates.
36
+ These are the currently available `tsconfig` templates.
37
+
38
+ ### Base (<kbd>[tsconfig](https://unpkg.com/@4mbl/tsconfig@latest/base.json)</kbd>)
25
39
 
26
- ### Base <kbd>[tsconfig](https://unpkg.com/@4mbl/tsconfig@latest/base.json)</kbd>
40
+ This is the base `tsconfig` file that is used by the other templates. It contains common configuration for TypeScript with minimal environment specific configuration.
27
41
 
28
- This is the base `tsconfig` file that is used by the other templates. It contains common configuration for TypeScript with minimal environment specific settings.
42
+ ### Node (<kbd>[tsconfig](https://unpkg.com/@4mbl/tsconfig@latest/node.json)</kbd>)
29
43
 
30
- ### Node <kbd>[tsconfig](https://unpkg.com/@4mbl/tsconfig@latest/node.json)</kbd>
44
+ Extends the base template with configuration specific to Node.js.
31
45
 
32
- Extends the base template with settings specific to Node.js.
46
+ ### Node-TS (<kbd>[tsconfig](https://unpkg.com/@4mbl/tsconfig@latest/node-ts.json)</kbd>)
33
47
 
34
- ### Browser <kbd>[tsconfig](https://unpkg.com/@4mbl/tsconfig@latest/browser.json)</kbd>
48
+ Extends the node template with configuration for TypeScript-only projects.
35
49
 
36
- Extends the base template with settings specific to browser and React applications.
50
+ ### Browser (<kbd>[tsconfig](https://unpkg.com/@4mbl/tsconfig@latest/browser.json)</kbd>)
37
51
 
38
- ### Next <kbd>[tsconfig](https://unpkg.com/@4mbl/tsconfig@latest/next.json)</kbd>
52
+ Extends the base template with configuration specific to browser and React applications.
39
53
 
40
- Extends the base template with settings from the Next.js app template.
54
+ ### Next (<kbd>[tsconfig](https://unpkg.com/@4mbl/tsconfig@latest/next.json)</kbd>)
41
55
 
42
- [Next.js does not yet support tsconfig template variables](https://github.com/vercel/next.js/issues/70912), so you need to configure the path settings manually on the `tsconfig.json` file of your project.
56
+ Extends the base template with configuration from the Next.js app template.
57
+
58
+ [Next.js does not yet support tsconfig template variables](https://github.com/vercel/next.js/issues/70912), so you need to override the paths manually on the `tsconfig.json` file of your project.
43
59
 
44
60
  ```jsonc
45
61
  {
@@ -54,7 +70,39 @@ Extends the base template with settings from the Next.js app template.
54
70
  }
55
71
  ```
56
72
 
57
- The Next.js template should work without extra configuration as soon as Next.js supports tsconfig template variables. Until then, you need to set the paths settings manually.
73
+ ### Vite React (<kbd>[app](https://unpkg.com/@4mbl/tsconfig@latest/vite-react/app.json)</kbd> | <kbd>[node](https://unpkg.com/@4mbl/tsconfig@latest/vite-react/node.json)</kbd>)
74
+
75
+ Extends the base template with configuration from Vite's `react-ts` preset.
76
+
77
+ Vite uses seperate `tsconfig` files for the application and the node environment. So you need to have three files in total:
78
+
79
+ **`tsconfig.json`**
80
+
81
+ ```jsonc
82
+ {
83
+ "files": [],
84
+ "references": [
85
+ { "path": "./tsconfig.app.json" },
86
+ { "path": "./tsconfig.node.json" }
87
+ ]
88
+ }
89
+ ```
90
+
91
+ **`tsconfig.app.json`**
92
+
93
+ ```jsonc
94
+ {
95
+ "extends": "@4mbl/tsconfig/vite-react/app"
96
+ }
97
+ ```
98
+
99
+ **`tsconfig.node.json`**
100
+
101
+ ```jsonc
102
+ {
103
+ "extends": "@4mbl/tsconfig/vite-react/node"
104
+ }
105
+ ```
58
106
 
59
107
  ## Versioning
60
108
 
@@ -62,6 +110,6 @@ As of version 4.0.0, the package migrated to a single template per type. The pac
62
110
 
63
111
  The package follows the following versioning scheme: `X.Y.Z`
64
112
 
65
- * `X` - Breaking changes to the base template.
66
- * `Y` - Breaking changes to individual, non-base templates.
67
- * `Z` - Minor fixes to any template.
113
+ - `X` - Breaking changes to the base template.
114
+ - `Y` - Breaking changes to individual, non-base templates. New templates may be introduced.
115
+ - `Z` - Minor fixes to any template.
package/package.json CHANGED
@@ -1,22 +1,34 @@
1
1
  {
2
2
  "name": "@4mbl/tsconfig",
3
- "version": "0.0.0-beta.049ea8d",
4
- "description": "TypeScript configuration templates for various environments.",
3
+ "version": "0.0.0-beta.090f642",
4
+ "description": "Strict TypeScript configuration for various environments.",
5
5
  "type": "module",
6
6
  "author": "4mbl",
7
7
  "license": "MIT",
8
- "homepage": "https://github.com/4mbl/tsconfig#readme",
8
+ "homepage": "https://github.com/4mbl/config/tree/main/packages/tsconfig#readme",
9
+ "exports": {
10
+ "./browser": "./dist/browser.json",
11
+ "./next": "./dist/next.json",
12
+ "./node-ts": "./dist/node-ts.json",
13
+ "./node": "./dist/node.json",
14
+ "./vite-react/app": "./dist/vite-react/app.json",
15
+ "./vite-react/node": "./dist/vite-react/node.json"
16
+ },
17
+ "files": [
18
+ "dist",
19
+ "package.json",
20
+ "README.md",
21
+ "CHANGELOG.md"
22
+ ],
9
23
  "repository": {
10
24
  "type": "git",
11
- "url": "git+https://github.com/4mbl/tsconfig.git"
25
+ "url": "git+https://github.com/4mbl/config.git",
26
+ "directory": "packages/tsconfig"
12
27
  },
13
28
  "keywords": [
14
29
  "typescript",
15
30
  "tsconfig"
16
31
  ],
17
- "scripts": {
18
- "build": "cp templates/*.json ."
19
- },
20
32
  "peerDependencies": {
21
33
  "typescript": ">=5.8.0"
22
34
  },
@@ -24,5 +36,8 @@
24
36
  "typescript": {
25
37
  "optional": true
26
38
  }
39
+ },
40
+ "scripts": {
41
+ "build": "rm -rf dist && mkdir dist && cp -r templates/* dist/ && node scripts/generate-exports.mjs"
27
42
  }
28
- }
43
+ }
package/base.json DELETED
@@ -1,44 +0,0 @@
1
- {
2
- "$schema": "https://json.schemastore.org/tsconfig",
3
- "display": "Base",
4
- "compilerOptions": {
5
- /* Base Options */
6
- "lib": ["ESNext"],
7
- "allowJs": true,
8
- "skipLibCheck": true,
9
- "resolveJsonModule": true,
10
- "moduleDetection": "force",
11
- "baseUrl": "${configDir}/src",
12
- "paths": {
13
- "@/*": ["${configDir}/src/*"]
14
- },
15
-
16
- /* Output */
17
- "target": "ES6",
18
- "outDir": "${configDir}/dist",
19
- "sourceMap": true,
20
- "declarationMap": true,
21
- "declaration": true,
22
- "incremental": true,
23
- "isolatedModules": true,
24
- "esModuleInterop": true,
25
- "tsBuildInfoFile": "${configDir}/node_modules/.tmp/tsconfig.tsbuildinfo",
26
- "verbatimModuleSyntax": true,
27
-
28
- /* Linting */
29
- "strict": true,
30
- "checkJs": true,
31
- "erasableSyntaxOnly": true,
32
- "forceConsistentCasingInFileNames": true,
33
- "allowSyntheticDefaultImports": true,
34
- "noFallthroughCasesInSwitch": true,
35
- "noImplicitAny": true,
36
- "noImplicitOverride": true,
37
- "noImplicitReturns": false,
38
- "noUnusedLocals": true,
39
- "noUnusedParameters": true,
40
- "noUncheckedIndexedAccess": true
41
- },
42
- "include": ["${configDir}/src/**/*"],
43
- "exclude": ["${configDir}/node_modules"]
44
- }
package/browser.json DELETED
@@ -1,13 +0,0 @@
1
- {
2
- "$schema": "https://json.schemastore.org/tsconfig",
3
- "display": "Browser",
4
- "extends": "./base.json",
5
- "compilerOptions": {
6
- "lib": ["DOM", "DOM.Iterable", "ESNext"],
7
- "jsx": "react-jsx",
8
- "module": "ESNext",
9
- "moduleResolution": "Bundler",
10
- "noEmit": true,
11
- "sourceMap": true
12
- }
13
- }
package/next.json DELETED
@@ -1,35 +0,0 @@
1
- {
2
- "$schema": "https://json.schemastore.org/tsconfig",
3
- "display": "Next.js",
4
- "extends": "./base.json",
5
- "compilerOptions": {
6
- "target": "ES2017",
7
- "lib": ["dom", "dom.iterable", "esnext"],
8
- "allowJs": true,
9
- "skipLibCheck": true,
10
- "strict": true,
11
- "noEmit": true,
12
- "esModuleInterop": true,
13
- "module": "preserve",
14
- "moduleResolution": "bundler",
15
- "resolveJsonModule": true,
16
- "isolatedModules": true,
17
- "jsx": "preserve",
18
- "incremental": true,
19
- "plugins": [
20
- {
21
- "name": "next"
22
- }
23
- ],
24
- "paths": {
25
- "@/*": ["${configDir}/src/*"]
26
- }
27
- },
28
- "include": [
29
- "${configDir}/next-env.d.ts",
30
- "${configDir}/**/*.ts",
31
- "${configDir}/**/*.tsx",
32
- "${configDir}/.next/types/**/*.ts"
33
- ],
34
- "exclude": ["${configDir}/node_modules"]
35
- }
package/node.json DELETED
@@ -1,10 +0,0 @@
1
- {
2
- "$schema": "https://json.schemastore.org/tsconfig",
3
- "display": "Node",
4
- "extends": "./base.json",
5
- "compilerOptions": {
6
- "target": "ESNext",
7
- "moduleResolution": "NodeNext",
8
- "module": "NodeNext"
9
- }
10
- }