|
13 | 13 | "no-changes": "(git log --oneline -1 | grep -q \"chore(release):\") && echo \"No changes to release.\"", |
14 | 14 | "bump": "yarn run --silent no-changes || standard-version", |
15 | 15 | "release": "yarn run --silent no-changes || (yarn run bump && git push --follow-tags origin master)", |
| 16 | + "test": "rm -fr lib/ && jest --passWithNoTests && yarn run eslint && yarn compile", |
| 17 | + "test:watch": "jest --watch", |
| 18 | + "test:update": "jest --updateSnapshot", |
16 | 19 | "projen:upgrade": "yarn upgrade -L projen && CI=\"\" yarn projen", |
17 | 20 | "compile": "jsii --silence-warnings=reserved-word --no-fix-peer-dependencies && jsii-docgen", |
18 | 21 | "watch": "jsii -w --silence-warnings=reserved-word --no-fix-peer-dependencies", |
19 | 22 | "build": "yarn compile", |
20 | 23 | "package": "jsii-pacmak", |
21 | | - "test": "rm -fr lib/ && jest --passWithNoTests && yarn run eslint && yarn compile", |
22 | | - "test:watch": "jest --watch", |
23 | | - "test:update": "jest --updateSnapshot", |
24 | | - "eslint": "eslint --ext .ts --fix src test", |
| 24 | + "eslint": "eslint --ext .ts,.tsx --fix --no-error-on-unmatched-pattern src test", |
25 | 25 | "compat": "npx jsii-diff npm:$(node -p \"require('./package.json').name\") -k --ignore-file .compatignore || (echo \"\nUNEXPECTED BREAKING CHANGES: add keys such as 'removed:constructs.Node.of' to .compatignore to skip.\n\" && exit 1)", |
26 | 26 | "docgen": "jsii-docgen" |
27 | 27 | }, |
|
33 | 33 | "devDependencies": { |
34 | 34 | "@types/jest": "^26.0.7", |
35 | 35 | "@types/js-yaml": "^3.12.5", |
36 | | - "@types/node": "^12.0.0", |
| 36 | + "@types/node": "^10.17.0", |
37 | 37 | "@typescript-eslint/eslint-plugin": "^4.3.0", |
38 | 38 | "@typescript-eslint/parser": "^4.3.0", |
39 | 39 | "constructs": "^5.0.0", |
|
42 | 42 | "eslint-import-resolver-typescript": "^2.3.0", |
43 | 43 | "eslint-plugin-import": "^2.22.1", |
44 | 44 | "jest": "^26.4.2", |
| 45 | + "jest-junit": "^12", |
45 | 46 | "jsii": "^1.11.0", |
46 | 47 | "jsii-diff": "^1.11.0", |
47 | 48 | "jsii-docgen": "^1.3.2", |
48 | 49 | "jsii-pacmak": "^1.11.0", |
49 | 50 | "json-schema": "^0.2.5", |
50 | | - "projen": "^0.3.141", |
| 51 | + "projen": "^0.3.178", |
51 | 52 | "standard-version": "^9.0.0", |
52 | 53 | "ts-jest": "^26.1.0", |
53 | 54 | "typescript": "^3.9.5" |
|
70 | 71 | "github" |
71 | 72 | ], |
72 | 73 | "engines": { |
73 | | - "node": ">= 12.0.0" |
| 74 | + "node": ">= 10.17.0" |
74 | 75 | }, |
75 | 76 | "main": "lib/index.js", |
76 | 77 | "license": "Apache-2.0", |
|
94 | 95 | "command": "yarn run release", |
95 | 96 | "category": 2 |
96 | 97 | }, |
| 98 | + "test": { |
| 99 | + "desc": "Run tests", |
| 100 | + "command": "yarn run test", |
| 101 | + "category": 1 |
| 102 | + }, |
| 103 | + "test:watch": { |
| 104 | + "desc": "Run jest in watch mode", |
| 105 | + "command": "yarn run test:watch", |
| 106 | + "category": 1 |
| 107 | + }, |
97 | 108 | "projen:upgrade": { |
98 | 109 | "desc": "upgrades projen to the latest version", |
99 | 110 | "command": "yarn run projen:upgrade", |
|
119 | 130 | "command": "yarn run package", |
120 | 131 | "category": 2 |
121 | 132 | }, |
122 | | - "test": { |
123 | | - "desc": "Run tests", |
124 | | - "command": "yarn run test", |
125 | | - "category": 1 |
126 | | - }, |
127 | | - "test:watch": { |
128 | | - "desc": "Run jest in watch mode", |
129 | | - "command": "yarn run test:watch", |
130 | | - "category": 1 |
131 | | - }, |
132 | 133 | "eslint": { |
133 | 134 | "desc": "Runs eslint against the codebase", |
134 | 135 | "command": "yarn run eslint", |
|
146 | 147 | } |
147 | 148 | }, |
148 | 149 | "version": "0.0.0", |
149 | | - "types": "lib/index.d.ts", |
150 | 150 | "jest": { |
151 | 151 | "clearMocks": true, |
152 | 152 | "collectCoverage": true, |
| 153 | + "coverageDirectory": "coverage", |
153 | 154 | "coveragePathIgnorePatterns": [ |
154 | 155 | "/node_modules/" |
155 | 156 | ], |
156 | 157 | "testPathIgnorePatterns": [ |
157 | 158 | "/node_modules/" |
158 | 159 | ], |
159 | | - "preset": "ts-jest", |
160 | 160 | "testMatch": [ |
161 | 161 | "**/__tests__/**/*.ts?(x)", |
162 | 162 | "**/?(*.)+(spec|test).ts?(x)" |
163 | 163 | ], |
| 164 | + "reporters": [ |
| 165 | + "default", |
| 166 | + [ |
| 167 | + "jest-junit", |
| 168 | + { |
| 169 | + "outputDirectory": "test-reports" |
| 170 | + } |
| 171 | + ] |
| 172 | + ], |
| 173 | + "preset": "ts-jest", |
164 | 174 | "globals": { |
165 | 175 | "ts-jest": { |
166 | 176 | "tsconfig": "tsconfig.jest.json" |
167 | 177 | } |
168 | 178 | } |
169 | 179 | }, |
| 180 | + "types": "lib/index.d.ts", |
170 | 181 | "stability": "stable", |
171 | 182 | "jsii": { |
172 | 183 | "outdir": "dist", |
|
0 commit comments