Comparing version 1.18.1 to 2.0.0
# bedrock ChangeLog | ||
## 2.0.0 - 2019-10-22 | ||
### Changed | ||
- **BREAKING**: Remove mocha unit test framework. The test framework now resides | ||
entirely in the bedrock-test module@4. | ||
- **BREAKING**: Remove `bedrock.jsonld` and related configuration. A jsonld | ||
document loader is now available in bedrock-jsonld-document-loader@1. | ||
### Added | ||
- `bedrock.util.hasValue` helper API to replace `jsonld.hasValue`. | ||
## 1.18.1 - 2019-07-24 | ||
### Fixed | ||
- Fix memory leak and improve error handling in `runOnce` and `runOnceAsync`. | ||
- Fix memory leak and improve error handling in `runOnce` and `runOnceAsync`. | ||
@@ -8,0 +19,0 @@ ## 1.18.0 - 2019-07-16 |
@@ -14,3 +14,2 @@ /*! | ||
const events = require('./events'); | ||
const jsonld = require('./jsonld'); | ||
const loggers = require('./loggers'); | ||
@@ -20,5 +19,4 @@ const path = require('path'); | ||
const program = require('commander'); | ||
const test = require('./test'); | ||
const {promisify} = require('util'); | ||
const BedrockError = brUtil.BedrockError; | ||
const {BedrockError} = brUtil; | ||
@@ -29,7 +27,4 @@ // core API | ||
api.events = events; | ||
api.jsonld = jsonld; | ||
api.loggers = loggers; | ||
api.test = test; | ||
// NOTE: api.tools is deprecated | ||
api.util = api.tools = brUtil; | ||
api.util = brUtil; | ||
module.exports = api; | ||
@@ -36,0 +31,0 @@ |
@@ -59,13 +59,2 @@ /*! | ||
/** | ||
* Cached JSON-LD contexts. This object maps context URLs to cached local | ||
* versions of contexts that will be loaded when using bedrock.jsonld's default | ||
* document loader. | ||
*/ | ||
config.constants.CONTEXTS = {}; | ||
// jsonld | ||
config.jsonld = {}; | ||
config.jsonld.strictSSL = true; | ||
// logging | ||
@@ -158,6 +147,1 @@ config.loggers = {}; | ||
}; | ||
// test config | ||
config.test = {}; | ||
// list of available test frameworks | ||
config.test.frameworks = []; |
@@ -10,3 +10,2 @@ /*! | ||
const util = require('util'); | ||
const jsonld = require('./jsonld'); // use locally-configured jsonld | ||
const uuid = require('uuid-random'); | ||
@@ -52,3 +51,3 @@ | ||
api.BedrockError.prototype.isType = function(type) { | ||
return jsonld.hasValue(this, 'name', type); | ||
return api.hasValue(this, 'name', type); | ||
}; | ||
@@ -494,1 +493,10 @@ // check type of this error or one of it's causes | ||
}; | ||
// a replacement for jsonld.hasValue | ||
api.hasValue = (obj, key, value) => { | ||
const t = obj[key]; | ||
if(Array.isArray(t)) { | ||
return t.includes(value); | ||
} | ||
return t === value; | ||
}; |
{ | ||
"name": "bedrock", | ||
"version": "1.18.1", | ||
"version": "2.0.0", | ||
"description": "A core foundation for rich Web applications.", | ||
@@ -16,4 +16,2 @@ "license": "SEE LICENSE IN LICENSE.md", | ||
"start": "node index.js", | ||
"test": "node index.js test --mocha-reporter=${REPORTER:-spec}", | ||
"ci-test": "node index.js test --mocha-reporter=${REPORTER:-tap}", | ||
"lint": "eslint '*.js' 'lib/*.js' 'tests/*.js'", | ||
@@ -34,4 +32,2 @@ "coverage": "rm -rf coverage && nyc --reporter=lcov --reporter=text-summary npm test", | ||
"async-node-events": "^1.0.0", | ||
"chai": "^4.1.0", | ||
"chai-as-promised": "^7.1.1", | ||
"commander": "^2.14.1", | ||
@@ -41,6 +37,4 @@ "cycle": "^1.0.3", | ||
"errio": "^1.2.2", | ||
"jsonld": "^1.0.1", | ||
"lodash": "^4.17.14", | ||
"mkdirp": "~0.5.0", | ||
"mocha": "^6.1.4", | ||
"nyc": "^14.1.1", | ||
@@ -47,0 +41,0 @@ "pkginfo": "^0.4.1", |
@@ -321,3 +321,3 @@ <img src="https://digitalbazaar.com/wp-content/uploads/BedrockLogo.png"> | ||
coordinate. These include: `bedrock.config`, `bedrock.events`, | ||
`bedrock.jsonld`, `bedrock.loggers`, `bedrock.test`, and `bedrock.util`. | ||
`bedrock.loggers`, and `bedrock.util`. | ||
@@ -351,3 +351,3 @@ To create a Bedrock project, all you need to do is create a JavaScript file, | ||
that are identified by the object's keys. For example Bedrock introduces the | ||
`cli`, `core`, `constants`, `jsonld`, and `loggers` object keys. The best | ||
`cli`, `core`, `constants`, and `loggers` object keys. The best | ||
practice for modules to claim their own area in the configuration object is to | ||
@@ -614,15 +614,2 @@ insert their default configuration object using a key that either matches their | ||
emitted, either by canceling this event or by exiting the application early. | ||
- **bedrock-cli.test.configure** | ||
- Emitted during `bedrock-cli.init` after `test` subcommand has been | ||
registered. Listeners receive the `test` command object. Allows modules | ||
that define new test frameworks to add new `test` command line options via | ||
the `test` command object. | ||
- **bedrock.test.configure** | ||
- Emitted during `bedrock-cli.ready`, before `bedrock.configure`. Allows | ||
listeners to make configuration changes for running tests. This event | ||
is particularly useful for changing configuration values prior to their | ||
later use when `bedrock.configure` is emitted. To make late configuration | ||
changes on the basis of whether or not tests are going to run, instead | ||
add a listener to the `bedrock.configure` event after any other relevant | ||
listeners have been added. | ||
- **bedrock.configure** | ||
@@ -682,13 +669,2 @@ - Emitted after `bedrock-cli.ready` and before `bedrock.admin.init`. Allows | ||
### bedrock.jsonld | ||
Bedrock is intended to provide a foundation for [Linked Data][] applications, | ||
and as such, it provides a [JSON-LD][] processor (via [jsonld.js][]) that is | ||
integrated with its configuration system. Any [JSON-LD context][] that is | ||
inserted into the `bedrock.config.constants.CONTEXTS` object (where keys | ||
are the URL for the context and the values are the context itself), will be | ||
served from disk instead of retrieved from the Web. This is a useful feature | ||
for both developing [Linked Data][] applications and for ensuring contexts | ||
are available in offline mode. | ||
### bedrock.loggers | ||
@@ -730,14 +706,2 @@ | ||
### bedrock.test | ||
Bedrock comes with test support built-in. It provides a test framework based | ||
on mocha that integrates with `bedrock.config`. To add a mocha test to a | ||
Bedrock module, you simply push a directory or a file path onto the | ||
`config.mocha.tests` array. Bedrock also makes it easy to add other test | ||
frameworks via Bedrock modules. For example, [bedrock-protractor][] integrates | ||
the [AngularJS][] [protractor][] test framework with Bedrock. Whenever you | ||
run tests against your project, your project and all of its dependencies will | ||
be tested, using whatever test frameworks they have registered with. Bedrock | ||
also provides command line options to limit the tests that run as desired. | ||
### bedrock.util | ||
@@ -884,4 +848,3 @@ | ||
[bedrock-views]: https://github.com/digitalbazaar/bedrock-views | ||
[jsonld.js]: https://github.com/digitalbazaar/jsonld.js | ||
[protractor]: https://github.com/angular/protractor | ||
[winston]: https://github.com/winstonjs/winston |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
14
4
148676
2335
845
+ Addedglob@7.2.3(transitive)
+ Addedjs-yaml@3.14.1(transitive)
+ Addedminimatch@3.1.2(transitive)
- Removedchai@^4.1.0
- Removedchai-as-promised@^7.1.1
- Removedjsonld@^1.0.1
- Removedmocha@^6.1.4
- Removedajv@6.12.6(transitive)
- Removedansi-colors@3.2.3(transitive)
- Removedansi-regex@3.0.1(transitive)
- Removedarray-buffer-byte-length@1.0.1(transitive)
- Removedarray.prototype.reduce@1.0.7(transitive)
- Removedarraybuffer.prototype.slice@1.0.3(transitive)
- Removedasn1@0.2.6(transitive)
- Removedassert-plus@1.0.0(transitive)
- Removedassertion-error@1.1.0(transitive)
- Removedasynckit@0.4.0(transitive)
- Removedavailable-typed-arrays@1.0.7(transitive)
- Removedaws-sign2@0.7.0(transitive)
- Removedaws4@1.13.2(transitive)
- Removedbcrypt-pbkdf@1.0.2(transitive)
- Removedbrowser-stdout@1.3.1(transitive)
- Removedcall-bind@1.0.7(transitive)
- Removedcanonicalize@1.0.8(transitive)
- Removedcaseless@0.12.0(transitive)
- Removedchai@4.5.0(transitive)
- Removedchai-as-promised@7.1.2(transitive)
- Removedchalk@2.4.2(transitive)
- Removedcheck-error@1.0.3(transitive)
- Removedcombined-stream@1.0.8(transitive)
- Removedcore-util-is@1.0.2(transitive)
- Removeddashdash@1.14.1(transitive)
- Removeddata-view-buffer@1.0.1(transitive)
- Removeddata-view-byte-length@1.0.1(transitive)
- Removeddata-view-byte-offset@1.0.0(transitive)
- Removeddebug@3.2.6(transitive)
- Removeddeep-eql@4.1.4(transitive)
- Removeddefine-data-property@1.1.4(transitive)
- Removeddefine-properties@1.2.1(transitive)
- Removeddelayed-stream@1.0.0(transitive)
- Removeddiff@3.5.0(transitive)
- Removedecc-jsbn@0.1.2(transitive)
- Removedes-abstract@1.23.5(transitive)
- Removedes-array-method-boxes-properly@1.0.0(transitive)
- Removedes-define-property@1.0.0(transitive)
- Removedes-errors@1.3.0(transitive)
- Removedes-object-atoms@1.0.0(transitive)
- Removedes-set-tostringtag@2.0.3(transitive)
- Removedes-to-primitive@1.2.1(transitive)
- Removedescape-string-regexp@1.0.5(transitive)
- Removedextend@3.0.2(transitive)
- Removedextsprintf@1.3.0(transitive)
- Removedfast-deep-equal@3.1.3(transitive)
- Removedfast-json-stable-stringify@2.1.0(transitive)
- Removedflat@4.1.1(transitive)
- Removedfor-each@0.3.3(transitive)
- Removedforever-agent@0.6.1(transitive)
- Removedform-data@2.3.3(transitive)
- Removedfunction.prototype.name@1.1.6(transitive)
- Removedfunctions-have-names@1.2.3(transitive)
- Removedget-func-name@2.0.2(transitive)
- Removedget-intrinsic@1.2.4(transitive)
- Removedget-symbol-description@1.0.2(transitive)
- Removedgetpass@0.1.7(transitive)
- Removedglob@7.1.3(transitive)
- Removedglobalthis@1.0.4(transitive)
- Removedgopd@1.0.1(transitive)
- Removedgrowl@1.10.5(transitive)
- Removedhar-schema@2.0.0(transitive)
- Removedhar-validator@5.1.5(transitive)
- Removedhas-bigints@1.0.2(transitive)
- Removedhas-property-descriptors@1.0.2(transitive)
- Removedhas-proto@1.0.3(transitive)
- Removedhas-symbols@1.0.3(transitive)
- Removedhas-tostringtag@1.0.2(transitive)
- Removedhe@1.2.0(transitive)
- Removedhttp-signature@1.2.0(transitive)
- Removedinternal-slot@1.0.7(transitive)
- Removedis-array-buffer@3.0.4(transitive)
- Removedis-async-function@2.0.0(transitive)
- Removedis-bigint@1.0.4(transitive)
- Removedis-boolean-object@1.1.2(transitive)
- Removedis-buffer@2.0.5(transitive)
- Removedis-callable@1.2.7(transitive)
- Removedis-data-view@1.0.1(transitive)
- Removedis-date-object@1.0.5(transitive)
- Removedis-finalizationregistry@1.1.0(transitive)
- Removedis-generator-function@1.0.10(transitive)
- Removedis-map@2.0.3(transitive)
- Removedis-negative-zero@2.0.3(transitive)
- Removedis-number-object@1.0.7(transitive)
- Removedis-regex@1.1.4(transitive)
- Removedis-set@2.0.3(transitive)
- Removedis-shared-array-buffer@1.0.3(transitive)
- Removedis-string@1.0.7(transitive)
- Removedis-symbol@1.0.4(transitive)
- Removedis-typed-array@1.1.13(transitive)
- Removedis-typedarray@1.0.0(transitive)
- Removedis-weakmap@2.0.2(transitive)
- Removedis-weakref@1.0.2(transitive)
- Removedis-weakset@2.0.3(transitive)
- Removedisarray@2.0.5(transitive)
- Removedjs-yaml@3.13.1(transitive)
- Removedjsbn@0.1.1(transitive)
- Removedjson-schema@0.4.0(transitive)
- Removedjson-schema-traverse@0.4.1(transitive)
- Removedjson-stringify-safe@5.0.1(transitive)
- Removedjsonld@1.8.1(transitive)
- Removedjsprim@1.4.2(transitive)
- Removedlog-symbols@2.2.0(transitive)
- Removedloupe@2.3.7(transitive)
- Removedmime-db@1.52.0(transitive)
- Removedmime-types@2.1.35(transitive)
- Removedminimatch@3.0.4(transitive)
- Removedmkdirp@0.5.4(transitive)
- Removedmocha@6.2.3(transitive)
- Removedms@2.1.1(transitive)
- Removednode-environment-flags@1.0.5(transitive)
- Removednode-forge@0.10.0(transitive)
- Removedoauth-sign@0.9.0(transitive)
- Removedobject-inspect@1.13.3(transitive)
- Removedobject-keys@1.1.1(transitive)
- Removedobject.assign@4.1.04.1.5(transitive)
- Removedobject.getownpropertydescriptors@2.1.8(transitive)
- Removedpathval@1.1.1(transitive)
- Removedperformance-now@2.1.0(transitive)
- Removedpossible-typed-array-names@1.0.0(transitive)
- Removedpsl@1.13.0(transitive)
- Removedpunycode@2.3.1(transitive)
- Removedqs@6.5.3(transitive)
- Removedrdf-canonize@1.2.0(transitive)
- Removedreflect.getprototypeof@1.0.7(transitive)
- Removedregexp.prototype.flags@1.5.3(transitive)
- Removedrequest@2.88.2(transitive)
- Removedsafe-array-concat@1.1.2(transitive)
- Removedsafe-regex-test@1.0.3(transitive)
- Removedset-function-length@1.2.2(transitive)
- Removedset-function-name@2.0.2(transitive)
- Removedside-channel@1.0.6(transitive)
- Removedsshpk@1.18.0(transitive)
- Removedstring-width@2.1.1(transitive)
- Removedstring.prototype.trim@1.2.9(transitive)
- Removedstring.prototype.trimend@1.0.8(transitive)
- Removedstring.prototype.trimstart@1.0.8(transitive)
- Removedstrip-ansi@4.0.0(transitive)
- Removedstrip-json-comments@2.0.1(transitive)
- Removedsupports-color@5.5.06.0.0(transitive)
- Removedtough-cookie@2.5.0(transitive)
- Removedtunnel-agent@0.6.0(transitive)
- Removedtweetnacl@0.14.5(transitive)
- Removedtype-detect@4.1.0(transitive)
- Removedtyped-array-buffer@1.0.2(transitive)
- Removedtyped-array-byte-length@1.0.1(transitive)
- Removedtyped-array-byte-offset@1.0.3(transitive)
- Removedtyped-array-length@1.0.7(transitive)
- Removedunbox-primitive@1.0.2(transitive)
- Removeduri-js@4.4.1(transitive)
- Removedverror@1.10.0(transitive)
- Removedwhich-boxed-primitive@1.0.2(transitive)
- Removedwhich-builtin-type@1.2.0(transitive)
- Removedwhich-collection@1.0.2(transitive)
- Removedwhich-typed-array@1.1.15(transitive)
- Removedwide-align@1.1.3(transitive)
- Removedxmldom@0.1.19(transitive)
- Removedyargs-unparser@1.6.0(transitive)