@4mbl/tsconfig 1.0.1 → 2.0.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/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # @4mbl/tsconfig
2
2
 
3
- > Templates for `tsconfig` files for various environments.
3
+ > TypeScript configuration templates for various environments.
4
4
 
5
5
  ## Usage
6
6
 
@@ -19,43 +19,25 @@ Create a `tsconfig.json` file in the root of your project and extend the desired
19
19
  }
20
20
  ```
21
21
 
22
- To avoid path related problems, you should override the following settings in your project's `tsconfig` file.
23
-
24
- ```jsonc
25
- {
26
- "extends": "@4mbl/tsconfig/node/latest",
27
- "include": ["src/**/*"],
28
- "exclude": ["node_modules"],
29
- "compilerOptions": {
30
- "rootDir": "src",
31
- "paths": {
32
- "@/*": ["*"]
33
- }
34
- }
35
-
36
- /* your custom settings */
37
- }
38
- ```
39
-
40
22
  ## Available templates
41
23
 
42
24
  There are currently three `tsconfig` templates.
43
25
 
44
- ### Base <kbd>[tsconfig](./base/latest.json) | [changelog](./base/CHANGELOG.md)</kbd>
26
+ ### Base <kbd>[tsconfig](https://unpkg.com/@4mbl/tsconfig@latest/base/latest.json) | [changelog](./base/changelog.md)</kbd>
45
27
 
46
- This is the base `tsconfig` file that is used by the other `tsconfig` files. It contains the basic configuration for TypeScript without any environment specific settings.
28
+ This is the base `tsconfig` file that is used by the other templates. It contains the basic configuration for TypeScript without any environment specific settings.
47
29
 
48
- ### Node <kbd>[tsconfig](./node/latest.json) | [changelog](./node/CHANGELOG.md)</kbd>
30
+ ### Node <kbd>[tsconfig](https://unpkg.com/@4mbl/tsconfig@latest/node/latest.json) | [changelog](./node/changelog.md)</kbd>
49
31
 
50
- Extends the base `tsconfig` file and adds settings specific to Node.js.
32
+ Extends the base template and adds settings specific to Node.js.
51
33
 
52
- ### Browser <kbd>[tsconfig](./browser/latest.json) | [changelog](./browser/CHANGELOG.md)</kbd>
34
+ ### Browser <kbd>[tsconfig](https://unpkg.com/@4mbl/tsconfig@latest/browser/latest.json) | [changelog](./browser/changelog.md)</kbd>
53
35
 
54
- Extends the base `tsconfig` file and adds settings specific to browser and React applications.
36
+ Extends the base template and adds settings specific to browser and React applications.
55
37
 
56
38
  ## Versioning
57
39
 
58
- The package and each template are versioned separately. Seperate versioning allows you to update the package without worrying about breaking changes to the templates. It also allows you to easily test newer versions of the templates by just updating the `extends` field in your project's `tsconfig` file.
40
+ The package and each template are versioned separately. Seperate versioning allows you to update the package without worrying about breaking changes to the templates. It also allows you to easily test newer versions of the templates by just changing the `extends` field in the `tsconfig` file of your project.
59
41
 
60
42
  ### Package versioning
61
43
 
@@ -65,14 +47,14 @@ The package itself follows the following versioning scheme: `major.minor.patch`
65
47
  * `minor` - Non-base template is changed or added.
66
48
  * `patch` - Non-breaking changes to the templates.
67
49
 
68
- If you are using a specific version of the template in your project's `tsconfig` file, you can update the package without worrying about any breaking changes to your project.
50
+ If you are extending a specific version of a template in your project, you can update the package without worrying about any breaking changes to your project.
69
51
 
70
52
  ### Template versioning
71
53
 
72
54
  Each template is versioned separately. The versioning scheme is: `major.minor.patch`
73
55
 
74
- * `major` - Major overhaul of the template. Rarely used.
56
+ * `major` - Major overhaul of the template. Major changes to upstream templates warrant a major version on the inheriting templates.
75
57
  * `minor` - Breaking changes to the template.
76
58
  * `patch` - Non-breaking changes to the template.
77
59
 
78
- Each template also has a `latest` version. However, it is not recommended to use the `latest` version in your project's `tsconfig` file as it may introduce breaking changes when the package is updated.
60
+ Each template also has a `latest` version. However, it is not recommended to extend the `latest` version in your project as it may introduce breaking changes when the package is updated.
package/base/1.0.0.json CHANGED
@@ -1,40 +1,40 @@
1
- {
2
- "$schema": "https://json.schemastore.org/tsconfig",
3
- "display": "Base",
4
- "_version": "1.0.0",
5
- "compilerOptions": {
6
- /* Base Options */
7
- "lib": ["ESNext"],
8
- "allowJs": true,
9
- "skipLibCheck": true,
10
- "resolveJsonModule": true,
11
- "moduleDetection": "force",
12
- "rootDir": "../../../../../../../",
13
- "baseUrl": "../../../../../../../",
14
- "paths": {
15
- "@/*": ["../../../../../../../src/*"]
16
- },
17
-
18
- /* Output */
19
- "target": "ES6",
20
- "outDir": "dist",
21
- "sourceMap": true,
22
- "declaration": true,
23
- "incremental": true,
24
- "isolatedModules": true,
25
- "esModuleInterop": true,
26
-
27
- /* Linting */
28
- "checkJs": true,
29
- "forceConsistentCasingInFileNames": true,
30
- "noFallthroughCasesInSwitch": true,
31
- "noImplicitAny": true,
32
- "noImplicitReturns": false,
33
- "noUnusedLocals": true,
34
- "noUnusedParameters": true,
35
- "strict": true,
36
- "noUncheckedIndexedAccess": true
37
- },
38
- "include": ["../../../../../../../src/**/*"],
39
- "exclude": ["../../../../../../node_modules"]
40
- }
1
+ {
2
+ "$schema": "https://json.schemastore.org/tsconfig",
3
+ "display": "Base",
4
+ "_version": "1.0.0",
5
+ "compilerOptions": {
6
+ /* Base Options */
7
+ "lib": ["ESNext"],
8
+ "allowJs": true,
9
+ "skipLibCheck": true,
10
+ "resolveJsonModule": true,
11
+ "moduleDetection": "force",
12
+ "rootDir": "../../../../../../../",
13
+ "baseUrl": "../../../../../../../",
14
+ "paths": {
15
+ "@/*": ["../../../../../../../src/*"]
16
+ },
17
+
18
+ /* Output */
19
+ "target": "ES6",
20
+ "outDir": "dist",
21
+ "sourceMap": true,
22
+ "declaration": true,
23
+ "incremental": true,
24
+ "isolatedModules": true,
25
+ "esModuleInterop": true,
26
+
27
+ /* Linting */
28
+ "checkJs": true,
29
+ "forceConsistentCasingInFileNames": true,
30
+ "noFallthroughCasesInSwitch": true,
31
+ "noImplicitAny": true,
32
+ "noImplicitReturns": false,
33
+ "noUnusedLocals": true,
34
+ "noUnusedParameters": true,
35
+ "strict": true,
36
+ "noUncheckedIndexedAccess": true
37
+ },
38
+ "include": ["../../../../../../../src/**/*"],
39
+ "exclude": ["../../../../../../node_modules"]
40
+ }
@@ -0,0 +1,40 @@
1
+ {
2
+ "$schema": "https://json.schemastore.org/tsconfig",
3
+ "display": "Base",
4
+ "_version": "2.0.0",
5
+ "compilerOptions": {
6
+ /* Base Options */
7
+ "lib": ["ESNext"],
8
+ "allowJs": true,
9
+ "skipLibCheck": true,
10
+ "resolveJsonModule": true,
11
+ "moduleDetection": "force",
12
+ "rootDir": "${configDir}/",
13
+ "baseUrl": "${configDir}/",
14
+ "paths": {
15
+ "@/*": ["${configDir}/src/*"]
16
+ },
17
+
18
+ /* Output */
19
+ "target": "ES6",
20
+ "outDir": "dist",
21
+ "sourceMap": true,
22
+ "declaration": true,
23
+ "incremental": true,
24
+ "isolatedModules": true,
25
+ "esModuleInterop": true,
26
+
27
+ /* Linting */
28
+ "strict": true,
29
+ "checkJs": true,
30
+ "forceConsistentCasingInFileNames": true,
31
+ "noFallthroughCasesInSwitch": true,
32
+ "noImplicitAny": true,
33
+ "noImplicitReturns": false,
34
+ "noUnusedLocals": true,
35
+ "noUnusedParameters": true,
36
+ "noUncheckedIndexedAccess": true
37
+ },
38
+ "include": ["${configDir}/src/**/*"],
39
+ "exclude": ["${configDir}/node_modules"]
40
+ }
package/base/latest.json CHANGED
@@ -1,40 +1,40 @@
1
- {
2
- "$schema": "https://json.schemastore.org/tsconfig",
3
- "display": "Base",
4
- "_version": "1.0.0",
5
- "compilerOptions": {
6
- /* Base Options */
7
- "lib": ["ESNext"],
8
- "allowJs": true,
9
- "skipLibCheck": true,
10
- "resolveJsonModule": true,
11
- "moduleDetection": "force",
12
- "rootDir": "../../../../../../../",
13
- "baseUrl": "../../../../../../../",
14
- "paths": {
15
- "@/*": ["../../../../../../../src/*"]
16
- },
17
-
18
- /* Output */
19
- "target": "ES6",
20
- "outDir": "dist",
21
- "sourceMap": true,
22
- "declaration": true,
23
- "incremental": true,
24
- "isolatedModules": true,
25
- "esModuleInterop": true,
26
-
27
- /* Linting */
28
- "checkJs": true,
29
- "forceConsistentCasingInFileNames": true,
30
- "noFallthroughCasesInSwitch": true,
31
- "noImplicitAny": true,
32
- "noImplicitReturns": false,
33
- "noUnusedLocals": true,
34
- "noUnusedParameters": true,
35
- "strict": true,
36
- "noUncheckedIndexedAccess": true
37
- },
38
- "include": ["../../../../../../../src/**/*"],
39
- "exclude": ["../../../../../../node_modules"]
40
- }
1
+ {
2
+ "$schema": "https://json.schemastore.org/tsconfig",
3
+ "display": "Base",
4
+ "_version": "2.0.0",
5
+ "compilerOptions": {
6
+ /* Base Options */
7
+ "lib": ["ESNext"],
8
+ "allowJs": true,
9
+ "skipLibCheck": true,
10
+ "resolveJsonModule": true,
11
+ "moduleDetection": "force",
12
+ "rootDir": "${configDir}/",
13
+ "baseUrl": "${configDir}/",
14
+ "paths": {
15
+ "@/*": ["${configDir}/src/*"]
16
+ },
17
+
18
+ /* Output */
19
+ "target": "ES6",
20
+ "outDir": "dist",
21
+ "sourceMap": true,
22
+ "declaration": true,
23
+ "incremental": true,
24
+ "isolatedModules": true,
25
+ "esModuleInterop": true,
26
+
27
+ /* Linting */
28
+ "strict": true,
29
+ "checkJs": true,
30
+ "forceConsistentCasingInFileNames": true,
31
+ "noFallthroughCasesInSwitch": true,
32
+ "noImplicitAny": true,
33
+ "noImplicitReturns": false,
34
+ "noUnusedLocals": true,
35
+ "noUnusedParameters": true,
36
+ "noUncheckedIndexedAccess": true
37
+ },
38
+ "include": ["${configDir}/src/**/*"],
39
+ "exclude": ["${configDir}/node_modules"]
40
+ }
@@ -0,0 +1,15 @@
1
+ {
2
+ "$schema": "https://json.schemastore.org/tsconfig",
3
+ "display": "Browser",
4
+ "_version": "2.0.0",
5
+ "extends": "../base/2.0.0.json",
6
+ "compilerOptions": {
7
+ "lib": ["DOM", "DOM.Iterable", "ESNext"],
8
+ "jsx": "react-jsx",
9
+ "tsBuildInfoFile": "tsconfig.browser.tsbuildinfo",
10
+ "module": "ESNext",
11
+ "moduleResolution": "Bundler",
12
+ "noEmit": true,
13
+ "sourceMap": true
14
+ }
15
+ }
@@ -1,15 +1,15 @@
1
- {
2
- "$schema": "https://json.schemastore.org/tsconfig",
3
- "display": "Browser",
4
- "_version": "1.0.0",
5
- "extends": "../base/1.0.0.json",
6
- "compilerOptions": {
7
- "lib": ["DOM", "DOM.Iterable", "ESNext"],
8
- "jsx": "react-jsx",
9
- "tsBuildInfoFile": "tsconfig.browser.tsbuildinfo",
10
- "module": "ESNext",
11
- "moduleResolution": "Bundler",
12
- "noEmit": true,
13
- "sourceMap": true
14
- }
15
- }
1
+ {
2
+ "$schema": "https://json.schemastore.org/tsconfig",
3
+ "display": "Browser",
4
+ "_version": "2.0.0",
5
+ "extends": "../base/2.0.0.json",
6
+ "compilerOptions": {
7
+ "lib": ["DOM", "DOM.Iterable", "ESNext"],
8
+ "jsx": "react-jsx",
9
+ "tsBuildInfoFile": "tsconfig.browser.tsbuildinfo",
10
+ "module": "ESNext",
11
+ "moduleResolution": "Bundler",
12
+ "noEmit": true,
13
+ "sourceMap": true
14
+ }
15
+ }
package/node/1.0.0.json CHANGED
@@ -1,11 +1,11 @@
1
- {
2
- "$schema": "https://json.schemastore.org/tsconfig",
3
- "display": "Node",
4
- "_version": "1.0.0",
5
- "extends": "../base/1.0.0.json",
6
- "compilerOptions": {
7
- "target": "ESNext",
8
- "moduleResolution": "NodeNext",
9
- "module": "NodeNext"
10
- }
11
- }
1
+ {
2
+ "$schema": "https://json.schemastore.org/tsconfig",
3
+ "display": "Node",
4
+ "_version": "1.0.0",
5
+ "extends": "../base/1.0.0.json",
6
+ "compilerOptions": {
7
+ "target": "ESNext",
8
+ "moduleResolution": "NodeNext",
9
+ "module": "NodeNext"
10
+ }
11
+ }
@@ -0,0 +1,11 @@
1
+ {
2
+ "$schema": "https://json.schemastore.org/tsconfig",
3
+ "display": "Node",
4
+ "_version": "2.0.0",
5
+ "extends": "../base/2.0.0.json",
6
+ "compilerOptions": {
7
+ "target": "ESNext",
8
+ "moduleResolution": "NodeNext",
9
+ "module": "NodeNext"
10
+ }
11
+ }
package/node/latest.json CHANGED
@@ -1,11 +1,11 @@
1
- {
2
- "$schema": "https://json.schemastore.org/tsconfig",
3
- "display": "Node",
4
- "_version": "1.0.0",
5
- "extends": "../base/1.0.0.json",
6
- "compilerOptions": {
7
- "target": "ESNext",
8
- "moduleResolution": "NodeNext",
9
- "module": "NodeNext"
10
- }
11
- }
1
+ {
2
+ "$schema": "https://json.schemastore.org/tsconfig",
3
+ "display": "Node",
4
+ "_version": "2.0.0",
5
+ "extends": "../base/2.0.0.json",
6
+ "compilerOptions": {
7
+ "target": "ESNext",
8
+ "moduleResolution": "NodeNext",
9
+ "module": "NodeNext"
10
+ }
11
+ }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@4mbl/tsconfig",
3
- "version": "1.0.1",
4
- "description": "tsconfig templates for typescript projects",
3
+ "version": "2.0.0",
4
+ "description": "TypeScript configuration templates for various environments.",
5
5
  "type": "module",
6
6
  "author": "4mbl",
7
7
  "license": "MIT",
@@ -16,10 +16,20 @@
16
16
  ],
17
17
  "scripts": {
18
18
  "build": "node ./scripts/copyLatest.js *",
19
+ "delete:latest": "node ./scripts/deleteLatestJson.js",
20
+ "delete:version": "node ./scripts/deleteVersionFile.js",
19
21
  "get:version": "node -pe \"require('./package.json')['version']\" > version.txt",
20
- "release": "npm run get:version && npm run build && npm publish && git add . && git commit --file version.txt && git push && rm version.txt",
22
+ "release": "npm run get:version && npm run build && npm publish && npm run delete:latest && git add . && git commit --file version.txt && git push && npm run delete:version",
21
23
  "release:patch": "npm version patch --no-git-tag-version && npm run release",
22
24
  "release:minor": "npm version minor --no-git-tag-version && npm run release",
23
25
  "release:major": "npm version major --no-git-tag-version && npm run release"
26
+ },
27
+ "peerDependencies": {
28
+ "typescript": ">=5.5.0"
29
+ },
30
+ "peerDependenciesMeta": {
31
+ "typescript": {
32
+ "optional": true
33
+ }
24
34
  }
25
35
  }