Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

bedrock

Package Overview
Dependencies
Maintainers
4
Versions
68
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bedrock - npm Package Compare versions

Comparing version 1.18.1 to 2.0.0

test/mocha/.eslintrc

13

CHANGELOG.md
# 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

9

lib/bedrock.js

@@ -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
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc