Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -415,7 +415,6 @@ export default tseslint.config(
'packages/*/playwright.config.ts',
'packages/*/vite.config.ts',
'packages/*/vitest.config.ts',
'packages/common/src/lib/web-compat/url.ts',
'packages/tree-sitter-xpath/vite.config.mts',
'packages/xforms-engine/vite.*.config.ts',
'packages/*/tools/**/*',
Expand Down
9 changes: 6 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"@changesets/changelog-github": "^0.5.1",
"@changesets/cli": "^2.29.7",
"@eslint/js": "^9.39.1",
"@playwright/test": "^1.57.0",
"@playwright/test": "^1.58.2",
"@tsconfig/node20": "^20.1.8",
"@types/eslint": "^9.6.1",
"@types/eslint-config-prettier": "^6.11.3",
Expand All @@ -47,6 +47,7 @@
"@types/node": "^24.10.1",
"@typescript-eslint/eslint-plugin": "^8.48.0",
"@typescript-eslint/parser": "^8.48.0",
"@vitest/browser-playwright": "^4.0.18",
"@vue/eslint-config-prettier": "^10.2.0",
"@vue/eslint-config-typescript": "^14.6.0",
"@vue/tsconfig": "^0.8.1",
Expand All @@ -60,12 +61,14 @@
"npm-run-all2": "^8.0.4",
"only-allow": "^1.2.1",
"organize-imports-cli": "^0.10.0",
"playwright": "^1.58.2",
"prettier": "^3.6.2",
"rimraf": "^6.1.2",
"rimraf": "^6.1.3",
"turbo": "^2.6.1",
"typescript": "~5.9.3",
"typescript-eslint": "^8.48.0",
"vue": "3.5.25",
"vitest": "^4.0.18",
"vue": "^3.5.29",
"vue-eslint-parser": "^10.0.0",
"vue-tsc": "^3.1.5"
},
Expand Down
5 changes: 2 additions & 3 deletions packages/common/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,9 @@
"test:types": "tsc --project ./tsconfig.json --emitDeclarationOnly false --noEmit"
},
"devDependencies": {
"@vitest/browser": "^3.2.4",
"jsdom": "^27.2.0",
"npm-run-all2": "^8.0.4",
"vite": "^7.2.4",
"vitest": "^3.2.4"
"vite": "^7.3.1",
"vitest": "^4.0.18"
}
}
88 changes: 0 additions & 88 deletions packages/common/src/lib/web-compat/url.ts

This file was deleted.

1 change: 1 addition & 0 deletions packages/common/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"include": ["src/**/*.ts", "test", "types/**/*.ts", "vite-env.d.ts"],
"compilerOptions": {
"lib": ["ES2022", "DOM", "DOM.Iterable"],
"types": ["node"],
"skipLibCheck": true
}
}
3 changes: 0 additions & 3 deletions packages/common/types/vitest-config.ts

This file was deleted.

6 changes: 2 additions & 4 deletions packages/common/vitest.config.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
/// <reference types="vitest" />
/// <reference types="vite/client" />

// TODO: much of this may be a good candidate for sharing from this internal package!

import type { CollectionValues } from '@getodk/common/types/collections/CollectionValues.ts';
import { playwright } from '@vitest/browser-playwright';
import { defineConfig } from 'vitest/config';

export default defineConfig(() => {
Expand Down Expand Up @@ -46,7 +44,7 @@ export default defineConfig(() => {
browser: {
enabled: BROWSER_ENABLED,
instances: BROWSER_NAME != null ? [{ browser: BROWSER_NAME }] : [],
provider: 'playwright',
provider: playwright(),
headless: true,
screenshotFailures: false,
},
Expand Down
7 changes: 3 additions & 4 deletions packages/scenario/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,11 @@
"devDependencies": {
"@getodk/xforms-engine": "0.17.0",
"@js-joda/core": "^5.6.5",
"@vitest/browser": "^3.2.4",
"jsdom": "^27.2.0",
"npm-run-all2": "^8.0.4",
"solid-js": "^1.9.10",
"vite": "^7.2.4",
"vitest": "^3.2.4"
"solid-js": "^1.9.11",
"vite": "^7.3.1",
"vitest": "^4.0.18"
},
"dependencies": {
"temporal-polyfill": "^0.3.0"
Expand Down
1 change: 1 addition & 0 deletions packages/scenario/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"compilerOptions": {
"lib": ["ES2022", "DOM", "DOM.Iterable"],
"skipLibCheck": true,
"types": ["node"],
"paths": {
"@getodk/common/types/*": ["../common/types/*"],
"@getodk/common/*": ["../common/src/*"]
Expand Down
6 changes: 2 additions & 4 deletions packages/scenario/vitest.config.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
/// <reference types="vitest" />
/// <reference types="vite/client" />

import type { CollectionValues } from '@getodk/common/types/collections/CollectionValues.ts';
import { playwright } from '@vitest/browser-playwright';
import { resolve } from 'path';
import { defineConfig } from 'vitest/config';

Expand Down Expand Up @@ -68,7 +66,7 @@ export default defineConfig(({ mode }) => {
browser: {
enabled: BROWSER_ENABLED,
instances: BROWSER_NAME != null ? [{ browser: BROWSER_NAME }] : [],
provider: 'playwright',
provider: playwright(),
headless: true,
screenshotFailures: false,
},
Expand Down
4 changes: 2 additions & 2 deletions packages/tree-sitter-xpath/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@
"npm-run-all2": "^8.0.4",
"tree-sitter": "0.22.1",
"tree-sitter-cli": "0.24.5",
"vite": "^7.2.4",
"vite-plugin-static-copy": "^3.1.4",
"vite": "^7.3.1",
"vite-plugin-static-copy": "^3.2.0",
"web-tree-sitter": "0.24.5"
},
"peerDependencies": {
Expand Down
20 changes: 10 additions & 10 deletions packages/web-forms/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,36 +59,36 @@
"@fontsource/hanken-grotesk": "^5.2.8",
"@fontsource/roboto": "^5.2.9",
"@getodk/xforms-engine": "0.17.0",
"@playwright/test": "^1.57.0",
"@playwright/test": "^1.58.2",
"@primeuix/themes": "1.0.3",
"@types/ramda": "^0.31.1",
"@vitejs/plugin-vue": "^6.0.2",
"@vitejs/plugin-vue-jsx": "^5.1.2",
"@vitejs/plugin-vue": "^6.0.4",
"@vitejs/plugin-vue-jsx": "^5.1.4",
"@vue/test-utils": "^2.4.6",
"jsdom": "^27.2.0",
"npm-run-all2": "^8.0.4",
"primeflex": "^4.0.0",
"primevue": "4.3.3",
"ramda": "^0.32.0",
"rimraf": "^6.1.2",
"rimraf": "^6.1.3",
"sass": "^1.94.2",
"typescript": "~5.9.3",
"vite": "^7.2.4",
"vite": "^7.3.1",
"vite-plugin-css-injected-by-js": "^3.5.2",
"vite-plugin-static-copy": "^3.1.4",
"vitest": "^3.2.4",
"vue": "3.5.25",
"vite-plugin-static-copy": "^3.2.0",
"vitest": "^4.0.18",
"vue": "^3.5.29",
"vue-router": "^4.6.3",
"vue-tsc": "^3.1.5"
},
"peerDependencies": {
"vue": "^3.5.18"
"vue": "^3.5.29"
},
"dependencies": {
"@mdi/js": "^7.4.47",
"dompurify": "^3.3.0",
"ol": "^10.7.0",
"vue-draggable-plus": "^0.6.0"
"vue-draggable-plus": "^0.6.1"
},
"publishConfig": {
"access": "public"
Expand Down
2 changes: 1 addition & 1 deletion packages/web-forms/src/components/OdkWebForm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ import type {
OptionalAwaitableHostSubmissionResult,
} from '@/lib/submission/host-submission-result-callback.ts';
import type { JRResourceURLString } from '@getodk/common/jr-resources/JRResourceURL.ts';
import type { ObjectURL } from '@getodk/common/lib/web-compat/url.ts';
import type {
ChunkedInstancePayload,
FetchFormAttachment,
Expand All @@ -44,6 +43,7 @@ import {
} from 'vue';

const webFormsVersion = __WEB_FORMS_VERSION__;
type ObjectURL = `blob:${string}`;

export interface OdkWebFormsProps {
readonly formXml: string;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
<script setup lang="ts">
import MediaBlockBase from '@/components/common/media/MediaBlockBase.vue';
import type { JRResourceURL } from '@getodk/common/jr-resources/JRResourceURL.ts';
import { type ObjectURL } from '@getodk/common/lib/web-compat/url.ts';
import { computed, ref, triggerRef } from 'vue';
type ObjectURL = `blob:${string}`;
defineProps<{
readonly resourceUrl?: JRResourceURL;
readonly blobUrl?: ObjectURL;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,10 @@ import type {
JRResourceURL,
JRResourceURLString,
} from '@getodk/common/jr-resources/JRResourceURL.ts';
import { createObjectURL, type ObjectURL } from '@getodk/common/lib/web-compat/url.ts';
import { computed, inject, ref, watchEffect } from 'vue';

type ObjectURL = `blob:${string}`;

const props = defineProps<{
readonly resourceUrl?: JRResourceURL;
readonly blobUrl?: ObjectURL;
Expand Down Expand Up @@ -51,7 +52,7 @@ const loadMedia = async (src?: JRResourceURL): Promise<void> => {
}

const data = await response.blob();
const url = createObjectURL(data);
const url = URL.createObjectURL(data) satisfies string as ObjectURL;
mediaCache.set(src.href, url);
setMedia(url);
} catch {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<script setup lang="ts">
import IconSVG from '@/components/common/IconSVG.vue';
import ImageBlock from '@/components/common/media/ImageBlock.vue';
import type { ObjectURL } from '@getodk/common/lib/web-compat/url.ts';
import { createObjectURL, revokeObjectURL } from '@getodk/common/lib/web-compat/url.ts';
import type { UploadNode } from '@getodk/xforms-engine';
import Button from 'primevue/button';
import { computed } from 'vue';

type ObjectURL = `blob:${string}`;

export interface UploadImagePreviewProps {
readonly question: UploadNode;
readonly isDisabled: boolean;
Expand All @@ -17,15 +17,15 @@ const props = defineProps<UploadImagePreviewProps>();

const imageURL = computed((previous: ObjectURL | null = null) => {
if (previous != null) {
revokeObjectURL(previous);
URL.revokeObjectURL(previous);
}

const file = props.question.currentState.value;
if (file == null) {
return null;
}

return createObjectURL(file);
return URL.createObjectURL(file) satisfies string as ObjectURL;
});
</script>

Expand Down
Loading