Skip to content

fix: use cross-platform postinstall script#18

Merged
rfgamaral merged 2 commits into
mainfrom
fix/cross-platform-postinstall
Mar 25, 2026
Merged

fix: use cross-platform postinstall script#18
rfgamaral merged 2 commits into
mainfrom
fix/cross-platform-postinstall

Conversation

@rfgamaral

@rfgamaral rfgamaral commented Mar 25, 2026

Copy link
Copy Markdown
Member

Overview

The test -f shell command used in the postinstall script does not work on Windows. This replaces it with a dedicated Node.js script (scripts/postinstall.js) that uses dynamic import() with .catch(), which works across all platforms.

Reference

Doist/todoist-cli#176 (comment)

Test plan

  • npm install succeeds

Replace `test -f` shell command with a Node.js script that works on
Windows, macOS, and Linux.

@doistbot-app doistbot-app 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.

This PR improves cross-platform compatibility by replacing the shell-based postinstall command with a dedicated Node.js script that handles build artifact checks gracefully across all environments. It is a thoughtful update for the developer experience that ensures a more robust setup process, though the current error handling in the dynamic import is broader than described and may suppress runtime errors beyond just the missing build directory.

Share FeedbackReview Logs

Comment thread scripts/postinstall.js
@rfgamaral rfgamaral self-assigned this Mar 25, 2026
@rfgamaral rfgamaral added the 👀 Show PR PR must be reviewed before or after merging label Mar 25, 2026
@rfgamaral rfgamaral merged commit 0fb341b into main Mar 25, 2026
2 checks passed
@rfgamaral rfgamaral deleted the fix/cross-platform-postinstall branch March 25, 2026 11:14
rfgamaral pushed a commit that referenced this pull request Mar 25, 2026
🤖 I have created a release *beep* *boop*
---


## [1.3.1](v1.3.0...v1.3.1)
(2026-03-25)


### Bug Fixes

* use cross-platform postinstall script
([#18](#18))
([0fb341b](0fb341b))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@scottlovegrove

Copy link
Copy Markdown
Contributor

👍🏻

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

👀 Show PR PR must be reviewed before or after merging

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants