Skip to content

Commit 265ac93

Browse files
committed
fix: make all tests pass on every TypeScript version in the range [3.0, 4.3-rc1]
1 parent 20e0ca4 commit 265ac93

37 files changed

+7806
-5203
lines changed

.github/workflows/workflow.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
strategy:
1212
matrix:
1313
os: [windows-latest, macos-latest, ubuntu-18.04]
14-
node: [10, 13]
14+
node: [12, 14, 15]
1515

1616
steps:
1717
- name: Checkout code

.husky/.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
_

.husky/pre-commit

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/bin/sh
2+
. "$(dirname "$0")/_/husky.sh"
3+
4+
pretty-quick --staged

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,7 @@ For example, an expression such as:
350350
```typescript
351351
import { DIContainer } from "@wessberg/di";
352352
import { MyInterface } from "./my-interface";
353-
import { Myimplementation } from "./my-implementation";
353+
import { MyImplementation } from "./my-implementation";
354354

355355
const container = new DIContainer();
356356
container.registerSingleton<MyInterface, MyImplementation>();

package.json

+50-40
Original file line numberDiff line numberDiff line change
@@ -3,22 +3,22 @@
33
"version": "2.1.1",
44
"description": "A Custom Transformer for Typescript that enables compile-time Dependency Injection",
55
"scripts": {
6-
"generate:scaffold": "scaffold all --yes",
6+
"generate:sandhog": "sandhog all --yes",
77
"generate:changelog": "standard-changelog --first-release",
8-
"generate:all": "pnpm run generate:scaffold && pnpm run generate:changelog",
9-
"clean:dist": "rimraf dist",
10-
"clean": "pnpm run clean:dist",
8+
"generate:all": "pnpm run generate:sandhog && pnpm run generate:changelog",
9+
"clean": "rimraf dist",
1110
"lint": "tsc --noEmit && eslint \"src/**/*.ts\" --color",
12-
"prettier": "prettier --write '{src,test,documentation}/**/*.{js,ts,json,html,xml,css,md}'",
11+
"prettier": "prettier --write \"{src,test,documentation}/**/*.{js,ts,json,html,xml,css,md}\"",
1312
"test": "ava",
14-
"prebuild": "pnpm run clean:dist",
13+
"prebuild": "pnpm run clean",
1514
"build": "pnpm run rollup",
16-
"prewatch": "pnpm run clean:dist",
1715
"watch": "pnpm run rollup -- --watch",
1816
"rollup": "rollup -c rollup.config.js",
19-
"preversion": "pnpm run lint && NODE_ENV=production pnpm run build",
17+
"preversion": "pnpm run lint && pnpm run build",
2018
"version": "pnpm run generate:all && git add .",
21-
"release": "np --no-cleanup --no-yarn"
19+
"release": "np --no-cleanup --no-yarn --no-tests",
20+
"update:check": "pnpx npm-check-updates -x np,slash --dep dev,prod",
21+
"update:commit": "pnpx npm-check-updates -u -x np,slash --dep dev,prod && pnpm update && pnpm install"
2222
},
2323
"keywords": [
2424
"DI",
@@ -50,37 +50,52 @@
5050
],
5151
"license": "MIT",
5252
"devDependencies": {
53-
"@types/prettier": "^2.0.1",
54-
"@types/node": "^14.0.5",
55-
"@typescript-eslint/eslint-plugin": "^3.0.1",
56-
"@typescript-eslint/parser": "^3.0.1",
57-
"@wessberg/rollup-plugin-ts": "^1.2.24",
58-
"@wessberg/scaffold": "^1.0.29",
53+
"@types/node": "^15.3.1",
54+
"@types/prettier": "^2.2.3",
55+
"@types/semver": "^7.3.6",
56+
"@typescript-eslint/eslint-plugin": "^4.24.0",
57+
"@typescript-eslint/parser": "^4.24.0",
5958
"@wessberg/di": "^2.0.3",
60-
"@wessberg/ts-config": "^1.0.12",
61-
"ava": "^3.8.2",
62-
"eslint": "^7.1.0",
63-
"slash": "^3.0.0",
64-
"eslint-config-prettier": "^6.11.0",
65-
"eslint-plugin-import": "^2.20.2",
66-
"eslint-plugin-jsdoc": "^25.4.2",
67-
"husky": "^4.2.5",
68-
"np": "^6.2.3",
69-
"pnpm": "^4.14.4",
70-
"prettier": "^2.0.5",
71-
"pretty-quick": "^2.0.1",
59+
"@wessberg/rollup-plugin-ts": "^1.3.14",
60+
"@wessberg/ts-config": "^1.1.0",
61+
"semver": "^7.3.5",
62+
"ava": "^3.15.0",
63+
"eslint": "^7.26.0",
64+
"eslint-config-prettier": "^8.3.0",
65+
"eslint-plugin-import": "^2.23.2",
66+
"eslint-plugin-jsdoc": "^34.8.2",
67+
"husky": "^6.0.0",
68+
"np": "^6.5.0",
69+
"pnpm": "^6.4.0",
70+
"prettier": "^2.3.0",
71+
"pretty-quick": "^3.1.0",
7272
"rimraf": "^3.0.2",
73-
"rollup": "^2.10.9",
74-
"standard-changelog": "^2.0.24",
75-
"ts-node": "^8.10.1",
76-
"typescript": "^3.9.3"
73+
"rollup": "^2.48.0",
74+
"sandhog": "^1.0.38",
75+
"slash": "^3.0.0",
76+
"standard-changelog": "^2.0.27",
77+
"ts-node": "^9.1.1",
78+
"typescript": "^4.3.1-rc",
79+
"typescript-3-0-1": "npm:typescript@3.0.1",
80+
"typescript-3-1-1": "npm:typescript@3.1.1",
81+
"typescript-3-2-1": "npm:typescript@3.2.1",
82+
"typescript-3-3-1": "npm:typescript@3.3.1",
83+
"typescript-3-4-1": "npm:typescript@3.4.1",
84+
"typescript-3-5-1": "npm:typescript@3.5.1",
85+
"typescript-3-6-2": "npm:typescript@3.6.2",
86+
"typescript-3-7-2": "npm:typescript@3.7.2",
87+
"typescript-3-8-3": "npm:typescript@3.8.3",
88+
"typescript-3-9-2": "npm:typescript@3.9.2",
89+
"typescript-4-0-3": "npm:typescript@4.0.3",
90+
"typescript-4-1-2": "npm:typescript@4.1.2",
91+
"typescript-4-2-4": "npm:typescript@4.2.4"
7792
},
7893
"dependencies": {
79-
"@wessberg/ts-evaluator": "^0.0.25",
80-
"tslib": "^2.0.0"
94+
"ts-evaluator": "^0.1.0",
95+
"tslib": "^2.2.0"
8196
},
8297
"peerDependencies": {
83-
"typescript": "^3.x"
98+
"typescript": ">=3.x || >= 4.x"
8499
},
85100
"repository": {
86101
"type": "git",
@@ -98,14 +113,9 @@
98113
"engines": {
99114
"node": ">=8.0.0"
100115
},
101-
"husky": {
102-
"hooks": {
103-
"pre-commit": "pretty-quick --staged"
104-
}
105-
},
106116
"ava": {
107117
"files": [
108-
"test/**.test.ts"
118+
"test/**/**.test.ts"
109119
],
110120
"verbose": true,
111121
"timeout": "40s",

0 commit comments

Comments
 (0)