diff --git a/apps/api-extractor/config/jest.config.json b/apps/api-extractor/config/jest.config.json index 4bb17bde3ee..8e67263514a 100644 --- a/apps/api-extractor/config/jest.config.json +++ b/apps/api-extractor/config/jest.config.json @@ -1,3 +1,11 @@ { - "extends": "@rushstack/heft-node-rig/profiles/default/config/jest.config.json" + "extends": "@rushstack/heft-node-rig/profiles/default/config/jest.config.json", + + // Enable code coverage for Jest + "collectCoverage": true, + "coverageDirectory": "/coverage", + "coverageReporters": ["cobertura", "html"], + + // Use v8 coverage provider to avoid Babel + "coverageProvider": "v8" } diff --git a/apps/api-extractor/config/rush-project.json b/apps/api-extractor/config/rush-project.json new file mode 100644 index 00000000000..4e090849eeb --- /dev/null +++ b/apps/api-extractor/config/rush-project.json @@ -0,0 +1,14 @@ +{ + "extends": "@rushstack/heft-node-rig/profiles/default/config/rush-project.json", + + "operationSettings": [ + { + "operationName": "_phase:build", + "outputFolderNames": [".heft"] + }, + { + "operationName": "_phase:test", + "outputFolderNames": ["coverage"] + } + ] +} diff --git a/apps/heft/config/jest.config.json b/apps/heft/config/jest.config.json index 4bb17bde3ee..8e67263514a 100644 --- a/apps/heft/config/jest.config.json +++ b/apps/heft/config/jest.config.json @@ -1,3 +1,11 @@ { - "extends": "@rushstack/heft-node-rig/profiles/default/config/jest.config.json" + "extends": "@rushstack/heft-node-rig/profiles/default/config/jest.config.json", + + // Enable code coverage for Jest + "collectCoverage": true, + "coverageDirectory": "/coverage", + "coverageReporters": ["cobertura", "html"], + + // Use v8 coverage provider to avoid Babel + "coverageProvider": "v8" } diff --git a/apps/heft/config/rush-project.json b/apps/heft/config/rush-project.json new file mode 100644 index 00000000000..4e090849eeb --- /dev/null +++ b/apps/heft/config/rush-project.json @@ -0,0 +1,14 @@ +{ + "extends": "@rushstack/heft-node-rig/profiles/default/config/rush-project.json", + + "operationSettings": [ + { + "operationName": "_phase:build", + "outputFolderNames": [".heft"] + }, + { + "operationName": "_phase:test", + "outputFolderNames": ["coverage"] + } + ] +} diff --git a/apps/lockfile-explorer-web/config/heft.json b/apps/lockfile-explorer-web/config/heft.json index 018069390cb..5a56a867004 100644 --- a/apps/lockfile-explorer-web/config/heft.json +++ b/apps/lockfile-explorer-web/config/heft.json @@ -8,7 +8,7 @@ * Optionally specifies another JSON config file that this file extends from. This provides a way for standard * settings to be shared across multiple projects. */ - "extends": "@rushstack/heft-web-rig/profiles/app/config/heft.json", + "extends": "local-web-rig/profiles/app/config/heft.json", "phasesByName": { "build": { diff --git a/apps/lockfile-explorer-web/config/jest.config.json b/apps/lockfile-explorer-web/config/jest.config.json index 7f2f5dc42b6..dd440826f6c 100644 --- a/apps/lockfile-explorer-web/config/jest.config.json +++ b/apps/lockfile-explorer-web/config/jest.config.json @@ -1,5 +1,5 @@ { - "extends": "@rushstack/heft-web-rig/profiles/app/config/jest.config.json", + "extends": "local-web-rig/profiles/app/config/jest.config.json", // Load the initappcontext.js stub when running tests "setupFiles": ["../lib-commonjs/stub/initappcontext.js"] diff --git a/apps/lockfile-explorer-web/config/rig.json b/apps/lockfile-explorer-web/config/rig.json index 687fc2911bc..26f617ab3fc 100644 --- a/apps/lockfile-explorer-web/config/rig.json +++ b/apps/lockfile-explorer-web/config/rig.json @@ -1,6 +1,6 @@ { "$schema": "https://developer.microsoft.com/json-schemas/rig-package/rig.schema.json", - "rigPackageName": "@rushstack/heft-web-rig", + "rigPackageName": "local-web-rig", "rigProfile": "app" } diff --git a/apps/lockfile-explorer-web/package.json b/apps/lockfile-explorer-web/package.json index 770e0d4e241..0a410dc132a 100644 --- a/apps/lockfile-explorer-web/package.json +++ b/apps/lockfile-explorer-web/package.json @@ -23,11 +23,9 @@ }, "devDependencies": { "@rushstack/eslint-config": "workspace:*", - "@rushstack/heft-web-rig": "workspace:*", "@rushstack/heft": "workspace:*", - "@types/heft-jest": "1.0.1", "@types/react-dom": "16.9.14", "@types/react": "16.14.23", - "@types/webpack-env": "1.18.0" + "local-web-rig": "workspace:*" } } diff --git a/apps/lockfile-explorer-web/tsconfig.json b/apps/lockfile-explorer-web/tsconfig.json index 18d8c1a0dab..9688e20399b 100644 --- a/apps/lockfile-explorer-web/tsconfig.json +++ b/apps/lockfile-explorer-web/tsconfig.json @@ -1,8 +1,3 @@ { - "extends": "./node_modules/@rushstack/heft-web-rig/profiles/app/tsconfig-base.json", - "compilerOptions": { - "types": ["heft-jest", "webpack-env"], - "target": "es2017", - "lib": ["es2017", "scripthost", "es2015.collection", "es2015.promise", "es2015.iterable", "dom"] - } + "extends": "./node_modules/local-web-rig/profiles/app/tsconfig-base.json" } diff --git a/apps/lockfile-explorer-web/webpack.config.js b/apps/lockfile-explorer-web/webpack.config.js index db1db2d8a01..bd625b455a9 100644 --- a/apps/lockfile-explorer-web/webpack.config.js +++ b/apps/lockfile-explorer-web/webpack.config.js @@ -1,7 +1,7 @@ 'use strict'; const path = require('path'); -const createWebpackConfig = require('@rushstack/heft-web-rig/profiles/app/webpack-base.config'); +const createWebpackConfig = require('local-web-rig/profiles/app/webpack-base.config'); module.exports = function createConfig(env, argv) { return createWebpackConfig({ diff --git a/build-tests-samples/heft-node-basic-tutorial/config/jest.config.json b/build-tests-samples/heft-node-basic-tutorial/config/jest.config.json index b6f305ec886..8ae16adcbda 100644 --- a/build-tests-samples/heft-node-basic-tutorial/config/jest.config.json +++ b/build-tests-samples/heft-node-basic-tutorial/config/jest.config.json @@ -1,3 +1,13 @@ { - "extends": "@rushstack/heft-jest-plugin/includes/jest-shared.config.json" + "extends": "@rushstack/heft-jest-plugin/includes/jest-shared.config.json", + + // These additional properties exist for caching purposes in the rushstack repo + + // Enable code coverage for Jest + "collectCoverage": true, + "coverageDirectory": "/coverage", + "coverageReporters": ["cobertura", "html"], + + // Use v8 coverage provider to avoid Babel + "coverageProvider": "v8" } diff --git a/build-tests-samples/heft-node-basic-tutorial/config/rush-project.json b/build-tests-samples/heft-node-basic-tutorial/config/rush-project.json index 2af7036b0ef..9042450ba22 100644 --- a/build-tests-samples/heft-node-basic-tutorial/config/rush-project.json +++ b/build-tests-samples/heft-node-basic-tutorial/config/rush-project.json @@ -1,10 +1,15 @@ +// This file exists for caching purposes in the rushstack repo { "$schema": "https://developer.microsoft.com/json-schemas/rush/v5/rush-project.schema.json", "operationSettings": [ { - "operationName": "build", - "outputFolderNames": ["lib", "dist"] + "operationName": "_phase:build", + "outputFolderNames": [".heft", "lib", "dist"] + }, + { + "operationName": "_phase:test", + "outputFolderNames": ["coverage"] } ] } diff --git a/build-tests-samples/heft-node-jest-tutorial/config/jest.config.json b/build-tests-samples/heft-node-jest-tutorial/config/jest.config.json index 3c7379f4c5a..09a743c117f 100644 --- a/build-tests-samples/heft-node-jest-tutorial/config/jest.config.json +++ b/build-tests-samples/heft-node-jest-tutorial/config/jest.config.json @@ -1,6 +1,6 @@ { "extends": "@rushstack/heft-jest-plugin/includes/jest-shared.config.json", - "collectCoverage": true, + "coverageThreshold": { "global": { "branches": 50, @@ -8,5 +8,15 @@ "lines": 50, "statements": 50 } - } + }, + + // These additional properties exist for caching purposes in the rushstack repo + + // Enable code coverage for Jest + "collectCoverage": true, + "coverageDirectory": "/coverage", + "coverageReporters": ["cobertura", "html"], + + // Use v8 coverage provider to avoid Babel + "coverageProvider": "v8" } diff --git a/build-tests-samples/heft-node-jest-tutorial/config/rush-project.json b/build-tests-samples/heft-node-jest-tutorial/config/rush-project.json index 2af7036b0ef..9042450ba22 100644 --- a/build-tests-samples/heft-node-jest-tutorial/config/rush-project.json +++ b/build-tests-samples/heft-node-jest-tutorial/config/rush-project.json @@ -1,10 +1,15 @@ +// This file exists for caching purposes in the rushstack repo { "$schema": "https://developer.microsoft.com/json-schemas/rush/v5/rush-project.schema.json", "operationSettings": [ { - "operationName": "build", - "outputFolderNames": ["lib", "dist"] + "operationName": "_phase:build", + "outputFolderNames": [".heft", "lib", "dist"] + }, + { + "operationName": "_phase:test", + "outputFolderNames": ["coverage"] } ] } diff --git a/build-tests-samples/heft-node-rig-tutorial/config/jest.config.json b/build-tests-samples/heft-node-rig-tutorial/config/jest.config.json index 4bb17bde3ee..c1f53a85731 100644 --- a/build-tests-samples/heft-node-rig-tutorial/config/jest.config.json +++ b/build-tests-samples/heft-node-rig-tutorial/config/jest.config.json @@ -1,3 +1,13 @@ { - "extends": "@rushstack/heft-node-rig/profiles/default/config/jest.config.json" + "extends": "@rushstack/heft-node-rig/profiles/default/config/jest.config.json", + + // These additional properties exist for caching purposes in the rushstack repo + + // Enable code coverage for Jest + "collectCoverage": true, + "coverageDirectory": "/coverage", + "coverageReporters": ["cobertura", "html"], + + // Use v8 coverage provider to avoid Babel + "coverageProvider": "v8" } diff --git a/build-tests-samples/heft-node-rig-tutorial/config/rush-project.json b/build-tests-samples/heft-node-rig-tutorial/config/rush-project.json new file mode 100644 index 00000000000..417e302ddcc --- /dev/null +++ b/build-tests-samples/heft-node-rig-tutorial/config/rush-project.json @@ -0,0 +1,15 @@ +// This file exists for caching purposes in the rushstack repo +{ + "extends": "@rushstack/heft-node-rig/profiles/default/config/rush-project.json", + + "operationSettings": [ + { + "operationName": "_phase:build", + "outputFolderNames": [".heft", "release"] + }, + { + "operationName": "_phase:test", + "outputFolderNames": ["coverage"] + } + ] +} diff --git a/build-tests-samples/heft-serverless-stack-tutorial/config/jest.config.json b/build-tests-samples/heft-serverless-stack-tutorial/config/jest.config.json index b6f305ec886..8ae16adcbda 100644 --- a/build-tests-samples/heft-serverless-stack-tutorial/config/jest.config.json +++ b/build-tests-samples/heft-serverless-stack-tutorial/config/jest.config.json @@ -1,3 +1,13 @@ { - "extends": "@rushstack/heft-jest-plugin/includes/jest-shared.config.json" + "extends": "@rushstack/heft-jest-plugin/includes/jest-shared.config.json", + + // These additional properties exist for caching purposes in the rushstack repo + + // Enable code coverage for Jest + "collectCoverage": true, + "coverageDirectory": "/coverage", + "coverageReporters": ["cobertura", "html"], + + // Use v8 coverage provider to avoid Babel + "coverageProvider": "v8" } diff --git a/build-tests-samples/heft-serverless-stack-tutorial/config/rush-project.json b/build-tests-samples/heft-serverless-stack-tutorial/config/rush-project.json index 2af7036b0ef..9042450ba22 100644 --- a/build-tests-samples/heft-serverless-stack-tutorial/config/rush-project.json +++ b/build-tests-samples/heft-serverless-stack-tutorial/config/rush-project.json @@ -1,10 +1,15 @@ +// This file exists for caching purposes in the rushstack repo { "$schema": "https://developer.microsoft.com/json-schemas/rush/v5/rush-project.schema.json", "operationSettings": [ { - "operationName": "build", - "outputFolderNames": ["lib", "dist"] + "operationName": "_phase:build", + "outputFolderNames": [".heft", "lib", "dist"] + }, + { + "operationName": "_phase:test", + "outputFolderNames": ["coverage"] } ] } diff --git a/build-tests-samples/heft-storybook-react-tutorial/config/jest.config.json b/build-tests-samples/heft-storybook-react-tutorial/config/jest.config.json index 441ad22d6d1..5e165f55d1d 100644 --- a/build-tests-samples/heft-storybook-react-tutorial/config/jest.config.json +++ b/build-tests-samples/heft-storybook-react-tutorial/config/jest.config.json @@ -1,3 +1,13 @@ { - "extends": "@rushstack/heft-jest-plugin/includes/jest-web.config.json" + "extends": "@rushstack/heft-jest-plugin/includes/jest-web.config.json", + + // These additional properties exist for caching purposes in the rushstack repo + + // Enable code coverage for Jest + "collectCoverage": true, + "coverageDirectory": "/coverage", + "coverageReporters": ["cobertura", "html"], + + // Use v8 coverage provider to avoid Babel + "coverageProvider": "v8" } diff --git a/build-tests-samples/heft-storybook-react-tutorial/config/rush-project.json b/build-tests-samples/heft-storybook-react-tutorial/config/rush-project.json index 2af7036b0ef..9042450ba22 100644 --- a/build-tests-samples/heft-storybook-react-tutorial/config/rush-project.json +++ b/build-tests-samples/heft-storybook-react-tutorial/config/rush-project.json @@ -1,10 +1,15 @@ +// This file exists for caching purposes in the rushstack repo { "$schema": "https://developer.microsoft.com/json-schemas/rush/v5/rush-project.schema.json", "operationSettings": [ { - "operationName": "build", - "outputFolderNames": ["lib", "dist"] + "operationName": "_phase:build", + "outputFolderNames": [".heft", "lib", "dist"] + }, + { + "operationName": "_phase:test", + "outputFolderNames": ["coverage"] } ] } diff --git a/build-tests-samples/heft-web-rig-app-tutorial/config/jest.config.json b/build-tests-samples/heft-web-rig-app-tutorial/config/jest.config.json index 600ba9ea39a..29266733d41 100644 --- a/build-tests-samples/heft-web-rig-app-tutorial/config/jest.config.json +++ b/build-tests-samples/heft-web-rig-app-tutorial/config/jest.config.json @@ -1,3 +1,13 @@ { - "extends": "@rushstack/heft-web-rig/profiles/library/config/jest.config.json" + "extends": "@rushstack/heft-web-rig/profiles/app/config/jest.config.json", + + // These additional properties exist for caching purposes in the rushstack repo + + // Enable code coverage for Jest + "collectCoverage": true, + "coverageDirectory": "/coverage", + "coverageReporters": ["cobertura", "html"], + + // Use v8 coverage provider to avoid Babel + "coverageProvider": "v8" } diff --git a/build-tests-samples/heft-web-rig-app-tutorial/config/rig.json b/build-tests-samples/heft-web-rig-app-tutorial/config/rig.json index d72946b5042..687fc2911bc 100644 --- a/build-tests-samples/heft-web-rig-app-tutorial/config/rig.json +++ b/build-tests-samples/heft-web-rig-app-tutorial/config/rig.json @@ -2,5 +2,5 @@ "$schema": "https://developer.microsoft.com/json-schemas/rig-package/rig.schema.json", "rigPackageName": "@rushstack/heft-web-rig", - "rigProfile": "library" + "rigProfile": "app" } diff --git a/build-tests-samples/heft-web-rig-app-tutorial/config/rush-project.json b/build-tests-samples/heft-web-rig-app-tutorial/config/rush-project.json new file mode 100644 index 00000000000..852bbf63b9e --- /dev/null +++ b/build-tests-samples/heft-web-rig-app-tutorial/config/rush-project.json @@ -0,0 +1,15 @@ +// This file exists for caching purposes in the rushstack repo +{ + "extends": "@rushstack/heft-web-rig/profiles/app/config/rush-project.json", + + "operationSettings": [ + { + "operationName": "_phase:build", + "outputFolderNames": [".heft", "release"] + }, + { + "operationName": "_phase:test", + "outputFolderNames": ["coverage"] + } + ] +} diff --git a/build-tests-samples/heft-web-rig-library-tutorial/config/jest.config.json b/build-tests-samples/heft-web-rig-library-tutorial/config/jest.config.json index 600ba9ea39a..105047ade63 100644 --- a/build-tests-samples/heft-web-rig-library-tutorial/config/jest.config.json +++ b/build-tests-samples/heft-web-rig-library-tutorial/config/jest.config.json @@ -1,3 +1,13 @@ { - "extends": "@rushstack/heft-web-rig/profiles/library/config/jest.config.json" + "extends": "@rushstack/heft-web-rig/profiles/library/config/jest.config.json", + + // These additional properties exist for caching purposes in the rushstack repo + + // Enable code coverage for Jest + "collectCoverage": true, + "coverageDirectory": "/coverage", + "coverageReporters": ["cobertura", "html"], + + // Use v8 coverage provider to avoid Babel + "coverageProvider": "v8" } diff --git a/build-tests-samples/heft-web-rig-library-tutorial/config/rush-project.json b/build-tests-samples/heft-web-rig-library-tutorial/config/rush-project.json new file mode 100644 index 00000000000..93c1e05a56f --- /dev/null +++ b/build-tests-samples/heft-web-rig-library-tutorial/config/rush-project.json @@ -0,0 +1,15 @@ +// This file exists for caching purposes in the rushstack repo +{ + "extends": "@rushstack/heft-web-rig/profiles/library/config/rush-project.json", + + "operationSettings": [ + { + "operationName": "_phase:build", + "outputFolderNames": [".heft", "release"] + }, + { + "operationName": "_phase:test", + "outputFolderNames": ["coverage"] + } + ] +} diff --git a/build-tests-samples/heft-webpack-basic-tutorial/config/jest.config.json b/build-tests-samples/heft-webpack-basic-tutorial/config/jest.config.json index 52635a8eb53..bfc5ce0d9b7 100644 --- a/build-tests-samples/heft-webpack-basic-tutorial/config/jest.config.json +++ b/build-tests-samples/heft-webpack-basic-tutorial/config/jest.config.json @@ -12,5 +12,15 @@ "!lib-commonjs/**/__tests__/**", "!lib-commonjs/**/__fixtures__/**", "!lib-commonjs/**/__mocks__/**" - ] + ], + + // These additional properties exist for caching purposes in the rushstack repo + + // Enable code coverage for Jest + "collectCoverage": true, + "coverageDirectory": "/coverage", + "coverageReporters": ["cobertura", "html"], + + // Use v8 coverage provider to avoid Babel + "coverageProvider": "v8" } diff --git a/build-tests-samples/heft-webpack-basic-tutorial/config/rush-project.json b/build-tests-samples/heft-webpack-basic-tutorial/config/rush-project.json index 2af7036b0ef..9042450ba22 100644 --- a/build-tests-samples/heft-webpack-basic-tutorial/config/rush-project.json +++ b/build-tests-samples/heft-webpack-basic-tutorial/config/rush-project.json @@ -1,10 +1,15 @@ +// This file exists for caching purposes in the rushstack repo { "$schema": "https://developer.microsoft.com/json-schemas/rush/v5/rush-project.schema.json", "operationSettings": [ { - "operationName": "build", - "outputFolderNames": ["lib", "dist"] + "operationName": "_phase:build", + "outputFolderNames": [".heft", "lib", "dist"] + }, + { + "operationName": "_phase:test", + "outputFolderNames": ["coverage"] } ] } diff --git a/build-tests-samples/packlets-tutorial/config/rush-project.json b/build-tests-samples/packlets-tutorial/config/rush-project.json index 2af7036b0ef..6183592308d 100644 --- a/build-tests-samples/packlets-tutorial/config/rush-project.json +++ b/build-tests-samples/packlets-tutorial/config/rush-project.json @@ -1,10 +1,11 @@ +// This file exists for caching purposes in the rushstack repo { "$schema": "https://developer.microsoft.com/json-schemas/rush/v5/rush-project.schema.json", "operationSettings": [ { - "operationName": "build", - "outputFolderNames": ["lib", "dist"] + "operationName": "_phase:build", + "outputFolderNames": [".heft", "lib", "dist"] } ] } diff --git a/build-tests/api-documenter-scenarios/config/rush-project.json b/build-tests/api-documenter-scenarios/config/rush-project.json index 2af7036b0ef..514e557d5eb 100644 --- a/build-tests/api-documenter-scenarios/config/rush-project.json +++ b/build-tests/api-documenter-scenarios/config/rush-project.json @@ -3,7 +3,7 @@ "operationSettings": [ { - "operationName": "build", + "operationName": "_phase:build", "outputFolderNames": ["lib", "dist"] } ] diff --git a/build-tests/api-documenter-test/config/rush-project.json b/build-tests/api-documenter-test/config/rush-project.json index 2af7036b0ef..514e557d5eb 100644 --- a/build-tests/api-documenter-test/config/rush-project.json +++ b/build-tests/api-documenter-test/config/rush-project.json @@ -3,7 +3,7 @@ "operationSettings": [ { - "operationName": "build", + "operationName": "_phase:build", "outputFolderNames": ["lib", "dist"] } ] diff --git a/build-tests/api-extractor-lib1-test/config/rush-project.json b/build-tests/api-extractor-lib1-test/config/rush-project.json index 2af7036b0ef..a3516b19e56 100644 --- a/build-tests/api-extractor-lib1-test/config/rush-project.json +++ b/build-tests/api-extractor-lib1-test/config/rush-project.json @@ -3,8 +3,8 @@ "operationSettings": [ { - "operationName": "build", - "outputFolderNames": ["lib", "dist"] + "operationName": "_phase:build", + "outputFolderNames": ["lib"] } ] } diff --git a/build-tests/api-extractor-lib2-test/config/rush-project.json b/build-tests/api-extractor-lib2-test/config/rush-project.json index 2af7036b0ef..a3516b19e56 100644 --- a/build-tests/api-extractor-lib2-test/config/rush-project.json +++ b/build-tests/api-extractor-lib2-test/config/rush-project.json @@ -3,8 +3,8 @@ "operationSettings": [ { - "operationName": "build", - "outputFolderNames": ["lib", "dist"] + "operationName": "_phase:build", + "outputFolderNames": ["lib"] } ] } diff --git a/build-tests/api-extractor-lib3-test/config/rush-project.json b/build-tests/api-extractor-lib3-test/config/rush-project.json index 2af7036b0ef..a3516b19e56 100644 --- a/build-tests/api-extractor-lib3-test/config/rush-project.json +++ b/build-tests/api-extractor-lib3-test/config/rush-project.json @@ -3,8 +3,8 @@ "operationSettings": [ { - "operationName": "build", - "outputFolderNames": ["lib", "dist"] + "operationName": "_phase:build", + "outputFolderNames": ["lib"] } ] } diff --git a/build-tests/api-extractor-scenarios/config/rush-project.json b/build-tests/api-extractor-scenarios/config/rush-project.json index 2af7036b0ef..514e557d5eb 100644 --- a/build-tests/api-extractor-scenarios/config/rush-project.json +++ b/build-tests/api-extractor-scenarios/config/rush-project.json @@ -3,7 +3,7 @@ "operationSettings": [ { - "operationName": "build", + "operationName": "_phase:build", "outputFolderNames": ["lib", "dist"] } ] diff --git a/build-tests/api-extractor-test-01/config/rush-project.json b/build-tests/api-extractor-test-01/config/rush-project.json index 9c91a1cd8e3..a3516b19e56 100644 --- a/build-tests/api-extractor-test-01/config/rush-project.json +++ b/build-tests/api-extractor-test-01/config/rush-project.json @@ -3,7 +3,7 @@ "operationSettings": [ { - "operationName": "build", + "operationName": "_phase:build", "outputFolderNames": ["lib"] } ] diff --git a/build-tests/api-extractor-test-02/config/rush-project.json b/build-tests/api-extractor-test-02/config/rush-project.json index 9c91a1cd8e3..a3516b19e56 100644 --- a/build-tests/api-extractor-test-02/config/rush-project.json +++ b/build-tests/api-extractor-test-02/config/rush-project.json @@ -3,7 +3,7 @@ "operationSettings": [ { - "operationName": "build", + "operationName": "_phase:build", "outputFolderNames": ["lib"] } ] diff --git a/build-tests/api-extractor-test-03/config/rush-project.json b/build-tests/api-extractor-test-03/config/rush-project.json index 2af7036b0ef..514e557d5eb 100644 --- a/build-tests/api-extractor-test-03/config/rush-project.json +++ b/build-tests/api-extractor-test-03/config/rush-project.json @@ -3,7 +3,7 @@ "operationSettings": [ { - "operationName": "build", + "operationName": "_phase:build", "outputFolderNames": ["lib", "dist"] } ] diff --git a/build-tests/api-extractor-test-04/config/rush-project.json b/build-tests/api-extractor-test-04/config/rush-project.json index 2af7036b0ef..a3516b19e56 100644 --- a/build-tests/api-extractor-test-04/config/rush-project.json +++ b/build-tests/api-extractor-test-04/config/rush-project.json @@ -3,8 +3,8 @@ "operationSettings": [ { - "operationName": "build", - "outputFolderNames": ["lib", "dist"] + "operationName": "_phase:build", + "outputFolderNames": ["lib"] } ] } diff --git a/build-tests/hashed-folder-copy-plugin-webpack4-test/config/rush-project.json b/build-tests/hashed-folder-copy-plugin-webpack4-test/config/rush-project.json index 30cad77cdb5..543278bebd4 100644 --- a/build-tests/hashed-folder-copy-plugin-webpack4-test/config/rush-project.json +++ b/build-tests/hashed-folder-copy-plugin-webpack4-test/config/rush-project.json @@ -3,7 +3,7 @@ "operationSettings": [ { - "operationName": "build", + "operationName": "_phase:build", "outputFolderNames": ["lib", "dist-dev", "dist-prod"] } ] diff --git a/build-tests/hashed-folder-copy-plugin-webpack5-test/config/rush-project.json b/build-tests/hashed-folder-copy-plugin-webpack5-test/config/rush-project.json index 30cad77cdb5..543278bebd4 100644 --- a/build-tests/hashed-folder-copy-plugin-webpack5-test/config/rush-project.json +++ b/build-tests/hashed-folder-copy-plugin-webpack5-test/config/rush-project.json @@ -3,7 +3,7 @@ "operationSettings": [ { - "operationName": "build", + "operationName": "_phase:build", "outputFolderNames": ["lib", "dist-dev", "dist-prod"] } ] diff --git a/build-tests/heft-copy-files-test/config/rush-project.json b/build-tests/heft-copy-files-test/config/rush-project.json index da349e3ad5e..4a1a3f04ef5 100644 --- a/build-tests/heft-copy-files-test/config/rush-project.json +++ b/build-tests/heft-copy-files-test/config/rush-project.json @@ -3,7 +3,7 @@ "operationSettings": [ { - "operationName": "build", + "operationName": "_phase:build", "outputFolderNames": [ "out-all", "out-all-except-for-images", diff --git a/build-tests/heft-example-plugin-01/config/rush-project.json b/build-tests/heft-example-plugin-01/config/rush-project.json index 2af7036b0ef..514e557d5eb 100644 --- a/build-tests/heft-example-plugin-01/config/rush-project.json +++ b/build-tests/heft-example-plugin-01/config/rush-project.json @@ -3,7 +3,7 @@ "operationSettings": [ { - "operationName": "build", + "operationName": "_phase:build", "outputFolderNames": ["lib", "dist"] } ] diff --git a/build-tests/heft-example-plugin-02/config/rush-project.json b/build-tests/heft-example-plugin-02/config/rush-project.json index 2af7036b0ef..514e557d5eb 100644 --- a/build-tests/heft-example-plugin-02/config/rush-project.json +++ b/build-tests/heft-example-plugin-02/config/rush-project.json @@ -3,7 +3,7 @@ "operationSettings": [ { - "operationName": "build", + "operationName": "_phase:build", "outputFolderNames": ["lib", "dist"] } ] diff --git a/build-tests/heft-fastify-test/config/rush-project.json b/build-tests/heft-fastify-test/config/rush-project.json index 247dc17187a..11f81b24412 100644 --- a/build-tests/heft-fastify-test/config/rush-project.json +++ b/build-tests/heft-fastify-test/config/rush-project.json @@ -1,7 +1,7 @@ { "operationSettings": [ { - "operationName": "build", + "operationName": "_phase:build", "outputFolderNames": ["lib", "dist"] } ] diff --git a/build-tests/heft-jest-preset-test/config/jest.config.json b/build-tests/heft-jest-preset-test/config/jest.config.json index 19e885c9ff5..f74f91d4645 100644 --- a/build-tests/heft-jest-preset-test/config/jest.config.json +++ b/build-tests/heft-jest-preset-test/config/jest.config.json @@ -37,7 +37,7 @@ // This is set to true in the preset for the "heft" package // "collectCoverage": false, - "coverageDirectory": "/temp/coverage", + "coverageDirectory": "/coverage", "collectCoverageFrom": [ "lib/**/*.cjs", diff --git a/build-tests/heft-jest-preset-test/config/rush-project.json b/build-tests/heft-jest-preset-test/config/rush-project.json index 92c0e6166a2..030d8d0ff0e 100644 --- a/build-tests/heft-jest-preset-test/config/rush-project.json +++ b/build-tests/heft-jest-preset-test/config/rush-project.json @@ -3,12 +3,12 @@ "operationSettings": [ { - "operationName": "build", + "operationName": "_phase:build", "outputFolderNames": ["lib", "dist"] }, { - "operationName": "_phase:build", - "outputFolderNames": ["lib", "dist"] + "operationName": "_phase:test", + "outputFolderNames": ["coverage"] } ] } diff --git a/build-tests/heft-jest-preset-test/config/verify-coverage.js b/build-tests/heft-jest-preset-test/config/verify-coverage.js index 5360470b42b..91c2555cd8f 100644 --- a/build-tests/heft-jest-preset-test/config/verify-coverage.js +++ b/build-tests/heft-jest-preset-test/config/verify-coverage.js @@ -1,6 +1,6 @@ const fs = require('fs'); // Verify that the coverage folder exists, since it would only exist // if the preset was used. -if (!fs.existsSync(`${__dirname}/../temp/coverage`)) { +if (!fs.existsSync(`${__dirname}/../coverage`)) { throw new Error('Coverage folder does not exist'); } diff --git a/build-tests/heft-jest-reporters-test/config/jest.config.json b/build-tests/heft-jest-reporters-test/config/jest.config.json index 9175f5c7e1c..1af6352cc6e 100644 --- a/build-tests/heft-jest-reporters-test/config/jest.config.json +++ b/build-tests/heft-jest-reporters-test/config/jest.config.json @@ -1,5 +1,6 @@ { "extends": "@rushstack/heft-jest-plugin/includes/jest-shared.config.json", + "coverageDirectory": "/coverage", "reporters": ["default", "../lib/test/customJestReporter.cjs"], "testMatch": ["/lib/**.test.cjs"], "collectCoverageFrom": [ diff --git a/build-tests/heft-jest-reporters-test/config/rush-project.json b/build-tests/heft-jest-reporters-test/config/rush-project.json index 2af7036b0ef..030d8d0ff0e 100644 --- a/build-tests/heft-jest-reporters-test/config/rush-project.json +++ b/build-tests/heft-jest-reporters-test/config/rush-project.json @@ -3,8 +3,12 @@ "operationSettings": [ { - "operationName": "build", + "operationName": "_phase:build", "outputFolderNames": ["lib", "dist"] + }, + { + "operationName": "_phase:test", + "outputFolderNames": ["coverage"] } ] } diff --git a/build-tests/heft-minimal-rig-test/config/rush-project.json b/build-tests/heft-minimal-rig-test/config/rush-project.json index 2af7036b0ef..514e557d5eb 100644 --- a/build-tests/heft-minimal-rig-test/config/rush-project.json +++ b/build-tests/heft-minimal-rig-test/config/rush-project.json @@ -3,7 +3,7 @@ "operationSettings": [ { - "operationName": "build", + "operationName": "_phase:build", "outputFolderNames": ["lib", "dist"] } ] diff --git a/build-tests/heft-minimal-rig-usage-test/config/jest.config.json b/build-tests/heft-minimal-rig-usage-test/config/jest.config.json index 84dd06a10c3..ac52a5b3dc3 100644 --- a/build-tests/heft-minimal-rig-usage-test/config/jest.config.json +++ b/build-tests/heft-minimal-rig-usage-test/config/jest.config.json @@ -1,3 +1,11 @@ { - "extends": "heft-minimal-rig-test/profiles/default/config/jest.config.json" + "extends": "heft-minimal-rig-test/profiles/default/config/jest.config.json", + + // Enable code coverage for Jest + "collectCoverage": true, + "coverageDirectory": "/coverage", + "coverageReporters": ["cobertura", "html"], + + // Use v8 coverage provider to avoid Babel + "coverageProvider": "v8" } diff --git a/build-tests/heft-minimal-rig-usage-test/config/rush-project.json b/build-tests/heft-minimal-rig-usage-test/config/rush-project.json index 2af7036b0ef..030d8d0ff0e 100644 --- a/build-tests/heft-minimal-rig-usage-test/config/rush-project.json +++ b/build-tests/heft-minimal-rig-usage-test/config/rush-project.json @@ -3,8 +3,12 @@ "operationSettings": [ { - "operationName": "build", + "operationName": "_phase:build", "outputFolderNames": ["lib", "dist"] + }, + { + "operationName": "_phase:test", + "outputFolderNames": ["coverage"] } ] } diff --git a/build-tests/heft-node-everything-esm-module-test/config/jest.config.json b/build-tests/heft-node-everything-esm-module-test/config/jest.config.json index b6f305ec886..c0687c6d488 100644 --- a/build-tests/heft-node-everything-esm-module-test/config/jest.config.json +++ b/build-tests/heft-node-everything-esm-module-test/config/jest.config.json @@ -1,3 +1,11 @@ { - "extends": "@rushstack/heft-jest-plugin/includes/jest-shared.config.json" + "extends": "@rushstack/heft-jest-plugin/includes/jest-shared.config.json", + + // Enable code coverage for Jest + "collectCoverage": true, + "coverageDirectory": "/coverage", + "coverageReporters": ["cobertura", "html"], + + // Use v8 coverage provider to avoid Babel + "coverageProvider": "v8" } diff --git a/build-tests/heft-node-everything-esm-module-test/config/rush-project.json b/build-tests/heft-node-everything-esm-module-test/config/rush-project.json index 357cdc0998d..a93c6b2720f 100644 --- a/build-tests/heft-node-everything-esm-module-test/config/rush-project.json +++ b/build-tests/heft-node-everything-esm-module-test/config/rush-project.json @@ -3,8 +3,12 @@ "operationSettings": [ { - "operationName": "build", + "operationName": "_phase:build", "outputFolderNames": ["dist", "lib", "lib-esnext", "lib-umd"] + }, + { + "operationName": "_phase:test", + "outputFolderNames": ["coverage"] } ] } diff --git a/build-tests/heft-node-everything-test/config/jest.config.json b/build-tests/heft-node-everything-test/config/jest.config.json index b6f305ec886..c0687c6d488 100644 --- a/build-tests/heft-node-everything-test/config/jest.config.json +++ b/build-tests/heft-node-everything-test/config/jest.config.json @@ -1,3 +1,11 @@ { - "extends": "@rushstack/heft-jest-plugin/includes/jest-shared.config.json" + "extends": "@rushstack/heft-jest-plugin/includes/jest-shared.config.json", + + // Enable code coverage for Jest + "collectCoverage": true, + "coverageDirectory": "/coverage", + "coverageReporters": ["cobertura", "html"], + + // Use v8 coverage provider to avoid Babel + "coverageProvider": "v8" } diff --git a/build-tests/heft-node-everything-test/config/rush-project.json b/build-tests/heft-node-everything-test/config/rush-project.json index 357cdc0998d..a93c6b2720f 100644 --- a/build-tests/heft-node-everything-test/config/rush-project.json +++ b/build-tests/heft-node-everything-test/config/rush-project.json @@ -3,8 +3,12 @@ "operationSettings": [ { - "operationName": "build", + "operationName": "_phase:build", "outputFolderNames": ["dist", "lib", "lib-esnext", "lib-umd"] + }, + { + "operationName": "_phase:test", + "outputFolderNames": ["coverage"] } ] } diff --git a/build-tests/heft-parameter-plugin-test/config/jest.config.json b/build-tests/heft-parameter-plugin-test/config/jest.config.json index b6f305ec886..c0687c6d488 100644 --- a/build-tests/heft-parameter-plugin-test/config/jest.config.json +++ b/build-tests/heft-parameter-plugin-test/config/jest.config.json @@ -1,3 +1,11 @@ { - "extends": "@rushstack/heft-jest-plugin/includes/jest-shared.config.json" + "extends": "@rushstack/heft-jest-plugin/includes/jest-shared.config.json", + + // Enable code coverage for Jest + "collectCoverage": true, + "coverageDirectory": "/coverage", + "coverageReporters": ["cobertura", "html"], + + // Use v8 coverage provider to avoid Babel + "coverageProvider": "v8" } diff --git a/build-tests/heft-parameter-plugin-test/config/rush-project.json b/build-tests/heft-parameter-plugin-test/config/rush-project.json index 9c91a1cd8e3..93089856e44 100644 --- a/build-tests/heft-parameter-plugin-test/config/rush-project.json +++ b/build-tests/heft-parameter-plugin-test/config/rush-project.json @@ -3,8 +3,12 @@ "operationSettings": [ { - "operationName": "build", + "operationName": "_phase:build", "outputFolderNames": ["lib"] + }, + { + "operationName": "_phase:test", + "outputFolderNames": ["coverage"] } ] } diff --git a/build-tests/heft-parameter-plugin/config/rush-project.json b/build-tests/heft-parameter-plugin/config/rush-project.json index 9c91a1cd8e3..a3516b19e56 100644 --- a/build-tests/heft-parameter-plugin/config/rush-project.json +++ b/build-tests/heft-parameter-plugin/config/rush-project.json @@ -3,7 +3,7 @@ "operationSettings": [ { - "operationName": "build", + "operationName": "_phase:build", "outputFolderNames": ["lib"] } ] diff --git a/build-tests/heft-sass-test/config/jest.config.json b/build-tests/heft-sass-test/config/jest.config.json index 8a6f9d410cf..1d798061493 100644 --- a/build-tests/heft-sass-test/config/jest.config.json +++ b/build-tests/heft-sass-test/config/jest.config.json @@ -1,5 +1,13 @@ { "extends": "@rushstack/heft-jest-plugin/includes/jest-web.config.json", + // Enable code coverage for Jest + "collectCoverage": true, + "coverageDirectory": "/coverage", + "coverageReporters": ["cobertura", "html"], + + // Use v8 coverage provider to avoid Babel + "coverageProvider": "v8", + "moduleFileExtensions": ["js", "css", "json", "node"] } diff --git a/build-tests/heft-sass-test/config/rush-project.json b/build-tests/heft-sass-test/config/rush-project.json index 6a467409a08..e7d173ff4b5 100644 --- a/build-tests/heft-sass-test/config/rush-project.json +++ b/build-tests/heft-sass-test/config/rush-project.json @@ -3,8 +3,12 @@ "operationSettings": [ { - "operationName": "build", + "operationName": "_phase:build", "outputFolderNames": ["lib", "dist", "temp/sass-ts"] + }, + { + "operationName": "_phase:test", + "outputFolderNames": ["coverage"] } ] } diff --git a/build-tests/heft-typescript-composite-test/config/jest.config.json b/build-tests/heft-typescript-composite-test/config/jest.config.json index 41b0a39a8af..ee9b78eb63f 100644 --- a/build-tests/heft-typescript-composite-test/config/jest.config.json +++ b/build-tests/heft-typescript-composite-test/config/jest.config.json @@ -1,6 +1,14 @@ { "extends": "@rushstack/heft-jest-plugin/includes/jest-shared.config.json", + // Enable code coverage for Jest + "collectCoverage": true, + "coverageDirectory": "/coverage", + "coverageReporters": ["cobertura", "html"], + + // Use v8 coverage provider to avoid Babel + "coverageProvider": "v8", + "testMatch": ["/lib/**/*.test.cjs"], "collectCoverageFrom": [ diff --git a/build-tests/heft-typescript-composite-test/config/rush-project.json b/build-tests/heft-typescript-composite-test/config/rush-project.json index 9c91a1cd8e3..93089856e44 100644 --- a/build-tests/heft-typescript-composite-test/config/rush-project.json +++ b/build-tests/heft-typescript-composite-test/config/rush-project.json @@ -3,8 +3,12 @@ "operationSettings": [ { - "operationName": "build", + "operationName": "_phase:build", "outputFolderNames": ["lib"] + }, + { + "operationName": "_phase:test", + "outputFolderNames": ["coverage"] } ] } diff --git a/build-tests/heft-typescript-v2-test/config/jest.config.json b/build-tests/heft-typescript-v2-test/config/jest.config.json index b6f305ec886..c0687c6d488 100644 --- a/build-tests/heft-typescript-v2-test/config/jest.config.json +++ b/build-tests/heft-typescript-v2-test/config/jest.config.json @@ -1,3 +1,11 @@ { - "extends": "@rushstack/heft-jest-plugin/includes/jest-shared.config.json" + "extends": "@rushstack/heft-jest-plugin/includes/jest-shared.config.json", + + // Enable code coverage for Jest + "collectCoverage": true, + "coverageDirectory": "/coverage", + "coverageReporters": ["cobertura", "html"], + + // Use v8 coverage provider to avoid Babel + "coverageProvider": "v8" } diff --git a/build-tests/heft-typescript-v2-test/config/rush-project.json b/build-tests/heft-typescript-v2-test/config/rush-project.json index 357cdc0998d..a93c6b2720f 100644 --- a/build-tests/heft-typescript-v2-test/config/rush-project.json +++ b/build-tests/heft-typescript-v2-test/config/rush-project.json @@ -3,8 +3,12 @@ "operationSettings": [ { - "operationName": "build", + "operationName": "_phase:build", "outputFolderNames": ["dist", "lib", "lib-esnext", "lib-umd"] + }, + { + "operationName": "_phase:test", + "outputFolderNames": ["coverage"] } ] } diff --git a/build-tests/heft-typescript-v3-test/config/jest.config.json b/build-tests/heft-typescript-v3-test/config/jest.config.json index b6f305ec886..c0687c6d488 100644 --- a/build-tests/heft-typescript-v3-test/config/jest.config.json +++ b/build-tests/heft-typescript-v3-test/config/jest.config.json @@ -1,3 +1,11 @@ { - "extends": "@rushstack/heft-jest-plugin/includes/jest-shared.config.json" + "extends": "@rushstack/heft-jest-plugin/includes/jest-shared.config.json", + + // Enable code coverage for Jest + "collectCoverage": true, + "coverageDirectory": "/coverage", + "coverageReporters": ["cobertura", "html"], + + // Use v8 coverage provider to avoid Babel + "coverageProvider": "v8" } diff --git a/build-tests/heft-typescript-v3-test/config/rush-project.json b/build-tests/heft-typescript-v3-test/config/rush-project.json index 357cdc0998d..a93c6b2720f 100644 --- a/build-tests/heft-typescript-v3-test/config/rush-project.json +++ b/build-tests/heft-typescript-v3-test/config/rush-project.json @@ -3,8 +3,12 @@ "operationSettings": [ { - "operationName": "build", + "operationName": "_phase:build", "outputFolderNames": ["dist", "lib", "lib-esnext", "lib-umd"] + }, + { + "operationName": "_phase:test", + "outputFolderNames": ["coverage"] } ] } diff --git a/build-tests/heft-typescript-v4-test/config/jest.config.json b/build-tests/heft-typescript-v4-test/config/jest.config.json index b6f305ec886..c0687c6d488 100644 --- a/build-tests/heft-typescript-v4-test/config/jest.config.json +++ b/build-tests/heft-typescript-v4-test/config/jest.config.json @@ -1,3 +1,11 @@ { - "extends": "@rushstack/heft-jest-plugin/includes/jest-shared.config.json" + "extends": "@rushstack/heft-jest-plugin/includes/jest-shared.config.json", + + // Enable code coverage for Jest + "collectCoverage": true, + "coverageDirectory": "/coverage", + "coverageReporters": ["cobertura", "html"], + + // Use v8 coverage provider to avoid Babel + "coverageProvider": "v8" } diff --git a/build-tests/heft-typescript-v4-test/config/rush-project.json b/build-tests/heft-typescript-v4-test/config/rush-project.json index 357cdc0998d..a93c6b2720f 100644 --- a/build-tests/heft-typescript-v4-test/config/rush-project.json +++ b/build-tests/heft-typescript-v4-test/config/rush-project.json @@ -3,8 +3,12 @@ "operationSettings": [ { - "operationName": "build", + "operationName": "_phase:build", "outputFolderNames": ["dist", "lib", "lib-esnext", "lib-umd"] + }, + { + "operationName": "_phase:test", + "outputFolderNames": ["coverage"] } ] } diff --git a/build-tests/heft-web-rig-library-test/config/jest.config.json b/build-tests/heft-web-rig-library-test/config/jest.config.json index 600ba9ea39a..22bfd5895cd 100644 --- a/build-tests/heft-web-rig-library-test/config/jest.config.json +++ b/build-tests/heft-web-rig-library-test/config/jest.config.json @@ -1,3 +1,11 @@ { - "extends": "@rushstack/heft-web-rig/profiles/library/config/jest.config.json" + "extends": "@rushstack/heft-web-rig/profiles/library/config/jest.config.json", + + // Enable code coverage for Jest + "collectCoverage": true, + "coverageDirectory": "/coverage", + "coverageReporters": ["cobertura", "html"], + + // Use v8 coverage provider to avoid Babel + "coverageProvider": "v8" } diff --git a/build-tests/heft-web-rig-library-test/config/rush-project.json b/build-tests/heft-web-rig-library-test/config/rush-project.json new file mode 100644 index 00000000000..5cfd2f72217 --- /dev/null +++ b/build-tests/heft-web-rig-library-test/config/rush-project.json @@ -0,0 +1,14 @@ +{ + "extends": "@rushstack/heft-web-rig/profiles/library/config/rush-project.json", + + "operationSettings": [ + { + "operationName": "_phase:build", + "outputFolderNames": [".heft", "release"] + }, + { + "operationName": "_phase:test", + "outputFolderNames": ["coverage"] + } + ] +} diff --git a/build-tests/heft-webpack4-everything-test/config/jest.config.json b/build-tests/heft-webpack4-everything-test/config/jest.config.json index 441ad22d6d1..331b9187503 100644 --- a/build-tests/heft-webpack4-everything-test/config/jest.config.json +++ b/build-tests/heft-webpack4-everything-test/config/jest.config.json @@ -1,3 +1,11 @@ { - "extends": "@rushstack/heft-jest-plugin/includes/jest-web.config.json" + "extends": "@rushstack/heft-jest-plugin/includes/jest-web.config.json", + + // Enable code coverage for Jest + "collectCoverage": true, + "coverageDirectory": "/coverage", + "coverageReporters": ["cobertura", "html"], + + // Use v8 coverage provider to avoid Babel + "coverageProvider": "v8" } diff --git a/build-tests/heft-webpack4-everything-test/config/rush-project.json b/build-tests/heft-webpack4-everything-test/config/rush-project.json index 2af7036b0ef..030d8d0ff0e 100644 --- a/build-tests/heft-webpack4-everything-test/config/rush-project.json +++ b/build-tests/heft-webpack4-everything-test/config/rush-project.json @@ -3,8 +3,12 @@ "operationSettings": [ { - "operationName": "build", + "operationName": "_phase:build", "outputFolderNames": ["lib", "dist"] + }, + { + "operationName": "_phase:test", + "outputFolderNames": ["coverage"] } ] } diff --git a/build-tests/heft-webpack5-everything-test/config/jest.config.json b/build-tests/heft-webpack5-everything-test/config/jest.config.json index 441ad22d6d1..331b9187503 100644 --- a/build-tests/heft-webpack5-everything-test/config/jest.config.json +++ b/build-tests/heft-webpack5-everything-test/config/jest.config.json @@ -1,3 +1,11 @@ { - "extends": "@rushstack/heft-jest-plugin/includes/jest-web.config.json" + "extends": "@rushstack/heft-jest-plugin/includes/jest-web.config.json", + + // Enable code coverage for Jest + "collectCoverage": true, + "coverageDirectory": "/coverage", + "coverageReporters": ["cobertura", "html"], + + // Use v8 coverage provider to avoid Babel + "coverageProvider": "v8" } diff --git a/build-tests/heft-webpack5-everything-test/config/rush-project.json b/build-tests/heft-webpack5-everything-test/config/rush-project.json index 2af7036b0ef..030d8d0ff0e 100644 --- a/build-tests/heft-webpack5-everything-test/config/rush-project.json +++ b/build-tests/heft-webpack5-everything-test/config/rush-project.json @@ -3,8 +3,12 @@ "operationSettings": [ { - "operationName": "build", + "operationName": "_phase:build", "outputFolderNames": ["lib", "dist"] + }, + { + "operationName": "_phase:test", + "outputFolderNames": ["coverage"] } ] } diff --git a/build-tests/install-test-workspace/config/rush-project.json b/build-tests/install-test-workspace/config/rush-project.json new file mode 100644 index 00000000000..80f2cda3299 --- /dev/null +++ b/build-tests/install-test-workspace/config/rush-project.json @@ -0,0 +1,10 @@ +{ + "$schema": "https://developer.microsoft.com/json-schemas/rush/v5/rush-project.schema.json", + + "operationSettings": [ + { + "operationName": "_phase:build", + "outputFolderNames": ["temp/tarballs"] + } + ] +} diff --git a/build-tests/install-test-workspace/workspace/common/pnpm-lock.yaml b/build-tests/install-test-workspace/workspace/common/pnpm-lock.yaml index a2e3d931a82..58236594c4a 100644 --- a/build-tests/install-test-workspace/workspace/common/pnpm-lock.yaml +++ b/build-tests/install-test-workspace/workspace/common/pnpm-lock.yaml @@ -1181,7 +1181,7 @@ packages: resolution: {integrity: sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==} /concat-map@0.0.1: - resolution: {integrity: sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=} + resolution: {integrity: sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==} /configstore@5.0.1: resolution: {integrity: sha512-aMKprgk5YhBNyH25hj8wGt2+D52Sw1DRRIzqBwLp2Ya9mFmY8KPvvtvmna8SxVR9JMZ4kzMD68N22vlaRpkeFA==} diff --git a/build-tests/install-test-workspace/workspace/typescript-newest-test/config/rush-project.json b/build-tests/install-test-workspace/workspace/typescript-newest-test/config/rush-project.json index 247dc17187a..11f81b24412 100644 --- a/build-tests/install-test-workspace/workspace/typescript-newest-test/config/rush-project.json +++ b/build-tests/install-test-workspace/workspace/typescript-newest-test/config/rush-project.json @@ -1,7 +1,7 @@ { "operationSettings": [ { - "operationName": "build", + "operationName": "_phase:build", "outputFolderNames": ["lib", "dist"] } ] diff --git a/build-tests/install-test-workspace/workspace/typescript-v4-test/config/rush-project.json b/build-tests/install-test-workspace/workspace/typescript-v4-test/config/rush-project.json index 247dc17187a..11f81b24412 100644 --- a/build-tests/install-test-workspace/workspace/typescript-v4-test/config/rush-project.json +++ b/build-tests/install-test-workspace/workspace/typescript-v4-test/config/rush-project.json @@ -1,7 +1,7 @@ { "operationSettings": [ { - "operationName": "build", + "operationName": "_phase:build", "outputFolderNames": ["lib", "dist"] } ] diff --git a/build-tests/localization-plugin-test-01/config/rush-project.json b/build-tests/localization-plugin-test-01/config/rush-project.json index 2af7036b0ef..514e557d5eb 100644 --- a/build-tests/localization-plugin-test-01/config/rush-project.json +++ b/build-tests/localization-plugin-test-01/config/rush-project.json @@ -3,7 +3,7 @@ "operationSettings": [ { - "operationName": "build", + "operationName": "_phase:build", "outputFolderNames": ["lib", "dist"] } ] diff --git a/build-tests/localization-plugin-test-02/config/rush-project.json b/build-tests/localization-plugin-test-02/config/rush-project.json index 2af7036b0ef..514e557d5eb 100644 --- a/build-tests/localization-plugin-test-02/config/rush-project.json +++ b/build-tests/localization-plugin-test-02/config/rush-project.json @@ -3,7 +3,7 @@ "operationSettings": [ { - "operationName": "build", + "operationName": "_phase:build", "outputFolderNames": ["lib", "dist"] } ] diff --git a/build-tests/localization-plugin-test-03/config/rush-project.json b/build-tests/localization-plugin-test-03/config/rush-project.json index 2af7036b0ef..514e557d5eb 100644 --- a/build-tests/localization-plugin-test-03/config/rush-project.json +++ b/build-tests/localization-plugin-test-03/config/rush-project.json @@ -3,7 +3,7 @@ "operationSettings": [ { - "operationName": "build", + "operationName": "_phase:build", "outputFolderNames": ["lib", "dist"] } ] diff --git a/build-tests/rush-redis-cobuild-plugin-integration-test/sandbox/repo/projects/a/config/rush-project.json b/build-tests/rush-redis-cobuild-plugin-integration-test/sandbox/repo/projects/a/config/rush-project.json index 3206537349d..d1460d3902f 100644 --- a/build-tests/rush-redis-cobuild-plugin-integration-test/sandbox/repo/projects/a/config/rush-project.json +++ b/build-tests/rush-redis-cobuild-plugin-integration-test/sandbox/repo/projects/a/config/rush-project.json @@ -9,7 +9,7 @@ "outputFolderNames": ["dist"] }, { - "operationName": "build", + "operationName": "_phase:build", "outputFolderNames": ["dist"] } ] diff --git a/build-tests/rush-redis-cobuild-plugin-integration-test/sandbox/repo/projects/b/config/rush-project.json b/build-tests/rush-redis-cobuild-plugin-integration-test/sandbox/repo/projects/b/config/rush-project.json index 3206537349d..d1460d3902f 100644 --- a/build-tests/rush-redis-cobuild-plugin-integration-test/sandbox/repo/projects/b/config/rush-project.json +++ b/build-tests/rush-redis-cobuild-plugin-integration-test/sandbox/repo/projects/b/config/rush-project.json @@ -9,7 +9,7 @@ "outputFolderNames": ["dist"] }, { - "operationName": "build", + "operationName": "_phase:build", "outputFolderNames": ["dist"] } ] diff --git a/build-tests/rush-redis-cobuild-plugin-integration-test/sandbox/repo/projects/c/config/rush-project.json b/build-tests/rush-redis-cobuild-plugin-integration-test/sandbox/repo/projects/c/config/rush-project.json index 3206537349d..d1460d3902f 100644 --- a/build-tests/rush-redis-cobuild-plugin-integration-test/sandbox/repo/projects/c/config/rush-project.json +++ b/build-tests/rush-redis-cobuild-plugin-integration-test/sandbox/repo/projects/c/config/rush-project.json @@ -9,7 +9,7 @@ "outputFolderNames": ["dist"] }, { - "operationName": "build", + "operationName": "_phase:build", "outputFolderNames": ["dist"] } ] diff --git a/build-tests/rush-redis-cobuild-plugin-integration-test/sandbox/repo/projects/d/config/rush-project.json b/build-tests/rush-redis-cobuild-plugin-integration-test/sandbox/repo/projects/d/config/rush-project.json index 3206537349d..d1460d3902f 100644 --- a/build-tests/rush-redis-cobuild-plugin-integration-test/sandbox/repo/projects/d/config/rush-project.json +++ b/build-tests/rush-redis-cobuild-plugin-integration-test/sandbox/repo/projects/d/config/rush-project.json @@ -9,7 +9,7 @@ "outputFolderNames": ["dist"] }, { - "operationName": "build", + "operationName": "_phase:build", "outputFolderNames": ["dist"] } ] diff --git a/build-tests/rush-redis-cobuild-plugin-integration-test/sandbox/repo/projects/e/config/rush-project.json b/build-tests/rush-redis-cobuild-plugin-integration-test/sandbox/repo/projects/e/config/rush-project.json index 3206537349d..d1460d3902f 100644 --- a/build-tests/rush-redis-cobuild-plugin-integration-test/sandbox/repo/projects/e/config/rush-project.json +++ b/build-tests/rush-redis-cobuild-plugin-integration-test/sandbox/repo/projects/e/config/rush-project.json @@ -9,7 +9,7 @@ "outputFolderNames": ["dist"] }, { - "operationName": "build", + "operationName": "_phase:build", "outputFolderNames": ["dist"] } ] diff --git a/build-tests/rush-redis-cobuild-plugin-integration-test/sandbox/repo/projects/f/config/rush-project.json b/build-tests/rush-redis-cobuild-plugin-integration-test/sandbox/repo/projects/f/config/rush-project.json index 4e94028e909..b36807ac367 100644 --- a/build-tests/rush-redis-cobuild-plugin-integration-test/sandbox/repo/projects/f/config/rush-project.json +++ b/build-tests/rush-redis-cobuild-plugin-integration-test/sandbox/repo/projects/f/config/rush-project.json @@ -10,7 +10,7 @@ "outputFolderNames": ["dist"] }, { - "operationName": "build", + "operationName": "_phase:build", "outputFolderNames": ["dist"] } ] diff --git a/build-tests/rush-redis-cobuild-plugin-integration-test/sandbox/repo/projects/h/config/rush-project.json b/build-tests/rush-redis-cobuild-plugin-integration-test/sandbox/repo/projects/h/config/rush-project.json index 3206537349d..d1460d3902f 100644 --- a/build-tests/rush-redis-cobuild-plugin-integration-test/sandbox/repo/projects/h/config/rush-project.json +++ b/build-tests/rush-redis-cobuild-plugin-integration-test/sandbox/repo/projects/h/config/rush-project.json @@ -9,7 +9,7 @@ "outputFolderNames": ["dist"] }, { - "operationName": "build", + "operationName": "_phase:build", "outputFolderNames": ["dist"] } ] diff --git a/build-tests/set-webpack-public-path-plugin-webpack4-test/config/rush-project.json b/build-tests/set-webpack-public-path-plugin-webpack4-test/config/rush-project.json index 30cad77cdb5..543278bebd4 100644 --- a/build-tests/set-webpack-public-path-plugin-webpack4-test/config/rush-project.json +++ b/build-tests/set-webpack-public-path-plugin-webpack4-test/config/rush-project.json @@ -3,7 +3,7 @@ "operationSettings": [ { - "operationName": "build", + "operationName": "_phase:build", "outputFolderNames": ["lib", "dist-dev", "dist-prod"] } ] diff --git a/build-tests/ts-command-line-test/config/rush-project.json b/build-tests/ts-command-line-test/config/rush-project.json index 2af7036b0ef..514e557d5eb 100644 --- a/build-tests/ts-command-line-test/config/rush-project.json +++ b/build-tests/ts-command-line-test/config/rush-project.json @@ -3,7 +3,7 @@ "operationSettings": [ { - "operationName": "build", + "operationName": "_phase:build", "outputFolderNames": ["lib", "dist"] } ] diff --git a/common/config/rush/browser-approved-packages.json b/common/config/rush/browser-approved-packages.json index 25c73da6e37..ceeea14e20b 100644 --- a/common/config/rush/browser-approved-packages.json +++ b/common/config/rush/browser-approved-packages.json @@ -58,6 +58,10 @@ "name": "dependency-path", "allowedCategories": [ "libraries" ] }, + { + "name": "local-web-rig", + "allowedCategories": [ "libraries", "vscode-extensions" ] + }, { "name": "office-ui-fabric-core", "allowedCategories": [ "libraries" ] diff --git a/common/config/rush/nonbrowser-approved-packages.json b/common/config/rush/nonbrowser-approved-packages.json index b57d86e6694..be1f6727d87 100644 --- a/common/config/rush/nonbrowser-approved-packages.json +++ b/common/config/rush/nonbrowser-approved-packages.json @@ -510,10 +510,6 @@ "name": "heft-parameter-plugin", "allowedCategories": [ "tests" ] }, - { - "name": "local-node-rig", - "allowedCategories": [ "libraries", "tests", "vscode-extensions" ] - }, { "name": "heft-storybook-react-tutorial", "allowedCategories": [ "tests" ] @@ -614,6 +610,10 @@ "name": "loader-utils", "allowedCategories": [ "libraries" ] }, + { + "name": "local-node-rig", + "allowedCategories": [ "libraries", "tests", "vscode-extensions" ] + }, { "name": "lodash", "allowedCategories": [ "libraries", "tests" ] diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index 51757941c13..b940bcc8fb0 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -275,21 +275,15 @@ importers: '@rushstack/heft': specifier: workspace:* version: link:../heft - '@rushstack/heft-web-rig': - specifier: workspace:* - version: link:../../rigs/heft-web-rig - '@types/heft-jest': - specifier: 1.0.1 - version: 1.0.1 '@types/react': specifier: 16.14.23 version: 16.14.23 '@types/react-dom': specifier: 16.9.14 version: 16.9.14 - '@types/webpack-env': - specifier: 1.18.0 - version: 1.18.0 + local-web-rig: + specifier: workspace:* + version: link:../../rigs/local-web-rig ../../apps/rundown: dependencies: @@ -2033,12 +2027,12 @@ importers: eslint: specifier: ~8.7.0 version: 8.7.0 - local-node-rig: - specifier: workspace:* - version: link:../../rigs/local-node-rig http-proxy: specifier: ~1.18.1 version: 1.18.1 + local-node-rig: + specifier: workspace:* + version: link:../../rigs/local-node-rig typescript: specifier: ~5.0.4 version: 5.0.4 @@ -2113,12 +2107,12 @@ importers: eslint: specifier: ~8.7.0 version: 8.7.0 - local-node-rig: - specifier: workspace:* - version: link:../../rigs/local-node-rig http-proxy: specifier: ~1.18.1 version: 1.18.1 + local-node-rig: + specifier: workspace:* + version: link:../../rigs/local-node-rig typescript: specifier: ~5.0.4 version: 5.0.4 @@ -2808,15 +2802,9 @@ importers: '@rushstack/heft': specifier: workspace:* version: link:../../apps/heft - '@rushstack/heft-web-rig': + local-web-rig: specifier: workspace:* - version: link:../../rigs/heft-web-rig - '@types/heft-jest': - specifier: 1.0.1 - version: 1.0.1 - '@types/webpack-env': - specifier: 1.18.0 - version: 1.18.0 + version: link:../../rigs/local-web-rig ../../libraries/localization-utilities: dependencies: @@ -3298,21 +3286,15 @@ importers: '@rushstack/heft': specifier: workspace:* version: link:../../apps/heft - '@rushstack/heft-web-rig': - specifier: workspace:* - version: link:../../rigs/heft-web-rig - '@types/heft-jest': - specifier: 1.0.1 - version: 1.0.1 '@types/react': specifier: 16.14.23 version: 16.14.23 '@types/react-dom': specifier: 16.9.14 version: 16.9.14 - '@types/webpack-env': - specifier: 1.18.0 - version: 1.18.0 + local-web-rig: + specifier: workspace:* + version: link:../../rigs/local-web-rig ../../libraries/rushell: dependencies: @@ -3575,33 +3557,6 @@ importers: specifier: workspace:* version: link:../../apps/heft - ../../rigs/local-node-rig: - dependencies: - '@microsoft/api-extractor': - specifier: workspace:* - version: link:../../apps/api-extractor - '@rushstack/heft': - specifier: workspace:* - version: link:../../apps/heft - '@rushstack/heft-node-rig': - specifier: workspace:* - version: link:../heft-node-rig - '@types/heft-jest': - specifier: 1.0.1 - version: 1.0.1 - '@types/node': - specifier: 18.17.15 - version: 18.17.15 - eslint: - specifier: ~8.7.0 - version: 8.7.0 - jest-junit: - specifier: 12.3.0 - version: 12.3.0 - typescript: - specifier: ~5.0.4 - version: 5.0.4 - ../../rigs/heft-web-rig: dependencies: '@microsoft/api-extractor': @@ -3690,6 +3645,60 @@ importers: specifier: workspace:* version: link:../../apps/heft + ../../rigs/local-node-rig: + dependencies: + '@microsoft/api-extractor': + specifier: workspace:* + version: link:../../apps/api-extractor + '@rushstack/heft': + specifier: workspace:* + version: link:../../apps/heft + '@rushstack/heft-node-rig': + specifier: workspace:* + version: link:../heft-node-rig + '@types/heft-jest': + specifier: 1.0.1 + version: 1.0.1 + '@types/node': + specifier: 18.17.15 + version: 18.17.15 + eslint: + specifier: ~8.7.0 + version: 8.7.0 + jest-junit: + specifier: 12.3.0 + version: 12.3.0 + typescript: + specifier: ~5.0.4 + version: 5.0.4 + + ../../rigs/local-web-rig: + dependencies: + '@microsoft/api-extractor': + specifier: workspace:* + version: link:../../apps/api-extractor + '@rushstack/heft': + specifier: workspace:* + version: link:../../apps/heft + '@rushstack/heft-web-rig': + specifier: workspace:* + version: link:../heft-web-rig + '@types/heft-jest': + specifier: 1.0.1 + version: 1.0.1 + '@types/webpack-env': + specifier: 1.18.0 + version: 1.18.0 + eslint: + specifier: ~8.7.0 + version: 8.7.0 + jest-junit: + specifier: 12.3.0 + version: 12.3.0 + typescript: + specifier: ~5.0.4 + version: 5.0.4 + ../../rush-plugins/rush-amazon-s3-build-cache-plugin: dependencies: '@rushstack/node-core-library': @@ -3924,9 +3933,6 @@ importers: '@rushstack/heft': specifier: workspace:* version: link:../../apps/heft - '@rushstack/heft-web-rig': - specifier: workspace:* - version: link:../../rigs/heft-web-rig '@rushstack/ts-command-line': specifier: workspace:* version: link:../../libraries/ts-command-line @@ -3942,15 +3948,15 @@ importers: '@types/vscode': specifier: ^1.63.0 version: 1.81.0 - '@types/webpack-env': - specifier: 1.18.0 - version: 1.18.0 eslint: specifier: ~8.7.0 version: 8.7.0 html-webpack-plugin: specifier: ~5.5.0 version: 5.5.3(webpack@5.82.1) + local-web-rig: + specifier: workspace:* + version: link:../../rigs/local-web-rig webpack: specifier: ~5.82.1 version: 5.82.1 diff --git a/eslint/eslint-plugin-packlets/config/jest.config.json b/eslint/eslint-plugin-packlets/config/jest.config.json index 4bb17bde3ee..8e67263514a 100644 --- a/eslint/eslint-plugin-packlets/config/jest.config.json +++ b/eslint/eslint-plugin-packlets/config/jest.config.json @@ -1,3 +1,11 @@ { - "extends": "@rushstack/heft-node-rig/profiles/default/config/jest.config.json" + "extends": "@rushstack/heft-node-rig/profiles/default/config/jest.config.json", + + // Enable code coverage for Jest + "collectCoverage": true, + "coverageDirectory": "/coverage", + "coverageReporters": ["cobertura", "html"], + + // Use v8 coverage provider to avoid Babel + "coverageProvider": "v8" } diff --git a/eslint/eslint-plugin-packlets/config/rush-project.json b/eslint/eslint-plugin-packlets/config/rush-project.json new file mode 100644 index 00000000000..4e090849eeb --- /dev/null +++ b/eslint/eslint-plugin-packlets/config/rush-project.json @@ -0,0 +1,14 @@ +{ + "extends": "@rushstack/heft-node-rig/profiles/default/config/rush-project.json", + + "operationSettings": [ + { + "operationName": "_phase:build", + "outputFolderNames": [".heft"] + }, + { + "operationName": "_phase:test", + "outputFolderNames": ["coverage"] + } + ] +} diff --git a/eslint/eslint-plugin-security/config/jest.config.json b/eslint/eslint-plugin-security/config/jest.config.json index 4bb17bde3ee..8e67263514a 100644 --- a/eslint/eslint-plugin-security/config/jest.config.json +++ b/eslint/eslint-plugin-security/config/jest.config.json @@ -1,3 +1,11 @@ { - "extends": "@rushstack/heft-node-rig/profiles/default/config/jest.config.json" + "extends": "@rushstack/heft-node-rig/profiles/default/config/jest.config.json", + + // Enable code coverage for Jest + "collectCoverage": true, + "coverageDirectory": "/coverage", + "coverageReporters": ["cobertura", "html"], + + // Use v8 coverage provider to avoid Babel + "coverageProvider": "v8" } diff --git a/eslint/eslint-plugin-security/config/rush-project.json b/eslint/eslint-plugin-security/config/rush-project.json new file mode 100644 index 00000000000..4e090849eeb --- /dev/null +++ b/eslint/eslint-plugin-security/config/rush-project.json @@ -0,0 +1,14 @@ +{ + "extends": "@rushstack/heft-node-rig/profiles/default/config/rush-project.json", + + "operationSettings": [ + { + "operationName": "_phase:build", + "outputFolderNames": [".heft"] + }, + { + "operationName": "_phase:test", + "outputFolderNames": ["coverage"] + } + ] +} diff --git a/eslint/eslint-plugin/config/jest.config.json b/eslint/eslint-plugin/config/jest.config.json index 4bb17bde3ee..8e67263514a 100644 --- a/eslint/eslint-plugin/config/jest.config.json +++ b/eslint/eslint-plugin/config/jest.config.json @@ -1,3 +1,11 @@ { - "extends": "@rushstack/heft-node-rig/profiles/default/config/jest.config.json" + "extends": "@rushstack/heft-node-rig/profiles/default/config/jest.config.json", + + // Enable code coverage for Jest + "collectCoverage": true, + "coverageDirectory": "/coverage", + "coverageReporters": ["cobertura", "html"], + + // Use v8 coverage provider to avoid Babel + "coverageProvider": "v8" } diff --git a/eslint/eslint-plugin/config/rush-project.json b/eslint/eslint-plugin/config/rush-project.json new file mode 100644 index 00000000000..4e090849eeb --- /dev/null +++ b/eslint/eslint-plugin/config/rush-project.json @@ -0,0 +1,14 @@ +{ + "extends": "@rushstack/heft-node-rig/profiles/default/config/rush-project.json", + + "operationSettings": [ + { + "operationName": "_phase:build", + "outputFolderNames": [".heft"] + }, + { + "operationName": "_phase:test", + "outputFolderNames": ["coverage"] + } + ] +} diff --git a/heft-plugins/heft-api-extractor-plugin/package.json b/heft-plugins/heft-api-extractor-plugin/package.json index 55f34cddb78..82d31378da0 100644 --- a/heft-plugins/heft-api-extractor-plugin/package.json +++ b/heft-plugins/heft-api-extractor-plugin/package.json @@ -12,8 +12,7 @@ "scripts": { "build": "heft test --clean", "start": "heft build-watch", - "_phase:build": "heft run --only build -- --clean", - "_phase:test": "heft run --only test -- --clean" + "_phase:build": "heft run --only build -- --clean" }, "peerDependencies": { "@rushstack/heft": "0.60.0" diff --git a/heft-plugins/heft-jest-plugin/config/jest.config.json b/heft-plugins/heft-jest-plugin/config/jest.config.json new file mode 100644 index 00000000000..8e67263514a --- /dev/null +++ b/heft-plugins/heft-jest-plugin/config/jest.config.json @@ -0,0 +1,11 @@ +{ + "extends": "@rushstack/heft-node-rig/profiles/default/config/jest.config.json", + + // Enable code coverage for Jest + "collectCoverage": true, + "coverageDirectory": "/coverage", + "coverageReporters": ["cobertura", "html"], + + // Use v8 coverage provider to avoid Babel + "coverageProvider": "v8" +} diff --git a/heft-plugins/heft-jest-plugin/config/rush-project.json b/heft-plugins/heft-jest-plugin/config/rush-project.json new file mode 100644 index 00000000000..4e090849eeb --- /dev/null +++ b/heft-plugins/heft-jest-plugin/config/rush-project.json @@ -0,0 +1,14 @@ +{ + "extends": "@rushstack/heft-node-rig/profiles/default/config/rush-project.json", + + "operationSettings": [ + { + "operationName": "_phase:build", + "outputFolderNames": [".heft"] + }, + { + "operationName": "_phase:test", + "outputFolderNames": ["coverage"] + } + ] +} diff --git a/heft-plugins/heft-lint-plugin/package.json b/heft-plugins/heft-lint-plugin/package.json index 1d84ea3612e..9beabba2d0e 100644 --- a/heft-plugins/heft-lint-plugin/package.json +++ b/heft-plugins/heft-lint-plugin/package.json @@ -12,8 +12,7 @@ "scripts": { "build": "heft test --clean", "start": "heft build-watch", - "_phase:build": "heft run --only build -- --clean", - "_phase:test": "heft run --only test -- --clean" + "_phase:build": "heft run --only build -- --clean" }, "peerDependencies": { "@rushstack/heft": "0.60.0" diff --git a/heft-plugins/heft-typescript-plugin/package.json b/heft-plugins/heft-typescript-plugin/package.json index c5a97938fd8..0748143f4b1 100644 --- a/heft-plugins/heft-typescript-plugin/package.json +++ b/heft-plugins/heft-typescript-plugin/package.json @@ -14,8 +14,7 @@ "scripts": { "build": "heft test --clean", "start": "heft build-watch", - "_phase:build": "heft run --only build -- --clean", - "_phase:test": "heft run --only test -- --clean" + "_phase:build": "heft run --only build -- --clean" }, "peerDependencies": { "@rushstack/heft": "0.60.0" diff --git a/libraries/api-extractor-model/config/jest.config.json b/libraries/api-extractor-model/config/jest.config.json index 4bb17bde3ee..8e67263514a 100644 --- a/libraries/api-extractor-model/config/jest.config.json +++ b/libraries/api-extractor-model/config/jest.config.json @@ -1,3 +1,11 @@ { - "extends": "@rushstack/heft-node-rig/profiles/default/config/jest.config.json" + "extends": "@rushstack/heft-node-rig/profiles/default/config/jest.config.json", + + // Enable code coverage for Jest + "collectCoverage": true, + "coverageDirectory": "/coverage", + "coverageReporters": ["cobertura", "html"], + + // Use v8 coverage provider to avoid Babel + "coverageProvider": "v8" } diff --git a/libraries/api-extractor-model/config/rush-project.json b/libraries/api-extractor-model/config/rush-project.json new file mode 100644 index 00000000000..4e090849eeb --- /dev/null +++ b/libraries/api-extractor-model/config/rush-project.json @@ -0,0 +1,14 @@ +{ + "extends": "@rushstack/heft-node-rig/profiles/default/config/rush-project.json", + + "operationSettings": [ + { + "operationName": "_phase:build", + "outputFolderNames": [".heft"] + }, + { + "operationName": "_phase:test", + "outputFolderNames": ["coverage"] + } + ] +} diff --git a/libraries/heft-config-file/config/jest.config.json b/libraries/heft-config-file/config/jest.config.json index 4bb17bde3ee..8e67263514a 100644 --- a/libraries/heft-config-file/config/jest.config.json +++ b/libraries/heft-config-file/config/jest.config.json @@ -1,3 +1,11 @@ { - "extends": "@rushstack/heft-node-rig/profiles/default/config/jest.config.json" + "extends": "@rushstack/heft-node-rig/profiles/default/config/jest.config.json", + + // Enable code coverage for Jest + "collectCoverage": true, + "coverageDirectory": "/coverage", + "coverageReporters": ["cobertura", "html"], + + // Use v8 coverage provider to avoid Babel + "coverageProvider": "v8" } diff --git a/libraries/heft-config-file/config/rush-project.json b/libraries/heft-config-file/config/rush-project.json new file mode 100644 index 00000000000..4e090849eeb --- /dev/null +++ b/libraries/heft-config-file/config/rush-project.json @@ -0,0 +1,14 @@ +{ + "extends": "@rushstack/heft-node-rig/profiles/default/config/rush-project.json", + + "operationSettings": [ + { + "operationName": "_phase:build", + "outputFolderNames": [".heft"] + }, + { + "operationName": "_phase:test", + "outputFolderNames": ["coverage"] + } + ] +} diff --git a/libraries/load-themed-styles/config/jest.config.json b/libraries/load-themed-styles/config/jest.config.json index 600ba9ea39a..a6a75a1a029 100644 --- a/libraries/load-themed-styles/config/jest.config.json +++ b/libraries/load-themed-styles/config/jest.config.json @@ -1,3 +1,3 @@ { - "extends": "@rushstack/heft-web-rig/profiles/library/config/jest.config.json" + "extends": "local-web-rig/profiles/library/config/jest.config.json" } diff --git a/libraries/load-themed-styles/config/rig.json b/libraries/load-themed-styles/config/rig.json index a75d7748109..659f339663a 100644 --- a/libraries/load-themed-styles/config/rig.json +++ b/libraries/load-themed-styles/config/rig.json @@ -3,6 +3,6 @@ // Documentation for this system: https://www.npmjs.com/package/@rushstack/rig-package "$schema": "https://developer.microsoft.com/json-schemas/rig-package/rig.schema.json", - "rigPackageName": "@rushstack/heft-web-rig", + "rigPackageName": "local-web-rig", "rigProfile": "library" } diff --git a/libraries/load-themed-styles/package.json b/libraries/load-themed-styles/package.json index d0eb59864b6..c4bbe9a7173 100644 --- a/libraries/load-themed-styles/package.json +++ b/libraries/load-themed-styles/package.json @@ -19,8 +19,6 @@ "devDependencies": { "@rushstack/eslint-config": "workspace:*", "@rushstack/heft": "workspace:*", - "@rushstack/heft-web-rig": "workspace:*", - "@types/heft-jest": "1.0.1", - "@types/webpack-env": "1.18.0" + "local-web-rig": "workspace:*" } } diff --git a/libraries/load-themed-styles/tsconfig.json b/libraries/load-themed-styles/tsconfig.json index 00ea21b7d61..7e7d3946f09 100644 --- a/libraries/load-themed-styles/tsconfig.json +++ b/libraries/load-themed-styles/tsconfig.json @@ -1,9 +1,7 @@ { - "extends": "./node_modules/@rushstack/heft-web-rig/profiles/library/tsconfig-base.json", + "extends": "./node_modules/local-web-rig/profiles/library/tsconfig-base.json", "compilerOptions": { "importHelpers": false, - "module": "commonjs", - "target": "ES2017", - "types": ["heft-jest", "webpack-env"] + "module": "commonjs" } } diff --git a/libraries/node-core-library/config/jest.config.json b/libraries/node-core-library/config/jest.config.json index 4bb17bde3ee..8e67263514a 100644 --- a/libraries/node-core-library/config/jest.config.json +++ b/libraries/node-core-library/config/jest.config.json @@ -1,3 +1,11 @@ { - "extends": "@rushstack/heft-node-rig/profiles/default/config/jest.config.json" + "extends": "@rushstack/heft-node-rig/profiles/default/config/jest.config.json", + + // Enable code coverage for Jest + "collectCoverage": true, + "coverageDirectory": "/coverage", + "coverageReporters": ["cobertura", "html"], + + // Use v8 coverage provider to avoid Babel + "coverageProvider": "v8" } diff --git a/libraries/node-core-library/config/rush-project.json b/libraries/node-core-library/config/rush-project.json new file mode 100644 index 00000000000..4e090849eeb --- /dev/null +++ b/libraries/node-core-library/config/rush-project.json @@ -0,0 +1,14 @@ +{ + "extends": "@rushstack/heft-node-rig/profiles/default/config/rush-project.json", + + "operationSettings": [ + { + "operationName": "_phase:build", + "outputFolderNames": [".heft"] + }, + { + "operationName": "_phase:test", + "outputFolderNames": ["coverage"] + } + ] +} diff --git a/libraries/operation-graph/config/jest.config.json b/libraries/operation-graph/config/jest.config.json index 4bb17bde3ee..8e67263514a 100644 --- a/libraries/operation-graph/config/jest.config.json +++ b/libraries/operation-graph/config/jest.config.json @@ -1,3 +1,11 @@ { - "extends": "@rushstack/heft-node-rig/profiles/default/config/jest.config.json" + "extends": "@rushstack/heft-node-rig/profiles/default/config/jest.config.json", + + // Enable code coverage for Jest + "collectCoverage": true, + "coverageDirectory": "/coverage", + "coverageReporters": ["cobertura", "html"], + + // Use v8 coverage provider to avoid Babel + "coverageProvider": "v8" } diff --git a/libraries/operation-graph/config/rush-project.json b/libraries/operation-graph/config/rush-project.json new file mode 100644 index 00000000000..4e090849eeb --- /dev/null +++ b/libraries/operation-graph/config/rush-project.json @@ -0,0 +1,14 @@ +{ + "extends": "@rushstack/heft-node-rig/profiles/default/config/rush-project.json", + + "operationSettings": [ + { + "operationName": "_phase:build", + "outputFolderNames": [".heft"] + }, + { + "operationName": "_phase:test", + "outputFolderNames": ["coverage"] + } + ] +} diff --git a/libraries/package-deps-hash/src/test/__snapshots__/getRepoDeps.test.ts.snap b/libraries/package-deps-hash/src/test/__snapshots__/getRepoDeps.test.ts.snap index add7d8be46f..f69c42a0d31 100644 --- a/libraries/package-deps-hash/src/test/__snapshots__/getRepoDeps.test.ts.snap +++ b/libraries/package-deps-hash/src/test/__snapshots__/getRepoDeps.test.ts.snap @@ -83,6 +83,18 @@ Object { } `; +exports[`getRepoStateAsync handles requests for additional files 2`] = ` +Object { + "nestedTestProject/package.json": "18a1e415e56220fa5122428a4ef8eb8874756576", + "nestedTestProject/src/file 1.txt": "c7b2f707ac99ca522f965210a7b6b0b109863f34", + "testProject/file 2.txt": "a385f754ec4fede884a4864d090064d9aeef8ccb", + "testProject/file1.txt": "c7b2f707ac99ca522f965210a7b6b0b109863f34", + "testProject/file蝴蝶.txt": "ae814af81e16cb2ae8c57503c77e2cab6b5462ba", + "testProject/log.log": "2e65efe2a145dda7ee51d1741299f848e5bf752e", + "testProject/package.json": "18a1e415e56220fa5122428a4ef8eb8874756576", +} +`; + exports[`parseGitHashObject can parse multiple entries 1`] = ` Map { "a" => "11", diff --git a/libraries/rig-package/config/jest.config.json b/libraries/rig-package/config/jest.config.json index 4bb17bde3ee..8e67263514a 100644 --- a/libraries/rig-package/config/jest.config.json +++ b/libraries/rig-package/config/jest.config.json @@ -1,3 +1,11 @@ { - "extends": "@rushstack/heft-node-rig/profiles/default/config/jest.config.json" + "extends": "@rushstack/heft-node-rig/profiles/default/config/jest.config.json", + + // Enable code coverage for Jest + "collectCoverage": true, + "coverageDirectory": "/coverage", + "coverageReporters": ["cobertura", "html"], + + // Use v8 coverage provider to avoid Babel + "coverageProvider": "v8" } diff --git a/libraries/rig-package/config/rush-project.json b/libraries/rig-package/config/rush-project.json new file mode 100644 index 00000000000..4e090849eeb --- /dev/null +++ b/libraries/rig-package/config/rush-project.json @@ -0,0 +1,14 @@ +{ + "extends": "@rushstack/heft-node-rig/profiles/default/config/rush-project.json", + + "operationSettings": [ + { + "operationName": "_phase:build", + "outputFolderNames": [".heft"] + }, + { + "operationName": "_phase:test", + "outputFolderNames": ["coverage"] + } + ] +} diff --git a/libraries/rush-themed-ui/config/jest.config.json b/libraries/rush-themed-ui/config/jest.config.json index 600ba9ea39a..cc59d177bcf 100644 --- a/libraries/rush-themed-ui/config/jest.config.json +++ b/libraries/rush-themed-ui/config/jest.config.json @@ -1,3 +1,3 @@ { - "extends": "@rushstack/heft-web-rig/profiles/library/config/jest.config.json" + "extends": "local-web-riglibrary/config/jest.config.json" } diff --git a/libraries/rush-themed-ui/config/rig.json b/libraries/rush-themed-ui/config/rig.json index d72946b5042..b7cba34165f 100644 --- a/libraries/rush-themed-ui/config/rig.json +++ b/libraries/rush-themed-ui/config/rig.json @@ -1,6 +1,6 @@ { "$schema": "https://developer.microsoft.com/json-schemas/rig-package/rig.schema.json", - "rigPackageName": "@rushstack/heft-web-rig", + "rigPackageName": "local-web-rig", "rigProfile": "library" } diff --git a/libraries/rush-themed-ui/package.json b/libraries/rush-themed-ui/package.json index 443c740cc24..1c1f808244e 100644 --- a/libraries/rush-themed-ui/package.json +++ b/libraries/rush-themed-ui/package.json @@ -10,8 +10,7 @@ "build": "heft test --clean", "start": "heft build --watch", "test": "heft test", - "_phase:build": "heft run --only build -- --clean", - "_phase:test": "heft run --only test -- --clean" + "_phase:build": "heft run --only build -- --clean" }, "dependencies": { "react": "~16.13.1", @@ -19,12 +18,10 @@ }, "devDependencies": { "@rushstack/eslint-config": "workspace:*", - "@rushstack/heft-web-rig": "workspace:*", + "local-web-rig": "workspace:*", "@rushstack/heft": "workspace:*", - "@types/heft-jest": "1.0.1", "@types/react-dom": "16.9.14", "@types/react": "16.14.23", - "@types/webpack-env": "1.18.0", "@radix-ui/react-scroll-area": "~1.0.2", "@radix-ui/colors": "~0.1.8", "@radix-ui/react-tabs": "~1.0.1", diff --git a/libraries/rush-themed-ui/tsconfig.json b/libraries/rush-themed-ui/tsconfig.json index 18d8c1a0dab..2929ab3551a 100644 --- a/libraries/rush-themed-ui/tsconfig.json +++ b/libraries/rush-themed-ui/tsconfig.json @@ -1,8 +1,6 @@ { - "extends": "./node_modules/@rushstack/heft-web-rig/profiles/app/tsconfig-base.json", + "extends": "./node_modules/local-web-rig/profiles/app/tsconfig-base.json", "compilerOptions": { - "types": ["heft-jest", "webpack-env"], - "target": "es2017", "lib": ["es2017", "scripthost", "es2015.collection", "es2015.promise", "es2015.iterable", "dom"] } } diff --git a/libraries/rush-themed-ui/webpack.config.js b/libraries/rush-themed-ui/webpack.config.js index 1215f0c5c1f..3dc6a344989 100644 --- a/libraries/rush-themed-ui/webpack.config.js +++ b/libraries/rush-themed-ui/webpack.config.js @@ -1,6 +1,6 @@ 'use strict'; -const createWebpackConfig = require('@rushstack/heft-web-rig/profiles/library/webpack-base.config'); +const createWebpackConfig = require('local-web-rig/profiles/library/webpack-base.config'); module.exports = function createConfig(env, argv) { return createWebpackConfig({ diff --git a/libraries/tree-pattern/config/jest.config.json b/libraries/tree-pattern/config/jest.config.json index 4bb17bde3ee..8e67263514a 100644 --- a/libraries/tree-pattern/config/jest.config.json +++ b/libraries/tree-pattern/config/jest.config.json @@ -1,3 +1,11 @@ { - "extends": "@rushstack/heft-node-rig/profiles/default/config/jest.config.json" + "extends": "@rushstack/heft-node-rig/profiles/default/config/jest.config.json", + + // Enable code coverage for Jest + "collectCoverage": true, + "coverageDirectory": "/coverage", + "coverageReporters": ["cobertura", "html"], + + // Use v8 coverage provider to avoid Babel + "coverageProvider": "v8" } diff --git a/libraries/tree-pattern/config/rush-project.json b/libraries/tree-pattern/config/rush-project.json new file mode 100644 index 00000000000..4e090849eeb --- /dev/null +++ b/libraries/tree-pattern/config/rush-project.json @@ -0,0 +1,14 @@ +{ + "extends": "@rushstack/heft-node-rig/profiles/default/config/rush-project.json", + + "operationSettings": [ + { + "operationName": "_phase:build", + "outputFolderNames": [".heft"] + }, + { + "operationName": "_phase:test", + "outputFolderNames": ["coverage"] + } + ] +} diff --git a/libraries/ts-command-line/config/jest.config.json b/libraries/ts-command-line/config/jest.config.json index 4bb17bde3ee..8e67263514a 100644 --- a/libraries/ts-command-line/config/jest.config.json +++ b/libraries/ts-command-line/config/jest.config.json @@ -1,3 +1,11 @@ { - "extends": "@rushstack/heft-node-rig/profiles/default/config/jest.config.json" + "extends": "@rushstack/heft-node-rig/profiles/default/config/jest.config.json", + + // Enable code coverage for Jest + "collectCoverage": true, + "coverageDirectory": "/coverage", + "coverageReporters": ["cobertura", "html"], + + // Use v8 coverage provider to avoid Babel + "coverageProvider": "v8" } diff --git a/libraries/ts-command-line/config/rush-project.json b/libraries/ts-command-line/config/rush-project.json new file mode 100644 index 00000000000..4e090849eeb --- /dev/null +++ b/libraries/ts-command-line/config/rush-project.json @@ -0,0 +1,14 @@ +{ + "extends": "@rushstack/heft-node-rig/profiles/default/config/rush-project.json", + + "operationSettings": [ + { + "operationName": "_phase:build", + "outputFolderNames": [".heft"] + }, + { + "operationName": "_phase:test", + "outputFolderNames": ["coverage"] + } + ] +} diff --git a/rigs/local-web-rig/README.md b/rigs/local-web-rig/README.md new file mode 100644 index 00000000000..83ef27e0210 --- /dev/null +++ b/rigs/local-web-rig/README.md @@ -0,0 +1,7 @@ +# local-web-rig + +A rig package for Web projects that build using Heft inside the RushStack repository. This +package extends `@rushstack/heft-web-rig` and adds some options that are specific to the RushStack +repository. + +Note that this rig is not published to the NPM registry. \ No newline at end of file diff --git a/rigs/local-web-rig/package.json b/rigs/local-web-rig/package.json new file mode 100644 index 00000000000..5a810a8fa09 --- /dev/null +++ b/rigs/local-web-rig/package.json @@ -0,0 +1,21 @@ +{ + "name": "local-web-rig", + "version": "1.0.0", + "description": "A rig package for Web projects that build using Heft inside the RushStack repository.", + "license": "MIT", + "private": "true", + "scripts": { + "build": "", + "_phase:build": "" + }, + "dependencies": { + "@microsoft/api-extractor": "workspace:*", + "@rushstack/heft-web-rig": "workspace:*", + "@rushstack/heft": "workspace:*", + "@types/heft-jest": "1.0.1", + "@types/webpack-env": "1.18.0", + "eslint": "~8.7.0", + "jest-junit": "12.3.0", + "typescript": "~5.0.4" + } +} diff --git a/rigs/local-web-rig/profiles/app/config/api-extractor-task.json b/rigs/local-web-rig/profiles/app/config/api-extractor-task.json new file mode 100644 index 00000000000..68a07294bc5 --- /dev/null +++ b/rigs/local-web-rig/profiles/app/config/api-extractor-task.json @@ -0,0 +1,5 @@ +{ + "$schema": "https://developer.microsoft.com/json-schemas/heft/api-extractor-task.schema.json", + + "extends": "@rushstack/heft-web-rig/profiles/app/config/api-extractor-task.json" +} diff --git a/rigs/local-web-rig/profiles/app/config/heft.json b/rigs/local-web-rig/profiles/app/config/heft.json new file mode 100644 index 00000000000..24180df49a8 --- /dev/null +++ b/rigs/local-web-rig/profiles/app/config/heft.json @@ -0,0 +1,5 @@ +{ + "$schema": "https://developer.microsoft.com/json-schemas/heft/heft.schema.json", + + "extends": "@rushstack/heft-web-rig/profiles/app/config/heft.json" +} diff --git a/rigs/local-web-rig/profiles/app/config/jest.config.json b/rigs/local-web-rig/profiles/app/config/jest.config.json new file mode 100644 index 00000000000..7dfdb45d16f --- /dev/null +++ b/rigs/local-web-rig/profiles/app/config/jest.config.json @@ -0,0 +1,24 @@ +{ + "extends": "@rushstack/heft-web-rig/profiles/app/config/jest.config.json", + + // Enable code coverage for Jest + "collectCoverage": true, + "coverageDirectory": "/coverage", + "coverageReporters": ["cobertura", "html"], + + // Use v8 coverage provider to avoid Babel + "coverageProvider": "v8", + + // Enable junit reporting for Jest + "reporters": [ + "default", + [ + "jest-junit", + { + "outputDirectory": "./coverage", + "classNameTemplate": "{classname} > ", + "titleTemplate": "{title} ({filepath})" + } + ] + ] +} diff --git a/rigs/local-web-rig/profiles/app/config/rush-project.json b/rigs/local-web-rig/profiles/app/config/rush-project.json new file mode 100644 index 00000000000..d1b5241fb62 --- /dev/null +++ b/rigs/local-web-rig/profiles/app/config/rush-project.json @@ -0,0 +1,14 @@ +{ + "extends": "@rushstack/heft-web-rig/profiles/app/config/rush-project.json", + + "operationSettings": [ + { + "operationName": "_phase:build", + "outputFolderNames": [".heft"] + }, + { + "operationName": "_phase:test", + "outputFolderNames": ["coverage"] + } + ] +} diff --git a/rigs/local-web-rig/profiles/app/config/typescript.json b/rigs/local-web-rig/profiles/app/config/typescript.json new file mode 100644 index 00000000000..e165c612b13 --- /dev/null +++ b/rigs/local-web-rig/profiles/app/config/typescript.json @@ -0,0 +1,5 @@ +{ + "$schema": "https://developer.microsoft.com/json-schemas/heft/typescript.schema.json", + + "extends": "@rushstack/heft-web-rig/profiles/app/config/typescript.json" +} diff --git a/rigs/local-web-rig/profiles/app/tsconfig-base.json b/rigs/local-web-rig/profiles/app/tsconfig-base.json new file mode 100644 index 00000000000..4562bfad5c1 --- /dev/null +++ b/rigs/local-web-rig/profiles/app/tsconfig-base.json @@ -0,0 +1,20 @@ +{ + "$schema": "http://json.schemastore.org/tsconfig", + + "extends": "../../node_modules/@rushstack/heft-web-rig/profiles/app/tsconfig-base.json", + + "compilerOptions": { + "resolveJsonModule": true, + + "target": "es2017", + "lib": ["es2017", "scripthost", "es2015.collection", "es2015.promise", "es2015.iterable", "dom"], + + "outDir": "../../../../lib", + "rootDir": "../../../../src", + "rootDirs": ["../../../../src", "../../../../temp/sass-ts"], + + "types": ["heft-jest", "webpack-env"], + "typeRoots": ["../../../../node_modules/@types", "../../node_modules/@types"] + }, + "include": ["../../../../src/**/*.ts", "../../../../src/**/*.tsx"] +} diff --git a/rigs/local-web-rig/profiles/app/webpack-base.config.js b/rigs/local-web-rig/profiles/app/webpack-base.config.js new file mode 100644 index 00000000000..75be92cd026 --- /dev/null +++ b/rigs/local-web-rig/profiles/app/webpack-base.config.js @@ -0,0 +1,3 @@ +'use strict'; + +module.exports = require('@rushstack/heft-web-rig/profiles/app/webpack-base.config.js'); diff --git a/rigs/local-web-rig/profiles/library/config/api-extractor-task.json b/rigs/local-web-rig/profiles/library/config/api-extractor-task.json new file mode 100644 index 00000000000..7fcc1e848ad --- /dev/null +++ b/rigs/local-web-rig/profiles/library/config/api-extractor-task.json @@ -0,0 +1,5 @@ +{ + "$schema": "https://developer.microsoft.com/json-schemas/heft/api-extractor-task.schema.json", + + "extends": "@rushstack/heft-web-rig/profiles/library/config/api-extractor-task.json" +} diff --git a/rigs/local-web-rig/profiles/library/config/heft.json b/rigs/local-web-rig/profiles/library/config/heft.json new file mode 100644 index 00000000000..276675e3b70 --- /dev/null +++ b/rigs/local-web-rig/profiles/library/config/heft.json @@ -0,0 +1,5 @@ +{ + "$schema": "https://developer.microsoft.com/json-schemas/heft/heft.schema.json", + + "extends": "@rushstack/heft-web-rig/profiles/library/config/heft.json" +} diff --git a/rigs/local-web-rig/profiles/library/config/jest.config.json b/rigs/local-web-rig/profiles/library/config/jest.config.json new file mode 100644 index 00000000000..b3a22601298 --- /dev/null +++ b/rigs/local-web-rig/profiles/library/config/jest.config.json @@ -0,0 +1,24 @@ +{ + "extends": "@rushstack/heft-web-rig/profiles/library/config/jest.config.json", + + // Enable code coverage for Jest + "collectCoverage": true, + "coverageDirectory": "/coverage", + "coverageReporters": ["cobertura", "html"], + + // Use v8 coverage provider to avoid Babel + "coverageProvider": "v8", + + // Enable junit reporting for Jest + "reporters": [ + "default", + [ + "jest-junit", + { + "outputDirectory": "./coverage", + "classNameTemplate": "{classname} > ", + "titleTemplate": "{title} ({filepath})" + } + ] + ] +} diff --git a/rigs/local-web-rig/profiles/library/config/rush-project.json b/rigs/local-web-rig/profiles/library/config/rush-project.json new file mode 100644 index 00000000000..1df3cee0d79 --- /dev/null +++ b/rigs/local-web-rig/profiles/library/config/rush-project.json @@ -0,0 +1,14 @@ +{ + "extends": "@rushstack/heft-web-rig/profiles/library/config/rush-project.json", + + "operationSettings": [ + { + "operationName": "_phase:build", + "outputFolderNames": [".heft"] + }, + { + "operationName": "_phase:test", + "outputFolderNames": ["coverage"] + } + ] +} diff --git a/rigs/local-web-rig/profiles/library/config/typescript.json b/rigs/local-web-rig/profiles/library/config/typescript.json new file mode 100644 index 00000000000..012f0c2e375 --- /dev/null +++ b/rigs/local-web-rig/profiles/library/config/typescript.json @@ -0,0 +1,5 @@ +{ + "$schema": "https://developer.microsoft.com/json-schemas/heft/typescript.schema.json", + + "extends": "@rushstack/heft-web-rig/profiles/library/config/typescript.json" +} diff --git a/rigs/local-web-rig/profiles/library/tsconfig-base.json b/rigs/local-web-rig/profiles/library/tsconfig-base.json new file mode 100644 index 00000000000..13e9420a272 --- /dev/null +++ b/rigs/local-web-rig/profiles/library/tsconfig-base.json @@ -0,0 +1,17 @@ +{ + "$schema": "http://json.schemastore.org/tsconfig", + + "extends": "../../node_modules/@rushstack/heft-web-rig/profiles/library/tsconfig-base.json", + + "compilerOptions": { + "resolveJsonModule": true, + + "outDir": "../../../../lib", + "rootDir": "../../../../src", + "rootDirs": ["../../../../src", "../../../../temp/sass-ts"], + + "types": ["heft-jest", "webpack-env"], + "typeRoots": ["../../../../node_modules/@types", "../../node_modules/@types"] + }, + "include": ["../../../../src/**/*.ts", "../../../../src/**/*.tsx"] +} diff --git a/rigs/local-web-rig/profiles/library/webpack-base.config.js b/rigs/local-web-rig/profiles/library/webpack-base.config.js new file mode 100644 index 00000000000..2ffce1b4b51 --- /dev/null +++ b/rigs/local-web-rig/profiles/library/webpack-base.config.js @@ -0,0 +1,3 @@ +'use strict'; + +module.exports = require('@rushstack/heft-web-rig/profiles/library/webpack-base.config.js'); diff --git a/rush.json b/rush.json index b61371e9c36..5ab0b7454ba 100644 --- a/rush.json +++ b/rush.json @@ -1091,6 +1091,12 @@ "reviewCategory": "libraries", "shouldPublish": false }, + { + "packageName": "local-web-rig", + "projectFolder": "rigs/local-web-rig", + "reviewCategory": "libraries", + "shouldPublish": false + }, // "rush-plugins" folder (alphabetical order) { diff --git a/vscode-extensions/rush-vscode-command-webview/config/rig.json b/vscode-extensions/rush-vscode-command-webview/config/rig.json index 687fc2911bc..26f617ab3fc 100644 --- a/vscode-extensions/rush-vscode-command-webview/config/rig.json +++ b/vscode-extensions/rush-vscode-command-webview/config/rig.json @@ -1,6 +1,6 @@ { "$schema": "https://developer.microsoft.com/json-schemas/rig-package/rig.schema.json", - "rigPackageName": "@rushstack/heft-web-rig", + "rigPackageName": "local-web-rig", "rigProfile": "app" } diff --git a/vscode-extensions/rush-vscode-command-webview/package.json b/vscode-extensions/rush-vscode-command-webview/package.json index f85cbea4b9b..295933328bf 100644 --- a/vscode-extensions/rush-vscode-command-webview/package.json +++ b/vscode-extensions/rush-vscode-command-webview/package.json @@ -31,14 +31,13 @@ }, "devDependencies": { "@rushstack/eslint-config": "workspace:*", - "@rushstack/heft-web-rig": "workspace:*", + "local-web-rig": "workspace:*", "@rushstack/heft": "workspace:*", "@rushstack/ts-command-line": "workspace:*", "@types/react-dom": "16.9.14", "@types/react-redux": "~7.1.22", "@types/react": "16.14.23", "@types/vscode": "^1.63.0", - "@types/webpack-env": "1.18.0", "eslint": "~8.7.0", "html-webpack-plugin": "~5.5.0", "webpack-bundle-analyzer": "~4.5.0", diff --git a/vscode-extensions/rush-vscode-command-webview/tsconfig.json b/vscode-extensions/rush-vscode-command-webview/tsconfig.json index eb33a22673f..460f43195ca 100644 --- a/vscode-extensions/rush-vscode-command-webview/tsconfig.json +++ b/vscode-extensions/rush-vscode-command-webview/tsconfig.json @@ -1,8 +1,6 @@ { - "extends": "./node_modules/@rushstack/heft-web-rig/profiles/library/tsconfig-base.json", + "extends": "./node_modules/local-web-rig/profiles/library/tsconfig-base.json", "compilerOptions": { - "skipLibCheck": true, // This project imports some projects that target Node - "lib": ["es2017", "DOM"], - "types": ["webpack-env"] + "skipLibCheck": true // This project imports some projects that target Node } }