Node.js (and by extension node-pre-gyp) doesn't differentiate between AIX and IBM i
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 1.2k
- Forks
- 271
- Avg merge
- 23h 40m
- Merged PRs (30d)
- 2
Description
IBM i is a business operating system that includes an AIX-like environment called PASE. Until recently, Python on IBM i identified the operating system as `aix`. Python is used when building the Node.js binary to determine the operating system, so the Node.js `process.platform` on when called on IBM i returns `aix`.
The problem arises when `node-pre-gyp` uses `process.platform` in the creation of published package names. This means binaries built on IBM i for IBM i have names that identify the platform as `aix` like so: `odbc-v2.4.0-aix-ppc64-napi-v6.tar.gz`. IBM i binaries won't run on AIX, and vice-versa, so anyone using AIX to download these packages will get binaries not built for their systems.
Extra logic should be added to `lib/util/versioning.js` to check the return value of `os.type()` when the platform is identified as AIX. `os.type()` on IBM i will return `'OS400'` (the historical name for the operating system), which will allow node-pre-gyp to differentiate between AIX and IBM i. If `op.type()` returns `'OS400'`, then the platform and target_platform should be changed to `ibmi`.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in lib/util/versioning.js and inspect how process.platform and os.type() are used when identifying AIX. Verify that OS400 produces ibmi for both platform and target_platform, while AIX remains unchanged, and confirm the resulting package names distinguish IBM i binaries from AIX binaries.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, node.js
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 52/100