New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

rev-replace-loader

Package Overview
Dependencies
Maintainers
3
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rev-replace-loader - npm Package Compare versions

Comparing version 0.3.0 to 0.4.0

3

CHANGELOG.md
# CHANGELOG
## 0.4.0
- Caching manifests for faster future use
## 0.3.0

@@ -4,0 +7,0 @@ - Added support for prefix in search queries

@@ -7,3 +7,3 @@ var path = require('path');

var query = loaderUtils.parseQuery(this.query);
var manifest = query.manifest || (query.manifestPath ? requireManifests(query.manifestPath) : false);
var manifest = getManifest(query);
var prefix = query.prefix || '';

@@ -24,2 +24,22 @@

var cache = {
cached: {},
get: function (path) {
if (!this.cached[path]) {
this.cached[path] = requireManifests(path);
}
return this.cached[path];
}
};
function getManifest(query) {
if (query.manifest) {
return query.manifest;
}
if (query.manifestPath) {
return cache.get(query.manifestPath);
}
return false;
}
function requireManifests(manifestGlob) {

@@ -26,0 +46,0 @@ return glob.sync(manifestGlob).map(function (path) {

2

package.json
{
"name": "rev-replace-loader",
"version": "0.3.0",
"version": "0.4.0",
"description": "Webpack loader to replace asset paths with hashed ones from a rev-manifest.json file",

@@ -5,0 +5,0 @@ "main": "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