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

alloy-loader

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

alloy-loader - npm Package Compare versions

Comparing version 0.2.7 to 0.2.8

6

lib/index.js

@@ -35,5 +35,2 @@ /* eslint-disable no-unreachable */

if (entryRegex.test(this.resourcePath)) {
return entryLoader.call(this, content);
}
if (internalsRegex.test(this.resourcePath)) {

@@ -48,2 +45,5 @@ return internalsLoader.call(this, content);

}
if (entryRegex.test(this.resourcePath)) {
return entryLoader.call(this, content);
}

@@ -50,0 +50,0 @@ return [ content ];

@@ -57,16 +57,7 @@ const { utils: { XML } } = require('alloy-utils');

compilation.hooks.additionalAssets.tap('AlloyI18nPlugin', () => {
const emitAsset = (targetFile, content) => {
const targetPath = compiler.outputFileSystem.join(
outputPath,
targetFile
);
const source = new RawSource(content);
if (currentAssets.get(targetPath) === content) {
// set `existsAt` so Webpack 4 will skip emitting this asset
source.existsAt = targetPath;
}
const emitAsset = (targetFile, asset) => {
if (typeof compilation.emitAsset === 'function') {
compilation.emitAsset(targetFile, source);
compilation.emitAsset(targetFile, asset);
} else {
compilation.assets[targetFile] = source;
compilation.assets[targetFile] = asset;
}

@@ -76,7 +67,7 @@ };

if (!firstCompilation && !i18nFileChanged) {
// if no i18n files where changed in a subsequent watch compilation,
// if no i18n files where changed in subsequent compilations,
// just add back the current assets
currentAssets.forEach(
(content, filePathAndName) => emitAsset(
path.relative(outputPath, filePathAndName), content
(asset, filePathAndName) => emitAsset(
path.relative(outputPath, filePathAndName), asset
)

@@ -103,4 +94,5 @@ );

);
emitAsset(targetFile, xmlContent);
currentAssets.set(targetPath, content);
const asset = new RawSource(xmlContent);
emitAsset(targetFile, asset);
currentAssets.set(targetPath, asset);
});

@@ -107,0 +99,0 @@ });

{
"name": "alloy-loader",
"version": "0.2.7",
"version": "0.2.8",
"description": "Webpack loader for Alloy components",

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

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