deps: update old and remove unused dependencies

This commit updates all of the dependencies in package.json to
their most recent versions. It also removes dependencies that were
specified in package.json but not used - or only used in a
`require()` statement.

These changes have some ripple effects. Istanbul has not been
supported for some time, so it has been replaced with nyc.
The code coverage reporting tool from codacy has been updated
as well. This could not be tested without having the API token.

Finally, the CI job has been modified to run tests on Node.js
versions 10x and 12x. All older versions of Node.js are no longer
maintained.

Signed-off-by: Lance Ball <lball@redhat.com>
This commit is contained in:
Lance Ball 2020-04-02 16:00:43 -04:00
parent e7343b7993
commit aa2cef6e3c
No known key found for this signature in database
GPG Key ID: DB1D2F8DCDB4EE5C
10 changed files with 2237 additions and 35 deletions

View File

@ -1,13 +1,12 @@
language: node_js language: node_js
node_js: node_js:
- 8 - 12
- 7 - 10
- 6
cache: npm cache: npm
jobs: jobs:
include: include:
- stage: github release - stage: github release
node_js: '6' node_js: '12'
deploy: deploy:
provider: releases provider: releases
api_key: api_key:
@ -17,7 +16,7 @@ jobs:
tags: true tags: true
- stage: npm release - stage: npm release
node_js: '6' node_js: '12'
deploy: deploy:
provider: npm provider: npm
email: fabiojose@gmail.com email: fabiojose@gmail.com

View File

@ -10,6 +10,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
- Support for mTLS in v1.0 Binary and Structured Emitters: issue [#48](https://github.com/cloudevents/sdk-javascript/issues/48). Note that this fix is only valid for v1.0 and does not address the problem in v0.3 and below. - Support for mTLS in v1.0 Binary and Structured Emitters: issue [#48](https://github.com/cloudevents/sdk-javascript/issues/48). Note that this fix is only valid for v1.0 and does not address the problem in v0.3 and below.
### Removed
- Removed support for Node.js 6, 7 and 8 - all of which are EOL at this point. Travis CI modified to test on Node.js 10 and 12.
## [1.0.0] ## [1.0.0]
### Added ### Added

View File

@ -1,5 +1,4 @@
const axios = require("axios"); var axios = require("axios");
const empty = require("is-empty");
const Constants = require("./constants.js"); const Constants = require("./constants.js");
const defaults = {}; const defaults = {};

View File

@ -1,6 +1,5 @@
const uuid = require("uuid/v4"); var uuid = require("uuid/v4");
const empty = require("is-empty"); var Ajv = require("ajv");
const Ajv = require("ajv");
// Reserved attributes names // Reserved attributes names
const reserved = { const reserved = {

View File

@ -1,5 +1,4 @@
const uuid = require("uuid/v4"); const uuid = require("uuid/v4");
const empty = require("is-empty");
const Ajv = require("ajv"); const Ajv = require("ajv");
const { const {

View File

@ -1,7 +1,5 @@
const uuid = require("uuid/v4"); const uuid = require("uuid/v4");
const empty = require("is-empty");
const Ajv = require("ajv"); const Ajv = require("ajv");
const URI = require("uri-js");
const { const {
asData, asData,

2215
package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

View File

@ -4,9 +4,10 @@
"description": "CloudEvents SDK for JavaScript", "description": "CloudEvents SDK for JavaScript",
"main": "index.js", "main": "index.js",
"scripts": { "scripts": {
"test": "./node_modules/.bin/istanbul cover -x 'test/**/*.js' _mocha -- -C test/**/*.js", "test": "mocha test/**/*.js",
"coverage-publish": "./node_modules/.bin/istanbul cover -x 'test/**/*.js' _mocha --report lcovonly -- -C test/**/*.js -R spec && cat ./coverage/lcov.info | ./node_modules/.bin/codacy-coverage && rm -rf ./coverage", "coverage": "nyc --reporter=lcov --reporter=text npm run test",
"bdd": "./node_modules/.bin/cucumber-js ./test/bdd/feature -r ./test/bdd/step" "precoverage-publish": "npm run coverage",
"coverage-publish": "wget -qO - https://coverage.codacy.com/get.sh | sh -s report -l JavaScript -r coverage/lcov.info"
}, },
"repository": { "repository": {
"type": "git", "type": "git",
@ -31,23 +32,15 @@
}, },
"homepage": "https://github.com/cloudevents/sdk-javascript#readme", "homepage": "https://github.com/cloudevents/sdk-javascript#readme",
"dependencies": { "dependencies": {
"ajv": "^6.7.0", "ajv": "~6.12.0",
"axios": "0.18.1", "axios": "~0.19.2",
"is-empty": "1.2.0", "uuid": "~3.3.2"
"uri-js": "4.2.2",
"uuid": "3.3.2"
}, },
"devDependencies": { "devDependencies": {
"chai": "4.2.0", "chai": "~4.2.0",
"chai-http": "4.2.0", "mocha": "~7.1.1",
"codacy-coverage": "3.3.0", "nock": "~12.0.3",
"cucumber": "^5.1.0", "nyc": "~15.0.0"
"istanbul": "0.4.5",
"mocha": "5.2.0",
"mocha-lcov-reporter": "1.3.0",
"nock": "10.0.2",
"request": "^2.88.0",
"typescript": "^3.6.4"
}, },
"publishConfig": { "publishConfig": {
"access": "public" "access": "public"

View File

@ -1,8 +1,6 @@
var expect = require("chai").expect; var expect = require("chai").expect;
var Cloudevent = require("../index.js"); var Cloudevent = require("../index.js");
var nock = require("nock"); var nock = require("nock");
var http = require("http");
var request = require("request");
var Spec02 = require("../lib/specs/spec_0_2.js"); var Spec02 = require("../lib/specs/spec_0_2.js");
var {HTTPBinary02} = require("../lib/bindings/http/emitter_binary_0_2.js"); var {HTTPBinary02} = require("../lib/bindings/http/emitter_binary_0_2.js");

View File

@ -1,7 +1,5 @@
const expect = require("chai").expect; const expect = require("chai").expect;
const nock = require("nock"); const nock = require("nock");
const http = require("http");
const request = require("request");
const BinaryHTTPEmitter = const BinaryHTTPEmitter =
require("../lib/bindings/http/emitter_binary_0_3.js"); require("../lib/bindings/http/emitter_binary_0_3.js");
const Cloudevent = require("../lib/cloudevent.js"); const Cloudevent = require("../lib/cloudevent.js");