Socket
Socket
Sign inDemoInstall

babel-loader

Package Overview
Dependencies
129
Maintainers
5
Versions
77
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 8.2.3 to 8.2.4

16

lib/cache.js

@@ -36,2 +36,10 @@ "use strict";

let defaultCacheDirectory = null;
let hashType = "md4"; // use md5 hashing if md4 is not available
try {
crypto.createHash(hashType);
} catch (err) {
hashType = "md5";
}
const readFile = promisify(fs.readFile);

@@ -95,10 +103,2 @@ const writeFile = promisify(fs.writeFile);

const filename = function (source, identifier, options) {
// md4 hashing is not supported starting with node v17.0.0
const majorNodeVersion = parseInt(process.versions.node.split(".")[0], 10);
let hashType = "md4";
if (majorNodeVersion >= 17) {
hashType = "md5";
}
const hash = crypto.createHash(hashType);

@@ -105,0 +105,0 @@ const contents = JSON.stringify({

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

const filename = this.resourcePath;
let loaderOptions = loaderUtils.getOptions(this) || {};
let loaderOptions = loaderUtils.getOptions(this);
validateOptions(schema, loaderOptions, {

@@ -73,0 +73,0 @@ name: "Babel loader"

{
"name": "babel-loader",
"version": "8.2.3",
"version": "8.2.4",
"description": "babel module loader for webpack",

@@ -14,3 +14,3 @@ "files": [

"find-cache-dir": "^3.3.1",
"loader-utils": "^1.4.0",
"loader-utils": "^2.0.0",
"make-dir": "^3.1.0",

@@ -17,0 +17,0 @@ "schema-utils": "^2.6.5"

@@ -255,3 +255,3 @@ > This README is for babel-loader v8 + Babel v7

That function is injected by Webpack itself _after_ running `babel-loader`. By default Webpack asumes that your target environment supports some ES2015 features, but you can overwrite this behavior using the `output.environment` Webpack option ([documentation]((https://webpack.js.org/configuration/output/#outputenvironment)).
That function is injected by Webpack itself _after_ running `babel-loader`. By default Webpack asumes that your target environment supports some ES2015 features, but you can overwrite this behavior using the `output.environment` Webpack option ([documentation](https://webpack.js.org/configuration/output/#outputenvironment)).

@@ -258,0 +258,0 @@ To avoid the top-level arrow function, you can use `output.environment.arrowFunction`:

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc