onnxruntime/js/web/lib/wasm
Yulong Wang b8917ad84f
[js/web] fix nodejs detection (#16400)
### 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.
2023-06-20 00:20:58 -07:00
..
binding [js/web] enable ONNX Runtime Web error messages in JS (#16335) 2023-06-15 09:45:41 -07:00
jsep [js/web] Added Reduce operators support (#16122) 2023-06-12 07:46:27 -07:00
proxy-worker [js/webgpu] support proxy for webgpu (#15851) 2023-05-15 16:23:13 -07:00
proxy-messages.ts [js/webgpu] support proxy for webgpu (#15851) 2023-05-15 16:23:13 -07:00
proxy-wrapper.ts [js/webgpu] support proxy for webgpu (#15851) 2023-05-15 16:23:13 -07:00
run-options.ts [js/web] enable ONNX Runtime Web error messages in JS (#16335) 2023-06-15 09:45:41 -07:00
session-handler.ts [js/web] fix nodejs detection (#16400) 2023-06-20 00:20:58 -07:00
session-options.ts [js/web] enable ONNX Runtime Web error messages in JS (#16335) 2023-06-15 09:45:41 -07:00
wasm-common.ts [js/web] enable ONNX Runtime Web error messages in JS (#16335) 2023-06-15 09:45:41 -07:00
wasm-core-impl.ts [js/web] enable ONNX Runtime Web error messages in JS (#16335) 2023-06-15 09:45:41 -07:00
wasm-factory.ts [js/web] add target ort.webgpu.min.js (#15780) 2023-05-04 10:05:39 -07:00
wasm-utils.ts [js/web] enable ONNX Runtime Web error messages in JS (#16335) 2023-06-15 09:45:41 -07:00