conversations listlengths 2 3 | source stringclasses 1
value | stack stringclasses 1
value |
|---|---|---|
[
{
"from": "system",
"value": "Add the missing actions to the tasks state.\n"
},
{
"from": "human",
"value": "export const getTasks = () => (\n {\n type: 'TASKS'\n }\n)\n"
},
{
"from": "gpt",
"value": "export const tasks = () => (\n {\n type: 'TASKS'\n }\n)\n\nexport const t... | javascript | chosen |
[
{
"from": "system",
"value": "Add filter to loading state\n"
},
{
"from": "human",
"value": "\"use strict\";\n\nvar LoadingState = function(game) {}\n\nvar publicMethods = function() {\n this.create = function() {\n\n };\n};\n\nvar privateMethods = function() {};\n\nprivateMethods.call(Loading... | javascript | chosen |
[
{
"from": "system",
"value": "Fix previous commit for IE7-8\n"
},
{
"from": "human",
"value": "/* jshint loopfunc: true*/\nvar has = require('has');\nvar classic = require('classic');\n\nvar spipe = require('./index');\n\n\nvar slice = Array.prototype.slice;\n\n\nmodule.exports = function create... | javascript | chosen |
[
{
"from": "system",
"value": "Fix path to static files\n"
},
{
"from": "human",
"value": "module.exports = function (grunt) {\n 'use strict';\n\n grunt.initConfig({\n pkg: grunt.file.readJSON('package.json'),\n uglify: {\n dist: {\n files: {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix up detecting if Bundler is installed\n"
},
{
"from": "human",
"value": "import path from 'path';\nimport {statNoException} from '../promise-array';\nimport BuildDiscoverBase from '../build-discover-base';\nimport {findActualExecutable} from 'spawn-rx';\n\nconst ... | javascript | chosen |
[
{
"from": "system",
"value": "Comment out tests for now.\n"
},
{
"from": "human",
"value": "import { numberFormat } from 'preprint-service/helpers/number-format';\nimport { module, test } from 'qunit';\n\nmodule('Unit | Helper | number format');\n\ntest('transforms 4 digit number', function(asse... | javascript | chosen |
[
{
"from": "system",
"value": ":art: Simplify nbsp replacing, yet again\n"
},
{
"from": "human",
"value": "'use babel'\n\n/* @flow */\n\nimport type { Message } from '../types'\n\nconst nbsp = String.fromCodePoint(160)\n\nexport function visitMessage(message: Message) {\n const messageFile = mes... | javascript | chosen |
[
{
"from": "system",
"value": "[test] Add one more failed server\n"
},
{
"from": "human",
"value": "var net = require('net'),\n path = require('path'),\n assert = require('assert'),\n spawn = require('child_process').spawn,\n cb = require('assert-called');\n\nvar PORT = 5434;\n\nvar s... | javascript | chosen |
[
{
"from": "system",
"value": "Add tests for the model\n"
},
{
"from": "human",
"value": "define([\n \"home/models\"\n], function (models) {\n \"use strict\";\n \n QUnit.module(\"home.models\");\n QUnit.test(\"instantiation\", function (assert) {\n var model = new models.App... | javascript | chosen |
[
{
"from": "system",
"value": "Update with reference to global nav partial\n"
},
{
"from": "human",
"value": "var _ = require('lodash')\nvar fs = require('fs')\nvar gzip = require('gzip-size')\nvar filesize = require('filesize')\nvar cssstats = require('cssstats')\n\nvar module = require('tachyon... | javascript | chosen |
[
{
"from": "system",
"value": "Make sure to load the current module, not some other global one.\n"
},
{
"from": "human",
"value": "#!/usr/bin/env node\n/**\nProvide mdb-aggregate, a MongoDB style aggregation pipeline, to NodeJS.\n\nCopyright (C) 2014 Charles J. Ezell III\n\nThis program is free ... | javascript | chosen |
[
{
"from": "system",
"value": "Test actual parsed JSON instead of strings\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar grunt = require('grunt');\n\n\nfunction readFile(file) {\n var contents = grunt.file.read(file);\n if (process.platform === 'win32') {\n contents = contents.repla... | javascript | chosen |
[
{
"from": "system",
"value": "Change deprecated way of using refs\n"
},
{
"from": "human",
"value": "import React from 'react'\nimport PropTypes from 'prop-types'\nimport Stickyfill from 'stickyfill'\nimport supports from 'css-supports'\n\nsupports.shim()\n\nconst stickyfill = Stickyfill()\n\ncl... | javascript | chosen |
[
{
"from": "system",
"value": "Reorganize the way the JWT is found\n\nWhen JWT wasn't set (the user was logged out) this would die horribly.\nInstead we need to do some validation steps and get the property in a\nbetter way.\n"
},
{
"from": "human",
"value": "import { inject as service } from '@e... | javascript | chosen |
[
{
"from": "system",
"value": "Handle consecutive text nodes when parsing server-rendered DOM\n"
},
{
"from": "human",
"value": "window.copyDOMIntoVTree = function copyDOMIntoVTree (vtree) {\n walk (vtree, document.body.firstChild);\n};\n\nwindow.walk = function walk (vtree, node) {\n var i = 0... | javascript | chosen |
[
{
"from": "system",
"value": "Undo change when merged to switch_to_vue\n"
},
{
"from": "human",
"value": "(function () {\n require.config({\n baseUrl: \"../remoteappmanager/static/js/\",\n paths: {\n components: '../components',\n jquery: '../components/jquery/... | javascript | chosen |
[
{
"from": "system",
"value": "Add one more test case\n"
},
{
"from": "human",
"value": "'use strict';\n\nconst {decode, encode} = require('../app/scripts/obfuscate').default;\n\ndescribe('the encode function', function() {\n it('outputs nothing if nothing is entered', function () {\n expect(... | javascript | chosen |
[
{
"from": "system",
"value": "Revert \"Converting tabs to spaces.\"\n\nThis reverts commit aca5ea78363bed0e3a6b9d7993755022690a06a4.\n"
},
{
"from": "human",
"value": "describe(\"Simple tests examples\", function () {\n\n it(\"should fail\", function () {\n assert.equal(false, false);\n });... | javascript | chosen |
[
{
"from": "system",
"value": "Fix unusual query params behavior on page transitions\n"
},
{
"from": "human",
"value": "import Ember from 'ember';\n\nexport default Ember.Route.extend({\n session: Ember.inject.service(),\n setupController(controller, model) {\n controller.addFilters(... | javascript | chosen |
[
{
"from": "system",
"value": "Hide tests that include non existent methods\n"
},
{
"from": "human",
"value": "/**\n *\n * Application or Website name\n *\n * Copyright 2015, Author Name\n * Some information on the license.\n *\n * Tests > Unit > Sample\n *\n * Jasmine test examples: http://evanh... | javascript | chosen |
[
{
"from": "system",
"value": "Extend mocha timeout to 10 sec\n"
},
{
"from": "human",
"value": "import resolver from './helpers/resolver'\nimport {setResolver} from 'ember-mocha'\n\nsetResolver(resolver)\n"
},
{
"from": "gpt",
"value": "/* global mocha */\nimport resolver from './hel... | javascript | chosen |
[
{
"from": "system",
"value": "Make it so case doesn't matter for types.\n"
},
{
"from": "human",
"value": "var Sequelize = require('sequelize'); \nvar sequelize = new Sequelize('database', 'username', 'password');\n\nvar models = {}\nvar db = {}\nrequire(\"fs\").readdirSync(\"./models\").forEach... | javascript | chosen |
[
{
"from": "system",
"value": "Add next steps after creating new bucket\n"
},
{
"from": "human",
"value": "import React from 'react';\nimport FileListItem from './fileListItem';\n\nconst FileList = (props) => {\n // const styles = require('./BucketList.scss');\n\n function renderFileListItems(f... | javascript | chosen |
[
{
"from": "system",
"value": "Make landing use button component\n"
},
{
"from": "human",
"value": "import React from 'react';\nimport Page from 'components/Page/Page';\nimport Link from 'react-router-dom/es/Link';\n\nconst Landing = () =>\n <Page heading='Landing' >\n <p>This is the landing ... | javascript | chosen |
[
{
"from": "system",
"value": "[YouTrack] Tweak button rendering on agile board\n"
},
{
"from": "human",
"value": "/*jslint indent: 2 */\n/*global $: false, document: false, togglbutton: false*/\n'use strict';\n\n/* the first selector is required for youtrack-5 and the second for youtrack-6 */\nt... | javascript | chosen |
[
{
"from": "system",
"value": "Update test to take advantage of new 'server ready' hooks, and stop server when test is done.\n"
},
{
"from": "human",
"value": "require('./common');\nvar path = require(\"path\");\n\nvar file = \"numbers\";\n\nvar default_host_path = path.join(fixturesDir,\"default... | javascript | chosen |
[
{
"from": "system",
"value": "Use config overrides in the local.js file\n"
},
{
"from": "human",
"value": "var path = alchemy.use('path');\n\n// Prepare the settings object\nvar settings = alchemy.settings = {};\n\n// Get the local (environment) specific settings\nvar local = require(path.resolv... | javascript | chosen |
[
{
"from": "system",
"value": "Update LTS versions in test matrix\n"
},
{
"from": "human",
"value": "/* eslint-env node */\nmodule.exports = {\n scenarios: [\n {\n name: 'ember-lts-2.8',\n bower: {\n dependencies: {\n 'ember': 'components/ember#lts-2-8'\n },\n... | javascript | chosen |
[
{
"from": "system",
"value": "Add scale to list of unitless CSS properties\n"
},
{
"from": "human",
"value": "// Taken from:\n// https://github.com/necolas/react-native-web/blob/master/src/apis/StyleSheet/normalizeValue.js\nconst unitlessNumbers = {\n boxFlex: true,\n boxFlexGroup: true,\n co... | javascript | chosen |
[
{
"from": "system",
"value": "Add upate to internal record period creation\n"
},
{
"from": "human",
"value": "/**\n * mSupply Mobile\n * Sustainable Solutions (NZ) Ltd. 2019\n */\n\n/**\n * Methods to create internal records from a requested\n * sync/external record. Used primarily by\n * create... | javascript | chosen |
[
{
"from": "system",
"value": "Use async functions instead to flatten nesting\n"
},
{
"from": "human",
"value": "const format = require('date-fns/format');\nconst addDays = require('date-fns/add_days');\nconst pdf2text = require('../lib/pdf-parser.js');\nconst download = require('download-file');... | javascript | chosen |
[
{
"from": "system",
"value": "FIX Delete board now hit API\n\n"
},
{
"from": "human",
"value": "import { GET_ALL_BOARDS, ADD_BOARD, DELETE_BOARD } from './constants'\n\nexport const getAllBoards = () => (dispatch) => {\n dispatch({\n type: GET_ALL_BOARDS,\n payload: {\n request: {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Revert \"Add Emoji list of `Binary_Property`s\"\n\nThis reverts commit 5dc3741e84f72e21a0376e2370475bd9691388bc.\n"
},
{
"from": "human",
"value": "const {\n assemble,\n writeFile,\n unicodeVersion\n} = require('./utils.js');\n\n// This includes only the bi... | javascript | chosen |
[
{
"from": "system",
"value": "Test exception on non-existent collection\n"
},
{
"from": "human",
"value": "Tinytest.add('basic - works', function (test) {\n Test = new Mongo.Collection('test' + test.id);\n Test.insert({ test: true });\n var find = Mongo.Collection.get('test' + test.id).find({... | javascript | chosen |
[
{
"from": "system",
"value": "Add native dns module to webpack externals\n"
},
{
"from": "human",
"value": "const { resolve } = require('path')\n\nmodule.exports = {\n mode: 'production',\n entry: './dist.browser/browser/index.js',\n module: {\n rules: [\n {\n test: /\\.tsx?$/,... | javascript | chosen |
[
{
"from": "system",
"value": "Check that single element in array is a valid React element\n"
},
{
"from": "human",
"value": "import React from 'react';\n\nconst ReactUil = {\n /**\n * Wrap React elements\n *\n * If elements is an array with a single element, it will not be wrapped\n * u... | javascript | chosen |
[
{
"from": "system",
"value": "Add a test for a better crypto\n"
},
{
"from": "human",
"value": "const expect = require('expect');\nconst { encrypt, decrypt } = require('./crypto');\n\ndescribe('Crypto Features', () => {\n it('should keep the consistancy between encryption & decryption', () =>... | javascript | chosen |
[
{
"from": "system",
"value": "Remove 1px line at the top of the screen\n"
},
{
"from": "human",
"value": "var Alert = require('alert');\nvar domify = require('domify');\nvar log = require('./client/log')('alerts');\nvar each = require('each');\n\n/**\n * Append el\n */\n\ndocument.body.insertBef... | javascript | chosen |
[
{
"from": "system",
"value": "Use double quotes to contain single quotes\n"
},
{
"from": "human",
"value": "describe('TaskList', () => {\n it('does not show tasks that are ignored, archived or snoozed')\n\n context('when the snooze button is clicked', () => {\n it('hides selected tasks')\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Add quieter handlers for repl\n"
},
{
"from": "human",
"value": "var LastFmNode = require('./lib/lastfm').LastFmNode,\n repl = require('repl'),\n config = require('./config'),\n _ = require('underscore');\n\nvar echoHandler = function() {\n _(arguments).... | javascript | chosen |
[
{
"from": "system",
"value": "Fix dockerhub release job (bad remote URL)\n"
},
{
"from": "human",
"value": "'use strict';\n\nconst cfg = require('./config');\nconst { cloneGitProject, applyOneTemplate, tagAndPush, commitAndPush } = require('./utils');\n\nasync function run () {\n\n const templa... | javascript | chosen |
[
{
"from": "system",
"value": "Use $factory prefix for factory traces"
},
{
"from": "human",
"value": "var utils = require('../utils')\n\nmodule.exports = function ($provide, traceBuffer) {\n return {\n instrumentAll: function (modules) {\n modules.forEach(function (name) {\n $pro... | javascript | chosen |
[
{
"from": "system",
"value": "[FEATURE] Change withdrawal status from pending to notified.\n"
},
{
"from": "human",
"value": "var gateway = require(__dirname+'/../');\nvar request = require('request');\n\nfunction getQueuedWithdrawal(fn){\n gateway.api.listWithdrawals(function(err, withdrawals)... | javascript | chosen |
[
{
"from": "system",
"value": "Add - Simplest code for actions to facilitate the Given (HTTP request to check that a POST resource exists)\n"
},
{
"from": "human",
"value": "/*\nWe use the output messages from the cucumber runner to create Step Definitions:\nthe glue between features written in G... | javascript | chosen |
[
{
"from": "system",
"value": "Update Mockingjay to use clients, and record and repeat responses correctly.\n"
},
{
"from": "human",
"value": "exports = {\n start: function(options) {\n console.log('Starting with options', options);\n }\n}\n"
},
{
"from": "gpt",
"value": "Server ... | javascript | chosen |
[
{
"from": "system",
"value": "test(commit-all): Test for project folder limit\n"
},
{
"from": "human",
"value": "/** @babel */\n\nimport commitAll from \"../../lib/commands/commit-all\";\nimport commit from \"../../lib/commands/commit\";\nimport {getFilePath, removeGitRoot, createGitRoot, files}... | javascript | chosen |
[
{
"from": "system",
"value": "Update the reason why the router service is still not used\n"
},
{
"from": "human",
"value": "import Ember from 'ember';\nimport { lazyClick } from '../helpers/lazy-click';\n\nconst { Component, inject, computed } = Ember;\n\nexport default Component.extend({\n // ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix a broken require to removed module"
},
{
"from": "human",
"value": "module.exports = {\n Animations: require('./animations'),\n AutoPrefix: require('./auto-prefix'),\n Colors: require('./colors'),\n Spacing: require('./spacing'),\n ThemeManager: require('./... | javascript | chosen |
[
{
"from": "system",
"value": "Reduce number of rooms to 3\n"
},
{
"from": "human",
"value": "// Configurations\nvar config = {};\n\n// Listening port\nconfig.port = 3000;\n\n// Number of rooms\nconfig.numRooms = 10;\n\n// Size of board\nconfig.boardSize = 50;\n\nmodule.exports.config = config;\n... | javascript | chosen |
[
{
"from": "system",
"value": "Add a comment to explain the line with the spread op\n\n[ci skip]\n"
},
{
"from": "human",
"value": "import { TopicSchema } from '/imports/collections/topic.schema';\nimport { MinutesSchema } from '/imports/collections/minutes.schema';\n\nexport class MigrateV23 {\n... | javascript | chosen |
[
{
"from": "system",
"value": "Make sure field names start with a letter\n\nSo that properties like _item and _template and any we might add later to the\nextracted item can't be overwritten.\n"
},
{
"from": "human",
"value": "import Ember from 'ember';\nimport NotificationHandler from '../mixins... | javascript | chosen |
[
{
"from": "system",
"value": "Use importFrom since our files are separate\n\nCurrently not working\n"
},
{
"from": "human",
"value": "/* eslint global-require:0 */\n\nmodule.exports = {\n map: { inline: true },\n plugins: [\n require('postcss-custom-properties'),\n ]\n};\n"
},
{
"f... | javascript | chosen |
[
{
"from": "system",
"value": "Upgrade chart mashups to support IE9\n"
},
{
"from": "human",
"value": "(function () {\n var Ext = window.Ext4 || window.Ext;\n\n /**\n * A special cardboard card for use by the PortfolioKanbanApp\n */\n Ext.define('Rally.apps.portfoliokanban.Portfo... | javascript | chosen |
[
{
"from": "system",
"value": "Fix tests to use pipe as well\n"
},
{
"from": "human",
"value": "import { customTaxonomyFilter } from 'dummy/helpers/custom-taxonomy-filter';\nimport { module, test } from 'qunit';\n\nmodule('Unit | Helper | custom taxonomy filter');\n\ntest('replace very deep custo... | javascript | chosen |
[
{
"from": "system",
"value": "Use `Meteor.absoluteUrl` for Twitter login URL\n\nFixes Twitter login on Cordova\n"
},
{
"from": "human",
"value": "Twitter = {};\n\n// Request Twitter credentials for the user\n// @param options {optional} XXX support options.requestPermissions\n// @param credenti... | javascript | chosen |
[
{
"from": "system",
"value": "style: Remove \".js\" from require() expression\n"
},
{
"from": "human",
"value": "const chai = require('chai');\nconst path = require('path');\nconst exec = require('child_process').exec;\n\nconst expect = chai.expect.bind(chai);\n\nconst mainFile = path.join(__dir... | javascript | chosen |
[
{
"from": "system",
"value": "Increase the upper range for animation duration.\n"
},
{
"from": "human",
"value": "$(function() {\n function randomInt (min, max) {\n return Math.floor(Math.random() * (max - min + 1)) + min;\n }\n\n function newBubble () {\n var radius = randomInt(10, 208... | javascript | chosen |
[
{
"from": "system",
"value": "Use zepto got get gist, without own ugly jsonp\n"
},
{
"from": "human",
"value": "(function() { define(['zepto'], function($) {\n\n var gistCaching = {};\n\n var renderGist = function(ele, gist) {\n var css = \"https://gist.github.com\" + gist.stylesheet;\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix maxLength governor not accepting null value\n"
},
{
"from": "human",
"value": "import PreprocessShader from './preprocessShader';\nimport Shader from './shader';\nexport default class ShaderManager {\n constructor(renderer) {\n this.renderer = renderer;\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Add custom schema method: compare passwords (psw against hash)\n"
},
{
"from": "human",
"value": "var mongoose = require('mongoose');\nvar bcrypt = require('bcrypt');\nvar Schema = mongoose.Schema;\n\nvar UserSchema = new Schema({\n name : String,\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Add test for remote grid status check.\n"
},
{
"from": "human",
"value": "var chai = require('chai');\nvar fs = require('fs');\nvar status = require('../src/status');\nvar assert = chai.assert;\n\ndescribe(\"parse grid status HTML\", function () {\n\n it(\"Should... | javascript | chosen |
[
{
"from": "system",
"value": "Fix chapter sorting on homepage\n"
},
{
"from": "human",
"value": "import { Link } from 'react-router';\nimport HomepageTile from './homepage-tile.js';\nimport chaptersData from './chapter-data.js';\nimport sortBy from 'lodash/sortBy';\n\n// Clone the chapters since... | javascript | chosen |
[
{
"from": "system",
"value": "Fix native require paths in TypeScript grammar\n"
},
{
"from": "human",
"value": "try {\n module.exports = require(\"./build/Release/tree_sitter_typescript_binding\");\n} catch (error) {\n try {\n module.exports = require(\"./build/Debug/tree_sitter_typescript_... | javascript | chosen |
[
{
"from": "system",
"value": "Add tablesorter to ingredients table\n"
},
{
"from": "human",
"value": "$(function() {\n\t$(\".add\").button();\n\t$(\".edit\").button();\n\t$(\".delete\").button().click(function() {\n\t\tvar res = confirm(\"Are you sure you want to delete this item?\");\n\t\tif (r... | javascript | chosen |
[
{
"from": "system",
"value": "Set templateData.html5Shiv via opt; rename IE CSS opts for consistency\n"
},
{
"from": "human",
"value": "var grunt = require('grunt');\n\nmodule.exports = {\n demo: {\n options: {\n source: 'demo/static/css/',\n destination: 'demo/',\n template: ... | javascript | chosen |
[
{
"from": "system",
"value": "Add variable for dynamic URL for acceptance tests\n"
},
{
"from": "human",
"value": "exports.config = {\n\n /**\n * language of your feature files\n * options: french, spanish, norwegian, polish, german, russian\n */\n language: 'english',\n\n /... | javascript | chosen |
[
{
"from": "system",
"value": "Change e2e challenge-solved checks to isPresent()\n\n(as previously checked \"hidden\" attribute is not used any more)\n"
},
{
"from": "human",
"value": "protractor.expect = {\n challengeSolved: function (context) {\n describe('(shared)', () => {\n beforeEa... | javascript | chosen |
[
{
"from": "system",
"value": "Fix some tests that required Object instances due to 'to equal', and now esprima uses other classes.\n"
},
{
"from": "human",
"value": "/*global describe, it*/\nvar expect = require('./unexpected-with-plugins').clone();\nvar parseExpression = require('../lib/parseEx... | javascript | chosen |
[
{
"from": "system",
"value": "Remove unnecessary routes for specific routes\n\n"
},
{
"from": "human",
"value": "import Vue from 'vue';\nimport VueResource from 'vue-resource';\nimport Router from 'vue-router';\nimport Endpoint from '@/components/Endpoint';\nimport EndpointList from '@/component... | javascript | chosen |
[
{
"from": "system",
"value": "Sort by login by default\n"
},
{
"from": "human",
"value": "\"use strict\";\n\nvar mongoose = require('mongoose');\nvar User = mongoose.model('User');\n\n\nmodule.exports.get = function(req, res) {\n\tUser.find({}).populate('universities').exec(function(err, users) ... | javascript | chosen |
[
{
"from": "system",
"value": "Test gone for real this time\n"
},
{
"from": "human",
"value": "var mongoose = Object;\nvar app = Object;\nmongoose.model = function(a, b) {\n\treturn function() {\n\t\tthis.name = '';\n\t\tthis.surname = '';\n\t\tthis.save = function() {};\n\t};\n};\napp.userSchema... | javascript | chosen |
[
{
"from": "system",
"value": "Fix Jest warning regarding basename\n"
},
{
"from": "human",
"value": "import React from 'react'\nimport ReactDOM from 'react-dom'\nimport Router from './Router'\n\nit('renders without crashing', () => {\n const div = document.createElement('div')\n ReactDOM.rende... | javascript | chosen |
[
{
"from": "system",
"value": "Make sure we're not on node.js before assigning to window\n"
},
{
"from": "human",
"value": "import { render, findDOMNode, createRenderer, roots } from '../../../src/DOM/rendering';\nimport createStaticVElementClone from '../../../src/factories/createStaticVElementC... | javascript | chosen |
[
{
"from": "system",
"value": "Bump version for jquery-layout as well (due to whitespace)\n"
},
{
"from": "human",
"value": "// XXX should probably nudge people toward the CSS Flexible Box Model\n// flexie, rather than this\n\nPackage.describe({\n summary: \"Easily create arbitrary multicolumn l... | javascript | chosen |
[
{
"from": "system",
"value": "Increase max listener limit on ipcRenderer\n\nWe deliberately assign more than 10 listeners on the method response\nchannel.\n"
},
{
"from": "human",
"value": "'use strict'\n\nconst Disposable = require('event-kit').Disposable\nlet ipcRenderer = null\nlet ipcMain = ... | javascript | chosen |
[
{
"from": "system",
"value": "Use 'lodash/assignIn' to avoid bundling all of lodash.\n"
},
{
"from": "human",
"value": "import _ from 'lodash';\n\nimport {\n DISPATCH_TYPE,\n STATE_TYPE\n} from '../constants';\n\nclass Store {\n constructor({portName, state = {}}) {\n this.port = chrome.ru... | javascript | chosen |
[
{
"from": "system",
"value": "Update test to not load environment variables\n"
},
{
"from": "human",
"value": "const { expect } = require('chai');\nconst Plexacious = require('../lib/Plexacious');\nconst env = require('node-env-file');\nenv('./.env');\nconst config = {\n \"hostname\": process.e... | javascript | chosen |
[
{
"from": "system",
"value": "Add Fetch API example to the non-React version too\n\nRef #4.\n"
},
{
"from": "human",
"value": "import 'svg4everybody';\nimport './fonts';\n\nconsole.log('Hello World');\n"
},
{
"from": "gpt",
"value": "import fetch from './helpers/fetch';\n\nimport 'sv... | javascript | chosen |
[
{
"from": "system",
"value": "Enable to pass a test message.\n"
},
{
"from": "human",
"value": "function _fail(s) {\n // string split to avoid problems with tests that end up printing the value of window._fail.\n window.alert(\"TEST-UNEXPECTED\" + \"-FAIL | \" + s);\n}\n\nfunction _pass(s) {\n... | javascript | chosen |
[
{
"from": "system",
"value": "Fix client validation for classes without assigned collection\n"
},
{
"from": "human",
"value": "function callMeteorMethod(\n Class, methodName, methodArgs, methodOptions, wrappedCallback\n) {\n const Collection = Class.getCollection();\n if (!Collection) {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix JSDOM initialization for the new version\n"
},
{
"from": "human",
"value": "let assert = require('assert');\nlet jsdom = require('jsdom');\n\nglobal.document = jsdom.jsdom('<!DOCTYPE html><html><body></body></html>');\nglobal.window = document.parentWindow;... | javascript | chosen |
[
{
"from": "system",
"value": "Add enhanced version of last test."
},
{
"from": "human",
"value": "var promise = require('when');\n\ndescribe('setup', function() {\n it('test env works', function() {\n expect(true).toBe(true);\n });\n});\n\nfunction promiseThatResolves() {\n return promise.... | javascript | chosen |
[
{
"from": "system",
"value": "Fix bug in call to get default swimlane\n"
},
{
"from": "human",
"value": "Meteor.methods({\n moveSwimlane(swimlaneId, toBoardId) {\n check(swimlaneId, String);\n check(toBoardId, String);\n\n const swimlane = Swimlanes.findOne(swimlaneId);\n const boar... | javascript | chosen |
[
{
"from": "system",
"value": "Fix bug of not getting full 60\n"
},
{
"from": "human",
"value": "import { min } from \"date-fns\";\n\nexport default function queryPlaces (coordinates, radius, service, types) {\n return new Promise(res => {\n let queries = types.reduce((queries, type) =>... | javascript | chosen |
[
{
"from": "system",
"value": "Fix acceptance tests to match correct shape from API repsonse\n"
},
{
"from": "human",
"value": "\"use strict\"\n\nconst path = require('path')\n\nconst OperationHelper = require('../../').OperationHelper\n\nrequire('dotenv').config({\n silent: true,\n path: p... | javascript | chosen |
[
{
"from": "system",
"value": "Add toString method for period model\n"
},
{
"from": "human",
"value": "/**\n * mSupply Mobile\n * Sustainable Solutions (NZ) Ltd. 2019\n */\n\nimport Realm from 'realm';\n\nexport class Period extends Realm.Object {\n numberOfRequisitions() {\n return this.requ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix cleanup price from title\n"
},
{
"from": "human",
"value": "'use strict'\n\nconst { flow } = require('lodash')\nconst titleize = require('titleize')\nconst cleanWhiteSpaces = require('condense-whitespace')\n\nconst REGEX_WORDS = RegExp(require('./words.json').jo... | javascript | chosen |
[
{
"from": "system",
"value": "Store new salary to pouchdb\n"
},
{
"from": "human",
"value": "import * as pouchdbService from '../services/pouchdbService';\nimport { NEW_ITEM, NEW_CATEGORY } from '../constants/ActionTypes';\n\nconst storage = store => next => async action => {\n const result = n... | javascript | chosen |
[
{
"from": "system",
"value": "Remove unneeded check for Function.prototype.call"
},
{
"from": "human",
"value": "/*global canCall */\n\n/*\nDescription:\nRelies on `Function.prototype.bind`\n*/\n\n/*\nDegrades:\nIE8, IE7, IE6, IE5.5, IE5, IE4, IE3, Chrome 6, Firefox 3.6, Safari 5.1, Opera 11.5\n... | javascript | chosen |
[
{
"from": "system",
"value": "Add file format in aviary editor component options"
},
{
"from": "human",
"value": "import Ember from 'ember';\n\nexport default Ember.Component.extend({\n aviaryApiClient: null, // injected\n classNames: ['edit-icon'],\n classNameBindings: ['featherActive:active... | javascript | chosen |
[
{
"from": "system",
"value": "Use the actual method indices instead of unknown collections.\n"
},
{
"from": "human",
"value": "var ejs = require('elastic.js'),\n nc = require('elastic.js/elastic-node-client');\n\n// default elasticsearch port is 9200\nejs.client = nc.NodeClient('localhost', '... | javascript | chosen |
[
{
"from": "system",
"value": "Remove no longer needed Uglify test"
},
{
"from": "human",
"value": "import { expect } from 'chai'\nimport { join } from 'path'\nimport { HotModuleReplacementPlugin, optimize } from 'webpack'\n\nimport plugin from './base'\n\nconst saguiPath = join(__dirname, '../..... | javascript | chosen |
[
{
"from": "system",
"value": "Remove Babel dependency and convert to standard code style\n"
},
{
"from": "human",
"value": "/** @babel */\n\nfunction wrap (manager, callbacks) {\n let klass = new SnippetHistoryProvider(manager);\n return new Proxy(manager, {\n get (target, name) {\n if... | javascript | chosen |
[
{
"from": "system",
"value": "Print electron version on boot\n"
},
{
"from": "human",
"value": "\nimport mklog from '../util/log'\nexport const logger = new mklog.Logger()\nexport default logger\n"
},
{
"from": "gpt",
"value": "\nimport mklog from '../util/log'\nexport const logger =... | javascript | chosen |
[
{
"from": "system",
"value": "Refresh the localstorage when edit profile. Can refresh page\n"
},
{
"from": "human",
"value": "// our packages\nimport * as ActionTypes from '../actionTypes';\n\nconst initialState = () => ({\n token: localStorage.getItem('user.token'),\n user: JSON.parse(localSt... | javascript | chosen |
[
{
"from": "system",
"value": "Remove unused mapStateToProps to avoid rerender in hot loop\n"
},
{
"from": "human",
"value": "import React from \"react\";\nimport { connect } from \"react-redux\";\nimport { previous, play, pause, stop, next } from \"../../actionCreators\";\n\nconst ActionButtons ... | javascript | chosen |
[
{
"from": "system",
"value": "Extend fs mock with returned watcher object\n"
},
{
"from": "human",
"value": "const files = {}\nconst watchers = {}\n\nmodule.exports = {\n writeFileSync (file, data) {\n files[file] = data\n if (watchers[file]) {\n watchers[file]('change', file)\n }... | javascript | chosen |
[
{
"from": "system",
"value": "Print usage if no files are specified\n"
},
{
"from": "human",
"value": "#!/usr/bin/env node\n\nvar fs = require( 'fs' );\nvar IndentChecker = require( '../lib/indent-checker' );\n\nvar args = process.argv.slice( 2 );\nvar files = args.filter( function( arg ) {\n\tr... | javascript | chosen |
[
{
"from": "system",
"value": "Test click event in picture component\n"
},
{
"from": "human",
"value": "require('./../dom-mock').default('<html><body></body></html>');\n\nimport jsdom from 'mocha-jsdom';\nimport assert from 'assert';\nimport React from 'react';\nimport TestUtils from 'react-addon... | javascript | chosen |
[
{
"from": "system",
"value": "Check targets for env preset\n\n"
},
{
"from": "human",
"value": "// Licensed under the Apache License, Version 2.0 (the “License”); you may not\n// use this file except in compliance with the License. You may obtain a copy of\n// the License at\n//\n// http://www.a... | javascript | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.