@checkdigit/typescript-config 3.0.1 → 3.2.0-PR.23-dcac
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 +10 -11
- package/SECURITY.md +14 -0
- package/package.json +1 -37
- package/src/module-directory/index.ts +3 -0
- package/src/module.ts +9 -0
- package/tsconfig.json +7 -9
- package/.github/workflows/ci.yml +0 -40
package/LICENSE.txt
CHANGED
package/README.md
CHANGED
@@ -1,30 +1,30 @@
|
|
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
|
|
5
|
-
Copyright (c)
|
5
|
+
Copyright (c) 2023 [Check Digit, LLC](https://checkdigit.com)
|
6
6
|
|
7
7
|
### Introduction
|
8
8
|
|
9
9
|
This module contains the standard Check Digit Typescript configuration.
|
10
|
-
|
10
|
+
|
11
|
+
- requires Node 18 or above
|
11
12
|
- emits ES2022
|
12
|
-
- uses
|
13
|
-
|
14
|
-
Set `"type": "module"` to emit ESM.
|
13
|
+
- uses `esnext` for `target` and `module`
|
14
|
+
- uses the `moduleResoltion` of `bundler`
|
15
15
|
- all compiler options set for maximum strictness
|
16
16
|
|
17
17
|
#### A note about versioning
|
18
18
|
|
19
|
-
Strict semver is a little complicated, as Typescript itself does not adhere to semver.
|
19
|
+
Strict semver is a little complicated, as Typescript itself does not adhere to semver. So our "best effort" policy is:
|
20
20
|
|
21
|
-
- Each new target (e.g. `ES2019` to `ES2020`) will result in a new major version of this module.
|
21
|
+
- Each new target (e.g. `ES2019` to `ES2020`) will result in a new major version of this module. We coordinate this
|
22
22
|
with whatever the latest LTS version of Node is currently supported by Amazon Lambda, Google Cloud Functions
|
23
23
|
and Azure Functions.
|
24
24
|
- 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
25
|
- 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
26
|
|
27
|
-
Bear in mind, any update of Typescript can potentially break your build.
|
27
|
+
Bear in mind, any update of Typescript can potentially break your build. But hopefully in a way that's useful.
|
28
28
|
|
29
29
|
### Installation
|
30
30
|
|
@@ -47,8 +47,7 @@ Make sure your project's `tsconfig.json` extends `@checkdigit/typescript-config`
|
|
47
47
|
},
|
48
48
|
"exclude": [
|
49
49
|
"node_modules",
|
50
|
-
"build"
|
51
|
-
"dist"
|
50
|
+
"build"
|
52
51
|
]
|
53
52
|
}
|
54
53
|
```
|
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,37 +1 @@
|
|
1
|
-
{
|
2
|
-
"name": "@checkdigit/typescript-config",
|
3
|
-
"version": "3.0.1",
|
4
|
-
"description": "Check Digit standard Typescript configuration",
|
5
|
-
"prettier": "@checkdigit/prettier-config",
|
6
|
-
"engines": {
|
7
|
-
"node": ">=16"
|
8
|
-
},
|
9
|
-
"peerDependencies": {
|
10
|
-
"typescript": ">=4.7.4",
|
11
|
-
"@types/node": ">=16"
|
12
|
-
},
|
13
|
-
"repository": {
|
14
|
-
"type": "git",
|
15
|
-
"url": "git+https://github.com/checkdigit/typescript-config.git"
|
16
|
-
},
|
17
|
-
"author": "Check Digit, LLC",
|
18
|
-
"license": "MIT",
|
19
|
-
"bugs": {
|
20
|
-
"url": "https://github.com/checkdigit/typescript-config/issues"
|
21
|
-
},
|
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 'src/**/*.ts'",
|
27
|
-
"prettier:fix": "prettier --write 'src/**/*.ts'",
|
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
|
-
},
|
33
|
-
"devDependencies": {
|
34
|
-
"@checkdigit/prettier-config": "2.1.0",
|
35
|
-
"rimraf": "^3.0.2"
|
36
|
-
}
|
37
|
-
}
|
1
|
+
{"name":"@checkdigit/typescript-config","version":"3.2.0-PR.23-dcac","description":"Check Digit standard Typescript configuration","prettier":"@checkdigit/prettier-config","engines":{"node":">=18"},"type":"module","peerDependencies":{"@types/node":">=18","typescript":"^5.0.0-beta"},"repository":{"type":"git","url":"git+https://github.com/checkdigit/typescript-config.git"},"author":"Check Digit, LLC","license":"MIT","bugs":{"url":"https://github.com/checkdigit/typescript-config/issues"},"homepage":"https://github.com/checkdigit/typescript-config#readme","scripts":{"preversion":"npm test","postversion":"git push && git push --tags","prettier":"prettier --ignore-path .gitignore --list-different .","prettier:fix":"prettier --ignore-path .gitignore --write .","test":"npm run ci:compile && npm run ci:test && npm run ci:style","build-tsc":"rimraf build && tsc","build-es":"rimraf build-es && esbuild ./src/* --platform=node --bundle --format=esm --sourcemap=inline --outdir=build-es","build-swc":"rimraf build-swc && swc ./src -d ./build-swc","ci:test":"NODE_OPTIONS=\"--no-warnings --experimental-vm-modules\" jest --coverage=false","ci:compile":"npm run build-tsc && npm run build-es && npm run build-swc","ci:style":"npm run prettier"},"devDependencies":{"@checkdigit/prettier-config":"^3.2.0","@swc/cli":"^0.1.61","@swc/core":"^1.3.32","@types/jest":"^29.4.0","esbuild":"^0.17.6","get-port":"^6.1.2","got":"11.8.6","jest":"^29.4.1","rimraf":"^4.1.2","ts-jest":"^29.0.5"},"jest":{"extensionsToTreatAsEsm":[".ts"],"transform":{"^.+\\.ts$":["ts-jest",{"isolatedModules":true,"diagnostics":false,"useESM":true}]},"collectCoverageFrom":["<rootDir>/src/**","!<rootDir>/src/**/*.spec.ts"],"testMatch":["<rootDir>/src/**/*.spec.ts"]},"overrides":{"ts-jest":{"typescript":"^5.0.0-beta"}},"files":["tsconfig.json","SECURITY.md","/src/"]}
|
package/src/module.ts
ADDED
package/tsconfig.json
CHANGED
@@ -1,9 +1,11 @@
|
|
1
1
|
{
|
2
2
|
"compilerOptions": {
|
3
|
-
"
|
4
|
-
"
|
3
|
+
"target": "esnext",
|
4
|
+
"module": "esnext",
|
5
|
+
"moduleResolution": "bundler",
|
5
6
|
"lib": ["esnext", "dom", "webworker"],
|
6
7
|
"sourceMap": true,
|
8
|
+
"inlineSources": true,
|
7
9
|
"outDir": "build",
|
8
10
|
"declaration": true,
|
9
11
|
"removeComments": false,
|
@@ -17,7 +19,7 @@
|
|
17
19
|
"noUnusedLocals": true,
|
18
20
|
"noUnusedParameters": true,
|
19
21
|
"alwaysStrict": true,
|
20
|
-
"
|
22
|
+
"verbatimModuleSyntax": true,
|
21
23
|
"noFallthroughCasesInSwitch": true,
|
22
24
|
"forceConsistentCasingInFileNames": true,
|
23
25
|
"emitDecoratorMetadata": true,
|
@@ -31,9 +33,5 @@
|
|
31
33
|
"useUnknownInCatchVariables": true,
|
32
34
|
"exactOptionalPropertyTypes": true
|
33
35
|
},
|
34
|
-
"exclude": [
|
35
|
-
|
36
|
-
"build",
|
37
|
-
"dist"
|
38
|
-
]
|
39
|
-
}
|
36
|
+
"exclude": ["node_modules", "build"]
|
37
|
+
}
|
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
|