Socket
Socket
Sign inDemoInstall

babel-loader

Package Overview
Dependencies
Maintainers
3
Versions
81
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

babel-loader - npm Package Compare versions

Comparing version 8.0.0-beta.5 to 8.0.0-beta.6

24

lib/cache.js

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

const filename = function (source, identifier, options) {
const hash = crypto.createHash("SHA1");
const hash = crypto.createHash("md4");
const contents = JSON.stringify({

@@ -99,4 +99,4 @@ source,

});
hash.end(contents);
return hash.read().toString("hex") + ".json.gz";
hash.update(contents);
return hash.digest("hex") + ".json.gz";
};

@@ -121,2 +121,10 @@ /**

} = params;
const file = path.join(directory, filename(source, cacheIdentifier, options));
try {
// No errors mean that the file was previously cached
// we just need to return it
return yield read(file);
} catch (err) {}
const fallback = typeof cacheDirectory !== "string" && directory !== os.tmpdir(); // Make sure the directory exists.

@@ -132,11 +140,3 @@

throw err;
}
const file = path.join(directory, filename(source, cacheIdentifier, options));
try {
// No errors mean that the file was previously cached
// we just need to return it
return yield read(file);
} catch (err) {} // Otherwise just transform the file
} // Otherwise just transform the file
// return it to the user asap and write it in cache

@@ -143,0 +143,0 @@

{
"name": "babel-loader",
"version": "8.0.0-beta.5",
"version": "8.0.0-beta.6",
"description": "babel module loader for webpack",

@@ -5,0 +5,0 @@ "files": [

@@ -119,3 +119,3 @@ > This readme is for babel-loader v8 + Babel v7

See the [docs](http://babeljs.io/docs/plugins/transform-runtime/) for more information.
See the [docs](https://babeljs.io/docs/plugins/transform-runtime/) for more information.

@@ -285,2 +285,2 @@ **NOTE:** You must run `npm install @babel/plugin-transform-runtime --save-dev` to include this in your project and `babel-runtime` itself as a dependency with `npm install @babel/runtime --save`.

## [License](http://couto.mit-license.org/)
## [License](https://couto.mit-license.org/)
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