conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "Add confirm callback to example\n" }, { "from": "human", "value": "\nvar starsky = require('..');\n\nsetInterval(function () {\n starsky.publish('starsky.test', {\n subject: 'test message'\n });\n}, 1000);\n\nstarsky.connect();" }, { "from": "gpt", ...
javascript
chosen
[ { "from": "system", "value": "Add support to the contact list middleware for contact name\n" }, { "from": "human", "value": "const { pick, mapValues, isArray, pickBy, get } = require('lodash')\n\nconst { search } = require('../../search/services')\nconst { transformApiResponseToSearchCollection ...
javascript
chosen
[ { "from": "system", "value": "Add 'votes' field to Profile model\n" }, { "from": "human", "value": "// Profile Model\nmodule.exports = function(sequelize, DataTypes) {\n var Profile = sequelize.define('Profile', {\n tagLine: {\n type: DataTypes.STRING,\n allowNull: false\n },\n ...
javascript
chosen
[ { "from": "system", "value": "Remove unused `xor` utility function\n" }, { "from": "human", "value": "'use strict';\n\n\nfunction isObject(/* subjects... */) {\n var index,\n length = arguments.length,\n current;\n\n if (length < 1) {\n return false;\n }\n\n for (index = 0; inde...
javascript
chosen
[ { "from": "system", "value": "Make sure we're testing span\n" }, { "from": "human", "value": "import { test } from 'qunit';\nimport moduleForAcceptance from '../../tests/helpers/module-for-acceptance';\n\nmoduleForAcceptance('Acceptance | css styles');\n\ntest('check that Octicons scss is being ...
javascript
chosen
[ { "from": "system", "value": "Remove dots from generic types\n" }, { "from": "human", "value": "const DocumentedItem = require('./item');\n\nclass DocumentedVarType extends DocumentedItem {\n\tregisterMetaInfo(data) {\n\t\tthis.directData = data;\n\t}\n\n\tserialize() {\n\t\tconst names = [];\n\...
javascript
chosen
[ { "from": "system", "value": "Add route for together event\n" }, { "from": "human", "value": "/**\n * @fileOverview Routes for City.\n */\nvar log = require('logg').getLogger('app.router.city');\n\nvar HomeCtrl = require('../controllers/city/index.ctrl');\nvar StaticsCtrl = require('../controlle...
javascript
chosen
[ { "from": "system", "value": "Comment added to the JS code\n" }, { "from": "human", "value": "window.onload = function() {\n\n createChart('.ct-chart', true);\n\n document.getElementById('button1').onclick = function () {\n\n var chartDivNode = document.getElementById('chart');\n var cha...
javascript
chosen
[ { "from": "system", "value": "Use addModuleIncludeMatcher instead of prototype mutation.\n" }, { "from": "human", "value": "/* globals jQuery,QUnit */\n\njQuery(document).ready(function() {\n var TestLoader = require('ember-cli/test-loader')['default'];\n TestLoader.prototype.shouldLoadModule ...
javascript
chosen
[ { "from": "system", "value": "Add spinner to upload button\n\nSigned-off-by: Walker Crouse <a52c6ce3cf7a08dcbb27377aa79f9b994b446d4c@hotmail.com>\n" }, { "from": "human", "value": "var MAX_FILE_SIZE = 1048576;\n\n$(function() {\n $('#pluginFile').on('change', function() {\n var alert =...
javascript
chosen
[ { "from": "system", "value": "Remove spaces from datetime SSML response.\n\nbug: b/124764992\nChange-Id: I846c6e96311350215b2237ebc213c12fc4e79610\n" }, { "from": "human", "value": "// Copyright 2018, Google, Inc.\n// Licensed under the Apache License, Version 2.0 (the 'License');\n// you may no...
javascript
chosen
[ { "from": "system", "value": "Add option to not break pipe when sass syntax error\n" }, { "from": "human", "value": "'use strict';\n\nvar config = require('../config');\nvar gulp = require('gulp');\nvar sass = require('gulp-sass');\nvar gulpif = require('gulp-if');\nv...
javascript
chosen
[ { "from": "system", "value": "Fix project dashboard's prop type.\n" }, { "from": "human", "value": "import React, { PropTypes } from 'react';\n\nexport default class DashboardProjects extends React.Component { // eslint-disable-line\n render() {\n return (\n <div className=\"projects\">...
javascript
chosen
[ { "from": "system", "value": "Set the sub element name\n" }, { "from": "human", "value": "var Deffy = require(\"deffy\")\n\nfunction SubElm(data, parent) {\n this.name = data.name;\n this.label = Deffy(data.label, this.name);\n this.type = data.type;\n this.id = [this.type, parent.na...
javascript
chosen
[ { "from": "system", "value": "Fix use of Ember global\n\nFixes #827\n" }, { "from": "human", "value": "(function() {\n if (typeof FastBoot === 'undefined') {\n var current = document.getElementById('fastboot-body-start');\n\n if (\n current &&\n typeof Ember.ViewUtils.isSerializ...
javascript
chosen
[ { "from": "system", "value": "Fix missing Halis Book font on website\n" }, { "from": "human", "value": "/* global window */\n/* @jsx createElement */\n// @flow\n\n// eslint-disable-next-line no-unused-vars\nimport { createElement } from 'jsx-dom';\nimport { watch } from '../core';\n// $FlowFixMe...
javascript
chosen
[ { "from": "system", "value": "Fix crash in intercom on server navigation events\n" }, { "from": "human", "value": "const esbuild = require(\"esbuild\");\n\nconst isProduction = false;\n\nesbuild.buildSync({\n entryPoints: ['./src/platform/current/server/serverStartup.ts'],\n bundle: true,\n o...
javascript
chosen
[ { "from": "system", "value": "Set flush to 60s and disable dumpMessages by default\n" }, { "from": "human", "value": "(function() {\n return {\n\t\tport: 8125,\n\t\tmgmt_port: 8126,\n\n\t\tpercentThreshold: [ 50, 75, 90, 95, 98, 99, 99.9, 99.99, 99.999],\n\n\t\tgraphitePort: parseInt(process....
javascript
chosen
[ { "from": "system", "value": "Add create and update functions to ang review model\n" }, { "from": "human", "value": "(function(){\n'use strict';\n\nangular\n .module('secondLead')\n \n .factory('ReviewModel',['Restangular', 'store', function(Restangular, store) {\n var currentUser = store....
javascript
chosen
[ { "from": "system", "value": "Update blueprint to use comments" }, { "from": "human", "value": "/*\n This is an example factory definition. Factories are\n used inside acceptance tests.\n\n Create more files in this directory to define additional factories.\n*/\nimport Mirage from 'ember-cli-...
javascript
chosen
[ { "from": "system", "value": "Add form for for creating a new question.\n" }, { "from": "human", "value": "import React from 'react'\n\nclass NewQuestion extends React.Component {\n render () {\n return <div>\n <h2>Create a New Question</h2>\n </div>\n }\n}\n\nexport default NewQues...
javascript
chosen
[ { "from": "system", "value": "Send the cookies with the request\n" }, { "from": "human", "value": "import BaseProvider from \"torii/providers/base\";\nimport ajax from \"../utils/ajax\";\nimport config from \"../config/environment\";\n\nexport default BaseProvider.extend({\n open: function(cred...
javascript
chosen
[ { "from": "system", "value": "Return output from child process git diff\n" }, { "from": "human", "value": "const {\n spawn\n} = require(\"child_process\");\n\nconst gitCommand = \"git\";\nconst gitDiff = \"diff\";\nconst statOption = \"--numstat\";\n\nfunction promisify(child_process) {\n ...
javascript
chosen
[ { "from": "system", "value": "Correct the GitHub API call; everything works!\n" }, { "from": "human", "value": "// Code goes here\n\n/*\n * Time to display not just simple data, but data from an object.\n */\nvar MainController = function($scope, $http) {\n\n\t$scope.message = \"Hello, Angular W...
javascript
chosen
[ { "from": "system", "value": "Change the way the test works with the command\n" }, { "from": "human", "value": "const chai = require('chai')\nconst exec = require('child_process').exec\n\nvar assert = chai.assert\n\nconsole.log('Testing the app')\n\ndescribe('Conversion Params', function () {\n ...
javascript
chosen
[ { "from": "system", "value": "Remove unused parameter from function in Dashycode's unit tests\n" }, { "from": "human", "value": "'use strict';\n\nconst assert = require('assert');\nconst Dashycode = require('./../../.lib-dist/dashycode');\n\ndescribe('Dashycode', function () {\n\t// Technically ...
javascript
chosen
[ { "from": "system", "value": "Disable spellcheck/auto correct as there are platform issues with it\n" }, { "from": "human", "value": "/*\n * Copyright 2015 Hewlett-Packard Development Company, L.P.\n * Licensed under the MIT License (the \"License\"); you may not use this file except in complian...
javascript
chosen
[ { "from": "system", "value": "Make sure stub methods return event.\n" }, { "from": "human", "value": "class Middleware {\n constructor() {\n\n }\n\n before(event) {\n\n }\n\n after(event) {\n \n }\n}\n\nmodule.exports = Middleware" }, { "from": "gpt", "value"...
javascript
chosen
[ { "from": "system", "value": "Make thread-visiblity icon use thread-icon\n\nSummary: Made it so thread-visiblity uses thread-icon.react.js instead of its own icon.\n\nTest Plan: Checked in thread settings to see if icon still worked. Also checked private threads before and after updates to make sure they st...
javascript
chosen
[ { "from": "system", "value": "Sort points based on order, waterlines and buttocks fully integrated now\n" }, { "from": "human", "value": "import {\n connect\n} from \"react-redux\";\nimport FormViewer from \"./FormViewer\";\n\nconst mapStateToProps = (state) => {\n\t\tconst points = state.wat...
javascript
chosen
[ { "from": "system", "value": "Add tests of minified code detection logic\n" }, { "from": "human", "value": "var context = require('../../src/exceptions/context')\n\ndescribe(\"Minified code detection\", function() {\n\n it(\"Empty source returns false\", function() {\n\t\texpect(context.isSourc...
javascript
chosen
[ { "from": "system", "value": "Tidy code for basic examples on NodeJS" }, { "from": "human", "value": "logMessage(\"Script Begins!\");\nvar Galileo = require(\"galileo-io\");\nvar board = new Galileo();\nvar previousData = 0;\n\nlogMessage(\"Setting Ready event for the Galileo Board\");\nboard.on...
javascript
chosen
[ { "from": "system", "value": "Convert startovne to a number.\n" }, { "from": "human", "value": "// eslint-disable-next-line import/prefer-default-export\nexport const createInputChanged = actionPrefix => (name, event) => ({\n type: `${actionPrefix}_INPUT_CHANGED`,\n name,\n id: event.target.i...
javascript
chosen
[ { "from": "system", "value": "Apply the logger as middleware\n" }, { "from": "human", "value": "import {createStore, compose, applyMiddleware} from 'redux';\nimport {devTools, persistState} from 'redux-devtools';\nimport thunkMiddleware from 'redux-thunk';\nimport travelApp from 'reducers/Reduce...
javascript
chosen
[ { "from": "system", "value": "Set back number of seats when unspecified seats are reserved\n" }, { "from": "human", "value": "'use strict';\n\nangular.module('ticketbox.boxoffice.block', [\n 'ngRoute',\n 'ticketbox.config',\n 'ticketbox.components.api',\n 'ticketbox.common.seatplan.h...
javascript
chosen
[ { "from": "system", "value": "Use fs.exists instead of path.exists\n" }, { "from": "human", "value": "var inspect = require(\"util\").inspect\nvar path = require(\"path\")\n\nmodule.exports = function (callback) {\n try_in_order([\n function (callback) {\n if (process.env.RUN_SWF_VERBOS...
javascript
chosen
[ { "from": "system", "value": "Add Unit Test For precision=0\n" }, { "from": "human", "value": "import roundNumber from 'dummy/utils/round-number';\nimport { module, test } from 'qunit';\n\nmodule('Unit | Utility | round number');\n\ntest('it rounds a number to two decimal places by default', fun...
javascript
chosen
[ { "from": "system", "value": "Improve test coverage for StorageService\n" }, { "from": "human", "value": "var assert = require('chai').assert;\nvar StorageService = require('../');\nvar AmazonStorage = StorageService.AmazonStorage;\n\ndescribe('Factory Method', function () {\n it('Should proper...
javascript
chosen
[ { "from": "system", "value": "Fix loop if same provider endpoints\n" }, { "from": "human", "value": "import { useEffect, useMemo } from 'react';\nimport { connect } from 'react-redux';\nimport PropTypes from 'prop-types';\nimport reducerRegistry from 'redux/registry';\n\nimport * as actions from...
javascript
chosen
[ { "from": "system", "value": "Delete project reminder on backend\n\nWhen a reminder is deleted on the front-end ensure that it is also deleted on the backend.\n" }, { "from": "human", "value": "class MCProjectHomeRemindersComponentController {\n /*@ngInject*/\n constructor(projectsAPI) {\n...
javascript
chosen
[ { "from": "system", "value": "Hide the label settings for Panels since they have a title field.\n" }, { "from": "human", "value": "export default [\n {\n weight: 10,\n type: 'textfield',\n input: true,\n placeholder: 'Panel Title',\n label: 'Title',\n key: 'title',\n toolti...
javascript
chosen
[ { "from": "system", "value": "Use better css selector naming.\n\nFixes https://github.com/maximveksler/EatWell/pull/2#discussion_r60944809\n" }, { "from": "human", "value": "import React from 'react'\nimport RestaurantModel from './RestaurantModel'\n\nclass Restaurant extends React.Component {\n...
javascript
chosen
[ { "from": "system", "value": "Correct code to remove JSHint error \"Did you mean to return a conditional instead of an assignment?\"\n" }, { "from": "human", "value": "(function () {\n 'use strict';\n\n angular\n .module('app.core')\n .run(function($rootScope, $state) {\n ...
javascript
chosen
[ { "from": "system", "value": "Enable store module hot loading\n" }, { "from": "human", "value": "import { createStore, applyMiddleware } from 'redux'\n\nimport rootReducer from '../reducers'\nimport thunkMiddleware from 'redux-thunk'\nimport createLogger from 'redux-logger'\n\nconst loggerMiddle...
javascript
chosen
[ { "from": "system", "value": "Use before-lauch as highlighted in the protractor docs.\n" }, { "from": "human", "value": "const ts = require('ts-node')\n\nexports.config = {\n baseUrl: 'http://localhost:3000',\n specs: ['test-e2e/**/*.spec.ts'],\n directConnect: true,\n capabilities: {\n '...
javascript
chosen
[ { "from": "system", "value": "Use cached version of $this\n" }, { "from": "human", "value": "(function ( $ ) {\n\n $.fn.onFocusLeave = function(cb) {\n\n return this.each(function() {\n\n var $this = $(this),\n timeout;\n\n $(this).on('focusout', fu...
javascript
chosen
[ { "from": "system", "value": "Test playersstats without default empty array\n" }, { "from": "human", "value": "import PlayersStats from './PlayersStats'\n\ntest('should add player stat to collection', () => {\n // given\n let repository = new PlayersStats([])\n let playerStats = { id: 1, data...
javascript
chosen
[ { "from": "system", "value": "Add refines to getClassDeps and prepend any deps with no package with 'foam.core.'\n" }, { "from": "human", "value": "foam.CLASS({\n package: 'foam.apploader',\n name: 'ModelRefines',\n refines: 'foam.core.Model',\n methods: [\n {\n name: 'getClassDeps',...
javascript
chosen
[ { "from": "system", "value": "Add images to coin command\n" }, { "from": "human", "value": "\nmodule.exports = {\n factcheck: (message, _, msg) => {\n const bool1 = (Math.random() > 0.5);\n const bool2 = (Math.random() > 0.5);\n let str;\n\n if (msg) {\n ...
javascript
chosen
[ { "from": "system", "value": "Change computed to update on name change\n" }, { "from": "human", "value": "import Ember from 'ember';\nimport layout from './template';\n\nexport default Ember.Component.extend({\n layout: layout,\n tagName: 'i',\n classNames: ['fa'],\n classNameBindings: ['nam...
javascript
chosen
[ { "from": "system", "value": "Use string for all tests\n" }, { "from": "human", "value": "var expect = require('chai').expect;\n\ndescribe('let', function() {\n it('variables declared with let are accessible within nested blocks', function() {\n 'use strict';\n let foo = 'bar';\n\n if ...
javascript
chosen
[ { "from": "system", "value": "Mark reload-and-profile attach as configurable\n" }, { "from": "human", "value": "/**\n * In order to support reload-and-profile functionality, the renderer needs to be injected before any other scripts.\n * Since it is a complex file (with imports) we can't just to...
javascript
chosen
[ { "from": "system", "value": "Add more description to input example.\n" }, { "from": "human", "value": "'use strict';\n/* eslint-disable indent */\n\nmodule.exports = function(tx) {\n var body = tx.get('body');\n\n tx.create({\n id: 'title',\n type: 'heading',\n level: 1,\n content...
javascript
chosen
[ { "from": "system", "value": "Handle response from server in saga\n\n" }, { "from": "human", "value": "// import { take, call, put, select } from 'redux-saga/effects';\nimport { REQUEST_TOPICS } from './constants';\nimport { takeLatest } from 'redux-saga';\nimport { call } from 'redux-saga/effec...
javascript
chosen
[ { "from": "system", "value": "IMCMS-290: Add a \"pin\" icon to imCMS's panel:\n- Refreshing elements length for displacing array.\n" }, { "from": "human", "value": "/**\n * Array with fixed max length and displacing first element on oversize.\n *\n * @author Serhii Maksymchuk from Ubrainians for...
javascript
chosen
[ { "from": "system", "value": "Comment added to shiv.map test\n" }, { "from": "human", "value": "if (!shiv) {\n throw(new Error(\"Don't load this file directly! Use shiv.load()\"));\n}\n\nshiv.test(\n \"shiv.map\",\n function() {\n return shiv.map([1,2,3], function(x) { return x * 2; });\n ...
javascript
chosen
[ { "from": "system", "value": "Add return to replies so they don't get called multiple times\n" }, { "from": "human", "value": "const logger = require('./logger');\n\nmodule.exports = (\n userService,\n themeService,\n clientService\n) => {\n return (templateName, getView, postHandler) => asy...
javascript
chosen
[ { "from": "system", "value": "Add actions for handling setting state in the background\n" }, { "from": "human", "value": "import * as types from './types';\n\nexport function updateField(key, value) {\n return {\n type: types.SETTING_UPDATE,\n payload: {\n key,\n value,\n },\...
javascript
chosen
[ { "from": "system", "value": "Fix usage with external React on 0.13+\n" }, { "from": "human", "value": "var deepForceUpdate = require('./deepForceUpdate');\n\nvar isRequestPending = false;\n\nmodule.exports = function requestForceUpdateAll(getRootInstances, React) {\n if (isRequestPending) {\n ...
javascript
chosen
[ { "from": "system", "value": "Use application/json as default content-type with Axios\n" }, { "from": "human", "value": "require('native-promise-only');\nvar axios = require('axios');\n\nvar Axios = function(settings) {\n return new Promise(function(resolve, reject) {\n var options = {\n ...
javascript
chosen
[ { "from": "system", "value": "Remove usage of ember jquery integration in tests\n\nNote, the ember-jquery addon re-enables usage of this.$() within components without a depreciation warning.\n\nhttps://deprecations.emberjs.com/v3.x/#toc_jquery-apis\n" }, { "from": "human", "value": "import { mod...
javascript
chosen
[ { "from": "system", "value": "Rename conf file in home dir\n" }, { "from": "human", "value": "import ProjectConfigurationRepository from '../domain/project-configuration-repository'\n\nimport fs from 'fs'\n\nconst repository = new ProjectConfigurationRepository()\n\n/**\n * @param {string} path ...
javascript
chosen
[ { "from": "system", "value": "Remove 'restangular' as a direct dependency of the top level app\n" }, { "from": "human", "value": "/* global malarkey:false, toastr:false, moment:false */\nimport config from './index.config';\n\nimport routerConfig from './index.route';\n\nimport runBlock from './...
javascript
chosen
[ { "from": "system", "value": "Add compilers to doc task\n" }, { "from": "human", "value": "\"use strict\";\n\nconst Task = require('../Task'),\n gulp = require('gulp'),\n mocha = require('gulp-mocha'),\n fs = require('fs');\n\nclass DocTask extends Task {\n\n constructor(buildManager...
javascript
chosen
[ { "from": "system", "value": "Handle url and csv getters separately\n" }, { "from": "human", "value": "// Module for interacting with zoltar\n\nconst rp = require('request-promise-native')\nconst buildUrl = require('build-url')\n\nasync function get (url) {\n return rp(url, { json: true })\n}\n...
javascript
chosen
[ { "from": "system", "value": "Refactor logout in auth service\n" }, { "from": "human", "value": "(function(){\n\n'use strict';\n\nangular.module('secondLead.common')\n .factory('Auth', ['$http', 'store', function($http, store) {\n\treturn {\n\t isAuthenticated: function() {\n\t return store...
javascript
chosen
[ { "from": "system", "value": "Comment to say its a limited mock of a promise\n" }, { "from": "human", "value": "class MockPromise {\n constructor(returnSuccess, result) {\n this.returnSuccess = returnSuccess;\n this.result = result || (returnSuccess ? 'my data': 'my error')\n ...
javascript
chosen
[ { "from": "system", "value": "Update contact on form submitted\n" }, { "from": "human", "value": "window.ContactManager = {\n Models: {},\n Collections: {},\n Views: {},\n\n start: function(data) {\n var contacts = new ContactManager.Collections.Contacts(data.contacts),\n router = ...
javascript
chosen
[ { "from": "system", "value": "Fix scrollToBottom action on turbolinks:load\n\n" }, { "from": "human", "value": "function scrollToBottom() {\n var $messages = $('#messages');\n\n if ($messages.length > 0) {\n $messages.scrollTop($messages[0].scrollHeight);\n }\n}\n\n$(document).ready(scroll...
javascript
chosen
[ { "from": "system", "value": "Add window.onload for style adjust\n" }, { "from": "human", "value": "function adjustStyle() {\n var width = 0;\n // get the width.. more cross-browser issues\n if (window.innerHeight) {\n width = window.innerWidth;\n } else if (document.documentE...
javascript
chosen
[ { "from": "system", "value": "feat: Add in extra promise koan\n" }, { "from": "human", "value": "describe(\"About Promises\", function () {\n\n describe(\"Asynchronous Flow\", function () {\n\n it(\"should understand promise usage\", function () {\n\n function isZero(number) {\n ...
javascript
chosen
[ { "from": "system", "value": "Fix translation issue in the social login\n" }, { "from": "human", "value": "'use strict';\n\nangular.module('<%=angularAppName%>')\n .directive('jhSocial', function($translatePartialLoader, $translate, $filter, SocialService) {\n return {\n res...
javascript
chosen
[ { "from": "system", "value": "Use fs-extra to remove recurisvely rather than rimraf\n" }, { "from": "human", "value": "var\n fs = require('fs'),\n Builder = require('component-builder'),\n rimraf = require('rimraf'),\n config = require('../config'),\n utils = require...
javascript
chosen
[ { "from": "system", "value": "chore(compile): Make the app link clickable\n\nThis small change makes the link clickable in some terminal emulators (like xfce-terminal), which makes it easier to open the app in a browser.\n" }, { "from": "human", "value": "import config from '../config'\nimport s...
javascript
chosen
[ { "from": "system", "value": "Fix for when no touchTools are active\n" }, { "from": "human", "value": "// State\nimport { getters, state } from './../../store/index.js';\nimport getActiveToolsForElement from './../../store/getActiveToolsForElement.js';\nimport addNewMeasurement from './addNewMea...
javascript
chosen
[ { "from": "system", "value": "Make window jQuery object a bit more explicit.\n" }, { "from": "human", "value": "define(function() {\n \"use strict\";\n\n // In development, we concatenate jQuery to the app.js build\n // so that it is exposed as a global for Drupal scripts (rather\n // than l...
javascript
chosen
[ { "from": "system", "value": "Add action buttons for link insert window\n" }, { "from": "human", "value": "/* \n * Copyright 2016 Space Dynamics Laboratory - Utah State University Research Foundation.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use t...
javascript
chosen
[ { "from": "system", "value": "Enable disabling for inanimate enemy tanks\n" }, { "from": "human", "value": "import React from 'react';\nimport { TANK_RADIUS } from '../../simulation/constants';\n\nclass TankBody extends React.Component {\n\n constructor(props) {\n super(props);\n this.rad...
javascript
chosen
[ { "from": "system", "value": "Add version increment option to release task.\n" }, { "from": "human", "value": "'use strict';\n\nmodule.exports = function (grunt) {\n grunt.registerTask('release', 'Create and tag a release',\n function () {\n grunt.task.run(['checkbranch:mast...
javascript
chosen
[ { "from": "system", "value": "Fix showing validation errors for dashed field names\n" }, { "from": "human", "value": "import Component from '@ember/component';\nimport layout from '../templates/components/cs-active-composition-panel';\nimport { task, timeout } from 'ember-concurrency';\nimport s...
javascript
chosen
[ { "from": "system", "value": "Copy gtml file to dist directory\n" }, { "from": "human", "value": "module.exports = {\n all: {\n files: [\n { expand: true, src: ['config.json'], dest: 'dist' },\n { expand: true, src: ['javascript.json'], dest: 'dist' },\n ...
javascript
chosen
[ { "from": "system", "value": "[fix] Fix problem with callbacks called out of order\n" }, { "from": "human", "value": "var assert = require('assert');\n\nvar assertCalled = module.exports = function (cb) {\n var index = assertCalled.wanted.push({ callback: cb, error: new Error() });\n return fu...
javascript
chosen
[ { "from": "system", "value": "[RN] Use rounded avatars in the film strip\n" }, { "from": "human", "value": "import { createStyleSheet } from '../../styles';\n\n/**\n * The style of the avatar and participant view UI (components).\n */\nexport const styles = createStyleSheet({\n /**\n * Av...
javascript
chosen
[ { "from": "system", "value": "events: Fix broken JSON path for member events.\n\n" }, { "from": "human", "value": "exports.run = async function(payload) {\n const claimEnabled = this.cfg.issues.commands.assign.claim.aliases.length;\n\n if (payload.action !== \"added\" || !claimEnabled) return;...
javascript
chosen
[ { "from": "system", "value": "Drop the default number of backend connections to 4.\n" }, { "from": "human", "value": "var path = require('path'),\n fs = require('fs'),\n log4js = require('log4js');\n\nvar config = {\n DNODE_PORT: 0xC5EA,\n SEARCH_REPO: path.join(__dirname, \"../../...
javascript
chosen
[ { "from": "system", "value": "Fix for zero-length color tables" }, { "from": "human", "value": "define(function() {\n\n return function(resource) {\n var dv = new DataView(resource.data.buffer, resource.data.byteOffset, resource.data.byteLength);\n var entryCount = dv.getInt16(6, false) +...
javascript
chosen
[ { "from": "system", "value": ":memo: Add TODO about moving string helper to underscore-plus\n" }, { "from": "human", "value": "'use babel';\n\nexport const raw = (strings, ...values) => {\n return strings[0].replace(/^[ \\t\\r]+/gm, \"\");\n};\n" }, { "from": "gpt", "value": "'use b...
javascript
chosen
[ { "from": "system", "value": "Add additional logging setting for Travis CI debugging" }, { "from": "human", "value": "exports.config = {\n sauceUser: process.env.SAUCE_USERNAME,\n sauceKey: process.env.SAUCE_ACCESS_KEY,\n\n capabilities: {\n 'browserName': 'chrome',\n 'tunnel-identifier...
javascript
chosen
[ { "from": "system", "value": "Hide contact form when sending succeeded.\n" }, { "from": "human", "value": "angular.module('codebrag.common.directives').directive('contactFormPopup', function() {\n\n function ContactFormPopup($scope, $http) {\n\n $scope.isVisible = false;\n\n $sc...
javascript
chosen
[ { "from": "system", "value": "Add organization menu component test\n" }, { "from": "human", "value": "import { moduleForComponent, test } from 'ember-qunit';\nimport hbs from 'htmlbars-inline-precompile';\n\nmoduleForComponent('organization-menu', 'Integration | Component | organization menu', {...
javascript
chosen
[ { "from": "system", "value": "Fix ShadyDOM before Custom Elements polyfill\n" }, { "from": "human", "value": "/* eslint-disable global-require */\nrequire('@webcomponents/template');\n\nif (!window.customElements) require('@webcomponents/custom-elements');\nif (!document.body.attachShadow) requi...
javascript
chosen
[ { "from": "system", "value": "Fix typo:\nassertThrow =>\nassertThrows\n" }, { "from": "human", "value": "var assert = require('chai').assert;\nvar nodemock = require('nodemock');\n\nvar utils = require('./test-utils');\n\nvar express = require('express');\nvar socketAdaptor = require('../lib/soc...
javascript
chosen
[ { "from": "system", "value": "Test case for zero argument emit.\n" }, { "from": "human", "value": "define(['events/lib/emitter'],\nfunction(Emitter) {\n\n describe(\"Emitter\", function() {\n \n it('should alias addListener to on', function() {\n expect(Emitter.prototype.addListener)...
javascript
chosen
[ { "from": "system", "value": "Fix exiting on DB error.\n" }, { "from": "human", "value": "var mongoose = require('mongoose');\nvar log = require('./logger').log;\nvar process = require('process');\n\nvar options = require('./options-handler').options;\n\nexports.init = function(callback) {\n mo...
javascript
chosen
[ { "from": "system", "value": "Update JS following component usage\n" }, { "from": "human", "value": "(function () {\n\n \"use strict\"\n\n window.GOVUK = window.GOVUK || {};\n\n window.GOVUK.Transactions = {\n trackStartPageTabs : function (e) {\n var pagePath = e.target.href;\n ...
javascript
chosen
[ { "from": "system", "value": "Add callback argument to Flash.writeDataTo()" }, { "from": "human", "value": "// refactoring from https://github.com/leonid-shevtsov/cacheable-flash-jquery\nvar Flash = new Object();\n\nFlash.data = {};\n\nFlash.transferFromCookies = function() {\n var data = JSON....
javascript
chosen
[ { "from": "system", "value": "784: Remove the type field as its not required.\n" }, { "from": "human", "value": "const config = require('../../../knexfile').web\nconst knex = require('knex')(config)\nmodule.exports = function (id, type) {\n var table = 'team_caseload_overview'\n var whereObjec...
javascript
chosen
[ { "from": "system", "value": "Consolidate the two pieces of state into a single atom\n\nThis helps readability of the code by knowing there is only one\n variable that contains the state and only one variable that\n can be mutated.\n\nThis means if you refactor the code into multiple files you\n only hav...
javascript
chosen
[ { "from": "system", "value": "Fix data object on event data\n" }, { "from": "human", "value": "export default [\n {\n day: 20,\n month: 7,\n year: 2017,\n date: '20 Julho 2017',\n location: 'Fundação Calouste Gulbenkian, Lisboa',\n name: 'Concerto pela Orquestra Gulbenkian, Di...
javascript
chosen
[ { "from": "system", "value": "Expand the JS code a bit to prepare for networking code\n" }, { "from": "human", "value": "console.log(\"Hello Console!\");\nhost = window.location.host.split(\":\")[0];\nconsole.log(host);\nvar conn;\n$(document).ready(function () {\n conn = new WebSocket(\"ws:/...
javascript
chosen