Skip to content

Use dedicated Android npm package#1982

Merged
j178 merged 1 commit intomasterfrom
android-pkg
Apr 21, 2026
Merged

Use dedicated Android npm package#1982
j178 merged 1 commit intomasterfrom
android-pkg

Conversation

@j178
Copy link
Copy Markdown
Owner

@j178 j178 commented Apr 21, 2026

Revert the shared Linux/Android musl package handling from 7f44e09.

Add a dedicated @j178/prek-android-arm64 platform spec that reuses the aarch64-unknown-linux-musl artifact without package-level libc metadata, so npm can install it on Android/Termux.

Follow-up to #1977

Copilot AI review requested due to automatic review settings April 21, 2026 17:30
@j178 j178 added the bug Something isn't working label Apr 21, 2026 — with ChatGPT Codex Connector
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 21, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.22%. Comparing base (7f44e09) to head (2d01943).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1982   +/-   ##
=======================================
  Coverage   92.21%   92.22%           
=======================================
  Files         116      116           
  Lines       23338    23338           
=======================================
+ Hits        21522    21524    +2     
+ Misses       1816     1814    -2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

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 updates the npm distribution metadata so Android/Termux (process.platform=android) installs and runs prek by selecting a dedicated Android optionalDependency package, while still reusing the existing aarch64-unknown-linux-musl artifact.

Changes:

  • Split the previous combined Linux/Android arm64 musl handling into a Linux-only musl package plus a new @j178/prek-android-arm64 package.
  • Adjust npm platform package package.json generation to always emit libc when specified (and omit it for the Android package).
  • Simplify libc matching in npm/bin/prek.js to a direct spec.libc comparison.

Reviewed changes

Copilot reviewed 1 out of 2 changed files in this pull request and generated 1 comment.

File Description
scripts/build-npm-packages.py Adds a dedicated Android arm64 PlatformSpec and adjusts package.json libc emission behavior.
npm/bin/prek.js Removes the Android-specific libc matcher and relies on platform-specific packages for selection.

Comment thread scripts/build-npm-packages.py
@j178 j178 merged commit 9693035 into master Apr 21, 2026
59 checks passed
@j178 j178 deleted the android-pkg branch April 21, 2026 17:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants