@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 CHANGED
@@ -1,6 +1,6 @@
1
1
  The MIT License
2
2
 
3
- Copyright (c) 2021 Check Digit, LLC
3
+ Copyright (c) 2021-2022 Check Digit, LLC
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
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) 2021 [Check Digit, LLC](https://checkdigit.com)
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
- - requires Node 14 or above
12
- - emits ES2020
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. So our "best effort" policy is:
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. We coordinate this
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. But hopefully in a way that's useful.
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": "2.2.0",
3
+ "version": "3.1.0",
4
4
  "description": "Check Digit standard Typescript configuration",
5
- "scripts": {
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": ">=14"
7
+ "node": ">=16"
12
8
  },
13
9
  "peerDependencies": {
14
- "typescript": ">=4.4.2"
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
- "typescript": "4.4.2"
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": "es2020",
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
- "node_modules",
36
- "build",
37
- "dist"
38
- ]
39
- }
34
+ "exclude": ["node_modules", "build"]
35
+ }
package/dist/index.d.ts DELETED
@@ -1,11 +0,0 @@
1
- /**
2
- * Check for Typescript 4.4 features
3
- */
4
- interface SymbolIndexSignature {
5
- [name: symbol]: number;
6
- }
7
- interface Person {
8
- name: string;
9
- age?: number;
10
- }
11
- declare const person: Person;
package/dist/index.js DELETED
@@ -1 +0,0 @@
1
- "use strict";try{console.log("hello")}catch(e){console.error(e.message)}