diff --git a/packages/upscalerjs/src/shared/tensor-utils.test.ts b/packages/upscalerjs/src/shared/tensor-utils.test.ts index 7cd892467..8e27f7a0b 100644 --- a/packages/upscalerjs/src/shared/tensor-utils.test.ts +++ b/packages/upscalerjs/src/shared/tensor-utils.test.ts @@ -14,13 +14,13 @@ import { import { isValidRange, isFixedShape4D, - } from '@upscalerjs/core'; + } from '../../../shared/src/constants'; import { GET_INVALID_SHAPED_TENSOR, GET_UNDEFINED_TENSORS_ERROR, } from './errors-and-warnings.js'; -import type * as core from '@upscalerjs/core'; +import type * as sharedConstants from '../../../shared/src/constants'; vi.mock('@tensorflow/tfjs-node', async () => { const tf = await vi.importActual('@tensorflow/tfjs-node') as typeof tfn; @@ -32,8 +32,8 @@ vi.mock('@tensorflow/tfjs-node', async () => { }; }); -vi.mock('@upscalerjs/core', async () => { - const { isTensor, isValidRange, isFixedShape4D, ...rest } = await vi.importActual('@upscalerjs/core') as typeof core; +vi.mock('../../../shared/src/constants', async () => { + const { isTensor, isValidRange, isFixedShape4D, ...rest } = await vi.importActual('../../../shared/src/constants') as typeof sharedConstants; return { ...rest, isTensor: vi.fn().mockImplementation(isTensor), diff --git a/packages/upscalerjs/src/shared/tensor-utils.ts b/packages/upscalerjs/src/shared/tensor-utils.ts index 5b1e203cb..3ae83a2d2 100644 --- a/packages/upscalerjs/src/shared/tensor-utils.ts +++ b/packages/upscalerjs/src/shared/tensor-utils.ts @@ -1,15 +1,17 @@ import { Tensor, Tensor3D, Tensor4D, } from '@tensorflow/tfjs-core'; -import { - Range, - Shape4D, +import { isValidRange, isThreeDimensionalTensor, isFourDimensionalTensor, isFixedShape4D, - FixedShape4D, isTensor, +} from '../../../shared/src/constants'; +import type { + Range, + Shape4D, + FixedShape4D, TF, -} from '@upscalerjs/core'; +} from '../../../shared/src/types'; import { GET_INVALID_SHAPED_TENSOR, GET_UNDEFINED_TENSORS_ERROR,