You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maka.apache.org by "orangeCatDeveloper (via GitHub)" <gi...@apache.org> on 2026/08/28 09:33:30 UTC

[PR] fix(models): support Node 26 type stripping [maka]

orangeCatDeveloper opened a new pull request, #4076:
URL: https://github.com/apache/maka/pull/4076

   ## Summary
   
   `npm run check:model-metadata` fails on supported Node 26 releases before it can validate either committed generated module.
   
   Node 26 removed the `transform` mode from `module.stripTypeScriptTypes()`, while the metadata checker still requested it. The generated metadata and pricing modules use erasable TypeScript syntax, so the supported `strip` mode is sufficient on both Node 22.19 and Node 26.
   
   Use `strip` and add a regression test that converts and imports both committed generated modules before asserting their runtime exports.
   
   ## Evidence
   
   ```text
   Before (Node v26.5.0):
   TypeError [ERR_INVALID_ARG_VALUE]: The property 'options.mode' must be one of: 'strip'. Received 'transform'
       at loadTypeScriptModule (scripts/sync-model-metadata.mjs:500:22)
   
   After (Node v26.5.0):
   ✔ loads the committed generated TypeScript modules
   ℹ pass 1
   ℹ fail 0
   
   After (Node v22.19.0):
   ok 1 - loads the committed generated TypeScript modules
   # pass 1
   # fail 0
   ```
   
   ## Verification
   
   - `npm run check:model-metadata` on Node 26.5.0
   - `npx --yes node@22.19.0 scripts/sync-model-metadata.mjs --check`
   - `node --test scripts/sync-model-metadata.test.mjs` — 9/9 passed
   - `npm run lint`
   - `npm run format:check`
   - `node scripts/asf-license-headers.mjs check`
   - `git diff --check`
   
   Full build and typecheck were not run for this script-only draft.
   
   ## AI use
   
   Select exactly one:
   
   - [ ] No generative tool made a substantive contribution
   - [x] Generative tooling made a substantive contribution
   
   Tool(s) and scope: Codex implemented the Node compatibility change, regression test, and PR description.
   
   ## Checklist
   
   - [x] Tests cover the change and fail without it
   - [ ] Lint, format, typecheck and the affected suites pass locally
   
   Does this PR entail a change in behavior?
   
   - [x] Yes — described under Summary above
   - [ ] No
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org
For additional commands, e-mail: commits-help@maka.apache.org


Re: [PR] fix(models): support Node 26 type stripping [maka]

Posted by "Astro-Han (via GitHub)" <gi...@apache.org>.
Astro-Han merged PR #4076:
URL: https://github.com/apache/maka/pull/4076


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org
For additional commands, e-mail: commits-help@maka.apache.org