Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions apps/rush/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
"dependencies": {
"@microsoft/rush-lib": "workspace:*",
"@rushstack/node-core-library": "workspace:*",
"@rushstack/rush-reporter": "workspace:*",
"@rushstack/terminal": "workspace:*",
"semver": "~7.7.4"
},
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"changes": [
{
"packageName": "@microsoft/rush",
"comment": "Add the rush-reporter package dependency to the Rush frontend and engine without changing default output.",
"type": "patch"
}
],
"packageName": "@microsoft/rush",
"email": "TheLarkInn@users.noreply.github.com"
}
4 changes: 4 additions & 0 deletions common/config/rush/browser-approved-packages.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,10 @@
"name": "@rushstack/rush-daemon-transport",
"allowedCategories": [ "libraries", "tests" ]
},
{
"name": "@rushstack/rush-reporter",
"allowedCategories": [ "libraries" ]
},
{
"name": "@rushstack/rush-serve-dashboard",
"allowedCategories": [ "libraries" ]
Expand Down
15 changes: 15 additions & 0 deletions common/config/subspaces/build-tests-subspace/pnpm-lock.yaml

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

Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// DO NOT MODIFY THIS FILE MANUALLY BUT DO COMMIT IT. It is generated and used by Rush.
{
"pnpmShrinkwrapHash": "6c9692e3e1eac781ccc4d397fb350ea393be2118",
"pnpmShrinkwrapHash": "2f7908424d103b2f677e95bcd5d85a385b75eda2",
"preferredVersionsHash": "550b4cee0bef4e97db6c6aad726df5149d20e7d9",
"packageJsonInjectedDependenciesHash": "e31d2a6b0cc6937616e99bfd2aa6f566d11a8681"
"packageJsonInjectedDependenciesHash": "e8fe4109038ad6e9b1e97cbb83e63d9094d37fe4"
}
6 changes: 6 additions & 0 deletions common/config/subspaces/default/pnpm-lock.yaml

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

41 changes: 41 additions & 0 deletions libraries/reporter/src/test/PackageBoundaries.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.
// See LICENSE in the project root for license information.

import * as fs from 'node:fs';
import * as path from 'node:path';

interface IPackageJson {
dependencies?: Record<string, string>;
devDependencies?: Record<string, string>;
optionalDependencies?: Record<string, string>;
peerDependencies?: Record<string, string>;
}

const REPO_ROOT: string = path.resolve(__dirname, '../../../..');

function loadPackageJson(relativePath: string): IPackageJson {
return JSON.parse(fs.readFileSync(path.join(REPO_ROOT, relativePath), 'utf8')) as IPackageJson;
}

describe('package boundaries', () => {
it('keeps the reporter independent from rush-lib', () => {
const reporterPackageJson: IPackageJson = loadPackageJson('libraries/reporter/package.json');

for (const dependencySection of [
reporterPackageJson.dependencies,
reporterPackageJson.devDependencies,
reporterPackageJson.optionalDependencies,
reporterPackageJson.peerDependencies
]) {
expect(dependencySection?.['@microsoft/rush-lib']).toBeUndefined();
}
});

it('wires the reporter into the Rush engine and frontend', () => {
const rushLibPackageJson: IPackageJson = loadPackageJson('libraries/rush-lib/package.json');
const rushPackageJson: IPackageJson = loadPackageJson('apps/rush/package.json');

expect(rushLibPackageJson.dependencies?.['@rushstack/rush-reporter']).toBe('workspace:*');
expect(rushPackageJson.dependencies?.['@rushstack/rush-reporter']).toBe('workspace:*');
});
});
1 change: 1 addition & 0 deletions libraries/rush-lib/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
"@rushstack/rush-pnpm-kit-v10": "workspace:*",
"@rushstack/rush-pnpm-kit-v8": "workspace:*",
"@rushstack/rush-pnpm-kit-v9": "workspace:*",
"@rushstack/rush-reporter": "workspace:*",
"@rushstack/stream-collator": "workspace:*",
"@rushstack/terminal": "workspace:*",
"@rushstack/ts-command-line": "workspace:*",
Expand Down