Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

♻️ (sync-server) align dependency versions; cleanup ling & typecheck #4605

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

MatissJanis
Copy link
Member

A few small changes here:

  1. aligning dependency versions in sync-server (i.e. only a single typescript version should be used in the project instead of two different, etc.)
  2. upgrading some linter dependencies + patching new issues
  3. removing lint & typecheck jobs from sync-server since we run those globally for all packages

@actual-github-bot actual-github-bot bot changed the title ♻️ (sync-server) align dependency versions; cleanup ling & typecheck [WIP] ♻️ (sync-server) align dependency versions; cleanup ling & typecheck Mar 11, 2025
Copy link

netlify bot commented Mar 11, 2025

Deploy Preview for actualbudget ready!

Name Link
🔨 Latest commit 5a4d954
🔍 Latest deploy log https://app.netlify.com/sites/actualbudget/deploys/67d081303291a100080e3c8f
😎 Deploy Preview https://deploy-preview-4605.demo.actualbudget.org
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link
Contributor

github-actions bot commented Mar 11, 2025

Bundle Stats — desktop-client

Hey there, this message comes from a GitHub action that helps you and reviewers to understand how these changes affect the size of this project's bundle.

As this PR is updated, I'll keep you updated on how the bundle size is impacted.

Total

Files count Total bundle size % Changed
18 8.44 MB → 8.45 MB (+11.75 kB) +0.14%
Changeset
File Δ Size
node_modules/side-channel-list/index.js 🆕 +3.28 kB 0 B → 3.28 kB
node_modules/side-channel-weakmap/index.js 🆕 +2.62 kB 0 B → 2.62 kB
node_modules/side-channel-map/index.js 🆕 +1.91 kB 0 B → 1.91 kB
node_modules/dunder-proto/get.js 🆕 +927 B 0 B → 927 B
node_modules/call-bound/index.js 🆕 +617 B 0 B → 617 B
node_modules/safe-regex-test/index.js 🆕 +563 B 0 B → 563 B
node_modules/call-bind-apply-helpers/index.js 🆕 +378 B 0 B → 378 B
node_modules/call-bind-apply-helpers/functionApply.js 🆕 +279 B 0 B → 279 B
node_modules/call-bind-apply-helpers/functionCall.js 🆕 +269 B 0 B → 269 B
node_modules/call-bind-apply-helpers/actualApply.js 🆕 +257 B 0 B → 257 B
node_modules/call-bind-apply-helpers/applyBind.js 🆕 +229 B 0 B → 229 B
node_modules/call-bind-apply-helpers/reflectApply.js 🆕 +120 B 0 B → 120 B
node_modules/gopd/gOPD.js 🆕 +77 B 0 B → 77 B
node_modules/math-intrinsics/floor.js 🆕 +56 B 0 B → 56 B
node_modules/es-object-atoms/index.js 🆕 +54 B 0 B → 54 B
node_modules/math-intrinsics/abs.js 🆕 +52 B 0 B → 52 B
node_modules/math-intrinsics/max.js 🆕 +52 B 0 B → 52 B
node_modules/math-intrinsics/min.js 🆕 +52 B 0 B → 52 B
node_modules/math-intrinsics/pow.js 🆕 +52 B 0 B → 52 B
node_modules/function-bind/index.js 📈 +189 B (+180.00%) 105 B → 294 B
node_modules/is-string/index.js 📈 +492 B (+93.71%) 525 B → 1017 B
node_modules/is-regex/index.js 📈 +801 B (+58.72%) 1.33 kB → 2.11 kB
node_modules/has-symbols/index.js 📈 +213 B (+53.92%) 395 B → 608 B
node_modules/is-symbol/index.js 📈 +262 B (+33.25%) 788 B → 1.03 kB
node_modules/is-date-object/index.js 📈 +148 B (+30.27%) 489 B → 637 B
node_modules/is-number-object/index.js 📈 +127 B (+23.69%) 536 B → 663 B
node_modules/is-bigint/index.js 📈 +107 B (+14.34%) 746 B → 853 B
node_modules/function-bind/implementation.js 📈 +269 B (+13.21%) 1.99 kB → 2.25 kB
node_modules/has-symbols/shams.js 📈 +161 B (+9.24%) 1.7 kB → 1.86 kB
node_modules/is-boolean-object/index.js 📈 +54 B (+8.26%) 654 B → 708 B
node_modules/hasown/index.js 📈 +9 B (+5.06%) 178 B → 187 B
node_modules/which-boxed-primitive/index.js 📈 +27 B (+4.22%) 640 B → 667 B
node_modules/get-intrinsic/index.js 📈 +351 B (+2.58%) 13.3 kB → 13.64 kB
node_modules/has-property-descriptors/index.js 📈 +8 B (+1.40%) 573 B → 581 B
node_modules/object-inspect/index.js 📈 +199 B (+1.04%) 18.67 kB → 18.86 kB
node_modules/internal-slot/index.js 📈 +4 B (+0.26%) 1.48 kB → 1.48 kB
node_modules/object-keys/index.js 📈 +2 B (+0.25%) 794 B → 796 B
node_modules/object-keys/implementation.js 📈 +8 B (+0.23%) 3.43 kB → 3.44 kB
node_modules/dnd-core/dist/utils/js_utils.js 📈 +2 B (+0.18%) 1.11 kB → 1.11 kB
node_modules/dnd-core/dist/reducers/index.js 📈 +2 B (+0.14%) 1.38 kB → 1.38 kB
locale/pt-BR.json 📈 +140 B (+0.12%) 110.03 kB → 110.17 kB
node_modules/es-get-iterator/index.js 📈 +7 B (+0.12%) 5.66 kB → 5.67 kB
node_modules/stylis/src/Utility.js 📈 +2 B (+0.10%) 1.92 kB → 1.92 kB
locale/en.json 📈 +43 B (+0.04%) 108.43 kB → 108.48 kB
node_modules/stylis/src/Parser.js 📈 +2 B (+0.04%) 5.34 kB → 5.34 kB
src/components/mobile/budget/BudgetTable.jsx 📈 +7 B (+0.02%) 41.13 kB → 41.14 kB
node_modules/regexp.prototype.flags/polyfill.js 📉 -3 B (-0.36%) 838 B → 835 B
node_modules/es-define-property/index.js 📉 -62 B (-17.71%) 350 B → 288 B
node_modules/gopd/index.js 📉 -60 B (-24.49%) 245 B → 185 B
node_modules/call-bind/index.js 📉 -402 B (-37.75%) 1.04 kB → 663 B
node_modules/side-channel/index.js 📉 -2.75 kB (-71.78%) 3.83 kB → 1.08 kB
node_modules/has-proto/index.js 🔥 -290 B (-100%) 290 B → 0 B
View detailed bundle breakdown

Added

No assets were added

Removed

No assets were removed

Bigger

Asset File Size % Changed
static/js/index.js 5.41 MB → 5.42 MB (+11.56 kB) +0.21%
static/js/pt-BR.js 110.03 kB → 110.17 kB (+140 B) +0.12%
static/js/en.js 108.43 kB → 108.48 kB (+43 B) +0.04%
static/js/narrow.js 372.02 kB → 372.03 kB (+7 B) +0.00%

Smaller

No assets were smaller

Unchanged

Asset File Size % Changed
static/js/en-GB.js 96.19 kB 0%
static/js/de.js 120.56 kB 0%
static/js/es.js 59.63 kB 0%
static/js/nl.js 102.82 kB 0%
static/js/resize-observer.js 18.37 kB 0%
static/js/workbox-window.prod.es5.js 5.69 kB 0%
static/js/fr.js 119.83 kB 0%
static/js/indexeddb-main-thread-worker-e59fee74.js 13.5 kB 0%
static/js/uk.js 110.45 kB 0%
static/js/BackgroundImage.js 122.29 kB 0%
static/js/useAccountPreviewTransactions.js 1.69 kB 0%
static/js/AppliedFilters.js 10.87 kB 0%
static/js/wide.js 103.31 kB 0%
static/js/ReportRouter.js 1.59 MB 0%

Copy link
Contributor

github-actions bot commented Mar 11, 2025

Bundle Stats — loot-core

Hey there, this message comes from a GitHub action that helps you and reviewers to understand how these changes affect the size of this project's bundle.

As this PR is updated, I'll keep you updated on how the bundle size is impacted.

Total

Files count Total bundle size % Changed
1 2.57 MB → 2.57 MB (+5.3 kB) +0.20%
Changeset
File Δ Size
node_modules/object-inspect/index.js 🆕 +18.77 kB 0 B → 18.77 kB
node_modules/side-channel-list/index.js 🆕 +3.31 kB 0 B → 3.31 kB
node_modules/side-channel-weakmap/index.js 🆕 +2.64 kB 0 B → 2.64 kB
node_modules/side-channel-map/index.js 🆕 +1.93 kB 0 B → 1.93 kB
node_modules/dunder-proto/get.js 🆕 +835 B 0 B → 835 B
node_modules/call-bound/index.js 🆕 +633 B 0 B → 633 B
node_modules/call-bind-apply-helpers/index.js 🆕 +411 B 0 B → 411 B
node_modules/safe-regex-test/index.js 🆕 +405 B 0 B → 405 B
node_modules/call-bind-apply-helpers/actualApply.js 🆕 +280 B 0 B → 280 B
node_modules/call-bind-apply-helpers/applyBind.js 🆕 +264 B 0 B → 264 B
node_modules/call-bind-apply-helpers/reflectApply.js 🆕 +132 B 0 B → 132 B
node_modules/call-bind-apply-helpers/functionApply.js 🆕 +99 B 0 B → 99 B
node_modules/call-bind-apply-helpers/functionCall.js 🆕 +97 B 0 B → 97 B
node_modules/gopd/gOPD.js 🆕 +97 B 0 B → 97 B
node_modules/math-intrinsics/floor.js 🆕 +75 B 0 B → 75 B
node_modules/math-intrinsics/abs.js 🆕 +73 B 0 B → 73 B
node_modules/math-intrinsics/max.js 🆕 +73 B 0 B → 73 B
node_modules/math-intrinsics/min.js 🆕 +73 B 0 B → 73 B
node_modules/math-intrinsics/pow.js 🆕 +73 B 0 B → 73 B
node_modules/es-object-atoms/index.js 🆕 +67 B 0 B → 67 B
node_modules/is-string/index.js 📈 +505 B (+90.18%) 560 B → 1.04 kB
node_modules/is-regex/index.js 📈 +816 B (+58.08%) 1.37 kB → 2.17 kB
node_modules/is-symbol/index.js 📈 +263 B (+34.29%) 767 B → 1.01 kB
node_modules/is-date-object/index.js 📈 +152 B (+29.12%) 522 B → 674 B
node_modules/is-number-object/index.js 📈 +140 B (+24.69%) 567 B → 707 B
node_modules/is-bigint/index.js 📈 +107 B (+14.52%) 737 B → 844 B
node_modules/has-symbols/shams.js 📈 +161 B (+9.14%) 1.72 kB → 1.88 kB
node_modules/is-boolean-object/index.js 📈 +45 B (+6.46%) 697 B → 742 B
node_modules/has-symbols/index.js 📈 +27 B (+6.43%) 420 B → 447 B
node_modules/get-intrinsic/index.js 📈 +532 B (+3.91%) 13.3 kB → 13.82 kB
node_modules/which-boxed-primitive/index.js 📈 +27 B (+3.91%) 691 B → 718 B
node_modules/regexp.prototype.flags/polyfill.js 📉 -3 B (-0.35%) 867 B → 864 B
node_modules/es-define-property/index.js 📉 -70 B (-19.55%) 358 B → 288 B
node_modules/gopd/index.js 📉 -57 B (-21.67%) 263 B → 206 B
node_modules/call-bind/index.js 📉 -394 B (-37.99%) 1.01 kB → 643 B
node_modules/side-channel/index.js 📉 -2.69 kB (-69.87%) 3.85 kB → 1.16 kB
node_modules/side-channel/node_modules/object-inspect/index.js 🔥 -18.55 kB (-100%) 18.55 kB → 0 B
node_modules/has-proto/index.js 🔥 -302 B (-100%) 302 B → 0 B
View detailed bundle breakdown

Added

No assets were added

Removed

No assets were removed

Bigger

Asset File Size % Changed
kcab.worker.js 2.57 MB → 2.57 MB (+5.3 kB) +0.20%

Smaller

No assets were smaller

Unchanged

No assets were unchanged

@MatissJanis MatissJanis changed the title [WIP] ♻️ (sync-server) align dependency versions; cleanup ling & typecheck ♻️ (sync-server) align dependency versions; cleanup ling & typecheck Mar 11, 2025
Copy link
Contributor

coderabbitai bot commented Mar 11, 2025

Walkthrough

The changes update multiple dependency versions across various package configurations and source files. Several package.json files (root, api, crdt, desktop-client, desktop-electron, sync-server, and loot-core) now reference newer versions of tools such as TypeScript, ESLint, Jest, and related type definitions. In the sync-server package, some script commands (e.g., lint, lint:fix, types, verify) have been removed while dependency versions have been bumped. Additionally, a new Jest environment dependency has been added to the loot-core package. In the desktop-client code, the getColumnWidth function now includes a default parameter value, and a text change in the CreateEncryptionKeyModal component improves formatting. Also, the return type of the process method in the peg-transform script was altered from a string to an object containing a code property.

Suggested reviewers

  • youngcw
  • MikesGlitch

📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 4b48f09 and 5a4d954.

⛔ Files ignored due to path filters (16)
  • upcoming-release-notes/4605.md is excluded by !**/*.md
  • yarn.lock is excluded by !**/yarn.lock, !**/*.lock
  • packages/api/__snapshots__/methods.test.ts.snap is excluded by !**/*.snap
  • packages/crdt/src/crdt/__snapshots__/merkle.test.ts.snap is excluded by !**/*.snap
  • packages/loot-core/src/server/__snapshots__/backups.test.ts.snap is excluded by !**/*.snap
  • packages/loot-core/src/server/__snapshots__/main.test.ts.snap is excluded by !**/*.snap
  • packages/loot-core/src/server/__snapshots__/sheet.test.ts.snap is excluded by !**/*.snap
  • packages/loot-core/src/server/accounts/__snapshots__/sync.test.ts.snap is excluded by !**/*.snap
  • packages/loot-core/src/server/db/__snapshots__/index.test.ts.snap is excluded by !**/*.snap
  • packages/loot-core/src/server/migrate/__snapshots__/migrations.test.ts.snap is excluded by !**/*.snap
  • packages/loot-core/src/server/sync/__snapshots__/sync.test.ts.snap is excluded by !**/*.snap
  • packages/loot-core/src/server/transactions/__snapshots__/transaction-rules.test.ts.snap is excluded by !**/*.snap
  • packages/loot-core/src/server/transactions/__snapshots__/transfer.test.ts.snap is excluded by !**/*.snap
  • packages/loot-core/src/server/transactions/import/__snapshots__/parse-file.test.ts.snap is excluded by !**/*.snap
  • packages/loot-core/src/shared/__snapshots__/months.test.ts.snap is excluded by !**/*.snap
  • yarn.lock is excluded by !**/yarn.lock, !**/*.lock
📒 Files selected for processing (11)
  • package.json (2 hunks)
  • packages/api/package.json (1 hunks)
  • packages/crdt/package.json (1 hunks)
  • packages/desktop-client/package.json (1 hunks)
  • packages/desktop-client/src/components/mobile/budget/BudgetTable.jsx (1 hunks)
  • packages/desktop-client/src/components/modals/CreateEncryptionKeyModal.tsx (1 hunks)
  • packages/desktop-electron/package.json (1 hunks)
  • packages/loot-core/package.json (3 hunks)
  • packages/sync-server/package.json (2 hunks)
  • packages/loot-core/peg-transform.mjs (1 hunks)
  • packages/loot-core/package.json (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (1)
  • GitHub Check: Build Docker image (alpine)
🔇 Additional comments (17)
packages/desktop-client/package.json (1)

27-27: Dependency version update looks good.

This update to the @types/uuid package from ^9.0.2 to ^9.0.8 aligns with the PR objective of syncing dependency versions across the project.

packages/desktop-electron/package.json (1)

101-101: TypeScript version update looks good.

Updating the TypeScript version from ^5.5.4 to ^5.8.2 aligns with the PR objective of ensuring a single TypeScript version is used throughout the project.

packages/desktop-client/src/components/modals/CreateEncryptionKeyModal.tsx (1)

98-99: Text formatting improvement looks good.

This is a minor text formatting change that improves readability by splitting the text across two lines.

packages/api/package.json (1)

34-38: Dependency version updates look good.

These updates align with the PR objective of syncing dependencies. Note that Jest is being updated from v27 to v29, which is a major version update, but since this is for testing only, the impact should be minimal.

packages/loot-core/peg-transform.mjs (1)

10-17:

❓ Verification inconclusive

Verify consumers of this API have been updated.

The return type of the process method has changed from returning a string directly to returning an object with a code property. This change in API might affect any code that consumes the return value.


🏁 Script executed:

#!/bin/bash
# Search for imports or requires of this transform module to verify all consumers have been updated

# Find all files that import or require this module
echo "Searching for files that import or require peg-transform.mjs..."
rg -l "import.*peg-transform" || rg -l "require.*peg-transform"

# Look for any usage of this module without accessing the .code property
echo "Checking for potential usages of the transform without accessing the .code property..."
rg "transform.*process" -A 5 -B 5

Length of output: 420


API Consumer Verification Required: Confirm Usage of the Updated process Return Object

The automated script did not return any output, so we couldn’t definitively identify any outdated consumers. However, since the return value of process now wraps the generated string within an object (i.e., { code: ... }), please manually verify that all consumers that import or invoke this transform correctly access the code property rather than expecting a direct string.

  • Ensure that all imports of packages/loot-core/peg-transform.mjs are updated to reference the code property from the returned object.
  • Double-check any unit or integration tests that might rely on the prior return format.
packages/desktop-client/src/components/mobile/budget/BudgetTable.jsx (1)

63-67: Good addition of default parameter value

Adding a default value of true to the show3Cols parameter makes the function more robust when called without this parameter explicitly provided. This is a good practice as it provides a sensible default and clarifies the expected behavior.

packages/loot-core/package.json (3)

50-53: Updated type definitions for Jest

The update from @types/jest version ^27.5.2 to ^29.5.14 aligns with the PR objective of standardizing dependency versions across packages.


63-63: Jest version upgrade

Upgrading Jest from ^27.5.1 to ^29.7.0 is a major version upgrade that aligns with the changes to @types/jest. This ensures type definitions match the actual implementation version.


77-77: TypeScript version standardization

Updating TypeScript to ^5.8.2 aligns with the PR's primary objective of ensuring a single version of TypeScript is used throughout the project.

packages/crdt/package.json (1)

25-29: Dev dependencies standardization

These updates to @types/jest, @types/uuid, jest, and typescript align with the changes made in other package.json files, fulfilling the PR's objective of standardizing dependency versions across the project.

package.json (2)

52-52: Updated ESLint-related dependencies

These updates to ESLint and related packages align with the PR objective of upgrading linter dependencies. The changes are minor version bumps that should maintain compatibility while providing the latest features and fixes.

Also applies to: 54-55, 59-60


68-71: Updated Prettier and TypeScript dependencies

These updates to Prettier and TypeScript dependencies complete the dependency standardization effort. The TypeScript version ^5.8.2 now matches across all packages in the project.

packages/sync-server/package.json (5)

41-41: Update uuid Dependency Version to ^9.0.1

The uuid package version has been bumped from ^9.0.0 to ^9.0.1. This patch update helps maintain consistency with other modules and ensures that any bug fixes or minor improvements in the dependency are utilized.


52-52: Update @types/jest Version to ^29.5.14

The development dependency for Jest type definitions has been updated to ^29.5.14. This helps align the types with the latest Jest features and improves overall type safety.


55-55: Update @types/uuid Version to ^9.0.8

The type definitions for uuid have been updated accordingly. This change ensures compatibility with the updated uuid package and maintains consistency across the codebase.


57-57: Update jest Dependency Version to ^29.7.0

The Jest testing framework has been updated to ^29.7.0. This update brings in the latest features, improvements, and bug fixes, contributing to a more robust testing setup.


60-60: Upgrade TypeScript to ^5.8.2

The TypeScript version has been significantly upgraded from ^4.9.5 to ^5.8.2. This is a major update that may introduce breaking changes or new compiler options. Please verify the TS configuration and ensure that the rest of the codebase is compatible with TS5.

✨ Finishing Touches
  • 📝 Generate Docstrings

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@@ -61,7 +61,7 @@ export const PILL_STYLE = {
};

export function getColumnWidth({
show3Cols,
show3Cols = true,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unless I'm missing something, doesn't this change the default behaviour from falsy to true?

MikesGlitch
MikesGlitch previously approved these changes Mar 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants