From ef7c133feb07b7645ca373b6983fc76fa57353db Mon Sep 17 00:00:00 2001 From: Mohitlikestocode Date: Thu, 5 Feb 2026 16:33:08 +0530 Subject: [PATCH 1/4] docs: clarify node_modules type stripping --- README.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 0079b2880..35f7dd847 100644 --- a/README.md +++ b/README.md @@ -49,7 +49,11 @@ node --experimental-transform-types --import="amaro/transform" file.ts #### Type stripping in dependencies -Contrary to the Node.js [TypeScript support](https://nodejs.org/docs/latest/api/typescript.html#type-stripping-in-dependencies), when used as a loader, Amaro handles TypeScript files inside folders under a `node_modules` path. +When used as a loader, Amaro attempts to handle TypeScript files inside folders under a `node_modules` path. +However, recent Node.js versions disallow type stripping for files under `node_modules` and throw +`ERR_UNSUPPORTED_NODE_MODULES_TYPE_STRIPPING`. This behavior is enforced by Node.js and changed after +`--experimental-strip-types` was unflagged. As a result, type stripping in dependencies may not work on +current Node.js versions when using Amaro as a loader. ### Monorepo usage From b31a19671784c8ed0f6e176863aa975d2f3f1fd8 Mon Sep 17 00:00:00 2001 From: Mohit Date: Sat, 7 Feb 2026 15:35:37 +0530 Subject: [PATCH 2/4] Update README.md Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 35f7dd847..237fbbac4 100644 --- a/README.md +++ b/README.md @@ -52,7 +52,7 @@ node --experimental-transform-types --import="amaro/transform" file.ts When used as a loader, Amaro attempts to handle TypeScript files inside folders under a `node_modules` path. However, recent Node.js versions disallow type stripping for files under `node_modules` and throw `ERR_UNSUPPORTED_NODE_MODULES_TYPE_STRIPPING`. This behavior is enforced by Node.js and changed after -`--experimental-strip-types` was unflagged. As a result, type stripping in dependencies may not work on +`--experimental-strip-types` was unflagged. As a result, type stripping in dependencies does not work on current Node.js versions when using Amaro as a loader. ### Monorepo usage From 0e7e9639b0916056c9e3b3e588e73f392fdb70b0 Mon Sep 17 00:00:00 2001 From: Mohitlikestocode Date: Fri, 13 Feb 2026 21:52:54 +0530 Subject: [PATCH 3/4] docs: refine node_modules type stripping note --- README.md | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 237fbbac4..5fd4af84e 100644 --- a/README.md +++ b/README.md @@ -49,11 +49,10 @@ node --experimental-transform-types --import="amaro/transform" file.ts #### Type stripping in dependencies -When used as a loader, Amaro attempts to handle TypeScript files inside folders under a `node_modules` path. +When used as a loader, Amaro can handle TypeScript files inside folders under a `node_modules` path. However, recent Node.js versions disallow type stripping for files under `node_modules` and throw -`ERR_UNSUPPORTED_NODE_MODULES_TYPE_STRIPPING`. This behavior is enforced by Node.js and changed after -`--experimental-strip-types` was unflagged. As a result, type stripping in dependencies does not work on -current Node.js versions when using Amaro as a loader. +`ERR_UNSUPPORTED_NODE_MODULES_TYPE_STRIPPING`. As a result, type stripping in dependencies does not +work on those Node.js versions when using Amaro as a loader. ### Monorepo usage From eed066db0a27093d68e26d0ccc785dcebc55b462 Mon Sep 17 00:00:00 2001 From: Mohit Date: Fri, 13 Feb 2026 22:30:32 +0530 Subject: [PATCH 4/4] Update README.md Co-authored-by: Marco Ippolito --- README.md | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 5fd4af84e..7c9ca4d7a 100644 --- a/README.md +++ b/README.md @@ -49,10 +49,8 @@ node --experimental-transform-types --import="amaro/transform" file.ts #### Type stripping in dependencies -When used as a loader, Amaro can handle TypeScript files inside folders under a `node_modules` path. -However, recent Node.js versions disallow type stripping for files under `node_modules` and throw -`ERR_UNSUPPORTED_NODE_MODULES_TYPE_STRIPPING`. As a result, type stripping in dependencies does not -work on those Node.js versions when using Amaro as a loader. +When used as a loader, Amaro still relies on Node.js module loading. For this reason when trying to execute files under `node_modules` it throws +`ERR_UNSUPPORTED_NODE_MODULES_TYPE_STRIPPING`. As a result, type stripping in dependencies does not work. ### Monorepo usage