Skip to content

Commit b856fc9

Browse files
authored
Merge pull request microsoft#4530 from g-chao/chao/pnpm-sync
Replace install-test-workspace with usePnpmSyncForInjectedDependencies=true
2 parents a6b1ff4 + f95f5c1 commit b856fc9

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+605
-5265
lines changed

Diff for: README.md

+4-1
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,10 @@ These GitHub repositories provide supplementary resources for Rush Stack:
129129
| [/build-tests-samples/heft-web-rig-library-tutorial](./build-tests-samples/heft-web-rig-library-tutorial/) | (Copy of sample project) Building this project is a regression test for Heft |
130130
| [/build-tests-samples/heft-webpack-basic-tutorial](./build-tests-samples/heft-webpack-basic-tutorial/) | (Copy of sample project) Building this project is a regression test for Heft |
131131
| [/build-tests-samples/packlets-tutorial](./build-tests-samples/packlets-tutorial/) | (Copy of sample project) Building this project is a regression test for @rushstack/eslint-plugin-packlets |
132+
| [/build-tests-subspace/rush-lib-test](./build-tests-subspace/rush-lib-test/) | A minimal example project that imports APIs from @rushstack/rush-lib |
133+
| [/build-tests-subspace/rush-sdk-test](./build-tests-subspace/rush-sdk-test/) | A minimal example project that imports APIs from @rushstack/rush-sdk |
134+
| [/build-tests-subspace/typescript-newest-test](./build-tests-subspace/typescript-newest-test/) | Building this project tests Heft with the newest supported TypeScript compiler version |
135+
| [/build-tests-subspace/typescript-v4-test](./build-tests-subspace/typescript-v4-test/) | Building this project tests Heft with TypeScript v4 |
132136
| [/build-tests/api-documenter-scenarios](./build-tests/api-documenter-scenarios/) | Building this project is a regression test for api-documenter |
133137
| [/build-tests/api-documenter-test](./build-tests/api-documenter-test/) | Building this project is a regression test for api-documenter |
134138
| [/build-tests/api-extractor-d-cts-test](./build-tests/api-extractor-d-cts-test/) | Building this project is a regression test for api-extractor |
@@ -167,7 +171,6 @@ These GitHub repositories provide supplementary resources for Rush Stack:
167171
| [/build-tests/heft-web-rig-library-test](./build-tests/heft-web-rig-library-test/) | A test project for Heft that exercises the '@rushstack/heft-web-rig' package |
168172
| [/build-tests/heft-webpack4-everything-test](./build-tests/heft-webpack4-everything-test/) | Building this project tests every task and config file for Heft when targeting the web browser runtime using Webpack 4 |
169173
| [/build-tests/heft-webpack5-everything-test](./build-tests/heft-webpack5-everything-test/) | Building this project tests every task and config file for Heft when targeting the web browser runtime using Webpack 5 |
170-
| [/build-tests/install-test-workspace](./build-tests/install-test-workspace/) | |
171174
| [/build-tests/localization-plugin-test-01](./build-tests/localization-plugin-test-01/) | Building this project exercises @microsoft/localization-plugin. This tests that the plugin works correctly without any localized resources. |
172175
| [/build-tests/localization-plugin-test-02](./build-tests/localization-plugin-test-02/) | Building this project exercises @microsoft/localization-plugin. This tests that the loader works correctly with the exportAsDefault option unset. |
173176
| [/build-tests/localization-plugin-test-03](./build-tests/localization-plugin-test-03/) | Building this project exercises @microsoft/localization-plugin. This tests that the plugin works correctly with the exportAsDefault option set to true. |

Diff for: build-tests/install-test-workspace/workspace/typescript-newest-test/config/heft.json renamed to build-tests-subspace/rush-lib-test/config/heft.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
{
22
"$schema": "https://developer.microsoft.com/json-schemas/heft/v0/heft.schema.json",
33

4-
// TODO: Add comments
4+
"extends": "local-node-rig/profiles/default/config/heft.json",
5+
56
"phasesByName": {
67
"build": {
78
"cleanFiles": [{ "includeGlobs": ["lib", "dist"] }],

Diff for: build-tests-subspace/rush-lib-test/config/rig.json

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
// The "rig.json" file directs tools to look for their config files in an external package.
3+
// Documentation for this system: https://www.npmjs.com/package/@rushstack/rig-package
4+
"$schema": "https://developer.microsoft.com/json-schemas/rig-package/rig.schema.json",
5+
6+
"rigPackageName": "local-node-rig"
7+
}

Diff for: build-tests-subspace/rush-lib-test/package.json

+42
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
{
2+
"name": "rush-lib-test",
3+
"version": "0.0.0",
4+
"private": true,
5+
"description": "A minimal example project that imports APIs from @rushstack/rush-lib",
6+
"license": "MIT",
7+
"scripts": {
8+
"build": "heft build --clean",
9+
"start": "node lib/start.js",
10+
"_phase:build": "heft run --only build -- --clean"
11+
},
12+
"dependencies": {
13+
"@microsoft/rush-lib": "workspace:*",
14+
"@rushstack/terminal": "workspace:*"
15+
},
16+
"devDependencies": {
17+
"local-node-rig": "workspace:*",
18+
"@rushstack/eslint-config": "workspace:*",
19+
"@rushstack/heft": "workspace:*",
20+
"@rushstack/heft-lint-plugin": "workspace:*",
21+
"@rushstack/heft-typescript-plugin": "workspace:*",
22+
"@types/node": "18.17.15",
23+
"typescript": "~5.3.3"
24+
},
25+
"dependenciesMeta": {
26+
"@microsoft/rush-lib": {
27+
"injected": true
28+
},
29+
"@rushstack/terminal": {
30+
"injected": true
31+
},
32+
"@rushstack/heft": {
33+
"injected": true
34+
},
35+
"@rushstack/heft-lint-plugin": {
36+
"injected": true
37+
},
38+
"@rushstack/heft-typescript-plugin": {
39+
"injected": true
40+
}
41+
}
42+
}

Diff for: build-tests/install-test-workspace/workspace/rush-lib-test/src/start.ts renamed to build-tests-subspace/rush-lib-test/src/start.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ console.log('rush-lib-test loading Rush configuration...');
77
// instead of the normal .d.ts rollup
88
import { RushConfiguration } from '@microsoft/rush-lib/lib/';
99

10-
const config = RushConfiguration.loadFromDefaultLocation();
10+
const config: RushConfiguration = RushConfiguration.loadFromDefaultLocation();
1111
console.log(config.commonFolder);
1212

1313
console.log('Calling an internal API...');
@@ -16,7 +16,7 @@ console.log('Calling an internal API...');
1616
import { VersionMismatchFinder } from '@microsoft/rush-lib/lib/logic/versionMismatch/VersionMismatchFinder';
1717
import { ConsoleTerminalProvider, Terminal } from '@rushstack/terminal';
1818

19-
const terminal = new Terminal(new ConsoleTerminalProvider());
19+
const terminal: Terminal = new Terminal(new ConsoleTerminalProvider());
2020
VersionMismatchFinder.ensureConsistentVersions(config, terminal);
2121

2222
console.log(new ConsoleTerminalProvider().supportsColor);

Diff for: build-tests-subspace/rush-sdk-test/config/heft.json

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
{
2+
"$schema": "https://developer.microsoft.com/json-schemas/heft/v0/heft.schema.json",
3+
4+
"extends": "local-node-rig/profiles/default/config/heft.json",
5+
6+
"phasesByName": {
7+
"build": {
8+
"cleanFiles": [{ "includeGlobs": ["lib", "dist"] }],
9+
10+
"tasksByName": {
11+
"typescript": {
12+
"taskPlugin": {
13+
"pluginPackage": "@rushstack/heft-typescript-plugin"
14+
}
15+
},
16+
"lint": {
17+
"taskDependencies": ["typescript"],
18+
"taskPlugin": {
19+
"pluginPackage": "@rushstack/heft-lint-plugin"
20+
}
21+
}
22+
}
23+
}
24+
}
25+
}

Diff for: build-tests-subspace/rush-sdk-test/config/rig.json

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
// The "rig.json" file directs tools to look for their config files in an external package.
3+
// Documentation for this system: https://www.npmjs.com/package/@rushstack/rig-package
4+
"$schema": "https://developer.microsoft.com/json-schemas/rig-package/rig.schema.json",
5+
6+
"rigPackageName": "local-node-rig"
7+
}

Diff for: build-tests-subspace/rush-sdk-test/package.json

+42
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
{
2+
"name": "rush-sdk-test",
3+
"version": "0.0.0",
4+
"private": true,
5+
"description": "A minimal example project that imports APIs from @rushstack/rush-sdk",
6+
"license": "MIT",
7+
"scripts": {
8+
"build": "heft build --clean",
9+
"start": "node lib/start.js",
10+
"_phase:build": "heft run --only build -- --clean"
11+
},
12+
"dependencies": {
13+
"@rushstack/rush-sdk": "workspace:*"
14+
},
15+
"devDependencies": {
16+
"local-node-rig": "workspace:*",
17+
"@rushstack/eslint-config": "workspace:*",
18+
"@rushstack/heft": "workspace:*",
19+
"@rushstack/heft-lint-plugin": "workspace:*",
20+
"@rushstack/heft-typescript-plugin": "workspace:*",
21+
"@microsoft/rush-lib": "workspace:*",
22+
"@types/node": "18.17.15",
23+
"typescript": "~5.3.3"
24+
},
25+
"dependenciesMeta": {
26+
"@microsoft/rush-lib": {
27+
"injected": true
28+
},
29+
"@rushstack/rush-sdk": {
30+
"injected": true
31+
},
32+
"@rushstack/heft": {
33+
"injected": true
34+
},
35+
"@rushstack/heft-lint-plugin": {
36+
"injected": true
37+
},
38+
"@rushstack/heft-typescript-plugin": {
39+
"injected": true
40+
}
41+
}
42+
}

Diff for: build-tests/install-test-workspace/workspace/rush-sdk-test/src/start.ts renamed to build-tests-subspace/rush-sdk-test/src/start.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ console.log('rush-sdk-test loading Rush configuration...');
77
// instead of the normal .d.ts rollup
88
import { RushConfiguration } from '@rushstack/rush-sdk/lib/';
99

10-
const config = RushConfiguration.loadFromDefaultLocation();
10+
const config: RushConfiguration = RushConfiguration.loadFromDefaultLocation();
1111
console.log(config.commonFolder);
1212

1313
console.log('Calling an internal API...');
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
// This is a workaround for https://github.com/eslint/eslint/issues/3458
2+
require('@rushstack/eslint-config/patch/modern-module-resolution');
3+
4+
module.exports = {
5+
extends: ['@rushstack/eslint-config/profile/node'],
6+
parserOptions: { tsconfigRootDir: __dirname }
7+
};
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
{
2+
"$schema": "https://developer.microsoft.com/json-schemas/heft/v0/heft.schema.json",
3+
4+
"extends": "local-node-rig/profiles/default/config/heft.json",
5+
6+
"phasesByName": {
7+
"build": {
8+
"cleanFiles": [{ "includeGlobs": ["lib", "dist"] }],
9+
10+
"tasksByName": {
11+
"typescript": {
12+
"taskPlugin": {
13+
"pluginPackage": "@rushstack/heft-typescript-plugin"
14+
}
15+
},
16+
"lint": {
17+
"taskDependencies": ["typescript"],
18+
"taskPlugin": {
19+
"pluginPackage": "@rushstack/heft-lint-plugin"
20+
}
21+
}
22+
}
23+
}
24+
}
25+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
// The "rig.json" file directs tools to look for their config files in an external package.
3+
// Documentation for this system: https://www.npmjs.com/package/@rushstack/rig-package
4+
"$schema": "https://developer.microsoft.com/json-schemas/rig-package/rig.schema.json",
5+
6+
"rigPackageName": "local-node-rig"
7+
}
+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
{
2+
"name": "typescript-newest-test",
3+
"description": "Building this project tests Heft with the newest supported TypeScript compiler version",
4+
"version": "1.0.0",
5+
"private": true,
6+
"main": "lib/index.js",
7+
"license": "MIT",
8+
"scripts": {
9+
"build": "heft build --clean",
10+
"_phase:build": "heft run --only build -- --clean"
11+
},
12+
"devDependencies": {
13+
"local-node-rig": "workspace:*",
14+
"@rushstack/eslint-config": "workspace:*",
15+
"@rushstack/heft": "workspace:*",
16+
"@rushstack/heft-lint-plugin": "workspace:*",
17+
"@rushstack/heft-typescript-plugin": "workspace:*",
18+
"typescript": "~5.3.3",
19+
"tslint": "~5.20.1",
20+
"eslint": "~8.7.0"
21+
},
22+
"dependenciesMeta": {
23+
"@rushstack/eslint-config": {
24+
"injected": true
25+
},
26+
"@rushstack/heft": {
27+
"injected": true
28+
},
29+
"@rushstack/heft-lint-plugin": {
30+
"injected": true
31+
},
32+
"@rushstack/heft-typescript-plugin": {
33+
"injected": true
34+
}
35+
}
36+
}

Diff for: build-tests-subspace/typescript-v4-test/.eslintrc.js

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
// This is a workaround for https://github.com/eslint/eslint/issues/3458
2+
require('@rushstack/eslint-config/patch/modern-module-resolution');
3+
4+
module.exports = {
5+
extends: ['@rushstack/eslint-config/profile/node'],
6+
parserOptions: { tsconfigRootDir: __dirname }
7+
};

Diff for: build-tests/install-test-workspace/workspace/typescript-v4-test/config/heft.json renamed to build-tests-subspace/typescript-v4-test/config/heft.json

-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
{
22
"$schema": "https://developer.microsoft.com/json-schemas/heft/v0/heft.schema.json",
33

4-
// TODO: Add comments
54
"phasesByName": {
65
"build": {
76
"cleanFiles": [{ "includeGlobs": ["dist", "lib", "temp"] }],

Diff for: build-tests-subspace/typescript-v4-test/package.json

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
{
2+
"name": "typescript-v4-test",
3+
"description": "Building this project tests Heft with TypeScript v4",
4+
"version": "1.0.0",
5+
"private": true,
6+
"main": "lib/index.js",
7+
"license": "MIT",
8+
"scripts": {
9+
"build": "heft build --clean",
10+
"_phase:build": "heft run --only build -- --clean"
11+
},
12+
"devDependencies": {
13+
"@rushstack/eslint-config": "workspace:*",
14+
"@rushstack/heft": "workspace:*",
15+
"@rushstack/heft-lint-plugin": "workspace:*",
16+
"@rushstack/heft-typescript-plugin": "workspace:*",
17+
"typescript": "~4.9.5",
18+
"tslint": "~5.20.1",
19+
"eslint": "~8.7.0"
20+
},
21+
"dependenciesMeta": {
22+
"@rushstack/eslint-config": {
23+
"injected": true
24+
},
25+
"@rushstack/heft": {
26+
"injected": true
27+
},
28+
"@rushstack/heft-lint-plugin": {
29+
"injected": true
30+
},
31+
"@rushstack/heft-typescript-plugin": {
32+
"injected": true
33+
}
34+
}
35+
}

Diff for: build-tests/install-test-workspace/.vscode/launch.json

-23
This file was deleted.

0 commit comments

Comments
 (0)