conflict_resolution
stringlengths 27
16k
|
---|
<<<<<<<
var trace = getJSDUserStack(context);
Firebug.Console.log(trace, context, "stackTrace");
return Console.getDefaultReturnValue(win);
=======
var unwrapped = Wrapper.unwrapObject(win);
unwrapped.top._firebugStackTrace = "console-tracer";
debugger;
delete unwrapped.top._firebugStackTrace;
return Console.getDefaultReturnValue();
>>>>>>>
var trace = getJSDUserStack(context);
Firebug.Console.log(trace, context, "stackTrace");
return Console.getDefaultReturnValue(); |
<<<<<<<
function(Obj, FBTrace, Firebug, Domplate, FirebugReps, Locale, Wrapper, Url, StackFrame, Events,
Css, Dom, Str, ProfilerEngine) {
=======
function(Module, Rep, Obj, Firebug, Domplate, FirebugReps, Locale, Wrapper, Url, StackFrame,
Events, Css, Dom, Str, FBS) {
>>>>>>>
function(Module, Rep, Obj, FBTrace, Firebug, Domplate, FirebugReps, Locale, Wrapper, Url,
StackFrame, Events, Css, Dom, Str, ProfilerEngine) {
<<<<<<<
var Profiler = Obj.extend(Firebug.Module,
=======
Firebug.Profiler = Obj.extend(Module,
>>>>>>>
var Profiler = Obj.extend(Module,
<<<<<<<
Profiler.ProfileCaption = domplate(Firebug.Rep,
=======
Firebug.Profiler.ProfileCaption = domplate(Rep,
>>>>>>>
Profiler.ProfileCaption = domplate(Rep,
<<<<<<<
Profiler.ProfileCall = domplate(Firebug.Rep,
=======
Firebug.Profiler.ProfileCall = domplate(Rep,
>>>>>>>
Profiler.ProfileCall = domplate(Rep, |
<<<<<<<
function(Obj, Firebug, Domplate, Locale, Events, Wrapper, Dom, Css, Str, Arr, Persist,
BreakpointGroup) {
=======
function(Rep, Obj, Firebug, Domplate, Locale, Events, Wrapper, Dom, Css, Str, Arr, Persist) {
>>>>>>>
function(Rep, Obj, Firebug, Domplate, Locale, Events, Wrapper, Dom, Css, Str, Arr, Persist,
BreakpointGroup) { |
<<<<<<<
"firebug/debugger/breakpoints/breakpointConditionEditor",
=======
"firebug/net/timeInfoTip",
"firebug/js/breakpoint",
>>>>>>>
"firebug/debugger/breakpoints/breakpointConditionEditor",
"firebug/net/timeInfoTip",
<<<<<<<
Arr, System, Menu, NetUtils, NetProgress, CSSInfoTip, ConditionEditor) {
=======
Arr, System, Menu, NetUtils, NetProgress, CSSInfoTip, TimeInfoTip) {
>>>>>>>
Arr, System, Menu, NetUtils, NetProgress, CSSInfoTip, ConditionEditor, TimeInfoTip) { |
<<<<<<<
=======
"firebug/chrome/panelNotification",
"firebug/js/breakpoint",
>>>>>>>
"firebug/chrome/panelNotification",
<<<<<<<
Arr, System, Menu, NetUtils, NetProgress, CSSInfoTip, ConditionEditor, TimeInfoTip) {
=======
Arr, System, Menu, NetUtils, NetProgress, CSSInfoTip, TimeInfoTip,
PanelNotification) {
>>>>>>>
Arr, System, Menu, NetUtils, NetProgress, CSSInfoTip, ConditionEditor, TimeInfoTip,
PanelNotification) {
<<<<<<<
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
=======
// ********************************************************************************************* //
>>>>>>>
// ********************************************************************************************* // |
<<<<<<<
var Cc = Components.classes;
var Ci = Components.interfaces;
var Cu = Components.utils;
var Trace = FBTrace.to("DBG_PROFILER");
var TraceError = FBTrace.to("DBG_ERRORS");
=======
var {domplate, TAG, DIV, SPAN, TD, TR, TH, TABLE, THEAD, TBODY, P, UL, LI, A} = Domplate;
const Cc = Components.classes;
const Ci = Components.interfaces;
>>>>>>>
var {domplate, TAG, DIV, SPAN, TD, TR, TH, TABLE, THEAD, TBODY, P, UL, LI, A} = Domplate;
var Cc = Components.classes;
var Ci = Components.interfaces;
var Cu = Components.utils;
var Trace = FBTrace.to("DBG_PROFILER");
var TraceError = FBTrace.to("DBG_ERRORS");
<<<<<<<
with (Domplate) {
Profiler.ProfileTable = domplate(
=======
Firebug.Profiler.ProfileTable = domplate(
>>>>>>>
Profiler.ProfileTable = domplate( |
<<<<<<<
/*jshint esnext:true, curly:false */
/*global FBTrace:1, Components:1, Proxy:1, define:1 */
=======
/*global define:1, Components:1, Proxy:1 */
>>>>>>>
/*global define:1, Components:1, Proxy:1 */
<<<<<<<
=======
"firebug/lib/trace",
"firebug/lib/wrapper",
>>>>>>>
"firebug/lib/trace",
"firebug/lib/wrapper",
<<<<<<<
function(Firebug, DebuggerLib) {
=======
function(Firebug, FBTrace, Wrapper, DebuggerLib) {
>>>>>>>
function(Firebug, FBTrace, Wrapper, DebuggerLib) {
<<<<<<<
var env, dbgGlobal;
env = this.getEnvironmentForObject(win, obj, context);
dbgGlobal = DebuggerLib.getDebuggeeGlobal(context, win);
=======
>>>>>>>
<<<<<<<
var dbgValue = self.getVariableOrOptimizedAway(scope, name);
if (self.isSimple(dbgValue))
return dbgValue;
return DebuggerLib.unwrapDebuggeeValue(dbgValue);
}
catch (exc)
{
if (FBTrace.DBG_COMMANDLINE)
FBTrace.sysout("ClosureInspector; failed to return value from getter", exc);
return undefined;
}
=======
}
});
>>>>>>>
}
});
<<<<<<<
var dbgValue = dbgGlobal.makeDebuggeeValue(value);
var scope = env.find(name);
if (!scope)
throw new Error("can't create new closure variable");
if (self.getVariableOrOptimizedAway(scope, name) === OptimizedAway)
throw new Error("can't set optimized-away closure variable");
scope.setVariable(name, dbgValue);
=======
self.withEnvironmentForObject(win, obj, context, function(env, dbgGlobal)
{
var dbgValue = dbgGlobal.makeDebuggeeValue(value);
var scope = env.find(name);
if (!scope)
throw new Error("can't create new closure variable");
if (self.getVariableOrOptimizedAway(scope, name) === OptimizedAway)
throw new Error("can't set optimized-away closure variable");
scope.setVariable(name, dbgValue);
});
>>>>>>>
self.withEnvironmentForObject(win, obj, context, function(env, dbgGlobal)
{
var dbgValue = dbgGlobal.makeDebuggeeValue(value);
var scope = env.find(name);
if (!scope)
throw new Error("can't create new closure variable");
if (self.getVariableOrOptimizedAway(scope, name) === OptimizedAway)
throw new Error("can't set optimized-away closure variable");
scope.setVariable(name, dbgValue);
});
<<<<<<<
}
catch (exc)
{
if (FBTrace.DBG_COMMANDLINE)
FBTrace.sysout("ClosureInspector; getScopeWrapper failed", exc);
return;
}
var dbgGlobal = DebuggerLib.getDebuggeeGlobal(context, win);
var scopeDataHolder = Object.create(ScopeProxy.prototype);
scopeDataHolder.scope = scope;
=======
>>>>>>>
<<<<<<<
if (!this.has(name))
return;
var dbgValue = self.getVariableOrOptimizedAway(scope, name);
return {
=======
var dbgVal = self.getVariableOrOptimizedAway(scope, name);
Object.defineProperty(clone, name, {
>>>>>>>
var dbgValue = self.getVariableOrOptimizedAway(scope, name);
Object.defineProperty(clone, name, {
<<<<<<<
if (self.isSimple(dbgValue))
return dbgValue;
return DebuggerLib.unwrapDebuggeeValue(dbgValue);
=======
if (self.isSimple(dbgVal))
return dbgVal;
return DebuggerLib.unwrapDebuggeeValue(dbgVal);
>>>>>>>
if (self.isSimple(dbgValue))
return dbgValue;
return DebuggerLib.unwrapDebuggeeValue(dbgValue);
<<<<<<<
set: (dbgValue === OptimizedAway ? undefined : function(value) {
dbgValue = dbgGlobal.makeDebuggeeValue(value);
scope.setVariable(name, dbgValue);
=======
set: (dbgVal === OptimizedAway ? undefined : function(value) {
DebuggerLib.withTemporaryDebugger(context, global, function()
{
dbgVal = dbgGlobal.makeDebuggeeValue(value);
scope.setVariable(name, dbgVal);
});
>>>>>>>
set: (dbgValue === OptimizedAway ? undefined : function(value) {
DebuggerLib.withTemporaryDebugger(context, global, function()
{
dbgValue = dbgGlobal.makeDebuggeeValue(value);
scope.setVariable(name, dbgValue);
});
<<<<<<<
extendLanguageSyntax: function(expr)
=======
withExtendedLanguageSyntax: function(expr, win, context, callback)
>>>>>>>
withExtendedLanguageSyntax: function(expr, win, context, callback)
<<<<<<<
return newExpr;
},
onExecuteClosureHelperCommand: function(context, args)
{
var obj = args[0];
var win = context.getCurrentGlobal();
return this.getClosureWrapper(obj, win, context);
=======
// Stick the helper function for .%-expressions on the window object.
// This really belongs on the command line object, but that doesn't
// work when stopped in the debugger (issue 5321, which depends on
// integrating JSD2) and we really need this to work there.
// To avoid leaking capabilities into arbitrary web pages, this is
// only injected when needed.
try
{
var self = this;
Object.defineProperty(Wrapper.getContentView(win), fname, {
value: function(obj)
{
return self.getClosureWrapper(obj, win, context);
},
writable: true,
configurable: true
});
}
catch (exc)
{
Trace.sysout("ClosureInspector; failed to inject " + fname, exc);
}
var gotDebugger = false;
try
{
return DebuggerLib.withTemporaryDebugger(context, win, function()
{
gotDebugger = true;
return callback(newExpr);
});
}
catch (exc)
{
if (gotDebugger)
throw exc;
// Wasn't able to activate debugger. :(
// Rerun the command without debugger, and let it fail in a friendlier way.
return callback(newExpr);
}
>>>>>>>
var gotDebugger = false;
try
{
return DebuggerLib.withTemporaryDebugger(context, win, function()
{
gotDebugger = true;
return callback(newExpr);
});
}
catch (exc)
{
if (gotDebugger)
throw exc;
// Wasn't able to activate debugger. :(
// Rerun the command without debugger, and let it fail in a friendlier way.
return callback(newExpr);
}
},
onExecuteClosureHelperCommand: function(context, args)
{
var obj = args[0];
var win = context.getCurrentGlobal();
return this.getClosureWrapper(obj, win, context); |
<<<<<<<
if (typeof object === "undefined")
return 1000;
else if (object instanceof SourceLink)
=======
else if (object instanceof SourceLink.SourceLink)
>>>>>>>
else if (object instanceof SourceLink) |
<<<<<<<
=======
properties.push(new InspectorInterface.StringInput({
title: 'Volume',
isActiveFn: function () {
return selectionInfo.dataType === 'sound' && selectionInfo.numObjects === 1;
},
getValueFn: function () {
return selectionInfo.object.volume;
},
onChangeFn: function (val) {
wickEditor.actionHandler.doAction('modifyObjects', {
objs: [selectionInfo.object],
modifiedStates: [{
volume: eval(val),
}]
});
}
}));
properties.push(new InspectorInterface.CheckboxInput({
title: 'Loop',
isActiveFn: function () {
return selectionInfo.dataType === 'sound' && selectionInfo.numObjects === 1;
},
getValueFn: function () {
return selectionInfo.object.loop;
},
onChangeFn: function (val) {
wickEditor.actionHandler.doAction('modifyObjects', {
objs: [selectionInfo.object],
modifiedStates: [{
loop: val,
}]
});
}
}));
/*properties.push(new InspectorInterface.CheckboxInput({
title: 'Save State',
isActiveFn: function () {
return selectionInfo.type === 'frame' && selectionInfo.numObjects === 1;
},
getValueFn: function () {
return selectionInfo.object.alwaysSaveState;
},
onChangeFn: function (val) {
selectionInfo.object.alwaysSaveState = val;
}
}));*/
/*properties.push(new InspectorInterface.SelectInput({
title: 'Type',
options: ['Linear', 'Quadratic', 'Exponential'],
isActiveFn: function () {
return selectionInfo.type === 'frame'
&& selectionInfo.numObjects === 1
&& selectionInfo.object.getCurrentTween();
},
getValueFn: function () {
return selectionInfo.object.getCurrentTween().tweenType;
},
onChangeFn: function (val) {
var tween = selectionInfo.object.getCurrentTween();
tween.tweenType = val;
if(val === 'Linear') {
tween.tweenDir = 'None';
}
if(val !== 'Linear' && tween.tweenDir === 'None') {
tween.tweenDir = "In";
}
wickEditor.syncInterfaces();
}
}));*/
>>>>>>>
properties.push(new InspectorInterface.StringInput({
title: 'Volume',
isActiveFn: function () {
return selectionInfo.dataType === 'sound' && selectionInfo.numObjects === 1;
},
getValueFn: function () {
return selectionInfo.object.volume;
},
onChangeFn: function (val) {
wickEditor.actionHandler.doAction('modifyObjects', {
objs: [selectionInfo.object],
modifiedStates: [{
volume: eval(val),
}]
});
}
}));
properties.push(new InspectorInterface.CheckboxInput({
title: 'Loop',
isActiveFn: function () {
return selectionInfo.dataType === 'sound' && selectionInfo.numObjects === 1;
},
getValueFn: function () {
return selectionInfo.object.loop;
},
onChangeFn: function (val) {
wickEditor.actionHandler.doAction('modifyObjects', {
objs: [selectionInfo.object],
modifiedStates: [{
loop: val,
}]
});
}
})); |
<<<<<<<
describe("Register custom keyword", function () {
it("function called", function () {
var schema = {
customKeyword: "A"
};
var data = {};
tv4.defineKeyword('customKeyword', function () {
return "Custom failure";
});
var result = tv4.validateMultiple(data, schema, false, true);
assert.isFalse(result.valid, "Must not be valid");
assert.deepEqual(result.errors[0].message, 'Custom keyword failed: customKeyword (Custom failure)');
});
it("custom error code", function () {
var schema = {
customKeyword: "A"
};
var data = "test test test";
tv4.defineKeyword('customKeyword', function (data, value) {
return {
code: 'CUSTOM_KEYWORD_FOO',
message: {data: data, value: value}
};
});
tv4.defineError('CUSTOM_KEYWORD_FOO', 123456789, "{value}: {data}");
var result = tv4.validateMultiple(data, schema, false, true);
assert.isFalse(result.valid, "Must not be valid");
assert.deepEqual(result.errors[0].message, 'A: test test test');
assert.deepEqual(result.errors[0].code, 123456789);
});
});
=======
describe("Issue 108", function () {
it("Normalise schemas even inside $ref", function () {
var schema = {
"id": "http://example.com/schema" + Math.random(),
"$ref": "#whatever",
"properties": {
"foo": {
"id": "#test",
"type": "string"
}
}
};
tv4.addSchema(schema);
var result = tv4.validateMultiple("test data", schema.id + '#test');
assert.isTrue(result.valid, 'validateMultiple() should return valid');
assert.deepEqual(result.missing.length, 0, 'should have no missing schemas');
var result2 = tv4.validateMultiple({"foo":"bar"}, schema.id + '#test');
assert.isFalse(result2.valid, 'validateMultiple() should return invalid');
assert.deepEqual(result2.missing.length, 0, 'should have no missing schemas');
});
});
describe("Issue 109", function () {
it("Don't break on null values with banUnknownProperties", function () {
var schema = {
"type": "object",
"properties": {
"foo": {
"type": "object",
"additionalProperties": {"type": "string"}
}
}
};
var data = {foo: null};
var result = tv4.validateMultiple(data, schema, true, true);
assert.isFalse(result.valid, 'validateMultiple() should return valid');
});
});
>>>>>>>
describe("Register custom keyword", function () {
it("function called", function () {
var schema = {
customKeyword: "A"
};
var data = {};
tv4.defineKeyword('customKeyword', function () {
return "Custom failure";
});
var result = tv4.validateMultiple(data, schema, false, true);
assert.isFalse(result.valid, "Must not be valid");
assert.deepEqual(result.errors[0].message, 'Custom keyword failed: customKeyword (Custom failure)');
});
it("custom error code", function () {
var schema = {
customKeyword: "A"
};
var data = "test test test";
tv4.defineKeyword('customKeyword', function (data, value) {
return {
code: 'CUSTOM_KEYWORD_FOO',
message: {data: data, value: value}
};
});
tv4.defineError('CUSTOM_KEYWORD_FOO', 123456789, "{value}: {data}");
var result = tv4.validateMultiple(data, schema, false, true);
assert.isFalse(result.valid, "Must not be valid");
assert.deepEqual(result.errors[0].message, 'A: test test test');
assert.deepEqual(result.errors[0].code, 123456789);
});
});
describe("Issue 108", function () {
it("Normalise schemas even inside $ref", function () {
var schema = {
"id": "http://example.com/schema" + Math.random(),
"$ref": "#whatever",
"properties": {
"foo": {
"id": "#test",
"type": "string"
}
}
};
tv4.addSchema(schema);
var result = tv4.validateMultiple("test data", schema.id + '#test');
assert.isTrue(result.valid, 'validateMultiple() should return valid');
assert.deepEqual(result.missing.length, 0, 'should have no missing schemas');
var result2 = tv4.validateMultiple({"foo":"bar"}, schema.id + '#test');
assert.isFalse(result2.valid, 'validateMultiple() should return invalid');
assert.deepEqual(result2.missing.length, 0, 'should have no missing schemas');
});
});
describe("Issue 109", function () {
it("Don't break on null values with banUnknownProperties", function () {
var schema = {
"type": "object",
"properties": {
"foo": {
"type": "object",
"additionalProperties": {"type": "string"}
}
}
};
var data = {foo: null};
var result = tv4.validateMultiple(data, schema, true, true);
assert.isFalse(result.valid, 'validateMultiple() should return valid');
});
}); |
<<<<<<<
var ValidatorContext = function (parent, collectMultiple, checkRecursive) {
=======
// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/indexOf?redirectlocale=en-US&redirectslug=JavaScript%2FReference%2FGlobal_Objects%2FArray%2FindexOf
if (!Array.prototype.indexOf) {
Array.prototype.indexOf = function (searchElement /*, fromIndex */ ) {
"use strict";
if (this == null) {
throw new TypeError();
}
var t = Object(this);
var len = t.length >>> 0;
if (len === 0) {
return -1;
}
var n = 0;
if (arguments.length > 1) {
n = Number(arguments[1]);
if (n != n) { // shortcut for verifying if it's NaN
n = 0;
} else if (n != 0 && n != Infinity && n != -Infinity) {
n = (n > 0 || -1) * Math.floor(Math.abs(n));
}
}
if (n >= len) {
return -1;
}
var k = n >= 0 ? n : Math.max(len - Math.abs(n), 0);
for (; k < len; k++) {
if (k in t && t[k] === searchElement) {
return k;
}
}
return -1;
}
}
var ValidatorContext = function ValidatorContext(parent, collectMultiple, errorMessages) {
>>>>>>>
// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/indexOf?redirectlocale=en-US&redirectslug=JavaScript%2FReference%2FGlobal_Objects%2FArray%2FindexOf
if (!Array.prototype.indexOf) {
Array.prototype.indexOf = function (searchElement /*, fromIndex */ ) {
if (this === null) {
throw new TypeError();
}
var t = Object(this);
var len = t.length >>> 0;
if (len === 0) {
return -1;
}
var n = 0;
if (arguments.length > 1) {
n = Number(arguments[1]);
if (n !== n) { // shortcut for verifying if it's NaN
n = 0;
} else if (n !== 0 && n !== Infinity && n !== -Infinity) {
n = (n > 0 || -1) * Math.floor(Math.abs(n));
}
}
if (n >= len) {
return -1;
}
var k = n >= 0 ? n : Math.max(len - Math.abs(n), 0);
for (; k < len; k++) {
if (k in t && t[k] === searchElement) {
return k;
}
}
return -1;
}
}
var ValidatorContext = function ValidatorContext(parent, collectMultiple, errorMessages, checkRecursive) {
<<<<<<<
if (checkRecursive) {
this.checkRecursive = true;
this.scanned = [];
this.scannedFrozen = [];
this.scannedFrozenSchemas = [];
this.key = 'tv4_validation_id';
}
=======
this.errorMessages = errorMessages;
>>>>>>>
if (checkRecursive) {
this.checkRecursive = true;
this.scanned = [];
this.scannedFrozen = [];
this.scannedFrozenSchemas = [];
this.key = 'tv4_validation_id';
}
this.errorMessages = errorMessages;
<<<<<<<
if (this.schemas[baseUrl] !== undefined) {
schema = this.schemas[baseUrl];
=======
if (typeof this.schemas[baseUrl] === 'object') {
var schema = this.schemas[baseUrl];
>>>>>>>
if (typeof this.schemas[baseUrl] === 'object') {
schema = this.schemas[baseUrl];
<<<<<<<
ValidatorContext.prototype.validateAll = function validateAll(data, schema, dataPathParts, schemaPathParts) {
var topLevel;
if (schema['$ref'] !== undefined) {
=======
ValidatorContext.prototype.getSchemaUris = function (filterRegExp) {
var list = [];
for (var key in this.schemas) {
if (!filterRegExp || filterRegExp.test(key)) {
list.push(key);
}
}
return list;
};
ValidatorContext.prototype.getMissingUris = function (filterRegExp) {
var list = [];
for (var key in this.missingMap) {
if (!filterRegExp || filterRegExp.test(key)) {
list.push(key);
}
}
return list;
};
ValidatorContext.prototype.dropSchemas = function () {
this.schemas = {};
this.reset();
};
ValidatorContext.prototype.reset = function () {
this.missing = [];
this.missingMap = {};
this.errors = [];
};
ValidatorContext.prototype.validateAll = function (data, schema, dataPathParts, schemaPathParts) {
if (schema['$ref'] != undefined) {
>>>>>>>
ValidatorContext.prototype.getSchemaUris = function (filterRegExp) {
var list = [];
for (var key in this.schemas) {
if (!filterRegExp || filterRegExp.test(key)) {
list.push(key);
}
}
return list;
};
ValidatorContext.prototype.getMissingUris = function (filterRegExp) {
var list = [];
for (var key in this.missingMap) {
if (!filterRegExp || filterRegExp.test(key)) {
list.push(key);
}
}
return list;
};
ValidatorContext.prototype.dropSchemas = function () {
this.schemas = {};
this.reset();
};
ValidatorContext.prototype.reset = function () {
this.missing = [];
this.missingMap = {};
this.errors = [];
};
ValidatorContext.prototype.validateAll = function (data, schema, dataPathParts, schemaPathParts) {
var topLevel;
if (schema['$ref'] !== undefined) {
<<<<<<<
if (this.checkRecursive && (typeof data) == 'object') {
topLevel = !this.scanned.length;
if (data[this.key] && data[this.key].indexOf(schema) != -1) { return null; }
var frozenIndex;
if (Object.isFrozen(data)) {
frozenIndex = this.scannedFrozen.indexOf(data);
if (frozenIndex != -1 && this.scannedFrozenSchemas[frozenIndex].indexOf(schema) != -1) { return null; }
}
this.scanned.push(data);
if (Object.isFrozen(data)) {
if (frozenIndex == -1) {
frozenIndex = this.scannedFrozen.length;
this.scannedFrozen.push(data);
this.scannedFrozenSchemas.push([]);
}
this.scannedFrozenSchemas[frozenIndex].push(schema);
} else {
if (!data[this.key]) {
Object.defineProperty(data, this.key, {
value: [],
configurable: true
});
}
data[this.key].push(schema);
}
}
=======
>>>>>>>
if (this.checkRecursive && (typeof data) === 'object') {
topLevel = !this.scanned.length;
if (data[this.key] && data[this.key].indexOf(schema) !== -1) { return null; }
var frozenIndex;
if (Object.isFrozen(data)) {
frozenIndex = this.scannedFrozen.indexOf(data);
if (frozenIndex !== -1 && this.scannedFrozenSchemas[frozenIndex].indexOf(schema) !== -1) { return null; }
}
this.scanned.push(data);
if (Object.isFrozen(data)) {
if (frozenIndex === -1) {
frozenIndex = this.scannedFrozen.length;
this.scannedFrozen.push(data);
this.scannedFrozenSchemas.push([]);
}
this.scannedFrozenSchemas[frozenIndex].push(schema);
} else {
if (!data[this.key]) {
Object.defineProperty(data, this.key, {
value: [],
configurable: true
});
}
data[this.key].push(schema);
}
}
<<<<<<<
error = (new ValidationError(ErrorCodes.ARRAY_LENGTH_SHORT, "Array is too short (" + data.length + "), minimum " + schema.minItems)).prefixWith(null, "minItems");
=======
var error = (this.createError(ErrorCodes.ARRAY_LENGTH_SHORT, {length: data.length, minimum: schema.minItems})).prefixWith(null, "minItems");
>>>>>>>
error = (this.createError(ErrorCodes.ARRAY_LENGTH_SHORT, {length: data.length, minimum: schema.minItems})).prefixWith(null, "minItems");
<<<<<<<
error = (new ValidationError(ErrorCodes.ARRAY_LENGTH_LONG, "Array is too long (" + data.length + " chars), maximum " + schema.maxItems)).prefixWith(null, "maxItems");
=======
var error = (this.createError(ErrorCodes.ARRAY_LENGTH_LONG, {length: data.length, maximum: schema.maxItems})).prefixWith(null, "maxItems");
>>>>>>>
error = (this.createError(ErrorCodes.ARRAY_LENGTH_LONG, {length: data.length, maximum: schema.maxItems})).prefixWith(null, "maxItems");
<<<<<<<
error = new ValidationError(ErrorCodes.OBJECT_PROPERTIES_MINIMUM, "Too few properties defined (" + keys.length + "), minimum " + schema.minProperties).prefixWith(null, "minProperties");
=======
var error = this.createError(ErrorCodes.OBJECT_PROPERTIES_MINIMUM, {propertyCount: keys.length, minimum: schema.minProperties}).prefixWith(null, "minProperties");
>>>>>>>
error = this.createError(ErrorCodes.OBJECT_PROPERTIES_MINIMUM, {propertyCount: keys.length, minimum: schema.minProperties}).prefixWith(null, "minProperties");
<<<<<<<
error = new ValidationError(ErrorCodes.OBJECT_PROPERTIES_MAXIMUM, "Too many properties defined (" + keys.length + "), maximum " + schema.maxProperties).prefixWith(null, "maxProperties");
=======
var error = this.createError(ErrorCodes.OBJECT_PROPERTIES_MAXIMUM, {propertyCount: keys.length, maximum: schema.maxProperties}).prefixWith(null, "maxProperties");
>>>>>>>
error = this.createError(ErrorCodes.OBJECT_PROPERTIES_MAXIMUM, {propertyCount: keys.length, maximum: schema.maxProperties}).prefixWith(null, "maxProperties");
<<<<<<<
if (error == null && notErrors.length === 0) {
return new ValidationError(ErrorCodes.NOT_PASSED, "Data matches schema from \"not\"", "", "/not")
=======
if (error == null && notErrors.length == 0) {
return this.createError(ErrorCodes.NOT_PASSED, {}, "", "/not")
>>>>>>>
if (error === null && notErrors.length === 0) {
return this.createError(ErrorCodes.NOT_PASSED, {}, "", "/not")
<<<<<<<
function searchForTrustedSchemas(map, schema, url) {
if (typeof schema.id == "string") {
if (schema.id.substring(0, url.length) == url) {
var remainder = schema.id.substring(url.length);
if ((url.length > 0 && url.charAt(url.length - 1) == "/")
|| remainder.charAt(0) == "#"
|| remainder.charAt(0) == "?") {
if (map[schema.id] === undefined) {
map[schema.id] = schema;
}
}
}
}
if (typeof schema == "object") {
for (var key in schema) {
if (key != "enum" && typeof schema[key] == "object") {
searchForTrustedSchemas(map, schema[key], url);
}
=======
function isTrustedUrl(baseUrl, testUrl) {
if(testUrl.substring(0, baseUrl.length) == baseUrl){
var remainder = testUrl.substring(baseUrl.length);
if ((testUrl.length > 0 && testUrl.charAt(baseUrl.length - 1) == "/")
|| remainder.charAt(0) == "#"
|| remainder.charAt(0) == "?") {
return true;
>>>>>>>
function isTrustedUrl(baseUrl, testUrl) {
if(testUrl.substring(0, baseUrl.length) === baseUrl){
var remainder = testUrl.substring(baseUrl.length);
if ((testUrl.length > 0 && testUrl.charAt(baseUrl.length - 1) === "/")
|| remainder.charAt(0) === "#"
|| remainder.charAt(0) === "?") {
return true;
<<<<<<<
}
=======
return api;
};
>>>>>>>
return api;
} |
<<<<<<<
var path = require("path")
var fs = require("fs")
var helpers = require('../helpers')
var minify = require('minify')
var browserify = require('browserify')
var through = require('through')
=======
var path = require("path")
var fs = require("fs")
var helpers = require('../helpers')
var minify = require('harp-minify')
>>>>>>>
var path = require("path")
var fs = require("fs")
var helpers = require('../helpers')
var minify = require('harp-minify')
var browserify = require('browserify')
var through = require('through') |
<<<<<<<
function hook_entity_post_render_content(entity) { }
/**
* Called after a form element is assembled. Use it to alter a form element.
*/
//function hook_form_element_alter(form, element, variables) { }
=======
function hook_entity_post_render_content(entity) {}
/**
* Called after drupalgap_image_path() assembles the image path. Use this hook
* to make modifications to the image path. Return the modified path, or false
* to allow the default path to be generated.
*/
function hook_image_path_alter(src) { }
>>>>>>>
function hook_entity_post_render_content(entity) { }
/**
* Called after a form element is assembled. Use it to alter a form element.
*/
//function hook_form_element_alter(form, element, variables) { }
/**
* Called after drupalgap_image_path() assembles the image path. Use this hook
* to make modifications to the image path. Return the modified path, or false
* to allow the default path to be generated.
*/
function hook_image_path_alter(src) { } |
<<<<<<<
}else if(currentJson.type === 'data'){
currentJson.content = {
=======
}else if(currentJson.$type === 'data'){
currentJson.expr = {
>>>>>>>
}else if(currentJson.$type === 'data'){
currentJson.content = { |
<<<<<<<
Cloud.use(route, bodyParser.urlencoded({extended: false, limit: '40mb'}));
Cloud.use(route, bodyParser.json({limit: '40mb'}));
Cloud.use(route, bodyParser.text({limit: '40mb'}));
=======
Cloud.use(route, timeout(TIMEOUT));
Cloud.use(route, bodyParser.urlencoded({extended: false}));
Cloud.use(route, bodyParser.json());
Cloud.use(route, bodyParser.text());
>>>>>>>
Cloud.use(route, timeout(TIMEOUT));
Cloud.use(route, bodyParser.urlencoded({extended: false, limit: '40mb'}));
Cloud.use(route, bodyParser.json({limit: '40mb'}));
Cloud.use(route, bodyParser.text({limit: '40mb'})); |
<<<<<<<
var pageInitData = utils.surroundByTryCatch(
function(pageObj, webviewId) {
utils.info("Update view with init data");
var ext = {};
ext.webviewId = webviewId,
ext.enablePullUpRefresh = pageObj.hasOwnProperty("onReachBottom");
var params = {
data: {
data: pageObj.data,
ext: ext,
options: {
firstRender: !0
}
}
};
utils.publish("appDataChange", params, [webviewId]);
reportRealtimeAction.triggerAnalytics("pageReady", pageObj);
}
=======
var pageInitData = Reporter.surroundThirdByTryCatch(
function(pageObj, webviewId) {
utils.info("Update view with init data");
var ext = {};
ext.webviewId = webviewId,
ext.enablePullUpRefresh = pageObj.hasOwnProperty("onReachBottom");
var params = {
data: {
data: pageObj.data,
ext: ext,
options: {
firstRender: !0
}
}
};
utils.publish("appDataChange", params, [webviewId]);
reportRealtimeAction.triggerAnalytics("pageReady", pageObj);
}
>>>>>>>
var pageInitData = Reporter.surroundThirdByTryCatch(
function(pageObj, webviewId) {
utils.info("Update view with init data");
var ext = {};
ext.webviewId = webviewId,
ext.enablePullUpRefresh = pageObj.hasOwnProperty("onReachBottom");
var params = {
data: {
data: pageObj.data,
ext: ext,
options: {
firstRender: !0
}
}
};
utils.publish("appDataChange", params, [webviewId]);
reportRealtimeAction.triggerAnalytics("pageReady", pageObj);
}
<<<<<<<
var curPageObj = undefined;
if (pageRegObjs.hasOwnProperty(routePath)) {
curPageObj = pageRegObjs[routePath];
} else {
utils.warn("Page route 错误", "Page[" + routePath + "] not found. May be caused by: 1. Forgot to add page route in app.json. 2. Invoking Page() in async task.");
curPageObj = {};
}
app.newPageTime = Date.now()
var page = new parsePage(curPageObj, webviewId, routePath)
if(utils.isDevTools()){
__wxAppData[routePath] = page.data
__wxAppData[routePath].__webviewId__ = webviewId
utils.publish(eventDefine.UPDATE_APP_DATA)
}
currentPage = {
page: page,
webviewId: webviewId,
route: routePath
};
pageStack.push(currentPage);
pageStackObjs[webviewId] = {
page: page,
route: routePath
};
pageInitData(page, webviewId)
page.onLoad(params);
page.onShow();
reportRealtimeAction.triggerAnalytics("enterPage", page);
speedReport("appRoute2newPage", app.appRouteTime, app.newPageTime);
=======
var curPageObj = undefined;
if (pageRegObjs.hasOwnProperty(routePath)) {
curPageObj = pageRegObjs[routePath];
} else {
utils.warn("Page route 错误", "Page[" + routePath + "] not found. May be caused by: 1. Forgot to add page route in app.json. 2. Invoking Page() in async task.");
curPageObj = {};
}
app.newPageTime = Date.now()
var page = new parsePage(curPageObj, webviewId, routePath)
pageInitData(page, webviewId)
if(utils.isDevTools()){
__wxAppData[routePath] = page.data
__wxAppData[routePath].__webviewId__ = webviewId
utils.publish(eventDefine.UPDATE_APP_DATA)
}
currentPage = {
page: page,
webviewId: webviewId,
route: routePath
};
pageStack.push(currentPage);
page.onLoad(params);
page.onShow();
pageStackObjs[webviewId] = {
page: page,
route: routePath
};
reportRealtimeAction.triggerAnalytics("enterPage", page);
// speedReport("appRoute2newPage", app.appRouteTime, app.newPageTime);
>>>>>>>
var curPageObj = undefined;
if (pageRegObjs.hasOwnProperty(routePath)) {
curPageObj = pageRegObjs[routePath];
} else {
utils.warn("Page route 错误", "Page[" + routePath + "] not found. May be caused by: 1. Forgot to add page route in app.json. 2. Invoking Page() in async task.");
curPageObj = {};
}
app.newPageTime = Date.now()
var page = new parsePage(curPageObj, webviewId, routePath)
if(utils.isDevTools()){
__wxAppData[routePath] = page.data
__wxAppData[routePath].__webviewId__ = webviewId
utils.publish(eventDefine.UPDATE_APP_DATA)
}
currentPage = {
page: page,
webviewId: webviewId,
route: routePath
};
pageStack.push(currentPage);
pageStackObjs[webviewId] = {
page: page,
route: routePath
};
pageInitData(page, webviewId)
page.onLoad(params);
page.onShow();
reportRealtimeAction.triggerAnalytics("enterPage", page);
<<<<<<<
if (!pageStackObjs.hasOwnProperty(pWebviewId)) {
return utils.warn("事件警告", "OnWebviewEvent: " + pEvent + ", WebviewId: " + pWebviewId + " not found");
}
var pageItem = pageStackObjs[pWebviewId],
pageObj = pageItem.page;
return pEvent === eventDefine.DOM_READY_EVENT ?
(
app.pageReadyTime = Date.now(),
utils.info("Invoke event onReady in page: " + pageItem.route),
pageObj.onReady(),
void speedReport("newPage2pageReady", app.newPageTime, app.pageReadyTime)
) :
(
utils.info("Invoke event " + pEvent + " in page: " + pageItem.route),
pageObj.hasOwnProperty(pEvent) ?
utils.safeInvoke.call(pageObj, pEvent, params) :
utils.warn("事件警告", "Do not have " + pEvent + " handler in current page: " + pageItem.route + ". Please make sure that " + pEvent + " handler has been defined in " + pageItem.route + ", or " + pageItem.route + " has been added into app.json")
);
=======
if (!pageStackObjs.hasOwnProperty(pWebviewId)) {
return utils.warn("事件警告", "OnWebviewEvent: " + pEvent + ", WebviewId: " + pWebviewId + " not found");
}
var pageItem = pageStackObjs[pWebviewId],
pageObj = pageItem.page;
return pEvent === eventDefine.DOM_READY_EVENT ?
(
app.pageReadyTime = Date.now(),
utils.info("Invoke event onReady in page: " + pageItem.route),
pageObj.onReady()
) :
(
utils.info("Invoke event " + pEvent + " in page: " + pageItem.route),
pageObj.hasOwnProperty(pEvent) ?
utils.safeInvoke.call(pageObj, pEvent, params) :
utils.warn("事件警告", "Do not have " + pEvent + " handler in current page: " + pageItem.route + ". Please make sure that " + pEvent + " handler has been defined in " + pageItem.route + ", or " + pageItem.route + " has been added into app.json")
);
>>>>>>>
if (!pageStackObjs.hasOwnProperty(pWebviewId)) {
return utils.warn("事件警告", "OnWebviewEvent: " + pEvent + ", WebviewId: " + pWebviewId + " not found");
}
var pageItem = pageStackObjs[pWebviewId],
pageObj = pageItem.page;
return pEvent === eventDefine.DOM_READY_EVENT ?
(
app.pageReadyTime = Date.now(),
utils.info("Invoke event onReady in page: " + pageItem.route),
pageObj.onReady()
) :
(
utils.info("Invoke event " + pEvent + " in page: " + pageItem.route),
pageObj.hasOwnProperty(pEvent) ?
utils.safeInvoke.call(pageObj, pEvent, params) :
utils.warn("事件警告", "Do not have " + pEvent + " handler in current page: " + pageItem.route + ". Please make sure that " + pEvent + " handler has been defined in " + pageItem.route + ", or " + pageItem.route + " has been added into app.json")
);
<<<<<<<
wd.onAppRoute(utils.surroundByTryCatch(function(params) {
var path = params.path,
webviewId = params.webviewId,
query = params.query || {},
openType = params.openType;
skipPage(path, webviewId, query, openType);
=======
wd.onAppRoute(Reporter.surroundThirdByTryCatch(function(params) {
var path = params.path,
webviewId = params.webviewId,
query = params.query || {},
openType = params.openType;
skipPage(path, webviewId, query, openType);
>>>>>>>
wd.onAppRoute(Reporter.surroundThirdByTryCatch(function(params) {
var path = params.path,
webviewId = params.webviewId,
query = params.query || {},
openType = params.openType;
skipPage(path, webviewId, query, openType);
<<<<<<<
wd.onWebviewEvent(utils.surroundByTryCatch(function(params) {
var webviewId = params.webviewId,
eventName = params.eventName,
data = params.data;
return doWebviewEvent(webviewId, eventName, data);
=======
wd.onWebviewEvent(Reporter.surroundThirdByTryCatch(function(params) {
var webviewId = params.webviewId,
eventName = params.eventName,
data = params.data;
return doWebviewEvent(webviewId, eventName, data);
>>>>>>>
wd.onWebviewEvent(Reporter.surroundThirdByTryCatch(function(params) {
var webviewId = params.webviewId,
eventName = params.eventName,
data = params.data;
return doWebviewEvent(webviewId, eventName, data);
<<<<<<<
ServiceJSBridge.on("onPullDownRefresh", utils.surroundByTryCatch(function(e, pWebViewId) {
pullDownRefresh(pWebViewId);
=======
ServiceJSBridge.on("onPullDownRefresh", Reporter.surroundThirdByTryCatch(function(e, pWebViewId) {
pullDownRefresh(pWebViewId);
>>>>>>>
ServiceJSBridge.on("onPullDownRefresh", Reporter.surroundThirdByTryCatch(function(e, pWebViewId) {
pullDownRefresh(pWebViewId); |
<<<<<<<
import json from 'rollup-plugin-json'
import path from 'path'
import { fileURLToPath } from 'url'
const __dirname = path.dirname(fileURLToPath(import.meta.url))
=======
import { terser } from 'rollup-plugin-terser'
>>>>>>>
import { terser } from 'rollup-plugin-terser'
import json from 'rollup-plugin-json'
import path from 'path'
import { fileURLToPath } from 'url'
const __dirname = path.dirname(fileURLToPath(import.meta.url)) |
<<<<<<<
workerUrl: null,
=======
workerPath: null,
preview: null
>>>>>>>
workerUrl: null,
preview: null,
<<<<<<<
const { workerUrl } = this.props
=======
const { workerPath: workerUrl, preview } = this.props
>>>>>>>
const { workerUrl, preview } = this.props
<<<<<<<
workerUrl: PropTypes.string,
=======
workerPath: PropTypes.string,
preview: PropTypes.number
>>>>>>>
workerUrl: PropTypes.string,
preview: PropTypes.number, |
<<<<<<<
import SliderRail from './sliderRail'
import { ReaderContext } from '@/context'
=======
>>>>>>>
import SliderRail from './sliderRail'
<<<<<<<
render() {
const { max, bufferProgress, reversed } = this.props
const domain = [1, max]
const { values } = this.state
if (max == 1) return null
return (
<div className="villain-slider" style={{ height: sliderStyle.height }}>
<Slider
rootStyle={sliderStyle}
domain={domain}
step={1}
mode={2}
values={values}
onUpdate={this.onUpdate}
onChange={this.onChange}
reversed={reversed}
>
<Rail>
{({ activeHandleID, getEventData, getRailProps }) => (
<SliderRail
activeHandleID={activeHandleID}
getEventData={getEventData}
getRailProps={getRailProps}
/>
)}
</Rail>
<Handles>
{({ handles, activeHandleID, getHandleProps }) => (
<div className="slider-handles">
{handles.map(handle => (
<Handle
key={handle.id}
handle={handle}
domain={domain}
isActive={handle.id === activeHandleID}
getHandleProps={getHandleProps}
/>
))}
</div>
)}
</Handles>
=======
useEffect(() => {
if (!seeking) setValue([value + 1])
}, [value])
>>>>>>>
useEffect(() => {
if (!seeking) setValue([value + 1])
}, [value]) |
<<<<<<<
const { autoHideControls, allowFullScreen, mangaMode } = opts
=======
// Set default value in context state
// Nore: unsure about this, probably not a good idea, please fix it!
const { autoHideControls, allowFullScreen } = opts
>>>>>>>
// Set default value in context state
// Nore: unsure about this, probably not a good idea, please fix it!
const { autoHideControls, allowFullScreen, mangaMode } = opts
<<<<<<<
<ReaderProvider defaultState={{ autoHideControls, mangaMode }}>
<Wrapp width={width} height={height}>
=======
<ReaderProvider defaultState={{ autoHideControls }}>
<Wrapp width={width} height={height} preview={opts.preview}>
>>>>>>>
<ReaderProvider defaultState={{ autoHideControls, mangaMode }}>
<Wrapp width={width} height={height} preview={opts.preview}> |
<<<<<<<
case 'light/get_balances':
var addresses = params;
if (conf.bLight)
return sendErrorResponse(ws, tag, "I'm light myself, can't serve you");
if (ws.bOutbound)
return sendErrorResponse(ws, tag, "light clients have to be inbound");
if (!addresses)
return sendErrorResponse(ws, tag, "no params in light/get_balances");
if (!ValidationUtils.isNonemptyArray(addresses))
return sendErrorResponse(ws, tag, "addresses must be non-empty array");
if (!addresses.every(ValidationUtils.isValidAddress))
return sendErrorResponse(ws, tag, "some addresses are not valid");
if (addresses.length > 100)
return sendErrorResponse(ws, tag, "too many addresses");
db.query(
"SELECT address, asset, is_stable, SUM(amount) AS balance \n\
FROM outputs JOIN units USING(unit) \n\
WHERE is_spent=0 AND address IN(?) AND sequence='good' \n\
GROUP BY address, asset, is_stable", [addresses], function(rows) {
var objBalances = {};
addresses.forEach(function(address) {
var balances = {};
balances.base = {
stable: 0,
pending: 0
};
rows.forEach(function(row) {
if (row.address === address) {
if (row.asset && !balances[row.asset])
balances[row.asset] = {
stable: 0,
pending: 0
};
balances[row.asset || 'base'][row.is_stable ? 'stable' : 'pending'] = row.balance;
}
});
objBalances[address] = balances;
});
sendResponse(ws, tag, objBalances);
}
);
break;
=======
case 'light/get_definition':
if (conf.bLight)
return sendErrorResponse(ws, tag, "I'm light myself, can't serve you");
if (ws.bOutbound)
return sendErrorResponse(ws, tag, "light clients have to be inbound");
if (!params)
return sendErrorResponse(ws, tag, "no params in light/get_definition");
if (!ValidationUtils.isValidAddress(params))
return sendErrorResponse(ws, tag, "address not valid");
db.query("SELECT definition FROM definitions WHERE definition_chash=?", [params], function(rows){
if (!rows[0])
return sendResponse(ws, tag, null);
var arrDefinition = JSON.parse(rows[0].definition);
sendResponse(ws, tag, arrDefinition);
});
break;
>>>>>>>
case 'light/get_definition':
if (conf.bLight)
return sendErrorResponse(ws, tag, "I'm light myself, can't serve you");
if (ws.bOutbound)
return sendErrorResponse(ws, tag, "light clients have to be inbound");
if (!params)
return sendErrorResponse(ws, tag, "no params in light/get_definition");
if (!ValidationUtils.isValidAddress(params))
return sendErrorResponse(ws, tag, "address not valid");
db.query("SELECT definition FROM definitions WHERE definition_chash=?", [params], function(rows){
if (!rows[0])
return sendResponse(ws, tag, null);
var arrDefinition = JSON.parse(rows[0].definition);
sendResponse(ws, tag, arrDefinition);
});
break;
case 'light/get_balances':
var addresses = params;
if (conf.bLight)
return sendErrorResponse(ws, tag, "I'm light myself, can't serve you");
if (ws.bOutbound)
return sendErrorResponse(ws, tag, "light clients have to be inbound");
if (!addresses)
return sendErrorResponse(ws, tag, "no params in light/get_balances");
if (!ValidationUtils.isNonemptyArray(addresses))
return sendErrorResponse(ws, tag, "addresses must be non-empty array");
if (!addresses.every(ValidationUtils.isValidAddress))
return sendErrorResponse(ws, tag, "some addresses are not valid");
if (addresses.length > 100)
return sendErrorResponse(ws, tag, "too many addresses");
db.query(
"SELECT address, asset, is_stable, SUM(amount) AS balance \n\
FROM outputs JOIN units USING(unit) \n\
WHERE is_spent=0 AND address IN(?) AND sequence='good' \n\
GROUP BY address, asset, is_stable", [addresses], function(rows) {
var objBalances = {};
addresses.forEach(function(address) {
var balances = {};
balances.base = {
stable: 0,
pending: 0
};
rows.forEach(function(row) {
if (row.address === address) {
if (row.asset && !balances[row.asset])
balances[row.asset] = {
stable: 0,
pending: 0
};
balances[row.asset || 'base'][row.is_stable ? 'stable' : 'pending'] = row.balance;
}
});
objBalances[address] = balances;
});
sendResponse(ws, tag, objBalances);
}
);
break; |
<<<<<<<
=======
var VERSION = 3;
>>>>>>> |
<<<<<<<
var formulaParser = require('./formula/index');
var Decimal = require('decimal.js');
var dataFeeds = require('./data_feeds.js');
=======
var evalFormulaBB = process.browser ? null : require('./formula/index'+'');
var BigNumber = require('bignumber.js');
>>>>>>>
var formulaParser = process.browser ? null : require('./formula/index'+'');
var Decimal = require('decimal.js');
var dataFeeds = require('./data_feeds.js'); |
<<<<<<<
if (!common.isChakraEngine) {
// V8 options
expect('--abort-on-uncaught-exception', 'B\n');
}
=======
>>>>>>>
<<<<<<<
if (!common.isChakraEngine) {
// V8 options
expect('--max_old_space_size=0', 'B\n');
}
=======
// V8 options
expect('--abort-on-uncaught-exception', 'B\n');
expect('--abort_on_uncaught_exception', 'B\n');
expect('--abort_on-uncaught_exception', 'B\n');
expect('--max_old_space_size=0', 'B\n');
expect('--max-old_space-size=0', 'B\n');
expect('--max-old-space-size=0', 'B\n');
>>>>>>>
if (!common.isChakraEngine) {
// V8 options
expect('--abort-on-uncaught-exception', 'B\n');
expect('--abort_on_uncaught_exception', 'B\n');
expect('--abort_on-uncaught_exception', 'B\n');
expect('--max_old_space_size=0', 'B\n');
expect('--max-old_space-size=0', 'B\n');
expect('--max-old-space-size=0', 'B\n');
} |
<<<<<<<
common.engineSpecificMessage({
v8: 'PromiseSubclass { <pending> }',
chakracore: 'PromiseSubclass {}'
}));
=======
'PromiseSubclass [Promise] { <pending> }');
>>>>>>>
common.engineSpecificMessage({
v8: 'PromiseSubclass [Promise] { <pending> }',
chakracore: 'PromiseSubclass {}'
})); |
<<<<<<<
if (!common.isChakraEngine) {
expect('--icu-data-dir=_d', 'B\n');
=======
>>>>>>>
if (!common.isChakraEngine) { |
<<<<<<<
}
].filter((v) => !common.engineSpecificMessage(v)));
=======
},
// Newline within template string maintains whitespace.
{ client: client_unix, send: '`foo \n`',
expect: prompt_multiline + '\'foo \\n\'\n' + prompt_unix },
// Whitespace is not evaluated.
{ client: client_unix, send: ' \t \n',
expect: prompt_unix }
]);
>>>>>>>
},
// Newline within template string maintains whitespace.
{ client: client_unix, send: '`foo \n`',
expect: prompt_multiline + '\'foo \\n\'\n' + prompt_unix },
// Whitespace is not evaluated.
{ client: client_unix, send: ' \t \n',
expect: prompt_unix }
].filter((v) => !common.engineSpecificMessage(v))); |
<<<<<<<
var crypto= require("crypto");
=======
var dns = require('dns');
>>>>>>>
var crypto= require("crypto");
var dns = require('dns');
<<<<<<<
if (this.forceClose) this.forceClose(e);
=======
self.destroy(e);
>>>>>>>
if (this.forceClose) this.forceClose(e);
self.destroy(e);
<<<<<<<
if (self.secure && bytesRead == 0 && secureBytesRead > 0){
// Deal with SSL handshake
if (self.server) {
self._checkForSecureHandshake();
} else {
if (self.secureEstablised) {
self.flush();
} else {
self._checkForSecureHandshake();
}
}
} else if (bytesRead === 0) {
=======
if (bytesRead === 0) {
// EOF
>>>>>>>
if (self.secure && bytesRead == 0 && secureBytesRead > 0){
// Deal with SSL handshake
if (self.server) {
self._checkForSecureHandshake();
} else {
if (self.secureEstablised) {
self.flush();
} else {
self._checkForSecureHandshake();
}
}
} else if (bytesRead === 0) {
<<<<<<<
if (!this.writable) {
if (this.secure) return false;
else throw new Error('Stream is not writable');
}
=======
if (!this.writable) throw new Error('Stream is not writable');
if (data.length == 0) return true;
>>>>>>>
if (!this.writable) {
if (this.secure) return false;
else throw new Error('Stream is not writable');
}
if (data.length == 0) return true; |
<<<<<<<
if (!common.isChakraEngine) {
/* eslint-disable no-undef */
common.allowGlobals(externalizeString, isOneByteString, x);
{
const expected = 'ümlaut eins'; // Must be a unique string.
externalizeString(expected);
assert.strictEqual(true, isOneByteString(expected));
const fd = fs.openSync(fn, 'w');
fs.writeSync(fd, expected, 0, 'latin1');
fs.closeSync(fd);
assert.strictEqual(expected, fs.readFileSync(fn, 'latin1'));
}
{
const expected = 'ümlaut zwei'; // Must be a unique string.
externalizeString(expected);
assert.strictEqual(true, isOneByteString(expected));
const fd = fs.openSync(fn, 'w');
fs.writeSync(fd, expected, 0, 'utf8');
fs.closeSync(fd);
assert.strictEqual(expected, fs.readFileSync(fn, 'utf8'));
}
{
const expected = '中文 1'; // Must be a unique string.
externalizeString(expected);
assert.strictEqual(false, isOneByteString(expected));
const fd = fs.openSync(fn, 'w');
fs.writeSync(fd, expected, 0, 'ucs2');
fs.closeSync(fd);
assert.strictEqual(expected, fs.readFileSync(fn, 'ucs2'));
}
{
const expected = '中文 2'; // Must be a unique string.
externalizeString(expected);
assert.strictEqual(false, isOneByteString(expected));
const fd = fs.openSync(fn, 'w');
fs.writeSync(fd, expected, 0, 'utf8');
fs.closeSync(fd);
assert.strictEqual(expected, fs.readFileSync(fn, 'utf8'));
}
=======
/* eslint-disable no-undef */
common.allowGlobals(externalizeString, isOneByteString, x);
common.refreshTmpDir();
{
const expected = 'ümlaut eins'; // Must be a unique string.
externalizeString(expected);
assert.strictEqual(true, isOneByteString(expected));
const fd = fs.openSync(fn, 'w');
fs.writeSync(fd, expected, 0, 'latin1');
fs.closeSync(fd);
assert.strictEqual(expected, fs.readFileSync(fn, 'latin1'));
}
{
const expected = 'ümlaut zwei'; // Must be a unique string.
externalizeString(expected);
assert.strictEqual(true, isOneByteString(expected));
const fd = fs.openSync(fn, 'w');
fs.writeSync(fd, expected, 0, 'utf8');
fs.closeSync(fd);
assert.strictEqual(expected, fs.readFileSync(fn, 'utf8'));
}
{
const expected = '中文 1'; // Must be a unique string.
externalizeString(expected);
assert.strictEqual(false, isOneByteString(expected));
const fd = fs.openSync(fn, 'w');
fs.writeSync(fd, expected, 0, 'ucs2');
fs.closeSync(fd);
assert.strictEqual(expected, fs.readFileSync(fn, 'ucs2'));
}
{
const expected = '中文 2'; // Must be a unique string.
externalizeString(expected);
assert.strictEqual(false, isOneByteString(expected));
const fd = fs.openSync(fn, 'w');
fs.writeSync(fd, expected, 0, 'utf8');
fs.closeSync(fd);
assert.strictEqual(expected, fs.readFileSync(fn, 'utf8'));
>>>>>>>
if (!common.isChakraEngine) {
/* eslint-disable no-undef */
common.allowGlobals(externalizeString, isOneByteString, x);
common.refreshTmpDir();
{
const expected = 'ümlaut eins'; // Must be a unique string.
externalizeString(expected);
assert.strictEqual(true, isOneByteString(expected));
const fd = fs.openSync(fn, 'w');
fs.writeSync(fd, expected, 0, 'latin1');
fs.closeSync(fd);
assert.strictEqual(expected, fs.readFileSync(fn, 'latin1'));
}
{
const expected = 'ümlaut zwei'; // Must be a unique string.
externalizeString(expected);
assert.strictEqual(true, isOneByteString(expected));
const fd = fs.openSync(fn, 'w');
fs.writeSync(fd, expected, 0, 'utf8');
fs.closeSync(fd);
assert.strictEqual(expected, fs.readFileSync(fn, 'utf8'));
}
{
const expected = '中文 1'; // Must be a unique string.
externalizeString(expected);
assert.strictEqual(false, isOneByteString(expected));
const fd = fs.openSync(fn, 'w');
fs.writeSync(fd, expected, 0, 'ucs2');
fs.closeSync(fd);
assert.strictEqual(expected, fs.readFileSync(fn, 'ucs2'));
}
{
const expected = '中文 2'; // Must be a unique string.
externalizeString(expected);
assert.strictEqual(false, isOneByteString(expected));
const fd = fs.openSync(fn, 'w');
fs.writeSync(fd, expected, 0, 'utf8');
fs.closeSync(fd);
assert.strictEqual(expected, fs.readFileSync(fn, 'utf8'));
} |
<<<<<<<
const { isSelected, isInRange, isPassive, isStartEdge, isEndEdge } = this.props;
=======
const { isSelected, isInRange, isPassive, dayMoment, isToday } = this.props;
>>>>>>>
const { isSelected, isInRange, isPassive, isStartEdge, isEndEdge, dayMoment, isToday } = this.props;
<<<<<<<
const hoverStyle = hover ? styles['DayHover'] : {};
const activeStyle = active ? styles['DayActive'] : {};
const passiveStyle = isPassive ? styles['DayPassive'] : {};
const startEdgeStyle = isStartEdge ? styles['DayStartEdge'] : {};
const endEdgeStyle = isEndEdge ? styles['DayEndEdge'] : {};
const selectedStyle = isSelected ? styles['DaySelected'] : {};
const inRangeStyle = isInRange ? styles['DayInRange'] : {};
=======
const hoverStyle = hover ? styles['DayHover'] : {};
const activeStyle = active ? styles['DayActive'] : {};
const passiveStyle = isPassive ? styles['DayPassive'] : {};
const selectedStyle = isSelected ? styles['DaySelected'] : {};
const inRangeStyle = isInRange ? styles['DayInRange'] : {};
const todayStyle = isToday ? styles['DayToday'] : {};
>>>>>>>
const hoverStyle = hover ? styles['DayHover'] : {};
const activeStyle = active ? styles['DayActive'] : {};
const passiveStyle = isPassive ? styles['DayPassive'] : {};
const startEdgeStyle = isStartEdge ? styles['DayStartEdge'] : {};
const endEdgeStyle = isEndEdge ? styles['DayEndEdge'] : {};
const selectedStyle = isSelected ? styles['DaySelected'] : {};
const inRangeStyle = isInRange ? styles['DayInRange'] : {};
const todayStyle = isToday ? styles['DayToday'] : {};
<<<<<<<
const { isSelected, isInRange, isPassive, isStartEdge, isEndEdge } = this.props;
=======
const { isSelected, isInRange, isPassive, isToday } = this.props;
>>>>>>>
const { isSelected, isInRange, isPassive, isStartEdge, isEndEdge, isToday } = this.props;
<<<<<<<
classNames = (isStartEdge) ? classNames + 'is-startEdge ' : classNames;
classNames = (isEndEdge) ? classNames + 'is-endEdge ' : classNames;
=======
classNames = (isToday) ? classNames + 'is-today ' : classNames;
>>>>>>>
classNames = (isStartEdge) ? classNames + 'is-startEdge ' : classNames;
classNames = (isEndEdge) ? classNames + 'is-endEdge ' : classNames;
classNames = (isToday) ? classNames + 'is-today ' : classNames; |
<<<<<<<
/**
* Converts commands that use var and function <name>() to use the
* local exports.context when evaled. This provides a local context
* on the REPL.
*
* @param {String} cmd The cmd to convert.
* @return {String} The converted command.
*/
// TODO(princejwesley): Remove it prior to v8.0.0 release
// Reference: https://github.com/nodejs/node/pull/7829
REPLServer.prototype.convertToContext = util.deprecate(function(cmd) {
const scopeVar = /^\s*var\s*([\w$]+)(.*)$/m;
const scopeFunc = /^\s*function\s*([\w$]+)/;
var matches;
// Replaces: var foo = "bar"; with: self.context.foo = bar;
matches = scopeVar.exec(cmd);
if (matches && matches.length === 3) {
return 'self.context.' + matches[1] + matches[2];
}
// Replaces: function foo() {}; with: foo = function foo() {};
matches = scopeFunc.exec(this.bufferedCommand);
if (matches && matches.length === 2) {
return matches[1] + ' = ' + this.bufferedCommand;
}
return cmd;
}, 'replServer.convertToContext() is deprecated', 'DEP0024');
var isIncompleteSyntaxErrorMessage = (function() {
if (process.jsEngine === 'v8') {
return function(message, code) {
if (message.startsWith('Unexpected end of input') ||
message.startsWith('missing ) after argument list') ||
message.startsWith('Unexpected token'))
return true;
if (message === 'Invalid or unexpected token') {
return isCodeRecoverable(code);
}
return false;
};
} else if (process.jsEngine.match(/^chakra/)) {
return function(message, code) {
if (/^(Expected|Unterminated)/.test(message) &&
!/ in regular expression$/.test(message)) {
return true;
}
if (message === 'Invalid or unexpected token') {
return isCodeRecoverable(code);
}
return false;
};
}
})();
=======
>>>>>>>
var isIncompleteSyntaxErrorMessage = (function() {
if (process.jsEngine === 'v8') {
return function(message, code) {
if (message.startsWith('Unexpected end of input') ||
message.startsWith('missing ) after argument list') ||
message.startsWith('Unexpected token'))
return true;
if (message === 'Invalid or unexpected token') {
return isCodeRecoverable(code);
}
return false;
};
} else if (process.jsEngine.match(/^chakra/)) {
return function(message, code) {
if (/^(Expected|Unterminated)/.test(message) &&
!/ in regular expression$/.test(message)) {
return true;
}
if (message === 'Invalid or unexpected token') {
return isCodeRecoverable(code);
}
return false;
};
}
})(); |
<<<<<<<
assert.equal(util.inspect({a: function() {}}), common.engineSpecificMessage({
v8: '{ a: [Function] }',
chakracore: '{ a: [Function: a] }'
}));
=======
assert.equal(util.inspect({a: function() {}}), '{ a: [Function: a] }');
>>>>>>>
assert.equal(util.inspect({a: function() {}}), '{ a: [Function: a] }');
v8: '{ a: [Function] }',
chakracore: '{ a: [Function: a] }'
}));
<<<<<<<
assert.equal(util.inspect(value), common.engineSpecificMessage({
v8: '{ [Function] aprop: 42 }',
chakracore: '{ [Function: value] aprop: 42 }'
}));
=======
assert.equal(util.inspect(value), '{ [Function: value] aprop: 42 }');
>>>>>>>
assert.equal(util.inspect(value), '{ [Function: value] aprop: 42 }');
v8: '{ [Function] aprop: 42 }',
chakracore: '{ [Function: value] aprop: 42 }'
})); |
<<<<<<<
var common = require('../common');
var assert = require('assert');
var util = require('util');
=======
require('../common');
const assert = require('assert');
const util = require('util');
>>>>>>>
const common = require('../common');
const assert = require('assert');
const util = require('util'); |
<<<<<<<
if (common.isLinux && ['arm', 'x64', 'mips'].includes(process.arch)) {
// PerfJitLogger is only implemented in Linux.
expect('--perf-prof', 'B\n');
}
=======
if (common.isLinux && ['arm', 'x64'].includes(process.arch)) {
// PerfJitLogger is only implemented in Linux.
expect('--perf-prof', 'B\n');
>>>>>>>
if (common.isLinux && ['arm', 'x64'].includes(process.arch)) {
// PerfJitLogger is only implemented in Linux.
expect('--perf-prof', 'B\n');
} |
<<<<<<<
var expectedFuncToString = common.engineSpecificMessage({
v8 : "{ foo: 'bar', inspect: [Function] }\n",
chakracore : "{ foo: 'bar', inspect: [Function: inspect] }\n"
});
console._stderr = process.stdout;
=======
global.process.stderr.write = function(string) {
errStrings.push(string);
};
>>>>>>>
global.process.stderr.write = function(string) {
errStrings.push(string);
};
var expectedFuncToString = common.engineSpecificMessage({
v8 : "{ foo: 'bar', inspect: [Function] }\n",
chakracore : "{ foo: 'bar', inspect: [Function: inspect] }\n"
});
<<<<<<<
assert.equal('foo\n', strings.shift());
assert.equal('foo bar\n', strings.shift());
assert.equal('foo bar hop\n', strings.shift());
assert.equal("{ slashes: '\\\\\\\\' }\n", strings.shift());
assert.equal('inspect\n', strings.shift());
assert.equal(expectedFuncToString, strings.shift());
assert.equal(expectedFuncToString, strings.shift());
=======
const expectedStrings = [
'foo', 'foo bar', 'foo bar hop', "{ slashes: '\\\\\\\\' }", 'inspect'
];
for (const expected of expectedStrings) {
assert.equal(expected + '\n', strings.shift()); // console.log (stdout)
assert.equal(expected + '\n', errStrings.shift()); // console.error (stderr)
}
for (const expected of expectedStrings) {
assert.equal(expected + '\n', strings.shift()); // console.info (stdout)
assert.equal(expected + '\n', errStrings.shift()); // console.warn (stderr)
}
assert.equal("{ foo: 'bar', inspect: [Function] }\n", strings.shift());
assert.equal("{ foo: 'bar', inspect: [Function] }\n", strings.shift());
>>>>>>>
const expectedStrings = [
'foo', 'foo bar', 'foo bar hop', "{ slashes: '\\\\\\\\' }", 'inspect'
];
for (const expected of expectedStrings) {
assert.equal(expected + '\n', strings.shift()); // console.log (stdout)
assert.equal(expected + '\n', errStrings.shift()); // console.error (stderr)
}
for (const expected of expectedStrings) {
assert.equal(expected + '\n', strings.shift()); // console.info (stdout)
assert.equal(expected + '\n', errStrings.shift()); // console.warn (stderr)
} |
<<<<<<<
if (common.isChakraEngine) {
// Skip on ChakraCore due to TypedArray .length JIT bug
// (see this issue: https://github.com/Microsoft/ChakraCore/issues/2319)
const err = new RangeError('Index out of range');
err.code = 'ERR_INDEX_OUT_OF_RANGE';
throw err;
}
const buf = new Buffer('w00t');
=======
const buf = Buffer.from('w00t');
>>>>>>>
if (common.isChakraEngine) {
// Skip on ChakraCore due to TypedArray .length JIT bug
// (see this issue: https://github.com/Microsoft/ChakraCore/issues/2319)
const err = new RangeError('Index out of range');
err.code = 'ERR_INDEX_OUT_OF_RANGE';
throw err;
}
const buf = Buffer.from('w00t'); |
<<<<<<<
const pending = new Promise(common.noop);
assert.strictEqual(util.inspect(pending), common.engineSpecificMessage({
v8: 'Promise { <pending> }',
chakracore: 'Promise {}'
}));
=======
const pending = new Promise(() => {});
assert.strictEqual(util.inspect(pending), 'Promise { <pending> }');
>>>>>>>
const pending = new Promise(() => {});
assert.strictEqual(util.inspect(pending), common.engineSpecificMessage({
v8: 'Promise { <pending> }',
chakracore: 'Promise {}'
}));
<<<<<<<
assert.strictEqual(util.inspect(new PromiseSubclass(common.noop)),
common.engineSpecificMessage({
v8: 'PromiseSubclass { <pending> }',
chakracore: 'PromiseSubclass {}'
}));
=======
assert.strictEqual(util.inspect(new PromiseSubclass(() => {})),
'PromiseSubclass { <pending> }');
>>>>>>>
assert.strictEqual(util.inspect(new PromiseSubclass(() => {})),
common.engineSpecificMessage({
v8: 'PromiseSubclass { <pending> }',
chakracore: 'PromiseSubclass {}'
})); |
<<<<<<<
if (common.isChakraEngine) {
console.log('1..0 # Skipped: This test is disabled for chakra engine ' +
'because debugger support is not implemented yet.');
return;
}
=======
const DELAY = common.platformTimeout(200);
>>>>>>>
if (common.isChakraEngine) {
console.log('1..0 # Skipped: This test is disabled for chakra engine ' +
'because debugger support is not implemented yet.');
return;
}
const DELAY = common.platformTimeout(200); |
<<<<<<<
common.engineSpecificMessage({
v8: 'PromiseSubclass { <pending> }',
chakracore: 'PromiseSubclass {}'
}));
=======
'PromiseSubclass { <pending> }');
assert.strictEqual(
util.inspect({ a: { b: new ArraySubclass([1, [2], 3]) } }, { depth: 1 }),
'{ a: { b: [ArraySubclass] } }'
);
>>>>>>>
common.engineSpecificMessage({
v8: 'PromiseSubclass { <pending> }',
assert.strictEqual(
util.inspect({ a: { b: new ArraySubclass([1, [2], 3]) } }, { depth: 1 }),
'{ a: { b: [ArraySubclass] } }' |
<<<<<<<
expect: 'undefined\r\n' + prompt_unix,
chakracore: 'skip' },
=======
expect: 'undefined\n' + prompt_unix },
>>>>>>>
expect: 'undefined\n' + prompt_unix },
chakracore: 'skip' }, |
<<<<<<<
// Skip for chakra engine as debugger support not yet present
if (!common.isChakraEngine) {
// test for Array constructor in different context
{
const Debug = require('vm').runInDebugContext('Debug');
const map = new Map();
map.set(1, 2);
const mirror = Debug.MakeMirror(map.entries(), true);
const vals = mirror.preview();
const valsOutput = [];
for (const o of vals) {
valsOutput.push(o);
}
=======
// test for Array constructor in different context
{
const Debug = vm.runInDebugContext('Debug');
const map = new Map();
map.set(1, 2);
const mirror = Debug.MakeMirror(map.entries(), true);
const vals = mirror.preview();
const valsOutput = [];
for (const o of vals) {
valsOutput.push(o);
}
>>>>>>>
// Skip for chakra engine as debugger support not yet present
if (!common.isChakraEngine) {
{
const Debug = vm.runInDebugContext('Debug');
const map = new Map();
map.set(1, 2);
const mirror = Debug.MakeMirror(map.entries(), true);
const vals = mirror.preview();
const valsOutput = [];
for (const o of vals) {
valsOutput.push(o);
}
<<<<<<<
obj = require('vm').runInNewContext('fn=function(){};new Promise(fn,fn)', {});
assert.strictEqual(util.inspect(obj), common.engineSpecificMessage({
v8: 'Promise { <pending> }',
chakracore: 'Promise {}'
}));
=======
obj = vm.runInNewContext('fn=function(){};new Promise(fn,fn)', {});
assert.strictEqual(util.inspect(obj), 'Promise { <pending> }');
>>>>>>>
obj = vm.runInNewContext('fn=function(){};new Promise(fn,fn)', {});
assert.strictEqual(util.inspect(obj), common.engineSpecificMessage({
v8: 'Promise { <pending> }',
chakracore: 'Promise {}'
}));
<<<<<<<
assert.strictEqual(util.inspect(new Promise(function() {})),
common.engineSpecificMessage({
v8: 'Promise { <pending> }',
chakracore: 'Promise {}'
}));
var promise = Promise.resolve('foo');
=======
assert.strictEqual(
util.inspect(new Promise(function() {})),
'Promise { <pending> }'
);
const promise = Promise.resolve('foo');
>>>>>>>
assert.strictEqual(
util.inspect(new Promise(function() {})),
common.engineSpecificMessage({
v8: 'Promise { <pending> }',
chakracore: 'Promise {}'
}));
const promise = Promise.resolve('foo');
<<<<<<<
// Skip for chakra engine as debugger support not yet present
// below code uses `Debug.MakeMirror` to inspect
if (!common.isChakraEngine) {
// Map/Set Iterators
var m = new Map([['foo', 'bar']]);
assert.strictEqual(util.inspect(m.keys()), 'MapIterator { \'foo\' }');
assert.strictEqual(util.inspect(m.values()), 'MapIterator { \'bar\' }');
assert.strictEqual(util.inspect(m.entries()),
'MapIterator { [ \'foo\', \'bar\' ] }');
// make sure the iterator doesn't get consumed
var keys = m.keys();
assert.strictEqual(util.inspect(keys), 'MapIterator { \'foo\' }');
assert.strictEqual(util.inspect(keys), 'MapIterator { \'foo\' }');
var s = new Set([1, 3]);
assert.strictEqual(util.inspect(s.keys()), 'SetIterator { 1, 3 }');
assert.strictEqual(util.inspect(s.values()), 'SetIterator { 1, 3 }');
assert.strictEqual(util.inspect(s.entries()),
'SetIterator { [ 1, 1 ], [ 3, 3 ] }');
// make sure the iterator doesn't get consumed
keys = s.keys();
assert.strictEqual(util.inspect(keys), 'SetIterator { 1, 3 }');
assert.strictEqual(util.inspect(keys), 'SetIterator { 1, 3 }');
}
=======
// Map/Set Iterators
const m = new Map([['foo', 'bar']]);
assert.strictEqual(util.inspect(m.keys()), 'MapIterator { \'foo\' }');
assert.strictEqual(util.inspect(m.values()), 'MapIterator { \'bar\' }');
assert.strictEqual(util.inspect(m.entries()),
'MapIterator { [ \'foo\', \'bar\' ] }');
// make sure the iterator doesn't get consumed
let keys = m.keys();
assert.strictEqual(util.inspect(keys), 'MapIterator { \'foo\' }');
assert.strictEqual(util.inspect(keys), 'MapIterator { \'foo\' }');
const s = new Set([1, 3]);
assert.strictEqual(util.inspect(s.keys()), 'SetIterator { 1, 3 }');
assert.strictEqual(util.inspect(s.values()), 'SetIterator { 1, 3 }');
assert.strictEqual(util.inspect(s.entries()),
'SetIterator { [ 1, 1 ], [ 3, 3 ] }');
// make sure the iterator doesn't get consumed
keys = s.keys();
assert.strictEqual(util.inspect(keys), 'SetIterator { 1, 3 }');
assert.strictEqual(util.inspect(keys), 'SetIterator { 1, 3 }');
>>>>>>>
// Skip for chakra engine as debugger support not yet present
// below code uses `Debug.MakeMirror` to inspect
if (!common.isChakraEngine) {
// Map/Set Iterators
const m = new Map([['foo', 'bar']]);
assert.strictEqual(util.inspect(m.keys()), 'MapIterator { \'foo\' }');
assert.strictEqual(util.inspect(m.values()), 'MapIterator { \'bar\' }');
assert.strictEqual(util.inspect(m.entries()),
'MapIterator { [ \'foo\', \'bar\' ] }');
// make sure the iterator doesn't get consumed
let keys = m.keys();
assert.strictEqual(util.inspect(keys), 'MapIterator { \'foo\' }');
assert.strictEqual(util.inspect(keys), 'MapIterator { \'foo\' }');
const s = new Set([1, 3]);
assert.strictEqual(util.inspect(s.keys()), 'SetIterator { 1, 3 }');
assert.strictEqual(util.inspect(s.values()), 'SetIterator { 1, 3 }');
assert.strictEqual(util.inspect(s.entries()),
'SetIterator { [ 1, 1 ], [ 3, 3 ] }');
// make sure the iterator doesn't get consumed
keys = s.keys();
assert.strictEqual(util.inspect(keys), 'SetIterator { 1, 3 }');
assert.strictEqual(util.inspect(keys), 'SetIterator { 1, 3 }');
} |
<<<<<<<
// number of pending user-supplied write callbacks
// this must be 0 before 'finish' can be emitted
this.pendingcb = 0;
// emit prefinish if the only thing we're waiting for is _write cbs
// This is relevant for synchronous Transform streams
this.prefinished = false;
// Internal, used in net.js and _tls_wrap.js
this.errorEmitted = false;
=======
// True if the error was already emitted and should not be thrown again
this.errorEmitted = false;
>>>>>>>
// number of pending user-supplied write callbacks
// this must be 0 before 'finish' can be emitted
this.pendingcb = 0;
// emit prefinish if the only thing we're waiting for is _write cbs
// This is relevant for synchronous Transform streams
this.prefinished = false;
// True if the error was already emitted and should not be thrown again
this.errorEmitted = false; |
<<<<<<<
expect: common.engineSpecificMessage({
v8: /^SyntaxError: In strict mode code, functions can only be declared at top level or immediately within another function/,
chakracore: /^SyntaxError: Syntax error/})
},
=======
expect: /^SyntaxError: In strict mode code, functions can only be declared at top level or inside a block./ },
>>>>>>>
expect: common.engineSpecificMessage({
v8: /^SyntaxError: In strict mode code, functions can only be declared at top level or inside a block./,
chakracore: /^SyntaxError: Syntax error/})
},
<<<<<<<
expect: common.engineSpecificMessage({
v8: /^SyntaxError: Unexpected token ILLEGAL/,
chakracore: /^SyntaxError: Invalid character/})
},
=======
expect: /^SyntaxError: Invalid or unexpected token/ },
>>>>>>>
expect: common.engineSpecificMessage({
v8: /^SyntaxError: Invalid or unexpected token/,
chakracore: /^SyntaxError: Invalid character/})
},
<<<<<<<
{
client: client_unix, send: 'a = 3.5e',
expect: /^SyntaxError: Unexpected token ILLEGAL/
},
].filter((v) => !common.engineSpecificMessage(v)));
=======
{ client: client_unix, send: 'a = 3.5e',
expect: /^SyntaxError: Invalid or unexpected token/ },
]);
>>>>>>>
{
client: client_unix, send: 'a = 3.5e',
expect: /^SyntaxError: Invalid or unexpected token/
},
].filter((v) => !common.engineSpecificMessage(v))); |
<<<<<<<
expect: common.engineSpecificMessage({
v8: /^SyntaxError: Unexpected end of input/,
chakracore: /^SyntaxError: Expected '}'/})
},
=======
expect: /\bSyntaxError: Unexpected end of input/ },
>>>>>>>
expect: common.engineSpecificMessage({
v8: /\bSyntaxError: Unexpected end of input/,
chakracore: /^SyntaxError: Expected '}'/})
},
<<<<<<<
expect: common.engineSpecificMessage({
v8: /^SyntaxError: Unexpected token i/,
chakracore: /^SyntaxError: Invalid character/})
},
=======
expect: /\bSyntaxError: Unexpected token i/ },
>>>>>>>
expect: common.engineSpecificMessage({
v8: /\bSyntaxError: Unexpected token i/,
chakracore: /^SyntaxError: Invalid character/})
},
<<<<<<<
expect: common.engineSpecificMessage({
v8: /^SyntaxError: Unexpected number/,
chakracore: /^SyntaxError: Invalid number/})
},
=======
expect: /\bSyntaxError: Unexpected number/ },
>>>>>>>
expect: common.engineSpecificMessage({
v8: /\bSyntaxError: Unexpected number/,
chakracore: /^SyntaxError: Invalid number/})
},
<<<<<<<
expect: common.engineSpecificMessage({
v8: /^SyntaxError: Unexpected end of JSON input/,
chakracore: /^SyntaxError: Syntax error/})
},
=======
expect: /\bSyntaxError: Unexpected end of JSON input/ },
>>>>>>>
expect: common.engineSpecificMessage({
v8: /\bSyntaxError: Unexpected end of JSON input/,
chakracore: /^SyntaxError: Syntax error/})
},
<<<<<<<
expect: common.engineSpecificMessage({
v8: /^SyntaxError: Invalid regular expression\:/,
chakracore: /^SyntaxError: Expected '\)' in regular expression/})
},
=======
expect: /\bSyntaxError: Invalid regular expression\:/ },
>>>>>>>
expect: common.engineSpecificMessage({
v8: /\bSyntaxError: Invalid regular expression\:/,
chakracore: /^SyntaxError: Expected '\)' in regular expression/})
},
<<<<<<<
expect: common.engineSpecificMessage({
v8: /^SyntaxError: Invalid flags supplied to RegExp constructor/,
chakracore: /^SyntaxError: Syntax error in regular expression/})
},
=======
expect: /\bSyntaxError: Invalid flags supplied to RegExp constructor/ },
>>>>>>>
expect: common.engineSpecificMessage({
v8: /\bSyntaxError: Invalid flags supplied to RegExp constructor/,
chakracore: /^SyntaxError: Syntax error in regular expression/})
},
<<<<<<<
expect: common.engineSpecificMessage({
v8: /^SyntaxError: Octal literals are not allowed in strict mode/,
chakracore: /^SyntaxError: Octal numeric literals and escape characters not allowed in strict mode/})
},
=======
expect: /\bSyntaxError: Octal literals are not allowed in strict mode/ },
>>>>>>>
expect: common.engineSpecificMessage({
v8: /\bSyntaxError: Octal literals are not allowed in strict mode/,
chakracore: /^SyntaxError: Octal numeric literals and escape characters not allowed in strict mode/})
},
<<<<<<<
expect: common.engineSpecificMessage({
v8: /^SyntaxError: Duplicate parameter name not allowed in this context/,
chakracore: /^SyntaxError: Duplicate formal parameter names not allowed in strict mode/})
},
=======
expect: /\bSyntaxError: Duplicate parameter name not allowed in this context/ },
>>>>>>>
expect: common.engineSpecificMessage({
v8: /\bSyntaxError: Duplicate parameter name not allowed in this context/,
chakracore: /^SyntaxError: Duplicate formal parameter names not allowed in strict mode/})
},
<<<<<<<
expect: common.engineSpecificMessage({
v8: /^SyntaxError: Strict mode code may not include a with statement/,
chakracore: /^SyntaxError: 'with' statements are not allowed in strict mode/})
},
=======
expect: /\bSyntaxError: Strict mode code may not include a with statement/ },
>>>>>>>
expect: common.engineSpecificMessage({
v8: /\bSyntaxError: Strict mode code may not include a with statement/,
chakracore: /^SyntaxError: 'with' statements are not allowed in strict mode/})
},
<<<<<<<
expect: common.engineSpecificMessage({
v8: /^SyntaxError: Delete of an unqualified identifier in strict mode/,
chakracore: /^SyntaxError: Calling delete on expression not allowed in strict mode/})
},
=======
expect: /\bSyntaxError: Delete of an unqualified identifier in strict mode/ },
>>>>>>>
expect: common.engineSpecificMessage({
v8: /\bSyntaxError: Delete of an unqualified identifier in strict mode/,
chakracore: /^SyntaxError: Calling delete on expression not allowed in strict mode/})
},
<<<<<<<
expect: common.engineSpecificMessage({
v8: /^SyntaxError: Unexpected eval or arguments in strict mode/,
chakracore: /^SyntaxError: Invalid usage of 'eval' in strict mode/})
},
=======
expect: /\bSyntaxError: Unexpected eval or arguments in strict mode/ },
>>>>>>>
expect: common.engineSpecificMessage({
v8: /\bSyntaxError: Unexpected eval or arguments in strict mode/,
chakracore: /^SyntaxError: Invalid usage of 'eval' in strict mode/})
},
<<<<<<<
expect: common.engineSpecificMessage({
v8: /^SyntaxError: In strict mode code, functions can only be declared at top level or inside a block./,
chakracore: /^SyntaxError: Syntax error/})
},
=======
expect: /\bSyntaxError: In strict mode code, functions can only be declared at top level or inside a block./ },
>>>>>>>
expect: common.engineSpecificMessage({
v8: /\bSyntaxError: In strict mode code, functions can only be declared at top level or inside a block./,
chakracore: /^SyntaxError: Syntax error/})
},
<<<<<<<
expect: 'undefined\n' + prompt_unix,
chakracore: 'skip' },
=======
expect: 'undefined\r\n' + prompt_unix },
>>>>>>>
expect: 'undefined\r\n' + prompt_unix,
chakracore: 'skip' },
<<<<<<<
expect: common.engineSpecificMessage({
v8: /^SyntaxError: Invalid or unexpected token/,
chakracore: /^SyntaxError: Invalid character/})
},
=======
expect: /\bSyntaxError: Invalid or unexpected token/ },
>>>>>>>
expect: common.engineSpecificMessage({
v8: /\bSyntaxError: Invalid or unexpected token/,
chakracore: /^SyntaxError: Invalid character/})
},
<<<<<<<
{
client: client_unix, send: 'a = 3.5e',
expect: /^SyntaxError: Invalid or unexpected token/ },
=======
{ client: client_unix, send: 'a = 3.5e',
expect: /\bSyntaxError: Invalid or unexpected token/ },
>>>>>>>
{
client: client_unix, send: 'a = 3.5e',
expect: /\bSyntaxError: Invalid or unexpected token/ },
<<<<<<<
expect: "'nodejs'\n" + prompt_unix },
].filter((v) => !common.engineSpecificMessage(v)));
=======
expect: "'nodejs'\r\n" + prompt_unix },
// Avoid emitting repl:line-number for SyntaxError
{ client: client_unix, send: 'a = 3.5e',
expect: /^(?!repl)/ },
// Avoid emitting stack trace
{ client: client_unix, send: 'a = 3.5e',
expect: /^(?!\s+at\s)/gm },
]);
>>>>>>>
expect: "'nodejs'\r\n" + prompt_unix },
// Avoid emitting repl:line-number for SyntaxError
{ client: client_unix, send: 'a = 3.5e',
expect: /^(?!repl)/ },
// Avoid emitting stack trace
{ client: client_unix, send: 'a = 3.5e',
expect: /^(?!\s+at\s)/gm },
].filter((v) => !common.engineSpecificMessage(v))); |
<<<<<<<
var common = require('../common');
var assert = require('assert');
var v8 = require('v8');
var vm = require('vm');
=======
require('../common');
const assert = require('assert');
const v8 = require('v8');
const vm = require('vm');
>>>>>>>
const common = require('../common');
const assert = require('assert');
const v8 = require('v8');
const vm = require('vm'); |
<<<<<<<
assert.equal(util.inspect({}), '{}');
assert.equal(util.inspect({a: 1}), '{ a: 1 }');
assert.equal(util.inspect({a: function() {}}), common.engineSpecificMessage({
v8: '{ a: [Function: a] }',
chakracore: '{ a: [Function: a] }'
}));
assert.equal(util.inspect({a: 1, b: 2}), '{ a: 1, b: 2 }');
assert.equal(util.inspect({'a': {}}), '{ a: {} }');
assert.equal(util.inspect({'a': {'b': 2}}), '{ a: { b: 2 } }');
assert.equal(util.inspect({'a': {'b': { 'c': { 'd': 2 }}}}),
=======
assert.strictEqual(util.inspect({}), '{}');
assert.strictEqual(util.inspect({a: 1}), '{ a: 1 }');
assert.strictEqual(util.inspect({a: function() {}}), '{ a: [Function: a] }');
assert.strictEqual(util.inspect({a: 1, b: 2}), '{ a: 1, b: 2 }');
assert.strictEqual(util.inspect({'a': {}}), '{ a: {} }');
assert.strictEqual(util.inspect({'a': {'b': 2}}), '{ a: { b: 2 } }');
assert.strictEqual(util.inspect({'a': {'b': { 'c': { 'd': 2 }}}}),
>>>>>>>
assert.strictEqual(util.inspect({}), '{}');
assert.strictEqual(util.inspect({a: 1}), '{ a: 1 }');
assert.strictEqual(util.inspect({a: function() {}}), common.engineSpecificMessage({
v8: '{ a: [Function: a] }',
chakracore: '{ a: [Function: a] }'
}));
assert.strictEqual(util.inspect({a: 1, b: 2}), '{ a: 1, b: 2 }');
assert.strictEqual(util.inspect({'a': {}}), '{ a: {} }');
assert.strictEqual(util.inspect({'a': {'b': 2}}), '{ a: { b: 2 } }');
assert.strictEqual(util.inspect({'a': {'b': { 'c': { 'd': 2 }}}}),
<<<<<<<
assert.equal(util.inspect(value), common.engineSpecificMessage({
v8: '{ [Function: value] aprop: 42 }',
chakracore: '{ [Function: value] aprop: 42 }'
}));
=======
assert.strictEqual(util.inspect(value), '{ [Function: value] aprop: 42 }');
>>>>>>>
assert.strictEqual(util.inspect(value), common.engineSpecificMessage({
v8: '{ [Function: value] aprop: 42 }',
chakracore: '{ [Function: value] aprop: 42 }'
}));
<<<<<<<
assert.equal(util.inspect(Promise.resolve(3)), common.engineSpecificMessage({
v8: 'Promise { 3 }',
chakracore: 'Promise {}'
}));
assert.equal(util.inspect(Promise.reject(3)), common.engineSpecificMessage({
v8: 'Promise { <rejected> 3 }',
chakracore: 'Promise {}'
}));
assert.equal(util.inspect(new Promise(function() {})),
common.engineSpecificMessage({
v8: 'Promise { <pending> }',
chakracore: 'Promise {}'
}));
=======
assert.strictEqual(util.inspect(Promise.resolve(3)), 'Promise { 3 }');
assert.strictEqual(util.inspect(Promise.reject(3)), 'Promise { <rejected> 3 }');
assert.strictEqual(
util.inspect(new Promise(function() {})),
'Promise { <pending> }'
);
>>>>>>>
assert.strictEqual(util.inspect(Promise.resolve(3)), common.engineSpecificMessage({
v8: 'Promise { 3 }',
chakracore: 'Promise {}'
}));
assert.strictEqual(util.inspect(Promise.reject(3)), common.engineSpecificMessage({
v8: 'Promise { <rejected> 3 }',
chakracore: 'Promise {}'
}));
assert.strictEqual(util.inspect(new Promise(function() {})),
common.engineSpecificMessage({
v8: 'Promise { <pending> }',
chakracore: 'Promise {}'
}));
<<<<<<<
assert.equal(util.inspect(promise), common.engineSpecificMessage({
v8: 'Promise { \'foo\', bar: 42 }',
chakracore: 'Promise { bar: 42 }'
}));
=======
assert.strictEqual(util.inspect(promise), 'Promise { \'foo\', bar: 42 }');
>>>>>>>
assert.strictEqual(util.inspect(promise), common.engineSpecificMessage({
v8: 'Promise { \'foo\', bar: 42 }',
chakracore: 'Promise { bar: 42 }'
}));
<<<<<<<
assert.equal(util.inspect(new Promise()), common.engineSpecificMessage({
v8: '{ bar: 42 }',
chakracore: 'Object { \'<unknown>\', bar: 42 }'
}));
=======
assert.strictEqual(util.inspect(new Promise()), '{ bar: 42 }');
>>>>>>>
assert.strictEqual(util.inspect(new Promise()), common.engineSpecificMessage({
v8: '{ bar: 42 }',
chakracore: 'Object { \'<unknown>\', bar: 42 }'
}));
<<<<<<<
assert.equal(util.inspect(new PromiseSubclass(function() {})),
common.engineSpecificMessage({
v8: 'PromiseSubclass { <pending> }',
chakracore: 'PromiseSubclass {}'
}));
=======
assert.strictEqual(util.inspect(new PromiseSubclass(function() {})),
'PromiseSubclass { <pending> }');
>>>>>>>
assert.strictEqual(util.inspect(new PromiseSubclass(function() {})),
common.engineSpecificMessage({
v8: 'PromiseSubclass { <pending> }',
chakracore: 'PromiseSubclass {}'
})); |
<<<<<<<
assert.strictEqual(inspect(new BigUint64Array([0n])), 'BigUint64Array [ 0n ]');
`);
}
=======
assert.strictEqual(inspect(new BigUint64Array([0n])), 'BigUint64Array [ 0n ]');
// Verify non-enumerable keys get escaped.
{
const obj = {};
Object.defineProperty(obj, 'Non\nenumerable\tkey', { value: true });
assert.strictEqual(
util.inspect(obj, { showHidden: true }),
'{ [Non\\nenumerable\\tkey]: true }'
);
}
// Check for special colors.
{
const special = inspect.colors[inspect.styles.special];
const string = inspect.colors[inspect.styles.string];
assert.strictEqual(
inspect(new WeakSet(), { colors: true }),
`WeakSet { \u001b[${special[0]}m<items unknown>\u001b[${special[1]}m }`
);
assert.strictEqual(
inspect(new WeakMap(), { colors: true }),
`WeakMap { \u001b[${special[0]}m<items unknown>\u001b[${special[1]}m }`
);
assert.strictEqual(
inspect(new Promise(() => {}), { colors: true }),
`Promise { \u001b[${special[0]}m<pending>\u001b[${special[1]}m }`
);
const rejection = Promise.reject('Oh no!');
assert.strictEqual(
inspect(rejection, { colors: true }),
`Promise { \u001b[${special[0]}m<rejected>\u001b[${special[1]}m ` +
`\u001b[${string[0]}m'Oh no!'\u001b[${string[1]}m }`
);
rejection.catch(() => {});
}
>>>>>>>
assert.strictEqual(inspect(new BigUint64Array([0n])), 'BigUint64Array [ 0n ]');
`);
}
// Verify non-enumerable keys get escaped.
{
const obj = {};
Object.defineProperty(obj, 'Non\nenumerable\tkey', { value: true });
assert.strictEqual(
util.inspect(obj, { showHidden: true }),
'{ [Non\\nenumerable\\tkey]: true }'
);
}
// Check for special colors.
{
const special = inspect.colors[inspect.styles.special];
const string = inspect.colors[inspect.styles.string];
assert.strictEqual(
inspect(new WeakSet(), { colors: true }),
`WeakSet { \u001b[${special[0]}m<items unknown>\u001b[${special[1]}m }`
);
assert.strictEqual(
inspect(new WeakMap(), { colors: true }),
`WeakMap { \u001b[${special[0]}m<items unknown>\u001b[${special[1]}m }`
);
assert.strictEqual(
inspect(new Promise(() => {}), { colors: true }),
`Promise { \u001b[${special[0]}m<pending>\u001b[${special[1]}m }`
);
const rejection = Promise.reject('Oh no!');
assert.strictEqual(
inspect(rejection, { colors: true }),
`Promise { \u001b[${special[0]}m<rejected>\u001b[${special[1]}m ` +
`\u001b[${string[0]}m'Oh no!'\u001b[${string[1]}m }`
);
rejection.catch(() => {});
} |
<<<<<<<
expect: common.engineSpecificMessage({
v8: /\bSyntaxError: Unexpected end of input/,
chakracore: /^SyntaxError: Expected '}'/ })
},
=======
expect: /^SyntaxError: Unexpected end of input/ },
>>>>>>>
expect: common.engineSpecificMessage({
v8: /^SyntaxError: Unexpected end of input/,
chakracore: /^SyntaxError: Expected '}'/ })
},
<<<<<<<
expect: common.engineSpecificMessage({
v8: /\bSyntaxError: Unexpected token i/,
chakracore: /^SyntaxError: JSON\.parse Error: Invalid character/ })
},
=======
expect: /^SyntaxError: Unexpected token i/ },
>>>>>>>
expect: common.engineSpecificMessage({
v8: /^SyntaxError: Unexpected token i/,
chakracore: /^SyntaxError: JSON\.parse Error: Invalid character/ })
},
<<<<<<<
expect: common.engineSpecificMessage({
v8: /\bSyntaxError: Unexpected number/,
chakracore: /^SyntaxError: JSON\.parse Error: Invalid number/ })
},
=======
expect: /^SyntaxError: Unexpected number/ },
>>>>>>>
expect: common.engineSpecificMessage({
v8: /^SyntaxError: Unexpected number/,
chakracore: /^SyntaxError: JSON\.parse Error: Invalid number/ })
},
<<<<<<<
expect: common.engineSpecificMessage({
v8: /\bSyntaxError: Unexpected end of JSON input/,
chakracore: /^SyntaxError: JSON\.parse Error: Invalid character/ })
},
=======
expect: /^SyntaxError: Unexpected end of JSON input/ },
>>>>>>>
expect: common.engineSpecificMessage({
v8: /^SyntaxError: Unexpected end of JSON input/,
chakracore: /^SyntaxError: JSON\.parse Error: Invalid character/ })
},
<<<<<<<
expect: common.engineSpecificMessage({
v8: /\bSyntaxError: Invalid regular expression:/,
chakracore: /^SyntaxError: Expected '\)' in regular expression/ })
},
=======
expect: /^SyntaxError: Invalid regular expression:/ },
>>>>>>>
expect: common.engineSpecificMessage({
v8: /^SyntaxError: Invalid regular expression:/,
chakracore: /^SyntaxError: Expected '\)' in regular expression/ })
},
<<<<<<<
expect: common.engineSpecificMessage({
v8: /\bSyntaxError: Invalid flags supplied to RegExp constructor/,
chakracore: /^SyntaxError: Syntax error in regular expression/ })
},
=======
expect: /^SyntaxError: Invalid flags supplied to RegExp constructor/ },
>>>>>>>
expect: common.engineSpecificMessage({
v8: /^SyntaxError: Invalid flags supplied to RegExp constructor/,
chakracore: /^SyntaxError: Syntax error in regular expression/ })
},
<<<<<<<
expect: common.engineSpecificMessage({
v8: /\bSyntaxError: Duplicate parameter name not allowed in this context/, // eslint-disable-line max-len
chakracore: /^SyntaxError: Duplicate formal parameter names not allowed in strict mode/ }) // eslint-disable-line max-len
=======
expect:
/\bSyntaxError: Duplicate parameter name not allowed in this context/
>>>>>>>
expect: common.engineSpecificMessage({
v8: /^SyntaxError: Duplicate parameter name not allowed in this context/, // eslint-disable-line max-len
chakracore: /^SyntaxError: Duplicate formal parameter names not allowed in strict mode/ }) // eslint-disable-line max-len
<<<<<<<
expect: common.engineSpecificMessage({
v8: /\bSyntaxError: Delete of an unqualified identifier in strict mode/,
chakracore: /^SyntaxError: Calling delete on expression not allowed in strict mode/ }) // eslint-disable-line max-len
=======
expect:
/\bSyntaxError: Delete of an unqualified identifier in strict mode/
>>>>>>>
expect: common.engineSpecificMessage({
v8: /\bSyntaxError: Delete of an unqualified identifier in strict mode/,
chakracore: /^SyntaxError: Calling delete on expression not allowed in strict mode/ }) // eslint-disable-line max-len
<<<<<<<
expect: common.engineSpecificMessage({
v8: /\bSyntaxError: In strict mode code, functions can only be declared at top level or inside a block\./, // eslint-disable-line max-len
chakracore: /^SyntaxError: Syntax error/ })
=======
expect:
/\bSyntaxError: In strict mode code, functions can only be declared at top level or inside a block\./
>>>>>>>
expect: common.engineSpecificMessage({
v8: /\bSyntaxError: In strict mode code, functions can only be declared at top level or inside a block\./, // eslint-disable-line max-len
chakracore: /^SyntaxError: Syntax error/ }) |
<<<<<<<
// for chakra i18n is enabled
var enablei18n = common.engineSpecificMessage({
v8: process.config.variables.v8_enable_i18n_support,
chakracore: true
});
=======
let enablei18n = process.config.variables.v8_enable_i18n_support;
>>>>>>>
// for chakra i18n is enabled
let enablei18n = common.engineSpecificMessage({
v8: process.config.variables.v8_enable_i18n_support,
chakracore: true
});
<<<<<<<
var localeString = dtf.format(date0);
assert.equal(localeString, common.engineSpecificMessage({
v8: 'Jan 70',
chakracore: '\u200EJan\u200E \u200E70'
}));
=======
{
const localeString = dtf.format(date0);
assert.strictEqual(localeString, 'Jan 70');
}
>>>>>>>
{
const localeString = dtf.format(date0);
assert.strictEqual(localeString, common.engineSpecificMessage({
v8: 'Jan 70',
chakracore: '\u200EJan\u200E \u200E70'
}));
}
<<<<<<<
localeString = date0.toLocaleString(['en'], optsGMT);
assert.equal(localeString, common.engineSpecificMessage({
v8: '1/1/1970, 12:00:00 AM',
chakracore: '\u200E1\u200E/\u200E1\u200E/\u200E1970\u200E '
+ '\u200E12\u200E:\u200E00\u200E:\u200E00\u200E \u200EAM'
}));
=======
{
const localeString = date0.toLocaleString(['en'], optsGMT);
assert.strictEqual(localeString, '1/1/1970, 12:00:00 AM');
}
>>>>>>>
{
const localeString = date0.toLocaleString(['en'], optsGMT);
assert.strictEqual(localeString, common.engineSpecificMessage({
v8: '1/1/1970, 12:00:00 AM',
chakracore: '\u200E1\u200E/\u200E1\u200E/\u200E1970\u200E '
+ '\u200E12\u200E:\u200E00\u200E:\u200E00\u200E \u200EAM'
}));
} |
<<<<<<<
if (common.isChakraEngine) {
console.log('1..0 # Skipped: This test is disabled for chakra engine.');
return;
}
=======
// Note: changing V8 flags after an isolate started is not guaranteed to work.
// Specifically here, V8 may cache compiled scripts between the flip of the
// flag. We use a different script each time to work around this problem.
>>>>>>>
if (common.isChakraEngine) {
console.log('1..0 # Skipped: This test is disabled for chakra engine.');
return;
}
// Note: changing V8 flags after an isolate started is not guaranteed to work.
// Specifically here, V8 may cache compiled scripts between the flip of the
// flag. We use a different script each time to work around this problem. |
<<<<<<<
var index = stack.lastIndexOf(this);
if (index !== -1)
stack.splice(index);
else
stack.length = 0;
_domain_flag[0] = stack.length;
=======
stack.splice(index);
>>>>>>>
stack.splice(index);
_domain_flag[0] = stack.length; |
<<<<<<<
nonHostChars = ['%', '/', '?', ';', '#'].concat(autoEscape),
nonAuthChars = ['/', '@', '?', '#'].concat(delims),
=======
nonHostChars = ['%', '/', '?', ';', '#']
.concat(unwise).concat(autoEscape),
hostEndingChars = ['/', '?', '#'],
>>>>>>>
nonHostChars = ['%', '/', '?', ';', '#'].concat(autoEscape),
hostEndingChars = ['/', '?', '#'], |
<<<<<<<
};
exports.engineSpecificMessage = function(messageObject) {
var jsEngine = process.jsEngine || 'v8'; //default is 'v8'
return messageObject[jsEngine];
=======
};
exports.busyLoop = function busyLoop(time) {
var startTime = Timer.now();
var stopTime = startTime + time;
while (Timer.now() < stopTime) {}
>>>>>>>
};
exports.engineSpecificMessage = function(messageObject) {
var jsEngine = process.jsEngine || 'v8'; //default is 'v8'
return messageObject[jsEngine];
};
exports.busyLoop = function busyLoop(time) {
var startTime = Timer.now();
var stopTime = startTime + time;
while (Timer.now() < stopTime) {} |
<<<<<<<
var binding = require('./build/Release/binding');
} catch (e) {
=======
var binding = require(`./build/${common.buildType}/binding`);
} catch {
>>>>>>>
var binding = require(`./build/${common.buildType}/binding`);
} catch (e) {
<<<<<<<
napi_binding = require('./build/Release/napi_binding');
} catch (e) {
=======
napi_binding = require(`./build/${common.buildType}/napi_binding`);
} catch {
>>>>>>>
napi_binding = require(`./build/${common.buildType}/napi_binding`);
} catch (e) { |
<<<<<<<
// Skip for chakra engine as debugger support not yet present
if (!common.isChakraEngine) {
// test for Array constructor in different context
{
const Debug = vm.runInDebugContext('Debug');
const map = new Map();
map.set(1, 2);
const mirror = Debug.MakeMirror(map.entries(), true);
const vals = mirror.preview();
const valsOutput = [];
for (const o of vals) {
valsOutput.push(o);
}
=======
// test for Array constructor in different context
{
const map = new Map();
map.set(1, 2);
const vals = previewMapIterator(map.entries(), 100);
const valsOutput = [];
for (const o of vals) {
valsOutput.push(o);
}
>>>>>>>
// Skip for chakra engine as debugger support not yet present
if (!common.isChakraEngine) {
// test for Array constructor in different context
{
const map = new Map();
map.set(1, 2);
const vals = previewMapIterator(map.entries(), 100);
const valsOutput = [];
for (const o of vals) {
valsOutput.push(o);
} |
<<<<<<<
const gtocMD = fs.readFileSync(gtocPath, 'utf8').replace(/^<!--[\s\S]*?-->/gm, '');
const gtocHTML = marked(gtocMD).replace(
/<a href="(.*?)"/g,
(all, href) => `<a class="nav-${href.replace('.html', '')
.replace(/\W+/g, '-')}" href="${href}"`
);
=======
const gtocMD = fs.readFileSync(gtocPath, 'utf8').replace(/^<!--.*?-->/gms, '');
const gtocHTML = unified()
.use(markdown)
.use(remark2rehype, { allowDangerousHTML: true })
.use(raw)
.use(navClasses)
.use(html)
.processSync(gtocMD).toString();
>>>>>>>
const gtocMD = fs.readFileSync(gtocPath, 'utf8').replace(/^<!--[\s\S]*?-->/gm, '');
const gtocHTML = unified()
.use(markdown)
.use(remark2rehype, { allowDangerousHTML: true })
.use(raw)
.use(navClasses)
.use(html)
.processSync(gtocMD).toString(); |
<<<<<<<
var _props4 = this.props;
var range = _props4.range;
var onlyClasses = _props4.onlyClasses;
var minDate = _props4.minDate;
var maxDate = _props4.maxDate;
=======
var range = this.props.range;
>>>>>>>
var _props4 = this.props;
var range = _props4.range;
var minDate = _props4.minDate;
var maxDate = _props4.maxDate;
<<<<<<<
key: index,
onlyClasses: onlyClasses,
classNames: classes,
isPassive: isPassive || isOutsideMinMax
=======
key: index
>>>>>>>
key: index,
isPassive: isPassive || isOutsideMinMax |
<<<<<<<
if (!common.isChakraEngine) {
assert.throws(
() => {
testHandleScope.NewScopeEscapeTwice();
},
Error);
}
=======
testHandleScope.NewScopeEscapeTwice();
>>>>>>>
if (!common.isChakraEngine) {
testHandleScope.NewScopeEscapeTwice();
} |
<<<<<<<
assert.equal(e.message, common.engineSpecificMessage({
v8: 'Array buffer allocation failed',
chakracore: 'Invalid offset/length when creating typed array'
}));
=======
assert.strictEqual(e.message, 'Array buffer allocation failed');
>>>>>>>
assert.strictEqual(e.message, common.engineSpecificMessage({
v8: 'Array buffer allocation failed',
chakracore: 'Invalid offset/length when creating typed array'
}));
<<<<<<<
}, 'invalid Buffer length');
if (!common.isChakraEngine) {
assert.throws(function() {
SlowBuffer(buffer.kMaxLength + 1);
}, 'invalid Buffer length');
} else {
assert.doesNotThrow(function() {
SlowBuffer(buffer.kMaxLength + 1);
});
}
// should throw with invalid length
=======
}, common.bufferMaxSizeMsg);
>>>>>>>
}, common.bufferMaxSizeMsg);
<<<<<<<
}, common.engineSpecificMessage({
v8: 'invalid Buffer length',
chakracore: 'Invalid offset/length when creating typed array'
}));
=======
}, /^RangeError: "size" argument must not be negative$/);
assert.throws(function() {
SlowBuffer(buffer.kMaxLength + 1);
}, common.bufferMaxSizeMsg);
>>>>>>>
}, /^RangeError: "size" argument must not be negative$/);
assert.throws(function() {
SlowBuffer(buffer.kMaxLength + 1);
}, common.bufferMaxSizeMsg); |
<<<<<<<
function checkBadPath(err, response) {
assert(err instanceof SyntaxError, 'Expected SyntaxError');
assert(
common.engineSpecificMessage({
v8: /Unexpected token/,
chakracore: /JSON\.parse Error: Invalid character at position:1/
}).test(err.message),
'Unexpected message: ' + err.message);
assert(/WebSockets request was expected/.test(err.response),
'Unexpected response: ' + err.response);
=======
function checkBadPath(err) {
assert(err instanceof SyntaxError);
assert(/Unexpected token/.test(err.message), err.message);
assert(/WebSockets request was expected/.test(err.body), err.body);
>>>>>>>
function checkBadPath(err) {
assert(err instanceof SyntaxError, 'Expected SyntaxError');
assert(
common.engineSpecificMessage({
v8: /Unexpected token/,
chakracore: /JSON\.parse Error: Invalid character at position:1/
}).test(err.message),
'Unexpected message: ' + err.message);
assert(/WebSockets request was expected/.test(err.body),
'Unexpected response: ' + err.body);
<<<<<<<
function expectMainScriptSource(result) {
const expected = helper.mainScriptSource();
const source = result['scriptSource'];
assert(source && (source.includes(expected)),
`Script source is wrong: ${source}`);
}
function setupExpectBreakOnLine(line, url, session, scopeIdCallback) {
return function(message) {
if ('Debugger.paused' === message['method']) {
const callFrame = message['params']['callFrames'][0];
const location = callFrame['location'];
assert.strictEqual(url, session.scriptUrlForId(location['scriptId']));
assert.strictEqual(line, location['lineNumber']);
scopeIdCallback &&
scopeIdCallback(callFrame['scopeChain'][0]['object']['objectId']);
return true;
}
};
}
function setupExpectConsoleOutput(type, values) {
if (!(values instanceof Array))
values = [ values ];
if (process.jsEngine === 'chakracore') {
// Only the first parameter is returned by ChakraCore
values = values.slice(0, 1);
}
return function(message) {
if ('Runtime.consoleAPICalled' === message['method']) {
const params = message['params'];
if (params['type'] === type) {
let i = 0;
for (const value of params['args']) {
if (value['value'] !== values[i++])
return false;
}
return i === values.length;
}
}
};
=======
function assertNoUrlsWhileConnected(response) {
assert.strictEqual(1, response.length);
assert.ok(!response[0].hasOwnProperty('devtoolsFrontendUrl'));
assert.ok(!response[0].hasOwnProperty('webSocketDebuggerUrl'));
>>>>>>>
function assertNoUrlsWhileConnected(response) {
assert.strictEqual(1, response.length);
assert.ok(!response[0].hasOwnProperty('devtoolsFrontendUrl'));
assert.ok(!response[0].hasOwnProperty('webSocketDebuggerUrl'));
<<<<<<<
],
[ // both modules end up with the same module.parent
{
'method': 'Runtime.evaluate', 'params': {
'expression': `JSON.stringify({
parentsEqual:
require.cache[${testModuleStr}].parent ===
require.cache[${printAModuleStr}].parent,
parentId: require.cache[${testModuleStr}].parent.id,
})`,
'includeCommandLineAPI': true
}
}, (message) => {
checkException(message);
assert.deepStrictEqual(JSON.parse(message['result']['value']), {
parentsEqual: true,
parentId: common.engineSpecificMessage({
v8: '<inspector console>',
chakracore: '.'
})
});
=======
});
checkException(result);
assert.deepStrictEqual(JSON.parse(result['result']['value']), {});
// both modules end up with the same module.parent
result = await session.send(
{
'method': 'Runtime.evaluate', 'params': {
'expression': `JSON.stringify({
parentsEqual:
require.cache[${testModuleStr}].parent ===
require.cache[${printAModuleStr}].parent,
parentId: require.cache[${testModuleStr}].parent.id,
})`,
'includeCommandLineAPI': true
>>>>>>>
});
checkException(result);
assert.deepStrictEqual(JSON.parse(result['result']['value']), {});
// both modules end up with the same module.parent
result = await session.send(
{
'method': 'Runtime.evaluate', 'params': {
'expression': `JSON.stringify({
parentsEqual:
require.cache[${testModuleStr}].parent ===
require.cache[${printAModuleStr}].parent,
parentId: require.cache[${testModuleStr}].parent.id,
})`,
'includeCommandLineAPI': true |
<<<<<<<
const trace_mgr = require('trace_mgr'); //ENABLE_TTD
=======
var errors;
function lazyErrors() {
if (!errors)
errors = require('internal/errors');
return errors;
}
>>>>>>>
const trace_mgr = require('trace_mgr'); //ENABLE_TTD
var errors;
function lazyErrors() {
if (!errors)
errors = require('internal/errors');
return errors;
} |
<<<<<<<
NativeModule.require('trace_mgr'); //ENABLE_TTD;
=======
NativeModule.require('internal/inspector_async_hook').setup();
>>>>>>>
NativeModule.require('internal/inspector_async_hook').setup();
NativeModule.require('trace_mgr'); //ENABLE_TTD; |
<<<<<<<
const { range, minDate, maxDate, format } = this.props;
=======
const { range, onlyClasses } = this.props;
>>>>>>>
const { range, minDate, maxDate, format, onlyClasses } = this.props;
<<<<<<<
isPassive = { isPassive || isOutsideMinMax }
=======
onlyClasses = { onlyClasses }
classNames = { classes }
>>>>>>>
isPassive = { isPassive || isOutsideMinMax }
onlyClasses = { onlyClasses }
classNames = { classes } |
<<<<<<<
this.duration = this.model.time.playing && (this.time - this.time_1 > 0) ? this.model.time.speed : 0;
this.year.setText(this.timeFormatter(this.time));
//this.yearEl.text(this.timeFormatter(this.time));
=======
this.duration = this.model.time.playing && (this.time - this.time_1 > 0) ? this.model.time.delayAnimations : 0;
this.yearEl.text(this.timeFormatter(this.time));
>>>>>>>
this.duration = this.model.time.playing && (this.time - this.time_1 > 0) ? this.model.time.delayAnimations : 0;
this.year.setText(this.timeFormatter(this.time));
//this.yearEl.text(this.timeFormatter(this.time));
<<<<<<<
this.year.resize(this.width, this.height, Math.max(this.height / 4, this.width / 4), margin.top, margin.left);
=======
this.yearEl.style("text-anchor", null);
this.yearEl
.attr("x", this.width / 2)
.attr("y", this.height / 3 * 2)
.style("font-size", Math.max(this.height / 4, this.width / 4) + "px");
var box = this.yearEl.node().getBBox();
this.yearEl
.attr("x", box.x)
.style("text-anchor", "start");
this.eventArea
.attr("width", this.width)
.attr("height", this.height);
>>>>>>>
this.year.resize(this.width, this.height, Math.max(this.height / 4, this.width / 4), margin.top, margin.left);
this.eventArea
.attr("width", this.width)
.attr("height", this.height); |
<<<<<<<
calendar : 'rdr-Calendar',
dateRange : 'rdr-DateRange',
predefinedRanges : 'rdr-PredefinedRanges',
predefinedRangesItem : 'rdr-PredefinedRangesItem',
predefinedRangesItemActive : 'rdr-PredefinedRangesItemActive',
monthAndYear : 'rdr-MonthAndYear',
weekDays : 'rdr-WeekDays',
weekDay : 'rdr-WeekDay',
days : 'rdr-Days',
day : 'rdr-Day',
dayActive : 'is-selected',
dayPassive : 'is-passive',
dayInRange : 'is-inRange',
monthAndYearWrapper : 'rdr-MonthAndYear-innerWrapper',
prevButton : 'rdr-MonthAndYear-button prev',
nextButton : 'rdr-MonthAndYear-button next',
month : 'rdr-MonthAndYear-month',
monthAndYearDivider : 'rdr-MonthAndYear-divider',
year : 'rdr-MonthAndYear-year'
=======
calendar : 'rdr-Calendar',
dateRange : 'rdr-DateRange',
predefinedRanges : 'rdr-PredefinedRanges',
predefinedRangesItem : 'rdr-PredefinedRangesItem',
monthAndYear : 'rdr-MonthAndYear',
weekDays : 'rdr-WeekDays',
weekDay : 'rdr-WeekDay',
days : 'rdr-Days',
day : 'rdr-Day',
dayActive : 'is-selected',
dayPassive : 'is-passive',
dayInRange : 'is-inRange',
monthAndYearWrapper : 'rdr-MonthAndYear-innerWrapper',
prevButton : 'rdr-MonthAndYear-button prev',
nextButton : 'rdr-MonthAndYear-button next',
month : 'rdr-MonthAndYear-month',
monthAndYearDivider : 'rdr-MonthAndYear-divider',
year : 'rdr-MonthAndYear-year',
daySunday : 'rdr-Sunday',
>>>>>>>
calendar : 'rdr-Calendar',
dateRange : 'rdr-DateRange',
predefinedRanges : 'rdr-PredefinedRanges',
predefinedRangesItem : 'rdr-PredefinedRangesItem',
predefinedRangesItemActive : 'rdr-PredefinedRangesItemActive',
monthAndYear : 'rdr-MonthAndYear',
weekDays : 'rdr-WeekDays',
weekDay : 'rdr-WeekDay',
days : 'rdr-Days',
day : 'rdr-Day',
dayActive : 'is-selected',
dayPassive : 'is-passive',
dayInRange : 'is-inRange',
monthAndYearWrapper : 'rdr-MonthAndYear-innerWrapper',
prevButton : 'rdr-MonthAndYear-button prev',
nextButton : 'rdr-MonthAndYear-button next',
month : 'rdr-MonthAndYear-month',
monthAndYearDivider : 'rdr-MonthAndYear-divider',
year : 'rdr-MonthAndYear-year',
daySunday : 'rdr-Sunday', |
<<<<<<<
/* VIZABI - http://www.gapminder.org - 2015-06-24 */
=======
/* VIZABI - http://www.gapminder.org - 2015-06-24 */
>>>>>>>
/* VIZABI - http://www.gapminder.org - 2015-06-24 */
<<<<<<<
}.call(this));
=======
}.call(this));
>>>>>>>
}.call(this));
<<<<<<<
}.call(this));
=======
}.call(this));
>>>>>>>
}.call(this));
<<<<<<<
=======
/*!
* VIZABI BUBBLECHART DEFAULT OPTIONS
*/
(function() {
"use strict";
var BubbleChart = this.Vizabi.Tool.get('BubbleChart');
BubbleChart.define('default_options', {
state: {
time: {
round: "ceil",
trails: true,
lockNonSelected: 0,
adaptMinMaxZoom: false
},
entities: {
dim: "geo",
show: {
_defs_: {
"geo": ["*"],
"geo.cat": ["country"]
}
}
},
marker: {
space: ["entities", "time"],
type: "geometry",
label: {
use: "property",
which: "geo.name"
},
axis_y: {
use: "indicator",
which: "lex"
},
axis_x: {
use: "indicator",
which: "gdp_per_cap"
},
color: {
use: "property",
which: "geo.region"
},
size: {
use: "indicator",
which: "pop"
}
}
},
data: {
//reader: "waffle-server",
reader: "csv-file",
path: "local_data/waffles/{{LANGUAGE}}/basic-indicators.csv"
},
ui: {
'vzb-tool-bubble-chart': {},
buttons: []
},
language: {
id: "en",
strings: {
en: {
"title": "Bubble Chart Title",
"buttons/expand": "Go big",
"buttons/unexpand": "Go small",
"buttons/trails": "Trails",
"buttons/lock": "Lock",
"buttons/find": "Find",
"buttons/deselect": "Deselect",
"buttons/ok": "OK",
"buttons/colors": "Colors",
"buttons/size": "Size",
"buttons/axes": "Axes",
"buttons/more_options": "Options",
"scaletype/linear": "Linear",
"scaletype/log": "Logarithmic",
"scaletype/genericLog": "Generic log",
"scaletype/time": "Time",
"scaletype/ordinal": "Ordinal",
"color/geo.region/asi": "Asia",
"color/geo.region/eur": "Europe",
"color/geo.region/ame": "Americas",
"color/geo.region/afr": "Afrika",
"color/geo.region/_default": "Other"
}
}
}
});
}).call(this);
>>>>>>>
/*!
* VIZABI BUBBLECHART DEFAULT OPTIONS
*/
(function() {
"use strict";
var BubbleChart = this.Vizabi.Tool.get('BubbleChart');
BubbleChart.define('default_options', {
state: {
time: {
round: "ceil",
trails: true,
lockNonSelected: 0,
adaptMinMaxZoom: false
},
entities: {
dim: "geo",
show: {
_defs_: {
"geo": ["*"],
"geo.cat": ["country"]
}
}
},
marker: {
space: ["entities", "time"],
type: "geometry",
label: {
use: "property",
which: "geo.name"
},
axis_y: {
use: "indicator",
which: "lex"
},
axis_x: {
use: "indicator",
which: "gdp_per_cap"
},
color: {
use: "property",
which: "geo.region"
},
size: {
use: "indicator",
which: "pop"
}
}
},
data: {
//reader: "waffle-server",
reader: "csv-file",
path: "local_data/waffles/{{LANGUAGE}}/basic-indicators.csv"
},
ui: {
'vzb-tool-bubble-chart': {},
buttons: []
},
language: {
id: "en",
strings: {
en: {
"title": "Bubble Chart Title",
"buttons/expand": "Go big",
"buttons/unexpand": "Go small",
"buttons/trails": "Trails",
"buttons/lock": "Lock",
"buttons/find": "Find",
"buttons/deselect": "Deselect",
"buttons/ok": "OK",
"buttons/colors": "Colors",
"buttons/size": "Size",
"buttons/axes": "Axes",
"buttons/more_options": "Options",
"scaletype/linear": "Linear",
"scaletype/log": "Logarithmic",
"scaletype/genericLog": "Generic log",
"scaletype/time": "Time",
"scaletype/ordinal": "Ordinal",
"color/geo.region/asi": "Asia",
"color/geo.region/eur": "Europe",
"color/geo.region/ame": "Americas",
"color/geo.region/afr": "Afrika",
"color/geo.region/_default": "Other"
}
}
}
});
}).call(this);
<<<<<<<
}).call(this);
=======
}).call(this);
/*!
* VIZABI LINECHART DEFAULT OPTIONS
*/
(function() {
"use strict";
var LineChart = this.Vizabi.Tool.get('LineChart');
LineChart.define('default_options', {
state: {
time: {
start: 1990,
end: 2012,
value: 2012,
step: 1,
speed: 300,
formatInput: "%Y"
},
//entities we want to show
entities: {
dim: "geo",
show: {
_defs_: {
"geo": ["*"],
"geo.cat": ["region"]
}
}
},
//how we show it
marker: {
space: ["entities", "time"],
label: {
use: "property",
which: "geo.name"
},
axis_y: {
use: "indicator",
which: "gdp_per_cap",
scaleType: "log"
},
axis_x: {
use: "indicator",
which: "time",
scaleType: "time"
},
color: {
use: "property",
which: "geo.region"
},
color_shadow: {
use: "property",
which: "geo.region"
}
}
},
data: {
//reader: "waffle-server",
reader: "csv-file",
path: "local_data/waffles/{{LANGUAGE}}/basic-indicators.csv"
},
ui: {
'vzb-tool-line-chart': {
entity_labels: {
min_number_of_entities_when_values_hide: 2 //values hide when showing 2 entities or more
},
whenHovering: {
hideVerticalNow: 0,
showProjectionLineX: true,
showProjectionLineY: true,
higlightValueX: true,
higlightValueY: true,
showTooltip: 0
}
},
buttons: []
},
//language properties
language: {
id: "en",
strings: {
en: {
"title": "Line Chart Title",
"buttons/find": "Find",
"buttons/expand": "Expand",
"buttons/colors": "Colors",
"buttons/size": "Size",
"buttons/more_options": "Options",
"indicator/lex": "Life expectancy",
"indicator/gdp_per_cap": "GDP per capita",
"indicator/pop": "Population",
},
pt: {
"title": "Título do Linulaula Chart",
"buttons/expand": "Expandir",
"buttons/find": "Encontre",
"buttons/colors": "Cores",
"buttons/size": "Tamanho",
"buttons/more_options": "Opções",
"indicator/lex": "Expectables Livappulo",
"indicator/gdp_per_cap": "PIB pers capitous",
"indicator/pop": "Peoples",
}
}
}
});
}).call(this);
>>>>>>>
}).call(this);
/*!
* VIZABI LINECHART DEFAULT OPTIONS
*/
(function() {
"use strict";
var LineChart = this.Vizabi.Tool.get('LineChart');
LineChart.define('default_options', {
state: {
time: {
start: 1990,
end: 2012,
value: 2012,
step: 1,
speed: 300,
formatInput: "%Y"
},
//entities we want to show
entities: {
dim: "geo",
show: {
_defs_: {
"geo": ["*"],
"geo.cat": ["region"]
}
}
},
//how we show it
marker: {
space: ["entities", "time"],
label: {
use: "property",
which: "geo.name"
},
axis_y: {
use: "indicator",
which: "gdp_per_cap",
scaleType: "log"
},
axis_x: {
use: "indicator",
which: "time",
scaleType: "time"
},
color: {
use: "property",
which: "geo.region"
},
color_shadow: {
use: "property",
which: "geo.region"
}
}
},
data: {
//reader: "waffle-server",
reader: "csv-file",
path: "local_data/waffles/{{LANGUAGE}}/basic-indicators.csv"
},
ui: {
'vzb-tool-line-chart': {
entity_labels: {
min_number_of_entities_when_values_hide: 2 //values hide when showing 2 entities or more
},
whenHovering: {
hideVerticalNow: 0,
showProjectionLineX: true,
showProjectionLineY: true,
higlightValueX: true,
higlightValueY: true,
showTooltip: 0
}
},
buttons: []
},
//language properties
language: {
id: "en",
strings: {
en: {
"title": "Line Chart Title",
"buttons/find": "Find",
"buttons/expand": "Expand",
"buttons/colors": "Colors",
"buttons/size": "Size",
"buttons/more_options": "Options",
"indicator/lex": "Life expectancy",
"indicator/gdp_per_cap": "GDP per capita",
"indicator/pop": "Population",
},
pt: {
"title": "Título do Linulaula Chart",
"buttons/expand": "Expandir",
"buttons/find": "Encontre",
"buttons/colors": "Cores",
"buttons/size": "Tamanho",
"buttons/more_options": "Opções",
"indicator/lex": "Expectables Livappulo",
"indicator/gdp_per_cap": "PIB pers capitous",
"indicator/pop": "Peoples",
}
}
}
});
}).call(this); |
<<<<<<<
var compileTime = grunt.template.today("UTC:dd/mm/yyyy HH:MM:ss") + " UTC",
=======
const compileTime = grunt.template.today("dd/mm/yyyy HH:MM:ss") + " UTC",
>>>>>>>
const compileTime = grunt.template.today("UTC:dd/mm/yyyy HH:MM:ss") + " UTC", |
<<<<<<<
// globalObject: "this"
=======
filename: chunkData => {
return chunkData.chunk.name === "main" ? "assets/[name].js": "[name].js";
},
globalObject: "this"
>>>>>>>
filename: chunkData => {
return chunkData.chunk.name === "main" ? "assets/[name].js": "[name].js";
},
globalObject: "this"
<<<<<<<
webInline: {
mode: "production",
target: "web",
entry: "./src/web/index.js",
output: {
filename: "scripts.js",
path: __dirname + "/build/prod"
},
plugins: [
new webpack.DefinePlugin(Object.assign({}, BUILD_CONSTANTS, {
INLINE: "true"
})),
new HtmlWebpackPlugin({
filename: "cyberchef.htm",
template: "./src/web/html/index.html",
compileTime: compileTime,
version: pkg.version + "s",
inline: true,
minify: {
removeComments: true,
collapseWhitespace: true,
minifyJS: true,
minifyCSS: true
}
}),
]
},
tests: {
mode: "development",
target: "node",
entry: "./test/index.mjs",
externals: [NodeExternals()],
output: {
filename: "index.js",
path: __dirname + "/build/test/node"
},
plugins: [
new webpack.DefinePlugin(BUILD_CONSTANTS),
]
},
=======
>>>>>>>
<<<<<<<
command: "./node_modules/.bin/nightwatch --env prod,inline"
},
nodeTests: {
command: "node --experimental-modules --no-warnings --no-deprecation tests/node/index.mjs"
=======
command: "./node_modules/.bin/nightwatch --env prod"
>>>>>>>
command: "./node_modules/.bin/nightwatch --env prod"
},
nodeTests: {
command: "node --experimental-modules --no-warnings --no-deprecation tests/node/index.mjs" |
<<<<<<<
Kinetic.Node.addGettersSetters(Kinetic.Node, ['x', 'y', 'scale', 'detectionType', 'rotation', 'alpha', 'name', 'id', 'offset', 'draggable', 'dragConstraint', 'dragBounds', 'dragBoundFunc', 'listening']);
=======
Kinetic.Node.addGettersSetters(Kinetic.Node, ['x', 'y', 'scale', 'rotation', 'opacity', 'name', 'id', 'offset', 'draggable', 'dragConstraint', 'dragBounds', 'listening']);
>>>>>>>
Kinetic.Node.addGettersSetters(Kinetic.Node, ['x', 'y', 'scale', 'rotation', 'opacity', 'name', 'id', 'offset', 'draggable', 'dragConstraint', 'dragBounds', 'dragBoundFunc', 'listening']); |
<<<<<<<
dev: ["build/dev/*", "src/core/config/MetaConfig.js"],
prod: ["build/prod/*", "src/core/config/MetaConfig.js"],
test: ["build/test/*", "src/core/config/MetaConfig.js"],
node: ["build/node/*", "src/core/config/MetaConfig.js"],
docs: ["docs/*", "!docs/*.conf.json", "!docs/*.ico"],
inlineScripts: ["build/prod/scripts.js"],
=======
dev: ["build/dev/*"],
prod: ["build/prod/*"],
test: ["build/test/*"],
node: ["build/node/*"],
docs: ["docs/*", "!docs/*.conf.json", "!docs/*.ico", "!docs/*.png"],
>>>>>>>
dev: ["build/dev/*", "src/core/config/MetaConfig.js"],
prod: ["build/prod/*", "src/core/config/MetaConfig.js"],
test: ["build/test/*", "src/core/config/MetaConfig.js"],
node: ["build/node/*", "src/core/config/MetaConfig.js"],
docs: ["docs/*", "!docs/*.conf.json", "!docs/*.ico", "!docs/*.png"],
inlineScripts: ["build/prod/scripts.js"], |
<<<<<<<
module: "Default",
description: "Rotates each byte to the right by the number of bits specified. Currently only supports 8-bit values.",
=======
description: "Rotates each byte to the right by the number of bits specified, optionally carrying the excess bits over to the next byte. Currently only supports 8-bit values.",
run: Rotate.runRotr,
>>>>>>>
module: "Default",
description: "Rotates each byte to the right by the number of bits specified, optionally carrying the excess bits over to the next byte. Currently only supports 8-bit values.",
<<<<<<<
module: "Default",
description: "Rotates each byte to the left by the number of bits specified. Currently only supports 8-bit values.",
=======
description: "Rotates each byte to the left by the number of bits specified, optionally carrying the excess bits over to the next byte. Currently only supports 8-bit values.",
run: Rotate.runRotl,
>>>>>>>
module: "Default",
description: "Rotates each byte to the left by the number of bits specified, optionally carrying the excess bits over to the next byte. Currently only supports 8-bit values.",
<<<<<<<
module: "Default",
description: "Extracts domain names with common Top-Level Domains (TLDs).<br>Note that this will not include paths. Use <strong>Extract URLs</strong> to find entire URLs.",
=======
description: "Extracts domain names.<br>Note that this will not include paths. Use <strong>Extract URLs</strong> to find entire URLs.",
run: Extract.runDomains,
>>>>>>>
module: "Default",
description: "Extracts domain names.<br>Note that this will not include paths. Use <strong>Extract URLs</strong> to find entire URLs.",
<<<<<<<
"SHA224": {
module: "Hashing",
description: "SHA-224 is largely identical to SHA-256 but is truncated to 224 bytes.",
inputType: "string",
outputType: "string",
args: []
},
"SHA256": {
module: "Hashing",
description: "SHA-256 is one of the four variants in the SHA-2 set. It isn't as widely used as SHA-1, though it provides much better security.",
=======
"SHA2": {
description: "The SHA-2 (Secure Hash Algorithm 2) hash functions were designed by the NSA. SHA-2 includes significant changes from its predecessor, SHA-1. The SHA-2 family consists of hash functions with digests (hash values) that are 224, 256, 384 or 512 bits: SHA224, SHA256, SHA384, SHA512.<br><br><ul><li>SHA-512 operates on 64-bit words.</li><li>SHA-256 operates on 32-bit words.</li><li>SHA-384 is largely identical to SHA-512 but is truncated to 384 bytes.</li><li>SHA-224 is largely identical to SHA-256 but is truncated to 224 bytes.</li><li>SHA-512/224 and SHA-512/256 are truncated versions of SHA-512, but the initial values are generated using the method described in Federal Information Processing Standards (FIPS) PUB 180-4.</li></ul>",
run: Hash.runSHA2,
>>>>>>>
"SHA2": {
module: "Hashing",
description: "The SHA-2 (Secure Hash Algorithm 2) hash functions were designed by the NSA. SHA-2 includes significant changes from its predecessor, SHA-1. The SHA-2 family consists of hash functions with digests (hash values) that are 224, 256, 384 or 512 bits: SHA224, SHA256, SHA384, SHA512.<br><br><ul><li>SHA-512 operates on 64-bit words.</li><li>SHA-256 operates on 32-bit words.</li><li>SHA-384 is largely identical to SHA-512 but is truncated to 384 bytes.</li><li>SHA-224 is largely identical to SHA-256 but is truncated to 224 bytes.</li><li>SHA-512/224 and SHA-512/256 are truncated versions of SHA-512, but the initial values are generated using the method described in Federal Information Processing Standards (FIPS) PUB 180-4.</li></ul>",
<<<<<<<
"SHA384": {
module: "Hashing",
description: "SHA-384 is largely identical to SHA-512 but is truncated to 384 bytes.",
=======
"SHA3": {
description: "The SHA-3 (Secure Hash Algorithm 3) hash functions were released by NIST on August 5, 2015. Although part of the same series of standards, SHA-3 is internally quite different from the MD5-like structure of SHA-1 and SHA-2.<br><br>SHA-3 is a subset of the broader cryptographic primitive family Keccak designed by Guido Bertoni, Joan Daemen, Michaël Peeters, and Gilles Van Assche, building upon RadioGatún.",
run: Hash.runSHA3,
>>>>>>>
"SHA3": {
module: "Hashing",
description: "The SHA-3 (Secure Hash Algorithm 3) hash functions were released by NIST on August 5, 2015. Although part of the same series of standards, SHA-3 is internally quite different from the MD5-like structure of SHA-1 and SHA-2.<br><br>SHA-3 is a subset of the broader cryptographic primitive family Keccak designed by Guido Bertoni, Joan Daemen, Michaël Peeters, and Gilles Van Assche, building upon RadioGatún.",
<<<<<<<
"SHA512": {
module: "Hashing",
description: "SHA-512 is largely identical to SHA-256 but operates on 64-bit words rather than 32.",
=======
"Keccak": {
description: "The Keccak hash algorithm was designed by Guido Bertoni, Joan Daemen, Michaël Peeters, and Gilles Van Assche, building upon RadioGatún. It was selected as the winner of the SHA-3 design competition.<br><br>This version of the algorithm is Keccak[c=2d] and differs from the SHA-3 specification.",
run: Hash.runKeccak,
>>>>>>>
"Keccak": {
module: "Hashing",
description: "The Keccak hash algorithm was designed by Guido Bertoni, Joan Daemen, Michaël Peeters, and Gilles Van Assche, building upon RadioGatún. It was selected as the winner of the SHA-3 design competition.<br><br>This version of the algorithm is Keccak[c=2d] and differs from the SHA-3 specification.",
<<<<<<<
"SHA3": {
module: "Hashing",
description: "This is an implementation of Keccak[c=2d]. SHA3 functions based on different implementations of Keccak will give different results.",
=======
"Shake": {
description: "Shake is an Extendable Output Function (XOF) of the SHA-3 hash algorithm, part of the Keccak family, allowing for variable output length/size.",
run: Hash.runShake,
>>>>>>>
"Shake": {
module: "Hashing",
description: "Shake is an Extendable Output Function (XOF) of the SHA-3 hash algorithm, part of the Keccak family, allowing for variable output length/size.",
<<<<<<<
"RIPEMD-160": {
module: "Hashing",
description: "RIPEMD (RACE Integrity Primitives Evaluation Message Digest) is a family of cryptographic hash functions developed in Leuven, Belgium, by Hans Dobbertin, Antoon Bosselaers and Bart Preneel at the COSIC research group at the Katholieke Universiteit Leuven, and first published in 1996.<br><br>RIPEMD was based upon the design principles used in MD4, and is similar in performance to the more popular SHA-1.<br><br>RIPEMD-160 is an improved, 160-bit version of the original RIPEMD, and the most common version in the family.",
=======
"RIPEMD": {
description: "RIPEMD (RACE Integrity Primitives Evaluation Message Digest) is a family of cryptographic hash functions developed in Leuven, Belgium, by Hans Dobbertin, Antoon Bosselaers and Bart Preneel at the COSIC research group at the Katholieke Universiteit Leuven, and first published in 1996.<br><br>RIPEMD was based upon the design principles used in MD4, and is similar in performance to the more popular SHA-1.<br><br>",
run: Hash.runRIPEMD,
>>>>>>>
"RIPEMD": {
module: "Hashing",
description: "RIPEMD (RACE Integrity Primitives Evaluation Message Digest) is a family of cryptographic hash functions developed in Leuven, Belgium, by Hans Dobbertin, Antoon Bosselaers and Bart Preneel at the COSIC research group at the Katholieke Universiteit Leuven, and first published in 1996.<br><br>RIPEMD was based upon the design principles used in MD4, and is similar in performance to the more popular SHA-1.<br><br>",
<<<<<<<
inputType: "byteArray",
=======
run: Checksum.runCRC32,
inputType: "string",
outputType: "string",
args: []
},
"CRC-16 Checksum": {
description: "A cyclic redundancy check (CRC) is an error-detecting code commonly used in digital networks and storage devices to detect accidental changes to raw data.<br><br>The CRC was invented by W. Wesley Peterson in 1961.",
run: Checksum.runCRC16,
inputType: "string",
>>>>>>>
inputType: "string",
outputType: "string",
args: []
},
"CRC-16 Checksum": {
module: "Hashing",
description: "A cyclic redundancy check (CRC) is an error-detecting code commonly used in digital networks and storage devices to detect accidental changes to raw data.<br><br>The CRC was invented by W. Wesley Peterson in 1961.",
inputType: "string",
<<<<<<<
"Parse escaped string": {
module: "Default",
description: "Replaces escaped characters with the bytes they represent.<br><br>e.g.<code>Hello\\nWorld</code> becomes <code>Hello<br>World</code>",
inputType: "string",
outputType: "string",
args: []
},
=======
>>>>>>> |
<<<<<<<
import "./tests/operations/NetBIOS.js";
=======
import "./tests/operations/OTP.js";
>>>>>>>
import "./tests/operations/NetBIOS.js";
import "./tests/operations/OTP.js"; |
<<<<<<<
import "./tests/operations/CharEnc.js";
=======
import "./tests/operations/Code.js";
>>>>>>>
import "./tests/operations/CharEnc.js";
import "./tests/operations/Code.js"; |
<<<<<<<
var emojiNumber = 1352 // 1335(from all categories) + 17(custom)
=======
var emojiNumber = 1343 // 1326(from all categories) + 17(custom)
>>>>>>>
var emojiNumber = 1356 // 1335(from all categories) + 17(custom)
<<<<<<<
people: 232,
animals_and_nature: 161,
=======
people: 236,
animals_and_nature: 148,
>>>>>>>
people: 236,
animals_and_nature: 161, |
<<<<<<<
food_and_drink: 98,
activity: 95,
=======
food_and_drink: 105,
activity: 89,
>>>>>>>
food_and_drink: 105,
activity: 95, |
<<<<<<<
{ keyword: 'Maybe',
source: 'https://www.monster.com/career-advice/article/7-words-that-make-you-sound-less-confident-in-emails-0916',
message: 'By adding \"maybe"\ to your sentence, it makes it seem like you aren\'t confident in your answer/suggestion. Say what you mean. If you mean no, say no, if you mean yes, say yes.'
},
=======
{ keyword: '!!!',
source: 'https://www.theatlantic.com/technology/archive/2018/06/exclamation-point-inflation/563774/?utm_source=feed',
message: 'We get it, you\'re excited!!! Use that many exclamation points with your friends,' +
'not your coworkers or clients. This is not social media.' +
'--Julie Beck', },
>>>>>>>
{ keyword: 'Maybe',
source: 'https://www.monster.com/career-advice/article/7-words-that-make-you-sound-less-confident-in-emails-0916',
message: 'By adding \"maybe"\ to your sentence, it makes it seem like you aren\'t confident in your answer/suggestion. Say what you mean. If you mean no, say no, if you mean yes, say yes.'
},
{ keyword: '!!!',
source: 'https://www.theatlantic.com/technology/archive/2018/06/exclamation-point-inflation/563774/?utm_source=feed',
message: 'We get it, you\'re excited!!! Use that many exclamation points with your friends,' +
'not your coworkers or clients. This is not social media.' +
'--Julie Beck', }, |
<<<<<<<
'use strict';
/* 3rd party module */
var libxml2js = require('libxml-to-js');
var libxmljs = require('libxmljs');
var mime = require('mime-magic');
=======
/* Load the dependencies */
var dependencies = require('./dependencies.js');
var xmlDep = require(dependencies.xml);
var mimeDep = require(dependencies.mime);
>>>>>>>
'use strict';
/* Load the dependencies */
var dependencies = require('./dependencies.js');
var xmlDep = require(dependencies.xml);
var mimeDep = require(dependencies.mime);
<<<<<<<
libxml2js(new Buffer(data).toString(), function (error, result) {
if (response.statusCode !== 200) {
=======
// Set the XML parser
if (dependencies.xml == 'libxml-to-js') {
var parser = xmlDep;
} else { // xml2js
var parser = new xmlDep.Parser({mergeAttrs: true}).parseString;
}
parser(new Buffer(data).toString(), function (error, result) {
if (response.statusCode != 200) {
>>>>>>>
// Set the XML parser
var parser;
if (dependencies.xml === 'libxml-to-js') {
parser = xmlDep;
} else { // xml2js
parser = new xmlDep.Parser({mergeAttrs: true}).parseString;
}
parser(new Buffer(data).toString(), function (error, result) {
if (response.statusCode !== 200) {
<<<<<<<
if (response.statusCode === 307) { // oh great ... S3 crappy redirect
=======
if (response.statusCode == 307) { // oh great ... S3 crappy redirect
>>>>>>>
if (response.statusCode === 307) { // oh great ... S3 crappy redirect
<<<<<<<
* Serialize the lifecycle config to xml
*
* @param {Object} lifecycle
* @param {Function} callback
=======
* Serialize the lifecycle config to XML
* @param lifecycle
* @param callback
>>>>>>>
* Serialize the lifecycle config to XML
*
* @param {Object} config
* @param {Object} lifecycle
* @param {Function} callback
<<<<<<<
// Serialize response object to xml
var i, document = new libxmljs.Document().node('LifecycleConfiguration');
for (i = 0; i < lifecycle.Rule.length; i++) {
// this needs to be refactored in order to close #22
document.node('Rule').
node('ID', lifecycle.Rule[i].ID).parent().
node('Prefix', lifecycle.Rule[i].Prefix).parent().
node('Status', lifecycle.Rule[i].Status).parent().
node('Expiration').node('Days', lifecycle.Rule[i].Expiration.Days);
=======
// Serialize response object to XML
var body = '<LifecycleConfiguration>';
for (var i = 0; i < lifecycle.Rule.length; i++) {
body += '<Rule><ID>'
+ lifecycle.Rule[i].ID + '</ID><Prefix>'
+ lifecycle.Rule[i].Prefix + '</Prefix><Status>'
+ lifecycle.Rule[i].Status + '</Status><Expiration><Days>'
+ lifecycle.Rule[i].Expiration.Days + '</Days></Expiration></Rule>';
>>>>>>>
// Serialize response object to XML
var i;
var body = '<LifecycleConfiguration>';
for (i = 0; i < lifecycle.Rule.length; i++) {
body += '<Rule><ID>'
+ lifecycle.Rule[i].ID + '</ID><Prefix>'
+ lifecycle.Rule[i].Prefix + '</Prefix><Status>'
+ lifecycle.Rule[i].Status + '</Status><Expiration><Days>'
+ lifecycle.Rule[i].Expiration.Days + '</Days></Expiration></Rule>'; |
<<<<<<<
this.getInternal()._debug(fct, clb);
this._callFilters('before'+ucfirst(fct));
=======
this.getInternal()._debug(fct);
this._callFilters('before'+$.ucfirst(fct));
>>>>>>>
this.getInternal()._debug(fct, clb);
this._callFilters('before'+$.ucfirst(fct)); |
<<<<<<<
_this.prepareIgnoreRegExps();
indicator.updateLanguageState();
=======
indicator.updateStatusBarIndicator();
>>>>>>>
_this.prepareIgnoreRegExps();
indicator.updateStatusBarIndicator();
<<<<<<<
try {
// Convert the JSON of RegExp Strings into a real RegExp
var flags = settings.ignoreRegExps[i].replace(/.*\/([gimy]*)$/, '$1');
var pattern = settings.ignoreRegExps[i].replace(new RegExp('^/(.*?)/' + flags + '$'), '$1');
pattern = pattern.replace(/\\\\/g, '\\');
if (SPELLRIGHT_DEBUG_OUTPUT) {
console.log('RegExp prepare: ' + settings.ignoreRegExps[i] + ' = /' + pattern + '/' + flags);
}
this.regExpMap.push(new RegExp(pattern, flags));
}
catch (e) {
vscode.window.showErrorMessage('Ignore RexExp: \"' + settings.ignoreRegExps[i] + '\" malformed. Ignoring.');
if (SPELLRIGHT_DEBUG_OUTPUT) {
console.log('Ignore RegExp: \"' + settings.ignoreRegExps[i] + '\" malformed. Ignoring.');
}
=======
try {
// Convert the JSON of RegExp Strings into a real RegExp
var flags = settings.ignoreRegExps[i].replace(/.*\/([gimy]*)$/, '$1');
var pattern = settings.ignoreRegExps[i].replace(new RegExp('^/(.*?)/' + flags + '$'), '$1');
pattern = pattern.replace(/\\\\/g, '\\');
if (SPELLRIGHT_DEBUG_OUTPUT) {
console.log('RegExp prepare: ' + settings.ignoreRegExps[i] + ' = /' + pattern + '/' + flags);
}
this.regexpMap.push(new RegExp(pattern, flags));
}
catch (e) {
;
>>>>>>>
try {
// Convert the JSON of RegExp Strings into a real RegExp
var flags = settings.ignoreRegExps[i].replace(/.*\/([gimy]*)$/, '$1');
var pattern = settings.ignoreRegExps[i].replace(new RegExp('^/(.*?)/' + flags + '$'), '$1');
pattern = pattern.replace(/\\\\/g, '\\');
if (SPELLRIGHT_DEBUG_OUTPUT) {
console.log('RegExp prepare: ' + settings.ignoreRegExps[i] + ' = /' + pattern + '/' + flags);
}
this.regExpMap.push(new RegExp(pattern, flags));
}
catch (e) {
vscode.window.showErrorMessage('Ignore RexExp: \"' + settings.ignoreRegExps[i] + '\" malformed. Ignoring.');
if (SPELLRIGHT_DEBUG_OUTPUT) {
console.log('Ignore RegExp: \"' + settings.ignoreRegExps[i] + '\" malformed. Ignoring.');
} |
<<<<<<<
var imageUrl = computed(image, (id) => api.blob.sync.url(id))
var content = h('GatheringCard', [
h('div.title', [
h('a', {
href: msg.key
}, title),
h('button', {
'ev-click': send(api.gathering.sheet.edit, msg.key)
}, 'Edit Details')
=======
var imageUrl = computed(image, (id) => api.blob.sync.url(id))
var imageId = computed(image, (link) => link && link.link || link)
var content = h('GatheringCard', [
h('div.title', [
h('a', {href: msg.key}, title),
h('button', {
'ev-click': send(api.gathering.sheet.edit, msg.key)
}, 'Edit Details')
]),
h('div.time', computed(startDateTime, formatTime)),
when(image, h('a.image', {
href: imageId,
style: {
'background-image': computed(imageUrl, (url) => `url(${url})`)
}
})),
h('div.attending', [
h('div.title', ['Attendees', ' (', computed(attendees, (x) => x.length), ')']),
h('div.attendees', [
map(attendees, (attendee) => {
return h('a.attendee', {
href: attendee,
title: nameAndFollowWarning(attendee)
}, api.about.html.image(attendee))
})
>>>>>>>
var imageUrl = computed(image, (id) => api.blob.sync.url(id))
var imageId = computed(image, (link) => link && link.link || link)
var content = h('GatheringCard', [
h('div.title', [
h('a', {
href: msg.key
}, title),
h('button', {
'ev-click': send(api.gathering.sheet.edit, msg.key)
}, 'Edit Details') |
<<<<<<<
comment: '3.2.0'
=======
comment: '0.9.2',
installedVersion: '0.9.0'
>>>>>>>
comment: '3.2.0',
installedVersion: '3.2.0'
<<<<<<<
comment: '4.2.0'
=======
comment: '3.2.6',
installedVersion: '3.2.6'
>>>>>>>
comment: '4.3.0',
installedVersion: '4.1.1'
<<<<<<<
comment: '4.17.19'
=======
comment: '4.17.15',
installedVersion: '4.17.11'
>>>>>>>
comment: '4.17.20',
installedVersion: '4.17.15'
<<<<<<<
comment: '2.88.2'
=======
comment: '2.88.2',
installedVersion: '2.88.0'
>>>>>>>
comment: '2.88.2',
installedVersion: '2.88.2'
<<<<<<<
comment: '7.3.2'
=======
comment: '5.7.1',
installedVersion: '5.4.1'
>>>>>>>
comment: '7.3.2',
installedVersion: '7.3.2' |
<<<<<<<
* Date: Aug 14 2012
=======
* Date: Aug 22 2012
>>>>>>>
* Date: Aug 23 2012
<<<<<<<
Kinetic.Node.addGettersSetters(Kinetic.Node, ['x', 'y', 'scale', 'detectionType', 'rotation', 'alpha', 'name', 'id', 'offset', 'draggable', 'dragConstraint', 'dragBounds', 'dragBoundFunc', 'listening']);
=======
Kinetic.Node.addGettersSetters(Kinetic.Node, ['x', 'y', 'scale', 'rotation', 'opacity', 'name', 'id', 'offset', 'draggable', 'dragConstraint', 'dragBounds', 'listening']);
>>>>>>>
Kinetic.Node.addGettersSetters(Kinetic.Node, ['x', 'y', 'scale', 'rotation', 'opacity', 'name', 'id', 'offset', 'draggable', 'dragConstraint', 'dragBounds', 'dragBoundFunc', 'listening']); |
<<<<<<<
const util = require('../util')
const querystring = require('querystring')
=======
var util = require('../util')
var querystring = require('querystring')
const jsesc = require('jsesc')
const quote = str => jsesc(str, { quotes: 'single' })
>>>>>>>
const util = require('../util')
const querystring = require('querystring')
const jsesc = require('jsesc')
const quote = str => jsesc(str, { quotes: 'single' })
<<<<<<<
let i = 0
const headerCount = Object.keys(request.headers).length
for (const headerName in request.headers) {
headerString += " '" + headerName + "' => '" + request.headers[headerName] + "'"
=======
var i = 0
var headerCount = Object.keys(request.headers).length
for (var headerName in request.headers) {
headerString += " '" + headerName + "' => '" + quote(request.headers[headerName]) + "'"
>>>>>>>
let i = 0
const headerCount = Object.keys(request.headers).length
for (const headerName in request.headers) {
headerString += " '" + headerName + "' => '" + quote(request.headers[headerName]) + "'"
<<<<<<<
const cookieString = util.serializeCookies(request.cookies)
=======
var cookieString = quote(util.serializeCookies(request.cookies))
>>>>>>>
const cookieString = quote(util.serializeCookies(request.cookies))
<<<<<<<
const splitAuth = request.auth.split(':')
const user = splitAuth[0] || ''
const password = splitAuth[1] || ''
=======
var splitAuth = request.auth.split(':').map(quote)
var user = splitAuth[0] || ''
var password = splitAuth[1] || ''
>>>>>>>
const splitAuth = request.auth.split(':').map(quote)
const user = splitAuth[0] || ''
const password = splitAuth[1] || ''
<<<<<<<
let dataIndex = 0
for (const key in parsedQueryString) {
const value = parsedQueryString[key]
dataString += " '" + key + "' => '" + value.replace(/[\\"']/g, '\\$&') + "'"
=======
var dataIndex = 0
for (var key in parsedQueryString) {
var value = parsedQueryString[key]
dataString += " '" + key + "' => '" + quote(value) + "'"
>>>>>>>
let dataIndex = 0
for (const key in parsedQueryString) {
const value = parsedQueryString[key]
dataString += " '" + key + "' => '" + quote(value) + "'" |
<<<<<<<
var moment = require('moment');
=======
var tp = require('./templatePath.js');
>>>>>>>
var moment = require('moment');
var tp = require('./templatePath.js'); |
<<<<<<<
import { TextLineSpacingBehaviourMap } from '../Text'
import { TextAlignmentMap } from '../../style/Text'
=======
import { TextAlignmentMap, TextLineSpacingBehaviourMap } from '../Text'
>>>>>>>
import { TextLineSpacingBehaviourMap } from '../Text'
import { TextAlignmentMap } from '../../style/Text'
<<<<<<<
test('should return the fragments of a text layer', () => {
let text = new Text({
text: 'blah',
})
let { fragments } = text
expect(fragments.length).toBe(1)
expect(fragments[0].baselineOffset).toBe(3)
expect(Number(fragments[0].range.location)).toBe(0)
expect(Number(fragments[0].range.length)).toBe(4)
expect(fragments[0].rect.toJSON()).toEqual({
x: 0,
y: 0,
width: 22.6875,
height: 14,
})
// https://github.com/BohemianCoding/SketchAPI/issues/144
text = new Text({
text: 'Test\nHello\n123\no',
})
// eslint-disable-next-line
fragments = text.fragments
expect(fragments.length).toBe(4)
expect(fragments[0].baselineOffset).toBe(3)
expect(Number(fragments[0].range.location)).toBe(0)
expect(Number(fragments[0].range.length)).toBe(5)
expect(fragments[0].rect.toJSON()).toEqual({
x: 0,
y: 0,
width: 22.0078125,
height: 14,
})
expect(fragments[1].baselineOffset).toBe(3)
expect(Number(fragments[1].range.location)).toBe(5)
expect(Number(fragments[1].range.length)).toBe(6)
expect(fragments[1].rect.toJSON()).toEqual({
x: 0,
y: 14,
width: 27.345703125,
height: 14,
})
expect(fragments[2].baselineOffset).toBe(3)
expect(Number(fragments[2].range.location)).toBe(11)
expect(Number(fragments[2].range.length)).toBe(4)
expect(fragments[2].rect.toJSON()).toEqual({
x: 0,
y: 28,
width: 20.021484375,
height: 14,
=======
// on Jenkins, this throws an `AddressSanitizer: heap-buffer-overflow` error
// so we'll just skip it on there for now
if (!isRunningOnJenkins()) {
test('should return the fragments of a text layer', () => {
let text = new Text({
text: 'blah',
})
text.adjustToFit()
let { fragments } = text
expect(fragments.length).toBe(1)
expect(fragments[0].baselineOffset).toBe(3)
expect(Number(fragments[0].range.location)).toBe(0)
expect(Number(fragments[0].range.length)).toBe(4)
expect(fragments[0].rect.toJSON()).toEqual({
x: 0,
y: 0,
width: 22.6875,
height: 14,
})
// https://github.com/BohemianCoding/SketchAPI/issues/144
text = new Text({
text: 'Test\nHello\n123\no',
})
text.adjustToFit()
// eslint-disable-next-line
fragments = text.fragments
expect(fragments.length).toBe(4)
expect(fragments[0].baselineOffset).toBe(3)
expect(Number(fragments[0].range.location)).toBe(0)
expect(Number(fragments[0].range.length)).toBe(5)
expect(fragments[0].rect.toJSON()).toEqual({
x: 0,
y: 0,
width: 22.0078125,
height: 14,
})
expect(fragments[1].baselineOffset).toBe(3)
expect(Number(fragments[1].range.location)).toBe(5)
expect(Number(fragments[1].range.length)).toBe(6)
expect(fragments[1].rect.toJSON()).toEqual({
x: 0,
y: 14,
width: 27.345703125,
height: 14,
})
expect(fragments[2].baselineOffset).toBe(3)
expect(Number(fragments[2].range.location)).toBe(11)
expect(Number(fragments[2].range.length)).toBe(4)
expect(fragments[2].rect.toJSON()).toEqual({
x: 0,
y: 28,
width: 20.021484375,
height: 14,
})
>>>>>>>
// on Jenkins, this throws an `AddressSanitizer: heap-buffer-overflow` error
// so we'll just skip it on there for now
if (!isRunningOnJenkins()) {
test('should return the fragments of a text layer', () => {
let text = new Text({
text: 'blah',
})
let { fragments } = text
expect(fragments.length).toBe(1)
expect(fragments[0].baselineOffset).toBe(3)
expect(Number(fragments[0].range.location)).toBe(0)
expect(Number(fragments[0].range.length)).toBe(4)
expect(fragments[0].rect.toJSON()).toEqual({
x: 0,
y: 0,
width: 22.6875,
height: 14,
})
// https://github.com/BohemianCoding/SketchAPI/issues/144
text = new Text({
text: 'Test\nHello\n123\no',
})
// eslint-disable-next-line
fragments = text.fragments
expect(fragments.length).toBe(4)
expect(fragments[0].baselineOffset).toBe(3)
expect(Number(fragments[0].range.location)).toBe(0)
expect(Number(fragments[0].range.length)).toBe(5)
expect(fragments[0].rect.toJSON()).toEqual({
x: 0,
y: 0,
width: 22.0078125,
height: 14,
})
expect(fragments[1].baselineOffset).toBe(3)
expect(Number(fragments[1].range.location)).toBe(5)
expect(Number(fragments[1].range.length)).toBe(6)
expect(fragments[1].rect.toJSON()).toEqual({
x: 0,
y: 14,
width: 27.345703125,
height: 14,
})
expect(fragments[2].baselineOffset).toBe(3)
expect(Number(fragments[2].range.location)).toBe(11)
expect(Number(fragments[2].range.length)).toBe(4)
expect(fragments[2].rect.toJSON()).toEqual({
x: 0,
y: 28,
width: 20.021484375,
height: 14,
}) |
<<<<<<<
import { isNativeObject } from 'util'
=======
import util from 'util'
import { isNativeObject } from '../dom/utils'
>>>>>>>
import util from 'util' |
<<<<<<<
})
SymbolMaster.define('overrides', {
get() {
// undefined when immutable
if (!this._object.overrideProperies) {
return undefined
}
const overrideProperies = this._object.overrideProperies()
const overrides = toArray(this._object.availableOverrides())
// recursively find the overrides
function findChildrenOverrides(instance) {
const children = toArray(instance.children())
children.forEach(c => {
overrides.push(c)
findChildrenOverrides(c)
})
}
overrides.forEach(findChildrenOverrides)
return overrides.map(o => {
const wrapped = Override.fromNative(o)
const property = overrideProperies[o.overridePoint().name()]
Object.defineProperty(wrapped, '__symbolMaster', {
writable: false,
enumerable: false,
value: this,
})
if (property && !o.isVisible) {
Object.defineProperty(wrapped, '__editable', {
writable: true,
enumerable: false,
value: property.canOverride,
})
}
return wrapped
})
},
set(overrides) {
overrides.forEach(o => {
const overridePoint = MSOverridePoint.alloc().init()
overridePoint.name = o.id
this._object.setOverridePoint_editable(overridePoint, o.editable)
})
},
=======
})
SymbolMaster.extendObject('background', {
includedInInstance: {
get() {
return Boolean(Number(this._object.includeBackgroundColorInInstance()))
},
set(included) {
if (this._parent.isImmutable()) {
return
}
this._object.setIncludeBackgroundColorInInstance(included)
},
},
>>>>>>>
})
SymbolMaster.define('overrides', {
get() {
// undefined when immutable
if (!this._object.overrideProperies) {
return undefined
}
const overrideProperies = this._object.overrideProperies()
const overrides = toArray(this._object.availableOverrides())
// recursively find the overrides
function findChildrenOverrides(instance) {
const children = toArray(instance.children())
children.forEach(c => {
overrides.push(c)
findChildrenOverrides(c)
})
}
overrides.forEach(findChildrenOverrides)
return overrides.map(o => {
const wrapped = Override.fromNative(o)
const property = overrideProperies[o.overridePoint().name()]
Object.defineProperty(wrapped, '__symbolMaster', {
writable: false,
enumerable: false,
value: this,
})
if (property && !o.isVisible) {
Object.defineProperty(wrapped, '__editable', {
writable: true,
enumerable: false,
value: property.canOverride,
})
}
return wrapped
})
},
set(overrides) {
overrides.forEach(o => {
const overridePoint = MSOverridePoint.alloc().init()
overridePoint.name = o.id
this._object.setOverridePoint_editable(overridePoint, o.editable)
})
},
})
SymbolMaster.extendObject('background', {
includedInInstance: {
get() {
return Boolean(Number(this._object.includeBackgroundColorInInstance()))
},
set(included) {
if (this._parent.isImmutable()) {
return
}
this._object.setIncludeBackgroundColorInInstance(included)
},
}, |
<<<<<<<
filename: 'SketchAPI.js',
library: 'SketchAPI',
=======
filename: OUTPUT_FILE,
library: 'sketch',
>>>>>>>
filename: 'SketchAPI.js',
library: 'sketch', |
<<<<<<<
})
test('should change the exportFormats', () => {
const group = new Group()
expect(group.exportFormats).toEqual([])
group.exportFormats = [
{
size: '2x',
suffix: '@2x',
},
]
expect(group.exportFormats.map(e => e.toJSON())).toEqual([
{
type: 'ExportFormat',
fileFormat: 'png',
prefix: undefined,
suffix: '@2x',
size: '2x',
},
])
=======
})
test('should get the different parents', (context, document) => {
const page = document.selectedPage
expect(page.parent).toEqual(document)
expect(page.getParentPage()).toEqual(undefined)
expect(page.getParentArtboard()).toBe(undefined)
expect(page.getParentSymbolMaster()).toBe(undefined)
expect(page.getParentShape()).toBe(undefined)
const artboard = new Artboard({
parent: page,
})
expect(artboard.parent).toEqual(page)
expect(artboard.getParentPage()).toEqual(page)
expect(artboard.getParentArtboard()).toBe(undefined)
expect(artboard.getParentSymbolMaster()).toBe(undefined)
expect(artboard.getParentShape()).toBe(undefined)
const group = new Group({
parent: artboard,
})
expect(group.parent).toEqual(artboard)
expect(group.getParentPage()).toEqual(page)
expect(group.getParentArtboard()).toEqual(artboard)
expect(group.getParentSymbolMaster()).toBe(undefined)
expect(group.getParentShape()).toBe(undefined)
>>>>>>>
})
test('should change the exportFormats', () => {
const group = new Group()
expect(group.exportFormats).toEqual([])
group.exportFormats = [
{
size: '2x',
suffix: '@2x',
},
]
expect(group.exportFormats.map(e => e.toJSON())).toEqual([
{
type: 'ExportFormat',
fileFormat: 'png',
prefix: undefined,
suffix: '@2x',
size: '2x',
},
])
})
test('should get the different parents', (context, document) => {
const page = document.selectedPage
expect(page.parent).toEqual(document)
expect(page.getParentPage()).toEqual(undefined)
expect(page.getParentArtboard()).toBe(undefined)
expect(page.getParentSymbolMaster()).toBe(undefined)
expect(page.getParentShape()).toBe(undefined)
const artboard = new Artboard({
parent: page,
})
expect(artboard.parent).toEqual(page)
expect(artboard.getParentPage()).toEqual(page)
expect(artboard.getParentArtboard()).toBe(undefined)
expect(artboard.getParentSymbolMaster()).toBe(undefined)
expect(artboard.getParentShape()).toBe(undefined)
const group = new Group({
parent: artboard,
})
expect(group.parent).toEqual(artboard)
expect(group.getParentPage()).toEqual(page)
expect(group.getParentArtboard()).toEqual(artboard)
expect(group.getParentSymbolMaster()).toBe(undefined)
expect(group.getParentShape()).toBe(undefined) |
<<<<<<<
}, 'to throw exception',
"expected Error({ message: 'foo' }) to equal Error({ message: 'bar' })\n" +
"\n" +
"Error({\n" +
" message: 'foo' // should equal 'bar'\n" +
" // -foo\n" +
" // +bar\n" +
"})");
=======
}, 'to throw exception', function (err) {
expect(err.output.toString(), 'to equal',
"expected Error('foo') to equal Error('bar')\n" +
"\n" +
"Error({\n" +
" message: 'foo' // should equal 'bar'\n" +
" // -foo\n" +
" // +bar\n" +
"})");
});
>>>>>>>
}, 'to throw exception',
"expected Error('foo') to equal Error('bar')\n" +
"\n" +
"Error({\n" +
" message: 'foo' // should equal 'bar'\n" +
" // -foo\n" +
" // +bar\n" +
"})"); |
<<<<<<<
if (
typeof navigator === 'undefined' ||
!/phantom/i.test(navigator.userAgent)
) {
it('should give up', () => {
return expect(
function() {
return expect(function() {
try {
throw new Error('argh');
} catch (err) {
err.stack = 'foobarquux\n at yaddayadda';
throw err;
}
}, 'not to error');
},
'to error',
expect.it(function(err) {
expect(err.stack, 'to contain', 'foobarquux\n at yaddayadda');
})
);
});
}
=======
it('should give up', () => {
return expect(
function() {
return expect(function() {
try {
throw new Error('argh');
} catch (err) {
err.stack = 'foobarquux\n at yaddayadda';
throw err;
}
}, 'not to error');
},
'to error',
function(err) {
expect(err.stack, 'to contain', 'foobarquux\n at yaddayadda');
}
);
});
>>>>>>>
it('should give up', () => {
return expect(
function() {
return expect(function() {
try {
throw new Error('argh');
} catch (err) {
err.stack = 'foobarquux\n at yaddayadda';
throw err;
}
}, 'not to error');
},
'to error',
expect.it(function(err) {
expect(err.stack, 'to contain', 'foobarquux\n at yaddayadda');
})
);
}); |
<<<<<<<
testBoth('watching an object value then unwatching should restore old value', function(get, set) {
=======
test("accessing a watched unknown property triggers call to unknownProperty", function(){
var unknownPropertyWasCalled = false;
var watchedPropertyName = 'foo'
var obj = {
unknownProperty: function(propName){
if (propName === watchedPropertyName) { unknownPropertyWasCalled = true };
}
};
SC.watch(obj, watchedPropertyName);
SC.get(obj, watchedPropertyName)
ok(unknownPropertyWasCalled);
});
test('watching an object value then unwatching should restore old value', function() {
>>>>>>>
test("accessing a watched unknown property triggers call to unknownProperty", function(){
var unknownPropertyWasCalled = false;
var watchedPropertyName = 'foo'
var obj = {
unknownProperty: function(propName){
if (propName === watchedPropertyName) { unknownPropertyWasCalled = true };
}
};
SC.watch(obj, watchedPropertyName);
SC.get(obj, watchedPropertyName)
ok(unknownPropertyWasCalled);
});
testBoth('watching an object value then unwatching should restore old value', function(get, set) { |
<<<<<<<
set(this, 'router', router);
}
=======
set(this, 'stateManager', router);
>>>>>>>
set(this, 'router', router); |
<<<<<<<
import { EventDispatcher, jQueryDisabled } from 'ember-views';
=======
>>>>>>>
import { jQueryDisabled } from 'ember-views';
<<<<<<<
=======
>>>>>>>
<<<<<<<
moduleFor('custom EventDispatcher subclass with #setup', class extends RenderingTest {
constructor() {
super();
let dispatcher = this.owner.lookup('event_dispatcher:main');
run(dispatcher, 'destroy');
this.owner.__container__.reset('event_dispatcher:main');
this.owner.unregister('event_dispatcher:main');
}
['@test canDispatchToEventManager is deprecated in EventDispatcher']() {
let MyDispatcher = EventDispatcher.extend({
canDispatchToEventManager: null
});
this.owner.register('event_dispatcher:main', MyDispatcher);
expectDeprecation(/`canDispatchToEventManager` has been deprecated/);
this.owner.lookup('event_dispatcher:main');
}
});
// native event dispatcher doesn't support multiple event managers
// because `canDispatchToEventManager` is deprecated long time ago
if (!jQueryDisabled) {
moduleFor('EventDispatcher - jQuery only', class extends RenderingTest {
['@test dispatches to the nearest event manager'](assert) {
let receivedEvent;
this.registerComponent('x-foo', {
ComponentClass: Component.extend({
click() {
assert.notOk(true, 'should not trigger `click` on component');
},
eventManager: {
click(event) {
receivedEvent = event;
}
}
}),
template: `<input id="is-done" type="checkbox">`
});
expectDeprecation(/`eventManager` has been deprecated/);
this.render(`{{x-foo}}`);
this.runTask(() => this.$('#is-done').trigger('click'));
assert.strictEqual(receivedEvent.target, this.$('#is-done')[0]);
}
});
}
=======
>>>>>>> |
<<<<<<<
import { isArray } from "ember-metal/utils";
=======
import CollectionView from "ember-views/views/collection_view";
import { isArray } from "ember-runtime/utils";
>>>>>>>
import { isArray } from "ember-runtime/utils"; |
<<<<<<<
import isEnabled from 'ember-metal/features';
import Component from 'ember-views/components/component';
=======
import Component from 'ember-views/views/component';
>>>>>>>
import Component from 'ember-views/components/component'; |
<<<<<<<
QUnit.test('implementing `render` allows pushing into a string buffer', function() {
expect(1);
registry.register('component:non-block', Component.extend({
render(buffer) {
buffer.push('<span id="zomg">Whoop!</span>');
}
}));
expectAssertion(function() {
appendViewFor('<non-block />');
});
});
}
function regex(r) {
return {
match(v) {
return r.test(v);
}
};
}
function equalsElement(element, tagName, attributes, content) {
QUnit.push(element.tagName === tagName.toUpperCase(), element.tagName.toLowerCase(), tagName, `expect tagName to be ${tagName}`);
let expectedCount = 0;
for (let prop in attributes) {
expectedCount++;
let expected = attributes[prop];
if (typeof expected === 'string') {
QUnit.push(element.getAttribute(prop) === attributes[prop], element.getAttribute(prop), attributes[prop], `The element should have ${prop}=${attributes[prop]}`);
} else {
QUnit.push(attributes[prop].match(element.getAttribute(prop)), element.getAttribute(prop), attributes[prop], `The element should have ${prop}=${attributes[prop]}`);
}
}
let actualAttributes = {};
for (let i = 0, l = element.attributes.length; i < l; i++) {
actualAttributes[element.attributes[i].name] = element.attributes[i].value;
}
QUnit.push(element.attributes.length === expectedCount, actualAttributes, attributes, `Expected ${expectedCount} attributes`);
QUnit.push(element.innerHTML === content, element.innerHTML, content, `The element had '${content}' as its content`);
}
=======
}
>>>>>>>
}
function regex(r) {
return {
match(v) {
return r.test(v);
}
};
}
function equalsElement(element, tagName, attributes, content) {
QUnit.push(element.tagName === tagName.toUpperCase(), element.tagName.toLowerCase(), tagName, `expect tagName to be ${tagName}`);
let expectedCount = 0;
for (let prop in attributes) {
expectedCount++;
let expected = attributes[prop];
if (typeof expected === 'string') {
QUnit.push(element.getAttribute(prop) === attributes[prop], element.getAttribute(prop), attributes[prop], `The element should have ${prop}=${attributes[prop]}`);
} else {
QUnit.push(attributes[prop].match(element.getAttribute(prop)), element.getAttribute(prop), attributes[prop], `The element should have ${prop}=${attributes[prop]}`);
}
}
let actualAttributes = {};
for (let i = 0, l = element.attributes.length; i < l; i++) {
actualAttributes[element.attributes[i].name] = element.attributes[i].value;
}
QUnit.push(element.attributes.length === expectedCount, actualAttributes, attributes, `Expected ${expectedCount} attributes`);
QUnit.push(element.innerHTML === content, element.innerHTML, content, `The element had '${content}' as its content`);
} |
<<<<<<<
this.visit('/');
assert.equal(this.$('h3.home').length, 1, 'The home template was rendered');
assert.equal(this.$('#self-link.active').length, 1, 'The self-link was rendered with active class');
assert.equal(this.$('#about-link:not(.active)').length, 1, 'The other link was rendered without active class');
this.click('#about-link');
assert.equal(this.$('h3.about').length, 1, 'The about template was rendered');
assert.equal(this.$('#self-link.active').length, 1, 'The self-link was rendered with active class');
assert.equal(this.$('#home-link:not(.active)').length, 1, 'The other link was rendered without active class');
=======
return this.visit('/')
.then(() => {
assert.equal(this.$('h3:contains(Home)').length, 1, 'The home template was rendered');
assert.equal(this.$('#self-link.active').length, 1, 'The self-link was rendered with active class');
assert.equal(this.$('#about-link:not(.active)').length, 1, 'The other link was rendered without active class');
return this.click('#about-link');
})
.then(() => {
assert.equal(this.$('h3:contains(About)').length, 1, 'The about template was rendered');
assert.equal(this.$('#self-link.active').length, 1, 'The self-link was rendered with active class');
assert.equal(this.$('#home-link:not(.active)').length, 1, 'The other link was rendered without active class');
});
>>>>>>>
return this.visit('/')
.then(() => {
assert.equal(this.$('h3.home').length, 1, 'The home template was rendered');
assert.equal(this.$('#self-link.active').length, 1, 'The self-link was rendered with active class');
assert.equal(this.$('#about-link:not(.active)').length, 1, 'The other link was rendered without active class');
return this.click('#about-link');
})
.then(() => {
assert.equal(this.$('h3.about').length, 1, 'The about template was rendered');
assert.equal(this.$('#self-link.active').length, 1, 'The self-link was rendered with active class');
assert.equal(this.$('#home-link:not(.active)').length, 1, 'The other link was rendered without active class');
});
<<<<<<<
this.visit('/');
this.click('#about-link');
assert.equal(this.$('h3.about').length, 0, 'Transitioning did not occur');
=======
return this.visit('/')
.then(() => {
return this.click('#about-link');
})
.then(() => {
assert.equal(this.$('h3:contains(About)').length, 0, 'Transitioning did not occur');
});
>>>>>>>
return this.visit('/')
.then(() => {
return this.click('#about-link');
})
.then(() => {
assert.equal(this.$('h3.about').length, 0, 'Transitioning did not occur');
});
<<<<<<<
this.visit('/');
this.click('#about-link');
assert.equal(this.$('h3.about').length, 0, 'Transitioning did not occur');
=======
return this.visit('/')
.then(() => {
return this.click('#about-link');
})
.then(() => {
assert.equal(this.$('h3:contains(About)').length, 0, 'Transitioning did not occur');
});
>>>>>>>
return this.visit('/')
.then(() => {
return this.click('#about-link');
})
.then(() => {
assert.equal(this.$('h3.about').length, 0, 'Transitioning did not occur');
});
<<<<<<<
this.visit('/');
this.click('#about-link');
assert.equal(this.$('h3.about').length, 0, 'Transitioning did not occur');
let controller = this.applicationInstance.lookup('controller:index');
this.runTask(() => controller.set('disabledWhen', false));
this.click('#about-link');
assert.equal(this.$('h3.about').length, 1, 'Transitioning did occur when disabledWhen became false');
=======
return this.visit('/')
.then(() => {
return this.click('#about-link');
})
.then(() => {
assert.equal(this.$('h3:contains(About)').length, 0, 'Transitioning did not occur');
let controller = this.applicationInstance.lookup('controller:index');
controller.set('disabledWhen', false);
return this.runLoopSettled();
})
.then(() => {
return this.click('#about-link');
})
.then(() => {
assert.equal(this.$('h3:contains(About)').length, 1, 'Transitioning did occur when disabledWhen became false');
});
>>>>>>>
return this.visit('/')
.then(() => {
return this.click('#about-link');
})
.then(() => {
assert.equal(this.$('h3.about').length, 0, 'Transitioning did not occur');
let controller = this.applicationInstance.lookup('controller:index');
controller.set('disabledWhen', false);
return this.runLoopSettled();
})
.then(() => {
return this.click('#about-link');
})
.then(() => {
assert.equal(this.$('h3.about').length, 1, 'Transitioning did occur when disabledWhen became false');
});
<<<<<<<
this.visit('/');
assert.equal(this.$('h3.home').length, 1, 'The home template was rendered');
assert.equal(this.$('#self-link.zomg-active').length, 1, 'The self-link was rendered with active class');
assert.equal(this.$('#about-link:not(.active)').length, 1, 'The other link was rendered without active class');
=======
return this.visit('/').then(() => {
assert.equal(this.$('h3:contains(Home)').length, 1, 'The home template was rendered');
assert.equal(this.$('#self-link.zomg-active').length, 1, 'The self-link was rendered with active class');
assert.equal(this.$('#about-link:not(.active)').length, 1, 'The other link was rendered without active class');
});
>>>>>>>
return this.visit('/').then(() => {
assert.equal(this.$('h3.home').length, 1, 'The home template was rendered');
assert.equal(this.$('#self-link.zomg-active').length, 1, 'The self-link was rendered with active class');
assert.equal(this.$('#about-link:not(.active)').length, 1, 'The other link was rendered without active class');
});
<<<<<<<
this.visit('/');
assert.equal(this.$('h3.home').length, 1, 'The home template was rendered');
assert.equal(this.$('#self-link.zomg-active').length, 1, 'The self-link was rendered with active class');
assert.equal(this.$('#about-link:not(.active)').length, 1, 'The other link was rendered without active class');
=======
return this.visit('/').then(() => {
assert.equal(this.$('h3:contains(Home)').length, 1, 'The home template was rendered');
assert.equal(this.$('#self-link.zomg-active').length, 1, 'The self-link was rendered with active class');
assert.equal(this.$('#about-link:not(.active)').length, 1, 'The other link was rendered without active class');
});
>>>>>>>
return this.visit('/').then(() => {
assert.equal(this.$('h3.home').length, 1, 'The home template was rendered');
assert.equal(this.$('#self-link.zomg-active').length, 1, 'The self-link was rendered with active class');
assert.equal(this.$('#about-link:not(.active)').length, 1, 'The other link was rendered without active class');
});
<<<<<<<
this.visit('/about');
assert.equal(this.$('h3.list').length, 1, 'The home template was rendered');
assert.equal(normalizeUrl(this.$('#home-link').attr('href')), '/', 'The home link points back at /');
this.click('#yehuda');
assert.equal(this.$('h3.item').length, 1, 'The item template was rendered');
assert.equal(this.$('p').text(), 'Yehuda Katz', 'The name is correct');
this.click('#home-link');
this.click('#about-link');
assert.equal(normalizeUrl(this.$('li a#yehuda').attr('href')), '/item/yehuda');
assert.equal(normalizeUrl(this.$('li a#tom').attr('href')), '/item/tom');
assert.equal(normalizeUrl(this.$('li a#erik').attr('href')), '/item/erik');
this.click('#erik');
assert.equal(this.$('h3.item').length, 1, 'The item template was rendered');
assert.equal(this.$('p').text(), 'Erik Brynroflsson', 'The name is correct');
=======
return this.visit('/about')
.then(() => {
assert.equal(this.$('h3:contains(List)').length, 1, 'The home template was rendered');
assert.equal(normalizeUrl(this.$('#home-link').attr('href')), '/', 'The home link points back at /');
return this.click('#yehuda');
})
.then(() => {
assert.equal(this.$('h3:contains(Item)').length, 1, 'The item template was rendered');
assert.equal(this.$('p').text(), 'Yehuda Katz', 'The name is correct');
return this.click('#home-link');
})
.then(() => {
return this.click('#about-link');
})
.then(() => {
assert.equal(normalizeUrl(this.$('li a:contains(Yehuda)').attr('href')), '/item/yehuda');
assert.equal(normalizeUrl(this.$('li a:contains(Tom)').attr('href')), '/item/tom');
assert.equal(normalizeUrl(this.$('li a:contains(Erik)').attr('href')), '/item/erik');
return this.click('#erik');
})
.then(() => {
assert.equal(this.$('h3:contains(Item)').length, 1, 'The item template was rendered');
assert.equal(this.$('p').text(), 'Erik Brynroflsson', 'The name is correct');
});
>>>>>>>
return this.visit('/about')
.then(() => {
assert.equal(this.$('h3.list').length, 1, 'The home template was rendered');
assert.equal(normalizeUrl(this.$('#home-link').attr('href')), '/', 'The home link points back at /');
return this.click('#yehuda');
})
.then(() => {
assert.equal(this.$('h3.item').length, 1, 'The item template was rendered');
assert.equal(this.$('p').text(), 'Yehuda Katz', 'The name is correct');
return this.click('#home-link');
})
.then(() => {
return this.click('#about-link');
})
.then(() => {
assert.equal(normalizeUrl(this.$('li a#yehuda').attr('href')), '/item/yehuda');
assert.equal(normalizeUrl(this.$('li a#tom').attr('href')), '/item/tom');
assert.equal(normalizeUrl(this.$('li a#erik').attr('href')), '/item/erik');
return this.click('#erik');
})
.then(() => {
assert.equal(this.$('h3.item').length, 1, 'The item template was rendered');
assert.equal(this.$('p').text(), 'Erik Brynroflsson', 'The name is correct');
});
<<<<<<<
this.visit('/');
assertNav({ prevented: true }, () => this.$('#about-link').click());
=======
return this.visit('/').then(() => {
let event = jQuery.Event('click');
this.$('#about-link').trigger(event);
assert.equal(event.isDefaultPrevented(), true, 'should preventDefault');
});
>>>>>>>
return this.visit('/').then(() => {
assertNav({ prevented: true }, () => this.$('#about-link').click());
});
<<<<<<<
this.visit('/');
assertNav({ prevented: false }, () => this.$('#about-link').trigger('click'));
=======
return this.visit('/').then(() => {
let event = jQuery.Event('click');
this.$('#about-link').trigger(event);
assert.equal(event.isDefaultPrevented(), false, 'should not preventDefault');
});
>>>>>>>
return this.visit('/').then(() => {
assertNav({ prevented: false }, () => this.$('#about-link').trigger('click'));
});
<<<<<<<
this.visit('/');
assertNav({ prevented: true }, () => this.$('#self-link').click());
=======
return this.visit('/').then(() => {
let event = jQuery.Event('click');
this.$('#self-link').trigger(event);
assert.equal(event.isDefaultPrevented(), true, 'should preventDefault when target attribute is `_self`');
});
>>>>>>>
return this.visit('/').then(() => {
assertNav({ prevented: true }, () => this.$('#self-link').click());
});
<<<<<<<
this.visit('/');
this.click('#contact-link');
assert.equal(this.$('h3.contact').length, 1, 'The contact template was rendered');
assert.equal(this.$('#self-link.active').length, 1, 'The self-link was rendered with active class');
assert.equal(this.$('#home-link:not(.active)').length, 1, 'The other link was rendered without active class');
=======
return this.visit('/')
.then(() => {
return this.click('#contact-link');
})
.then(() => {
assert.equal(this.$('h3:contains(Contact)').length, 1, 'The contact template was rendered');
assert.equal(this.$('#self-link.active').length, 1, 'The self-link was rendered with active class');
assert.equal(this.$('#home-link:not(.active)').length, 1, 'The other link was rendered without active class');
});
>>>>>>>
return this.visit('/')
.then(() => {
return this.click('#contact-link');
})
.then(() => {
assert.equal(this.$('h3.contact').length, 1, 'The contact template was rendered');
assert.equal(this.$('#self-link.active').length, 1, 'The self-link was rendered with active class');
assert.equal(this.$('#home-link:not(.active)').length, 1, 'The other link was rendered without active class');
});
<<<<<<<
this.visit('/');
assert.equal(this.$('#contact-link').text(), 'Jane', 'The link title is correctly resolved');
=======
return this.visit('/')
.then(() => {
assert.equal(this.$('#contact-link:contains(Jane)').length, 1, 'The link title is correctly resolved');
>>>>>>>
return this.visit('/')
.then(() => {
assert.equal(this.$('#contact-link').text(), 'Jane', 'The link title is correctly resolved');
<<<<<<<
assert.equal(this.$('#contact-link').text(), 'Joe', 'The link title is correctly updated when the bound property changes');
=======
assert.equal(this.$('#contact-link:contains(Joe)').length, 1, 'The link title is correctly updated when the bound property changes');
>>>>>>>
assert.equal(this.$('#contact-link').text(), 'Joe', 'The link title is correctly updated when the bound property changes');
<<<<<<<
assert.equal(normalizeUrl(this.$('li a#yehuda').attr('href')), '/item/yehuda');
assert.equal(normalizeUrl(this.$('li a#tom').attr('href')), '/item/tom');
assert.equal(normalizeUrl(this.$('li a#erik').attr('href')), '/item/erik');
=======
return this.click('#home-link');
})
.then(() => {
assert.equal(normalizeUrl(this.$('li a:contains(Yehuda)').attr('href')), '/item/yehuda');
assert.equal(normalizeUrl(this.$('li a:contains(Tom)').attr('href')), '/item/tom');
assert.equal(normalizeUrl(this.$('li a:contains(Erik)').attr('href')), '/item/erik');
});
>>>>>>>
return this.click('#home-link');
})
.then(() => {
assert.equal(normalizeUrl(this.$('li a#yehuda').attr('href')), '/item/yehuda');
assert.equal(normalizeUrl(this.$('li a#tom').attr('href')), '/item/tom');
assert.equal(normalizeUrl(this.$('li a#erik').attr('href')), '/item/erik');
});
<<<<<<<
});
function assertNav(options, callback) {
let nav = false;
function check(event) {
QUnit.assert.equal(event.defaultPrevented, options.prevented, `expected defaultPrevented=${options.prevented}`);
nav = true;
event.preventDefault();
}
try {
document.addEventListener('click', check);
callback();
} finally {
document.removeEventListener('click', check);
QUnit.assert.ok(nav, 'Expected a link to be clicked');
}
}
=======
});
>>>>>>>
});
function assertNav(options, callback) {
let nav = false;
function check(event) {
QUnit.assert.equal(event.defaultPrevented, options.prevented, `expected defaultPrevented=${options.prevented}`);
nav = true;
event.preventDefault();
}
try {
document.addEventListener('click', check);
callback();
} finally {
document.removeEventListener('click', check);
QUnit.assert.ok(nav, 'Expected a link to be clicked');
}
} |
<<<<<<<
import Layout from './containers/Layout';
import './App.css';
=======
import AppContainer from './containers/App';
>>>>>>>
import Layout from './containers/Layout'; |
<<<<<<<
if (outputMode !== 'html') {
const filename = `./${assetSaver.getFilenamePrefix({url: address})}.report.html`;
=======
// If pretty printing to the command line, also output the html report.
if (outputMode === Printer.OUTPUT_MODE.pretty) {
const filename = './' + assetSaver.getFilenamePrefix({url: address}) + '.html';
>>>>>>>
// If pretty printing to the command line, also output the html report.
if (outputMode === Printer.OUTPUT_MODE.pretty) {
const filename = `./${assetSaver.getFilenamePrefix({url: address})}.report.html`; |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.