conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "Fix 'disconnected from the document' error\n\nref https://github.com/mervick/emojionearea/pull/240\n" }, { "from": "human", "value": "define([\n 'jquery'\n],\nfunction($) {\n return function() {\n var self = this;\n if (!self.sprite && self.lasyE...
javascript
chosen
[ { "from": "system", "value": "Add missing test for `Surrogate-Control` header\n\nFixes #13.\n" }, { "from": "human", "value": "var nocache = require('..')\n\nvar assert = require('assert')\nvar connect = require('connect')\nvar request = require('supertest')\n\ndescribe('nocache', function () {\...
javascript
chosen
[ { "from": "system", "value": "Add spec for endpoints function\n" }, { "from": "human", "value": "/* eslint import/no-extraneous-dependencies: [\"error\", {\"devDependencies\": true}] */\n/* eslint-env node, mocha */\nimport test from 'ava';\nimport endpoint from '../src/endpoint';\n\ntest('happy...
javascript
chosen
[ { "from": "system", "value": "Fix an issue with redirects" }, { "from": "human", "value": "import './main.sass'\nimport 'babel-core/polyfill'\n\nimport React from 'react'\nimport thunk from 'redux-thunk'\nimport createLogger from 'redux-logger'\nimport { Router } from 'react-router'\nimport crea...
javascript
chosen
[ { "from": "system", "value": "Use promises instead of callbacks in test\n" }, { "from": "human", "value": "var ienoopen = require('..')\n\nvar assert = require('assert')\nvar connect = require('connect')\nvar request = require('supertest')\n\ndescribe('ienoopen', function () {\n beforeEach(func...
javascript
chosen
[ { "from": "system", "value": "Change method of loading index.html\n" }, { "from": "human", "value": "'use strict';\n\nconst electron = require('electron');\nconst { app, BrowserWindow } = electron;\n\nlet mainWindow; // Ensures garbage collection does not remove the window\n\napp.on('ready', () ...
javascript
chosen
[ { "from": "system", "value": "Order tests to match source\n" }, { "from": "human", "value": "'use strict';\n\nvar expect = require('chai').expect;\nvar rm = require('../');\n\ndescribe('1rm', function () {\n\n // 400# x 4\n var expectations = {\n brzycki: 436,\n epley: 453,\n land...
javascript
chosen
[ { "from": "system", "value": "Change tests to assert style\n" }, { "from": "human", "value": "var expect = require('chai').expect,\n hh = require('../index');\n\ndescribe('#method', function () {\n it('hh.method is a function', function () {\n expect(hh.method).a('function');\n }...
javascript
chosen
[ { "from": "system", "value": "Add res.end() to end the POST request\n\n@chinedufn Line 24 is where I get the contents of `req.body` in order to get the text from the textbox\nthe problem is I believe it should be `req.body.text` like the example\non the 'body-parser' page shows.\n" }, { "from": "hu...
javascript
chosen
[ { "from": "system", "value": "Fix exceptions when application region or date is undefined\n" }, { "from": "human", "value": "Meteor.subscribe('regions');\nMeteor.subscribe('applications');\n\nTemplate.applications.helpers({\n applications: function() {\n return Applications.find({}, {limit: ...
javascript
chosen
[ { "from": "system", "value": "Correct CSS class name typo\n" }, { "from": "human", "value": "import React from 'react/addons';\nimport Backbone from 'backbone';\nimport Router from 'react-router';\n\nexport default React.createClass({\n displayName: \"Name\",\n\n propTypes: {\n prov...
javascript
chosen
[ { "from": "system", "value": "Update webpack copy plugin configuration\n" }, { "from": "human", "value": "const path = require('path');\nconst webpack = require('webpack');\nconst { CleanWebpackPlugin } = require('clean-webpack-plugin');\nconst HtmlWebpackPlugin = require('html-webpack-plugin');...
javascript
chosen
[ { "from": "system", "value": "Stop terrible idea; make reporter block do something\n" }, { "from": "human", "value": "(function(ext) {\n // Cleanup function when the extension is unloaded\n ext._shutdown = function() {};\n\n // Status reporting code\n // Use this to report missing ha...
javascript
chosen
[ { "from": "system", "value": "Add log message about starting in the emulator\n" }, { "from": "human", "value": "/* global Pebble navigator */\nfunction pebbleSuccess(e) {\n // do nothing\n}\nfunction pebbleFailure(e) {\n console.error(e);\n}\n\nvar reportPhoneBatt;\n\nPebble.addEventListener('...
javascript
chosen
[ { "from": "system", "value": "Use native Date() instead of window date\n" }, { "from": "human", "value": "Elm.Native.Now = {};\n\nElm.Native.Now.make = function(localRuntime) {\n\n localRuntime.Native = localRuntime.Native || {};\n\n\n localRuntime.Native.Now = localRuntime.Native.Now || {};\n...
javascript
chosen
[ { "from": "system", "value": "Test store, dispatch, and state\n" }, { "from": "human", "value": "\n'use strict';\n\n/* Unit tests for file client/scripts/arcademode/store/configureStore.js. */\nimport { expect } from 'chai';\nimport configureStore from '../../../../../client/scripts/arcademode/s...
javascript
chosen
[ { "from": "system", "value": "Update up to changes in es5-ext\n" }, { "from": "human", "value": "// Return promise for given async function\n\n'use strict';\n\nvar f = require('es5-ext/lib/Function/functionalize')\n , concat = require('es5-ext/lib/List/concat').call\n , slice = require('...
javascript
chosen
[ { "from": "system", "value": "Use NavigationTab in InterestGroup list\n" }, { "from": "human", "value": "import styles from './InterestGroup.css';\nimport React from 'react';\nimport InterestGroup from './InterestGroup';\nimport Button from 'app/components/Button';\nimport { Link } from 'react-r...
javascript
chosen
[ { "from": "system", "value": "Update for new postcss promises\n" }, { "from": "human", "value": "'use strict';\n\nvar stylefmt = require('stylefmt');\nvar data = '';\n\n// Get options if needed\nif (process.argv.length > 2) {\n var opts = JSON.parse(process.argv[2]);\n process.chdir(opts.file_...
javascript
chosen
[ { "from": "system", "value": "Use tab size from Chrome storage\n" }, { "from": "human", "value": "'use strict';\n\n/**\n * Returns a BlockingResponse object with a redirect URL if the request URL\n * matches a file type extension.\n *\n * @param {object} request\n * @return {object|undefined} th...
javascript
chosen
[ { "from": "system", "value": ":wrench: Set endOfLine to \"lf\" in prettier-config\n" }, { "from": "human", "value": "module.exports = {\n printWidth: 100,\n tabWidth: 2,\n useTabs: false,\n semi: true,\n singleQuote: true,\n quoteProps: 'consistent',\n trailingComma: 'all',\n bracketSpac...
javascript
chosen
[ { "from": "system", "value": "Remove chrome warnings during e2e tests\n" }, { "from": "human", "value": "(function () {\n 'use strict';\n var extend = require('extend'),\n defaults = require('./protractor.conf');\n\n exports.config = extend(defaults.config, {\n // --- uncomment to use...
javascript
chosen
[ { "from": "system", "value": "Move code to correct semantics in spec\n" }, { "from": "human", "value": "describe(\"Implement queue with two stacks\", function() {\n const Queue = new QueueTwoStacks(); \n Queue.enqueue(1);\n Queue.enqueue(2);\n Queue.enqueue(3);\n\n describe(\"enqueue()\", f...
javascript
chosen
[ { "from": "system", "value": "Add console statements for initial notification\n" }, { "from": "human", "value": "import React from 'react';\nimport './TicTacToe.scss';\nimport { connect } from 'react-redux';\nimport ticTacToeActions from 'actions/tictactoe';\n\nimport GameBoard from '...
javascript
chosen
[ { "from": "system", "value": "Add missing model dependency for canvas model test\n" }, { "from": "human", "value": "import { moduleForModel, test } from 'ember-qunit';\n\nmoduleForModel('canvas', 'Unit | Model | canvas', {\n // Specify the other units that are required for this test.\n needs: ...
javascript
chosen
[ { "from": "system", "value": "Update atom state before calling watches\n" }, { "from": "human", "value": "class Atom {\n constructor(state) {\n this.state = state;\n this.watches = {};\n }\n\n reset(state) {\n return this._change(state);\n }\n\n swap(f, ...args) {\n return this....
javascript
chosen
[ { "from": "system", "value": "Update case sensitivity test to capture errors on first require\n\nas this throws on case sensitive systems.\n" }, { "from": "human", "value": "var test = require(\"test\");\nrequire(\"a\");\ntry {\n require(\"A\");\n test.assert(false, \"should fail to requir...
javascript
chosen
[ { "from": "system", "value": "Use initial state instead of setting folder manually\n" }, { "from": "human", "value": "/* @flow */\n\nimport * as Constants from '../constants/favorite'\nimport {logoutDone} from '../constants/login'\nimport type {FavoriteAction} from '../constants/favorite'\nimpor...
javascript
chosen
[ { "from": "system", "value": "Include JS and XTK in build\n" }, { "from": "human", "value": "var gulp = require ('gulp');\n\n\ngulp.task ( 'html', ['css'], function() {\n gulp.src('src/main/resources/html/**')\n .pipe ( gulp.dest( './build/') );\n\n gulp.src('src/test/resources/**')\n .pipe ...
javascript
chosen
[ { "from": "system", "value": "enhancement: Select themes as radio buttons\n" }, { "from": "human", "value": "import React from 'react';\nimport PropTypes from 'prop-types';\nimport { Switch } from '@blueprintjs/core';\nimport { Themes } from '../../../containers/enums';\n\nconst ColorsPanel = ({...
javascript
chosen
[ { "from": "system", "value": "Check for new release in 10 minutes intervals\n" }, { "from": "human", "value": "const url_for_static = require('../base/url').url_for_static;\nconst moment = require('moment');\n\nconst check_new_release = function() { // calling this method is handled by G...
javascript
chosen
[ { "from": "system", "value": "Add key to sidebar links\n" }, { "from": "human", "value": "// @flow\nimport React, { Component } from 'react'\nimport { Link } from 'react-router'\n\nimport s from './Sidebar.scss'\n\nexport default class Sidebar extends Component {\n constructor (props) {\n su...
javascript
chosen
[ { "from": "system", "value": "Add support for beforeEach / afterEach to ember-dev assertions.\n" }, { "from": "human", "value": "/* globals QUnit */\n\nexport default function setupQUnit(assertion, _qunitGlobal) {\n var qunitGlobal = QUnit;\n\n if (_qunitGlobal) {\n qunitGlobal = _qunitGlob...
javascript
chosen
[ { "from": "system", "value": "Add fingerprinting for troubleshooter deployed app\n" }, { "from": "human", "value": "/* global require, module */\nvar EmberAddon = require('ember-cli/lib/broccoli/ember-addon');\n\nmodule.exports = function (defaults) {\n var app = new EmberAddon(defaults, {\n ...
javascript
chosen
[ { "from": "system", "value": "fix(shape): Update shape-basic to the latest version\n" }, { "from": "human", "value": "\"use strict\";\n\nconst Rectangle = require('../lib/Rectangle');\nconst cursor = require('kittik-cursor').create().resetTTY();\n\nRectangle.create({text: 'Text here!', x: 'cente...
javascript
chosen
[ { "from": "system", "value": "Add JSON content type to authenticate headers" }, { "from": "human", "value": "import Ember from 'ember';\nimport Base from 'ember-simple-auth/authenticators/base';\nimport Configuration from '../configuration';\n\nconst { get, isEmpty, inject: { service }, RSVP: { ...
javascript
chosen
[ { "from": "system", "value": "Fix importmap loading on production\n" }, { "from": "human", "value": "// Configure your import map in config/importmap.rb. Read more: https://github.com/rails/importmap-rails\n\nimport \"@hotwired/turbo-rails\"\n\nimport './controllers'\n" }, { "from": "gpt...
javascript
chosen
[ { "from": "system", "value": "Call any previous beforeRender() once we're done with ours\n" }, { "from": "human", "value": "import { options } from 'preact';\n\nlet currentIndex;\nlet component;\n\noptions.beforeRender = function (vnode) {\n\tcomponent = vnode._component;\n\tcurrentIndex = 0;\n}...
javascript
chosen
[ { "from": "system", "value": "Fix ARCSPC-45: Handle radio button form action setting correctly\n" }, { "from": "human", "value": "$(function () {\n $('input[type=\"file\"]').on('change', function (e) {\n if ($(this).val()) {\n $('input[type=\"submit\"]').prop('disabled', false);\n }\...
javascript
chosen
[ { "from": "system", "value": "Add isSourceType to base template object\n" }, { "from": "human", "value": "var CustomListItemView = require('cartodb3/components/custom-list/custom-list-item-view');\nvar _ = require('underscore');\n\nmodule.exports = CustomListItemView.extend({\n\n render: functi...
javascript
chosen
[ { "from": "system", "value": ":lipstick: Use 'border-box' as default box sizing\n" }, { "from": "human", "value": "export default function() {\n\treturn `\n\t\thtml {\n\t\t\theight: 100%;\n\t\t\toverflow-y: scroll;\n\t\t}\n\n\t\tbody {\n\t\t\tfont-family: 'Lato', sans-serif;\n\t\t\tfont-size: 14...
javascript
chosen
[ { "from": "system", "value": "Fix bug in IE8 undefined returns as object\n" }, { "from": "human", "value": "define([\n], function () {\n\n /**\n * @exports is-defined\n *\n * Helper which checks whether a variable is defined or not.\n *\n * @param {*} check The...
javascript
chosen
[ { "from": "system", "value": "Rollback model when modal is closed" }, { "from": "human", "value": "VtTracker.SisterModalController = Ember.ObjectController.extend({\n needs: ['districtSistersIndex', 'application'],\n\n districts: Ember.computed.alias('controllers.application.model'),\n\n moda...
javascript
chosen
[ { "from": "system", "value": "Select next item with j key\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// @version ...
javascript
chosen
[ { "from": "system", "value": "Disable pointer-events of outline items\n" }, { "from": "human", "value": "// @flow\nimport styled, { css } from 'styled-components'\n\nimport * as vars from 'settings/styles'\nimport * as colors from 'settings/colors'\n\ntype Props = {\n depth: '1' | '2' | '3' | '...
javascript
chosen
[ { "from": "system", "value": ":no_entry: Throw error if no config is found\n" }, { "from": "human", "value": "'use babel'\n\n/* @flow */\n\nimport Path from 'path'\nimport {findCached} from './common'\nimport {CONFIG_FILE_NAME} from '../defaults'\n\nexport async function findRoot(directory: stri...
javascript
chosen
[ { "from": "system", "value": "Set reroute to index.html for /search/*, /profile/*, /repo/*\n" }, { "from": "human", "value": "// Load required modules\nvar http = require('http'), // http server core module\n port = 8080,\n timeNow = new Date().toLocaleString('en-US', {hour12...
javascript
chosen
[ { "from": "system", "value": "Initialize the ‘ValidationError’ class as a subclass of the ‘Validation’ class\n" }, { "from": "human", "value": "/**\n * Validation\n *\n * @constructor\n * @param {object} options\n */\nvar Validation = function(options) {\n\n // Save a reference to the ‘this’\n ...
javascript
chosen
[ { "from": "system", "value": "Declare undefined as parameter to make sure it is actually undefined\n\nSince undefined is a property of the global object, its value may be replaced,\ne.g. due to programming mistakes:\n\n if (undefined = myobject){ // programming mistake which assigns undefined\n // ...\n...
javascript
chosen
[ { "from": "system", "value": "layout: Align option icon in Lightbox screen\n\nIcon was not properly aligned due to overlay of unreadCount.\n\nAs there is no need of unreadCount here, Instead of using NavButton,\nuse Icon component directly.\n\nFixes #3003.\n" }, { "from": "human", "value": "/* @...
javascript
chosen
[ { "from": "system", "value": "Update docs for docute v3.0.0\n" }, { "from": "human", "value": "self.$config = {\n landing: false,\n debug: false,\n repo: 'soruly/whatanime.ga',\n twitter: 'soruly',\n url: 'https://whatanime.ga',\n sidebar: true,\n disableSidebarToggle: false,\n nav: {\n ...
javascript
chosen
[ { "from": "system", "value": "Add filtering feature to base Mapped Objects component\n" }, { "from": "human", "value": "/*!\n Copyright (C) 2016 Google Inc., authors, and contributors\n Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file>\n */\n\n(function (can, GGRC) {\n...
javascript
chosen
[ { "from": "system", "value": "Remove the default added resource when add a role\n" }, { "from": "human", "value": "import Route from '@ember/routing/route';\nimport { inject as service } from '@ember/service';\nimport { get } from '@ember/object';\nimport { hash } from 'rsvp';\n\nexport default ...
javascript
chosen
[ { "from": "system", "value": "Update and refactor MainCtrl spec\n\nWhoops, #197 broke that spec. Used the opportunity to refactor the file\na bit.\n" }, { "from": "human", "value": "\"use strict\";\n\ndescribe('MainCtrl', function() {\n beforeEach(module('arethusa'));\n\n it('sets scope values...
javascript
chosen
[ { "from": "system", "value": "Fix regression in displaying a thumbnail for newly selected images on FileBrowseField.\n" }, { "from": "human", "value": "function FileSubmit(FilePath, FileURL, ThumbURL, FileType) {\n\n // var input_id=window.name.split(\"___\").join(\".\");\n var input_id=wi...
javascript
chosen
[ { "from": "system", "value": "Add transition failure to appearance\n" }, { "from": "human", "value": "import Component from '@ember/component';\nimport { inject as service } from '@ember/service';\nimport { task } from 'ember-concurrency';\n\nexport default Component.extend({\n store: service()...
javascript
chosen
[ { "from": "system", "value": "Add additinonalFields support to GetServices\n" }, { "from": "human", "value": "'use strict';\n\nangular.module('adagios.live')\n\n .constant('filterSuffixes', { contains: '__contains',\n has_fields: '__has_field',\n ...
javascript
chosen
[ { "from": "system", "value": "Use production build of React when deploying\n" }, { "from": "human", "value": "const path = require('path');\nconst webpack = require('webpack');\nconst CopyWebpackPlugin = require('copy-webpack-plugin');\n\nconst config = {\n entry: {\n 'bundle': './client/js/...
javascript
chosen
[ { "from": "system", "value": "Build in production mode so React includes less\n" }, { "from": "human", "value": "var path = require('path');\nvar webpack = require('webpack');\n\n\nmodule.exports = {\n entry: [\n './examples/index'\n ],\n\toutput: {\n path: path.join(__dirname, 'examples...
javascript
chosen
[ { "from": "system", "value": "Check for new audio data as fast as possible from javascript (may eat CPU)\n" }, { "from": "human", "value": "setTimeout( function() {\n\n\tvar util = require( \"util\" );\n\n\tprocess.on('uncaughtException', function (err) {\n\t console.error(err);\n\t console.lo...
javascript
chosen
[ { "from": "system", "value": "Add copy to hue restults page.\n" }, { "from": "human", "value": "import React, {Component} from 'react';\nimport Chart from './Chart'\n\nclass HueResult extends Component {\n constructor(props) {\n super(props);\n }\n \n render(){\n return (\n ...
javascript
chosen
[ { "from": "system", "value": "Make output text not die on null value.\n\n@bug W-@\n\n@rev eric.anderson@\n" }, { "from": "human", "value": "/*\n * Copyright (C) 2013 salesforce.com, inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file excep...
javascript
chosen
[ { "from": "system", "value": "Apply ghosted styles to past arrivals\n" }, { "from": "human", "value": "import Ember from 'ember';\nimport moment from 'moment';\nimport stringToHue from 'bus-detective/utils/string-to-hue';\nvar inject = Ember.inject;\n\nexport default Ember.Component.extend({\n ...
javascript
chosen
[ { "from": "system", "value": "Set up cache buster to RequireJS\n" }, { "from": "human", "value": "require(\n {\n paths: {\n assert: 'src/assert',\n bunit: 'src/bunit'\n }\n },\n ['bunit', 'tests/tests'],\n function(bunit, tests) {\n require....
javascript
chosen
[ { "from": "system", "value": "Add comment before googleapis.discover call" }, { "from": "human", "value": "var googleapis = require('googleapis');\n\n/*\n Example of using google apis module to discover the URL shortener module, and shorten\n a url\n @param params.url : the URL to shorten\n */\n...
javascript
chosen
[ { "from": "system", "value": "Use Object and not array.\n\nInstead of using `info = []`. To which if we try to assign properties, doesn't seem to work well. Hence, try to use object representation, which allows us to use `info.name` or assign it another object." }, { "from": "human", "value": "\...
javascript
chosen
[ { "from": "system", "value": "Add sync to start up tasks\n" }, { "from": "human", "value": "var schedule = require('node-schedule');\nvar syncTask = require('./tasks/sync');\n\n// Update entries every 30 minutes\nschedule.scheduleJob('0,30 * * * *', syncTask);\n" }, { "from": "gpt", ...
javascript
chosen
[ { "from": "system", "value": "Add shebang to the binary file\n" }, { "from": "human", "value": "export default {\n input: 'bin/capnpc-es.js',\n output: {\n file: 'dist/bin/capnpc-es.js',\n format: 'cjs'\n }\n};\n" }, { "from": "gpt", "value": "export default {\n input: 'bin...
javascript
chosen
[ { "from": "system", "value": "Make `navbar-light` the default type class.\n" }, { "from": "human", "value": "import Ember from 'ember';\nimport Navbar from 'ember-bootstrap/components/base/bs-navbar';\n\nexport default Navbar.extend({\n classNameBindings: ['breakpointClass', 'backgroundClass'],...
javascript
chosen
[ { "from": "system", "value": "Add the icon to the devtools panel\n\nRelated to #95.\n" }, { "from": "human", "value": "chrome.devtools.panels.create(\n 'Redux', null, 'devpanel.html', function(panel) {}\n);\n" }, { "from": "gpt", "value": "chrome.devtools.panels.create(\n 'Redux', ...
javascript
chosen
[ { "from": "system", "value": "Return value from bindings method\n" }, { "from": "human", "value": "'use strict';\n\nconst bindings = process.atomBinding('shell');\n\nexports.beep = bindings.beep;\nexports.moveItemToTrash = bindings.moveItemToTrash;\nexports.openItem = bindings.openItem;\nexports...
javascript
chosen
[ { "from": "system", "value": "Make error message more helpful by providing name\n" }, { "from": "human", "value": "FactoryBoy = {};\nFactoryBoy._factories = [];\n\nFactory = function (name, collection, attributes) {\n this.name = name;\n this.collection = collection;\n this.attributes = attri...
javascript
chosen
[ { "from": "system", "value": "Test for a model without texture\n" }, { "from": "human", "value": "/**\n*\n*\n* Shows: special features for models\n* Requires:\n**/\n\nshowcase.specials = {}\nshowcase.specials.inlinespace = 'inlinespace__'\n\nshowcase.specials.onLoaded = function () {\n\tvar skin...
javascript
chosen
[ { "from": "system", "value": "Change secure hash example to output hex" }, { "from": "human", "value": "var mongoose = require('mongoose'),\n\tcrypto = require('crypto'),\n\n\tSchema = mongoose.Schema,\n\n\tUser = new Schema({\n\t\tusername: {\n\t\t\ttype: String,\n\t\t\tunique: true,\n\t\t\treq...
javascript
chosen
[ { "from": "system", "value": "Create the MapView on beforeRender\n\nThis was the source of much confusion. Think of the previous code as\nhaving mapView as a class attribute. Meaning it wasn't being correctly\nremoved from the app.\n" }, { "from": "human", "value": "define(['backbone', 'core/vie...
javascript
chosen
[ { "from": "system", "value": "feat: Format pie-date to proper format each time model change\n\n" }, { "from": "human", "value": "import Ember from 'ember';\nimport $ from 'jquery';\n\nexport default Ember.Controller.extend({\n spendingsMeter: 0.00,\n sumByCategory: null,\n\n watchAddSpending:...
javascript
chosen
[ { "from": "system", "value": "Move parser construction outside parse function to fix performance hit\n" }, { "from": "human", "value": "'use strict';\n\nvar DefaultStack = require('./stacks/default');\nvar entityMap = require('html-tokenizer/entity-map');\n// @TODO examine other tokenizers or pa...
javascript
chosen
[ { "from": "system", "value": "Add a working logout link.\n" }, { "from": "human", "value": "{\n angular.module('meganote.users')\n .directive('userLinks', [\n\n 'CurrentUser',\n (CurrentUser) => {\n\n class UserLinksController {\n user() {\n return Curren...
javascript
chosen
[ { "from": "system", "value": "Remove named define for webpack\n" }, { "from": "human", "value": "var webpack = require(\"webpack\");\nvar CopyWebpackPlugin = require(\"copy-webpack-plugin\");\nvar path = require(\"path\");\n\nmodule.exports = {\n entry: \"./src/com/mendix/widget/badge/Badge.t...
javascript
chosen
[ { "from": "system", "value": "Add --inline autorefreshing to webpack dev server\n" }, { "from": "human", "value": "const path = require('path');\nconst webpack = require('webpack');\n\nmodule.exports = {\n entry: {\n home: path.join(__dirname, 'app/src/home'),\n },\n\n module: {\n loade...
javascript
chosen
[ { "from": "system", "value": "Implement workaround to fix JS not loading issue\n" }, { "from": "human", "value": "/* global require, module, __dirname */\n\nconst path = require( 'path' );\n\nmodule.exports = {\n\tentry: {\n\t\t'./assets/js/amp-blocks-compiled': './blocks/index.js',\n\t\t'./asse...
javascript
chosen
[ { "from": "system", "value": "feat(repo): Include module name in AMD definition\n\nRequireJS needs to know which name to register an AMD module under. The name was previously mixing; this PR fixes that.\n" }, { "from": "human", "value": "'use strict';\nvar webpack = require('webpack');\nvar Lod...
javascript
chosen
[ { "from": "system", "value": "Add search results to, well, search results page\n" }, { "from": "human", "value": "define(['react'], function(React) {\n var SearchResults = React.createClass({\n render: function() {\n return React.DOM.div({}, this.props.query);\n }\n ...
javascript
chosen
[ { "from": "system", "value": "Use the correct dep \"BitcoindNode\"\n" }, { "from": "human", "value": "'use strict';\n\nvar should = require('chai').should();\nvar bitcoinlib = require('../../');\nvar sinon = require('sinon');\nvar Chain = bitcoinlib.RPCNode.Chain;\n\ndescribe('Bitcoind Chain', f...
javascript
chosen
[ { "from": "system", "value": "Update controller template for proper filter usage.\n" }, { "from": "human", "value": "const {\n ActionController\n} = require('backrest')\n\nclass ApplicationController extends ActionController.Base {\n\n get before() {\n return [\n { action: this._setHea...
javascript
chosen
[ { "from": "system", "value": "Fix the ggj route setup\n" }, { "from": "human", "value": "const routeRegex = /^\\/(global-game-jam-2021|globalgamejam2021|ggj2021|ggj21)(?:\\/.*)?$/;\n\nconst githubUrl = 'https://levilindsey.github.io/global-game-jam-2021';\n\n// Attaches the route handlers for th...
javascript
chosen
[ { "from": "system", "value": "Add validator for courier name\n" }, { "from": "human", "value": "define(['backbone'], function(Backbone) {\n \n return Backbone.Model.extend({\n idAttribute: 'SHIPPINGID',\n urlRoot: '/shipment/shipments',\n \n /*\n Validators for shipment, us...
javascript
chosen
[ { "from": "system", "value": "Fix CI failure due to missing thing the component needs to render\n\n[ci skip]\n[#PREP-135]\n" }, { "from": "human", "value": "import { moduleForComponent, test } from 'ember-qunit';\nimport hbs from 'htmlbars-inline-precompile';\n\nmoduleForComponent('search-result...
javascript
chosen
[ { "from": "system", "value": "Update status and Chart transitions\n" }, { "from": "human", "value": "import Model from 'ember-data/model';\nimport DS from 'ember-data';\nimport { validator, buildValidations } from 'ember-cp-validations';\n\nconst Validations = buildValidations({\n title: valida...
javascript
chosen
[ { "from": "system", "value": "Use profile id if display name is null\n\n- closes #54\n" }, { "from": "human", "value": "'use strict';\n\n/**\n * Module dependencies.\n */\nvar passport = require('passport'),\n refresh = require('passport-oauth2-refresh'),\n SpotifyStrategy = require('passport-...
javascript
chosen
[ { "from": "system", "value": "Fix 6547 test case to account for new formatTime return\n" }, { "from": "human", "value": "function runTest()\r\n{\r\n FBTest.sysout(\"issue6547.START\");\r\n\r\n FBTest.openNewTab(basePath + \"cookies/6547/issue6547.php\", function(win)\r\n {\r\n FB...
javascript
chosen
[ { "from": "system", "value": "Improve status chain logging output\n" }, { "from": "human", "value": "module.exports = function (context, statusChain) {\n context.log.debug(`Reducing status chain ${statusChain}`);\n\n const reduced = statusChain.reduce((overallStatus, currentStatus) => {\n i...
javascript
chosen
[ { "from": "system", "value": "Add local base url (only used for hostname robertpainsi.localhost.io)\n" }, { "from": "human", "value": "\"use strict\";\n\nvar URLS = (function() {\n var BASE = 'https://raw.githubusercontent.com/robertpainsi/robertpainsi.github.data/master/';\n\n return {\n ...
javascript
chosen
[ { "from": "system", "value": "Test should not rely on setTimeout" }, { "from": "human", "value": "'use strict';\n\nvar conjoiners = require('../lib/conjoiners');\n\nexports['simple inter-process communication'] = function(test) {\n test.expect(3);\n\n var value = 'test_value';\n var cj1...
javascript
chosen
[ { "from": "system", "value": "Add title to mongoose caption schema\n" }, { "from": "human", "value": "var mongoose = require('mongoose');\n\nvar captionSchema = new mongoose.Schema({\n _id: { type: String, unique: true},\n url: String,\n captions: [{\n start: Number,\n dur: Number,\...
javascript
chosen
[ { "from": "system", "value": "fix(filter-options): Allow --private to be configured from file\n" }, { "from": "human", "value": "\"use strict\";\n\nconst dedent = require(\"dedent\");\n\nmodule.exports = filterOptions;\n\nfunction filterOptions(yargs) {\n // Only for 'run', 'exec', 'clean', 'ls...
javascript
chosen
[ { "from": "system", "value": "Add text to test the server is working\n" }, { "from": "human", "value": "import express from 'express';\nimport extensions from './extensions';\n\nconst app = express();\n\napp.use('/extensions', extensions);\n\nexport default app;\n" }, { "from": "gpt", ...
javascript
chosen
[ { "from": "system", "value": "Add comments and check for virtual files\n" }, { "from": "human", "value": "/* @flow */\n\nimport path from 'path'\n\nimport State from '../State'\nimport File from '../File'\nimport Rule from '../Rule'\n\nimport type { Command, OptionsInterface, Phase } from '../ty...
javascript
chosen
[ { "from": "system", "value": "Fix tag update when there's no tag\n" }, { "from": "human", "value": "\n(function() {\n 'use strict';\n\n angular.module('dimApp').component('dimItemTag', {\n controller: ItemTagController,\n bindings: {\n item: '='\n },\n template: `\n <sele...
javascript
chosen
[ { "from": "system", "value": "Comment this out for now\n" }, { "from": "human", "value": "/*\n * Serve content over a socket\n */\n\nmodule.exports = function (socket) {\n socket.emit('send:name', {\n name: 'Bob'\n });\n};\n" }, { "from": "gpt", "value": "/*\n * Serve content ov...
javascript
chosen