IBM / nodejs-idb-connector

A JavaScript (Node.js) library for communicating with Db2 for IBM i, with support for queries, procedures, and much more. Uses traditional callback-style syntax
MIT License
37 stars 23 forks source link

Guard bindings.gyp and build dummy when not on IBM i #58

Closed abmusse closed 5 years ago

abmusse commented 5 years ago

This PR is related to issue #54

Most of the time NPM will block installs on systems where process.platform does not return AIX

According to this issue there are strange cases with npm-ci, where os property within package.json is ignored. This issue originally popped on this issue with default-gateway package.

In this PR we guard against weird cases when os is ignored by adding conditionals in bindings.gyp and db2ia.cc. When not on IBM i a dummy package is created returning an empty object. This includes when really on AIX and not on IBM i.

ThePrez commented 5 years ago

@dmabupt, can you please review these changes and push a new version to npm?

ThePrez commented 5 years ago

Abdirahim and I have tested on Linux and Winows

dmabupt commented 5 years ago

@dmabupt, can you please review these changes and push a new version to npm?

v1.1.9 is released now.