fix: use cross-platform postinstall script#18
Merged
Conversation
Replace `test -f` shell command with a Node.js script that works on Windows, macOS, and Linux.
There was a problem hiding this comment.
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.
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>
Contributor
|
👍🏻 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
The
test -fshell 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 dynamicimport()with.catch(), which works across all platforms.Reference
Doist/todoist-cli#176 (comment)
Test plan
npm installsucceeds