Skip to content

Commit

Permalink
Merge pull request #4530 from g-chao/chao/pnpm-sync
Browse files Browse the repository at this point in the history
Replace install-test-workspace with usePnpmSyncForInjectedDependencies=true
  • Loading branch information
octogonz committed Feb 27, 2024
2 parents a6b1ff4 + f95f5c1 commit b856fc9
Show file tree
Hide file tree
Showing 47 changed files with 605 additions and 5,265 deletions.
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,10 @@ These GitHub repositories provide supplementary resources for Rush Stack:
| [/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 |
| [/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 |
| [/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 |
| [/build-tests-subspace/rush-lib-test](./build-tests-subspace/rush-lib-test/) | A minimal example project that imports APIs from @rushstack/rush-lib |
| [/build-tests-subspace/rush-sdk-test](./build-tests-subspace/rush-sdk-test/) | A minimal example project that imports APIs from @rushstack/rush-sdk |
| [/build-tests-subspace/typescript-newest-test](./build-tests-subspace/typescript-newest-test/) | Building this project tests Heft with the newest supported TypeScript compiler version |
| [/build-tests-subspace/typescript-v4-test](./build-tests-subspace/typescript-v4-test/) | Building this project tests Heft with TypeScript v4 |
| [/build-tests/api-documenter-scenarios](./build-tests/api-documenter-scenarios/) | Building this project is a regression test for api-documenter |
| [/build-tests/api-documenter-test](./build-tests/api-documenter-test/) | Building this project is a regression test for api-documenter |
| [/build-tests/api-extractor-d-cts-test](./build-tests/api-extractor-d-cts-test/) | Building this project is a regression test for api-extractor |
Expand Down Expand Up @@ -167,7 +171,6 @@ These GitHub repositories provide supplementary resources for Rush Stack:
| [/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 |
| [/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 |
| [/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 |
| [/build-tests/install-test-workspace](./build-tests/install-test-workspace/) | |
| [/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. |
| [/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. |
| [/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. |
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
{
"$schema": "https://developer.microsoft.com/json-schemas/heft/v0/heft.schema.json",

// TODO: Add comments
"extends": "local-node-rig/profiles/default/config/heft.json",

"phasesByName": {
"build": {
"cleanFiles": [{ "includeGlobs": ["lib", "dist"] }],
Expand Down
7 changes: 7 additions & 0 deletions build-tests-subspace/rush-lib-test/config/rig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
// The "rig.json" file directs tools to look for their config files in an external package.
// 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": "local-node-rig"
}
42 changes: 42 additions & 0 deletions build-tests-subspace/rush-lib-test/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
{
"name": "rush-lib-test",
"version": "0.0.0",
"private": true,
"description": "A minimal example project that imports APIs from @rushstack/rush-lib",
"license": "MIT",
"scripts": {
"build": "heft build --clean",
"start": "node lib/start.js",
"_phase:build": "heft run --only build -- --clean"
},
"dependencies": {
"@microsoft/rush-lib": "workspace:*",
"@rushstack/terminal": "workspace:*"
},
"devDependencies": {
"local-node-rig": "workspace:*",
"@rushstack/eslint-config": "workspace:*",
"@rushstack/heft": "workspace:*",
"@rushstack/heft-lint-plugin": "workspace:*",
"@rushstack/heft-typescript-plugin": "workspace:*",
"@types/node": "18.17.15",
"typescript": "~5.3.3"
},
"dependenciesMeta": {
"@microsoft/rush-lib": {
"injected": true
},
"@rushstack/terminal": {
"injected": true
},
"@rushstack/heft": {
"injected": true
},
"@rushstack/heft-lint-plugin": {
"injected": true
},
"@rushstack/heft-typescript-plugin": {
"injected": true
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ console.log('rush-lib-test loading Rush configuration...');
// instead of the normal .d.ts rollup
import { RushConfiguration } from '@microsoft/rush-lib/lib/';

const config = RushConfiguration.loadFromDefaultLocation();
const config: RushConfiguration = RushConfiguration.loadFromDefaultLocation();
console.log(config.commonFolder);

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

const terminal = new Terminal(new ConsoleTerminalProvider());
const terminal: Terminal = new Terminal(new ConsoleTerminalProvider());
VersionMismatchFinder.ensureConsistentVersions(config, terminal);

console.log(new ConsoleTerminalProvider().supportsColor);
25 changes: 25 additions & 0 deletions build-tests-subspace/rush-sdk-test/config/heft.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"$schema": "https://developer.microsoft.com/json-schemas/heft/v0/heft.schema.json",

"extends": "local-node-rig/profiles/default/config/heft.json",

"phasesByName": {
"build": {
"cleanFiles": [{ "includeGlobs": ["lib", "dist"] }],

"tasksByName": {
"typescript": {
"taskPlugin": {
"pluginPackage": "@rushstack/heft-typescript-plugin"
}
},
"lint": {
"taskDependencies": ["typescript"],
"taskPlugin": {
"pluginPackage": "@rushstack/heft-lint-plugin"
}
}
}
}
}
}
7 changes: 7 additions & 0 deletions build-tests-subspace/rush-sdk-test/config/rig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
// The "rig.json" file directs tools to look for their config files in an external package.
// 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": "local-node-rig"
}
42 changes: 42 additions & 0 deletions build-tests-subspace/rush-sdk-test/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
{
"name": "rush-sdk-test",
"version": "0.0.0",
"private": true,
"description": "A minimal example project that imports APIs from @rushstack/rush-sdk",
"license": "MIT",
"scripts": {
"build": "heft build --clean",
"start": "node lib/start.js",
"_phase:build": "heft run --only build -- --clean"
},
"dependencies": {
"@rushstack/rush-sdk": "workspace:*"
},
"devDependencies": {
"local-node-rig": "workspace:*",
"@rushstack/eslint-config": "workspace:*",
"@rushstack/heft": "workspace:*",
"@rushstack/heft-lint-plugin": "workspace:*",
"@rushstack/heft-typescript-plugin": "workspace:*",
"@microsoft/rush-lib": "workspace:*",
"@types/node": "18.17.15",
"typescript": "~5.3.3"
},
"dependenciesMeta": {
"@microsoft/rush-lib": {
"injected": true
},
"@rushstack/rush-sdk": {
"injected": true
},
"@rushstack/heft": {
"injected": true
},
"@rushstack/heft-lint-plugin": {
"injected": true
},
"@rushstack/heft-typescript-plugin": {
"injected": true
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ console.log('rush-sdk-test loading Rush configuration...');
// instead of the normal .d.ts rollup
import { RushConfiguration } from '@rushstack/rush-sdk/lib/';

const config = RushConfiguration.loadFromDefaultLocation();
const config: RushConfiguration = RushConfiguration.loadFromDefaultLocation();
console.log(config.commonFolder);

console.log('Calling an internal API...');
Expand Down
7 changes: 7 additions & 0 deletions build-tests-subspace/typescript-newest-test/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
// This is a workaround for https://github.com/eslint/eslint/issues/3458
require('@rushstack/eslint-config/patch/modern-module-resolution');

module.exports = {
extends: ['@rushstack/eslint-config/profile/node'],
parserOptions: { tsconfigRootDir: __dirname }
};
25 changes: 25 additions & 0 deletions build-tests-subspace/typescript-newest-test/config/heft.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"$schema": "https://developer.microsoft.com/json-schemas/heft/v0/heft.schema.json",

"extends": "local-node-rig/profiles/default/config/heft.json",

"phasesByName": {
"build": {
"cleanFiles": [{ "includeGlobs": ["lib", "dist"] }],

"tasksByName": {
"typescript": {
"taskPlugin": {
"pluginPackage": "@rushstack/heft-typescript-plugin"
}
},
"lint": {
"taskDependencies": ["typescript"],
"taskPlugin": {
"pluginPackage": "@rushstack/heft-lint-plugin"
}
}
}
}
}
}
7 changes: 7 additions & 0 deletions build-tests-subspace/typescript-newest-test/config/rig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
// The "rig.json" file directs tools to look for their config files in an external package.
// 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": "local-node-rig"
}
36 changes: 36 additions & 0 deletions build-tests-subspace/typescript-newest-test/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{
"name": "typescript-newest-test",
"description": "Building this project tests Heft with the newest supported TypeScript compiler version",
"version": "1.0.0",
"private": true,
"main": "lib/index.js",
"license": "MIT",
"scripts": {
"build": "heft build --clean",
"_phase:build": "heft run --only build -- --clean"
},
"devDependencies": {
"local-node-rig": "workspace:*",
"@rushstack/eslint-config": "workspace:*",
"@rushstack/heft": "workspace:*",
"@rushstack/heft-lint-plugin": "workspace:*",
"@rushstack/heft-typescript-plugin": "workspace:*",
"typescript": "~5.3.3",
"tslint": "~5.20.1",
"eslint": "~8.7.0"
},
"dependenciesMeta": {
"@rushstack/eslint-config": {
"injected": true
},
"@rushstack/heft": {
"injected": true
},
"@rushstack/heft-lint-plugin": {
"injected": true
},
"@rushstack/heft-typescript-plugin": {
"injected": true
}
}
}
7 changes: 7 additions & 0 deletions build-tests-subspace/typescript-v4-test/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
// This is a workaround for https://github.com/eslint/eslint/issues/3458
require('@rushstack/eslint-config/patch/modern-module-resolution');

module.exports = {
extends: ['@rushstack/eslint-config/profile/node'],
parserOptions: { tsconfigRootDir: __dirname }
};
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"$schema": "https://developer.microsoft.com/json-schemas/heft/v0/heft.schema.json",

// TODO: Add comments
"phasesByName": {
"build": {
"cleanFiles": [{ "includeGlobs": ["dist", "lib", "temp"] }],
Expand Down
35 changes: 35 additions & 0 deletions build-tests-subspace/typescript-v4-test/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
"name": "typescript-v4-test",
"description": "Building this project tests Heft with TypeScript v4",
"version": "1.0.0",
"private": true,
"main": "lib/index.js",
"license": "MIT",
"scripts": {
"build": "heft build --clean",
"_phase:build": "heft run --only build -- --clean"
},
"devDependencies": {
"@rushstack/eslint-config": "workspace:*",
"@rushstack/heft": "workspace:*",
"@rushstack/heft-lint-plugin": "workspace:*",
"@rushstack/heft-typescript-plugin": "workspace:*",
"typescript": "~4.9.5",
"tslint": "~5.20.1",
"eslint": "~8.7.0"
},
"dependenciesMeta": {
"@rushstack/eslint-config": {
"injected": true
},
"@rushstack/heft": {
"injected": true
},
"@rushstack/heft-lint-plugin": {
"injected": true
},
"@rushstack/heft-typescript-plugin": {
"injected": true
}
}
}
23 changes: 0 additions & 23 deletions build-tests/install-test-workspace/.vscode/launch.json

This file was deleted.

Loading

0 comments on commit b856fc9

Please sign in to comment.