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

Define the assets directory for a build using SDK_VERSION #796

Merged
merged 1 commit into from
Feb 20, 2025

Conversation

robinmolen
Copy link
Contributor

@robinmolen robinmolen commented Feb 19, 2025

For release builds we want to the assets to be placed in /dist/[release number].

This logic was present in the previous build setup, with CRA. In the re-structure of the SDK project, #724, the build process of CRA was replaced with vite. But this logic rule was lost in the process.

If the env variable SDK_VERSION is present, and it isn't 'latest', the assets directory will be /dist/[SDK_VERSION]. If the SDK_VERSION isn't available, or it set to 'latest', the build assets will be placed in the regular /dist.

Copy link

codecov bot commented Feb 19, 2025

Bundle Report

Changes will decrease total bundle size by 14 bytes (-0.0%) ⬇️. This is within the configured threshold ✅

Detailed changes
Bundle name Size Change
@open-formulieren/sdk-OpenForms-umd 4.78MB -7 bytes (-0.0%) ⬇️
@open-formulieren/sdk-esm 4.75MB -7 bytes (-0.0%) ⬇️

Affected Assets, Files, and Routes:

view changes for bundle: @open-formulieren/sdk-OpenForms-umd

Assets Changed:

Asset Name Size Change Total Size Change (%)
open-*.js -7 bytes 3.49MB -0.0%
view changes for bundle: @open-formulieren/sdk-esm

Assets Changed:

Asset Name Size Change Total Size Change (%)
assets/sdk-*.js -7 bytes 1.01MB -0.0%

Copy link

codecov bot commented Feb 19, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 83.86%. Comparing base (5e94e35) to head (e4b3a57).
Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #796      +/-   ##
==========================================
- Coverage   84.29%   83.86%   -0.44%     
==========================================
  Files         245      245              
  Lines        4808     4808              
  Branches     1279     1272       -7     
==========================================
- Hits         4053     4032      -21     
- Misses        726      747      +21     
  Partials       29       29              
Flag Coverage Δ
storybook 77.44% <ø> (-0.50%) ⬇️
vitest 62.70% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@robinmolen robinmolen force-pushed the fix/vite-build-dir-based-on-build-version branch from 9809656 to adcd669 Compare February 20, 2025 08:37
@robinmolen robinmolen marked this pull request as ready for review February 20, 2025 08:38
@robinmolen robinmolen changed the title Define the assets directly for a build using SDK_VERSION Define the assets directly for a build using VITE_VERSION Feb 20, 2025
For release builds we want to the assets to be placed in `/dist/[release number]`.

This logic was present in the previous build setup, with CRA. In the re-structure of the SDK project, #724, the build process of CRA was replaced with vite. But this logic rule was lost in the process
@robinmolen robinmolen force-pushed the fix/vite-build-dir-based-on-build-version branch from adcd669 to e4b3a57 Compare February 20, 2025 08:45
@robinmolen robinmolen changed the title Define the assets directly for a build using VITE_VERSION Define the assets directly for a build using SDK_VERSION Feb 20, 2025
@sergei-maertens
Copy link
Member

Good catch!

@robinmolen robinmolen changed the title Define the assets directly for a build using SDK_VERSION Define the assets directory for a build using SDK_VERSION Feb 20, 2025
@robinmolen robinmolen merged commit ba5fd41 into main Feb 20, 2025
16 of 17 checks passed
@robinmolen robinmolen deleted the fix/vite-build-dir-based-on-build-version branch February 20, 2025 10:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants