Skip to content

Commit 350b94b

Browse files
chore: remove ask for email from postinstall
1 parent fd7601a commit 350b94b

File tree

5 files changed

+0
-396
lines changed

5 files changed

+0
-396
lines changed

lib/bootstrap.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,6 @@ $injector.requireCommand("extension|uninstall", "./commands/extensibility/uninst
197197
$injector.requirePublicClass("extensibilityService", "./services/extensibility-service");
198198

199199
$injector.require("nodeModulesDependenciesBuilder", "./tools/node-modules/node-modules-dependencies-builder");
200-
$injector.require("subscriptionService", "./services/subscription-service");
201200
$injector.require("terminalSpinnerService", "./services/terminal-spinner-service");
202201

203202
$injector.require('playgroundService', './services/playground-service');

lib/commands/post-install.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ import { doesCurrentNpmCommandMatch } from "../common/helpers";
22

33
export class PostInstallCliCommand implements ICommand {
44
constructor(private $fs: IFileSystem,
5-
private $subscriptionService: ISubscriptionService,
65
private $commandsService: ICommandsService,
76
private $helpService: IHelpService,
87
private $settingsService: ISettingsService,
@@ -36,10 +35,6 @@ export class PostInstallCliCommand implements ICommand {
3635
await this.$analyticsService.checkConsent();
3736
await this.$commandsService.tryExecuteCommand("autocomplete", []);
3837
}
39-
40-
if (canExecutePostInstallTask) {
41-
await this.$subscriptionService.subscribeForNewsletter();
42-
}
4338
}
4439

4540
public async postCommandAction(args: string[]): Promise<void> {

lib/services/subscription-service.ts

Lines changed: 0 additions & 77 deletions
This file was deleted.

test/commands/post-install.ts

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,6 @@ const createTestInjector = (): IInjector => {
99
setCurrentUserAsOwner: async (path: string, owner: string): Promise<void> => undefined
1010
});
1111

12-
testInjector.register("subscriptionService", {
13-
subscribeForNewsletter: async (): Promise<void> => undefined
14-
});
15-
1612
testInjector.register("staticConfig", {});
1713

1814
testInjector.register("commandsService", {
@@ -57,26 +53,8 @@ describe("post-install command", () => {
5753
process.env.SUDO_USER = originalSudoUser;
5854
});
5955

60-
it("calls subscriptionService.subscribeForNewsletter method", async () => {
61-
const testInjector = createTestInjector();
62-
const subscriptionService = testInjector.resolve<ISubscriptionService>("subscriptionService");
63-
let isSubscribeForNewsletterCalled = false;
64-
subscriptionService.subscribeForNewsletter = async (): Promise<void> => {
65-
isSubscribeForNewsletterCalled = true;
66-
};
67-
const postInstallCommand = testInjector.resolveCommand("post-install-cli");
68-
69-
await postInstallCommand.execute([]);
70-
assert.isTrue(isSubscribeForNewsletterCalled, "post-install-cli command must call subscriptionService.subscribeForNewsletter");
71-
});
72-
7356
const verifyResult = async (opts: { shouldCallMethod: boolean }): Promise<void> => {
7457
const testInjector = createTestInjector();
75-
const subscriptionService = testInjector.resolve<ISubscriptionService>("subscriptionService");
76-
let isSubscribeForNewsletterCalled = false;
77-
subscriptionService.subscribeForNewsletter = async (): Promise<void> => {
78-
isSubscribeForNewsletterCalled = true;
79-
};
8058

8159
const helpService = testInjector.resolve<IHelpService>("helpService");
8260
let isGenerateHtmlPagesCalled = false;
@@ -104,7 +82,6 @@ describe("post-install command", () => {
10482

10583
const hasNotInMsg = opts.shouldCallMethod ? "" : "NOT";
10684

107-
assert.equal(isSubscribeForNewsletterCalled, opts.shouldCallMethod, `post-install-cli command must ${hasNotInMsg} call subscriptionService.subscribeForNewsletter`);
10885
assert.equal(isGenerateHtmlPagesCalled, opts.shouldCallMethod, `post-install-cli command must ${hasNotInMsg} call helpService.generateHtmlPages`);
10986
assert.equal(isCheckConsentCalled, opts.shouldCallMethod, `post-install-cli command must ${hasNotInMsg} call analyticsService.checkConsent`);
11087
assert.equal(isTryExecuteCommandCalled, opts.shouldCallMethod, `post-install-cli command must ${hasNotInMsg} call commandsService.tryExecuteCommand`);

0 commit comments

Comments
 (0)