From d84eec387bb277b4f379f360d97bbf734cb3ae13 Mon Sep 17 00:00:00 2001 From: Sebastian Schmidt Date: Wed, 7 Dec 2022 10:50:12 -0800 Subject: [PATCH] Add missing import to InferenceCalculator.proto PiperOrigin-RevId: 493649869 --- mediapipe/calculators/tensor/inference_calculator.proto | 1 + mediapipe/tasks/web/BUILD | 3 --- mediapipe/tasks/web/rollup.config.mjs | 6 ------ package.json | 1 - yarn.lock | 8 -------- 5 files changed, 1 insertion(+), 18 deletions(-) diff --git a/mediapipe/calculators/tensor/inference_calculator.proto b/mediapipe/calculators/tensor/inference_calculator.proto index 46552803..78a0039b 100644 --- a/mediapipe/calculators/tensor/inference_calculator.proto +++ b/mediapipe/calculators/tensor/inference_calculator.proto @@ -17,6 +17,7 @@ syntax = "proto2"; package mediapipe; import "mediapipe/framework/calculator.proto"; +import "mediapipe/framework/calculator_options.proto"; option java_package = "com.google.mediapipe.calculator.proto"; option java_outer_classname = "InferenceCalculatorProto"; diff --git a/mediapipe/tasks/web/BUILD b/mediapipe/tasks/web/BUILD index 20e71743..bc9e8414 100644 --- a/mediapipe/tasks/web/BUILD +++ b/mediapipe/tasks/web/BUILD @@ -44,7 +44,6 @@ rollup_bundle( ":audio_lib", "@npm//@rollup/plugin-commonjs", "@npm//@rollup/plugin-node-resolve", - "@npm//@rollup/plugin-replace", "@npm//@rollup/plugin-terser", "@npm//google-protobuf", ], @@ -88,7 +87,6 @@ rollup_bundle( ":text_lib", "@npm//@rollup/plugin-commonjs", "@npm//@rollup/plugin-node-resolve", - "@npm//@rollup/plugin-replace", "@npm//@rollup/plugin-terser", "@npm//google-protobuf", ], @@ -132,7 +130,6 @@ rollup_bundle( ":vision_lib", "@npm//@rollup/plugin-commonjs", "@npm//@rollup/plugin-node-resolve", - "@npm//@rollup/plugin-replace", "@npm//@rollup/plugin-terser", "@npm//google-protobuf", ], diff --git a/mediapipe/tasks/web/rollup.config.mjs b/mediapipe/tasks/web/rollup.config.mjs index e633bf70..3b511953 100644 --- a/mediapipe/tasks/web/rollup.config.mjs +++ b/mediapipe/tasks/web/rollup.config.mjs @@ -1,15 +1,9 @@ import resolve from '@rollup/plugin-node-resolve'; import commonjs from '@rollup/plugin-commonjs'; -import replace from '@rollup/plugin-replace'; import terser from '@rollup/plugin-terser'; export default { plugins: [ - // Workaround for https://github.com/protocolbuffers/protobuf-javascript/issues/151 - replace({ - 'var calculator_options_pb = {};': 'var calculator_options_pb = {}; var mediapipe_framework_calculator_options_pb = calculator_options_pb;', - delimiters: ['', ''] - }), resolve(), commonjs(), terser() diff --git a/package.json b/package.json index 22a035b7..6ad0b52c 100644 --- a/package.json +++ b/package.json @@ -7,7 +7,6 @@ "@bazel/typescript": "^5.7.1", "@rollup/plugin-commonjs": "^23.0.2", "@rollup/plugin-node-resolve": "^15.0.1", - "@rollup/plugin-replace": "^5.0.1", "@rollup/plugin-terser": "^0.1.0", "@types/google-protobuf": "^3.15.6", "@types/offscreencanvas": "^2019.7.0", diff --git a/yarn.lock b/yarn.lock index 19c32e32..91b50456 100644 --- a/yarn.lock +++ b/yarn.lock @@ -148,14 +148,6 @@ is-module "^1.0.0" resolve "^1.22.1" -"@rollup/plugin-replace@^5.0.1": - version "5.0.1" - resolved "https://registry.yarnpkg.com/@rollup/plugin-replace/-/plugin-replace-5.0.1.tgz#49a57af3e6df111a9e75dea3f3572741f4c5c83e" - integrity sha512-Z3MfsJ4CK17BfGrZgvrcp/l6WXoKb0kokULO+zt/7bmcyayokDaQ2K3eDJcRLCTAlp5FPI4/gz9MHAsosz4Rag== - dependencies: - "@rollup/pluginutils" "^5.0.1" - magic-string "^0.26.4" - "@rollup/plugin-terser@^0.1.0": version "0.1.0" resolved "https://registry.yarnpkg.com/@rollup/plugin-terser/-/plugin-terser-0.1.0.tgz#7530c0f11667637419d71820461646c418526041"