From e5e361808bae6033b19ded4f4bfe7f75c2985166 Mon Sep 17 00:00:00 2001 From: Paul Fitzpatrick Date: Mon, 13 Jun 2022 09:53:08 -0400 Subject: [PATCH] (core) repair grist-ee build and add smoke test Summary: This fixes the grist-ee build after recent changes, by giving it a stub for ProductUpgrades.ts. Extends the `core` test to also check if `ext` variant builds, to catch the most common form of breakage on grist-ee so far (file organization). Test Plan: extends test Reviewers: georgegevoian Reviewed By: georgegevoian Differential Revision: https://phab.getgrist.com/D3484 --- app/client/ui/ProductUpgradesStub.ts | 27 +++++++++++++++++++++++++ stubs/app/client/ui/ProductUpgrades.ts | 28 +------------------------- 2 files changed, 28 insertions(+), 27 deletions(-) create mode 100644 app/client/ui/ProductUpgradesStub.ts diff --git a/app/client/ui/ProductUpgradesStub.ts b/app/client/ui/ProductUpgradesStub.ts new file mode 100644 index 00000000..5e078ffb --- /dev/null +++ b/app/client/ui/ProductUpgradesStub.ts @@ -0,0 +1,27 @@ +import type {AppModel} from 'app/client/models/AppModel'; +import {commonUrls} from 'app/common/gristUrls'; +import {Disposable} from 'grainjs'; + +export function buildUpgradeNudge(options: { + onClose: () => void; + onUpgrade: () => void +}) { + return null; +} + +export function buildNewSiteModal(owner: Disposable, current: string | null) { + window.location.href = commonUrls.plans; +} + +export function buildUpgradeModal(owner: Disposable, planName: string) { + window.location.href = commonUrls.plans; +} + +export class UpgradeButton extends Disposable { + constructor(appModel: AppModel) { + super(); + } + public buildDom() { + return null; + } +} diff --git a/stubs/app/client/ui/ProductUpgrades.ts b/stubs/app/client/ui/ProductUpgrades.ts index 5e078ffb..2c583135 100644 --- a/stubs/app/client/ui/ProductUpgrades.ts +++ b/stubs/app/client/ui/ProductUpgrades.ts @@ -1,27 +1 @@ -import type {AppModel} from 'app/client/models/AppModel'; -import {commonUrls} from 'app/common/gristUrls'; -import {Disposable} from 'grainjs'; - -export function buildUpgradeNudge(options: { - onClose: () => void; - onUpgrade: () => void -}) { - return null; -} - -export function buildNewSiteModal(owner: Disposable, current: string | null) { - window.location.href = commonUrls.plans; -} - -export function buildUpgradeModal(owner: Disposable, planName: string) { - window.location.href = commonUrls.plans; -} - -export class UpgradeButton extends Disposable { - constructor(appModel: AppModel) { - super(); - } - public buildDom() { - return null; - } -} +export * from 'app/client/ui/ProductUpgradesStub';