Skip to content

Commit 37c223b

Browse files
committed
address PR feedback
1 parent 9b994ed commit 37c223b

6 files changed

Lines changed: 30 additions & 116 deletions

File tree

common/reviews/api/rush-lib.api.md

Lines changed: 21 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,22 @@ export class ChangeManager {
103103
static createEmptyChangeFiles(rushConfiguration: RushConfiguration, projectName: string, emailAddress: string): string | undefined;
104104
}
105105

106+
// @beta
107+
export enum ChangeType {
108+
// (undocumented)
109+
dependency = 1,
110+
// (undocumented)
111+
hotfix = 2,
112+
// (undocumented)
113+
major = 5,
114+
// (undocumented)
115+
minor = 4,
116+
// (undocumented)
117+
none = 0,
118+
// (undocumented)
119+
patch = 3
120+
}
121+
106122
// Warning: (ae-forgotten-export) The symbol "IBuildCacheJson" needs to be exported by the entry point index.d.ts
107123
//
108124
// @beta (undocumented)
@@ -804,34 +820,32 @@ export interface IPublishCommand extends IRushCommand {
804820
readonly dryRun: boolean;
805821
}
806822

807-
// @public
823+
// @beta
808824
export interface IPublishProjectInfo {
809-
// Warning: (ae-forgotten-export) The symbol "ChangeType" needs to be exported by the entry point index.d.ts
810825
readonly changeType: ChangeType;
811826
readonly newVersion: string;
812827
readonly previousVersion: string;
813828
readonly project: RushConfigurationProject;
814829
readonly providerConfig: Record<string, unknown> | undefined;
815830
}
816831

817-
// @public
832+
// @beta
818833
export interface IPublishProvider {
819834
checkExistsAsync(options: IPublishProviderCheckExistsOptions): Promise<boolean>;
820835
readonly providerName: string;
821836
publishAsync(options: IPublishProviderPublishOptions): Promise<void>;
822837
}
823838

824-
// @public
839+
// @beta
825840
export interface IPublishProviderCheckExistsOptions {
826841
readonly project: RushConfigurationProject;
827842
readonly providerConfig: Record<string, unknown> | undefined;
828843
readonly version: string;
829844
}
830845

831-
// @public
846+
// @beta
832847
export interface IPublishProviderPublishOptions {
833848
readonly dryRun: boolean;
834-
// Warning: (ae-incompatible-release-tags) The symbol "logger" is marked as @public, but its signature references "ILogger" which is marked as @beta
835849
readonly logger: ILogger;
836850
readonly projects: ReadonlyArray<IPublishProjectInfo>;
837851
readonly tag: string | undefined;
@@ -1240,7 +1254,7 @@ export class ProjectChangeAnalyzer {
12401254
_tryGetSnapshotProviderAsync(projectConfigurations: ReadonlyMap<RushConfigurationProject, RushProjectConfiguration>, terminal: ITerminal, projectSelection?: ReadonlySet<RushConfigurationProject>): Promise<GetInputsSnapshotAsyncFn | undefined>;
12411255
}
12421256

1243-
// @public
1257+
// @beta
12441258
export type PublishProviderFactory = () => Promise<IPublishProvider>;
12451259

12461260
// @public

libraries/rush-lib/package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,8 +94,7 @@
9494
"@rushstack/rush-amazon-s3-build-cache-plugin": "workspace:*",
9595
"@rushstack/rush-azure-storage-build-cache-plugin": "workspace:*",
9696
"@rushstack/rush-http-build-cache-plugin": "workspace:*",
97-
"@rushstack/rush-npm-publish-plugin": "workspace:*",
98-
"@rushstack/rush-vscode-publish-plugin": "workspace:*"
97+
"@rushstack/rush-npm-publish-plugin": "workspace:*"
9998
},
10099
"sideEffects": [
101100
"lib-esnext/start-pnpm.js",

libraries/rush-lib/src/api/ChangeManagement.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ export interface IChangeFile {
1212

1313
/**
1414
* Represents all of the types of change requests.
15+
* @beta
1516
*/
1617
export enum ChangeType {
1718
none = 0,

libraries/rush-lib/src/api/test/RushConfiguration.test.ts

Lines changed: 0 additions & 102 deletions
Original file line numberDiff line numberDiff line change
@@ -412,108 +412,6 @@ describe(RushConfiguration.name, () => {
412412
});
413413
});
414414

415-
describe('VS Code extension project configuration', () => {
416-
interface IRushJsonProjectEntry {
417-
packageName: string;
418-
projectFolder: string;
419-
shouldPublish?: boolean;
420-
publishTarget?: string | string[];
421-
[key: string]: unknown;
422-
}
423-
424-
interface IRushJson {
425-
projects: IRushJsonProjectEntry[];
426-
[key: string]: unknown;
427-
}
428-
429-
it('verifies 4 VS Code extensions have shouldPublish and publishTarget: ["vsix"]', () => {
430-
// Load the real rush.json from the repo root
431-
const rushJsonPath: string = path.resolve(__dirname, '../../../../../rush.json');
432-
const rushJson: IRushJson = JsonFile.load(rushJsonPath) as IRushJson;
433-
434-
const vsixProjectNames: string[] = [
435-
'rushstack',
436-
'@rushstack/rush-vscode-command-webview',
437-
'debug-certificate-manager',
438-
'playwright-local-browser-server'
439-
];
440-
441-
for (const projectName of vsixProjectNames) {
442-
const entry: IRushJsonProjectEntry | undefined = rushJson.projects.find(
443-
(p: IRushJsonProjectEntry) => p.packageName === projectName
444-
);
445-
expect(entry).toBeDefined();
446-
expect(entry!.shouldPublish).toBe(true);
447-
expect(entry!.publishTarget).toEqual(['vsix']);
448-
}
449-
});
450-
451-
it('verifies @rushstack/vscode-shared is NOT configured to publish', () => {
452-
const rushJsonPath: string = path.resolve(__dirname, '../../../../../rush.json');
453-
const rushJson: IRushJson = JsonFile.load(rushJsonPath) as IRushJson;
454-
455-
const vscodeShared: IRushJsonProjectEntry | undefined = rushJson.projects.find(
456-
(p: IRushJsonProjectEntry) => p.packageName === '@rushstack/vscode-shared'
457-
);
458-
expect(vscodeShared).toBeDefined();
459-
expect(vscodeShared!.shouldPublish).toBe(false);
460-
});
461-
462-
it('verifies VS Code extensions are eligible for version bumping (no lockstep policy)', () => {
463-
const rushJsonPath: string = path.resolve(__dirname, '../../../../../rush.json');
464-
const rushJson: IRushJson = JsonFile.load(rushJsonPath) as IRushJson;
465-
466-
const vsixProjectNames: string[] = [
467-
'rushstack',
468-
'@rushstack/rush-vscode-command-webview',
469-
'debug-certificate-manager',
470-
'playwright-local-browser-server'
471-
];
472-
473-
for (const projectName of vsixProjectNames) {
474-
const entry: IRushJsonProjectEntry | undefined = rushJson.projects.find(
475-
(p: IRushJsonProjectEntry) => p.packageName === projectName
476-
);
477-
expect(entry).toBeDefined();
478-
// shouldPublish must be true for rush version --bump to process the project
479-
expect(entry!.shouldPublish).toBe(true);
480-
// Must not have a lockstep version policy with publishTarget 'none'
481-
// (no versionPolicyName means individual versioning, which is compatible with vsix)
482-
expect(entry!.publishTarget).toEqual(['vsix']);
483-
// Extensions should not have a lockstep version policy
484-
// (they use individual versioning for independent VSIX releases)
485-
expect(entry!.versionPolicyName).toBeUndefined();
486-
}
487-
});
488-
489-
it('verifies publish dispatch path: vsix projects do not include npm target', () => {
490-
const rushJsonPath: string = path.resolve(__dirname, '../../../../../rush.json');
491-
const rushJson: IRushJson = JsonFile.load(rushJsonPath) as IRushJson;
492-
493-
const vsixProjectNames: string[] = [
494-
'rushstack',
495-
'@rushstack/rush-vscode-command-webview',
496-
'debug-certificate-manager',
497-
'playwright-local-browser-server'
498-
];
499-
500-
for (const projectName of vsixProjectNames) {
501-
const entry: IRushJsonProjectEntry | undefined = rushJson.projects.find(
502-
(p: IRushJsonProjectEntry) => p.packageName === projectName
503-
);
504-
expect(entry).toBeDefined();
505-
const targets: string[] = Array.isArray(entry!.publishTarget)
506-
? entry!.publishTarget
507-
: [entry!.publishTarget!];
508-
// VSIX projects must only have 'vsix' target (not 'npm')
509-
// This ensures rush publish dispatches to VsixPublishProvider, not NpmPublishProvider
510-
expect(targets).toEqual(['vsix']);
511-
expect(targets).not.toContain('npm');
512-
expect(targets).not.toContain('none');
513-
}
514-
});
515-
});
516-
517415
describe(RushConfigurationProject.name, () => {
518416
it('correctly updates the packageJson property after the packageJson is edited by packageJsonEditor', async () => {
519417
const rushConfiguration: RushConfiguration = RushConfiguration.loadFromConfigurationFile(

libraries/rush-lib/src/index.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,8 @@ export { EventHooks, Event } from './api/EventHooks';
104104

105105
export { ChangeManager } from './api/ChangeManager';
106106

107+
export { ChangeType } from './api/ChangeManagement';
108+
107109
export { FlagFile as _FlagFile } from './api/FlagFile';
108110

109111
export {

libraries/rush-lib/src/pluginFramework/IPublishProvider.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import type { ILogger } from './logging/Logger';
77

88
/**
99
* Information about a single project to be published by a publish provider.
10-
* @public
10+
* @beta
1111
*/
1212
export interface IPublishProjectInfo {
1313
/**
@@ -39,7 +39,7 @@ export interface IPublishProjectInfo {
3939

4040
/**
4141
* Options passed to {@link IPublishProvider.publishAsync}.
42-
* @public
42+
* @beta
4343
*/
4444
export interface IPublishProviderPublishOptions {
4545
/**
@@ -66,7 +66,7 @@ export interface IPublishProviderPublishOptions {
6666

6767
/**
6868
* Options passed to {@link IPublishProvider.checkExistsAsync}.
69-
* @public
69+
* @beta
7070
*/
7171
export interface IPublishProviderCheckExistsOptions {
7272
/**
@@ -93,7 +93,7 @@ export interface IPublishProviderCheckExistsOptions {
9393
* Plugins implement this interface and register a factory via
9494
* {@link RushSession.registerPublishProviderFactory}.
9595
*
96-
* @public
96+
* @beta
9797
*/
9898
export interface IPublishProvider {
9999
/**
@@ -120,6 +120,6 @@ export interface IPublishProvider {
120120
* Publish provider plugins register a factory of this type via
121121
* {@link RushSession.registerPublishProviderFactory}.
122122
*
123-
* @public
123+
* @beta
124124
*/
125125
export type PublishProviderFactory = () => Promise<IPublishProvider>;

0 commit comments

Comments
 (0)