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

shared-store

Package Overview
Dependencies
Maintainers
3
Versions
38
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

shared-store - npm Package Compare versions

Comparing version 1.0.12 to 1.1.0

5

CHANGELOG.md

@@ -0,1 +1,6 @@

1.1.0
-----
* More useful parse errors for files - @jkrems
https://github.com/groupon/shared-store/pull/24
1.0.12

@@ -2,0 +7,0 @@ ------

28

lib/file.js

@@ -35,3 +35,3 @@ // Generated by CoffeeScript 1.9.0

'use strict';
var CSON, Promise, debug, dirChanges, fileChanges, fileContent, fromPromiseFunction, fs, identity, isMissingError, onInterval, parserFromExtension, partial, path, promisify, readFile, _ref;
var CSON, Promise, debug, dirChanges, fileChanges, fileContent, fromPromiseFunction, fs, identity, isMissingError, onInterval, parseCSON, parseJSON, parserFromExtension, partial, path, promisify, readFile, _ref;

@@ -70,8 +70,30 @@ fs = require('fs');

parseCSON = function(filename, content) {
var err;
try {
return CSON.parse(content);
} catch (_error) {
err = _error;
err.message += " in " + filename + ":" + (err.location.first_line + 1);
throw err;
}
};
parseJSON = function(filename, content) {
var err;
try {
return JSON.parse(content);
} catch (_error) {
err = _error;
err.message += " in " + filename;
throw err;
}
};
parserFromExtension = function(filename) {
switch (path.extname(filename)) {
case '.json':
return JSON.parse;
return partial(parseJSON, filename);
case '.cson':
return CSON.parse;
return partial(parseCSON, filename);
default:

@@ -78,0 +100,0 @@ return identity;

2

package.json
{
"name": "shared-store",
"version": "1.0.12",
"version": "1.1.0",
"description": "Keeping config data in sync",

@@ -5,0 +5,0 @@ "main": "lib/shared-store.js",

Sorry, the diff of this file is not supported yet

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