diff --git a/.github/workflows/build_release.yml b/.github/workflows/build_release.yml index 83c2368e5d..b24a9bbd47 100644 --- a/.github/workflows/build_release.yml +++ b/.github/workflows/build_release.yml @@ -1,16 +1,28 @@ -name: Build, deploy and release +name: build_release on: + workflow_call: # for beta releases from main - release.yml / dispatch_beta_release + inputs: + is_main_build: + type: boolean + required: true + app_build: + type: string + required: true push: tags: - "[0-9]+.[0-9]+.[0-9]+" - - "test-[0-9]+.[0-9]+.[0-9]+" + +env: + APP_GIT_REF: ${{ inputs.is_main_build && github.sha || github.ref_name }} + APP_BUILD: ${{ inputs.app_build }} + +concurrency: + group: release jobs: build_web: runs-on: ubuntu-latest - concurrency: - group: "build_web" steps: - uses: actions/checkout@v4 @@ -27,7 +39,7 @@ jobs: run: pnpm build - name: Upload dist bundle to S3 - if: github.ref_name != 'test*' + if: inputs.is_main_build != true uses: jakejarvis/s3-sync-action@v0.5.1 with: args: --acl public-read --follow-symlinks --delete @@ -39,23 +51,26 @@ jobs: - name: Compress artifacts run: | - zip -r Voyager-Web-${{ github.ref_name }}.zip dist + zip -r Voyager-Web-$APP_GIT_REF.zip dist - name: Upload artifacts uses: actions/upload-artifact@v4 with: - name: Voyager-Web-${{ github.ref_name }}.zip - path: Voyager-Web-${{ github.ref_name }}.zip + name: Voyager-Web-${{ env.APP_GIT_REF }}.zip + path: Voyager-Web-${{ env.APP_GIT_REF }}.zip build_ios: environment: deploy runs-on: macos-latest - concurrency: - group: "build_ios" - cancel-in-progress: true steps: - uses: actions/checkout@v4 + - name: Download bumped version artifacts + if: inputs.is_main_build + uses: actions/download-artifact@v4 + with: + name: trapeze-artifacts + - uses: actions/setup-node@v4 with: node-version: 22 @@ -84,7 +99,6 @@ jobs: CI_PLATFORM: ios - name: Deploy to TestFlight - if: github.ref_name != 'test*' run: | echo "$APP_STORE_CONNECT_KEY" > authkey.json bundle exec fastlane deploy @@ -98,14 +112,20 @@ jobs: - name: Upload iOS IPA as artifact uses: actions/upload-artifact@v4 with: - name: Voyager-iOS-${{ github.ref_name }}.ipa - path: Voyager-iOS-${{ github.ref_name }}.ipa + name: Voyager-iOS-${{ env.APP_GIT_REF }}.ipa + path: Voyager-iOS-${{ env.APP_GIT_REF }}.ipa build_android: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 + - name: Download bumped version artifacts + if: inputs.is_main_build + uses: actions/download-artifact@v4 + with: + name: trapeze-artifacts + - uses: actions/setup-node@v4 with: node-version: 22 @@ -135,23 +155,26 @@ jobs: ANDROID_KEYSTORE: ${{ secrets.ANDROID_KEYSTORE }} ANDROID_KEYSTORE_PASSWORD: ${{ secrets.ANDROID_KEYSTORE_PASSWORD }} - - run: mv android/app/build/outputs/apk/release/app-release.apk Voyager-Android-${{ github.ref_name }}.apk + - run: mv android/app/build/outputs/apk/release/app-release.apk Voyager-Android-${{ env.APP_GIT_REF }}.apk - name: Send to Artifacts uses: actions/upload-artifact@v4 with: - name: Voyager-Android-${{ github.ref_name }}.apk - path: Voyager-Android-${{ github.ref_name }}.apk + name: Voyager-Android-${{ env.APP_GIT_REF }}.apk + path: Voyager-Android-${{ env.APP_GIT_REF }}.apk build_android_play: environment: deploy runs-on: ubuntu-latest - concurrency: - group: "build_android_play" - cancel-in-progress: true steps: - uses: actions/checkout@v4 + - name: Download bumped version artifacts + if: inputs.is_main_build + uses: actions/download-artifact@v4 + with: + name: trapeze-artifacts + - uses: actions/setup-node@v4 with: node-version: 22 @@ -200,7 +223,7 @@ jobs: create_release: needs: [build_web, build_ios, build_android_play, build_android] - if: startsWith(github.ref_name, 'test-') != true + if: inputs.is_main_build != true runs-on: ubuntu-latest permissions: @@ -210,19 +233,19 @@ jobs: - name: Download dist artifacts uses: actions/download-artifact@v4 with: - name: Voyager-Web-${{ github.ref_name }}.zip + name: Voyager-Web-${{ env.APP_GIT_REF }}.zip path: artifacts/web - name: Download iOS Artifact uses: actions/download-artifact@v4 with: - name: Voyager-iOS-${{ github.ref_name }}.ipa + name: Voyager-iOS-${{ env.APP_GIT_REF }}.ipa path: artifacts/ios - name: Download Android Artifact uses: actions/download-artifact@v4 with: - name: Voyager-Android-${{ github.ref_name }}.apk + name: Voyager-Android-${{ env.APP_GIT_REF }}.apk path: artifacts/android - name: Release diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index cbdb71bdf8..8554100eba 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -1,4 +1,5 @@ -name: build & push docker container +name: docker + on: push: branches: diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index 4be5b8c66c..3fb44a72cb 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -1,8 +1,8 @@ -name: Run e2e tests +name: e2e + on: workflow_dispatch jobs: playwright: - name: Run Playwright tests runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 9c6d578796..4f2403880d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,20 +1,25 @@ -name: Cut a release +name: release on: workflow_dispatch: - # -- TESTING ONLY -- - # push: - # branches: - # - inherit # todo remove, can't workflow_dispatch from branch + inputs: + release_behavior: + description: "If publish_release, will create a release and publish it to the release branch. If push_beta, will create a beta build and push it to the beta track." + required: true + default: "publish_release" + type: choice + options: + - publish_release + - push_beta + push: + branches: + - "main" env: APP_BUILD_OFFSET: 300 - TAG_PREFIX: # test- - RELEASE_BRANCH_PREFIX: release # test-release jobs: - app_build_number: - name: Calculate app build number + app_build: runs-on: ubuntu-latest steps: - id: calculate @@ -25,12 +30,10 @@ jobs: outputs: app_build: ${{ steps.calculate.outputs.app_build }} - validate_version: - needs: app_build_number - name: Validate version + app_version: runs-on: ubuntu-latest outputs: - version: ${{ steps.get_current_version.outputs.version }} + app_version: ${{ steps.app_version.outputs.app_version }} steps: - uses: actions/checkout@v4 @@ -39,29 +42,27 @@ jobs: node-version: 22 - name: Get current version from package.json - id: get_current_version + id: app_version run: | CURRENT_APP_VERSION=$(node -p "require('./package.json').version") - echo "version=$CURRENT_APP_VERSION" >> $GITHUB_OUTPUT + echo "app_version=$CURRENT_APP_VERSION" >> $GITHUB_OUTPUT - name: Verify provided version not already released + if: inputs.release_behavior == 'publish_release' run: | git fetch --tags - TAG_NAME="$TAG_PREFIX${{ steps.get_current_version.outputs.version }}" + TAG_NAME="${{ steps.app_version.outputs.app_version }}" if git rev-parse "$TAG_NAME" >/dev/null 2>&1; then echo "Error: Tag $TAG_NAME already exists" exit 1 fi - push_release: - needs: [validate_version, app_build_number] - name: Add version to apps, push release branch and tag + bump_src: + needs: [app_build, app_version] runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - with: - persist-credentials: false # Don't clobber the PAT below - run: corepack enable @@ -71,8 +72,43 @@ jobs: - name: Run trapeze (update iOS and Android version/code) run: pnpm exec trapeze run trapeze.yaml -y env: - APP_BUILD: ${{ needs.app_build_number.outputs.app_build }} - APP_VERSION: ${{ needs.validate_version.outputs.version }} + APP_BUILD: ${{ needs.app_build.outputs.app_build }} + APP_VERSION: ${{ needs.app_version.outputs.app_version }} + + - name: Upload bumped version artifacts + uses: actions/upload-artifact@v4 + with: + name: trapeze-artifacts + retention-days: 3 + path: | + android + ios + + dispatch_beta_release: + if: inputs.release_behavior != 'publish_release' + needs: [app_build, bump_src] + uses: ./.github/workflows/build_release.yml + with: + is_main_build: true + app_build: ${{ needs.app_build.outputs.app_build }} + secrets: inherit + permissions: + contents: write # needed for create_release, even though it won't be called + + push_release: + needs: [bump_src, app_build, app_version] + runs-on: ubuntu-latest + if: inputs.release_behavior == 'publish_release' + + steps: + - uses: actions/checkout@v4 + with: + persist-credentials: false # Don't clobber the PAT below + + - name: Download bumped version artifacts + uses: actions/download-artifact@v4 + with: + name: trapeze-artifacts - name: Import GPG key uses: crazy-max/ghaction-import-gpg@cb9bde2e2525e640591a934b1fd28eef1dcaf5e5 # v6.2.0 @@ -81,6 +117,7 @@ jobs: passphrase: ${{ secrets.GPG_PASSPHRASE }} git_user_signingkey: true git_commit_gpgsign: true + git_tag_gpgsign: true - name: Commit and push release env: @@ -88,13 +125,13 @@ jobs: # Github doesn't trigger subsequent workflows unless push with a PAT run: | git remote set-url origin "https://${PAT_TOKEN}@github.com/${GITHUB_REPOSITORY}.git" - git checkout -b "$RELEASE_BRANCH_PREFIX/${{ needs.validate_version.outputs.version }}" + git checkout -b "release/${{ needs.app_version.outputs.app_version }}" git config --global user.email "voyager.ci.noreply@harding.dev" git config --global user.name "Voyager CI" git add . - git commit -S -m "Release ${{ needs.validate_version.outputs.version }} (${{ needs.app_build_number.outputs.app_build }})" - TAG_NAME="${TAG_PREFIX}${{ needs.validate_version.outputs.version }}" + git commit -S -m "release: ${{ needs.app_version.outputs.app_version }} (${{ needs.app_build.outputs.app_build }})" + TAG_NAME="${{ needs.app_version.outputs.app_version }}" echo "Creating tag: $TAG_NAME" - git tag "$TAG_NAME" - git push origin "$RELEASE_BRANCH_PREFIX/${{ needs.validate_version.outputs.version }}" + git tag -s "$TAG_NAME" -m "release: ${{ needs.app_version.outputs.app_version }} (${{ needs.app_build.outputs.app_build }})" + git push origin "release/${{ needs.app_version.outputs.app_version }}" git push origin "$TAG_NAME" diff --git a/.github/workflows/semantic_pull_request.yml b/.github/workflows/semantic_pull_request.yml new file mode 100644 index 0000000000..02e902d0e0 --- /dev/null +++ b/.github/workflows/semantic_pull_request.yml @@ -0,0 +1,24 @@ +name: semantic_pull_request + +on: + pull_request_target: + types: + - opened + - edited + - synchronize + +jobs: + main: + if: github.repository == 'aeharding/voyager' + runs-on: ubuntu-latest + steps: + - name: Validate PR title + uses: amannn/action-semantic-pull-request@v5 + with: + subjectPattern: ^(?![A-Z]).+$ + subjectPatternError: | + The subject "{subject}" found in the pull request title "{title}" + didn't match the configured pattern. Please ensure that the subject + doesn't start with an uppercase character. + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.vscode/extensions.json b/.vscode/extensions.json index 4c7ee07c78..d55ea40c4d 100644 --- a/.vscode/extensions.json +++ b/.vscode/extensions.json @@ -2,6 +2,7 @@ "recommendations": [ "ionic.ionic", "esbenp.prettier-vscode", - "styled-components.vscode-styled-components" + "styled-components.vscode-styled-components", + "github.vscode-github-actions" ] } diff --git a/e2e/community-feed.spec.ts b/e2e/community-feed.spec.ts index e1cbf79862..dcba37ec85 100644 --- a/e2e/community-feed.spec.ts +++ b/e2e/community-feed.spec.ts @@ -12,7 +12,7 @@ test("load community posts", async ({ page }) => { await expect(page).toHaveTitle("Voyager for Lemmy"); - await expect(page.getByText(posts[0].post.name)).toBeVisible(); + await expect(page.getByText(posts[0]!.post.name)).toBeVisible(); }); test("navigate to post on click", async ({ page }) => { @@ -22,7 +22,7 @@ test("navigate to post on click", async ({ page }) => { await page.goto("/"); - await page.getByText(posts[0].post.name).click(); + await page.getByText(posts[0]!.post.name).click(); await expect(page).toHaveURL( "/posts/lemmy.world/c/community_1@test.lemmy/comments/999", diff --git a/eslint.config.js b/eslint.config.js index d39577eb99..b31c206bd8 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -10,6 +10,7 @@ import vitestPlugin from "eslint-plugin-vitest"; import tseslint from "typescript-eslint"; import compilerOptions from "./compilerOptions.js"; +import packageJson from "./package.json" with { type: "json" }; export default tseslint.config( eslint.configs.recommended, @@ -119,7 +120,9 @@ export default tseslint.config( newlinesBetween: "always", ignoreCase: false, type: "natural", - internalPattern: ["#/**"], + internalPattern: Object.keys(packageJson.imports).map((i) => + i.endsWith("*") ? `${i}*` : i, + ), sortSideEffects: true, groups: [ "builtin", diff --git a/fastlane/Fastfile b/fastlane/Fastfile index 2e45267318..7888de723d 100644 --- a/fastlane/Fastfile +++ b/fastlane/Fastfile @@ -17,7 +17,7 @@ default_platform(:ios) ENV['app_identifier'] = 'app.vger.voyager' ENV['app_name_sanitized'] = 'App' -ENV['ios_output'] = "Voyager-iOS-#{ENV['GITHUB_REF_NAME']}.ipa" +ENV['ios_output'] = "Voyager-iOS-#{ENV['APP_GIT_REF']}.ipa" platform :ios do before_all do @@ -41,8 +41,10 @@ platform :ios do ipa: ENV['ios_output'], app_identifier: ENV['app_identifier'], api_key_path: "authkey.json", - skip_waiting_for_build_processing: true, - changelog: "Upload from GitHub Actions, ref #{ENV['GITHUB_REF']}, sha #{ENV['GITHUB_SHA']}, msg #{ENV['COMMIT_MSG']}" + distribute_external: true, + groups: ["Public Testers"], # want to join? https://testflight.apple.com/join/nWLw1MBM + changelog: "Upload from GitHub Actions, ref #{ENV['GITHUB_REF']}, sha #{ENV['GITHUB_SHA']}, msg #{ENV['COMMIT_MSG']}", + reject_build_waiting_for_review: true, ) end end @@ -64,9 +66,9 @@ platform :android do if !ENV['GITHUB_REF_NAME'].start_with?('test-') upload_to_play_store( package_name: ENV['app_identifier'], - release_status: 'draft', - json_key: ENV['google_service_account_path'], aab: Actions.lane_context[SharedValues::GRADLE_AAB_OUTPUT_PATH], + json_key: ENV['google_service_account_path'], + track: 'beta', skip_upload_apk: true, skip_upload_metadata: true, skip_upload_images: true, diff --git a/package.json b/package.json index 07f6452a1d..69014568d0 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "voyager", "description": "A progressive webapp Lemmy client", "private": true, - "version": "2.19.0", + "version": "2.19.1", "type": "module", "packageManager": "pnpm@9.12.2+sha512.22721b3a11f81661ae1ec68ce1a7b879425a1ca5b991c975b074ac220b187ce56c708fe5db69f4c962c989452eee76c82877f4ee80f474cebd61ee13461b6228", "scripts": { @@ -26,6 +26,9 @@ "upgrade:react": "pnpm i --save react@experimental react-dom@experimental babel-plugin-react-compiler@experimental eslint-plugin-react-compiler@experimental eslint-plugin-react-hooks@experimental", "release": "./scripts/release.sh" }, + "imports": { + "#/*": "./src/*" + }, "pnpm": { "overrides": { "@ionic/core": "npm:voyager-ionic-core@8.4.0" @@ -157,4 +160,4 @@ "vite-tsconfig-paths": "^5.1.2", "vitest": "^2.1.4" } -} \ No newline at end of file +} diff --git a/src/core/AppCrash.tsx b/src/core/AppCrash.tsx index bf0b9bc691..a36b6a19e3 100644 --- a/src/core/AppCrash.tsx +++ b/src/core/AppCrash.tsx @@ -53,7 +53,9 @@ export default function AppCrash({ error }: FallbackProps) { - Logged in? \`${loggedIn}\` - Native app? \`${isNative()}\` - Installed to home screen? \`${isInstalled()}\` - - Voyager version: \`${APP_VERSION}\` + - APP_VERSION: \`${APP_VERSION}\` + - APP_BUILD: \`${APP_BUILD}\` + - APP_GIT_REF: \`${APP_GIT_REF}\` - BUILD_FOSS_ONLY: \`${BUILD_FOSS_ONLY}\` - User agent: \`${navigator.userAgent}\` diff --git a/src/features/media/gallery/GalleryProvider.tsx b/src/features/media/gallery/GalleryProvider.tsx index b54792d04e..0b53fd4a6e 100644 --- a/src/features/media/gallery/GalleryProvider.tsx +++ b/src/features/media/gallery/GalleryProvider.tsx @@ -1,8 +1,7 @@ import { StatusBar } from "@capacitor/status-bar"; import { compact, noop } from "es-toolkit"; import { PostView } from "lemmy-js-client"; -import type { PreparedPhotoSwipeOptions } from "photoswipe"; -import type ZoomLevel from "photoswipe/dist/types/slide/zoom-level"; +import type { PreparedPhotoSwipeOptions, ZoomLevelOption } from "photoswipe"; import PhotoSwipeLightbox from "photoswipe/lightbox"; import "photoswipe/style.css"; import React, { @@ -40,7 +39,7 @@ interface IGalleryContext { } export const GalleryContext = createContext({ - // eslint-disable-next-line no-empty-function -- https://github.com/toss/es-toolkit/issues/636 + // eslint-disable-next-line no-empty-function open: async () => {}, close: noop, }); @@ -159,7 +158,11 @@ export default function GalleryProvider({ children }: React.PropsWithChildren) { }, }); - let zoomLevel: ZoomLevel; + // ZoomLevel is not directly exported from photoswipe + let zoomLevel: Parameters< + Extract unknown> + >[0]; + let currZoomLevel = 0; instance.on("zoomLevelsUpdate", (e) => { diff --git a/src/features/shared/markdown/components/spoiler/spoilerSlice.ts b/src/features/shared/markdown/components/spoiler/spoilerSlice.ts index 2b2dc4b432..2572d51666 100644 --- a/src/features/shared/markdown/components/spoiler/spoilerSlice.ts +++ b/src/features/shared/markdown/components/spoiler/spoilerSlice.ts @@ -1,5 +1,5 @@ import { PayloadAction, createSlice } from "@reduxjs/toolkit"; -import type { Element } from "react-markdown/lib"; +import type { ExtraProps } from "react-markdown"; interface NetworkState { byId: Record; @@ -33,7 +33,7 @@ export default spoilerSlice.reducer; export function getSpoilerId( markdownItemId: string, - node: Element | undefined, + node: NonNullable | undefined, ) { return `${markdownItemId}__${node?.position?.start.offset ?? 0}`; } diff --git a/src/routes/pages/settings/about/AppDetails.tsx b/src/routes/pages/settings/about/AppDetails.tsx index f5548e76af..a3c1bb3b57 100644 --- a/src/routes/pages/settings/about/AppDetails.tsx +++ b/src/routes/pages/settings/about/AppDetails.tsx @@ -1,3 +1,4 @@ +import { IonText } from "@ionic/react"; import { styled } from "@linaria/react"; const AppContainer = styled.div` @@ -21,12 +22,24 @@ const AppContainer = styled.div` } `; +const buildInfo = (() => { + if (import.meta.env.DEV) return Development; + + if (APP_BUILD) + return ( + + Beta Track — [{APP_BUILD}] {APP_GIT_REF.slice(0, 7)} + + ); +})(); + export default function AppDetails() { return (
Voyager {APP_VERSION} + {buildInfo && }
diff --git a/src/services/db.ts b/src/services/db.ts index 3860d4aebf..8419dac939 100644 --- a/src/services/db.ts +++ b/src/services/db.ts @@ -9,9 +9,9 @@ import { PostSortType, } from "lemmy-js-client"; -import { COMMENT_SORTS } from "#/features/comment/CommentSort"; -import { ALL_POST_SORTS } from "#/features/feed/PostSort"; -import { arrayOfAll } from "#/helpers/array"; +import { COMMENT_SORTS } from "#/features/comment/CommentSort.js"; +import { ALL_POST_SORTS } from "#/features/feed/PostSort.js"; +import { arrayOfAll } from "#/helpers/array.js"; export interface IPostMetadata { post_id: number; diff --git a/src/vite-env.d.ts b/src/vite-env.d.ts index 8802f34ff7..eddd8b10a3 100644 --- a/src/vite-env.d.ts +++ b/src/vite-env.d.ts @@ -1,5 +1,22 @@ /// /// +/// +/** + * Version from package.json + */ declare const APP_VERSION: string; + +/** + * Only available for main builds (not releases) + * + * @example 123 + */ +declare const APP_BUILD: number | undefined; + +/** + * Git sha if main build, otherwise tag name + */ +declare const APP_GIT_REF: string; + declare const BUILD_FOSS_ONLY: boolean; diff --git a/tsconfig.json b/tsconfig.json index d2f8918db3..9231d7b54d 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,25 +1,28 @@ { "compilerOptions": { - "target": "ESNext", - "useDefineForClassFields": true, - "lib": ["DOM", "DOM.Iterable", "ESNext"], - "allowJs": false, - "skipLibCheck": true, - "esModuleInterop": false, - "allowSyntheticDefaultImports": true, + "target": "esnext", + + "module": "esnext", + "moduleResolution": "bundler", + "strict": true, - "forceConsistentCasingInFileNames": true, - "module": "ESNext", - "moduleResolution": "Node", - "resolveJsonModule": true, - "isolatedModules": true, "noEmit": true, - "jsx": "react-jsx", - "types": ["vite-plugin-svgr/client"], + "skipLibCheck": true, + "isolatedModules": true, + "allowJs": false, + + "forceConsistentCasingInFileNames": true, + "useDefineForClassFields": true, "noUncheckedIndexedAccess": true, + + "jsx": "react-jsx", + "paths": { + // duplicate of package.json[imports] + // typescript doesn't support this same syntax in package.json with + // module resolution set to bundler, despite it working fine in esbuild/vite... + // https://github.com/microsoft/TypeScript/issues/55337 (╯°□°)╯︵ ┻━┻ "#/*": ["./src/*"] } - }, - "include": ["src"] + } } diff --git a/vite.config.ts b/vite.config.ts index ecd799ceb5..2a3336a1f1 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -3,10 +3,11 @@ import react from "@vitejs/plugin-react"; import wyw from "@wyw-in-js/vite"; import { ManifestOptions, VitePWA } from "vite-plugin-pwa"; import svgr from "vite-plugin-svgr"; -import tsconfigPaths from "vite-tsconfig-paths"; import { defineConfig } from "vitest/config"; -import compilerOptions from "./compilerOptions"; +// @ts-expect-error -- Waiting for stable typescript eslint config +// https://eslint.org/docs/latest/use/configure/configuration-files#typescript-configuration-files +import compilerOptions from "./compilerOptions.js"; import manifest from "./manifest.json"; const IGNORED_ROLLUP_WARNINGS = [ @@ -21,7 +22,6 @@ const IGNORED_ROLLUP_WARNINGS = [ // https://vitejs.dev/config/ export default defineConfig({ plugins: [ - tsconfigPaths(), react({ babel: { plugins: [["babel-plugin-react-compiler", compilerOptions]], @@ -89,6 +89,8 @@ export default defineConfig({ }, define: { APP_VERSION: JSON.stringify(process.env.npm_package_version), + APP_BUILD: JSON.stringify(process.env.APP_BUILD ?? ""), + APP_GIT_REF: JSON.stringify(process.env.APP_GIT_REF ?? ""), BUILD_FOSS_ONLY: !!process.env.BUILD_FOSS_ONLY, }, test: {