codeant-ai-for-open-source[bot] commented on code in PR #41206:
URL: https://github.com/apache/superset/pull/41206#discussion_r3437863850
##########
superset-embedded-sdk/release-if-necessary.js:
##########
@@ -47,7 +47,11 @@ function logError(...args) {
execSync('npm publish --access public', { stdio: 'pipe' });
log(`published ${version} to npm`);
} catch (err) {
- console.error(String(err.stdout));
+ // npm writes failure details to stderr (auth/permission/registry
+ // errors in particular), so surface both streams to avoid masking
+ // the real cause in CI logs.
+ if (err.stdout) console.error(String(err.stdout));
+ if (err.stderr) console.error(String(err.stderr));
Review Comment:
**Suggestion:** Migrate this release script from `.js` to `.ts` and update
its invocation in package scripts so new logic is added in TypeScript rather
than JavaScript. [custom_rule]
**Severity Level:** Minor ⚠️
<details>
<summary><b>Why it matters? 🤔 </b></summary>
This file is a modified JavaScript source file (`.js`), and the rule
explicitly says frontend or source code additions should be in TypeScript
rather than JavaScript. The suggestion correctly identifies that this changed
code remains in a JS file, so the violation is real.
</details>
[](https://app.codeant.ai/fix-in-ide?tool=cursor&prompt_id=1af82d22ea834e6e9c2582d2b4a345dd&service=github&base_url=https%3A%2F%2Fgithub.com&org=apache&repo=apache%2Fsuperset)
[](https://app.codeant.ai/fix-in-ide?tool=vscode-claude&prompt_id=1af82d22ea834e6e9c2582d2b4a345dd&service=github&base_url=https%3A%2F%2Fgithub.com&org=apache&repo=apache%2Fsuperset)
*(Use Cmd/Ctrl + Click for best experience)*
<details>
<summary><b>Prompt for AI Agent 🤖 </b></summary>
```mdx
This is a comment left during a code review.
**Path:** superset-embedded-sdk/release-if-necessary.js
**Line:** 53:54
**Comment:**
*Custom Rule: Migrate this release script from `.js` to `.ts` and
update its invocation in package scripts so new logic is added in TypeScript
rather than JavaScript.
Validate the correctness of the flagged issue. If correct, How can I resolve
this? If you propose a fix, implement it and please make it concise.
Once fix is implemented, also check other comments on the same PR, and ask
user if the user wants to fix the rest of the comments as well. if said yes,
then fetch all the comments validate the correctness and implement a minimal fix
```
</details>
<a
href='https://app.codeant.ai/feedback?pr_url=https%3A%2F%2Fgithub.com%2Fapache%2Fsuperset%2Fpull%2F41206&comment_hash=bef8b9d9777638647387d34f261230b7c75417ca021e2a684e29326c8c798c47&reaction=like'>👍</a>
| <a
href='https://app.codeant.ai/feedback?pr_url=https%3A%2F%2Fgithub.com%2Fapache%2Fsuperset%2Fpull%2F41206&comment_hash=bef8b9d9777638647387d34f261230b7c75417ca021e2a684e29326c8c798c47&reaction=dislike'>👎</a>
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]