Skip to content

Commit 50fb559

Browse files
authored
chore: disable uninstall feedback form (#5333)
1 parent 24aa475 commit 50fb559

File tree

2 files changed

+24
-20
lines changed

2 files changed

+24
-20
lines changed

lib/common/commands/preuninstall.ts

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,15 @@ import { doesCurrentNpmCommandMatch, isInteractive } from "../helpers";
33
import { TrackActionNames, AnalyticsEventLabelDelimiter } from "../../constants";
44

55
export class PreUninstallCommand implements ICommand {
6-
private static FEEDBACK_FORM_URL = "https://www.nativescript.org/uninstall-feedback";
6+
// disabled for now (6/24/2020)
7+
// private static FEEDBACK_FORM_URL = "https://www.nativescript.org/uninstall-feedback";
78

89
public allowedParameters: ICommandParameter[] = [];
910

1011
constructor(private $analyticsService: IAnalyticsService,
1112
private $extensibilityService: IExtensibilityService,
1213
private $fs: IFileSystem,
13-
private $opener: IOpener,
14+
// private $opener: IOpener,
1415
private $packageInstallationManager: IPackageInstallationManager,
1516
private $settingsService: ISettingsService) { }
1617

@@ -37,9 +38,11 @@ export class PreUninstallCommand implements ICommand {
3738
}
3839

3940
private async handleFeedbackForm(): Promise<void> {
40-
if (isInteractive()) {
41-
this.$opener.open(PreUninstallCommand.FEEDBACK_FORM_URL);
42-
}
41+
// disabled for now (6/24/2020)
42+
// if (isInteractive()) {
43+
// this.$opener.open(PreUninstallCommand.FEEDBACK_FORM_URL);
44+
// }
45+
return Promise.resolve();
4346
}
4447
}
4548

lib/common/test/unit-tests/preuninstall.ts

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -135,19 +135,20 @@ describe("preuninstall", () => {
135135
assert.isTrue(isClearInspectorCacheCalled, "When uninstall is called, `clearInspectorCache` method must be called");
136136
});
137137

138-
it("opens the uninstall feedback form when terminal is interactive and uninstall is called", async () => {
139-
helpers.doesCurrentNpmCommandMatch = () => true;
140-
helpers.isInteractive = () => true;
141-
142-
const testInjector = createTestInjector();
143-
const opener = testInjector.resolve<IOpener>("opener");
144-
const openParams: any[] = [];
145-
opener.open = (filename: string, appname?: string) => {
146-
openParams.push({ filename, appname });
147-
};
148-
149-
const preUninstallCommand: ICommand = testInjector.resolveCommand("dev-preuninstall");
150-
await preUninstallCommand.execute([]);
151-
assert.deepEqual(openParams, [{ filename: "https://www.nativescript.org/uninstall-feedback", appname: undefined }]);
152-
});
138+
// disabled (6/24/2020)
139+
// it("opens the uninstall feedback form when terminal is interactive and uninstall is called", async () => {
140+
// helpers.doesCurrentNpmCommandMatch = () => true;
141+
// helpers.isInteractive = () => true;
142+
143+
// const testInjector = createTestInjector();
144+
// const opener = testInjector.resolve<IOpener>("opener");
145+
// const openParams: any[] = [];
146+
// opener.open = (filename: string, appname?: string) => {
147+
// openParams.push({ filename, appname });
148+
// };
149+
150+
// const preUninstallCommand: ICommand = testInjector.resolveCommand("dev-preuninstall");
151+
// await preUninstallCommand.execute([]);
152+
// assert.deepEqual(openParams, [{ filename: "https://www.nativescript.org/uninstall-feedback", appname: undefined }]);
153+
// });
153154
});

0 commit comments

Comments
 (0)