Skip to content

Commit

Permalink
Merge branch 'master' into feature/distribute-splits
Browse files Browse the repository at this point in the history
  • Loading branch information
NikxDa authored Jan 13, 2024
2 parents e83d5fe + dccad90 commit 84e8422
Show file tree
Hide file tree
Showing 1,027 changed files with 1,906 additions and 310,497 deletions.
4 changes: 0 additions & 4 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,3 @@ packages/import-ynab5/**/node_modules/*
packages/loot-core/**/node_modules/*
packages/loot-core/**/lib-dist/*
packages/loot-core/**/proto/*

packages/node-libofx/libofx.*.js
packages/node-libofx/libofx/
packages/node-libofx/OpenSP-*/
3 changes: 3 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@ module.exports = {
parser: '@typescript-eslint/parser',
parserOptions: { project: [path.join(__dirname, './tsconfig.json')] },
reportUnusedDisableDirectives: true,
globals: {
globalThis: false,
},
rules: {
'prettier/prettier': 'warn',

Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/size-compare.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,11 @@ jobs:
run: |
sed -i -E 's/\.[0-9a-f]{8,}\././g' ./head/*.json
sed -i -E 's/\.[0-9a-f]{8,}\././g' ./base/*.json
- uses: github/webpack-bundlesize-compare-action@v1.8.2
- uses: twk3/rollup-size-compare-action@v1.0.0
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
current-stats-json-path: ./head/desktop-client-stats.json
base-stats-json-path: ./base/desktop-client-stats.json
current-stats-json-path: ./head/web-stats.json
base-stats-json-path: ./base/web-stats.json
title: desktop-client

- uses: github/[email protected]
Expand Down
2 changes: 1 addition & 1 deletion packages/crdt/src/crdt/merkle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ export function diff(trie1: TrieNode, trie2: TrieNode): number | null {
const keys = [...keyset.values()];
keys.sort();

let diffkey = null;
let diffkey: null | '0' | '1' | '2' = null;

// Traverse down the trie through keys that aren't the same. We
// traverse down the keys in order. Stop in two cases: either one
Expand Down
2 changes: 2 additions & 0 deletions packages/desktop-client/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,13 @@ test-results
# production
build
build-stats
stats.json

# misc
.DS_Store
.env
npm-debug.log
.swc

*kcab.*
public/kcab
Expand Down
3 changes: 1 addition & 2 deletions packages/desktop-client/bin/build-browser
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,11 @@ echo "Building the browser..."
rm -fr build

export IS_GENERIC_BROWSER=1
export INLINE_RUNTIME_CHUNK=false
export REACT_APP_BACKEND_WORKER_HASH=`ls "$ROOT"/../public/kcab/kcab.worker.*.js | sed 's/.*kcab\.worker\.\(.*\)\.js/\1/'`

yarn build

rm -fr build-stats
mkdir build-stats
mv build/kcab/stats.json build-stats/loot-core-stats.json
mv build/stats.json build-stats/desktop-client-stats.json
mv ./stats.json build-stats/web-stats.json
116 changes: 0 additions & 116 deletions packages/desktop-client/craco.config.ts

This file was deleted.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -8,25 +8,25 @@
/>
<title>Actual</title>
<link rel="canonical" href="/" />
<link rel="shortcut icon" href="%PUBLIC_URL%/favicon.ico" />
<link rel="shortcut icon" href="/favicon.ico" />
<link
rel="apple-touch-icon"
sizes="180x180"
href="%PUBLIC_URL%/apple-touch-icon.png"
href="/apple-touch-icon.png"
/>
<link
rel="icon"
type="image/png"
sizes="32x32"
href="%PUBLIC_URL%/favicon-32x32.png"
href="/favicon-32x32.png"
/>
<link
rel="icon"
type="image/png"
sizes="16x16"
href="%PUBLIC_URL%/favicon-16x16.png"
href="/favicon-16x16.png"
/>
<link rel="manifest" href="%PUBLIC_URL%/site.webmanifest" crossorigin="use-credentials"/>
<link rel="manifest" href="/site.webmanifest" crossorigin="use-credentials"/>
<meta name="msapplication-TileColor" content="#da532c" />
<meta name="theme-color" content="#ffffff" />

Expand Down Expand Up @@ -102,5 +102,6 @@
</head>
<body>
<div id="root"></div>
<script type="module" src="/src/index.tsx"></script>
</body>
</html>
19 changes: 12 additions & 7 deletions packages/desktop-client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@
"build"
],
"devDependencies": {
"@craco/craco": "^7.1.0",
"@craco/types": "^7.1.0",
"@juggle/resize-observer": "^3.1.2",
"@playwright/test": "^1.37.1",
"@reach/listbox": "^0.18.0",
Expand All @@ -16,9 +14,11 @@
"@react-aria/utils": "^3.19.0",
"@react-stately/collections": "^3.10.0",
"@react-stately/list": "^3.9.1",
"@rollup/plugin-inject": "^5.0.5",
"@svgr/cli": "^8.0.1",
"@swc/core": "^1.3.82",
"@swc/helpers": "^0.5.1",
"@swc/plugin-remove-console": "^1.5.105",
"@testing-library/react": "14.0.0",
"@testing-library/user-event": "14.4.3",
"@types/react": "^18.2.0",
Expand All @@ -28,6 +28,8 @@
"@types/uuid": "^9.0.2",
"@types/webpack-bundle-analyzer": "^4.6.0",
"@use-gesture/react": "^10.3.0",
"@vitejs/plugin-basic-ssl": "^1.0.2",
"@vitejs/plugin-react-swc": "^3.5.0",
"chokidar": "^3.5.3",
"cross-env": "^7.0.3",
"date-fns": "^2.29.3",
Expand All @@ -41,7 +43,7 @@
"jest-watch-typeahead": "^2.2.2",
"mdast-util-newline-to-break": "^2.0.0",
"memoize-one": "^6.0.0",
"pikaday": "1.8.0",
"pikaday": "1.8.2",
"react": "18.2.0",
"react-dnd": "^16.0.1",
"react-dnd-html5-backend": "^16.0.1",
Expand All @@ -52,30 +54,33 @@
"react-modal": "3.16.1",
"react-redux": "7.2.1",
"react-router-dom": "6.11.2",
"react-scripts": "^5.0.1",
"react-simple-pull-to-refresh": "^1.3.3",
"react-spring": "^9.7.1",
"react-virtualized-auto-sizer": "^1.0.2",
"recharts": "^2.8.0",
"redux": "^4.0.5",
"redux-thunk": "^2.3.0",
"remark-gfm": "^3.0.1",
"rollup-plugin-visualizer": "^5.11.0",
"sass": "^1.63.6",
"swc-loader": "^0.2.3",
"terser-webpack-plugin": "^5.3.9",
"uuid": "^9.0.0",
"victory": "^36.6.8",
"vite": "^5.0.10",
"vite-tsconfig-paths": "^4.2.2",
"vitest": "^1.0.4",
"webpack-bundle-analyzer": "^4.9.1",
"xml2js": "^0.6.2"
},
"scripts": {
"start": "cross-env PORT=3001 craco start",
"start": "cross-env PORT=3001 vite",
"start:browser": "cross-env ./bin/watch-browser",
"watch": "cross-env BROWSER=none yarn start",
"build": "cross-env INLINE_RUNTIME_CHUNK=false craco build",
"build": "vite build",
"build:browser": "cross-env ./bin/build-browser",
"generate:icons": "rm src/icons/*/*.tsx; cd src/icons && svgr --template template.ts --index-template index-template.ts --typescript --expand-props start -d . .",
"test": "craco test",
"test": "vitest",
"e2e": "npx playwright test --browser=chromium",
"vrt": "cross-env VRT=true npx playwright test --browser=chromium"
}
Expand Down
14 changes: 14 additions & 0 deletions packages/desktop-client/src/build-shims.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
const global = globalThis || this || self;

const process = {
env: {
...import.meta.env,
NODE_ENV: import.meta.env.MODE,
PUBLIC_URL: import.meta.env.BASE_URL.slice(0, -1),
},
};

// eslint-disable-next-line import/no-unused-modules
export { process };
// eslint-disable-next-line import/no-unused-modules
export { global };
Original file line number Diff line number Diff line change
Expand Up @@ -743,20 +743,13 @@ export function ImportTransactions({ modalProps, options }) {

const [clearOnImport, setClearOnImport] = useState(true);

const enableExperimentalOfxParser = useFeatureFlag('experimentalOfxParser');

async function parse(filename, options) {
setLoadingState('parsing');

const filetype = getFileType(filename);
setFilename(filename);
setFileType(filetype);

options = {
...options,
enableExperimentalOfxParser,
};

const { errors, transactions } = await parseTransactions(filename, options);
setLoadingState(null);
setError(null);
Expand Down
13 changes: 12 additions & 1 deletion packages/desktop-client/src/components/reports/ChooseGraph.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ type ChooseGraphProps = {
scrollWidth: number;
setScrollWidth: (value: number) => void;
months: Month[];
viewLabels: boolean;
};

export function ChooseGraph({
Expand All @@ -37,6 +38,7 @@ export function ChooseGraph({
scrollWidth,
setScrollWidth,
months,
viewLabels,
}: ChooseGraphProps) {
const balanceTypeOp = ReportOptions.balanceTypeMap.get(balanceType);

Expand Down Expand Up @@ -69,6 +71,7 @@ export function ChooseGraph({
style={{ flexGrow: 1 }}
data={data}
balanceTypeOp={balanceTypeOp}
viewLabels={viewLabels}
/>
);
}
Expand All @@ -79,6 +82,7 @@ export function ChooseGraph({
data={data}
groupBy={groupBy}
balanceTypeOp={balanceTypeOp}
viewLabels={viewLabels}
/>
);
}
Expand All @@ -92,14 +96,21 @@ export function ChooseGraph({
data={data}
groupBy={groupBy}
balanceTypeOp={balanceTypeOp}
viewLabels={viewLabels}
/>
);
}
if (graphType === 'LineGraph') {
return <LineGraph style={{ flexGrow: 1 }} graphData={data} />;
}
if (graphType === 'StackedBarGraph') {
return <StackedBarGraph style={{ flexGrow: 1 }} data={data} />;
return (
<StackedBarGraph
style={{ flexGrow: 1 }}
data={data}
viewLabels={viewLabels}
/>
);
}
if (graphType === 'TableGraph') {
return (
Expand Down
Loading

0 comments on commit 84e8422

Please sign in to comment.