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

wallaby-webpack

Package Overview
Dependencies
Maintainers
2
Versions
64
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

wallaby-webpack - npm Package Compare versions

Comparing version 0.0.9 to 0.0.10

26

index.js

@@ -137,4 +137,5 @@ 'use strict';

var trackedFile = m.resource && affectedFiles[m.resource];
var isEntryFile = trackedFile && self._entryPatterns && self._entryFiles[trackedFile.fullPath];
var source = self._getSource(m);
var isEntryFile = trackedFile && self._entryFiles[trackedFile.fullPath];
var isTestFile = trackedFile && trackedFile.test;
var source = self._getSource(m, trackedFile);
var code = source.code;

@@ -149,3 +150,3 @@ var sourceMap = trackedFile && source.map();

// var a = require('./a'); var b = require('imports?window=mocked!./a');
? (trackedFile.path + (m.id ? ('.' + m.id) : '') + '.wbp.js')
? (trackedFile.path + ((_.isNumber(m.id) && !isTestFile) ? ('.' + m.id) : '') + '.wbp.js')
: path.join('__modules', m.id + '.js'),

@@ -155,3 +156,3 @@ original: trackedFile,

sourceMap: sourceMap,
order: isEntryFile ? trackedFile.order : undefined
order: (isEntryFile && self._entryPatterns) ? trackedFile.order : undefined
}));

@@ -164,7 +165,6 @@

// entry modules (tests) have id = 0,
// caching them by file path so that we can load them from __moduleBundler.loadTests
var moduleId = m.id || m.resource;
// caching test entry modules by file path so that we can load them from __moduleBundler.loadTests
var moduleId = WebpackPostprocessor._getModuleId(m, trackedFile);
if (!self._moduleIds[moduleId]) {
self._moduleIds[moduleId] = m.id || true;
self._moduleIds[moduleId] = m.id;
// modules unknown so far force test loader script reload

@@ -265,3 +265,3 @@ self._loaderEmitRequired = true;

_getSource(m) {
_getSource(m, file) {
var self = this;

@@ -274,3 +274,3 @@ // to avoid wrapping module into a function, we do it a bit differently in _wrapSourceFile

return {
code: WebpackPostprocessor._wrapSourceFile(m.id || m.resource, node.source()),
code: WebpackPostprocessor._wrapSourceFile(WebpackPostprocessor._getModuleId(m, file), node.source()),
map: () => node.map()

@@ -280,2 +280,8 @@ };

static _getModuleId(m, file) {
var testFile = file && file.test;
if (testFile || !_.isNumber(m.id)) return m.resource;
return m.id;
}
static _wrapSourceFile(id, content) {

@@ -282,0 +288,0 @@ return 'window.__moduleBundler.cache[' + JSON.stringify(id) + '] = [function(__webpack_require__, module, exports) {'

{
"name": "wallaby-webpack",
"version": "0.0.9",
"version": "0.0.10",
"description": "Webpack postprocessor for wallaby.js",

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