rewiremock
Advanced tools
Comparing version 3.12.1 to 3.12.2
@@ -1,3 +0,3 @@ | ||
var Module = typeof __webpack_require__ === 'function' ? require('../webpack/module') : require('module'); | ||
var Module = typeof __webpack_require__ === 'function' ? require('../webpack/src/module') : require('module'); | ||
export default Module; |
@@ -8,2 +8,4 @@ 'use strict'; | ||
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; | ||
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; | ||
@@ -167,3 +169,3 @@ | ||
}).reduce(function (acc, x) { | ||
return Object.assign(acc, _defineProperty({}, x.key, x.value)); | ||
return _extends(acc, _defineProperty({}, x.key, x.value)); | ||
}, {}); | ||
@@ -246,3 +248,3 @@ } | ||
return mockResult(request, mock, function () { | ||
return Object.assign({}, mock.override, mock.value, { __esModule: mock.original.__esModule }); | ||
return _extends({}, mock.override, mock.value, { __esModule: mock.original.__esModule }); | ||
}); | ||
@@ -283,3 +285,3 @@ } | ||
return mockResult(request, mock, function () { | ||
return Object.assign({}, mock.original, mock.value, { __esModule: mock.original.__esModule }); | ||
return _extends({}, mock.original, mock.value, { __esModule: mock.original.__esModule }); | ||
}); | ||
@@ -286,0 +288,0 @@ } |
@@ -6,4 +6,4 @@ 'use strict'; | ||
}); | ||
var Module = typeof __webpack_require__ === 'function' ? require('../webpack/module') : require('module'); | ||
var Module = typeof __webpack_require__ === 'function' ? require('../webpack/src/module') : require('module'); | ||
exports.default = Module; |
@@ -9,2 +9,4 @@ 'use strict'; | ||
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; | ||
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); | ||
@@ -40,3 +42,3 @@ | ||
var originalName = this.mock.name; | ||
Object.assign(this.mock, source.mock); | ||
_extends(this.mock, source.mock); | ||
this.mock.name = originalName; | ||
@@ -128,5 +130,5 @@ } else { | ||
if ((typeof stubs === 'undefined' ? 'undefined' : _typeof(stubs)) === 'object') { | ||
this.mock.value = Object.assign(this.mock.value, stubs); | ||
this.mock.value = _extends(this.mock.value, stubs); | ||
} else { | ||
this.mock.value = Object.assign(stubs, this.mock.value); | ||
this.mock.value = _extends(stubs, this.mock.value); | ||
} | ||
@@ -133,0 +135,0 @@ |
@@ -8,2 +8,4 @@ 'use strict'; | ||
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; | ||
var _module = require('./module'); | ||
@@ -100,3 +102,3 @@ | ||
mockScope.isolation = Object.assign({}, options); | ||
mockScope.isolation = _extends({}, options); | ||
return mockModule; | ||
@@ -259,3 +261,3 @@ }; | ||
var storeCache = function storeCache() { | ||
mockScope.requireCache = mockScope.requireCache || Object.assign({}, require.cache); | ||
mockScope.requireCache = mockScope.requireCache || _extends({}, require.cache); | ||
}; | ||
@@ -262,0 +264,0 @@ |
@@ -8,2 +8,4 @@ 'use strict'; | ||
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; | ||
var _common = require('../_common'); | ||
@@ -23,3 +25,3 @@ | ||
var createPlugin = function createPlugin(plugin) { | ||
var result = Object.assign({ | ||
var result = _extends({ | ||
fileNameTransformer: onetoone, | ||
@@ -26,0 +28,0 @@ wipeCheck: pass, |
@@ -8,2 +8,4 @@ 'use strict'; | ||
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; | ||
var _path = require('path'); | ||
@@ -86,5 +88,5 @@ | ||
aliasConf = conf.reduce(function (prev, curr) { | ||
var next = Object.assign({}, prev); | ||
var next = _extends({}, prev); | ||
if (curr.resolve && curr.resolve.alias) { | ||
Object.assign(next, curr.resolve.alias); | ||
_extends(next, curr.resolve.alias); | ||
} | ||
@@ -91,0 +93,0 @@ return next; |
{ | ||
"name": "rewiremock", | ||
"version": "3.12.1", | ||
"version": "3.12.2", | ||
"description": "Advanced dependency mocking device.", | ||
@@ -90,2 +90,3 @@ "main": "lib/index.js", | ||
"babel-plugin-syntax-dynamic-import": "^6.18.0", | ||
"babel-plugin-transform-object-assign": "^6.22.0", | ||
"babel-plugin-transform-object-rest-spread": "^6.23.0", | ||
@@ -92,0 +93,0 @@ "babel-polyfill": "^6.26.0", |
@@ -6,3 +6,3 @@ const {relative} = require("path"); | ||
const file = normalizePath(relative(process.cwd(), __dirname + '/interceptor/index.js').replace(/\\/g, '/')); | ||
const file = normalizePath(relative(process.cwd(), __dirname + '/src/interceptor.js').replace(/\\/g, '/')); | ||
@@ -9,0 +9,0 @@ const injectString = `/***/if(typeof __webpack_require__!=='undefined') { |
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
180441
3868
32