Replies: 2 comments
-
did you run the tests from within |
Beta Was this translation helpful? Give feedback.
-
|
Yes - I ran the tests from within packages/server (I was inside the directory and executed yarn test there), and also from the repo root. Inside packages/server -> yarn test → same error From the repo root -> yarn test → all other test suites (e.g. shared-core, etc.) run successfully, but the failure occurs once the server test suite starts Not every single server test fails, but a large portion of the server test suite does — specifically those that end up requiring devalue. Roughly ~77% of the test suites are failing. Also: for every suite that fails, the error is always the same as in the example below (ESM export syntax from devalue): SyntaxError: Unexpected token 'export' 5 | * the type from @budibase/types */
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Checklist
[ X ] I have searched budibase discussions and github issues to check if my issue already exists
Hosting
Self
Method: K8s / Self-hosted
Budibase Version: 3.24.0 – latest
App Version: doesn't matter
Describe the bug
After upgrading Budibase to versions 3.24.0–latest, the Budibase server test suite no longer runs. Budibase’s tests are executed in a CommonJS environment, but the Svelte 5 migration pulls in
devalue@5.6.2, which is ESM-only.devaluebecame ESM-only starting from version 5.0.0 (olderdevalueversions were not ESM-only).devalueis not declared directly in Budibase’spackage.json, but is pulled in automatically via Svelte. This can be verified with:npm ls devalue
Output:
└─┬ svelte@5.48.0
└── devalue@5.6.2
When running the Budibase test suite (CommonJS), Node tries to load
devalueas CommonJS and fails on ESM syntax:export { uneval } from './src/uneval.js';
^^^^^^
SyntaxError: Unexpected token 'export'
As a result, the Budibase tests are broken on 3.24.0–latest due to an ESM-only transitive dependency.
Additionally, this issue is caused by a transitive dependency change introduced with the Svelte 5 upgrade, not by any direct dependency change in Budibase itself. This makes the failure non-obvious and hard to diagnose when running the server test suite.
To Reproduce
Steps to reproduce the behaviour:
devalue.Expected behavior
Budibase should fix its CommonJS test setup so that transitive ESM-only dependencies introduced via Svelte (such as
devalue@5.6.2) do not break the tests.Additional context
devalue@5.6.2is ESM-only; olderdevalueversions were not ESM-only.devalueis introduced indirectly viasvelte@5.48.0, not as a direct Budibase dependency.Logs / screenshots
export { uneval } from './src/uneval.js';
^^^^^^
SyntaxError: Unexpected token 'export'
Beta Was this translation helpful? Give feedback.
All reactions