Skip to content

Commit

Permalink
fix(CustomLists): add check for previous version when user update to …
Browse files Browse the repository at this point in the history
…the latest version (#148)
  • Loading branch information
Debaerdm authored Feb 24, 2022
1 parent 0ee10da commit 74ce0e9
Show file tree
Hide file tree
Showing 26 changed files with 2,669 additions and 2,362 deletions.
4,764 changes: 2,525 additions & 2,239 deletions package-lock.json

Large diffs are not rendered by default.

76 changes: 38 additions & 38 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "skizzle",
"version": "2.1.4",
"version": "2.1.5",
"appId": "skizzle",
"description": "Visualisation des pull requests",
"main": "./public/build/electron/electron.js",
Expand Down Expand Up @@ -39,63 +39,63 @@
"resetmodules": "rm -rf node_modules/ && rm package-lock.json && npm i"
},
"devDependencies": {
"@babel/preset-env": "^7.16.7",
"@commitlint/cli": "^16.0.1",
"@commitlint/config-conventional": "^16.0.0",
"@babel/preset-env": "^7.16.11",
"@commitlint/cli": "^16.2.1",
"@commitlint/config-conventional": "^16.2.1",
"@crownframework/svelte-error-boundary": "^1.0.3",
"@rollup/plugin-commonjs": "^21.0.1",
"@rollup/plugin-node-resolve": "^13.1.2",
"@rollup/plugin-node-resolve": "^13.1.3",
"@rollup/plugin-typescript": "^8.3.0",
"@testing-library/jest-dom": "^5.16.1",
"@testing-library/jest-dom": "^5.16.2",
"@testing-library/svelte": "^3.0.3",
"@tsconfig/svelte": "^3.0.0",
"@types/jest": "^27.4.0",
"@types/marked": "^4.0.1",
"@types/node": "^17.0.8",
"@types/uuid": "^8.3.3",
"babel-jest": "^27.4.6",
"@types/jest": "^27.4.1",
"@types/marked": "^4.0.2",
"@types/node": "^17.0.20",
"@types/uuid": "^8.3.4",
"babel-jest": "^27.5.1",
"cross-env": "^7.0.3",
"electron": "^16.0.6",
"electron-builder": "^22.14.5",
"electron-builder-notarize": "^1.2.0",
"electron-reloader": "^1.2.1",
"eslint": "^8.6.0",
"eslint-plugin-svelte3": "^3.2.1",
"electron": "^17.0.1",
"electron-builder": "^22.14.13",
"electron-builder-notarize": "^1.4.0",
"electron-reloader": "^1.2.3",
"eslint": "^8.9.0",
"eslint-plugin-svelte3": "^3.4.0",
"husky": "^7.0.4",
"jest": "^27.4.7",
"jest-localstorage-mock": "^2.4.18",
"jest": "^27.5.1",
"jest-localstorage-mock": "^2.4.19",
"jest-transform-stub": "^2.0.0",
"msw": "^0.36.3",
"msw": "^0.38.1",
"npm-run-all": "^4.1.5",
"package-lock-sanitizer": "^1.0.1",
"prettier": "^2.5.1",
"prettier-plugin-svelte": "^2.5.1",
"rollup": "^2.63.0",
"prettier-plugin-svelte": "^2.6.0",
"rollup": "^2.68.0",
"rollup-plugin-css-only": "^3.1.0",
"rollup-plugin-filesize": "^9.1.1",
"rollup-plugin-filesize": "^9.1.2",
"rollup-plugin-livereload": "^2.0.5",
"rollup-plugin-node-polyfills": "^0.2.1",
"rollup-plugin-svelte": "^7.1.0",
"rollup-plugin-svelte-svg": "^0.2.3",
"rollup-plugin-terser": "^7.0.2",
"sass": "^1.45.2",
"spectron": "^15.0.0",
"svelte": "^3.44.3",
"svelte-check": "^2.2.11",
"svelte-highlight": "^5.1.4",
"svelte-jester": "^2.1.5",
"svelte-preprocess": "^4.10.1",
"ts-jest": "^27.1.2",
"sass": "^1.49.8",
"spectron": "^19.0.0",
"svelte": "^3.46.4",
"svelte-check": "^2.4.5",
"svelte-highlight": "^5.2.1",
"svelte-jester": "^2.3.2",
"svelte-preprocess": "^4.10.3",
"ts-jest": "^27.1.3",
"tslib": "^2.3.1",
"typescript": "^4.5.4"
"typescript": "^4.5.5"
},
"dependencies": {
"auto-changelog": "^2.3.0",
"electron-log": "^4.4.4",
"electron-updater": "4.6.1",
"ky": "^0.28.7",
"marked": "^4.0.8",
"sirv-cli": "^2.0.1",
"auto-changelog": "^2.4.0",
"electron-log": "^4.4.6",
"electron-updater": "4.6.5",
"ky": "^0.29.0",
"marked": "^4.0.12",
"sirv-cli": "^2.0.2",
"uuid": "^8.3.2"
},
"auto-changelog": {
Expand Down
6 changes: 1 addition & 5 deletions src/components/Accounts/Accounts.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,7 @@
};
</script>

<Tabs
current={provider}
data={tabs}
on:change={onTabChange}
/>
<Tabs current={provider} data={tabs} on:change={onTabChange} />
<div class="content">
<ProviderAccount {provider} />
</div>
Expand Down
4 changes: 3 additions & 1 deletion src/components/Avatar/Avatar.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@
<svelte:component this={Icons.User} color={$settings.theme} />
</div>
{:then avatar}
<div class="avatar"><img width="60" height="60" loading="lazy" src={avatar} alt={pullRequest.user.name} /></div>
<div class="avatar">
<img width="60" height="60" loading="lazy" src={avatar} alt={pullRequest.user.name} />
</div>
{#if pullRequest.provider}
<div class="badge">
<svelte:component this={Icons[pullRequest.provider]} />
Expand Down
69 changes: 38 additions & 31 deletions src/components/Button/Button.svelte
Original file line number Diff line number Diff line change
@@ -1,31 +1,38 @@
<script lang="ts">
import { createEventDispatcher } from 'svelte';
import { createEventDispatcher } from 'svelte';
let className = '';
let className = '';
export { className as class };
export let danger:boolean = false;
export let clear:boolean = false;
export let disabled:boolean = false;
export let light:boolean = false;
export let type:string = '';
const dispatch = createEventDispatcher();
const onClick = (event) => {
if(type !== "submit") {
event.preventDefault();
}
dispatch('click');
}
export let danger: boolean = false;
export let clear: boolean = false;
export let disabled: boolean = false;
export let light: boolean = false;
export let type: string = '';
const dispatch = createEventDispatcher();
const onClick = event => {
if (type !== 'submit') {
event.preventDefault();
}
dispatch('click');
};
</script>


<button {type} class={className} class:danger class:clear class:light on:click={onClick} {disabled}>
<slot/>
<button
{type}
class={className}
class:danger
class:clear
class:light
on:click={onClick}
{disabled}
>
<slot />
</button>

<style>
button {
display: flex;
button {
display: flex;
align-items: center;
padding: 0.5rem 1rem;
color: #fff;
Expand All @@ -34,17 +41,17 @@
border: none;
background-color: var(--color);
transition: opacity linear 0.2s;
}
}
.danger {
background-color: red;
}
.danger {
background-color: red;
}
.clear {
background-color: #333;
}
.clear {
background-color: #333;
}
.light {
background-color: transparent;
}
</style>
.light {
background-color: transparent;
}
</style>
4 changes: 2 additions & 2 deletions src/components/Checkbox/Checkbox.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
.checkbox {
display: flex;
}
label {
position: relative;
display: inline-flex;
Expand Down Expand Up @@ -62,4 +62,4 @@
input:focus + label:before {
box-shadow: 0 0 0 2px var(--color);
}
</style>
</style>
2 changes: 1 addition & 1 deletion src/components/Confirmation/index.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export { default } from './Confirmation.svelte';
export { default } from './Confirmation.svelte';
9 changes: 7 additions & 2 deletions src/components/ErrorBoundary/ErrorBoundary.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,14 @@
<div class="main">
<h1>Congratulations, you just found a bug on Skizzle 🎉</h1>
<p>
Well done, this one is pretty rare because Skizzle development team is not aware of it yet. Now you can
Well done, this one is pretty rare because Skizzle development team is not aware of it
yet. Now you can
{#if $isElectron}
<button class="link" on:click={() => remote.openDefaultBrowser('https://github.com/AxaGuilDEv/Skizzle/issues/new')}>
<button
class="link"
on:click={() =>
remote.openDefaultBrowser('https://github.com/AxaGuilDEv/Skizzle/issues/new')}
>
create a Github issue
</button>.
{:else}
Expand Down
2 changes: 1 addition & 1 deletion src/components/MultiSelector/index.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export { default } from './MultiSelector.svelte';
export { default } from './MultiSelector.svelte';
2 changes: 1 addition & 1 deletion src/mappers/Comment.mapper.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { AzureDevOpsCommentType, GithubCommentApiType } from 'models/api';
import type { CommentType } from 'models/skizzle';
import { getDateStr } from 'shared/utils';
import { From, Mapper } from './Mapper';
import { type From, Mapper } from './Mapper';

export type CommentMapperType = From<AzureDevOpsCommentType, GithubCommentApiType>;

Expand Down
2 changes: 1 addition & 1 deletion src/mappers/Organization.mapper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import type {
GithubOrganizationApiType
} from 'models/api';
import type { OrganizationType } from 'models/skizzle';
import { From, Mapper } from './Mapper';
import { type From, Mapper } from './Mapper';

export type OrganizationMapperType = From<
AzureDevOpsOrganizationApiType,
Expand Down
2 changes: 1 addition & 1 deletion src/mappers/Profile.mapper.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { AzureDevOpsProfileApiType, GithubProfileApiType } from 'models/api';
import type { ProfileType } from 'models/skizzle';
import { From, Mapper } from './Mapper';
import { type From, Mapper } from './Mapper';

export type ProfileMapperType = From<AzureDevOpsProfileApiType, GithubProfileApiType>;

Expand Down
8 changes: 4 additions & 4 deletions src/mappers/PullRequest.mapper.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import { CommentMapper } from './Comment.mapper';
import { ReviewMapper, ReviewMapperType } from './Review.mapper';
import { ReviewMapper, type ReviewMapperType } from './Review.mapper';
import {
AzureDevOpsPullRequestApiType,
type AzureDevOpsPullRequestApiType,
AzureDevOpsVoteEnum,
GithubPullRequestApiType,
type GithubPullRequestApiType,
GithubVoteEnum
} from 'models/api';
import type { PullRequestType } from 'models/skizzle';
import { From, Mapper } from './Mapper';
import { type From, Mapper } from './Mapper';
import { get } from 'svelte/store';
import { profiles } from 'shared/stores/default.store';

Expand Down
2 changes: 1 addition & 1 deletion src/mappers/Repository.mapper.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { AzureDevOpsRepositoryApiType, GithubRepositoryApiType } from 'models/api';
import type { RepositoryType } from 'models/skizzle';
import { From, Mapper } from './Mapper';
import { type From, Mapper } from './Mapper';

export type RepositoryMapperType = From<
AzureDevOpsRepositoryApiType,
Expand Down
6 changes: 3 additions & 3 deletions src/mappers/Review.mapper.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import {
AzureDevOpsReviewApiType,
type AzureDevOpsReviewApiType,
AzureDevOpsVoteEnum,
GithubReviewApiType,
type GithubReviewApiType,
GithubVoteEnum
} from 'models/api';
import type { ReviewType } from 'models/skizzle';
import { From, Mapper } from './Mapper';
import { type From, Mapper } from './Mapper';

export type ReviewMapperType = From<AzureDevOpsReviewApiType, GithubReviewApiType>;

Expand Down
10 changes: 5 additions & 5 deletions src/mappers/index.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { CommentMapper, CommentMapperType } from './Comment.mapper';
import { OrganizationMapper, OrganizationMapperType } from './Organization.mapper';
import { ProfileMapper, ProfileMapperType } from './Profile.mapper';
import { PullRequestMapper, PullRequestMapperType } from './PullRequest.mapper';
import { RepositoryMapper, RepositoryMapperType } from './Repository.mapper';
import { CommentMapper, type CommentMapperType } from './Comment.mapper';
import { OrganizationMapper, type OrganizationMapperType } from './Organization.mapper';
import { ProfileMapper, type ProfileMapperType } from './Profile.mapper';
import { PullRequestMapper, type PullRequestMapperType } from './PullRequest.mapper';
import { RepositoryMapper, type RepositoryMapperType } from './Repository.mapper';
import { ReviewMapper } from './Review.mapper';
import { Mapper } from './Mapper';

Expand Down
1 change: 1 addition & 0 deletions src/models/skizzle/CustomListType.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ export type CustomListType = {
id: string;
name: string;
tags: string[];
repositoryId?: string;
repositoriesId?: string[];
provider?: string;
hiddenPullRequestsIds?: string[];
Expand Down
2 changes: 1 addition & 1 deletion src/providers/OAuthAzureDevOpsConfig.provider.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { OAuthConfig, OAuthConfigType } from './OAuthConfig.provider';
import { OAuthConfig, type OAuthConfigType } from './OAuthConfig.provider';
import { ProviderEnum } from 'models/skizzle';

export type OAuthAzureDevOpsConfigType = {
Expand Down
2 changes: 1 addition & 1 deletion src/providers/OAuthGithubConfig.provider.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { OAuthConfig, OAuthConfigType } from './OAuthConfig.provider';
import { OAuthConfig, type OAuthConfigType } from './OAuthConfig.provider';
import { ProviderEnum } from 'models/skizzle';

export type OAuthGithubConfigType = {
Expand Down
9 changes: 6 additions & 3 deletions src/providers/index.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
import {
OAuthAzureDevOpsConfig,
OAuthAzureDevOpsConfigType
type OAuthAzureDevOpsConfigType
} from './OAuthAzureDevOpsConfig.provider';
import { OAuthGithubConfig, OAuthGithubConfigType } from './OAuthGithubConfig.provider';
import { OAuthConfig, OAuthConfigType } from './OAuthConfig.provider';
import {
OAuthGithubConfig,
type OAuthGithubConfigType
} from './OAuthGithubConfig.provider';
import { OAuthConfig, type OAuthConfigType } from './OAuthConfig.provider';

export { OAuthAzureDevOpsConfig, OAuthGithubConfig, OAuthConfig };

Expand Down
3 changes: 1 addition & 2 deletions src/services/Service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import type {
} from 'models/skizzle';
import { ProviderEnum } from 'models/skizzle';
import { isFetchingData, profiles } from 'shared/stores/default.store';
import type { Dictionary } from 'shared/utils';
import { OAuthAzureDevOpsService } from './OAuthAzureDevOps.service';
import { OAuthGithubService } from './OAuthGithub.service';

Expand All @@ -27,7 +26,7 @@ export interface IService {
}

export class Service {
private static readonly INSTANCES: Dictionary<IService> = {
private static readonly INSTANCES: Record<ProviderEnum, IService> = {
[ProviderEnum.AzureDevOps]: OAuthAzureDevOpsService.getInstance(),
[ProviderEnum.Github]: OAuthGithubService.getInstance()
};
Expand Down
Loading

0 comments on commit 74ce0e9

Please sign in to comment.