webpack-core
Advanced tools
Comparing version 0.2.10 to 0.2.11
@@ -0,0 +0,0 @@ /* |
@@ -0,0 +0,0 @@ /* |
@@ -0,0 +0,0 @@ /* |
@@ -0,0 +0,0 @@ /* |
@@ -0,0 +0,0 @@ /* |
@@ -106,3 +106,4 @@ /* | ||
}.bind(this), | ||
values: null, | ||
inputValue: undefined, | ||
value: null, | ||
options: options, | ||
@@ -120,4 +121,8 @@ debug: options.debug | ||
var isError = false; // internal error | ||
if(!context.async) context.async = function() { | ||
if(isDone) throw new Error("async(): The callback was already called."); | ||
var reportedError = false; | ||
if(!context.async) context.async = function async() { | ||
if(isDone) { | ||
if(reportedError) return; // ignore | ||
throw new Error("async(): The callback was already called."); | ||
} | ||
isSync = false; | ||
@@ -127,3 +132,6 @@ return context.callback; | ||
context.callback = function() { | ||
if(isDone) throw new Error("callback(): The callback was already called."); | ||
if(isDone) { | ||
if(reportedError) return; // ignore | ||
throw new Error("callback(): The callback was already called."); | ||
} | ||
isDone = true; | ||
@@ -156,2 +164,3 @@ isSync = false; | ||
isDone = true; | ||
reportedError = true; | ||
callback(e); | ||
@@ -194,7 +203,11 @@ } | ||
loaderContextCacheable = false; | ||
loaderContext.query = l.query; | ||
runSyncOrAsync(l.module.pitch, loaderContext, [remaining.join("!"), pitchedLoaders.join("!"), l.data = {}], function(err) { | ||
var privateLoaderContext = Object.create(loaderContext); | ||
privateLoaderContext.query = l.query; | ||
runSyncOrAsync(l.module.pitch, privateLoaderContext, [remaining.join("!"), pitchedLoaders.join("!"), l.data = {}], function(err) { | ||
if(err) return onModuleBuildFailed.call(this, err); | ||
if(!loaderContextCacheable) this.cacheable = false; | ||
var args = Array.prototype.slice.call(arguments, 1); | ||
loaderContext.resourcePath = privateLoaderContext.resourcePath; | ||
loaderContext.resourceQuery = privateLoaderContext.resourceQuery; | ||
loaderContext.resource = privateLoaderContext.resource; | ||
if(args.length > 0) { | ||
@@ -225,3 +238,3 @@ onModuleBuild.apply(this, args); | ||
function nextLoader(err/*, paramBuffer1, paramBuffer2, ...*/) { | ||
function nextLoader(err/*, paramBuffer1, param2, ...*/) { | ||
if(!loaderContextCacheable) module.cacheable = false; | ||
@@ -240,6 +253,6 @@ var args = Array.prototype.slice.call(arguments, 1); | ||
var l = loaderContext.loaders[loaderContext.loaderIndex]; | ||
loaderContext.data = l.data; | ||
loaderContext.inputValue = loaderContext.value; | ||
loaderContext.value = null; | ||
loaderContext.query = l.query; | ||
var privateLoaderContext = Object.create(loaderContext); | ||
privateLoaderContext.data = l.data; | ||
privateLoaderContext.inputValue = loaderContext.inputValue; | ||
privateLoaderContext.query = l.query; | ||
if(!l.module.raw && Buffer.isBuffer(args[0])) { | ||
@@ -251,3 +264,6 @@ args[0] = args[0].toString("utf-8"); | ||
loaderContextCacheable = false; | ||
runSyncOrAsync(l.module, loaderContext, args, nextLoader); | ||
runSyncOrAsync(l.module, privateLoaderContext, args, function() { | ||
loaderContext.inputValue = privateLoaderContext.value; | ||
nextLoader.apply(null, arguments); | ||
}); | ||
} | ||
@@ -254,0 +270,0 @@ |
@@ -0,0 +0,0 @@ /* |
@@ -0,0 +0,0 @@ /* |
@@ -0,0 +0,0 @@ /* |
@@ -0,0 +0,0 @@ /* |
@@ -0,0 +0,0 @@ /* |
@@ -0,0 +0,0 @@ /* |
@@ -0,0 +0,0 @@ /* |
@@ -0,0 +0,0 @@ /* |
@@ -0,0 +0,0 @@ /* |
{ | ||
"name": "webpack-core", | ||
"version": "0.2.10", | ||
"version": "0.2.11", | ||
"author": "Tobias Koppers @sokra", | ||
@@ -5,0 +5,0 @@ "description": "The core of webpack and enhanced-require.", |
@@ -0,0 +0,0 @@ # webpack-core |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
819
26753