Friday, 29 June 2018

How to test an `npm publish` result, without actually publishing to NPM?

One common problem I have, is that sometimes my .npmignore file is too aggressive, and I ignore files that I actually will to include in the NPM tarball.

My question is - is there a way to test the results of NPM publish, without actually publishing to NPM?

I am thinking something like this. Assuming I have a local NPM package with package name "foo"

set -e;
local proj="bar";
local path_to_foo="."
mkdir -p "$HOME/.local.npm"
npm --tarball -o "$HOME/.local.npm"  # made up command, but you get the idea
(
  cd "$HOME/.temp_projects"
  rm -rf "$proj"
  mkdir "$proj"
  cd "$proj"
  npm init -f
  npm install "$path_to_foo"
)
copy_test_stuff -o "$HOME/.temp_projects/bar"

cd "$HOME/.temp_projects/bar"
npm test

I don't think this will work. Because whatever we include in the NPM publish tarball, might not have enough to do the full test. But maybe if we copy all the test files (including fixtures, etc) when we do copy_test_stuff, it might work?



from How to test an `npm publish` result, without actually publishing to NPM?

Dugite/isomorphic-git in electron behind a proxy

I'm writing an electron app that has to clone and pull repositories every once in a while and it works well. However, it fails behind a corporate authenticated (basic or digest) proxy. As I understand electron can faciliate the Chromium proxy features but dugite, the git library I'm using, is running in the main process and tries to connect directly to the git repository. Is there some way I can use the proxy for dugite?

EDIT: I did some additional research and figured out that node doesn't handle proxy connections for you. Proxy settings are only honoured if they are faciliated inside the renderer view and only if they use the browser window's methods like fetch. Therefore I also tried isomorphic-git as a dugite replacement in the renderer process but that - for some unknown reason - didn't work either.

Accepted solutions must be code that can be handled inside the electron app.



from Dugite/isomorphic-git in electron behind a proxy

Which Samsung devices do not support android's native fingerprint API?

I'm assuming that no phones with OS before marshmallow support the fingerprint API. my question is (a) Do all/any Samsung phones released with marshmallow support android fingerprint API (b) Does any Samsung phones whose OS is upgraded to marshmallow support Android fingerprint API?

I've read these:

Fingerprint scanner not detected when using Android 6.0 Fingerprint API on Samsung S5

Samsung galaxy note 4 fingerprint not found

Android FingerPrint API isHardwareDetected returns false for Samsung Note 4

Devices with fingerprint sensor above 6.0 which are not using Android fingerprint SDK

but no definitive answers. Also samsung's website mentions that all samsung devices support Pass SDK but doesn't mention android fingerprint API support



from Which Samsung devices do not support android's native fingerprint API?