Skip to content

[code-simplifier] refactor: apply project conventions to generate_aw_info.cjs (#18876 follow-up)#18890

Merged
pelikhan merged 2 commits intomainfrom
code-simplifier/generate-aw-info-conventions-20260228-c6799f7ca68efb33
Feb 28, 2026
Merged

[code-simplifier] refactor: apply project conventions to generate_aw_info.cjs (#18876 follow-up)#18890
pelikhan merged 2 commits intomainfrom
code-simplifier/generate-aw-info-conventions-20260228-c6799f7ca68efb33

Conversation

@github-actions
Copy link
Contributor

Follow-up simplification to the generate_aw_info.cjs file introduced in #18876.

Files Simplified

  • actions/setup/js/generate_aw_info.cjs — Three convention fixes

Improvements Made

  1. Module-level require: Moved const fs = require("fs") from inside main() to module level, consistent with every other .cjs file in the project.

  2. Simplified null check: Replaced ctx[field] === undefined || ctx[field] === null with ctx[field] == null, which is semantically identical and less verbose.

  3. Use core.info instead of console.log: Per AGENTS.md: "Use core.info, core.warning, core.error (not console.log)" — replaced two console.log calls with core.info.

Changes Based On

Recent changes from:

Testing

  • ✅ Linting passes (make lint-cjs)
  • ✅ Formatting passes (make fmt-cjs)
  • ✅ No functional changes — behavior is identical

Review Focus

Please verify:

  • Functionality is preserved
  • Simplifications align with project JavaScript conventions in AGENTS.md

References:

Generated by Code Simplifier

  • expires on Mar 1, 2026, 6:55 PM UTC

- Move fs require to module level (consistent with all other .cjs files)
- Simplify null check: ctx[field] === undefined || ctx[field] === null → ctx[field] == null
- Replace console.log with core.info per project JavaScript conventions (AGENTS.md)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@pelikhan pelikhan merged commit 631b29b into main Feb 28, 2026
43 of 45 checks passed
@pelikhan pelikhan deleted the code-simplifier/generate-aw-info-conventions-20260228-c6799f7ca68efb33 branch February 28, 2026 18:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant