@checkdigit/typescript-config 3.0.1 → 3.1.0
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +7 -9
- package/SECURITY.md +14 -0
- package/package.json +11 -7
- package/tsconfig.json +3 -7
- package/.github/workflows/ci.yml +0 -40
package/README.md
CHANGED
@@ -1,4 +1,4 @@
|
|
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
4
|
|
@@ -7,24 +7,23 @@ Copyright (c) 2022 [Check Digit, LLC](https://checkdigit.com)
|
|
7
7
|
### Introduction
|
8
8
|
|
9
9
|
This module contains the standard Check Digit Typescript configuration.
|
10
|
+
|
10
11
|
- requires Node 16 or above
|
11
12
|
- emits ES2022
|
12
|
-
- uses the
|
13
|
-
on the value of the `type` field in `package.json`. If not supplied, the default value is `commonjs`.
|
14
|
-
Set `"type": "module"` to emit ESM.
|
13
|
+
- uses the `module` type of `commonjs`.
|
15
14
|
- all compiler options set for maximum strictness
|
16
15
|
|
17
16
|
#### A note about versioning
|
18
17
|
|
19
|
-
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:
|
20
19
|
|
21
|
-
- 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
|
22
21
|
with whatever the latest LTS version of Node is currently supported by Amazon Lambda, Google Cloud Functions
|
23
22
|
and Azure Functions.
|
24
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.
|
25
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.
|
26
25
|
|
27
|
-
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.
|
28
27
|
|
29
28
|
### Installation
|
30
29
|
|
@@ -47,8 +46,7 @@ Make sure your project's `tsconfig.json` extends `@checkdigit/typescript-config`
|
|
47
46
|
},
|
48
47
|
"exclude": [
|
49
48
|
"node_modules",
|
50
|
-
"build"
|
51
|
-
"dist"
|
49
|
+
"build"
|
52
50
|
]
|
53
51
|
}
|
54
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,14 +1,14 @@
|
|
1
1
|
{
|
2
2
|
"name": "@checkdigit/typescript-config",
|
3
|
-
"version": "3.0
|
3
|
+
"version": "3.1.0",
|
4
4
|
"description": "Check Digit standard Typescript configuration",
|
5
5
|
"prettier": "@checkdigit/prettier-config",
|
6
6
|
"engines": {
|
7
7
|
"node": ">=16"
|
8
8
|
},
|
9
9
|
"peerDependencies": {
|
10
|
-
"
|
11
|
-
"
|
10
|
+
"@types/node": ">=16",
|
11
|
+
"typescript": ">=4.8.2"
|
12
12
|
},
|
13
13
|
"repository": {
|
14
14
|
"type": "git",
|
@@ -23,15 +23,19 @@
|
|
23
23
|
"scripts": {
|
24
24
|
"preversion": "npm test",
|
25
25
|
"postversion": "git push && git push --tags",
|
26
|
-
"prettier": "prettier --list-different
|
27
|
-
"prettier:fix": "prettier --write
|
26
|
+
"prettier": "prettier --list-different .",
|
27
|
+
"prettier:fix": "prettier --write .",
|
28
28
|
"test": "npm run ci:compile && npm run ci:test && npm run ci:style",
|
29
29
|
"ci:compile": "tsc --noEmit",
|
30
30
|
"ci:test": "tsc && node build/index.js | grep -q 'complete' && rimraf build",
|
31
31
|
"ci:style": "npm run prettier"
|
32
32
|
},
|
33
33
|
"devDependencies": {
|
34
|
-
"@checkdigit/prettier-config": "
|
34
|
+
"@checkdigit/prettier-config": "^3.0.0",
|
35
35
|
"rimraf": "^3.0.2"
|
36
|
-
}
|
36
|
+
},
|
37
|
+
"files": [
|
38
|
+
"tsconfig.json",
|
39
|
+
"SECURITY.md"
|
40
|
+
]
|
37
41
|
}
|
package/tsconfig.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"compilerOptions": {
|
3
|
-
"module": "
|
3
|
+
"module": "commonjs",
|
4
4
|
"target": "es2022",
|
5
5
|
"lib": ["esnext", "dom", "webworker"],
|
6
6
|
"sourceMap": true,
|
@@ -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/.github/workflows/ci.yml
DELETED
@@ -1,40 +0,0 @@
|
|
1
|
-
name: CI
|
2
|
-
|
3
|
-
on:
|
4
|
-
pull_request:
|
5
|
-
branches:
|
6
|
-
- "main"
|
7
|
-
|
8
|
-
jobs:
|
9
|
-
branchBuild:
|
10
|
-
runs-on: ubuntu-latest
|
11
|
-
name: Branch Build
|
12
|
-
strategy:
|
13
|
-
matrix:
|
14
|
-
node-version: [16.x]
|
15
|
-
steps:
|
16
|
-
- uses: actions/checkout@v3
|
17
|
-
with:
|
18
|
-
ref: ${{ github.event.pull_request.head.sha }}
|
19
|
-
- name: Use Node.js ${{ matrix.node-version }}
|
20
|
-
uses: actions/setup-node@v3
|
21
|
-
with:
|
22
|
-
node-version: ${{ matrix.node-version }}
|
23
|
-
cache: 'npm'
|
24
|
-
- name: Install dependencies
|
25
|
-
run: npm ci
|
26
|
-
env:
|
27
|
-
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
28
|
-
CI: true
|
29
|
-
- name: Compile
|
30
|
-
run: npm run ci:compile
|
31
|
-
env:
|
32
|
-
CI: true
|
33
|
-
- name: Check Code Style
|
34
|
-
run: npm run ci:style
|
35
|
-
env:
|
36
|
-
CI: true
|
37
|
-
- name: Run Tests
|
38
|
-
run: npm run ci:test
|
39
|
-
env:
|
40
|
-
CI: true
|