Socket
Socket
Sign inDemoInstall

extract-text-webpack-plugin

Package Overview
Dependencies
277
Maintainers
7
Versions
56
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 2.0.0-rc.1 to 2.0.0-rc.2

schema/loader-schema.json

17

CHANGELOG.md

@@ -5,2 +5,19 @@ # Change Log

<a name="2.0.0-rc.2"></a>
# [2.0.0-rc.2](https://github.com/webpack/extract-text-webpack-plugin/compare/v2.0.0-rc.1...v2.0.0-rc.2) (2017-01-28)
### Bug Fixes
* **schema:** allow `extract` to accept omit/remove flags ([8ce93d5](https://github.com/webpack/extract-text-webpack-plugin/commit/8ce93d5)), closes [#371](https://github.com/webpack/extract-text-webpack-plugin/issues/371)
* **schema:** connect loader schema with the code properly ([03bb4aa](https://github.com/webpack/extract-text-webpack-plugin/commit/03bb4aa))
* **schema:** emit proper error messages ([70cbd4b](https://github.com/webpack/extract-text-webpack-plugin/commit/70cbd4b))
### Features
* **errors:** show nicer errors if there are extra fields ([76a171d](https://github.com/webpack/extract-text-webpack-plugin/commit/76a171d))
<a name="2.0.0-rc.1"></a>

@@ -7,0 +24,0 @@ # [2.0.0-rc.1](https://github.com/webpack/extract-text-webpack-plugin/compare/v2.0.0-rc.0...v2.0.0-rc.1) (2017-01-28)

6

index.js

@@ -13,2 +13,4 @@ /*

var schemaTester = require('./schema/validator');
var loaderSchema = require('./schema/loader-schema.json');
var pluginSchema = require('./schema/plugin-schema.json');

@@ -124,3 +126,3 @@ var NS = fs.realpathSync(__dirname);

} else {
schemaTester(options);
schemaTester(pluginSchema, options);
}

@@ -190,3 +192,3 @@ this.filename = options.filename;

} else {
schemaTester(options);
schemaTester(loaderSchema, options);
}

@@ -193,0 +195,0 @@ var loader = options.loader;

{
"name": "extract-text-webpack-plugin",
"version": "2.0.0-rc.1",
"version": "2.0.0-rc.2",
"author": "Tobias Koppers @sokra",

@@ -5,0 +5,0 @@ "description": "Extract text from bundle into a file.",

@@ -38,3 +38,3 @@ [![npm][npm]][npm-url]

fallbackLoader: "style-loader",
use: "css-loader"
loader: "css-loader"
})

@@ -41,0 +41,0 @@ }

var Ajv = require('ajv');
var ajv = new Ajv({allErrors: true});
var json = require('./schema.json');
module.exports = function validate(data) {
var validSchema = ajv.compile(json);
var valid = validSchema(data);
module.exports = function validate(schema, data) {
var ajv = new Ajv({
errorDataPath: 'property'
});
var isValid = ajv.validate(schema, data);
if(!valid) {
if(!isValid) {
throw new Error(ajv.errorsText());
}
}
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