@checkdigit/typescript-config 2.2.0 → 3.1.0
Sign up to get free protection for your applications and to get access to all the features.
- package/LICENSE.txt +1 -1
- package/README.md +12 -11
- package/SECURITY.md +14 -0
- package/package.json +22 -10
- package/tsconfig.json +3 -7
- package/dist/index.d.ts +0 -11
- package/dist/index.js +0 -1
package/LICENSE.txt
CHANGED
package/README.md
CHANGED
@@ -1,36 +1,38 @@
|
|
1
|
-
# checkdigit/typescript-config
|
1
|
+
# checkdigit/typescript-config
|
2
2
|
|
3
3
|
[![MIT License](https://img.shields.io/github/license/checkdigit/typescript-config)](https://github.com/checkdigit/typescript-config/blob/master/LICENSE.txt)
|
4
|
-
[![David](https://status.david-dm.org/gh/checkdigit/typescript-config.svg)](https://status.david-dm.org/gh/checkdigit/typescript-config.svg)
|
5
4
|
|
6
|
-
Copyright (c)
|
5
|
+
Copyright (c) 2022 [Check Digit, LLC](https://checkdigit.com)
|
7
6
|
|
8
7
|
### Introduction
|
9
8
|
|
10
9
|
This module contains the standard Check Digit Typescript configuration.
|
11
|
-
|
12
|
-
-
|
10
|
+
|
11
|
+
- requires Node 16 or above
|
12
|
+
- emits ES2022
|
13
|
+
- uses the `module` type of `commonjs`.
|
13
14
|
- all compiler options set for maximum strictness
|
14
15
|
|
15
16
|
#### A note about versioning
|
16
17
|
|
17
|
-
Strict semver is a little complicated, as Typescript itself does not adhere to semver.
|
18
|
+
Strict semver is a little complicated, as Typescript itself does not adhere to semver. So our "best effort" policy is:
|
18
19
|
|
19
|
-
- Each new target (e.g. `ES2019` to `ES2020`) will result in a new major version of this module.
|
20
|
+
- Each new target (e.g. `ES2019` to `ES2020`) will result in a new major version of this module. We coordinate this
|
20
21
|
with whatever the latest LTS version of Node is currently supported by Amazon Lambda, Google Cloud Functions
|
21
22
|
and Azure Functions.
|
22
23
|
- Each new major version of Typescript (e.g. `4.2.x` to `4.3.x`) will result in a new minor version of this module.
|
23
24
|
- Each new minor update of Typescript (e.g. `4.3.1` to `4.3.2`) will result in a new patch version of this module.
|
24
25
|
|
25
|
-
Bear in mind, any update of Typescript can potentially break your build.
|
26
|
+
Bear in mind, any update of Typescript can potentially break your build. But hopefully in a way that's useful.
|
26
27
|
|
27
28
|
### Installation
|
28
29
|
|
29
30
|
```
|
30
|
-
npm add -D typescript
|
31
31
|
npm add -D @checkdigit/typescript-config
|
32
32
|
```
|
33
33
|
|
34
|
+
Note: you do not need to explicitly install Typescript itself, as it comes in as a peer dependency of `@checkdigit/typescript-config`.
|
35
|
+
|
34
36
|
Make sure your project's `tsconfig.json` extends `@checkdigit/typescript-config`.
|
35
37
|
|
36
38
|
### Example `tsconfig.json`
|
@@ -44,8 +46,7 @@ Make sure your project's `tsconfig.json` extends `@checkdigit/typescript-config`
|
|
44
46
|
},
|
45
47
|
"exclude": [
|
46
48
|
"node_modules",
|
47
|
-
"build"
|
48
|
-
"dist"
|
49
|
+
"build"
|
49
50
|
]
|
50
51
|
}
|
51
52
|
```
|
package/SECURITY.md
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
# Security Policy
|
2
|
+
|
3
|
+
## Supported Versions
|
4
|
+
|
5
|
+
These versions of `@checkdigit/typescript-config` are currently being supported with security updates.
|
6
|
+
|
7
|
+
| Version | Supported |
|
8
|
+
| ------- | ------------------ |
|
9
|
+
| \>= 3.x | :white_check_mark: |
|
10
|
+
| \< 3.0 | :x: |
|
11
|
+
|
12
|
+
## Reporting a Vulnerability
|
13
|
+
|
14
|
+
Please create an issue at https://github.com/checkdigit/typescript-config/issues
|
package/package.json
CHANGED
@@ -1,17 +1,14 @@
|
|
1
1
|
{
|
2
2
|
"name": "@checkdigit/typescript-config",
|
3
|
-
"version": "
|
3
|
+
"version": "3.1.0",
|
4
4
|
"description": "Check Digit standard Typescript configuration",
|
5
|
-
"
|
6
|
-
"preversion": "npm test",
|
7
|
-
"postversion": "git push && git push --tags",
|
8
|
-
"test": "tsc --noEmit"
|
9
|
-
},
|
5
|
+
"prettier": "@checkdigit/prettier-config",
|
10
6
|
"engines": {
|
11
|
-
"node": ">=
|
7
|
+
"node": ">=16"
|
12
8
|
},
|
13
9
|
"peerDependencies": {
|
14
|
-
"
|
10
|
+
"@types/node": ">=16",
|
11
|
+
"typescript": ">=4.8.2"
|
15
12
|
},
|
16
13
|
"repository": {
|
17
14
|
"type": "git",
|
@@ -23,7 +20,22 @@
|
|
23
20
|
"url": "https://github.com/checkdigit/typescript-config/issues"
|
24
21
|
},
|
25
22
|
"homepage": "https://github.com/checkdigit/typescript-config#readme",
|
23
|
+
"scripts": {
|
24
|
+
"preversion": "npm test",
|
25
|
+
"postversion": "git push && git push --tags",
|
26
|
+
"prettier": "prettier --list-different .",
|
27
|
+
"prettier:fix": "prettier --write .",
|
28
|
+
"test": "npm run ci:compile && npm run ci:test && npm run ci:style",
|
29
|
+
"ci:compile": "tsc --noEmit",
|
30
|
+
"ci:test": "tsc && node build/index.js | grep -q 'complete' && rimraf build",
|
31
|
+
"ci:style": "npm run prettier"
|
32
|
+
},
|
26
33
|
"devDependencies": {
|
27
|
-
"
|
28
|
-
|
34
|
+
"@checkdigit/prettier-config": "^3.0.0",
|
35
|
+
"rimraf": "^3.0.2"
|
36
|
+
},
|
37
|
+
"files": [
|
38
|
+
"tsconfig.json",
|
39
|
+
"SECURITY.md"
|
40
|
+
]
|
29
41
|
}
|
package/tsconfig.json
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"compilerOptions": {
|
3
3
|
"module": "commonjs",
|
4
|
-
"target": "
|
4
|
+
"target": "es2022",
|
5
5
|
"lib": ["esnext", "dom", "webworker"],
|
6
6
|
"sourceMap": true,
|
7
7
|
"outDir": "build",
|
@@ -31,9 +31,5 @@
|
|
31
31
|
"useUnknownInCatchVariables": true,
|
32
32
|
"exactOptionalPropertyTypes": true
|
33
33
|
},
|
34
|
-
"exclude": [
|
35
|
-
|
36
|
-
"build",
|
37
|
-
"dist"
|
38
|
-
]
|
39
|
-
}
|
34
|
+
"exclude": ["node_modules", "build"]
|
35
|
+
}
|
package/dist/index.d.ts
DELETED
package/dist/index.js
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
"use strict";try{console.log("hello")}catch(e){console.error(e.message)}
|