feat(worker): support dynamic worker option fields #22555
ci.yml
on: pull_request
Get changed files
4s
Lint: node-20, ubuntu-latest
1m 50s
Matrix: test
Build & Test Passed or Skipped
0s
Build & Test Failed
0s
Annotations
10 errors and 6 warnings
packages/vite/src/node/__tests__/plugins/workerImportMetaUrl.spec.ts > workerImportMetaUrlPlugin > without worker options:
packages/vite/src/node/__tests__/plugins/workerImportMetaUrl.spec.ts#L29
Error: Snapshot `workerImportMetaUrlPlugin > without worker options 1` mismatched
Expected: ""new Worker(new URL(/* @vite-ignore */ "/worker.js?worker_file&type=classic", import.meta.url))""
Received: ""new Worker(new URL(/* @vite-ignore */ "/@fs/D:/a/vite/vite/worker.js?worker_file&type=classic", import.meta.url))""
❯ packages/vite/src/node/__tests__/plugins/workerImportMetaUrl.spec.ts:29:7
|
packages/vite/src/node/__tests__/plugins/workerImportMetaUrl.spec.ts > workerImportMetaUrlPlugin > with shared worker:
packages/vite/src/node/__tests__/plugins/workerImportMetaUrl.spec.ts#L39
Error: Snapshot `workerImportMetaUrlPlugin > with shared worker 1` mismatched
Expected: ""new SharedWorker(new URL(/* @vite-ignore */ "/worker.js?worker_file&type=classic", import.meta.url))""
Received: ""new SharedWorker(new URL(/* @vite-ignore */ "/@fs/D:/a/vite/vite/worker.js?worker_file&type=classic", import.meta.url))""
❯ packages/vite/src/node/__tests__/plugins/workerImportMetaUrl.spec.ts:39:7
|
packages/vite/src/node/__tests__/plugins/workerImportMetaUrl.spec.ts > workerImportMetaUrlPlugin > with static worker options:
packages/vite/src/node/__tests__/plugins/workerImportMetaUrl.spec.ts#L49
Error: Snapshot `workerImportMetaUrlPlugin > with static worker options 1` mismatched
Expected: ""new Worker(new URL(/* @vite-ignore */ "/worker.js?worker_file&type=module", import.meta.url), { type: "module", name: "worker1" })""
Received: ""new Worker(new URL(/* @vite-ignore */ "/@fs/D:/a/vite/vite/worker.js?worker_file&type=module", import.meta.url), { type: "module", name: "worker1" })""
❯ packages/vite/src/node/__tests__/plugins/workerImportMetaUrl.spec.ts:49:7
|
packages/vite/src/node/__tests__/plugins/workerImportMetaUrl.spec.ts > workerImportMetaUrlPlugin > with dynamic name field in worker options:
packages/vite/src/node/__tests__/plugins/workerImportMetaUrl.spec.ts#L59
Error: Snapshot `workerImportMetaUrlPlugin > with dynamic name field in worker options 1` mismatched
Expected: ""const id = 1; new Worker(new URL(/* @vite-ignore */ "/worker.js?worker_file&type=classic", import.meta.url), { name: "worker" + id })""
Received: ""const id = 1; new Worker(new URL(/* @vite-ignore */ "/@fs/D:/a/vite/vite/worker.js?worker_file&type=classic", import.meta.url), { name: "worker" + id })""
❯ packages/vite/src/node/__tests__/plugins/workerImportMetaUrl.spec.ts:59:7
|
packages/vite/src/node/__tests__/plugins/workerImportMetaUrl.spec.ts > workerImportMetaUrlPlugin > with dynamic name field and static type in worker options:
packages/vite/src/node/__tests__/plugins/workerImportMetaUrl.spec.ts#L69
Error: Snapshot `workerImportMetaUrlPlugin > with dynamic name field and static type in worker options 1` mismatched
Expected: ""const id = 1; new Worker(new URL(/* @vite-ignore */ "/worker.js?worker_file&type=module", import.meta.url), { name: "worker" + id, type: "module" })""
Received: ""const id = 1; new Worker(new URL(/* @vite-ignore */ "/@fs/D:/a/vite/vite/worker.js?worker_file&type=module", import.meta.url), { name: "worker" + id, type: "module" })""
❯ packages/vite/src/node/__tests__/plugins/workerImportMetaUrl.spec.ts:69:7
|
Build&Test: node-22, windows-latest
Process completed with exit code 1.
|
Build&Test: node-22, ubuntu-latest
Process completed with exit code 1.
|
Build&Test: node-18, ubuntu-latest
Process completed with exit code 1.
|
Build&Test: node-20, ubuntu-latest
Process completed with exit code 1.
|
Build&Test: node-22, macos-latest
Process completed with exit code 1.
|
Get changed files
ubuntu-latest pipelines will use ubuntu-24.04 soon. For more details, see https://github.com/actions/runner-images/issues/10636
|
Lint: node-20, ubuntu-latest
ubuntu-latest pipelines will use ubuntu-24.04 soon. For more details, see https://github.com/actions/runner-images/issues/10636
|
Build&Test: node-22, ubuntu-latest
ubuntu-latest pipelines will use ubuntu-24.04 soon. For more details, see https://github.com/actions/runner-images/issues/10636
|
Build&Test: node-18, ubuntu-latest
ubuntu-latest pipelines will use ubuntu-24.04 soon. For more details, see https://github.com/actions/runner-images/issues/10636
|
Build&Test: node-20, ubuntu-latest
ubuntu-latest pipelines will use ubuntu-24.04 soon. For more details, see https://github.com/actions/runner-images/issues/10636
|
Build & Test Failed
ubuntu-latest pipelines will use ubuntu-24.04 soon. For more details, see https://github.com/actions/runner-images/issues/10636
|