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

wext-manifest-loader

Package Overview
Dependencies
Maintainers
1
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

wext-manifest-loader - npm Package Compare versions

Comparing version 2.1.0 to 2.2.0

2

lib/loader.d.ts

@@ -1,1 +0,1 @@

export declare function loader(context: any, source: any): void;
export declare function loader(this: any, source: any): string;

@@ -64,8 +64,8 @@ "use strict";

};
function loader(context, source) {
if (context.cacheable) {
context.cacheable();
function loader(source) {
if (this.cacheable) {
this.cacheable();
}
context.addDependency(packageJSONPath);
const options = loader_utils_1.getOptions(context);
this.addDependency(packageJSONPath);
const options = loader_utils_1.getOptions(this);
schema_utils_1.default(schema, options, {

@@ -81,3 +81,3 @@ name: 'Wext Manifest Loader',

catch (err) {
context.emitError(err);
this.emitError(err);
}

@@ -88,7 +88,7 @@ }

if (browserVendors.indexOf(vendor) < 0) {
return context.emitError(`${LOADER_NAME}: browser ${vendor} is not supported`);
return this.emitError(`${LOADER_NAME}: browser ${vendor} is not supported`);
}
}
else {
return context.emitError(`${LOADER_NAME}: TARGET_BROWSER variable missing`);
return this.emitError(`${LOADER_NAME}: TARGET_BROWSER variable missing`);
}

@@ -102,13 +102,15 @@ const manifest = transformVendorKeys(content, vendor);

catch (err) {
context.emitError(err);
this.emitError(err);
}
}
const outputPath = loader_utils_1.interpolateName(context, 'manifest.json', {
const outputPath = loader_utils_1.interpolateName(this, 'manifest.json', {
source,
});
const publicPath = `__webpack_public_path__ + ${JSON.stringify(outputPath)}`;
const formattedJson = JSON.stringify(manifest, null, 2)
.replace(/\u2028/g, '\\u2028')
.replace(/\u2029/g, '\\u2029');
context.emitFile(outputPath, formattedJson);
this.emitFile(outputPath, formattedJson);
return `module.exports = ${publicPath};`;
}
exports.loader = loader;
{
"name": "wext-manifest-loader",
"version": "2.1.0",
"version": "2.2.0",
"description": "Webpack loader that lets you specify `manifest.json` properties to appear only in specific browsers.",

@@ -5,0 +5,0 @@ "license": "MIT",

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