fix(schema-utils): typescript + typebox package resolution issue

This commit is contained in:
Tomas Martykan
2024-10-17 16:00:50 +02:00
committed by Tomáš Martykán
parent 24931a9657
commit cc22068b2a
2 changed files with 1 additions and 12 deletions

View File

@@ -121,4 +121,4 @@ export function AssertWeak<T extends TSchema>(
export const Type = new CustomTypeBuilder();
export { Optional, CloneType };
export type { Static, TObject, TSchema };
export type * from '@sinclair/typebox';

View File

@@ -24,14 +24,3 @@ if grep -Rl "$SEARCH_PATTERN" "$1"; then
else
echo "All occurrences of '@trezor/*/src' have been successfully replaced."
fi
# Patch for Typebox import issue, where TS uses an ESM import path, but our package is CommonJS
# @sinclair/typebox/build/esm/index.mjs -> @sinclair/typebox
REGEX="s/@sinclair\/typebox\/build\/esm\/index.mjs/@sinclair\/typebox/g"
if [[ "$OS" == "Darwin" ]]; then
find "$1" -type f -exec sed -i '' -E "$REGEX" {} +
else
find "$1" -type f -exec sed -i -E "$REGEX" {} +
fi