conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "Add help command\nAdd github and npm to commands\n" }, { "from": "human", "value": "import Bot from 'telegram-api/build';\nimport Message from 'telegram-api/types/Message';\nimport subscribe from './commands/subscribe';\nimport doc from './commands/doc';\n\nlet bot ...
javascript
chosen
[ { "from": "system", "value": "Use the 'should expose some global scope' test\n\nAs seen in examples when there doesn't seem to be anything else to test." }, { "from": "human", "value": "'use strict';\n\n(function() {\n\n describe(\"voteeHome\", function() {\n\n beforeEach(function() {\...
javascript
chosen
[ { "from": "system", "value": "Revert \"Display the tag/facet of the selected term in the input\"\n\nThis reverts commit f85613a9af711a4aeb27b3bbe6efe8592e8318ce.\n" }, { "from": "human", "value": "/*\r\njavascript in this file controls the html page demonstrating the autosubject functionality\r\...
javascript
chosen
[ { "from": "system", "value": "Add Email field to User\n" }, { "from": "human", "value": "var mongoose = require('mongoose');\nvar Schema = mongoose.Schema;\n\nvar UserSchema = new Schema(\n{\n lastName : String,\n firstName : String,\n username : String,\n passwordHash : ...
javascript
chosen
[ { "from": "system", "value": "Update Hungarian translation for new strings\n\nUpdated Hungarian translation." }, { "from": "human", "value": "define(function () {\n // Hungarian\n return {\n errorLoading: function () {\n return 'Az eredmények betöltése nem sikerült.';\n },\n inpu...
javascript
chosen
[ { "from": "system", "value": "Copy interesting tweets to control channel\n" }, { "from": "human", "value": "module.exports = {\n events: {\n udp: function (bot, msg, rinfo) {\n if (rinfo.address === bot.config.get('yakc.ip')) {\n bot.fireEvents('yakc', msg.toString(), rinfo)\n ...
javascript
chosen
[ { "from": "system", "value": "Make fetch URL less specific\n" }, { "from": "human", "value": "/* global fetch */\n\nimport React from 'react';\nimport TotalWidget from './TotalWidget';\nimport NextTripWidget from './NextTripWidget';\nimport TripTable from './TripTable';\nimport Map from './Map';...
javascript
chosen
[ { "from": "system", "value": "Update access request for public gists\n" }, { "from": "human", "value": "Accounts.ui.config({\n requestPermissions: {\n github: ['user', 'repo', 'gist']\n }\n})\n// \n// Accounts.onLogin(function () {\n// Router.go('/profile')\n// })\n\nTemplate.login.helper...
javascript
chosen
[ { "from": "system", "value": "Select first nav li by default\n" }, { "from": "human", "value": "$(document).ready(function(){\n\n // Include common elements\n $(\"#footer\").load(\"common/footer.html\");\n $(\"#header\").load(\"common/header.html\", function()\n {\n // Add current navigat...
javascript
chosen
[ { "from": "system", "value": "Make footnote textarea expand upon focus\n" }, { "from": "human", "value": "var updatePreviewTarget = function(data, status) {\n $('.spinner').hide();\n $('#preview-target').html(data);\n renderLatexExpressions();\n}\n\nvar renderLatexExpressions = function() {\n...
javascript
chosen
[ { "from": "system", "value": "Use casper.wait to wait until image are loaded and transitioned\n" }, { "from": "human", "value": "var casper = require('casper').create();\n\n// casper.on('remote.message', function(message) {\n// console.log(message);\n// });\n\nvar out_dir = 'static/tmp/';\nv...
javascript
chosen
[ { "from": "system", "value": "Remove reference to deleted dribbbleApi.js\n" }, { "from": "human", "value": "'use strict';\nvar app = require('app');\nvar dribbbleapi = require('./dribbbleapi');\n\nvar mainWindow = null;\nvar dribbbleData = null;\n\nvar menubar = require('menubar')\n\nvar mb = me...
javascript
chosen
[ { "from": "system", "value": "Remove unneeded dependency lint overrides\n" }, { "from": "human", "value": "/* eslint-env node */\n'use strict';\n\nmodule.exports = {\n allowedVersions: {\n 'ember-in-element-polyfill': '*',\n 'ember-get-config': '0.3.0 || 0.4.0 || 0.5.0',\n '@embroider/...
javascript
chosen
[ { "from": "system", "value": "Fix selector to only match list items\n" }, { "from": "human", "value": "// ==UserScript==\n// @name Rightmove Enhancement Suite\n// @namespace https://github.com/chigley/\n// @description Keyboard shortcuts\n// @include http://www.rightmove.co.uk/*\n//...
javascript
chosen
[ { "from": "system", "value": "Return a promise in the searchModel method\n" }, { "from": "human", "value": "// Ember!\nimport Ember from 'ember';\nimport SearchRoute from 'yebo-ember-storefront/mixins/search-route';\n\n/**\n * Taxons show page\n * This page shows products related to the current ...
javascript
chosen
[ { "from": "system", "value": "Add functionality for filling in checkboxes" }, { "from": "human", "value": "// ***********************************************\n// This example commands.js shows you how to\n// create various custom commands and overwrite\n// existing commands.\n//\n// For more com...
javascript
chosen
[ { "from": "system", "value": "Add sample data example to memories screen for UI dev\n" }, { "from": "human", "value": "import React from \"react\";\nimport {\n Text\n} from \"react-native\";\n\nexport default class MemoriesScreen extends React.Component {\n render() {\n return (\n <Tex...
javascript
chosen
[ { "from": "system", "value": "Implement win game prompt after all bricks destroyed\n" }, { "from": "human", "value": "var endGame = function(game){\n\n if (game.player.lives > 0) {\n missBall(game.ball, game.player)\n } else if (game.player.lives <= 0 ){\n gameOver()\n }\n}\n\nvar missB...
javascript
chosen
[ { "from": "system", "value": "Add focus on the first radio button\n" }, { "from": "human", "value": "document.addEventListener('DOMContentLoaded', function() {\n var searchButton = document.getElementById('search');\n\n searchButton.addEventListener('click', (function() {\n var query = docu...
javascript
chosen
[ { "from": "system", "value": "Add update to usermodel upon signup with register controller\n" }, { "from": "human", "value": "(function(){\n\n'use strict';\n\nangular\n .module('secondLead')\n \n .controller('RegisterCtrl', [\n 'Restangular',\n '$state', \n 'store',\n 'UserModel',\...
javascript
chosen
[ { "from": "system", "value": "Adjust user agent for new keyed protocol.\n" }, { "from": "human", "value": "var cadence = require('cadence')\nvar util = require('util')\n\nfunction UserAgent (ua) {\n this._ua = ua\n}\n\nUserAgent.prototype.send = cadence(function (async, properties, body) {\n ...
javascript
chosen
[ { "from": "system", "value": "Fix logging of errors, Karma expects a string. Reset errors after every cycle.\n" }, { "from": "human", "value": "(function() {\n\n var global = this;\n var karma = global.__karma__;\n\n karma.start = function(runner) {\n var suites = global.__karma_benchmark_...
javascript
chosen
[ { "from": "system", "value": "Replace `setTimeout` call with 2-args version\n" }, { "from": "human", "value": "import middleware from './internal/middleware'\nexport default middleware\n\n\nexport { runSaga } from './internal/runSaga'\nexport { END, eventChannel, channel } from './internal/chann...
javascript
chosen
[ { "from": "system", "value": "Make events of GeoNames data\n" }, { "from": "human", "value": "(function(app) {\n 'use strict';\n\n var dom = app.dom || require('../dom.js');\n\n var GeoNamesData = function(url) {\n this._url = url;\n this._loadPromise = null;\n this._data = [];\n };...
javascript
chosen
[ { "from": "system", "value": "Make songs-list a list of list-items\n" }, { "from": "human", "value": "import React from 'react';\nimport { BaseViewComponent } from '../higher-order/index.js';\n\nclass RedditPosts extends BaseViewComponent {\n constructor(props) {\n super(props);\n }\n\n re...
javascript
chosen
[ { "from": "system", "value": "Fix dropdown width in adresses settings\n" }, { "from": "human", "value": "import React from 'react';\nimport PropTypes from 'prop-types';\nimport { Link } from 'react-router-dom';\nimport { msgid, c } from 'ttag';\nimport { SimpleDropdown, DropdownMenu } from 'reac...
javascript
chosen
[ { "from": "system", "value": "Update tslint block to use new API\n" }, { "from": "human", "value": "/**\n * Tslint webpack block.\n *\n * @see https://github.com/wbuchwalter/tslint-loader\n */\n\nmodule.exports = tslint\n\n/**\n * @param {object} [options] See https://github.c...
javascript
chosen
[ { "from": "system", "value": "test: Update list view UI test\n" }, { "from": "human", "value": "context('List View', () => {\n\tbefore(() => {\n\t\tcy.login('Administrator', 'qwe');\n\t\tcy.visit('/desk');\n\t\tcy.window().its('frappe').then(frappe => {\n\t\t\tfrappe.call(\"frappe.tests.test_uti...
javascript
chosen
[ { "from": "system", "value": "Update service name to Dart crossing charge for testing" }, { "from": "human", "value": "// Use this file to change prototype configuration.\n\n// Note: prototype config can be overridden using environment variables (eg on heroku)\n\nmodule.exports = {\n // Service...
javascript
chosen
[ { "from": "system", "value": "Fix for active class not being set properly\n\n" }, { "from": "human", "value": "scms.create('ProductVariationsViewBridge', function(){\n return {\n attachEvents:function () {\n var self = this;\n\n $(this.viewNode, '.product-variatio...
javascript
chosen
[ { "from": "system", "value": "Make it easy to add validators.\n" }, { "from": "human", "value": "var ContextElement = require('./contextElement')\n\nmodule.exports = function (el, cb) {\n\tif ( ! (el instanceof ContextElement)) return cb('Given element is not a ContextElement.')\n\n\tvar attribu...
javascript
chosen
[ { "from": "system", "value": "Change num of planned tests.\n" }, { "from": "human", "value": "const numberOfPlannedTests = 6\ncasper.test.begin('test-simple-image-resize', numberOfPlannedTests, (test) => {\n casper.start(`http://${testhost}`, function () {\n })\n\n casper.then(function () {\n...
javascript
chosen
[ { "from": "system", "value": "Load modules from modules dir\n" }, { "from": "human", "value": "/**\n * _____ __\n * / ___// /_ _____\n * \\__ \\/ / / / / _ \\\n * ___/ / / /_/ / __/\n * /____/_/\\__, /\\___/\n * /____/\n * Copyright 2017 Slye Development Team. All Rights Re...
javascript
chosen
[ { "from": "system", "value": "Modify listview styles for search listview and general margin\n" }, { "from": "human", "value": "// @flow\n\nimport { StyleSheet } from 'react-native'\nimport { ApplicationStyles, Metrics, Colors } from '../../Themes/'\n\nexport default StyleSheet.create({\n ...App...
javascript
chosen
[ { "from": "system", "value": "Add url to contact form\n" }, { "from": "human", "value": "// Here be the site javascript!\n\n$(document).ready(function () {\n $(\".button-collapse\").sideNav();\n $('.scrollspy').scrollSpy();\n $(\"form\").submit(function (event) {\n event.preventDe...
javascript
chosen
[ { "from": "system", "value": "Remove jQuery ajax CSRF headers setting\n\nThis should not be done by a library, this is standard Django configuration that should be in any project that uses ajax posting.\r\nAlso, this conflicts with custom CSRF settings, like different cookie name." }, { "from": "hum...
javascript
chosen
[ { "from": "system", "value": "Update up to change in normalize\n" }, { "from": "human", "value": "'use strict';\n\nvar normalize = require('../../Document/prototype/normalize');\n\nmodule.exports = function (child/*, …child*/) {\n\tvar oldNodes = this.childNodes, df, nu, i = 0, old;\n\tdf = norm...
javascript
chosen
[ { "from": "system", "value": "Fix `missing rule name` eslint conversion error\n" }, { "from": "human", "value": "/**\n* @fileoverview Translation for `requireSpaceAfterKeywords` (JSCS) to ESLint\n* @author Breno Lima de Freitas <https://breno.io>\n* @copyright 2016 Breno Lima de Freitas. All rig...
javascript
chosen
[ { "from": "system", "value": "Add test helper to set default values on variables\n" }, { "from": "human", "value": "beforeEach(function() {\n this.addMatchers({\n toBeLessThan: function(expected) {\n return this.actual < expected;\n },\n toHaveAllValuesInRange: function (low, high...
javascript
chosen
[ { "from": "system", "value": "Leverage util.format for printf-style logging\n" }, { "from": "human", "value": "var _ = require('lodash')\nvar globFirst = require('./glob-first')\nvar log = require('../run/log')\nvar path = require('path')\nvar async = require('async')\n\nvar isExecutable = requi...
javascript
chosen
[ { "from": "system", "value": "Save token to localStorage only if it changes\n" }, { "from": "human", "value": "// TODO consider using https://babeljs.io/docs/plugins/transform-runtime/ instead of babel-polyfill\nimport \"babel-polyfill\"\nimport React from \"react\"\nimport { render } from \"rea...
javascript
chosen
[ { "from": "system", "value": "feat: Add parsers as a default.\n\n * Add parser middleware for parsing `application/json`.\n * Add parser middleware for parsing `application/x-www-form-urlencoded`.\n\nBREAKING CHANGE: `req.body` will not longer be `undefined`,\n will include a parsed json instead with the re...
javascript
chosen
[ { "from": "system", "value": "Add ES6 examples for component creation\n" }, { "from": "human", "value": "/* eslint-disable no-console */\nconsole.log('hi');\n// Old ES5 way of creating a Class Component\n// var HelloWorld = React.createClass({\n// render: function() {\n// return (\n// ...
javascript
chosen
[ { "from": "system", "value": "Add support for server side Immutable DevTools\n\nFixes issue #31" }, { "from": "human", "value": "import createFormatters from './createFormatters';\n\n// Check for globally defined Immutable and add an install method to it.\nif (typeof Immutable !== \"undefined\")...
javascript
chosen
[ { "from": "system", "value": "Use ref instead of findDOMNode\n" }, { "from": "human", "value": "import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport ReactDOM from 'react-dom';\nimport Odometer from 'odometer';\n\nexport default class ReactOdometer extends Compon...
javascript
chosen
[ { "from": "system", "value": "Add validation for city and country\n" }, { "from": "human", "value": "const needle = require('needle');\nconst config = require('../config');\nconst _ = require('lodash');\n\nconst weather = {\n getWeatherInfo: function(req, res){\n //TODO add country/cit...
javascript
chosen
[ { "from": "system", "value": "Make function name more descript\n" }, { "from": "human", "value": "\"use strict\";\nlet db = require('./db');\n\nfunction generateStub(length) {\n let result = \"\"\n for(let i = 0; i < length; i++) {\n let value = Math.round(Math.random() * 35)\n if (value...
javascript
chosen
[ { "from": "system", "value": "Update skeleton app default dependencies\n" }, { "from": "human", "value": "export default {\n connect: '3.5.0',\n 'server-destroy': '1.0.1',\n 'connect-modrewrite': '0.9.0',\n winston: '2.3.0',\n 'find-port': '2.0.1',\n rimraf: '2.5.4',\n shell...
javascript
chosen
[ { "from": "system", "value": "Remove loading dimmer briefly *after* applying theme.\n\nOtherwise, the page can briefly flash in full color before the theme is applied.\n" }, { "from": "human", "value": "\nvar themes = [\n \"faded\",\n \"grayscale\",\n \"sepia\",\n \"wide-blur\",\n \"overexp...
javascript
chosen
[ { "from": "system", "value": "Update buildProviderAssetPath unit test to do something useful\n" }, { "from": "human", "value": "import buildProviderAssetPath from 'preprint-service/utils/build-provider-asset-path';\nimport { module, test } from 'qunit';\n\nmodule('Unit | Utility | build provider...
javascript
chosen
[ { "from": "system", "value": "Move reset to on stop\n" }, { "from": "human", "value": "let videoImage = document.getElementById('video_image');\nvideoImage.src = `http://${document.domain}:8080/?action=stream`;\nlet cameraJoystick = {\n zone: videoImage,\n color: 'red'\n};\nlet cameraJoys...
javascript
chosen
[ { "from": "system", "value": "Add verbose=true flag to toHold matcher\n" }, { "from": "human", "value": "beforeEach(function () {\n\tthis.addMatchers({\n\t\t// Expects that property is synchronous\n\t\ttoHold: function () {\n\t\tvar actual = this.actual;\n\t\tvar notText = this.isNot ? \" not\" ...
javascript
chosen
[ { "from": "system", "value": "Make IRC handler a bit less verbose\n" }, { "from": "human", "value": "/* eslint no-console: 0 */\n'use strict';\n\nconst irc = require('irc');\n\nconst server = process.env.IRC_SERVER;\nconst user = process.env.IRC_USER;\nconst channel = process.env.IRC_CHANNEL;\n\...
javascript
chosen
[ { "from": "system", "value": "Update regex\nOnly match if /r/* is the beginning of the string or if it is prefixed by a whitespace\n" }, { "from": "human", "value": "(function(Reddit) {\n\t\"use strict\";\n\tvar anchor = '<a href=\"http://reddit.com$1\" target=\"_blank\">$1</a>';\n\n\tReddit.par...
javascript
chosen
[ { "from": "system", "value": "Add value constants to Vote model\n" }, { "from": "human", "value": "var mongoose = require('mongoose');\nvar Schema = mongoose.Schema;\n\nvar VoteSchema = new Schema(\n{\n value : Number,\n created : {type : Date, default : Date.now},\n lastEdi...
javascript
chosen
[ { "from": "system", "value": "Use PhantomJS for e2e tests" }, { "from": "human", "value": "exports.config = {\n specs: [\n \"./e2e-tests/**/*.tests.js\"\n ],\n exclude: [],\n maxInstances: 10,\n sync: true,\n logLevel: \"result\",\n coloredLogs: true,\n screenshotPath: \"./error-scree...
javascript
chosen
[ { "from": "system", "value": "Make sure to wait for a free limit even after delay\n\nWe have to (possibly) wait again after initially delaying the request\nwhen reaching the API Limit.\nReason being that more requests get piled up than the next limit is\nallowing to get through. By waiting for the limit aga...
javascript
chosen
[ { "from": "system", "value": "GF-4661: Apply MVC to older one\n\nEnyo-DCO-1.1-Signed-off-by: David Um <david.um@lge.com>\n" }, { "from": "human", "value": "enyo.kind({\n name: \"moon.sample.photos.PhotoDetailNarrowSample\",\n kind : \"moon.Panel\",\n classes: \"photo-detail\",\n fit:...
javascript
chosen
[ { "from": "system", "value": "Add on.('close') to clear node status on Deploy\n" }, { "from": "human", "value": "module.exports = function (RED) {\n var alasql = require('alasql');\n\n function AlasqlNodeIn(config) {\n RED.nodes.createNode(this, config);\n var node = this;\n ...
javascript
chosen
[ { "from": "system", "value": "Add constants for capture valid\n" }, { "from": "human", "value": "export const SOCKET_URL = 'wss://ws.onfido.com:9876'\nexport const XHR_URL = 'https://api.onfido.com'\n\nexport const DOCUMENT_CAPTURE = 'DOCUMENT_CAPTURE'\nexport const FACE_CAPTURE = 'FACE_CAPTURE'...
javascript
chosen
[ { "from": "system", "value": "Make common chunk (and sourcemap) work\n" }, { "from": "human", "value": "const CopyPlugin = require('copy-webpack-plugin');\nconst ExampleBuilder = require('./example-builder');\nconst fs = require('fs');\nconst path = require('path');\n\nconst src = path.join(__di...
javascript
chosen
[ { "from": "system", "value": "Update the Chrome extension more aggressively\n\nRequest a chrome update when the extension starts and reload the\nextension when it's installed.\n" }, { "from": "human", "value": "(function () {\n 'use strict';\n\n var browserExtension = new h.HypothesisChromeExt...
javascript
chosen
[ { "from": "system", "value": "Implement \"shouldComponentUpdate\" method to minimise noop render calls.\n" }, { "from": "human", "value": "\"use strict\";\n\nimport React from 'react';\nlet { PropTypes } = React;\n\nlet Video = React.createClass({\n\n propTypes: {\n src: PropTypes.string.isR...
javascript
chosen
[ { "from": "system", "value": "Remove unused array of model\n" }, { "from": "human", "value": "var MaapError = require(\"./utils/MaapError.js\");\nconst EventEmitter = require('events');\nconst util = require('util');\n\n/**\n * Set dsl's store and point to access at the any engine defined in Maa...
javascript
chosen
[ { "from": "system", "value": "Use ok/notOk instead of assert\n\nnotOk(condition) is more apparent than assert(!condition).\nUse ok/notOk to be obvious and consistent.\n" }, { "from": "human", "value": "var requirejs = require('requirejs');\nvar test = require('tape');\n\nrequirejs.config({\n ba...
javascript
chosen
[ { "from": "system", "value": "Update initial unit tests to use Nock\n" }, { "from": "human", "value": "var config = require('./config');\nvar should = require('should');\nvar nock = require('nock');\nvar up = require('../index')(config);\n\nvar baseApi = nock('https://jawbone.com:443');\n\ndescr...
javascript
chosen
[ { "from": "system", "value": "Add enumerables, inherited props tests\n" }, { "from": "human", "value": "'use strict';\n\nvar expect = require('chaijs/chai').expect;\nvar entries = require('..');\n\ndescribe('entries', function() {\n it('produce a nested array of key-value pairs', function() {\n...
javascript
chosen
[ { "from": "system", "value": "Remove test for doc names & descriptions\n" }, { "from": "human", "value": "'use strict';\n\nvar docs = require('../docs/docs');\nvar expect = require('chai').expect;\nvar sinon = require('sinon');\nvar stub = sinon.stub;\nvar utils = require('./helpers/utils');\nva...
javascript
chosen
[ { "from": "system", "value": "Add brackets to end state\n" }, { "from": "human", "value": "'use strict';\n\nvar pathwayApp = angular.module('pathwayApp', ['ui.router', 'templates', 'Devise', 'ngCookies']);\n\npathwayApp.config(function($stateProvider, $urlRouterProvider, $locationProvider) {\n ...
javascript
chosen
[ { "from": "system", "value": "Add second argument to render() method of markdown parser\n" }, { "from": "human", "value": "\"use strict\";\n\nvar resolveItemText = require('./resolve_item_text')\n , makeInlineCitation = require('./make_inline_citation')\n , makeBibliographyEntry = require('./m...
javascript
chosen
[ { "from": "system", "value": "Use capture set to true in onclick event\n" }, { "from": "human", "value": "document.getElementById(\"ayuda\").setAttribute(\"aria-current\", \"page\");\n\nfunction prueba() {\n\talert(\"prueba\");\n}\n\nvar aside = document.getElementById(\"complementario\");\nvar ...
javascript
chosen
[ { "from": "system", "value": "Add ability to get wireless state of a device\n" }, { "from": "human", "value": "\n/**\n * Management of a device. Supports quering it for information and changing\n * the WiFi settings.\n */\nclass DeviceManagement {\n\tconstructor(device) {\n\t\tthis.device = devi...
javascript
chosen
[ { "from": "system", "value": "Throw an error if you don't pass a secret to verifyToken hook\n" }, { "from": "human", "value": "import jwt from 'jsonwebtoken';\nimport errors from 'feathers-errors';\n\n/**\n * Verifies that a JWT token is valid\n * \n * @param {Object} options - An options objec...
javascript
chosen
[ { "from": "system", "value": "Fix parsing bug in CD server.\n" }, { "from": "human", "value": "// Continuous delivery server\nconst { spawn } = require('child_process')\nconst { resolve } = require('path')\nconst { createServer } = require('http')\nconst { parse } = require('qs')\n\nconst hostna...
javascript
chosen
[ { "from": "system", "value": "Fix incorrect url for pie charts.\n" }, { "from": "human", "value": "angular.module(\"Prometheus.controllers\").controller('PieCtrl',\n [\"$scope\", \"$http\",\n ...
javascript
chosen
[ { "from": "system", "value": "Add PostSum type. This is post summary for list view\n" }, { "from": "human", "value": "/* @flow */\n'use babel';\n\nexport type Post = {\n title: string,\n content: string,\n postCreated : any,\n postPublished: string,\n lastUpdated: string,\n sta...
javascript
chosen
[ { "from": "system", "value": "Fix bug in profile page import\n" }, { "from": "human", "value": "$(function() {\n // only run if the correct page\n if (!($('body').hasClass('students') && $('body').hasClass('show'))) return;\n\n // imports\n var createEl = window.shared.ReactHelpers.createEl;...
javascript
chosen
[ { "from": "system", "value": "Make test results not sticky\n" }, { "from": "human", "value": "// CHANGELOG check\nconst hasAppChanges = _.filter(git.modified_files, function(path) {\n return _.includes(path, 'lib/');\n}).length > 0\n\nif (hasAppChanges && _.includes(git.modified_files, \"CHANGE...
javascript
chosen
[ { "from": "system", "value": "Fix EmberComponent prop type for Ember 2.11\n" }, { "from": "human", "value": "/**\n * The PropTypes.EmberComponent validator\n */\n\nimport Ember from 'ember'\nconst {typeOf} = Ember\n\nimport logger from '../logger'\n\nexport default function (ctx, name, value, de...
javascript
chosen
[ { "from": "system", "value": "Tweak heroku build to put it into production mode\n" }, { "from": "human", "value": "require('./doBuild');\nrequire('./server');\n" }, { "from": "gpt", "value": "var build = require('./build');\n\nbuild()\n .catch(function(err) {\n require('trace');\...
javascript
chosen
[ { "from": "system", "value": "Update clock every couple of seconds\n" }, { "from": "human", "value": "import Ember from 'ember';\nimport moment from 'moment';\n\nexport default Ember.Component.extend({\n // TODO update time regularly\n\n classNames: ['component', 'clock'],\n timeFormat: '24h'...
javascript
chosen
[ { "from": "system", "value": "Make Transfer Consistent w/ Views\n" }, { "from": "human", "value": "import * as http_data from \"./http-data\";\nimport * as urlModule from \"url\";\nconst transferrers = {};\n\nfunction transfer(request) {\n // url - the resource URI to send a message to\n // op...
javascript
chosen
[ { "from": "system", "value": "Delete button enabled on the right occasions.\n" }, { "from": "human", "value": "\"use strict\";\n\n/*global module, require*/\n\nvar modalDialogueFactory = require(\"./processes/modal-dialogue.js\"),\n commentFactory = require(\"./accordion-comment.js\"),\n\n ...
javascript
chosen
[ { "from": "system", "value": "Introduce `generate` and `regenerate` methods\n" }, { "from": "human", "value": "// Not to mix with `DataSnapshots` class which is about different thing\n// (serialized list views updated reactively)\n//\n// This one is about snaphots of data made in specific moment...
javascript
chosen
[ { "from": "system", "value": "Refactor duplication out of tests." }, { "from": "human", "value": "/* global describe, it */\n\nimport assert from 'assert';\nimport {KATAS_URL, URL_PREFIX} from '../src/config.js';\nimport GroupedKata from '../src/grouped-kata.js';\n\ndescribe('load ES6 kata data'...
javascript
chosen
[ { "from": "system", "value": "Update due to the plugin split into two functions getAppVersion.getVersionNumber() and getAppVersion.getVersionCode() to return build number\n" }, { "from": "human", "value": "// install : cordova plugin add https://github.com/whiteoctober/cordova-plugin-app-v...
javascript
chosen
[ { "from": "system", "value": "Fix star image from advanced search in javascript\n" }, { "from": "human", "value": "define('app/views/image_list_item', [\n 'text!app/templates/image_list_item.html','ember'],\n /**\n *\n * Image List Item View\n *\n * @returns Class\n */\...
javascript
chosen
[ { "from": "system", "value": "Update tests to reflect addition of list prompts and compiler list in generator.\n" }, { "from": "human", "value": "/*global describe, beforeEach, it*/\n'use strict';\n\nvar path = require('path');\nvar helpers = require('yeoman-generator').test;\n\n\ndescribe('b...
javascript
chosen
[ { "from": "system", "value": "Create an overlay to cover the level for the retry menu\n" }, { "from": "human", "value": "'use strict';\n\nconst textUtil = require('../utils/text');\n\nmodule.exports = {\n init(nextLevelId, cameraPosition) {\n this.nextLevelId = nextLevelId;\n this.came...
javascript
chosen
[ { "from": "system", "value": "Throw error if an expected env var is not set.\n" }, { "from": "human", "value": "\n// Used to assign stage-specific env vars in our CI setup\n// to the env var names used in app code.\n\n// All env vars we want to pick up from the CI environment.\nconst envVars = [...
javascript
chosen
[ { "from": "system", "value": "Fix db box to hide itself on successful change\n" }, { "from": "human", "value": "_r(function (app) {\n if ( ! window.app.views.hasOwnProperty('db')) {\n app.views.db = {};\n }\n \n /**\n * Database selection box\n */\n app.views.db.box = app.base.formVi...
javascript
chosen
[ { "from": "system", "value": "Check that options is not empty\n" }, { "from": "human", "value": "// Copyright 2012 Mark Cavage, Inc. All rights reserved.\n\nvar jsonParser = require('./json_body_parser');\nvar formParser = require('./form_body_parser');\nvar multipartParser = require('./multipa...
javascript
chosen
[ { "from": "system", "value": "Switch browser list when running in Travis\n" }, { "from": "human", "value": "module.exports = function(config) {\n const files = [\n {\n pattern: 'browser/everything.html',\n included: false,\n served: true,\n },\n {\n pattern: 'browse...
javascript
chosen
[ { "from": "system", "value": "Revert \"chore: disable sauce tests for now\"\n\nThis reverts commit 28a0a9db5263bb5408507f520b6fe6aa7404b13b.\n" }, { "from": "human", "value": "const options = {\n frameworks: ['kocha', 'browserify'],\n files: [\n 'packages/karma-kocha/__tests__/*.js'\n ],\n...
javascript
chosen
[ { "from": "system", "value": "Remove Safari from automated tests\n" }, { "from": "human", "value": "/* global module:false */\nmodule.exports = function (config) {\n config.set({\n basePath: '',\n\n frameworks: ['mocha', 'chai'],\n\n reporters: ['dots', 'progress'],\n\n browsers: ['...
javascript
chosen
[ { "from": "system", "value": "Revert \"chore: test timeout increase\"\n\nThis reverts commit 844e5e87baa3b27ec0da354805d7c29f46d219d9.\n" }, { "from": "human", "value": "const base = require('skatejs-build/karma.conf');\nmodule.exports = (config) => {\n base(config);\n\n config.files = [\n ...
javascript
chosen
[ { "from": "system", "value": "Add Cobertura Test coverage output\n" }, { "from": "human", "value": "module.exports = {\n \"modulePaths\": [\n \"<rootDir>/app\",\n \"<rootDir>/node_modules\"\n ],\n \"moduleFileExtensions\": [\n \"js\",\n \"json\"\n ],\n ...
javascript
chosen
[ { "from": "system", "value": "Allow data URIs to be set as the new tab page\n" }, { "from": "human", "value": "/*global chrome,document,window */\n(function init(angular) {\n \"use strict\";\n try {\n chrome.storage.local.get([\"url\", \"tab.selected\", \"always-tab-update\"], funct...
javascript
chosen
[ { "from": "system", "value": "Fix this logging n stuff\n" }, { "from": "human", "value": "const Command = require('../structures/Command');\nconst snekfetch = require('snekfetch');\nconst { inspect } = require('util');\n\nclass PostCommand extends Command {\n\tconstructor() {\n\t\tsuper({\n\t\t\...
javascript
chosen
[ { "from": "system", "value": "Correct path for index html file\n" }, { "from": "human", "value": "import path from 'path';\nimport fs from 'fs';\n\nexport function requestHandler (req, res) {\n const indexPagePath = path.resolve(__dirname + '/..') + '/index.html';\n fs.readFile(indexPagePath, ...
javascript
chosen