From c808d4e0cedd3dc99bb09e947c340ed6175b5a41 Mon Sep 17 00:00:00 2001 From: Daniel Hauschildt Date: Wed, 7 Feb 2024 14:56:12 +0100 Subject: [PATCH] release: v1.4.4 --- package-lock.json | 16 +++++++++++----- package.json | 2 +- packages/node-e2e/package.json | 4 ++-- packages/node-examples/package.json | 4 ++-- ...5710-Bumped_onnx_runtime_to_1_17_Changed.yaml | 2 +- ...Changed_license_from_GPL_to_AGPL_Changed.yaml | 2 +- packages/node/package.json | 4 ++-- packages/web-data/package.json | 4 ++-- .../web-examples/create-react-app/package.json | 4 ++-- packages/web-examples/vite-project/package.json | 4 ++-- packages/web/README.md | 2 +- ...5710-Bumped_onnx_runtime_to_1_17_Changed.yaml | 2 +- ...Changed_license_from_GPL_to_AGPL_Changed.yaml | 2 +- packages/web/package.json | 5 +++-- packages/web/src/inference.ts | 4 +++- packages/web/src/schema.ts | 2 +- 16 files changed, 36 insertions(+), 27 deletions(-) diff --git a/package-lock.json b/package-lock.json index bb5ff63..7838abe 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "workspace", - "version": "1.4.2", + "version": "1.4.4", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "workspace", - "version": "1.4.2", + "version": "1.4.4", "workspaces": [ "packages/web", "packages/web-data", @@ -622,6 +622,11 @@ "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.202.tgz", "integrity": "sha512-OvlIYQK9tNneDlS0VN54LLd5uiPCBOp7gS5Z0f1mjoJYBrtStzgmJBxONW3U6OZqdtNzZPmn9BS/7WI7BFFcFQ==" }, + "node_modules/@types/ndarray": { + "version": "1.0.14", + "resolved": "https://registry.npmjs.org/@types/ndarray/-/ndarray-1.0.14.tgz", + "integrity": "sha512-oANmFZMnFQvb219SSBIhI1Ih/r4CvHDOzkWyJS/XRqkMrGH5/kaPSA1hQhdIBzouaE+5KpE/f5ylI9cujmckQg==" + }, "node_modules/@types/node": { "version": "20.10.6", "resolved": "https://registry.npmjs.org/@types/node/-/node-20.10.6.tgz", @@ -4708,7 +4713,7 @@ }, "packages/node": { "name": "@imgly/background-removal-node", - "version": "1.4.2", + "version": "1.4.4", "license": "SEE LICENSE IN LICENSE.md", "dependencies": { "@types/lodash": "^4.14.195", @@ -4737,10 +4742,11 @@ }, "packages/web": { "name": "@imgly/background-removal", - "version": "1.4.2", + "version": "1.4.4", "license": "SEE LICENSE IN LICENSE.md", "dependencies": { "@types/lodash": "~4.14.0", + "@types/ndarray": "~1.0.14", "@types/node": "~20.3.0", "lodash": "~4.17.0", "ndarray": "~1.0.0", @@ -4763,7 +4769,7 @@ }, "packages/web-data": { "name": "@imgly/background-removal-data", - "version": "1.4.2", + "version": "1.4.4", "license": "SEE LICENSE IN LICENSE.md", "dependencies": { "onnxruntime-web": "~1.17.0" diff --git a/package.json b/package.json index 7138ee0..7ad91bb 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "version": "1.4.3", + "version": "1.4.4", "name": "workspace", "workspaces": [ "packages/web", diff --git a/packages/node-e2e/package.json b/packages/node-e2e/package.json index 7940027..815ff1e 100644 --- a/packages/node-e2e/package.json +++ b/packages/node-e2e/package.json @@ -6,5 +6,5 @@ "@imgly/background-removal-node": "file:../node", "jest": "^29.6.2" }, - "version": "1.4.3" -} \ No newline at end of file + "version": "1.4.4" +} diff --git a/packages/node-examples/package.json b/packages/node-examples/package.json index 78f8e7b..4ded5e5 100644 --- a/packages/node-examples/package.json +++ b/packages/node-examples/package.json @@ -8,5 +8,5 @@ "dependencies": { "@imgly/background-removal-node": "file:../node" }, - "version": "1.4.3" -} \ No newline at end of file + "version": "1.4.4" +} diff --git a/packages/node/changelog/1.4.0/20240702115710-Bumped_onnx_runtime_to_1_17_Changed.yaml b/packages/node/changelog/1.4.0/20240702115710-Bumped_onnx_runtime_to_1_17_Changed.yaml index 0c66fb5..a768d10 100644 --- a/packages/node/changelog/1.4.0/20240702115710-Bumped_onnx_runtime_to_1_17_Changed.yaml +++ b/packages/node/changelog/1.4.0/20240702115710-Bumped_onnx_runtime_to_1_17_Changed.yaml @@ -6,4 +6,4 @@ type: Added # type: Security # private: true description: | - Bumped onnx runtime to 1.17 Changed + Bumped onnx runtime to 1.17 Changed diff --git a/packages/node/changelog/1.4.0/20240702115731-Changed_license_from_GPL_to_AGPL_Changed.yaml b/packages/node/changelog/1.4.0/20240702115731-Changed_license_from_GPL_to_AGPL_Changed.yaml index d9ef1b3..9a5d18d 100644 --- a/packages/node/changelog/1.4.0/20240702115731-Changed_license_from_GPL_to_AGPL_Changed.yaml +++ b/packages/node/changelog/1.4.0/20240702115731-Changed_license_from_GPL_to_AGPL_Changed.yaml @@ -6,4 +6,4 @@ type: Added # type: Security # private: true description: | - Changed license from GPL to AGPL Changed + Changed license from GPL to AGPL Changed diff --git a/packages/node/package.json b/packages/node/package.json index ad720fc..0b4a593 100644 --- a/packages/node/package.json +++ b/packages/node/package.json @@ -1,6 +1,6 @@ { "name": "@imgly/background-removal-node", - "version": "1.4.3", + "version": "1.4.4", "description": "Background Removal in NodeJS", "resources": "@imgly/background-removal-node", "keywords": [ @@ -81,4 +81,4 @@ "webpack": "^5.85.1", "webpack-cli": "^5.1.4" } -} \ No newline at end of file +} diff --git a/packages/web-data/package.json b/packages/web-data/package.json index 53b83e0..0ad07e6 100644 --- a/packages/web-data/package.json +++ b/packages/web-data/package.json @@ -1,6 +1,6 @@ { "name": "@imgly/background-removal-data", - "version": "1.4.3", + "version": "1.4.4", "description": "Background Removal Data", "keywords": [ "background-removal", @@ -46,4 +46,4 @@ "dependencies": { "onnxruntime-web": "~1.17.0" } -} \ No newline at end of file +} diff --git a/packages/web-examples/create-react-app/package.json b/packages/web-examples/create-react-app/package.json index 9bc35e2..8f8e683 100644 --- a/packages/web-examples/create-react-app/package.json +++ b/packages/web-examples/create-react-app/package.json @@ -1,6 +1,6 @@ { "name": "test", - "version": "1.4.3", + "version": "1.4.4", "private": true, "dependencies": { "@imgly/background-removal": "file:../../web", @@ -35,4 +35,4 @@ "last 1 safari version" ] } -} \ No newline at end of file +} diff --git a/packages/web-examples/vite-project/package.json b/packages/web-examples/vite-project/package.json index 9eeb92f..b2be729 100644 --- a/packages/web-examples/vite-project/package.json +++ b/packages/web-examples/vite-project/package.json @@ -1,7 +1,7 @@ { "name": "vite-project", "private": true, - "version": "1.4.3", + "version": "1.4.4", "type": "module", "scripts": { "start": "npm run dev", @@ -20,4 +20,4 @@ "vite": "^4.3.9", "vue-tsc": "^1.4.2" } -} \ No newline at end of file +} diff --git a/packages/web/README.md b/packages/web/README.md index d7c6a77..02436ab 100644 --- a/packages/web/README.md +++ b/packages/web/README.md @@ -56,7 +56,7 @@ The library does not need any configuration to get started. However, there are o ```typescript type Config = { - publicPath: string; // The public path used for model and wasm files. Default: 'https://staticimgly.com/${PACKAGE_NAME}-data/@${PACKAGE_VERSION}/dist/' + publicPath: string; // The public path used for model and wasm files. Default: 'https://staticimgly.com/${PACKAGE_NAME}-data/${PACKAGE_VERSION}/dist/' debug: bool; // enable or disable useful console.log outputs proxyToWorker: bool; // Whether to proxy the calculations to a web worker. (Default true) model: 'small' | 'medium'; // The model to use. (Default "medium") diff --git a/packages/web/changelog/1.4.0/20240702115710-Bumped_onnx_runtime_to_1_17_Changed.yaml b/packages/web/changelog/1.4.0/20240702115710-Bumped_onnx_runtime_to_1_17_Changed.yaml index 0c66fb5..a768d10 100644 --- a/packages/web/changelog/1.4.0/20240702115710-Bumped_onnx_runtime_to_1_17_Changed.yaml +++ b/packages/web/changelog/1.4.0/20240702115710-Bumped_onnx_runtime_to_1_17_Changed.yaml @@ -6,4 +6,4 @@ type: Added # type: Security # private: true description: | - Bumped onnx runtime to 1.17 Changed + Bumped onnx runtime to 1.17 Changed diff --git a/packages/web/changelog/1.4.0/20240702115731-Changed_license_from_GPL_to_AGPL_Changed.yaml b/packages/web/changelog/1.4.0/20240702115731-Changed_license_from_GPL_to_AGPL_Changed.yaml index d9ef1b3..9a5d18d 100644 --- a/packages/web/changelog/1.4.0/20240702115731-Changed_license_from_GPL_to_AGPL_Changed.yaml +++ b/packages/web/changelog/1.4.0/20240702115731-Changed_license_from_GPL_to_AGPL_Changed.yaml @@ -6,4 +6,4 @@ type: Added # type: Security # private: true description: | - Changed license from GPL to AGPL Changed + Changed license from GPL to AGPL Changed diff --git a/packages/web/package.json b/packages/web/package.json index 98c8a11..80e6b13 100644 --- a/packages/web/package.json +++ b/packages/web/package.json @@ -1,6 +1,6 @@ { "name": "@imgly/background-removal", - "version": "1.4.3", + "version": "1.4.4", "description": "Background Removal in the Browser", "keywords": [ "background-removal", @@ -60,6 +60,7 @@ "dependencies": { "@types/lodash": "~4.14.0", "@types/node": "~20.3.0", + "@types/ndarray": "~1.0.14", "lodash": "~4.17.0", "ndarray": "~1.0.0", "onnxruntime-web": "~1.17.0", @@ -78,4 +79,4 @@ "webpack": "~5.85.0", "webpack-cli": "~5.1.0" } -} \ No newline at end of file +} diff --git a/packages/web/src/inference.ts b/packages/web/src/inference.ts index 2b5283b..36e24cb 100644 --- a/packages/web/src/inference.ts +++ b/packages/web/src/inference.ts @@ -8,7 +8,9 @@ import { loadAsBlob } from './resource'; import ndarray, { NdArray } from 'ndarray'; import { convertFloat32ToUint8 } from './utils'; -async function initInference(config?: Config): Promise<{ config: Config, session: unknown }> { +async function initInference( + config?: Config +): Promise<{ config: Config; session: unknown }> { config = validateConfig(config); if (config.debug) console.debug('Loading model...'); diff --git a/packages/web/src/schema.ts b/packages/web/src/schema.ts index 711f28a..2f8c508 100644 --- a/packages/web/src/schema.ts +++ b/packages/web/src/schema.ts @@ -11,7 +11,7 @@ const ConfigSchema = z .optional() .describe('The public path to the wasm files and the onnx model.') .default( - 'https://staticimgly.com/@imgly/background-removal-data/@${PACKAGE_VERSION}/dist/' + 'https://staticimgly.com/@imgly/background-removal-data/${PACKAGE_VERSION}/dist/' ) .transform((val) => { return val