From 1fe66e51799dc2d4273f7ff7385ad96ff376b84f Mon Sep 17 00:00:00 2001 From: Steven Swartz Date: Fri, 17 Mar 2023 16:15:41 -0400 Subject: [PATCH] V1.4.6 (#56) - Moves the Update Plugin button to the middle of the screen on iphone since it's inaccessible - Fixes new version detection for the few plugins that do not use full semantic version numbers (ex: version 2.7 instead of 2.7.0) --- .env | 3 +- backend/.env | 2 +- .../src/ReleaseRepository/index.ts | 2 +- .../src/get-releases.test.ts | 2 +- .../get-releases-lambda/src/get-releases.ts | 5 +-- backend/get-releases-lambda/src/handler.ts | 2 +- backend/get-releases-lambda/src/util.ts | 35 ------------------- esbuild.config.mjs | 15 ++++++-- jest.config.js | 2 +- manifest-beta.json | 2 +- {shared-types => oput-common}/index.d.ts | 0 .../util => oput-common}/semverCompare.ts | 6 ++-- package.json | 2 +- src/components/DismissedPluginVersions.tsx | 2 +- src/components/PluginUpdateList.stories.tsx | 2 ++ src/components/PluginUpdateList.tsx | 14 ++++++-- src/components/PluginUpdateManager.tsx | 11 ++++++ src/components/SelectedPluginActionBar.tsx | 12 ++++--- src/domain/InstalledPluginReleases.ts | 2 +- src/domain/api.ts | 2 +- src/domain/pluginFilter.test.ts | 2 +- src/domain/pluginFilter.ts | 4 +-- src/domain/util/semverCompare.test.ts | 8 ++++- .../cleanupDismissedPluginVersions.ts | 2 +- src/state/actionProducers/fetchReleases.ts | 2 +- src/state/releasesReducer.ts | 2 +- tsconfig.json | 3 +- versions.json | 3 +- 28 files changed, 80 insertions(+), 69 deletions(-) rename {shared-types => oput-common}/index.d.ts (100%) rename {src/domain/util => oput-common}/semverCompare.ts (78%) diff --git a/.env b/.env index 832043c05..8fa348e91 100644 --- a/.env +++ b/.env @@ -2,4 +2,5 @@ OBSIDIAN_APP_RELEASE_POLLING_SECONDS=1800 OBSIDIAN_APP_INSTALLED_VERSION_POLLING_SECONDS=30 OBSIDIAN_APP_SIMULATE_UPDATE_PLUGINS=false OBSIDIAN_APP_HIDE_THIS_PLUGINS_UPDATES=false -OBSIDIAN_APP_THIS_PLUGIN_ID=obsidian-plugin-update-tracker \ No newline at end of file +OBSIDIAN_APP_THIS_PLUGIN_ID=obsidian-plugin-update-tracker +OBSIDIAN_APP_ACTION_BAR_LOCATION_MIDDLE=false \ No newline at end of file diff --git a/backend/.env b/backend/.env index 2dc79b9a6..e2d1ed14b 100644 --- a/backend/.env +++ b/backend/.env @@ -3,7 +3,7 @@ OPUC_RELEASES_CACHE_LENGTH_SECONDS_MULTIPLIER=1800 OPUC_PLUGIN_CACHE_LENGTH_DIVISOR=50 OPUC_RELEASES_FETCHED_PER_PLUGIN=10 OPUC_MAX_RELEASE_NOTE_LENGTH=15000 -OPUC_MAX_MANIFESTS_TO_FETCH_PER_PLUGIN=8 +OPUC_MAX_MANIFESTS_TO_FETCH_PER_PLUGIN=9 OPUC_GITHUB_API_TIMEOUT_MS=5000 OPUC_IGNORE_RELEASES_FOR_THIS_PLUGIN=false diff --git a/backend/get-releases-lambda/src/ReleaseRepository/index.ts b/backend/get-releases-lambda/src/ReleaseRepository/index.ts index e010a3182..45e964564 100644 --- a/backend/get-releases-lambda/src/ReleaseRepository/index.ts +++ b/backend/get-releases-lambda/src/ReleaseRepository/index.ts @@ -1,4 +1,4 @@ -import { PluginFileAssetIds } from '../../../../shared-types'; +import { PluginFileAssetIds } from '../../../../oput-common'; export interface ReleaseRepository { //Sorted from most to least recent diff --git a/backend/get-releases-lambda/src/get-releases.test.ts b/backend/get-releases-lambda/src/get-releases.test.ts index aba10f8d1..0427989a9 100644 --- a/backend/get-releases-lambda/src/get-releases.test.ts +++ b/backend/get-releases-lambda/src/get-releases.test.ts @@ -3,7 +3,7 @@ import { InstalledPluginVersion, NewPluginVersionRequest, PluginReleases, -} from '../../../shared-types'; +} from '../../../oput-common'; import { GetReleases, GetReleasesConfiguration } from './get-releases'; import { PluginRecord, PluginRepository } from './PluginRepository'; import { ApiReleases, ReleaseApi } from './ReleaseApi'; diff --git a/backend/get-releases-lambda/src/get-releases.ts b/backend/get-releases-lambda/src/get-releases.ts index 8e8d32761..a8c650a4c 100644 --- a/backend/get-releases-lambda/src/get-releases.ts +++ b/backend/get-releases-lambda/src/get-releases.ts @@ -5,7 +5,7 @@ import { InstalledPluginVersion, ReleaseVersion, PluginFileAssetIds, -} from '../../../shared-types'; +} from '../../../oput-common'; import { ReleaseApi, ApiReleaseResponse, @@ -14,7 +14,8 @@ import { } from './ReleaseApi'; import { PluginRepository, PluginRecord } from './PluginRepository'; import { ReleaseRepository, PluginReleasesRecord, MasterManifestInfo } from './ReleaseRepository'; -import { isEmpty, groupById, semverCompare, debug } from './util'; +import { isEmpty, groupById, debug } from './util'; +import { semverCompare } from '../../../oput-common/semverCompare'; const THIS_PLUGIN_ID = 'obsidian-plugin-update-tracker'; diff --git a/backend/get-releases-lambda/src/handler.ts b/backend/get-releases-lambda/src/handler.ts index c7324578b..c404e8c86 100644 --- a/backend/get-releases-lambda/src/handler.ts +++ b/backend/get-releases-lambda/src/handler.ts @@ -1,5 +1,5 @@ import type { APIGatewayProxyEventV2, APIGatewayProxyResultV2 } from 'aws-lambda'; -import { NewPluginVersionRequest } from '../../../shared-types'; +import { NewPluginVersionRequest } from '../../../oput-common'; import { CloudWatchMetricLogger } from './MetricLogger'; import { DynamoDBReleaseRepository } from './ReleaseRepository/DynamoDBReleaseRepository'; import { GetReleases, GetReleasesConfiguration } from './get-releases'; diff --git a/backend/get-releases-lambda/src/util.ts b/backend/get-releases-lambda/src/util.ts index 9a571fa66..687963d75 100644 --- a/backend/get-releases-lambda/src/util.ts +++ b/backend/get-releases-lambda/src/util.ts @@ -1,4 +1,3 @@ -const FUZZY_SEMVER_PATTERN = /^(\d+)\.(\d+)\.(\d+).*/; const DEBUG_LOGS_ENABLED = process.env['OPUC_DEBUG_LOGS_ENABLED'] === 'true'; export function isEmpty(collection: any[] | null | undefined) { @@ -25,40 +24,6 @@ export function partition(items: T[], chunkSize: number): T[][] { return partitions; } -export function semverCompare(version1: string | null, version2: string | null): number { - if (version1 == version2) { - return 0; - } else if (version1 == null) { - return -1; - } else if (version2 == null) { - return 1; - } - - const v1Match = version1.match(FUZZY_SEMVER_PATTERN); - const v2Match = version2.match(FUZZY_SEMVER_PATTERN); - if (!v1Match && !v2Match) { - return 0; - } else if (!v1Match) { - return -1; - } else if (!v2Match) { - return 1; - } - - let versionPartIndex = 1; - while (versionPartIndex <= 3) { - const v1Part = parseInt(v1Match[versionPartIndex]); - const v2Part = parseInt(v2Match[versionPartIndex]); - - if (v1Part !== v2Part) { - return v1Part - v2Part; - } - - versionPartIndex++; - } - - return 0; -} - export function debug(...args: any[]) { if (DEBUG_LOGS_ENABLED) { console.debug(...args); diff --git a/esbuild.config.mjs b/esbuild.config.mjs index 22c9eb048..7e3373d84 100644 --- a/esbuild.config.mjs +++ b/esbuild.config.mjs @@ -13,19 +13,29 @@ if you want to view the source, please visit the github repository of this plugi const prod = (process.argv[2] === 'production'); +console.log('using .env') dotenv.config({path: '.env'}) +const mainEnvFile = prod ? '.env.prod' : '.env.dev' +console.log(`using ${mainEnvFile}`) dotenv.config({ - path: prod ? '.env.prod' : '.env.dev' + path: mainEnvFile }) if (prod && existsSync('.env.local.prod')) { + console.log('using .env.local.prod') dotenv.config({path: '.env.local.prod', override: true}) } -else if (existsSync('.env.local.dev')) { +else if (!prod && existsSync('.env.local.dev')) { + console.log('using .env.local.dev') dotenv.config({path: '.env.local.dev', override: true}) } +for (const key in process.env) { + if (key.startsWith('OBSIDIAN_APP')) { + console.log(key, '=', process.env[key]) + } +} const define = [ 'OBSIDIAN_APP_UPDATE_CHECKER_URL', @@ -37,6 +47,7 @@ const define = [ 'OBSIDIAN_APP_THIS_PLUGIN_ID', 'OBSIDIAN_APP_SHOW_STATUS_BAR_ICON_ALL_PLATFORMS', 'OBSIDIAN_APP_SHOW_RIBBON_ICON_ALL_PLATFORMS', + 'OBSIDIAN_APP_ACTION_BAR_LOCATION_MIDDLE', ].reduce((prev, current) => { prev[`process.env.${current}`] = JSON.stringify(process.env[current]) return prev diff --git a/jest.config.js b/jest.config.js index f397894e0..8147b2b25 100644 --- a/jest.config.js +++ b/jest.config.js @@ -1,6 +1,6 @@ module.exports = { testEnvironment: 'node', - roots: ['src/', 'backend/get-releases-lambda/'], + roots: ['src/', 'oput-common/', 'backend/get-releases-lambda/'], testMatch: ['**/*.test.ts', '**/*.test.js'], transform: { '^.+\\.tsx?$': 'ts-jest' diff --git a/manifest-beta.json b/manifest-beta.json index 061467325..c7f639465 100644 --- a/manifest-beta.json +++ b/manifest-beta.json @@ -1,7 +1,7 @@ { "id": "obsidian-plugin-update-tracker", "name": "Plugin Update Tracker", - "version": "1.4.5", + "version": "1.4.6", "minAppVersion": "0.15.0", "description": "Know when installed plugins have updates and evaluate the risk of upgrading", "author": "Obsidian", diff --git a/shared-types/index.d.ts b/oput-common/index.d.ts similarity index 100% rename from shared-types/index.d.ts rename to oput-common/index.d.ts diff --git a/src/domain/util/semverCompare.ts b/oput-common/semverCompare.ts similarity index 78% rename from src/domain/util/semverCompare.ts rename to oput-common/semverCompare.ts index aa34e2130..6c29ab655 100644 --- a/src/domain/util/semverCompare.ts +++ b/oput-common/semverCompare.ts @@ -1,4 +1,4 @@ -const FUZZY_SEMVER_PATTERN = /^(\d+)\.(\d+)\.(\d+).*/; +const FUZZY_SEMVER_PATTERN = /^(\d+)(?:\.(\d+))?(?:\.(\d+))?.*/; export function semverCompare(version1: string | null, version2: string | null): number { if (version1 == version2) { @@ -21,8 +21,8 @@ export function semverCompare(version1: string | null, version2: string | null): let versionPartIndex = 1; while (versionPartIndex <= 3) { - const v1Part = parseInt(v1Match[versionPartIndex]); - const v2Part = parseInt(v2Match[versionPartIndex]); + const v1Part = parseInt(v1Match[versionPartIndex] || '0'); + const v2Part = parseInt(v2Match[versionPartIndex] || '0'); if (v1Part !== v2Part) { return v1Part - v2Part; diff --git a/package.json b/package.json index 5ab6845b2..0b11f4385 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "obsidian-plugin-update-tracker", - "version": "1.4.5", + "version": "1.4.6", "description": "Know when installed plugins have updates and evaluate the risk of upgrading", "main": "main.js", "scripts": { diff --git a/src/components/DismissedPluginVersions.tsx b/src/components/DismissedPluginVersions.tsx index 3284ed4ac..5d9831808 100644 --- a/src/components/DismissedPluginVersions.tsx +++ b/src/components/DismissedPluginVersions.tsx @@ -3,9 +3,9 @@ import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; import { PluginManifest } from 'obsidian'; import * as React from 'react'; import styled from 'styled-components'; +import { semverCompare } from '../../oput-common/semverCompare'; import { PluginDismissedVersions, PluginSettings } from '../domain/pluginSettings'; import { groupById } from '../domain/util/groupById'; -import { semverCompare } from '../domain/util/semverCompare'; import { useAppDispatch, useAppSelector } from '../state'; import { unDismissPluginVersion } from '../state/actionProducers/undismissPluginVersion'; diff --git a/src/components/PluginUpdateList.stories.tsx b/src/components/PluginUpdateList.stories.tsx index 5a5979b50..df6d27735 100644 --- a/src/components/PluginUpdateList.stories.tsx +++ b/src/components/PluginUpdateList.stories.tsx @@ -72,6 +72,7 @@ export const MixOfPlugins: Story = () => { ); }; @@ -111,6 +112,7 @@ export const MarkdownParsingAndEnrichment: Story = () => { pluginWithNotes('Contains emoji', 'fix: 🐛'), ]} {...PLUGIN_UPDATE_LIST_BASE} + actionBarLocation="bottom" /> ); }; diff --git a/src/components/PluginUpdateList.tsx b/src/components/PluginUpdateList.tsx index a0e45cd41..6554ef098 100644 --- a/src/components/PluginUpdateList.tsx +++ b/src/components/PluginUpdateList.tsx @@ -35,12 +35,16 @@ interface PluginUpdateListProps { titleEl: HTMLElement | undefined; persistPluginSettings: (settings: PluginSettings) => Promise; closeObsidianTab: () => void; + actionBarLocation: ActionBarLocation; } +type ActionBarLocation = 'bottom' | 'middle'; + const PluginUpdateListConnected: React.FC = ({ titleEl, persistPluginSettings, closeObsidianTab, + actionBarLocation, }) => { const allPluginReleases: InstalledPluginReleases[] = usePluginReleaseFilter(); const isLoadingReleases = useAppSelector((state) => state.releases.isLoadingReleases); @@ -134,6 +138,7 @@ const PluginUpdateListConnected: React.FC = ({ selectedPluginCount={selectedPluginCount} selectedPluginIds={selectedPluginsById} isUpdatingDismissedVersions={isUpdatingDismissedVersions} + actionBarLocation={actionBarLocation} handleToggleSelection={handleToggleSelection} handleToggleSelectAll={handleToggleSelectAll} handleInstall={handleClickInstall} @@ -147,6 +152,7 @@ export const PluginUpdateList: React.FC<{ isInitiallyExpanded?: boolean; selectedPluginIds: string[]; selectedPluginCount: number; + actionBarLocation: ActionBarLocation; handleToggleSelection: (pluginId: string, selected: boolean) => any; handleToggleSelectAll: (selectAll: boolean) => void; handleInstall: () => Promise; @@ -157,6 +163,7 @@ export const PluginUpdateList: React.FC<{ isInitiallyExpanded, selectedPluginIds, selectedPluginCount, + actionBarLocation, handleToggleSelection, handleToggleSelectAll, handleInstall, @@ -256,12 +263,13 @@ export const PluginUpdateList: React.FC<{ {selectedPluginCount > 0 && ( - + )} @@ -574,9 +582,9 @@ const DivReleaeseName = styled.div` text-decoration: underline; `; -const ActionBarContainer = styled.div` +const ActionBarContainer = styled.div<{ isLocationBottom: boolean }>` position: fixed; - bottom: 0; + bottom: ${({ isLocationBottom }) => (isLocationBottom ? '0' : '50%')}; left: 50%; transform: translateX(-50%); diff --git a/src/components/PluginUpdateManager.tsx b/src/components/PluginUpdateManager.tsx index eaafa9417..ad5470a12 100644 --- a/src/components/PluginUpdateManager.tsx +++ b/src/components/PluginUpdateManager.tsx @@ -1,3 +1,4 @@ +import { Platform } from 'obsidian'; import * as React from 'react'; import { PluginSettings } from '../domain/pluginSettings'; import { useAppSelector } from '../state'; @@ -10,6 +11,9 @@ interface PluginUpdateManagerProps { closeObsidianTab: () => void; } +const ACTION_BAR_LOCATION_MIDDLE = + process.env['OBSIDIAN_APP_ACTION_BAR_LOCATION_MIDDLE'] === 'true'; + const PluginUpdateManager: React.FC = ({ titleEl, persistPluginSettings, @@ -19,6 +23,12 @@ const PluginUpdateManager: React.FC = ({ (state) => state.obsidian.isUpdatingPlugins || !state.obsidian.isUpdateResultAcknowledged ); + //Action bar is cut-off on iphone https://github.com/swar8080/obsidian-plugin-update-tracker/issues/49 + //@ts-ignore + const isPhone = Platform.isPhone; + const isIPhone = Platform.isIosApp && isPhone; + const actionBarLocation = isIPhone || ACTION_BAR_LOCATION_MIDDLE ? 'middle' : 'bottom'; + if (showUpdateProgressTracker) { return ; } else { @@ -27,6 +37,7 @@ const PluginUpdateManager: React.FC = ({ titleEl={titleEl} persistPluginSettings={persistPluginSettings} closeObsidianTab={closeObsidianTab} + actionBarLocation={actionBarLocation} /> ); } diff --git a/src/components/SelectedPluginActionBar.tsx b/src/components/SelectedPluginActionBar.tsx index 0f0d65cef..26b9d1195 100644 --- a/src/components/SelectedPluginActionBar.tsx +++ b/src/components/SelectedPluginActionBar.tsx @@ -11,6 +11,7 @@ interface SelectedPluginActionBarProps { isDisabled: boolean; onClickInstall: () => Promise; onClickDismissVersions: () => Promise; + hasBottomBorder: boolean; } const LOADING_ANIMATION_SEQUENCE_MS = 1200; @@ -38,6 +39,7 @@ const SelectedPluginActionBar: React.FC = ({ onClickInstall, onClickDismissVersions, isDisabled, + hasBottomBorder, }) => { const [loadingAnimationState, setLoadingAnimationState] = React.useState( { @@ -98,7 +100,7 @@ const SelectedPluginActionBar: React.FC = ({ const actionButtonPaddingBottomPx = statusBarHeight + 3; return ( - + {!loadingAnimationState.isInProgress && {headerText}} {loadingAnimationState.isInProgress && ( @@ -141,7 +143,9 @@ type LoadingAnimationState = { type AnimationIcons = 'loading' | 'success' | 'error'; -const DivSelectedPluginActionBarContainer = styled.div` +const CONTAINER_BORDER = '3px var(--background-modifier-border) solid'; + +const DivSelectedPluginActionBarContainer = styled.div<{ hasBottomBorder: boolean }>` display: flex; flex-direction: column; align-items: center; @@ -155,8 +159,8 @@ const DivSelectedPluginActionBarContainer = styled.div` background-color: var(--background-secondary); - border: 3px var(--background-modifier-border) solid; - border-bottom: none; + border: ${CONTAINER_BORDER}; + border-bottom: ${({ hasBottomBorder }) => (hasBottomBorder ? CONTAINER_BORDER : 'none')}; `; const DivHeaderContainer = styled.div` diff --git a/src/domain/InstalledPluginReleases.ts b/src/domain/InstalledPluginReleases.ts index cd9df7e8a..023b9f85d 100644 --- a/src/domain/InstalledPluginReleases.ts +++ b/src/domain/InstalledPluginReleases.ts @@ -4,7 +4,7 @@ import find from 'lodash/find'; import map from 'lodash/map'; import orderBy from 'lodash/orderBy'; import { PluginManifest } from 'obsidian'; -import { PluginFileAssetIds, PluginReleases, ReleaseVersion } from 'shared-types'; +import { PluginFileAssetIds, PluginReleases, ReleaseVersion } from 'oput-common'; export default class InstalledPluginReleases { private plugin: PluginManifest; private releases: PluginReleases | undefined; diff --git a/src/domain/api.ts b/src/domain/api.ts index 53e0191a4..d2bf39c6d 100644 --- a/src/domain/api.ts +++ b/src/domain/api.ts @@ -1,5 +1,5 @@ import { request, requestUrl } from 'obsidian'; -import { NewPluginVersionRequest, PluginReleases } from 'shared-types'; +import { NewPluginVersionRequest, PluginReleases } from 'oput-common'; type ReleaseApi = (request: NewPluginVersionRequest) => Promise; diff --git a/src/domain/pluginFilter.test.ts b/src/domain/pluginFilter.test.ts index 5b6fb65f5..76f12c31f 100644 --- a/src/domain/pluginFilter.test.ts +++ b/src/domain/pluginFilter.test.ts @@ -1,6 +1,6 @@ import dayjs from 'dayjs'; import { PluginManifest } from 'obsidian'; -import { PluginReleases, ReleaseVersion } from '../../shared-types'; +import { PluginReleases, ReleaseVersion } from '../../oput-common'; import InstalledPluginReleases from './InstalledPluginReleases'; import pluginFilter, { PluginFilters } from './pluginFilter'; import { DismissedPluginVersion, PluginSettings } from './pluginSettings'; diff --git a/src/domain/pluginFilter.ts b/src/domain/pluginFilter.ts index cac47a2da..b466bb234 100644 --- a/src/domain/pluginFilter.ts +++ b/src/domain/pluginFilter.ts @@ -2,9 +2,9 @@ import dayjs from 'dayjs'; import { PluginManifest, requireApiVersion } from 'obsidian'; import { PluginSettings } from './pluginSettings'; -import { PluginReleases } from 'shared-types'; +import { PluginReleases } from 'oput-common'; +import { semverCompare } from '../../oput-common/semverCompare'; import InstalledPluginReleases from './InstalledPluginReleases'; -import { semverCompare } from './util/semverCompare'; const HIDE_THIS_PLUGINS_UPDATES = process.env['OBSIDIAN_APP_HIDE_THIS_PLUGINS_UPDATES'] === 'true'; const THIS_PLUGIN_ID = process.env['OBSIDIAN_APP_THIS_PLUGIN_ID']; diff --git a/src/domain/util/semverCompare.test.ts b/src/domain/util/semverCompare.test.ts index 055030be3..a3d0469bd 100644 --- a/src/domain/util/semverCompare.test.ts +++ b/src/domain/util/semverCompare.test.ts @@ -1,4 +1,4 @@ -import { semverCompare } from './semverCompare'; +import { semverCompare } from '../../../oput-common/semverCompare'; describe('semverCompare', () => { type EXPECTED = 'greater' | 'equal' | 'less'; @@ -9,6 +9,8 @@ describe('semverCompare', () => { testCase('1.0.0', '1.0.00', 'equal'); testCase('01.0.0', '1.0.00', 'equal'); testCase('1.2.3', '1.2.3beta.4', 'equal'); + testCase('2.0.0', '2', 'equal'); + testCase('2.0.0', '2.0', 'equal'); testCase('2.0.0', '1.0.0', 'greater'); testCase('1.2.0', '1.1.0', 'greater'); @@ -17,6 +19,8 @@ describe('semverCompare', () => { testCase('1.2.4beta', '1.2.3', 'greater'); testCase('1.2.4beta.0', '1.2.3', 'greater'); testCase('1.2.4.beta.0', '1.2.3', 'greater'); + testCase('1.2.1', '1.2', 'greater'); + testCase('1.2', '1.1.9', 'greater'); testCase('1.0.0', '2.0.0', 'less'); testCase('1.1.0', '1.2.0', 'less'); @@ -25,6 +29,8 @@ describe('semverCompare', () => { testCase('1.2.3', '1.2.4beta', 'less'); testCase('1.2.3', '1.2.4beta.0', 'less'); testCase('1.2.3', '1.2.4.beta.0', 'less'); + testCase('1', '2.0.1', 'less'); + testCase('1.9', '1.9.1', 'less'); }); function testCase(v1: string | null, v2: string | null, expected: EXPECTED) { diff --git a/src/state/actionProducers/cleanupDismissedPluginVersions.ts b/src/state/actionProducers/cleanupDismissedPluginVersions.ts index fbce27e02..2aa993ec6 100644 --- a/src/state/actionProducers/cleanupDismissedPluginVersions.ts +++ b/src/state/actionProducers/cleanupDismissedPluginVersions.ts @@ -1,9 +1,9 @@ import { createAsyncThunk } from '@reduxjs/toolkit'; import { State } from '..'; +import { semverCompare } from '../../../oput-common/semverCompare'; import { PluginDismissedVersions, PluginSettings } from '../../domain/pluginSettings'; import { groupById } from '../../domain/util/groupById'; -import { semverCompare } from '../../domain/util/semverCompare'; type Paramters = { persistPluginSettings: (settings: PluginSettings) => Promise; diff --git a/src/state/actionProducers/fetchReleases.ts b/src/state/actionProducers/fetchReleases.ts index 894fc5ef8..9e1eb1914 100644 --- a/src/state/actionProducers/fetchReleases.ts +++ b/src/state/actionProducers/fetchReleases.ts @@ -1,5 +1,5 @@ import { createAsyncThunk } from '@reduxjs/toolkit'; -import { NewPluginVersionRequest } from 'shared-types'; +import { NewPluginVersionRequest } from 'oput-common'; import { State } from '..'; import { getReleases } from '../../domain/api'; import { ObsidianState } from '../obsidianReducer'; diff --git a/src/state/releasesReducer.ts b/src/state/releasesReducer.ts index 874eec32a..117000e20 100644 --- a/src/state/releasesReducer.ts +++ b/src/state/releasesReducer.ts @@ -1,5 +1,5 @@ import { createSlice } from '@reduxjs/toolkit'; -import { PluginReleases } from 'shared-types'; +import { PluginReleases } from 'oput-common'; import { cleanupDismissedPluginVersions } from './actionProducers/cleanupDismissedPluginVersions'; import { dismissSelectedPluginVersions } from './actionProducers/dismissPluginVersions'; import { fetchReleases } from './actionProducers/fetchReleases'; diff --git a/tsconfig.json b/tsconfig.json index 951946da2..2570b93e2 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -23,7 +23,8 @@ }, "include": [ "src/**/*.ts", - "src/**/*.tsx" + "src/**/*.tsx", + "oput-common/**/*.ts" ], "exclude": ["src/stories"] } diff --git a/versions.json b/versions.json index 583d44df4..c50ee53a9 100644 --- a/versions.json +++ b/versions.json @@ -13,5 +13,6 @@ "1.4.2": "0.15.0", "1.4.3": "0.15.0", "1.4.4": "0.15.0", - "1.4.5": "0.15.0" + "1.4.5": "0.15.0", + "1.4.6": "0.15.0" }