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

hangar51-loader

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hangar51-loader - npm Package Compare versions

Comparing version 0.0.8 to 0.0.9

50

dist/index.js

@@ -312,11 +312,14 @@ module.exports =

Manifest.prototype.save = function(callback) {
var data, error;
var data;
data = JSON.stringify(this._fileMap, null, 2);
try {
fs.writeFileSync(this._manifestPath, data);
callback(null, this);
} catch (error1) {
error = new Error("Unable to write " + this._manifestPath);
callback(error, null);
}
return fs.writeFile(this._manifestPath, data, (function(_this) {
return function(error) {
if (error) {
error = new Error("Unable to write " + _this._manifestPath);
callback(error, null);
return;
}
callback(null, _this);
};
})(this));
};

@@ -334,27 +337,30 @@

Manifest.load = function(manifestPath, callback) {
var data, error, fileMap;
var error, fileMap, k, v;
manifestPath = manifestPath || this._DEFAULT_PATH;
if (Manifest._MANIFESTS[manifestPath]) {
callback(null, this._MANIFESTS[manifestPath]);
callback(null, Manifest._MANIFESTS[manifestPath]);
return;
}
Manifest._MANIFESTS[manifestPath] = new Manifest(manifestPath);
if (!fs.existsSync(manifestPath)) {
Manifest._MANIFESTS[manifestPath] = new Manifest(manifestPath);
callback(null, Manifest._MANIFESTS[manifestPath]);
return;
}
try {
data = fs.readFileSync(manifestPath);
try {
fileMap = JSON.parse(data);
} catch (error1) {
callback(new Error(manifestPath + " is corrupt"), null);
return;
}
Manifest._MANIFESTS[manifestPath] = new Manifest(manifestPath, fileMap);
callback(null, Manifest._MANIFESTS[manifestPath]);
} catch (error1) {
fs.readFile(manifestPath, function(error, data) {});
if (error) {
error = new Error("Unable to read " + manifestPath);
callback(error, null);
return;
}
try {
fileMap = JSON.parse(data);
} catch (error1) {
callback(new Error(manifestPath + " is corrupt"), null);
return;
}
for (k in fileMap) {
v = fileMap[k];
Manifest._MANIFESTS[manifestPath].fileMap[k] = v;
}
callback(null, Manifest._MANIFESTS[manifestPath]);
};

@@ -361,0 +367,0 @@

{
"name": "hangar51-loader",
"version": "0.0.8",
"version": "0.0.9",
"description": "Hangar51 webpack loader.",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

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