@jupiterone/typescript-tools 18.0.3 → 18.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/config/jest-monorepo.js +4 -0
- package/config/jest.js +13 -2
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -264,7 +264,7 @@ Create `tsconfig.json` at root of your project that contains the contents below.
|
|
|
264
264
|
|
|
265
265
|
```json
|
|
266
266
|
{
|
|
267
|
-
"extends": "./node_modules/@jupiterone/typescript-tools/config/typescript-
|
|
267
|
+
"extends": "./node_modules/@jupiterone/typescript-tools/config/typescript-node18-monorepo",
|
|
268
268
|
"compilerOptions": {
|
|
269
269
|
"rootDir": ".",
|
|
270
270
|
"outDir": "dist"
|
|
@@ -331,7 +331,7 @@ Add this to `tsconfig.json` file at root of project:
|
|
|
331
331
|
|
|
332
332
|
```json
|
|
333
333
|
{
|
|
334
|
-
"extends": "./node_modules/@jupiterone/typescript-tools/config/typescript-
|
|
334
|
+
"extends": "./node_modules/@jupiterone/typescript-tools/config/typescript-node18",
|
|
335
335
|
"compilerOptions": {
|
|
336
336
|
"rootDir": ".",
|
|
337
337
|
"baseUrl": ".",
|
package/config/jest-monorepo.js
CHANGED
|
@@ -4,4 +4,8 @@ module.exports = {
|
|
|
4
4
|
...require('./jest-base'),
|
|
5
5
|
testMatch: ['<rootDir>/packages/*/{src,test}/**/*.test.{ts,tsx}'],
|
|
6
6
|
projects: ['<rootDir>/packages/*'],
|
|
7
|
+
collectCoverage: true,
|
|
8
|
+
coverageDirectory: '<rootDir>/coverage',
|
|
9
|
+
coverageReporters: ['json-summary', 'text', 'text-summary'],
|
|
10
|
+
collectCoverageFrom: ['src/**/*.ts'],
|
|
7
11
|
};
|
package/config/jest.js
CHANGED
|
@@ -1,9 +1,20 @@
|
|
|
1
1
|
module.exports = {
|
|
2
2
|
...require('./jest-base'),
|
|
3
3
|
testMatch: ['<rootDir>/{src,test}/**/*.test.{ts,tsx}'],
|
|
4
|
+
// process.env.JEST_IS_MONOREPO is set to 'true' when project loads
|
|
5
|
+
// @jupiterone/typescript-tools/config/jest-monorepo file for configuring
|
|
6
|
+
// monorepo to use `jest`.
|
|
4
7
|
...(process.env.JEST_IS_MONOREPO === 'true'
|
|
5
|
-
?
|
|
6
|
-
|
|
8
|
+
? // If this config is for a package/project within a monorepo then we
|
|
9
|
+
// don't include the coverage configuration properties because they
|
|
10
|
+
// will produce jest config validation warnings.
|
|
11
|
+
// The coverage-related properties should exist at the root jest.config.js
|
|
12
|
+
// file for a monorepo (not within the packages/*/jest.config.js files).
|
|
13
|
+
{}
|
|
14
|
+
: // If this is not a monorepo, then include the coverage-related
|
|
15
|
+
// configuration properties.
|
|
16
|
+
{
|
|
17
|
+
coverageDirectory: '<rootDir>/coverage',
|
|
7
18
|
collectCoverage: true,
|
|
8
19
|
coverageReporters: ['json-summary', 'text', 'text-summary'],
|
|
9
20
|
collectCoverageFrom: [
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jupiterone/typescript-tools",
|
|
3
|
-
"version": "18.0
|
|
3
|
+
"version": "18.1.0",
|
|
4
4
|
"main": "./index.js",
|
|
5
5
|
"repository": "https://github.com/jupiterone/typescript-tools",
|
|
6
6
|
"author": "Development <development@jupiterone.com>",
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"@jupiterone/eslint-config": "^2.1.0",
|
|
36
36
|
"@philidem/rewrite-relative-paths": "^1.2.3",
|
|
37
37
|
"babel-jest": "^29.3.1",
|
|
38
|
-
"babel-plugin-module-resolver": "^
|
|
38
|
+
"babel-plugin-module-resolver": "^5.0.0",
|
|
39
39
|
"eslint": "^8.30.0",
|
|
40
40
|
"husky": "^8.0.2",
|
|
41
41
|
"jest": "^29.3.1",
|