Skip to content

Commit e0a8dac

Browse files
guschmueCopilot
andauthored
rev some npm packages (#28547)
rev some npm packages --------- Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
1 parent 97cfc86 commit e0a8dac

38 files changed

Lines changed: 6612 additions & 12929 deletions

js/README.md

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,9 @@ Please follow the steps described below to setup development environment.
2727
- Node.js (20.0+): https://nodejs.org/ - (Optional) Use nvm ([Windows](https://github.com/coreybutler/nvm-windows) / [Mac/Linux](https://github.com/creationix/nvm)) to install Node.js
2828

2929
- Python (3.9+): https://www.python.org/downloads/
30-
3130
- python should be added to the PATH environment variable
3231

3332
- Visual Studio Code: https://code.visualstudio.com/
34-
3533
- **required** extension: [ESLint](https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint)
3634
- **required** extension: [Prettier](https://marketplace.visualstudio.com/items?itemName=SimonSiefke.prettier-vscode)
3735
- **required** extension: [JavaScript Debugger](https://marketplace.visualstudio.com/items?itemName=ms-vscode.js-debug-nightly)
@@ -294,13 +292,11 @@ From ORT v1.19 onwards, the ONNX Runtime Mobile packages are no longer published
294292
### Build
295293

296294
1. Install NPM packages for ONNX Runtime common JavaScript library and required React Native JavaScript libraries
297-
298295
- in `<ORT_ROOT>/js/`, run `npm ci`.
299296
- in `<ORT_ROOT>/js/common/`, run `npm ci`.
300297
- in `<ORT_ROOT>/js/react_native/`, run `yarn`.
301298

302299
2. Acquire or build the Android ONNX Runtime package
303-
304300
1. To use a published Android ONNX Runtime package from Maven, go to step 5.
305301

306302
2. Set up an Android build environment using these [instructions](https://onnxruntime.ai/docs/build/android.html). Note that the dependencies are quite convoluted, so using the specified JDK and Gradle versions is important.
@@ -326,7 +322,6 @@ From ORT v1.19 onwards, the ONNX Runtime Mobile packages are no longer published
326322
```
327323

328324
3. Build iOS ONNX Runtime package
329-
330325
1. To use the published C/C++ ONNX Runtime package from CocoaPods, skip all steps below.
331326

332327
2. Set up iOS build environment using these [instructions](https://onnxruntime.ai/docs/build/ios.html).
@@ -371,7 +366,6 @@ From ORT v1.19 onwards, the ONNX Runtime Mobile packages are no longer published
371366
- Run E2E Testing with Detox framework
372367

373368
When testing with integrated [Detox](https://wix.github.io/Detox/docs/next/introduction/getting-started) framework for Android and iOS e2e apps:
374-
375369
- Detox prerequisites:
376370

377371
Install detox command line tools:
@@ -388,7 +382,6 @@ From ORT v1.19 onwards, the ONNX Runtime Mobile packages are no longer published
388382
```
389383
390384
Main Detox project files:
391-
392385
- `.detoxrc.js` -Detox config file;
393386
- `e2e/jest.config.js` -Jest configuration;
394387
- `e2e/OnnxruntimeModuleExample.test.js` - initial react native onnxruntimemodule e2e detox test.

js/common/lib/env-impl.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ type LogLevelType = Env['logLevel'];
99
let logLevelValue: Required<LogLevelType> = 'warning';
1010

1111
export const env: Env = {
12-
wasm: {} as Env.WebAssemblyFlags,
12+
wasm: {},
1313
webgl: {} as Env.WebGLFlags,
1414
webgpu: {} as Env.WebGpuFlags,
1515
versions: { common: version },

js/common/lib/inference-session.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ export declare namespace InferenceSession {
2727
* - An array of string indicating the output names.
2828
* - An object that use output names as keys and OnnxValue or null as corresponding values.
2929
*
30-
* @remark
30+
* @remarks
3131
* different from input argument, in output, OnnxValue is optional. If an OnnxValue is present it will be
3232
* used as a pre-allocated value by the inference engine; if omitted, inference engine will allocate buffer
3333
* internally.
@@ -311,7 +311,8 @@ export declare namespace InferenceSession {
311311
* @see https://www.w3.org/TR/webnn/#dom-ml-createcontext
312312
*/
313313
export interface WebNNOptionsWithMLContext
314-
extends WebNNExecutionProviderName,
314+
extends
315+
WebNNExecutionProviderName,
315316
Omit<WebNNContextOptions, 'deviceType'>,
316317
Required<Pick<WebNNContextOptions, 'deviceType'>> {
317318
context: TryGetGlobalType<'MLContext'>;

js/common/lib/tensor-factory-impl.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,7 @@ import { Tensor } from './tensor-impl.js';
1919
import { Tensor as TensorInterface } from './tensor.js';
2020

2121
interface BufferToTensorOptions
22-
extends OptionsDimensions,
23-
OptionsTensorLayout,
24-
OptionsNormalizationParameters,
25-
OptionsFormat,
26-
OptionsTensorFormat {}
22+
extends OptionsDimensions, OptionsTensorLayout, OptionsNormalizationParameters, OptionsFormat, OptionsTensorFormat {}
2723

2824
/**
2925
* Create a new tensor object from image object

js/common/lib/tensor-factory.ts

Lines changed: 17 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,9 @@ interface GpuResourceConstructorParameters<T extends Tensor.Type> {
4242
/**
4343
* represent the parameter for constructing a tensor from a pinned CPU buffer
4444
*/
45-
export interface CpuPinnedConstructorParameters<T extends Tensor.CpuPinnedDataTypes = Tensor.CpuPinnedDataTypes>
46-
extends CommonConstructorParameters<T> {
45+
export interface CpuPinnedConstructorParameters<
46+
T extends Tensor.CpuPinnedDataTypes = Tensor.CpuPinnedDataTypes,
47+
> extends CommonConstructorParameters<T> {
4748
/**
4849
* Specify the location of the data to be 'cpu-pinned'.
4950
*/
@@ -58,8 +59,7 @@ export interface CpuPinnedConstructorParameters<T extends Tensor.CpuPinnedDataTy
5859
* represent the parameter for constructing a tensor from a WebGL texture
5960
*/
6061
export interface TextureConstructorParameters<T extends Tensor.TextureDataTypes = Tensor.TextureDataTypes>
61-
extends CommonConstructorParameters<T>,
62-
GpuResourceConstructorParameters<T> {
62+
extends CommonConstructorParameters<T>, GpuResourceConstructorParameters<T> {
6363
/**
6464
* Specify the location of the data to be 'texture'.
6565
*/
@@ -74,8 +74,7 @@ export interface TextureConstructorParameters<T extends Tensor.TextureDataTypes
7474
* represent the parameter for constructing a tensor from a WebGPU buffer
7575
*/
7676
export interface GpuBufferConstructorParameters<T extends Tensor.GpuBufferDataTypes = Tensor.GpuBufferDataTypes>
77-
extends CommonConstructorParameters<T>,
78-
GpuResourceConstructorParameters<T> {
77+
extends CommonConstructorParameters<T>, GpuResourceConstructorParameters<T> {
7978
/**
8079
* Specify the location of the data to be 'gpu-buffer'.
8180
*/
@@ -87,8 +86,7 @@ export interface GpuBufferConstructorParameters<T extends Tensor.GpuBufferDataTy
8786
}
8887

8988
export interface MLTensorConstructorParameters<T extends Tensor.MLTensorDataTypes = Tensor.MLTensorDataTypes>
90-
extends CommonConstructorParameters<T>,
91-
GpuResourceConstructorParameters<T> {
89+
extends CommonConstructorParameters<T>, GpuResourceConstructorParameters<T> {
9290
/**
9391
* Specify the location of the data to be 'ml-tensor'.
9492
*/
@@ -191,51 +189,51 @@ export interface OptionsNormalizationParameters {
191189
// #region Options composition
192190

193191
export interface TensorFromImageDataOptions
194-
extends OptionResizedDimensions,
192+
extends
193+
OptionResizedDimensions,
195194
OptionsTensorFormat,
196195
OptionsTensorLayout,
197196
OptionsTensorDataType,
198197
OptionsNormalizationParameters {}
199198

200199
export interface TensorFromImageElementOptions
201-
extends OptionResizedDimensions,
200+
extends
201+
OptionResizedDimensions,
202202
OptionsTensorFormat,
203203
OptionsTensorLayout,
204204
OptionsTensorDataType,
205205
OptionsNormalizationParameters {}
206206

207207
export interface TensorFromUrlOptions
208-
extends OptionsDimensions,
208+
extends
209+
OptionsDimensions,
209210
OptionResizedDimensions,
210211
OptionsTensorFormat,
211212
OptionsTensorLayout,
212213
OptionsTensorDataType,
213214
OptionsNormalizationParameters {}
214215

215216
export interface TensorFromImageBitmapOptions
216-
extends OptionResizedDimensions,
217+
extends
218+
OptionResizedDimensions,
217219
OptionsTensorFormat,
218220
OptionsTensorLayout,
219221
OptionsTensorDataType,
220222
OptionsNormalizationParameters {}
221223

222224
export interface TensorFromTextureOptions<T extends Tensor.TextureDataTypes>
223-
extends Required<OptionsDimensions>,
224-
OptionsFormat,
225-
GpuResourceConstructorParameters<T> /* TODO: add more */ {}
225+
extends Required<OptionsDimensions>, OptionsFormat, GpuResourceConstructorParameters<T> /* TODO: add more */ {}
226226

227227
export interface TensorFromGpuBufferOptions<T extends Tensor.GpuBufferDataTypes>
228-
extends Pick<Tensor, 'dims'>,
229-
GpuResourceConstructorParameters<T> {
228+
extends Pick<Tensor, 'dims'>, GpuResourceConstructorParameters<T> {
230229
/**
231230
* Describes the data type of the tensor.
232231
*/
233232
dataType?: T;
234233
}
235234

236235
export interface TensorFromMLTensorOptions<T extends Tensor.MLTensorDataTypes>
237-
extends Pick<Tensor, 'dims'>,
238-
GpuResourceConstructorParameters<T> {
236+
extends Pick<Tensor, 'dims'>, GpuResourceConstructorParameters<T> {
239237
/**
240238
* Describes the data type of the tensor.
241239
*/

0 commit comments

Comments
 (0)