Skip to content

Commit e91e403

Browse files
authored
chore(#362): core dependencies uplift (#360)
- Upgrade of libraries - "@types/node": from "^22.13.13" to "^22.13.14", - "typescript": from "~5.7.2" to "typescript": "~5.8.2", - "vue": from "3.3.4" to "vue": "3.5.13" - "@vitest/browser": from "^2.1.8" to "^3.0.9" - "jsdom": from "^25.0.1" to "^26.0.0" - "vite": from "^5.4.11" to "^6.2.3" - "vitest": from "^2.1.8" to "^3.0.9" - Updates vite browser definition to new way: `browser.name: BROWSER_NAME` to `browser.instances: [{ browser: BROWSER_NAME }]` - Updates vue's inject to include new mandatory default value: `inject<boolean>('submitPressed');` to `inject<boolean>('submitPressed', false);` - Updates xpath tests to include retry in new position: `it('without a seed', () => { ... }, { retry: 5 })` to `it('without a seed', { retry: 5 }, () => { ... })` - Increasing timeouts because 4 tests are taking longer to execute in Firefox browser and JSDOM: - packages/web-forms/tests/components/OdkWebForm.test.ts - packages/scenario/test/form-definition-validity.test.ts - packages/scenario/test/smoketests/child-vaccination.test.ts - packages/scenario/test/smoketests/who-va.test.ts - Resolves dependencies: by default, linked packages or dependencies outside the local node_modules (e.g., hoisted to the monorepo root) are not pre-bundled unless explicitly configured. - Adds a new check in the CI to skip 'push' actions, avoiding running duplicate actions
1 parent 24a2f7f commit e91e403

25 files changed

+926
-1025
lines changed

.changeset/fresh-singers-wish.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
'@getodk/tree-sitter-xpath': patch
3+
'@getodk/xforms-engine': patch
4+
'@getodk/web-forms': patch
5+
'@getodk/scenario': patch
6+
'@getodk/common': patch
7+
'@getodk/xpath': patch
8+
---
9+
10+
Updates versions of major dependencies

.github/workflows/ci.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,31 @@ env:
2424
LOCALE_ID: 'en-US'
2525

2626
jobs:
27+
check-run:
28+
runs-on: 'ubuntu-latest'
29+
outputs:
30+
should-skip: ${{ steps.check.outputs.should-skip }}
31+
steps:
32+
- name: Check for duplicate push event with PR
33+
id: check
34+
if: github.event_name == 'push'
35+
run: |
36+
# Check if this push is tied to an open PR
37+
PR_NUMBER=$(curl -s -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \
38+
"https://api.github.com/repos/${{ github.repository }}/commits/${{ github.sha }}/pulls" | \
39+
jq -r '.[0].number // "none"')
40+
if [ "$PR_NUMBER" != "none" ]; then
41+
echo "This push (commit ${{ github.sha }}) is part of PR #$PR_NUMBER, skipping to avoid duplication with pull_request event."
42+
echo "should-skip=true" >> $GITHUB_OUTPUT
43+
exit 0
44+
else
45+
echo "No associated PR found, proceeding with CI for this push."
46+
echo "should-skip=false" >> $GITHUB_OUTPUT
47+
fi
48+
2749
install-and-build:
50+
needs: check-run
51+
if: ${{ needs.check-run.outputs.should-skip != 'true' }}
2852
name: 'Install dependencies and build packages'
2953
runs-on: 'ubuntu-latest'
3054

package.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -43,28 +43,28 @@
4343
"@types/eslint__js": "^8.42.3",
4444
"@types/geojson": "^7946.0.16",
4545
"@types/jsdom": "^21.1.7",
46-
"@types/node": "^22.13.13",
46+
"@types/node": "^22.13.14",
4747
"@typescript-eslint/eslint-plugin": "^8.28.0",
4848
"@typescript-eslint/parser": "^8.28.0",
4949
"@vue/eslint-config-prettier": "^10.1.0",
5050
"@vue/eslint-config-typescript": "^14.5.0",
5151
"@vue/tsconfig": "^0.7.0",
52-
"eslint": "^9.23.0",
52+
"eslint": "^9.24.0",
5353
"eslint-config-prettier": "^9.1.0",
5454
"eslint-plugin-jsdoc": "^50.6.9",
5555
"eslint-plugin-no-only-tests": "^3.3.0",
56-
"eslint-plugin-prettier": "^5.2.5",
56+
"eslint-plugin-prettier": "^5.2.6",
5757
"eslint-plugin-prettier-vue": "^5.0.0",
5858
"eslint-plugin-vue": "^9.32.0",
5959
"npm-run-all2": "^7.0.2",
6060
"only-allow": "^1.2.1",
6161
"organize-imports-cli": "^0.10.0",
6262
"prettier": "^3.5.3",
6363
"rimraf": "^5.0.9",
64-
"turbo": "^2.4.4",
65-
"typescript": "~5.7.2",
66-
"typescript-eslint": "^8.28.0",
67-
"vue": "3.3.4",
64+
"turbo": "^2.5.0",
65+
"typescript": "~5.8.3",
66+
"typescript-eslint": "^8.29.1",
67+
"vue": "3.5.13",
6868
"vue-tsc": "^2.2.8"
6969
},
7070
"resolutions": {

packages/common/package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,9 @@
5151
"test:types": "tsc --project ./tsconfig.json --emitDeclarationOnly false --noEmit"
5252
},
5353
"devDependencies": {
54-
"@vitest/browser": "^2.1.8",
55-
"jsdom": "^25.0.1",
56-
"vite": "^5.4.11",
57-
"vitest": "^2.1.8"
54+
"@vitest/browser": "^3.0.9",
55+
"jsdom": "^26.0.0",
56+
"vite": "^6.2.3",
57+
"vitest": "^3.0.9"
5858
}
5959
}

packages/common/vitest.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ export default defineConfig(() => {
4545
test: {
4646
browser: {
4747
enabled: BROWSER_ENABLED,
48-
name: BROWSER_NAME!,
48+
instances: [{ browser: BROWSER_NAME }],
4949
provider: 'playwright',
5050
headless: true,
5151
screenshotFailures: false,

packages/scenario/package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,11 @@
4848
},
4949
"devDependencies": {
5050
"@getodk/xforms-engine": "0.7.0",
51-
"@js-joda/core": "^5.6.3",
52-
"@vitest/browser": "^2.1.8",
53-
"jsdom": "^25.0.1",
51+
"@js-joda/core": "^5.6.5",
52+
"@vitest/browser": "^3.0.9",
53+
"jsdom": "^26.0.0",
5454
"solid-js": "^1.9.5",
55-
"vite": "^5.4.11",
56-
"vitest": "^2.1.8"
55+
"vite": "^6.2.3",
56+
"vitest": "^3.0.9"
5757
}
5858
}

packages/scenario/test/form-definition-validity.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -546,7 +546,7 @@ describe('TriggerableDagTest.java', () => {
546546
* Same notes as previous (then surprising) failure of cycle detecction.
547547
* At least we have a pattern!
548548
*/
549-
it('should fail', async () => {
549+
it('should fail', { timeout: 40 * 1000 }, async () => {
550550
// exceptionRule.expect(XFormParseException.class);
551551
// exceptionRule.expectMessage("Cycle detected in form's relevant and calculation logic!");
552552

packages/scenario/test/smoketests/child-vaccination.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -697,7 +697,7 @@ describe('ChildVaccinationTest.java', () => {
697697
fixtureName: 'child_vaccination_VOL_tool_v12-alt.xml',
698698
failureMode: null,
699699
},
700-
])('fixture: $fixtureName', ({ fixtureName, failureMode }) => {
700+
])('fixture: $fixtureName', { timeout: 40 * 1000 }, ({ fixtureName, failureMode }) => {
701701
let testFn: KnownFailureTestAPI;
702702

703703
if (failureMode != null) {

packages/scenario/test/smoketests/who-va.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ import { r } from '../../src/jr/resource/ResourcePathHelper.ts';
3737
describe('WHO VA fixture(s): smoketests', () => {
3838
describe('WhoVATest.java', () => {
3939
describe('regression after [JavaRosa] 2.17.0', () => {
40-
it('[updates `relevant` state] relevance updates', async () => {
40+
it('[updates `relevant` state] relevance updates', { timeout: 40 * 1000 }, async () => {
4141
const scenario = await Scenario.init(r('whova_form.xml'));
4242

4343
// region Give consent to unblock the rest of the form

packages/scenario/vitest.config.ts

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ export default defineConfig(({ mode }) => {
5757
},
5858
exclude: ['@getodk/xforms-engine'],
5959
force: true,
60+
include: ['papaparse'],
6061
},
6162
resolve: {
6263
alias: {
@@ -67,7 +68,7 @@ export default defineConfig(({ mode }) => {
6768
test: {
6869
browser: {
6970
enabled: BROWSER_ENABLED,
70-
name: BROWSER_NAME!,
71+
instances: [{ browser: BROWSER_NAME }],
7172
provider: 'playwright',
7273
headless: true,
7374
screenshotFailures: false,
@@ -77,22 +78,27 @@ export default defineConfig(({ mode }) => {
7778
exclude,
7879

7980
deps: {
80-
optimizer: {
81-
web: {
82-
// Prevent loading multiple instances of Solid. This deviates from
83-
// most of the recommendations provided by Solid and related tooling,
84-
// as Vitest's interfaces have since changed. But it does seem to be
85-
// the appropriate solution (at least for our usage).
86-
exclude: ['solid-js'],
87-
},
88-
},
8981
moduleDirectories: ['node_modules', '../../node_modules'],
9082
},
9183
environment: TEST_ENVIRONMENT,
9284
globals: false,
9385
setupFiles: ['./src/vitest/setup.ts'],
9486

9587
reporters: process.env.GITHUB_ACTIONS ? ['default', 'github-actions'] : 'default',
88+
89+
server: {
90+
deps: {
91+
/**
92+
* Added to resolve a `TypeError: Cannot read properties of undefined (reading 'registerGraph')`
93+
* error in `solid-js/store` during tests, which occurred because SolidJS dev tools (`DEV$1`) were not
94+
* properly initialized in the `jsdom` environment when dependencies were pre-bundled.
95+
*
96+
* It maintains test behavior closer to a real browser runtime, avoiding pre-bundling quirks. It might
97+
* increase test startup time slightly due to skipping pre-bundling optimizations.
98+
*/
99+
inline: TEST_ENVIRONMENT === 'jsdom' ? ['solid-js'] : [],
100+
},
101+
},
96102
},
97103
};
98104
});

0 commit comments

Comments
 (0)