mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-05-16 21:00:14 +00:00
### Description We used to use `typeof fetch === 'undefined'` as condition to detect the environment is Node.js or not. Before Node.js v18, this works. However, in Node.js v18, it introduced `fetch` function, so this check does not work any more. This PR changes the condition to check whether `process`, `process.versions` and `process.versions.node` exists. Checking whether `process` exists is not enough. This is because in some configuration, webpack may polyfill nodejs's process. |
||
|---|---|---|
| .. | ||
| data/ops | ||
| e2e | ||
| unittests | ||
| suite-test-list.jsonc | ||
| test-main.ts | ||
| test-runner.ts | ||
| test-shared.ts | ||
| test-types.ts | ||