Socket
Socket
Sign inDemoInstall

baset-core

Package Overview
Dependencies
Maintainers
1
Versions
31
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

baset-core - npm Package Compare versions

Comparing version 0.0.1 to 0.1.0

11

CHANGELOG.md

@@ -6,2 +6,13 @@ # Change Log

<a name="0.1.0"></a>
# [0.1.0](https://github.com/Igmat/baset/compare/v0.0.1...v0.1.0) (2018-01-17)
### Features
* **Core:** Added simple comparison between temp and existing baseline ([f0a775b](https://github.com/Igmat/baset/commit/f0a775b))
<a name="0.0.1"></a>

@@ -8,0 +19,0 @@ ## 0.0.1 (2018-01-16)

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const fs = require("fs");
function test(specs, baselines) {
const files = specs.map(name => ({
name,
output: JSON.stringify(require(name)),
}));
files.forEach(file => {
const baselinePath = file.name.replace(/.spec.js$/, '.base');
const baseline = fs.existsSync(baselinePath)
? fs.readFileSync(baselinePath, { encoding: 'utf-8' })
: false;
fs.writeFile(file.name.replace(/.spec.js$/, '.base.tmp'), file.output, err => {
if (err)
return console.log(err);
console.log(`Temp baseline for ${file.name} is written.`);
if (!baseline)
return;
console.log((baseline === file.output)
? 'Test passed'
: 'Test failed');
});
});
}
exports.test = test;
//# sourceMappingURL=index.js.map

6

package.json
{
"name": "baset-core",
"version": "0.0.1",
"version": "0.1.0",
"description": "",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"scripts": {

@@ -10,3 +11,3 @@ "build": "npm run tslint && tsc",

"tslint": "tslint -c tslint.json -p tsconfig.json",
"test": "echo \"Error: no test specified\" && exit 1"
"test": "baset"
},

@@ -16,2 +17,3 @@ "author": "",

"devDependencies": {
"@types/node": "^9.3.0",
"tslint": "^5.9.1",

@@ -18,0 +20,0 @@ "typescript": "^2.6.2"

Sorry, the diff of this file is not supported yet

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