conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "Remove progress notification from update version command\n" }, { "from": "human", "value": "'use babel';\n\nimport UpdateVersionView from '../views/UpdateVersionView';\nimport yarnExec from '../yarn/exec';\nimport reportError from '../report-error';\nimport addProgr...
javascript
chosen
[ { "from": "system", "value": "Fix arrays verify step: do not fail if empty string or boolean passed in\n" }, { "from": "human", "value": "var path = require('path');\nvar getFile = require('../../get-file');\nvar run = require('../../run-solution');\n\nexports.problem = getFile(path.join(__dirna...
javascript
chosen
[ { "from": "system", "value": "Solve navigation problem when you are in list view and pres the button to come back to view (before it was to home)\n" }, { "from": "human", "value": "/**\n * @author Jose A. Dianes <jdianes@ebi.ac.uk>\n *\n * The prc-cluster-list-filters directive allows us to reus...
javascript
chosen
[ { "from": "system", "value": "Rename thenApply function to then\n" }, { "from": "human", "value": "'use strict';\n\nvar _ = require('lodash');\n\n\nvar httpConfigurable = {};\n\nhttpConfigurable.initHttpConfigurable = function() {\n this.thenApplies = [];\n this.headers = {};\n};\n\nhttpConfig...
javascript
chosen
[ { "from": "system", "value": "Add animation after form is submitted\n" }, { "from": "human", "value": "$(document).ready(function(){\n $(\"#email-form\").on(\"submit\", function(e){\n e.preventDefault();\n console.log(\"HELP\");\n });\n});\n" }, { "from": "gpt", "value": "$(d...
javascript
chosen
[ { "from": "system", "value": "Add button to the template\n" }, { "from": "human", "value": "'use strict';\n\nconst request = require('request-promise');\n\nconst config = require('../../config');\nconst scraper = require('./scraper');\n\nmodule.exports = {\n getFirstMessagingEntry: (body) => {\...
javascript
chosen
[ { "from": "system", "value": "Reset validation errors with each render\n\nIf we do this in init then the errors don’t get cleared up when new\ndata is passed in.\n" }, { "from": "human", "value": "import Ember from 'ember';\n\nconst { Mixin } = Ember;\n\nexport default Mixin.create({\n\n init()...
javascript
chosen
[ { "from": "system", "value": "Add link to home page\n" }, { "from": "human", "value": "L.Control.MapRequest = L.Control.extend({\n options: {\n position: \"topright\"\n },\n\n initialize: function(options) {\n L.setOptions(this, options);\n },\n\n onAdd: function(map...
javascript
chosen
[ { "from": "system", "value": "Add uninstall shortcut for the REPL\n\nIn the REPL your can use uninstall(['package']) without calling ruche.uninstall\n" }, { "from": "human", "value": "#!/usr/bin/env node\n\n// Module dependencies.\nvar debug = require('debug')('ruche:repl');\nvar repl = require(...
javascript
chosen
[ { "from": "system", "value": "Add Facebook login test 3\n" }, { "from": "human", "value": "'use strict';\n\nangular.module('ngSocial.facebook', ['ngRoute','ngFacebook'])\n\n.config(['$routeProvider', function($routeProvider) {\n $routeProvider.when('/facebook', {\n templateUrl: 'facebook/fac...
javascript
chosen
[ { "from": "system", "value": "Update jshint path to include all children" }, { "from": "human", "value": "var gulp = require('gulp'),\n jshint = require('gulp-jshint'),\n stylish = require('jshint-stylish'),\n connect = require('gulp-connect');\n\n//CHANGE IF NEEDED\nvar conf = {\n a...
javascript
chosen
[ { "from": "system", "value": "Add function next() & var animations\n" }, { "from": "human", "value": "/**\n * Animable.js\n *\n * https://github.com/JWhile/Animable.js\n *\n * Animable.js\n */\n\n(function(){ // namespace\n\n// class Animation\nfunction Animation(from, to, time, update)\n{\n ...
javascript
chosen
[ { "from": "system", "value": "Add a generic gulp transpile task\n\nWe can refactor the shared code between different transpilation recipes out into a separate function." }, { "from": "human", "value": "'use strict'\n\nvar gulp = require('gulp')\nvar del = require('del')\nvar rename = require('gu...
javascript
chosen
[ { "from": "system", "value": "WHAT: Change cache key and expire time\n\nWHY:\n\n* XXXXX\n\nHOW:\n\n* NOTHING TO SAY\n" }, { "from": "human", "value": "import koaRouter from 'koa-router';\nimport Scientific from '../controllers/scientific';\nimport cache from '../controllers/helper/cache';\nimpor...
javascript
chosen
[ { "from": "system", "value": "Add gulp task for compiling CSS\nAlso add watcher for SCSS compilation\n" }, { "from": "human", "value": "'use strict';\n\nvar gulp = require('gulp'),\n browserify = require('browserify'),\n transform = require('vinyl-transform'),\n uglify = require('gulp-u...
javascript
chosen
[ { "from": "system", "value": "Use onewWay instead of readOnly\n" }, { "from": "human", "value": "import Ember from 'ember';\nimport Qs from 'qs';\n\nconst { computed } = Ember;\n\nexport default Ember.Component.extend({\n tagName: '',\n\n parsedURL: computed('url', function() {\n const link...
javascript
chosen
[ { "from": "system", "value": "Change task name (plato -> analyze)\n" }, { "from": "human", "value": "var gulp = require('gulp');\nvar ts = require('gulp-typescript');\nvar tslint = require('gulp-tslint');\nvar jade = require('gulp-jade');\nvar plato = require('gulp-plato');\nvar espower = requir...
javascript
chosen
[ { "from": "system", "value": "Make live reloading work again\n" }, { "from": "human", "value": "const gulp = require('gulp'),\n sass = require('gulp-sass'),\n babel = require('gulp-babel'),\n sourcemaps = require('gulp-sourcemaps'),\n gls = require('gulp-live-server'),\n ...
javascript
chosen
[ { "from": "system", "value": "Update MessageWidget init() for consistency\n" }, { "from": "human", "value": "\"use strict\";\n\nconst Widget = require('../../layout/widget');\nconst merge = require('../../../util/merge');\nconst {coroutine: co} = require('bluebird');\n\nclass MessageWidget exten...
javascript
chosen
[ { "from": "system", "value": "Revert \":heavy_check_mark: fix label-group having label tag instead of div\"\n\nThis reverts commit 0d029074a1eaccb792d6895fd1e892f80e33f3f7.\n" }, { "from": "human", "value": "import { PropTypes } from 'react';\nimport { BEM } from 'rebem';\n\nimport Label from '#...
javascript
chosen
[ { "from": "system", "value": "Remove the URL count numbers now that twitter stopped reporting them.\n" }, { "from": "human", "value": "$(function(){\n var socialBar = $('.social[data-url]');\n $.get('https://graph.facebook.com/?id=' + socialBar.data('url'), function(data) {\n $('.fa...
javascript
chosen
[ { "from": "system", "value": "Add a bind() bench to compare perf gain\n" }, { "from": "human", "value": "'use strict'\nsuite('define a function with inherited this', function () {\n bench('function statement', function () {\n var self = this\n var a = function () {\n self\n retu...
javascript
chosen
[ { "from": "system", "value": "Remove function replaceAll in stringManipulator.js\n\nnot used anymore\n" }, { "from": "human", "value": "\nexport default function stringManipulation() {\n this.stringConcat = function stringConcat(...stringToConcat) {\n return stringToConcat.join('');\n };\n\...
javascript
chosen
[ { "from": "system", "value": "Add get 3 days weather API call\n" }, { "from": "human", "value": "import request from 'superagent'\n\nmodule.exports = {\n getWeather\n}\n\nfunction getWeather() {\n request\n .get(`http://api.openweathermap.org/data/2.5/weather?=${city}&units=metric&APPID=fc04e...
javascript
chosen
[ { "from": "system", "value": "Debug jquery error after form submission\n" }, { "from": "human", "value": "$(document).ready(function(){\n $(\"#email-form\").on(\"submit\", function(e){\n e.preventDefault();\n $(\".contact-form\").empty();\n $(\".contact-form\").append(\n \"<div cl...
javascript
chosen
[ { "from": "system", "value": "Refactor JS building into a function\n" }, { "from": "human", "value": "var gulp = require(\"gulp\");\n\nvar sourcemaps = require(\"gulp-sourcemaps\");\n\nvar sass = require(\"gulp-sass\");\n\nvar concat = require(\"gulp-concat\");\nvar uglify = require(\"gulp-uglif...
javascript
chosen
[ { "from": "system", "value": "Use `ember-cli-babel` to resolve module paths\n" }, { "from": "human", "value": "const Babel = require('broccoli-babel-transpiler');\nconst resolveModuleSource = require('amd-name-resolver').moduleResolve;\nconst enifed = require('./transforms/transform-define');\nc...
javascript
chosen
[ { "from": "system", "value": "Add default to log level\n" }, { "from": "human", "value": "import mongoose from 'mongoose'\r\n\r\nconst LogSchema = new mongoose.Schema({\r\n mission_id: String,\r\n created_at: Date,\r\n logs: [{\r\n time: Number,\r\n text: String,\r\n level: Number\r\...
javascript
chosen
[ { "from": "system", "value": "Introduce better error reporting for getter errors\n" }, { "from": "human", "value": "'use strict';\n\nvar resolve = require('esniff/accessed-properties')('this')\n , memoize = require('memoizee/plain')\n , ignored = require('./meta-property-names')...
javascript
chosen
[ { "from": "system", "value": "Fix get header preset not resolving correctly\n" }, { "from": "human", "value": "export function getHeadersObject(headers = []) {\n return Array.from(headers).reduce((result, item) => {\n result[item[0]] = item[1];\n return result\n }, {});\n}\n\nfunction ge...
javascript
chosen
[ { "from": "system", "value": ":bug: Fix a typo in cli\n" }, { "from": "human", "value": "#!/usr/bin/env node\n'use strict'\nprocess.title = 'ucompiler'\n\nrequire('debug').enable('UCompiler:*')\nvar UCompiler = require('..')\nvar knownCommands = ['go', 'watch']\nvar parameters = process.argv.sli...
javascript
chosen
[ { "from": "system", "value": ":new: Use the new compile and watch API in cli\n" }, { "from": "human", "value": "#!/usr/bin/env node\n'use strict'\nprocess.title = 'ucompiler'\n\nrequire('debug').enable('UCompiler:*')\nvar UCompiler = require('..')\nvar knownCommands = ['go', 'watch']\nvar parame...
javascript
chosen
[ { "from": "system", "value": "Add test for no parameters\n" }, { "from": "human", "value": "import request from 'supertest';\nimport test from 'tape';\n\nimport app from '../server';\n\ntest('Should leftpad correctly', t => {\n request(app)\n .get('?str=paddin%27%20oswalt&len=68...
javascript
chosen
[ { "from": "system", "value": "Fix incorrect variable name in Array2d.each.\n" }, { "from": "human", "value": "define(function() {\n\tvar Array2d = function () {\n\t\tthis._columns = {};\n\t};\n\n\tArray2d.prototype.get = function(location) {\n\t\tvar row = this._columns[location.x];\n\n\t\tif (r...
javascript
chosen
[ { "from": "system", "value": "Handle FObejcts in foam.swift.stringify during generation.\n" }, { "from": "human", "value": "/**\n * @license\n * Copyright 2018 The FOAM Authors. All Rights Reserved.\n * http://www.apache.org/licenses/LICENSE-2.0\n */\n\nfoam.LIB({\n name: 'foam.swift',\n metho...
javascript
chosen
[ { "from": "system", "value": "Remove third argument from geolocation.getCurrentPosition call\n\nThis third argument is known to cause issues on Android devices,\nespecially with overly greedy values of maximumAge and timeout.\n" }, { "from": "human", "value": "// @flow\n\nimport deviceInfo from ...
javascript
chosen
[ { "from": "system", "value": "Revert \"[RN] Use rounded avatars in the film strip\"\n\nThis reverts commit 739298c7826ea6109b8a2632d54c8d867f7d03cc.\n" }, { "from": "human", "value": "import { createStyleSheet } from '../../styles';\n\n/**\n * The style of the avatar and participant view UI (com...
javascript
chosen
[ { "from": "system", "value": "Add support for AMD, CommonJS and global export\n\n:smile:" }, { "from": "human", "value": "/**\n * treadmill.js\n * Copyright © 2015 Johnie Hjelm\n */\nvar Treadmill = Treadmill || {};\n\nTreadmill.run = function() {\n window.onscroll = function() {\n if ((wind...
javascript
chosen
[ { "from": "system", "value": "Allow prefix to be passed as argument" }, { "from": "human", "value": "const AWS = require('aws-sdk')\nconst fs = require('fs-extra')\nconst config = require('config')\nconst aws = config.aws\n\nAWS.config = new AWS.Config(aws)\n\nconst s3 = new AWS.S3()\nconst toda...
javascript
chosen
[ { "from": "system", "value": "Increase file size for upload-size test\n(to prevent occasional failure on some machines)\n" }, { "from": "human", "value": "'use strict'\n\nvar config = require('config')\n\ndescribe('/#/complain', function () {\n protractor.beforeEach.login({ email: 'admin@' + co...
javascript
chosen
[ { "from": "system", "value": "Use protractor EC.elementToBeClickable to fix the tests\n" }, { "from": "human", "value": "'use strict';\n\nvar Chance = require('chance'),\n chance = new Chance();\n\nclass InvitePage {\n\n constructor () {\n this.titleEl = element(by.css('.project-title'));...
javascript
chosen
[ { "from": "system", "value": "Connect fetchPosts action creator to PostsIndex\n" }, { "from": "human", "value": "import React, { Component } from 'react';\n\nclass PostsIndex extends Component {\n render() {\n return (\n <div>\n Posts Index\n </div>\n );\n }\n}\n\nexport...
javascript
chosen
[ { "from": "system", "value": "Set string decoder by default\n" }, { "from": "human", "value": " // Public properties\n this.buffer = null\n this.length = 0\n this.offset = 0\n this.markedOffset = -1 // Flag indicating whether the buffer should be kept when write() ends\n\n // Private pr...
javascript
chosen
[ { "from": "system", "value": "RB: Add callback tests for map and sets\n" }, { "from": "human", "value": "const FourLoop = require('../../index');\n\ndescribe('4loop', () => {\n it('callback executed on obj', (expect) => {\n let wasCallbackHit = false;\n const callback = function...
javascript
chosen
[ { "from": "system", "value": "Change log output format for better legibility\n" }, { "from": "human", "value": "const CatLog = require('cat-log');\nconst logger = new CatLog('adonis:sms');\n\nclass Log {\n constructor (Config) {\n this.config = Config;\n }\n\n send (message, config) {\n ...
javascript
chosen
[ { "from": "system", "value": "Make seeds runnable on CLI\n" }, { "from": "human", "value": "import { merge } from 'lodash'\nrequire('dotenv').load()\n\nif (!process.env.DATABASE_URL) {\n throw new Error('process.env.DATABASE_URL must be set')\n}\n\nconst url = require('url').parse(process.env.D...
javascript
chosen
[ { "from": "system", "value": "FlashVersion: Use DDG.require for 'flash_detect.js' file\n" }, { "from": "human", "value": "(function(env) {\n \"use strict\";\n \n env.ddg_spice_flash_version = function() {\n \n if(!FlashDetect) {\n return Spice.failed('flash_vers...
javascript
chosen
[ { "from": "system", "value": "Enable twopoint in Tuvero Basic\n" }, { "from": "human", "value": "/**\n * Basic presets: swiss direct matchings, round similar to chess, and ko\n * with a matched cadrage. Simple rankings\n *\n * @return Presets\n * @author Erik E. Lorenz <erik@tuvero.de>\n * @lice...
javascript
chosen
[ { "from": "system", "value": "Make maximum buffer size larger. Should perform a little better, at the expense of higher memory usage, and a higher minimum delay length.\n" }, { "from": "human", "value": "/**\n * @depends AudioletGroup.js\n */\n\nvar AudioletDestination = new Class({\n Extend...
javascript
chosen
[ { "from": "system", "value": "Remove unused dependencies and updates used dependencies\n" }, { "from": "human", "value": "Package.describe({\n name: 'sanjo:karma',\n summary: 'Integrates Karma into Meteor',\n version: '1.6.1',\n git: 'https://github.com/Sanjo/meteor-karma.git'\n})\n\nNpm.dep...
javascript
chosen
[ { "from": "system", "value": "Add handling of fn callback for render.\n" }, { "from": "human", "value": "'use strict';\n\n/*****\n * Vain\n *\n * A view-first templating engine for Node.js.\n*****/\nvar jsdom = require('jsdom'),\n $ = require('jquery')(jsdom.jsdom().createWindow()),\n snip...
javascript
chosen
[ { "from": "system", "value": "Use Ember.TextField instead of generic Ember.Component\n\nDatepicker is an input field, so it much better to use Ember.TextField.\nIt automatically gives attributes like `name`, `size`, `placeholder` and etc.\n\nThis also closes #2\n" }, { "from": "human", "value": ...
javascript
chosen
[ { "from": "system", "value": "Rework canonize plugin so that it doesn't set output names when no config\n" }, { "from": "human", "value": "const { next, hookEnd, call } = require('hooter/effects')\n\n\nfunction canonize(command) {\n let { fullName, config, options } = command\n\n if (!config) ...
javascript
chosen
[ { "from": "system", "value": "Add pattern validation to test model.\n" }, { "from": "human", "value": "define([\r\n], function (\r\n) {\r\n \r\n return {\r\n \"id\": \"TestData/SimpleTestModelSchema\",\r\n \"description\": \"A simple model for testing\",\r\n \"$schema\...
javascript
chosen
[ { "from": "system", "value": "Use single dist js file\n" }, { "from": "human", "value": "const webpack = require('webpack'),\n HtmlWebpackPlugin = require('html-webpack-plugin'),\n path = require('path'),\n babelCfg = require(\"./babel.config\"),\n paths = {\n root: path.join(...
javascript
chosen
[ { "from": "system", "value": "Fix implicit creation of global variable\n" }, { "from": "human", "value": "function forEach(array, fn) {\n for (i = 0; i < array.length; i++)\n fn(array[i], i);\n}\n\nforEach(array, function(item, i){\n\n});\n" }, { "from": "gpt", "value": "function...
javascript
chosen
[ { "from": "system", "value": ":new: Add forecast dimensions to the dashboard\n" }, { "from": "human", "value": "'use strict';\n\nangular\n .module('report-editor')\n .config(function ($stateProvider) {\n $stateProvider\n .state('dashboard.concepts.concept', {\n ...
javascript
chosen
[ { "from": "system", "value": "Fix bug for API 404 error\n" }, { "from": "human", "value": "const Router = require('express').Router(),\n Util = require('../common/util.js');\n\n// 导航栏菜单\nRouter.route('/navigation/menuTree')\n .get(function(request, response) {\n let protocal = Util.prot...
javascript
chosen
[ { "from": "system", "value": "WORK WORK CARRY MOVE MOVEx2+Bracket fixings\n" }, { "from": "human", "value": "module.exports = function () {\n StructureSpawn.prototype.createCustomCreep = \n function(energy, roleName) {\n var numberOfParts = Math.floor(energy / 350);\n var bod...
javascript
chosen
[ { "from": "system", "value": "Add logs to the test server\n" }, { "from": "human", "value": "import mongoose from 'mongoose';\nimport sinon from 'sinon';\n\nimport { dbTest } from '../src/config/database';\n\nlet isConnected;\n\nconst prepareServer = (user, done) => {\n let passportMiddleweare ...
javascript
chosen
[ { "from": "system", "value": "Implement support for setting interest level.\n" }, { "from": "human", "value": "\nfunction write(prefix, args) {\n var timestamp = (new Date()).toString();\n args.unshift(prefix, timestamp);\n console.log.apply(this, args);\n}\n\nvar debug = function() {\n writ...
javascript
chosen
[ { "from": "system", "value": "Update cookie definition to use root path\n" }, { "from": "human", "value": "export default class CookieStorage {\n constructor(storageName = '_token') {\n this.cache = {};\n this.storageName = storageName;\n }\n\n getItem(key) {\n if (this.cache[key]) {...
javascript
chosen
[ { "from": "system", "value": "Add a ci gulp task\n" }, { "from": "human", "value": "import gulp from 'gulp';\nimport defaults from 'lodash/defaults';\nimport plumber from 'gulp-plumber';\nimport webpack from 'webpack-stream';\nimport jscs from 'gulp-jscs';\nimport jshint from 'gulp-jshint';\nimp...
javascript
chosen
[ { "from": "system", "value": "Add test for local state\n" }, { "from": "human", "value": "var tape = require(\"tape\"),\n jsdom = require(\"jsdom\"),\n d3 = Object.assign(require(\"../\"), require(\"d3-selection\"));\n\n/*************************************\n ************ Components *****...
javascript
chosen
[ { "from": "system", "value": "Fix serializer test with proper argument to FTLSerializer\n" }, { "from": "human", "value": "'use strict';\n\nimport fs from 'fs';\nimport path from 'path';\n\nimport assert from 'assert';\nimport FTLParser from '../../../../src/lib/format/ftl/ast/parser';\nimport F...
javascript
chosen
[ { "from": "system", "value": "Add actions to handle posting a message\n" }, { "from": "human", "value": "import { GET_CURRENT_LISTING_SUCCESS, FETCHING_LISTING, CHANGE_CONTACT_FIELD } from '../constants';\nimport { changeCenter, addMapMarker } from './googleMapActions';\nimport { fetchCurrentLis...
javascript
chosen
[ { "from": "system", "value": "Fix mistaken comment in test\n" }, { "from": "human", "value": "'use strict';\n\nvar jf = require('../../'),\n expect = require('chai').expect,\n fs = require('fs');\n\nconst testFilePath = './' + Math.random() + '.json';\ndescribe('The initialValue', funct...
javascript
chosen
[ { "from": "system", "value": "Return our actual port to avoid some potential conflicts\n" }, { "from": "human", "value": "//test cookie passing\nvar http = require(\"http\");\nvar fs = require(\"fs\");\nvar querystring = require(\"querystring\");\n express = require('express'),\n connect =...
javascript
chosen
[ { "from": "system", "value": "Remove async library for server\n" }, { "from": "human", "value": "var fork = require('child_process').fork;\nvar async = require('async');\nvar amountConcurrentServers = process.argv[2] || 50;\nvar port = initialPortServer();\nvar servers = [];\nvar path = __dirnam...
javascript
chosen
[ { "from": "system", "value": "Indent code after changing editor to netbeans." }, { "from": "human", "value": "/*global angular*/\nangular.module('post')\n\t/**\n * @ngdoc controller\n * @name post.controller:PostMainController\n *\n * @description\n * # main post controller\n *...
javascript
chosen
[ { "from": "system", "value": "Add support for async routes\n" }, { "from": "human", "value": "/** DO NOT MODIFY **/\nimport React, { Component } from \"react\";\nimport { render } from \"react-dom\";\n\nimport { Root } from \"gluestick-shared\";\nimport routes from \"./routes\";\nimport store fr...
javascript
chosen
[ { "from": "system", "value": "[1.8] Remove tracing helper it's already in StackFrame.getStackDump\n\nhttp://code.google.com/p/fbug/source/detail?r=10854\n" }, { "from": "human", "value": "/* See license.txt for terms of usage */\n\ndefine([\n \"firebug/lib/trace\"\n],\nfunction(FBTrace) {\n\n...
javascript
chosen
[ { "from": "system", "value": "Send requests with credentials to use session\n" }, { "from": "human", "value": "import {HttpClient} from 'aurelia-http-client';\nimport {ContactModel} from 'src/models/contact-model';\n\nvar CONTACT_MANAGER_API_HOST = 'http://api-contact-manager.herokuapp.com';\nva...
javascript
chosen
[ { "from": "system", "value": "Add gulp electron and gulp clean\n" }, { "from": "human", "value": "'use strict';\n\nlet gulp = require('gulp');\nlet server = require('gulp-express');\nlet paths = {\n\tscripts: ['app.js', 'routes/**/*.js', 'public/**/*.js', 'gulpfile.js']\n};\n\ngulp.task('run', (...
javascript
chosen
[ { "from": "system", "value": "Use coverage summary rather than full coverage breakdown\n" }, { "from": "human", "value": "var gulp = require('gulp'),\n tsc = require('gulp-tsc'),\n tape = require('gulp-tape'),\n tapSpec = require('tap-spec'),\n del = require('del'),\n runSequence ...
javascript
chosen
[ { "from": "system", "value": "Add temporary selection of time range\n\nWhile we still don't have the time range filter\n" }, { "from": "human", "value": "import _ from 'lodash';\nimport {API_PATH} from 'power-ui/conf';\nimport {urlToRequestObjectWithHeaders, isTruthy} from 'power-ui/utils';\n\n/...
javascript
chosen
[ { "from": "system", "value": "Add comment about how to proceed\n" }, { "from": "human", "value": "import { createSelector } from 'reselect';\n\nimport * as dataSelectors from '../../../selectors/dataSelectors';\n\nexport const positionSettingsSelector = state => state.get('positionSettings');\n\...
javascript
chosen
[ { "from": "system", "value": "Handle null tags when getting video\n\n- Grpc doesn't allow null for fields and cassandra may return null for tags\n" }, { "from": "human", "value": "import Promise from 'bluebird';\nimport { GetVideoResponse, VideoLocationType } from './protos';\nimport { toCassand...
javascript
chosen
[ { "from": "system", "value": "Add an extra call in test script to trigger JIT\n" }, { "from": "human", "value": "//-------------------------------------------------------------------------------------------------------\n// Copyright (C) Microsoft. All rights reserved.\n// Licensed under the MIT ...
javascript
chosen
[ { "from": "system", "value": "Add tests for the request ID generation and retrieval\n" }, { "from": "human", "value": "'use strict';\n\n// mocha defines to avoid JSHint breakage\n/* global describe, it, before, beforeEach, after, afterEach */\n\nvar assert = require('../../utils/assert.js');\nva...
javascript
chosen
[ { "from": "system", "value": "Update to use extra endpoints\n" }, { "from": "human", "value": "/* eslint-disable no-console */\nconst express = require('express');\nconst bodyParser = require('body-parser');\nconst app = express();\nconst port = process.env.PORT || 3000;\n\nconst api = require('...
javascript
chosen
[ { "from": "system", "value": "Remove the comment (line already fixed)\n" }, { "from": "human", "value": "$(window).load(function () {\n var Ector = require('ector');\n ector = new Ector();\n var previousResponseNodes = null;\n var user = { username: \"Guy\"};\n var msgtpl = $('#ms...
javascript
chosen
[ { "from": "system", "value": "Move checker.configure(...) line to beforeeach\n" }, { "from": "human", "value": "var Checker = require('../lib/checker');\nvar assert = require('assert');\n\ndescribe('rules/require-blocks-on-newline', function() {\n var checker;\n beforeEach(function() {\n ...
javascript
chosen
[ { "from": "system", "value": "Fix redirect loop when no content\n" }, { "from": "human", "value": "/**\n * Main controller for Ghost frontend\n */\n\n/*global require, module */\n\nvar Ghost = require('../../ghost'),\n api = require('../api'),\n\n ghost = new Ghost(),\n frontendControll...
javascript
chosen
[ { "from": "system", "value": "Add one more test to init travis\n" }, { "from": "human", "value": "/**\n * Created by alex on 11/30/15.\n */\n\ndescribe('ColorFinder class', function () {\n\n it('should get default config value', function () {\n expect(ColorFinder.getConfig('maxColorVal...
javascript
chosen
[ { "from": "system", "value": "[TEST] Add example test for sending payment.\n" }, { "from": "human", "value": "var RippleGateway = require('../../lib/http_client.js').Gateway;\nvar crypto = require('crypto');\nvar assert = require('assert');\nfunction rand() { return crypto.randomBytes(32).toStri...
javascript
chosen
[ { "from": "system", "value": "Change post json handling on success\n" }, { "from": "human", "value": "\nvar router = require( 'express' ).Router()\nvar Post = require( '../../models/post' )\nvar websockets = require( '../../websockets' )\n\nrouter.get( '/', function( req, res, next ) {\n Post...
javascript
chosen
[ { "from": "system", "value": "Add specs for the sync method of the model prototype\n" }, { "from": "human", "value": "var Barista = require(process.cwd() + '/lib/barista.js'),\n Backbone = require('backbone'),\n ExampleApp = require(process.cwd() + '/spec/ex1/exampleApp1.js'),\n co...
javascript
chosen
[ { "from": "system", "value": "Change to use in-memory SQLite\n" }, { "from": "human", "value": "module.exports = {\n database: 'factory-girl-sequelize',\n options: {\n dialect: 'sqlite',\n storage: 'test/tmp/test.db',\n logging: null\n }\n};\n" }, { "from": "gpt", "value"...
javascript
chosen
[ { "from": "system", "value": "Add connect function to mockBluetooth\n" }, { "from": "human", "value": "/* global navigator, Promise*/\n\nimport Ember from 'ember';\n\nconst Mock = Ember.Object.extend({\n available: true,\n name: null,\n value: null,\n\n isAvailable(value) {\n return this....
javascript
chosen
[ { "from": "system", "value": "Update amoCDN for disco stage config\n" }, { "from": "human", "value": "const amoCDN = 'https://addons-cdn.allizom.org';\nconst staticHost = 'https://addons-discovery-cdn.allizom.org';\n\nmodule.exports = {\n staticHost,\n\n CSP: {\n directives: {\n script...
javascript
chosen
[ { "from": "system", "value": "Use every() instead of reduce()\n" }, { "from": "human", "value": "export default function areObjectValuesDefined(obj) {\n return Object.keys(obj)\n .map((key) => obj[key])\n .reduce((prev, value) => {\n return prev && value !== undefined...
javascript
chosen
[ { "from": "system", "value": "Test that a broken function binding is detected when testing interop, and halts deployment.\n" }, { "from": "human", "value": "\nfunction EmscriptenPrecacheApi(apiPointer, cwrap, runtime) {\n\n var _apiPointer = apiPointer;\n var _beginPrecacheOperation = null...
javascript
chosen
[ { "from": "system", "value": "Remove references to filter tests\n" }, { "from": "human", "value": "/*\n * Copyright 2011 Johannes M. Schmitt <schmittjoh@gmail.com>\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with th...
javascript
chosen
[ { "from": "system", "value": "Fix legacy upgrade with missing instance\n\nIf the user is trying to upgrade their account and for some reason the\ninstance has been deleted in the meantime then we simply redirect to the\nmain listing of instances.\n" }, { "from": "human", "value": "\"use strict\"...
javascript
chosen
[ { "from": "system", "value": "Return the stream for each task\n" }, { "from": "human", "value": "var gulp = require('gulp');\nvar jshint = require('gulp-jshint');\nvar jasmine = require('gulp-jasmine');\nvar uglify = require('gulp-uglify');\nvar rename = require('gulp-rename');\n\ngulp.task('lin...
javascript
chosen
[ { "from": "system", "value": "Add window and document to globals for tests\n" }, { "from": "human", "value": "var gulp = require('gulp'),\n eslint = require('gulp-eslint'),\n mocha = require('gulp-mocha'),\n flow = require('gulp-flowtype'),\n babel = require('babel/register');\n\ngul...
javascript
chosen
[ { "from": "system", "value": "Use the Dough README on docs landing page\n" }, { "from": "human", "value": "var gulp = require('gulp'),\n jsdoc = require('gulp-jsdoc'),\n ghPages = require('gulp-gh-pages'),\n docsSrcDir = './assets/js/**/*.js',\n docsDestDir = './docs/js',\n jsDocT...
javascript
chosen
[ { "from": "system", "value": "Split code into lib subfolder\n" }, { "from": "human", "value": "var gulp = require('gulp');\n\nvar files = ['index.js', 'test/*.js', 'gulpfile.js'];\n\ngulp.task('lint', function (done) {\n var eslint = require('gulp-eslint');\n return gulp.src(files)\n .pipe(...
javascript
chosen
[ { "from": "system", "value": "Fix name to consistent uservices\n" }, { "from": "human", "value": "var gulp= require('gulp')\nvar dts = require('dts-generator');\n\ngulp.task('default', function(){\n dts .generate({\n name: 'uservice',\n baseDir: './module',\n excludes: ['./typings/nod...
javascript
chosen