Skip to content

armgit / dify

Public Imported from GitHub
0

Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.

chore: revert jsdom update (#31353)

Stephen Zhou1813b65acba2
diff --git a/web/app/components/datasets/hit-testing/index.spec.tsx b/web/app/components/datasets/hit-testing/index.spec.tsx
index 6bab3afb6ac..45c68e44b13 100644
--- a/web/app/components/datasets/hit-testing/index.spec.tsx
+++ b/web/app/components/datasets/hit-testing/index.spec.tsx
@@ -2089,7 +2089,7 @@ describe('Integration: Hit Testing Flow', () => {
isLoading: false,
} as unknown as ReturnType<typeof useDatasetTestingRecords>)
- const { container } = renderWithProviders(<HitTestingPage datasetId="dataset-1" />)
+ renderWithProviders(<HitTestingPage datasetId="dataset-1" />)
// Type query
const textarea = screen.getByRole('textbox')
@@ -2101,8 +2101,11 @@ describe('Integration: Hit Testing Flow', () => {
if (submitButton)
fireEvent.click(submitButton)
- // Verify the component is still rendered after submission
- expect(container.firstChild).toBeInTheDocument()
+ // Wait for the component to update
+ await waitFor(() => {
+ // Verify the component is still rendered
+ expect(screen.getByRole('textbox')).toBeInTheDocument()
+ })
})
it('should render ResultItem components for non-external results', async () => {
@@ -2127,7 +2130,7 @@ describe('Integration: Hit Testing Flow', () => {
isLoading: false,
} as unknown as ReturnType<typeof useDatasetTestingRecords>)
- const { container } = renderWithProviders(<HitTestingPage datasetId="dataset-1" />)
+ renderWithProviders(<HitTestingPage datasetId="dataset-1" />)
// Submit a query
const textarea = screen.getByRole('textbox')
@@ -2138,8 +2141,10 @@ describe('Integration: Hit Testing Flow', () => {
if (submitButton)
fireEvent.click(submitButton)
- // Verify component is rendered after submission
- expect(container.firstChild).toBeInTheDocument()
+ await waitFor(() => {
+ // Verify component is rendered
+ expect(screen.getByRole('textbox')).toBeInTheDocument()
+ })
})
it('should render external results when dataset is external', async () => {
diff --git a/web/package.json b/web/package.json
index 9e0d2ff0702..431aa269c1e 100644
--- a/web/package.json
+++ b/web/package.json
@@ -213,7 +213,7 @@
"eslint-plugin-storybook": "10.1.11",
"eslint-plugin-tailwindcss": "3.18.2",
"husky": "9.1.7",
- "jsdom": "27.4.0",
+ "jsdom": "27.3.0",
"jsdom-testing-mocks": "1.16.0",
"knip": "5.78.0",
"lint-staged": "15.5.2",
diff --git a/web/pnpm-lock.yaml b/web/pnpm-lock.yaml
index 9ad8cc0ed9e..922da9e6fd9 100644
--- a/web/pnpm-lock.yaml
+++ b/web/pnpm-lock.yaml
@@ -363,7 +363,7 @@ importers:
devDependencies:
'@antfu/eslint-config':
specifier: 7.0.1
'@chromatic-com/storybook':
specifier: 4.1.1
@@ -492,7 +492,7 @@ importers:
'@vitest/coverage-v8':
specifier: 4.0.17
autoprefixer:
specifier: 10.4.21
version: 10.4.21([email protected])
@@ -527,8 +527,8 @@ importers:
specifier: 9.1.7
version: 9.1.7
jsdom:
- specifier: 27.4.0
- version: 27.4.0([email protected])
+ specifier: 27.3.0
+ version: 27.3.0([email protected])
jsdom-testing-mocks:
specifier: 1.16.0
version: 1.16.0
@@ -576,7 +576,7 @@ importers:
vitest:
specifier: 4.0.17
packages:
@@ -1720,15 +1720,6 @@ packages:
resolution: {integrity: sha512-hZ2uC1jbf6JMSsF2ZklhRQqf6GLpYyux6DlzegnW/aFlpu6qJj5GO7ub7WOETCrEl6pl6DAX7RgTgj/fyG+6BQ==}
engines: {node: ^20.19.0 || ^22.13.0 || >=24}
- '@exodus/[email protected]':
- resolution: {integrity: sha512-lagqsvnk09NKogQaN/XrtlWeUF8SRhT12odMvbTIIaVObqzwAogL6jhR4DAp0gPuKoM1AOVrKUshJpRdpMFrww==}
- engines: {node: ^20.19.0 || ^22.12.0 || >=24.0.0}
- peerDependencies:
- '@noble/hashes': ^1.8.0 || ^2.0.0
- peerDependenciesMeta:
- '@noble/hashes':
- optional: true
-
'@floating-ui/[email protected]':
resolution: {integrity: sha512-sGnvb5dmrJaKEZ+LDIpguvdX3bDlEllmv4/ClQ9awcmCZrlx5jQyyMWFM5kBI+EyNOCDDiKk8il0zeuX3Zlg/w==}
@@ -5773,9 +5764,9 @@ packages:
resolution: {integrity: sha512-/gGivxi8JPKWNm/W0jSmzcMPpfpPLc3dY/6GxhX2hQ9iGj3aDfklV4ET7NjKpSinLpJ5vafa9iiGIEZg10SfBw==}
- resolution: {integrity: sha512-CV9TW3Y3f8/wT0BRFc1/KAVQ3TUHiXmaAb6VW9vtiMFf7SLoMd1PdAc4W3KFOFETBJUb90KatHqlsZMWV+R9Gg==}
- engines: {node: ^20.19.0 || ^22.12.0 || >=24.0.0}
+ resolution: {integrity: sha512-Y22oTqIU4uuPgEemfz7NDJz6OeKf12Lsu+QC+s3BVpda64lTiMYCyGwg5ki4vFxkMwQdeZDl2adZoqUgdFuTgQ==}
+ engines: {node: '>=18'}
resolution: {integrity: sha512-kig+rMn/QOVRvr7c86gQ8lWXq+Hkv6CbAH1hLu+RG338StTpE8Z0b44SDVaqVu7HGKf27frdmUYEs9hTUX/cLQ==}
@@ -6105,8 +6096,8 @@ packages:
resolution: {integrity: sha512-wLrulXiLpjmcUYOYGEvz4XARkrmdVpyxzdBl9IAMbQ+ib2/UhUTRCn49McdNfXLff2ysGBUms49ZKX0LR1Q0gg==}
engines: {node: '>=14'}
- resolution: {integrity: sha512-mjzqwWRD9Y1J1KUi7W97Gja1bwOOM5Ug0EZ6UDK3xS7j7mndrkwozHtSblfomlzyB4NepioNt+B2sOSzczVgtQ==}
+ resolution: {integrity: sha512-GtldT42B8+jefDUC4yUKAvsaOrH7PDHmZxZXNgF2xMmymjUbRYJvpAybZAKEmXDGTM0mCsz8duOa4vTm5AY2Kg==}
engines: {node: ^20.19.0 || ^22.12.0 || >=24.0.0}
peerDependencies:
canvas: ^3.2.0
@@ -8480,6 +8471,11 @@ packages:
webpack-cli:
optional: true
+ resolution: {integrity: sha512-6qN4hJdMwfYBtE3YBTTHhoeuUrDBPZmbQaxWAqSALV/MeEnR5z1xd8UKud2RAkFoPkmB+hli1TZSnyi84xz1vQ==}
+ engines: {node: '>=18'}
+ deprecated: Use @exodus/bytes instead for a more spec-conformant and faster implementation
+
resolution: {integrity: sha512-nt+N2dzIutVRxARx1nghPKGv1xHikU7HKdfafKkLNLindmPU/ch3U31NOCGGA/dmPcmb1VlofO0vnKAcsm0o/Q==}
engines: {node: '>=12'}
@@ -8809,7 +8805,7 @@ snapshots:
idb: 8.0.3
tslib: 2.8.1
dependencies:
'@antfu/install-pkg': 1.1.0
'@clack/prompts': 0.11.0
@@ -8818,7 +8814,7 @@ snapshots:
'@stylistic/eslint-plugin': 5.7.0([email protected]([email protected]))
'@typescript-eslint/parser': 8.53.0([email protected]([email protected]))([email protected])
ansis: 4.2.0
cac: 6.7.14
eslint: 9.39.2([email protected])
@@ -10065,8 +10061,6 @@ snapshots:
'@eslint/core': 1.0.1
levn: 0.4.1
- '@exodus/[email protected]': {}
-
'@floating-ui/[email protected]':
dependencies:
'@floating-ui/utils': 0.2.10
@@ -12368,7 +12362,7 @@ snapshots:
transitivePeerDependencies:
- supports-color
dependencies:
'@bcoe/v8-coverage': 1.0.2
'@vitest/utils': 4.0.17
@@ -12380,16 +12374,16 @@ snapshots:
obug: 2.1.1
std-env: 3.10.0
tinyrainbow: 3.0.3
dependencies:
'@typescript-eslint/scope-manager': 8.53.0
'@typescript-eslint/utils': 8.53.0([email protected]([email protected]))([email protected])
eslint: 9.39.2([email protected])
optionalDependencies:
typescript: 5.9.3
transitivePeerDependencies:
- supports-color
@@ -14664,11 +14658,9 @@ snapshots:
dependencies:
react-is: 16.13.1
dependencies:
- '@exodus/bytes': 1.9.0
- transitivePeerDependencies:
- - '@noble/hashes'
+ whatwg-encoding: 3.1.1
@@ -14935,15 +14927,14 @@ snapshots:
bezier-easing: 2.1.0
css-mediaquery: 0.1.2
dependencies:
'@acemir/cssom': 0.9.31
'@asamuzakjp/dom-selector': 6.7.6
- '@exodus/bytes': 1.9.0
cssstyle: 5.3.7
data-urls: 6.0.1
decimal.js: 10.6.0
- html-encoding-sniffer: 6.0.0
+ html-encoding-sniffer: 4.0.0
http-proxy-agent: 7.0.2
https-proxy-agent: 7.0.6
is-potential-custom-element-name: 1.0.1
@@ -14953,6 +14944,7 @@ snapshots:
tough-cookie: 6.0.0
w3c-xmlserializer: 5.0.0
webidl-conversions: 8.0.1
+ whatwg-encoding: 3.1.1
whatwg-mimetype: 4.0.0
whatwg-url: 15.1.0
ws: 8.19.0
@@ -14960,7 +14952,6 @@ snapshots:
optionalDependencies:
canvas: 3.2.0
transitivePeerDependencies:
- - '@noble/hashes'
- bufferutil
- supports-color
- utf-8-validate
@@ -17681,7 +17672,7 @@ snapshots:
tsx: 4.21.0
yaml: 2.8.2
dependencies:
'@vitest/expect': 4.0.17
@@ -17706,7 +17697,7 @@ snapshots:
optionalDependencies:
'@types/node': 18.15.0
happy-dom: 20.0.11
- jsdom: 27.4.0([email protected])
+ jsdom: 27.3.0([email protected])
transitivePeerDependencies:
- jiti
- less
@@ -17843,6 +17834,10 @@ snapshots:
- esbuild
- uglify-js
+ dependencies:
+ iconv-lite: 0.6.3
+
optional: true