diff --git a/CHANGELOG.md b/CHANGELOG.md index 3fce7b9e..7ab2a517 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,8 +9,9 @@ ## Changelog -### **HEAD -> main** 2021/10/21 mandic00@live.com +### **HEAD -> main** 2021/10/22 mandic00@live.com +- add optional autodetected custom wasm path ### **2.3.6** 2021/10/21 mandic00@live.com diff --git a/build.json b/build.json index 293edc0b..f47033f6 100644 --- a/build.json +++ b/build.json @@ -33,6 +33,8 @@ "global": { "target": "es2018", "sourcemap": false, + "treeShaking": true, + "ignoreAnnotations": true, "banner": { "js": "/*\n Human\n homepage: \n author: '\n*/\n" } }, "targets": [ diff --git a/package.json b/package.json index aeb2e5a9..c60b3189 100644 --- a/package.json +++ b/package.json @@ -86,5 +86,8 @@ "tslib": "^2.3.1", "typedoc": "0.22.6", "typescript": "4.4.4" + }, + "dependencies": { + "long": "^4.0.0" } } diff --git a/src/tfjs/types.ts b/src/tfjs/types.ts index 45caaa78..e4d8fd47 100644 --- a/src/tfjs/types.ts +++ b/src/tfjs/types.ts @@ -11,3 +11,8 @@ export { Tensor } from '@tensorflow/tfjs-core/dist/index'; * @external */ export { GraphModel } from '@tensorflow/tfjs-converter/dist/index'; + +/** Tensorflow Long type + * @external + */ +export { Long } from 'long'; diff --git a/tfjs/tf-browser.ts b/tfjs/tf-browser.ts index 003e1d78..fb500de8 100644 --- a/tfjs/tf-browser.ts +++ b/tfjs/tf-browser.ts @@ -9,7 +9,11 @@ export * from '@tensorflow/tfjs-backend-webgl/dist/index.js'; export * from '@tensorflow/tfjs-backend-wasm/dist/index.js'; // add webgpu to bundle, experimental -export * from '@tensorflow/tfjs-backend-webgpu/dist/index.js'; +// export * from '@tensorflow/tfjs-backend-webgpu/dist/index.js'; // export versions, overrides version object from @tensorflow/tfjs export { version } from '../dist/tfjs.version.js'; + +// export utility types used by Human +export { Tensor } from '@tensorflow/tfjs/dist/index.js'; +export { GraphModel } from '@tensorflow/tfjs-converter/dist/index'; diff --git a/tsconfig.json b/tsconfig.json index de41e5d1..aa352137 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -5,7 +5,7 @@ "moduleResolution": "node", "outDir": "types", "baseUrl": "./", - "paths": { "tslib": ["node_modules/tslib/tslib.d.ts"] }, + "paths": { "tslib": ["./node_modules/tslib/tslib.d.ts"] }, "allowJs": true, "allowSyntheticDefaultImports": false, "allowUnreachableCode": false, @@ -14,7 +14,7 @@ "declaration": true, "declarationMap": true, "emitDecoratorMetadata": true, - "esModuleInterop": false, + "esModuleInterop": true, "exactOptionalPropertyTypes": true, "experimentalDecorators": true, "forceConsistentCasingInFileNames": true,