11 Commits

Author SHA1 Message Date
karliatto
befb9a06f3 fix(scripts): allow change libESM from deper level
With these changes the script for js extension for libESM can now change
when from deeper levels.
2026-02-02 17:46:12 +01:00
karliatto
7559f035c3 chore(npm): remove prepublish.js
We are already running replace-imports.sh from build:libs that is run
before publishing to NPM so callingit when "prepublish" is a redundancy,
besides prepublish.js was only building for cjs and now we are going to
have cjs and esm.
2026-01-22 15:35:45 +01:00
karliatto
355ca0404a build(scripts): extend bablel plugins for ESM
Add cases where babel plugins were not handling properly adding js
extension for ESM and where some packages imports were not modified at
all because they were imported dynamically.
2026-01-20 16:37:46 +01:00
karliatto
1448cf568b fix(scripts): replace-imports to handle .d.ts files
The current implementation of replace-impots.sh that was modified
previously to the current stable connect version was not updating
imports in .d.ts files that was causing to have in connect in npm
imports like:

    import { Capability } from '@trezor/protobuf/src/messages';

But the released `@trezor/protobuf` package does not publish `src/` but
only `lib/` so it has to be handle also when publishing.
2025-12-19 10:35:11 +01:00
Jiri Zbytovsky
404e7d7141 chore(scripts): use import.meta.dirname 2025-12-15 12:26:27 +01:00
Jiri Zbytovsky
2377f92efe chore(scripts): turn on eslint 2025-12-15 12:26:27 +01:00
Jiri Zbytovsky
ac5a00426b chore(scripts): convention to import from node:packages 2025-12-15 12:26:27 +01:00
Jiri Zbytovsky
e3c3950120 chore(scripts): ESM 2025-12-15 12:26:27 +01:00
Tomas Martykan
5f08ccdca4 fix(scripts): replace imports cjs parameter 2025-12-09 14:33:29 +01:00
Tomas Martykan
403348d8ae fix(connect): module dynamic import in CJS 2025-12-08 12:23:34 +01:00
Jiri Zbytovsky
2128d273f3 refactor(connect): new replace-imports.sh script using babel 2025-12-04 11:55:30 +01:00