Skip to content

Commit

Permalink
Excluding node-webcrypto-ossl from dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
YuryStrozhevsky committed Apr 5, 2018
1 parent 533f4bc commit ce2b584
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 3 deletions.
16 changes: 16 additions & 0 deletions README.md
Expand Up @@ -201,6 +201,22 @@ npm run build:examples

Live examples can be found at [pkijs.org](https://pkijs.org).

## Tests using Node environment

**WARNING:**
!!! in order to test PKIjs in Node environment you would need to install additional package `node-webcrypto-ossl` !!!

The `node-webcrypto-ossl` is not referenced in PKIjs dependencies anymore because we were noticed users have a problems with the package installation, especially on Windows platform.

The `node-webcrypto-ossl` is NOT a mandatory for testing PKIjs - you could visit test/browser subdir and run all the same tests in your favorite browser.

Also you could check [CircleCI](https://circleci.com/gh/PeculiarVentures/PKI.js) - for each build the service runs all tests and results could be easily observed.

If you do need to run PKIjs tests locally using Node please use
```command
npm run test:node
```

## Limitations

* Safari, Edge, and IE do not have complete, or correct implementations of Web Crypto. To work around these limitations you will probably need [`webcrypto-liner`](https://github.com/PeculiarVentures/webcrypto-liner/).
Expand Down
2 changes: 2 additions & 0 deletions circle.yml
Expand Up @@ -15,6 +15,8 @@ dependencies:
test:
pre:
- npm run build:tests
override:
- npm run test:node
post:
- cat ./coverage/lcov.info | coveralls
- mkdir $CIRCLE_ARTIFACTS/coverage
Expand Down
6 changes: 3 additions & 3 deletions package.json
Expand Up @@ -23,7 +23,6 @@
"emailjs-mime-builder": "latest",
"emailjs-mime-parser": "^2.0.1",
"mocha": "^3.0.2",
"node-webcrypto-ossl": "^1.0.36",
"nyc": "^11.6.0",
"rollup": "latest",
"rollup-plugin-commonjs": "^8.2.6",
Expand Down Expand Up @@ -59,7 +58,8 @@
"ex17": "cd examples/NodePKCS12Example && npm run build && cd ../..",
"build:examples": "npm run ex1 && npm run ex2 && npm run ex3 && npm run ex4 && npm run ex5 && npm run ex6 && npm run ex7 && npm run ex8 && npm run ex9 && npm run ex10 && npm run ex11 && npm run ex12 && npm run ex13 && npm run ex14 && npm run ex15 && npm run ex16 && npm run ex17",
"build:tests": "npm run build:examples",
"test": "cross-env NODE_ENV=test nyc mocha --timeout 40000 --require babel-register --require babel-polyfill test/s_*.js && cross-env NODE_ENV=test nyc --clean=false mocha --timeout 40000 --require babel-register --require babel-polyfill test/n_*.js",
"test:node": "cross-env NODE_ENV=test nyc mocha --timeout 40000 --require babel-register --require babel-polyfill test/s_*.js && cross-env NODE_ENV=test nyc --clean=false mocha --timeout 40000 --require babel-register --require babel-polyfill test/n_*.js",
"test": "node -e \"console.log('\\nWARNING: !!! in order to test PKIjs in Node environment you\\nwould need to install additional package node-webcrypto-ossl !!!\\n\\nThe node-webcrypto-ossl is not referenced in PKIjs dependencies\\nanymore because we were noticed users have a problems with\\nthe package installation, especially on Windows platform.\\n\\nThe node-webcrypto-ossl is NOT a mandatory for testing PKIjs -\\nyou could visit test/browser subdir and run all the same tests\\nin your favorite browser.\\n\\nAlso you could check CircleCI - for each build the service runs\\nall tests and results could be easily observed.\\n\\nIf you do need to run PKIjs tests locally using Node please use\\nnpm run test:node')\"",
"prepublishOnly": "npm run build"
},
"keywords": [
Expand All @@ -81,6 +81,6 @@
"module": "./src/index.js",
"main": "./build/index.js",
"name": "pkijs",
"version": "2.1.39",
"version": "2.1.40",
"license": "MIT"
}

0 comments on commit ce2b584

Please sign in to comment.