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

@boll/core

Package Overview
Dependencies
Maintainers
3
Versions
1225
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@boll/core - npm Package Compare versions

Comparing version 1.2.1209 to 1.3.0

17

CHANGELOG.json

@@ -5,3 +5,18 @@ {

{
"date": "Mon, 19 Oct 2020 23:05:01 GMT",
"date": "Thu, 22 Oct 2020 18:26:06 GMT",
"tag": "@boll/core_v1.3.0",
"version": "1.3.0",
"comments": {
"minor": [
{
"comment": "in-config options for rules",
"author": "jdh@microsoft.com",
"commit": "80d8e1afc955fded3442cd7cf3aa62a542e92232",
"package": "@boll/core"
}
]
}
},
{
"date": "Mon, 19 Oct 2020 23:05:43 GMT",
"tag": "@boll/core_v1.2.1209",

@@ -8,0 +23,0 @@ "version": "1.2.1209",

# Change Log - @boll/core
This log was last generated on Mon, 19 Oct 2020 23:05:01 GMT and should not be manually modified.
This log was last generated on Thu, 22 Oct 2020 18:26:06 GMT and should not be manually modified.
<!-- Start content -->
## 1.3.0
Thu, 22 Oct 2020 18:26:06 GMT
### Minor changes
- in-config options for rules (jdh@microsoft.com)
## 1.2.1209
Mon, 19 Oct 2020 23:05:01 GMT
Mon, 19 Oct 2020 23:05:43 GMT

@@ -11,0 +19,0 @@ ### Patches

4

dist/config.js

@@ -44,3 +44,5 @@ "use strict";

glob.include = ruleSetConfig.include || [];
var checks = (ruleSetConfig.checks || []).map(function (check) { return _this.ruleRegistry.get(check.rule)(_this.logger); });
var checks = (ruleSetConfig.checks || []).map(function (check) {
return _this.ruleRegistry.get(check.rule)(_this.logger, check.options);
});
return new rule_set_1.RuleSet(glob, checks);

@@ -47,0 +49,0 @@ });

@@ -18,2 +18,3 @@ import ts from "typescript";

get packageDependencies(): DependencyMap;
get packageDevDependencies(): DependencyMap;
get ignoredChecks(): string[];

@@ -20,0 +21,0 @@ get relativeFilename(): string;

@@ -77,2 +77,9 @@ "use strict";

});
Object.defineProperty(FileContext.prototype, "packageDevDependencies", {
get: function () {
return this.packageContext.devDependencies;
},
enumerable: false,
configurable: true
});
Object.defineProperty(FileContext.prototype, "ignoredChecks", {

@@ -79,0 +86,0 @@ get: function () {

@@ -6,3 +6,4 @@ export declare type DependencyMap = {

dependencies: DependencyMap;
constructor(dependencies: DependencyMap);
devDependencies: DependencyMap;
constructor(dependencies: DependencyMap, devDependencies: DependencyMap);
}

@@ -5,4 +5,5 @@ "use strict";

var Package = /** @class */ (function () {
function Package(dependencies) {
function Package(dependencies, devDependencies) {
this.dependencies = dependencies;
this.devDependencies = devDependencies;
}

@@ -9,0 +10,0 @@ return Package;

import { Logger } from "./logger";
import { PackageRule } from "./types";
export declare type RuleDefinition = (logger: Logger) => PackageRule;
export declare type RuleDefinition = (logger: Logger, options?: {}) => PackageRule;
export declare class RuleRegistry {

@@ -5,0 +5,0 @@ registrations: {

@@ -139,3 +139,3 @@ "use strict";

packageJson = JSON.parse(packageBuffer.toString("utf-8"));
packageContext = new package_1.Package(packageJson.dependencies || {});
packageContext = new package_1.Package(packageJson.dependencies || {}, packageJson.devDependencies || {});
return [2 /*return*/, packageContext];

@@ -142,0 +142,0 @@ case 3:

@@ -118,1 +118,16 @@ "use strict";

});
exports.test("gives options to factory function", function () {
var configRegistry = new config_registry_1.ConfigRegistry();
var ruleRegistry = new rule_registry_1.RuleRegistry();
var calledWithCorrectArgs = false;
ruleRegistry.register("foo", function (l, options) {
if (options && options.bar === "baz") {
calledWithCorrectArgs = true;
}
return new FakeRule();
});
var config = new config_1.Config(configRegistry, ruleRegistry, logger_1.NullLogger);
config.load({ ruleSets: [{ fileLocator: new FakeGlob(), checks: [{ rule: "foo", options: { bar: "baz" } }] }] });
config.buildSuite();
assert.ok(calledWithCorrectArgs, "Rule factory should have been invoked with correct args when creating suite.");
});

@@ -75,3 +75,3 @@ "use strict";

switch (_a.label) {
case 0: return [4 /*yield*/, file_context_1.getSourceFile(cwd, "simple-disable.ts", new package_1.Package({}))];
case 0: return [4 /*yield*/, file_context_1.getSourceFile(cwd, "simple-disable.ts", new package_1.Package({}, {}))];
case 1:

@@ -97,3 +97,3 @@ sut = _a.sent();

switch (_a.label) {
case 0: return [4 /*yield*/, file_context_1.getSourceFile(cwd, "multiple-disable.ts", new package_1.Package({}))];
case 0: return [4 /*yield*/, file_context_1.getSourceFile(cwd, "multiple-disable.ts", new package_1.Package({}, {}))];
case 1:

@@ -100,0 +100,0 @@ sut = _a.sent();

@@ -46,3 +46,3 @@ {

},
"version": "1.2.1209"
"version": "1.3.0"
}
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