Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,7 @@
"coverage": "nyc --all --reporter=html npm run test:src",
"postcoverage": "open coverage/index.html && rm -rf test",
"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.

"prepublish": "npm run compile",
"bundle": "rm -rf ./dist/* && npm run compile && node ./scripts/bundle.js && node ./scripts/bundle-esm.js",
"prepare": "husky install",
Expand Down
Loading