mirror of
https://github.com/actualbudget/actual.git
synced 2026-03-09 03:32:54 -05:00
* [AI] Enable TypeScript composite project references across monorepo - Add composite and declaration emit to all package tsconfigs - Wire root and per-package project references in dependency order - Replace cross-package include-based typing with referenced outputs - Fix api TS5055 by emitting declarations to decl-output - Add desktop-client alias for tests; fix oxlint import order in vite.config - Add UsersState.data null type and openDatabase return type for strict emit Co-authored-by: Cursor <cursoragent@cursor.com> * Remove obsolete TypeScript configuration for API and update build script to emit declarations directly to the output directory. This streamlines the build process and ensures compatibility with the new project structure. * Refactor TypeScript configuration in API package to remove obsolete decl-output directory and update build scripts. The changes streamline the build process by directing declaration outputs to the @types directory, ensuring better organization and compatibility with the new project structure. * Add TypeScript declaration emission for loot-core in desktop-electron build process * Refactor TypeScript configuration in API package to utilize composite references and streamline build scripts. Update include and exclude patterns for improved file management, ensuring better organization of declaration outputs and migration SQL files. * Refactor TypeScript configuration in loot-core and desktop-client packages to streamline path management and remove obsolete dependencies. Update paths in tsconfig.json files for better organization and compatibility, and adjust yarn.lock to reflect changes in workspace dependencies. * Update desktop-electron package to utilize loot-core as a workspace dependency. Adjust TypeScript import paths and tsconfig references for improved organization and compatibility across packages. * Enhance Vite configuration for desktop-client to support Electron-specific conditions and update loot-core package.json to include Electron as a platform for client connection. This improves compatibility for Electron builds. * Refactor TypeScript configuration across multiple packages to streamline path management. Update tsconfig.json files in root, api, and loot-core packages to improve import paths and maintain compatibility with internal typings. * Update package dependencies and Vite configuration across component-library and desktop-client. Add vite-tsconfig-paths to component-library and remove it from desktop-client. Refactor Storybook preview file to include a TODO for future refactoring. * Remove Node-specific path from loot-core package.json for client connection, streamlining platform configuration for Electron. * Remove loot-core as a workspace dependency from desktop-electron package.json * Update tsconfig.json to remove reference to desktop-client --------- Co-authored-by: Cursor <cursoragent@cursor.com>
85 lines
1.8 KiB
Bash
Executable File
85 lines
1.8 KiB
Bash
Executable File
#!/bin/bash -e
|
|
|
|
|
|
ROOT=`dirname $0`
|
|
RELEASE=""
|
|
CI=${CI:-false}
|
|
|
|
cd "$ROOT/.."
|
|
POSITIONAL=()
|
|
SKIP_EXE_BUILD=false
|
|
SKIP_TRANSLATIONS=false
|
|
while [[ $# -gt 0 ]]; do
|
|
key="$1"
|
|
|
|
case $key in
|
|
--release)
|
|
RELEASE="production"
|
|
shift
|
|
;;
|
|
--skip-exe-build)
|
|
SKIP_EXE_BUILD=true
|
|
shift
|
|
;;
|
|
--skip-translations)
|
|
SKIP_TRANSLATIONS=true
|
|
shift
|
|
;;
|
|
*)
|
|
POSITIONAL+=("$1")
|
|
shift
|
|
;;
|
|
esac
|
|
done
|
|
|
|
set -- "${POSITIONAL[@]}"
|
|
|
|
if [ $SKIP_TRANSLATIONS == false ]; then
|
|
# Get translations
|
|
echo "Updating translations..."
|
|
if ! [ -d packages/desktop-client/locale ]; then
|
|
git clone https://github.com/actualbudget/translations packages/desktop-client/locale
|
|
fi
|
|
|
|
pushd packages/desktop-client/locale > /dev/null
|
|
|
|
git pull
|
|
popd > /dev/null
|
|
packages/desktop-client/bin/remove-untranslated-languages
|
|
fi
|
|
|
|
export NODE_OPTIONS="--max-old-space-size=4096"
|
|
|
|
yarn workspace plugins-service build
|
|
yarn workspace loot-core build:node
|
|
yarn workspace @actual-app/web build --mode=desktop # electron specific build
|
|
|
|
# required for running the sync-server server
|
|
yarn workspace loot-core build:browser
|
|
yarn workspace @actual-app/web build:browser
|
|
yarn workspace @actual-app/sync-server build
|
|
|
|
# Emit loot-core declarations so desktop-electron (which includes typings/window.ts) can build
|
|
yarn workspace loot-core exec tsc -p tsconfig.json
|
|
|
|
yarn workspace desktop-electron update-client
|
|
|
|
(
|
|
cd packages/desktop-electron;
|
|
yarn clean;
|
|
|
|
if [ $SKIP_EXE_BUILD == true ]; then
|
|
echo "Building the dist"
|
|
yarn build:dist
|
|
echo "Skipping exe build"
|
|
else
|
|
if [ "$RELEASE" == "production" ]; then
|
|
yarn build
|
|
|
|
echo "Created release"
|
|
else
|
|
yarn build
|
|
fi
|
|
fi
|
|
)
|