diff options
| author | Adam Mathes <adam@adammathes.com> | 2026-02-14 14:46:37 -0800 |
|---|---|---|
| committer | Adam Mathes <adam@adammathes.com> | 2026-02-14 14:46:37 -0800 |
| commit | afa87af01c79a9baa539f2992d32154d2a4739bd (patch) | |
| tree | 92c7416db734270a2fee1d72ee9cc119379ff8e1 /vanilla/node_modules/vitest/dist/chunks/utils.DvEY5TfP.js | |
| parent | 3b927e84d200402281f68181cd4253bc77e5528d (diff) | |
| download | neko-afa87af01c79a9baa539f2992d32154d2a4739bd.tar.gz neko-afa87af01c79a9baa539f2992d32154d2a4739bd.tar.bz2 neko-afa87af01c79a9baa539f2992d32154d2a4739bd.zip | |
task: delete vanilla js prototype\n\n- Removed vanilla/ directory and web/dist/vanilla directory\n- Updated Makefile, Dockerfile, and CI workflow to remove vanilla references\n- Cleaned up web/web.go to remove vanilla embed and routes\n- Verified build and tests pass\n\nCloses NK-2tcnmq
Diffstat (limited to 'vanilla/node_modules/vitest/dist/chunks/utils.DvEY5TfP.js')
| -rw-r--r-- | vanilla/node_modules/vitest/dist/chunks/utils.DvEY5TfP.js | 52 |
1 files changed, 0 insertions, 52 deletions
diff --git a/vanilla/node_modules/vitest/dist/chunks/utils.DvEY5TfP.js b/vanilla/node_modules/vitest/dist/chunks/utils.DvEY5TfP.js deleted file mode 100644 index a4087d5..0000000 --- a/vanilla/node_modules/vitest/dist/chunks/utils.DvEY5TfP.js +++ /dev/null @@ -1,52 +0,0 @@ -import { getSafeTimers } from '@vitest/utils/timers'; - -const NAME_WORKER_STATE = "__vitest_worker__"; -function getWorkerState() { - // @ts-expect-error untyped global - const workerState = globalThis[NAME_WORKER_STATE]; - if (!workerState) throw new Error("Vitest failed to access its internal state.\n\nOne of the following is possible:\n- \"vitest\" is imported directly without running \"vitest\" command\n- \"vitest\" is imported inside \"globalSetup\" (to fix this, use \"setupFiles\" instead, because \"globalSetup\" runs in a different context)\n- \"vitest\" is imported inside Vite / Vitest config file\n- Otherwise, it might be a Vitest bug. Please report it to https://github.com/vitest-dev/vitest/issues\n"); - return workerState; -} -function provideWorkerState(context, state) { - Object.defineProperty(context, NAME_WORKER_STATE, { - value: state, - configurable: true, - writable: true, - enumerable: false - }); - return state; -} -function isChildProcess() { - return typeof process !== "undefined" && !!process.send; -} -function resetModules(modules, resetMocks = false) { - const skipPaths = [ - /\/vitest\/dist\//, - /vitest-virtual-\w+\/dist/, - /@vitest\/dist/, - ...!resetMocks ? [/^mock:/] : [] - ]; - modules.idToModuleMap.forEach((node, path) => { - if (skipPaths.some((re) => re.test(path))) return; - node.promise = void 0; - node.exports = void 0; - node.evaluated = false; - node.importers.clear(); - }); -} -function waitNextTick() { - const { setTimeout } = getSafeTimers(); - return new Promise((resolve) => setTimeout(resolve, 0)); -} -async function waitForImportsToResolve() { - await waitNextTick(); - const state = getWorkerState(); - const promises = []; - const resolvingCount = state.resolvingModules.size; - for (const [_, mod] of state.evaluatedModules.idToModuleMap) if (mod.promise && !mod.evaluated) promises.push(mod.promise); - if (!promises.length && !resolvingCount) return; - await Promise.allSettled(promises); - await waitForImportsToResolve(); -} - -export { getWorkerState as g, isChildProcess as i, provideWorkerState as p, resetModules as r, waitForImportsToResolve as w }; |
