Skip to content

Move from postcompile to compile#466

Merged
esezen merged 1 commit into
masterfrom
nocdx-fix-build-script
Jun 15, 2026
Merged

Move from postcompile to compile#466
esezen merged 1 commit into
masterfrom
nocdx-fix-build-script

Conversation

@esezen

@esezen esezen commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

No description provided.

Copilot AI review requested due to automatic review settings June 15, 2026 15:23
@esezen esezen requested a review from a team as a code owner June 15, 2026 15:23

@constructor-claude-bedrock constructor-claude-bedrock Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This PR merges the postcompile lifecycle hook into the compile script by appending && node ./scripts/build-esm.js directly to the command chain — a clean, straightforward simplification.

Inline comments: 1 discussion added

Overall Assessment: ✅ Pass

Comment thread package.json
"docs": "jsdoc --configure ./.jsdoc.json ./README.md --recurse ./src --destination ./docs",
"compile": "rm -rf ./lib/* && babel src/ -d lib/ --copy-files && rm -rf ./lib/types/tests",
"postcompile": "node ./scripts/build-esm.js",
"compile": "rm -rf ./lib/* && babel src/ -d lib/ --copy-files && rm -rf ./lib/types/tests && node ./scripts/build-esm.js",

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggestion: The change is functionally correct and the intent is clear. One minor thing worth noting: npm's post* lifecycle hooks run automatically after the named script, so the old postcompile would execute whenever compile was called — including indirectly via prepublish, bundle, or pretest. By inlining it, the behavior is identical in all those call paths, so there is no functional regression.

The consolidation is a net improvement: it removes an implicit, easy-to-miss lifecycle hook and makes the full compile step explicit and visible in one place. No issues here.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR consolidates the ESM build step into the primary compile script so that running npm run compile performs the full build in one command (instead of relying on the postcompile hook).

Changes:

  • Removed the separate postcompile script entry.
  • Appended the ESM build step (node ./scripts/build-esm.js) to the end of the compile script.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@esezen esezen merged commit f0e36de into master Jun 15, 2026
12 of 14 checks passed
@esezen esezen deleted the nocdx-fix-build-script branch June 15, 2026 15:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants