Skip to content

Commit

Permalink
fix: use rig.json
Browse files Browse the repository at this point in the history
  • Loading branch information
g-chao committed Feb 27, 2024
1 parent aafc7ba commit f95f5c1
Show file tree
Hide file tree
Showing 18 changed files with 79 additions and 31 deletions.
7 changes: 7 additions & 0 deletions build-tests-subspace/rush-lib-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 }
};
9 changes: 8 additions & 1 deletion build-tests-subspace/rush-lib-test/config/heft.json
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 All @@ -11,6 +12,12 @@
"taskPlugin": {
"pluginPackage": "@rushstack/heft-typescript-plugin"
}
},
"lint": {
"taskDependencies": ["typescript"],
"taskPlugin": {
"pluginPackage": "@rushstack/heft-lint-plugin"
}
}
}
}
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"
}
8 changes: 0 additions & 8 deletions build-tests-subspace/rush-lib-test/config/rush-project.json

This file was deleted.

6 changes: 6 additions & 0 deletions build-tests-subspace/rush-lib-test/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,10 @@
"@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"
Expand All @@ -29,6 +32,9 @@
"@rushstack/heft": {
"injected": true
},
"@rushstack/heft-lint-plugin": {
"injected": true
},
"@rushstack/heft-typescript-plugin": {
"injected": true
}
Expand Down
4 changes: 2 additions & 2 deletions build-tests-subspace/rush-lib-test/src/start.ts
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);
7 changes: 7 additions & 0 deletions build-tests-subspace/rush-sdk-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 }
};
3 changes: 2 additions & 1 deletion build-tests-subspace/rush-sdk-test/config/heft.json
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-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"
}
8 changes: 0 additions & 8 deletions build-tests-subspace/rush-sdk-test/config/rush-project.json

This file was deleted.

2 changes: 2 additions & 0 deletions build-tests-subspace/rush-sdk-test/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
"@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:*",
Expand Down
2 changes: 1 addition & 1 deletion build-tests-subspace/rush-sdk-test/src/start.ts
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
3 changes: 2 additions & 1 deletion build-tests-subspace/typescript-newest-test/config/heft.json
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/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"
}

This file was deleted.

1 change: 1 addition & 0 deletions build-tests-subspace/typescript-newest-test/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"_phase:build": "heft run --only build -- --clean"
},
"devDependencies": {
"local-node-rig": "workspace:*",
"@rushstack/eslint-config": "workspace:*",
"@rushstack/heft": "workspace:*",
"@rushstack/heft-lint-plugin": "workspace:*",
Expand Down
1 change: 0 additions & 1 deletion build-tests-subspace/typescript-v4-test/config/heft.json
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
20 changes: 20 additions & 0 deletions common/config/rush/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit f95f5c1

Please sign in to comment.