mirror of
https://github.com/trezor/trezor-suite.git
synced 2026-03-21 14:47:12 +01:00
fix(schema-utils): typescript + typebox package resolution issue
This commit is contained in:
committed by
Tomáš Martykán
parent
24931a9657
commit
cc22068b2a
@@ -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';
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user