mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Clean up versioning and packageJson uses (#6196)
This commit is contained in:
1 parent
cfe35ded90
commit
67ac1692b2
116 files changed
+1154
-644
No files matched your search
+3
-3
@@ -95,7 +95,7 @@ exports[`force user to update when too long since update was downloaded when app
|
||||
style="width: 320px;"
|
||||
>
|
||||
<h2>
|
||||
Welcome to OpenLens!
|
||||
Welcome to some-product-name!
|
||||
</h2>
|
||||
<p>
|
||||
To get you started we have auto-detected your clusters in your
|
||||
@@ -314,7 +314,7 @@ exports[`force user to update when too long since update was downloaded when app
|
||||
style="width: 320px;"
|
||||
>
|
||||
<h2>
|
||||
Welcome to OpenLens!
|
||||
Welcome to some-product-name!
|
||||
</h2>
|
||||
<p>
|
||||
To get you started we have auto-detected your clusters in your
|
||||
@@ -580,7 +580,7 @@ exports[`force user to update when too long since update was downloaded when app
|
||||
style="width: 320px;"
|
||||
>
|
||||
<h2>
|
||||
Welcome to OpenLens!
|
||||
Welcome to some-product-name!
|
||||
</h2>
|
||||
<p>
|
||||
To get you started we have auto-detected your clusters in your
|
||||
|
||||
+2
-2
@@ -95,7 +95,7 @@ exports[`encourage user to update when sufficient time passed since update was d
|
||||
style="width: 320px;"
|
||||
>
|
||||
<h2>
|
||||
Welcome to OpenLens!
|
||||
Welcome to some-product-name!
|
||||
</h2>
|
||||
<p>
|
||||
To get you started we have auto-detected your clusters in your
|
||||
@@ -296,7 +296,7 @@ exports[`encourage user to update when sufficient time passed since update was d
|
||||
style="width: 320px;"
|
||||
>
|
||||
<h2>
|
||||
Welcome to OpenLens!
|
||||
Welcome to some-product-name!
|
||||
</h2>
|
||||
<p>
|
||||
To get you started we have auto-detected your clusters in your
|
||||
|
||||
+6
-6
@@ -77,7 +77,7 @@ exports[`installing update using tray when started renders 1`] = `
|
||||
style="width: 320px;"
|
||||
>
|
||||
<h2>
|
||||
Welcome to OpenLens!
|
||||
Welcome to some-product-name!
|
||||
</h2>
|
||||
<p>
|
||||
To get you started we have auto-detected your clusters in your
|
||||
@@ -278,7 +278,7 @@ exports[`installing update using tray when started when user checks for updates
|
||||
style="width: 320px;"
|
||||
>
|
||||
<h2>
|
||||
Welcome to OpenLens!
|
||||
Welcome to some-product-name!
|
||||
</h2>
|
||||
<p>
|
||||
To get you started we have auto-detected your clusters in your
|
||||
@@ -479,7 +479,7 @@ exports[`installing update using tray when started when user checks for updates
|
||||
style="width: 320px;"
|
||||
>
|
||||
<h2>
|
||||
Welcome to OpenLens!
|
||||
Welcome to some-product-name!
|
||||
</h2>
|
||||
<p>
|
||||
To get you started we have auto-detected your clusters in your
|
||||
@@ -698,7 +698,7 @@ exports[`installing update using tray when started when user checks for updates
|
||||
style="width: 320px;"
|
||||
>
|
||||
<h2>
|
||||
Welcome to OpenLens!
|
||||
Welcome to some-product-name!
|
||||
</h2>
|
||||
<p>
|
||||
To get you started we have auto-detected your clusters in your
|
||||
@@ -917,7 +917,7 @@ exports[`installing update using tray when started when user checks for updates
|
||||
style="width: 320px;"
|
||||
>
|
||||
<h2>
|
||||
Welcome to OpenLens!
|
||||
Welcome to some-product-name!
|
||||
</h2>
|
||||
<p>
|
||||
To get you started we have auto-detected your clusters in your
|
||||
@@ -1118,7 +1118,7 @@ exports[`installing update using tray when started when user checks for updates
|
||||
style="width: 320px;"
|
||||
>
|
||||
<h2>
|
||||
Welcome to OpenLens!
|
||||
Welcome to some-product-name!
|
||||
</h2>
|
||||
<p>
|
||||
To get you started we have auto-detected your clusters in your
|
||||
|
||||
@@ -77,7 +77,7 @@ exports[`installing update when started renders 1`] = `
|
||||
style="width: 320px;"
|
||||
>
|
||||
<h2>
|
||||
Welcome to OpenLens!
|
||||
Welcome to some-product-name!
|
||||
</h2>
|
||||
<p>
|
||||
To get you started we have auto-detected your clusters in your
|
||||
@@ -278,7 +278,7 @@ exports[`installing update when started when user checks for updates renders 1`]
|
||||
style="width: 320px;"
|
||||
>
|
||||
<h2>
|
||||
Welcome to OpenLens!
|
||||
Welcome to some-product-name!
|
||||
</h2>
|
||||
<p>
|
||||
To get you started we have auto-detected your clusters in your
|
||||
@@ -479,7 +479,7 @@ exports[`installing update when started when user checks for updates when new up
|
||||
style="width: 320px;"
|
||||
>
|
||||
<h2>
|
||||
Welcome to OpenLens!
|
||||
Welcome to some-product-name!
|
||||
</h2>
|
||||
<p>
|
||||
To get you started we have auto-detected your clusters in your
|
||||
@@ -698,7 +698,7 @@ exports[`installing update when started when user checks for updates when new up
|
||||
style="width: 320px;"
|
||||
>
|
||||
<h2>
|
||||
Welcome to OpenLens!
|
||||
Welcome to some-product-name!
|
||||
</h2>
|
||||
<p>
|
||||
To get you started we have auto-detected your clusters in your
|
||||
@@ -917,7 +917,7 @@ exports[`installing update when started when user checks for updates when new up
|
||||
style="width: 320px;"
|
||||
>
|
||||
<h2>
|
||||
Welcome to OpenLens!
|
||||
Welcome to some-product-name!
|
||||
</h2>
|
||||
<p>
|
||||
To get you started we have auto-detected your clusters in your
|
||||
@@ -1118,7 +1118,7 @@ exports[`installing update when started when user checks for updates when no new
|
||||
style="width: 320px;"
|
||||
>
|
||||
<h2>
|
||||
Welcome to OpenLens!
|
||||
Welcome to some-product-name!
|
||||
</h2>
|
||||
<p>
|
||||
To get you started we have auto-detected your clusters in your
|
||||
|
||||
+1
-1
@@ -77,7 +77,7 @@ exports[`periodical checking of updates given updater is enabled and configurati
|
||||
style="width: 320px;"
|
||||
>
|
||||
<h2>
|
||||
Welcome to OpenLens!
|
||||
Welcome to some-product-name!
|
||||
</h2>
|
||||
<p>
|
||||
To get you started we have auto-detected your clusters in your
|
||||
|
||||
+1
-1
@@ -77,7 +77,7 @@ exports[`selection of update stability when started renders 1`] = `
|
||||
style="width: 320px;"
|
||||
>
|
||||
<h2>
|
||||
Welcome to OpenLens!
|
||||
Welcome to some-product-name!
|
||||
</h2>
|
||||
<p>
|
||||
To get you started we have auto-detected your clusters in your
|
||||
|
||||
@@ -16,10 +16,10 @@ import processCheckingForUpdatesInjectable from "../../main/application-update/c
|
||||
import type { DownloadPlatformUpdate } from "../../main/application-update/download-platform-update/download-platform-update.injectable";
|
||||
import downloadPlatformUpdateInjectable from "../../main/application-update/download-platform-update/download-platform-update.injectable";
|
||||
import quitAndInstallUpdateInjectable from "../../main/application-update/quit-and-install-update.injectable";
|
||||
import appVersionInjectable from "../../common/vars/app-version.injectable";
|
||||
import periodicalCheckForUpdatesInjectable from "../../main/application-update/periodical-check-for-updates/periodical-check-for-updates.injectable";
|
||||
import { advanceFakeTime, useFakeTime } from "../../common/test-utils/use-fake-time";
|
||||
import emitEventInjectable from "../../common/app-event-bus/emit-event.injectable";
|
||||
import getBuildVersionInjectable from "../../main/vars/build-version/get-build-version.injectable";
|
||||
|
||||
describe("analytics for installing update", () => {
|
||||
let builder: ApplicationBuilder;
|
||||
@@ -36,7 +36,7 @@ describe("analytics for installing update", () => {
|
||||
analyticsListenerMock = jest.fn();
|
||||
|
||||
builder.beforeApplicationStart(mainDi => {
|
||||
mainDi.override(appVersionInjectable, () => "42.0.0");
|
||||
mainDi.override(getBuildVersionInjectable, () => () => "42.0.0");
|
||||
|
||||
checkForPlatformUpdatesMock = asyncFn();
|
||||
|
||||
|
||||
@@ -13,8 +13,8 @@ import checkForPlatformUpdatesInjectable from "../../main/application-update/che
|
||||
import processCheckingForUpdatesInjectable from "../../main/application-update/check-for-updates/process-checking-for-updates.injectable";
|
||||
import selectedUpdateChannelInjectable from "../../common/application-update/selected-update-channel/selected-update-channel.injectable";
|
||||
import type { DiContainer } from "@ogre-tools/injectable";
|
||||
import appVersionInjectable from "../../common/vars/app-version.injectable";
|
||||
import { updateChannels } from "../../common/application-update/update-channels";
|
||||
import getBuildVersionInjectable from "../../main/vars/build-version/get-build-version.injectable";
|
||||
|
||||
describe("downgrading version update", () => {
|
||||
let applicationBuilder: ApplicationBuilder;
|
||||
@@ -102,7 +102,7 @@ describe("downgrading version update", () => {
|
||||
},
|
||||
].forEach(({ appVersion, updateChannel, downgradeIsAllowed }) => {
|
||||
it(`given application version "${appVersion}" and update channel "${updateChannel.id}", when checking for updates, can${downgradeIsAllowed ? "": "not"} downgrade`, async () => {
|
||||
mainDi.override(appVersionInjectable, () => appVersion);
|
||||
mainDi.override(getBuildVersionInjectable, () => () => appVersion);
|
||||
|
||||
await applicationBuilder.render();
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ import type { CheckForPlatformUpdates } from "../../main/application-update/chec
|
||||
import checkForPlatformUpdatesInjectable from "../../main/application-update/check-for-platform-updates/check-for-platform-updates.injectable";
|
||||
import type { AsyncFnMock } from "@async-fn/jest";
|
||||
import asyncFn from "@async-fn/jest";
|
||||
import type { UpdateChannel, UpdateChannelId } from "../../common/application-update/update-channels";
|
||||
import type { UpdateChannel, ReleaseChannel } from "../../common/application-update/update-channels";
|
||||
import { updateChannels } from "../../common/application-update/update-channels";
|
||||
import type { DownloadPlatformUpdate } from "../../main/application-update/download-platform-update/download-platform-update.injectable";
|
||||
import downloadPlatformUpdateInjectable from "../../main/application-update/download-platform-update/download-platform-update.injectable";
|
||||
@@ -21,8 +21,8 @@ import type { IComputedValue } from "mobx";
|
||||
import setUpdateOnQuitInjectable from "../../main/electron-app/features/set-update-on-quit.injectable";
|
||||
import showInfoNotificationInjectable from "../../renderer/components/notifications/show-info-notification.injectable";
|
||||
import processCheckingForUpdatesInjectable from "../../main/application-update/check-for-updates/process-checking-for-updates.injectable";
|
||||
import appVersionInjectable from "../../common/vars/app-version.injectable";
|
||||
import type { DiContainer } from "@ogre-tools/injectable";
|
||||
import getBuildVersionInjectable from "../../main/vars/build-version/get-build-version.injectable";
|
||||
|
||||
describe("selection of update stability", () => {
|
||||
let builder: ApplicationBuilder;
|
||||
@@ -89,7 +89,7 @@ describe("selection of update stability", () => {
|
||||
describe('given update channel "alpha" is selected, when checking for updates', () => {
|
||||
let selectedUpdateChannel: {
|
||||
value: IComputedValue<UpdateChannel>;
|
||||
setValue: (channelId: UpdateChannelId) => void;
|
||||
setValue: (channelId: ReleaseChannel) => void;
|
||||
};
|
||||
|
||||
beforeEach(() => {
|
||||
@@ -180,7 +180,7 @@ describe("selection of update stability", () => {
|
||||
describe('given update channel "beta" is selected', () => {
|
||||
let selectedUpdateChannel: {
|
||||
value: IComputedValue<UpdateChannel>;
|
||||
setValue: (channelId: UpdateChannelId) => void;
|
||||
setValue: (channelId: ReleaseChannel) => void;
|
||||
};
|
||||
|
||||
beforeEach(() => {
|
||||
@@ -231,16 +231,12 @@ describe("selection of update stability", () => {
|
||||
});
|
||||
|
||||
it("given valid update channel selection is stored, when checking for updates, checks for updates from the update channel", async () => {
|
||||
builder.beforeApplicationStart((mainDi) => {
|
||||
// TODO: Switch to more natural way of setting initial value
|
||||
// TODO: UserStore is currently responsible for getting and setting initial value
|
||||
const selectedUpdateChannel = mainDi.inject(selectedUpdateChannelInjectable);
|
||||
|
||||
selectedUpdateChannel.setValue(updateChannels.beta.id);
|
||||
});
|
||||
|
||||
await builder.render();
|
||||
|
||||
// TODO: Switch to more natural way of setting initial value
|
||||
// TODO: UserStore is currently responsible for getting and setting initial value
|
||||
mainDi.inject(selectedUpdateChannelInjectable).setValue(updateChannels.beta.id);
|
||||
|
||||
const processCheckingForUpdates = mainDi.inject(processCheckingForUpdatesInjectable);
|
||||
|
||||
processCheckingForUpdates("irrelevant");
|
||||
@@ -249,16 +245,12 @@ describe("selection of update stability", () => {
|
||||
});
|
||||
|
||||
it("given invalid update channel selection is stored, when checking for updates, checks for updates from the update channel", async () => {
|
||||
builder.beforeApplicationStart((mainDi) => {
|
||||
// TODO: Switch to more natural way of setting initial value
|
||||
// TODO: UserStore is currently responsible for getting and setting initial value
|
||||
const selectedUpdateChannel = mainDi.inject(selectedUpdateChannelInjectable);
|
||||
|
||||
selectedUpdateChannel.setValue("something-invalid" as UpdateChannelId);
|
||||
});
|
||||
|
||||
await builder.render();
|
||||
|
||||
// TODO: Switch to more natural way of setting initial value
|
||||
// TODO: UserStore is currently responsible for getting and setting initial value
|
||||
mainDi.inject(selectedUpdateChannelInjectable).setValue("something-invalid" as ReleaseChannel);
|
||||
|
||||
const processCheckingForUpdates = mainDi.inject(processCheckingForUpdatesInjectable);
|
||||
|
||||
processCheckingForUpdates("irrelevant");
|
||||
@@ -268,7 +260,7 @@ describe("selection of update stability", () => {
|
||||
|
||||
it('given no update channel selection is stored and currently using stable release, when user checks for updates, checks for updates from "latest" update channel by default', async () => {
|
||||
builder.beforeApplicationStart((mainDi) => {
|
||||
mainDi.override(appVersionInjectable, () => "1.0.0");
|
||||
mainDi.override(getBuildVersionInjectable, () => () => "1.0.0");
|
||||
});
|
||||
|
||||
await builder.render();
|
||||
@@ -285,7 +277,7 @@ describe("selection of update stability", () => {
|
||||
|
||||
it('given no update channel selection is stored and currently using alpha release, when checking for updates, checks for updates from "alpha" channel', async () => {
|
||||
builder.beforeApplicationStart((mainDi) => {
|
||||
mainDi.override(appVersionInjectable, () => "1.0.0-alpha");
|
||||
mainDi.override(getBuildVersionInjectable, () => () => "1.0.0-alpha");
|
||||
});
|
||||
|
||||
await builder.render();
|
||||
@@ -299,7 +291,7 @@ describe("selection of update stability", () => {
|
||||
|
||||
it('given no update channel selection is stored and currently using beta release, when checking for updates, checks for updates from "beta" channel', async () => {
|
||||
builder.beforeApplicationStart((mainDi) => {
|
||||
mainDi.override(appVersionInjectable, () => "1.0.0-beta");
|
||||
mainDi.override(getBuildVersionInjectable, () => () => "1.0.0-beta");
|
||||
});
|
||||
|
||||
await builder.render();
|
||||
@@ -312,18 +304,12 @@ describe("selection of update stability", () => {
|
||||
});
|
||||
|
||||
it("given update channel selection is stored and currently using prerelease, when checking for updates, checks for updates from stored channel", async () => {
|
||||
builder.beforeApplicationStart((mainDi) => {
|
||||
mainDi.override(appVersionInjectable, () => "1.0.0-alpha");
|
||||
|
||||
// TODO: Switch to more natural way of setting initial value
|
||||
// TODO: UserStore is currently responsible for getting and setting initial value
|
||||
const selectedUpdateChannel = mainDi.inject(selectedUpdateChannelInjectable);
|
||||
|
||||
selectedUpdateChannel.setValue(updateChannels.beta.id);
|
||||
});
|
||||
|
||||
await builder.render();
|
||||
|
||||
// TODO: Switch to more natural way of setting initial value
|
||||
// TODO: UserStore is currently responsible for getting and setting initial value
|
||||
mainDi.inject(selectedUpdateChannelInjectable).setValue(updateChannels.beta.id);
|
||||
|
||||
const processCheckingForUpdates = mainDi.inject(processCheckingForUpdatesInjectable);
|
||||
|
||||
processCheckingForUpdates("irrelevant");
|
||||
|
||||
Reference in new issue
Block a user