hash
stringlengths
40
40
diff
stringlengths
172
2.63k
message
stringlengths
12
593
project
stringlengths
7
65
split
stringclasses
1 value
diff_languages
stringclasses
54 values
c5a6ca91193e8903a147e84f4bad53b20151da5d
diff --git a/packages/starrating/src/react/star.js b/packages/starrating/src/react/star.js index <HASH>..<HASH> 100644 --- a/packages/starrating/src/react/star.js +++ b/packages/starrating/src/react/star.js @@ -122,9 +122,15 @@ class Star extends React.PureComponent { onMouseEnter={this.handleEnter} onMouseLeave={this.handleLeave} > - {appearance === 'full' && <Icon id={Icon.ids.starFill} size={size} />} - {appearance === 'empty' && <Icon id={Icon.ids.star} size={size} />} - {appearance === 'half' && ( + {appearance === APPEARANCES.full && ( + <Icon id={Icon.ids.starFill} size={size} /> + )} + + {appearance === APPEARANCES.empty && ( + <Icon id={Icon.ids.star} size={size} /> + )} + + {appearance === APPEARANCES.half && ( <HalfStarIcon size={size} themeName={themeName} /> )} </Tag>
refactor(starrating): remove magic strings on Star
pluralsight_design-system
train
js
3449042e84c9d68583edfebf06dcd935b760be5f
diff --git a/airtest/core/settings.py b/airtest/core/settings.py index <HASH>..<HASH> 100644 --- a/airtest/core/settings.py +++ b/airtest/core/settings.py @@ -9,7 +9,7 @@ class Settings(object): LOG_DIR = None LOG_FILE = "log.txt" RESIZE_METHOD = staticmethod(cocos_min_strategy) - CVSTRATEGY = ["tpl", "surf"] # keypoint matching: kaze/brisk/akaze/orb, contrib: sift/surf/brief + CVSTRATEGY = ["surf", "tpl"] # keypoint matching: kaze/brisk/akaze/orb, contrib: sift/surf/brief KEYPOINT_MATCHING_PREDICTION = True THRESHOLD = 0.7 # [0, 1] THRESHOLD_STRICT = 0.7 # [0, 1]
test: surf and tpl test. (cherry picked from commit f<I>ca<I>bc<I>ace<I>c<I>a<I>ca<I>ecde8)
AirtestProject_Airtest
train
py
b2217f938adaf01c2d611e07f69bf6304e3b0543
diff --git a/lib/api-client/resources/case-execution.js b/lib/api-client/resources/case-execution.js index <HASH>..<HASH> 100644 --- a/lib/api-client/resources/case-execution.js +++ b/lib/api-client/resources/case-execution.js @@ -29,4 +29,32 @@ CaseExecution.list = function(params, done) { }); }; +CaseExecution.disable = function(executionId, params, done) { + this.http.post(this.path + '/' + executionId + '/disable', { + data: params, + done: done + }); +}; + +CaseExecution.reenable = function(executionId, params, done) { + this.http.post(this.path + '/' + executionId + '/reenable', { + data: params, + done: done + }); +}; + +CaseExecution.manualStart = function(executionId, params, done) { + this.http.post(this.path + '/' + executionId + '/manual-start', { + data: params, + done: done + }); +}; + +CaseExecution.complete = function(executionId, params, done) { + this.http.post(this.path + '/' + executionId + '/complete', { + data: params, + done: done + }); +}; + module.exports = CaseExecution;
feat(case-execution): add lifecycle methods
camunda_camunda-bpm-sdk-js
train
js
69daf3bfb0d6367a8adff5927bbdf6ef0f4e466a
diff --git a/ui/src/components/dialog-plugin/DialogPlugin.js b/ui/src/components/dialog-plugin/DialogPlugin.js index <HASH>..<HASH> 100644 --- a/ui/src/components/dialog-plugin/DialogPlugin.js +++ b/ui/src/components/dialog-plugin/DialogPlugin.js @@ -1,6 +1,5 @@ -import { h, defineComponent } from 'vue' +import { h, defineComponent, toRaw } from 'vue' -import clone from '../../utils/clone.js' import { isKeyCode } from '../../utils/key-composition.js' import QDialog from '../dialog/QDialog.js' @@ -171,7 +170,7 @@ export default defineComponent({ }, onOk () { - this.$emit('ok', clone(this.model)) + this.$emit('ok', toRaw(this.model)) this.hide() },
feat(vue3): small tweak to Dialog plugin component
quasarframework_quasar
train
js
a4d855f5938c7a345be587d1c80f77e3acb24621
diff --git a/src/index.js b/src/index.js index <HASH>..<HASH> 100644 --- a/src/index.js +++ b/src/index.js @@ -19,6 +19,7 @@ export default function({ types: t }) { } function injectReactDocgenInfo(path, state, code, t) { + const { filename } = state.file.opts; const program = path.scope.getProgramParent().path; let docgenResults = []; @@ -36,7 +37,9 @@ function injectReactDocgenInfo(path, state, code, t) { } const handlers = [...defaultHandlers, ...customHandlers, actualNameHandler]; - docgenResults = ReactDocgen.parse(code, resolver, handlers); + docgenResults = ReactDocgen.parse(code, resolver, handlers, { + filename, + }); if (state.opts.removeMethods) { docgenResults.forEach(function(docgenResult) {
fix: provide filename to babel
storybooks_babel-plugin-react-docgen
train
js
3cf4d7440289187ff57f1f341ec78c15941141d4
diff --git a/src/components/virtualRepeat/virtual-repeater.js b/src/components/virtualRepeat/virtual-repeater.js index <HASH>..<HASH> 100644 --- a/src/components/virtualRepeat/virtual-repeater.js +++ b/src/components/virtualRepeat/virtual-repeater.js @@ -393,7 +393,11 @@ VirtualRepeatContainerController.prototype.handleScroll_ = function() { var offset = this.isHorizontal() ? (ltr?this.scroller.scrollLeft : this.maxSize - this.scroller.scrollLeft) : this.scroller.scrollTop; - if (offset === this.scrollOffset || offset > this.scrollSize - this.size) return; + if (this.scrollSize < this.size) return; + if (offset > this.scrollSize - this.size) { + offset = this.scrollSize - this.size; + } + if (offset === this.scrollOffset) return; var itemSize = this.repeater.getItemSize(); if (!itemSize) return;
fix(virtual-repeat-container): support horizontal scrollbar in vertical orientation (#<I>)
angular_material
train
js
90aba7b216873752f0a9d0765e7e5396b21f3de0
diff --git a/bin/bowerSync.js b/bin/bowerSync.js index <HASH>..<HASH> 100644 --- a/bin/bowerSync.js +++ b/bin/bowerSync.js @@ -1,6 +1,7 @@ var fs = require('fs'); var bower = require('../bower.json'); var pkg = require('../package.json'); +var exec = require('child_process').exec; // Update Bower's version to follow NPM's bower.version = pkg.version;
chore: import exec to bump bower.json
yoannmoinet_requirejs-i18njs
train
js
90e80e140691f62221ba9c113f21ac451b7e3b3d
diff --git a/src/website/app/demos/Table/examples/sortablePaginated.js b/src/website/app/demos/Table/examples/sortablePaginated.js index <HASH>..<HASH> 100644 --- a/src/website/app/demos/Table/examples/sortablePaginated.js +++ b/src/website/app/demos/Table/examples/sortablePaginated.js @@ -38,7 +38,6 @@ active sort, current page, and page size. Note that the } handleSort(sort) { - console.log('pre-sort', data) const sortedData = data.slice(0).sort((a,b) => { const asc = defaultSortComparator(a,b,sort.key); const desc = asc * -1; @@ -51,7 +50,6 @@ active sort, current page, and page size. Note that the } handlePageChange(currentPage) { - console.log('post-sort', this.state.data) this.setState({ currentPage }) }
chore(website): Remove console.log from example code
mineral-ui_mineral-ui
train
js
bfee7bd93848d43cac582999d1ff7f971646cd17
diff --git a/webapps/ui/cockpit/plugins/jobDefinition/app/views/processDefinition/jobDefinitionTable.js b/webapps/ui/cockpit/plugins/jobDefinition/app/views/processDefinition/jobDefinitionTable.js index <HASH>..<HASH> 100644 --- a/webapps/ui/cockpit/plugins/jobDefinition/app/views/processDefinition/jobDefinitionTable.js +++ b/webapps/ui/cockpit/plugins/jobDefinition/app/views/processDefinition/jobDefinitionTable.js @@ -51,7 +51,6 @@ var Controller = [ }); function updateView(filter, jobDefinitions) { - $scope.jobDefinitions = null; var activityIds = filter.activityIds; @@ -64,7 +63,6 @@ var Controller = [ var jobDefinitionSelection = []; angular.forEach(jobDefinitions, function(jobDefinition) { - var activityId = jobDefinition.activityId; if (activityIds.indexOf(activityId) != -1) {
chore(cockpit): minor cleanup
camunda_camunda-bpm-platform
train
js
7eeaa10f3af510b3d5a95a8db4f0478609181e78
diff --git a/lib/plugins/aws/deploy/index.js b/lib/plugins/aws/deploy/index.js index <HASH>..<HASH> 100644 --- a/lib/plugins/aws/deploy/index.js +++ b/lib/plugins/aws/deploy/index.js @@ -68,9 +68,7 @@ class AwsDeploy { this.hooks = { 'initialize': () => { - const isDeployCommand = - this.serverless.processedInput.commands.length === 1 && - this.serverless.processedInput.commands[0] === 'deploy'; + const isDeployCommand = this.serverless.processedInput.commands.join(' ') === 'deploy'; if (isDeployCommand && !this.options.function) { log.notice( `\nDeploying ${this.serverless.service.service} to stage ${this.serverless
refactor: Simplify condition
serverless_serverless
train
js
a0f930bc04b3b37c834bc1f65190f7b39e8601f2
diff --git a/src/stripeElements.js b/src/stripeElements.js index <HASH>..<HASH> 100644 --- a/src/stripeElements.js +++ b/src/stripeElements.js @@ -52,7 +52,7 @@ function init(elementType, key) { export function create( elementType, stripeKey, - stripeOtions = {}, + stripeOptions = {}, options = {} ) { let component = init(elementType, stripeKey) @@ -62,7 +62,7 @@ export function create( component = Object.assign({}, component, { elements, - element: elements.create(elementType, stripeOtions), + element: elements.create(elementType, stripeOptions), createToken: options => component.instance.createToken(component.element, options), createSource: options =>
fix: typo in stripeOptions property name...
Cl3MM_vue-stripe-better-elements
train
js
d7102b216a5104f4df513425e39987ac7c3028ad
diff --git a/models/classes/Lists/Business/Service/ValueCollectionService.php b/models/classes/Lists/Business/Service/ValueCollectionService.php index <HASH>..<HASH> 100644 --- a/models/classes/Lists/Business/Service/ValueCollectionService.php +++ b/models/classes/Lists/Business/Service/ValueCollectionService.php @@ -84,7 +84,6 @@ class ValueCollectionService extends InjectionAwareService /** * @param ValueCollection $valueCollection - * @param int $maxItems * * @return bool *
chore: Uodate PHPDoc block
oat-sa_tao-core
train
php
0878a6a3e717f047466b60b6302d0c122ee91f3e
diff --git a/src/language-css/printer-postcss.js b/src/language-css/printer-postcss.js index <HASH>..<HASH> 100644 --- a/src/language-css/printer-postcss.js +++ b/src/language-css/printer-postcss.js @@ -110,7 +110,11 @@ function genericPrint(path, options, print) { } case "css-comment": { if (node.raws.content) { - return node.raws.content; + return ( + node.raws.content + // there's a bug in the less parser that trailing `\r`s are included in inline comments + .replace(/^(\/\/[^]+)\r+$/, "$1") + ); } const text = options.originalText.slice( options.locStart(node),
fix(less): remove CRs from inline comments (#<I>) The issue here is that less parser somehow included CRs in `comment.raws.content`, but it was hidden by the wrong trailing space elimination previously, which was fixed by #<I>. We already have such tests but it's not reproducible in AppVeyor since they use LF ([`core.autocrlf=input`](<URL>)).
josephfrazier_prettier_d
train
js
2f300f95d2f3dc964fce0ab59ca60509779604d7
diff --git a/actions/comment/save.php b/actions/comment/save.php index <HASH>..<HASH> 100644 --- a/actions/comment/save.php +++ b/actions/comment/save.php @@ -83,22 +83,13 @@ if ($new_comment) { )); } - if ($entity instanceof Comment) { - $original_entity = $entity->getOriginalContainer(); - $river_action_type = 'comment:reply'; - $river_target_guid = $original_entity->guid; - } else { - $river_action_type = 'comment'; - $river_target_guid = $entity->guid; - } - // Add to river elgg_create_river_item(array( 'view' => 'river/object/comment/create', - 'action_type' => $river_action_type, + 'action_type' => 'create', 'subject_guid' => $poster->guid, - 'object_guid' => $guid, - 'target_guid' => $river_target_guid, + 'object_guid' => $comment->guid, + 'target_guid' => $entity->owner_guid, )); }
fix(river): correctly add new comments to river
hypeJunction_hypeInteractions
train
php
fec8d51e4a1df7109cc7039ea3181eb06d697bce
diff --git a/lib/testium-driver-wd.js b/lib/testium-driver-wd.js index <HASH>..<HASH> 100644 --- a/lib/testium-driver-wd.js +++ b/lib/testium-driver-wd.js @@ -39,16 +39,9 @@ const { v1: uuidV1 } = require('uuid'); const debug = require('debug')('testium-driver-wd'); const wd = require('wd'); const assert = require('assertive'); +const lighthouse = require('lighthouse'); const { ensurePuppeteerPage, getDevice } = require('./puppeteer'); -// Lighthouse uses node 8 syntax, so we need to make this optional -let lighthouse = null; -try { - lighthouse = require('lighthouse'); -} catch (e) { - if (e.name !== 'SyntaxError') throw e; -} - wd.Q.longStackSupport = true; const defaultMethods = [
fix: remove legacy lighthouse loading code
testiumjs_testium-driver-wd
train
js
faad53057cbf7bca65d0f2c6262b27090773fbb6
diff --git a/src/contract/aci/transformation.js b/src/contract/aci/transformation.js index <HASH>..<HASH> 100644 --- a/src/contract/aci/transformation.js +++ b/src/contract/aci/transformation.js @@ -41,7 +41,7 @@ export const decodeEvents = (events, schemas = []) => events.map(event => { ...event, name: schema.name, decoded: schema.types.map((type) => - decodeEventField(type === SOPHIA_TYPES.string ? event.data : params.pop(), type)) + decodeEventField(type === SOPHIA_TYPES.string ? event.data : params.shift(), type)) } }) @@ -60,7 +60,7 @@ function decodeEventField (field, type) { case SOPHIA_TYPES.hash: return toBytes(field, true).toString('hex') case SOPHIA_TYPES.address: - return addressFromDecimal(field).split('_')[1] + return addressFromDecimal(field) case SOPHIA_TYPES.string: return decode(field).toString('utf-8') default:
fix(events): fix event decoding order and address prefix
aeternity_aepp-sdk-js
train
js
2c07d5adc1a7c8d1b32fd026818585ef3ec0fc69
diff --git a/kubernetes_asyncio/config/kube_config.py b/kubernetes_asyncio/config/kube_config.py index <HASH>..<HASH> 100644 --- a/kubernetes_asyncio/config/kube_config.py +++ b/kubernetes_asyncio/config/kube_config.py @@ -326,7 +326,7 @@ class KubeConfigLoader(object): def _load_cluster_info(self): if 'server' in self._cluster: - self.host = self._cluster['server'] + self.host = self._cluster['server'].rstrip('/') if self.host.startswith("https"): self.ssl_ca_cert = FileOrData( self._cluster, 'certificate-authority',
fix: trailing slash on kube/config (#<I>)
tomplus_kubernetes_asyncio
train
py
287ce027c870c13af15fb7cc72187c113989aaf8
diff --git a/src/foremast/slacknotify/__main__.py b/src/foremast/slacknotify/__main__.py index <HASH>..<HASH> 100644 --- a/src/foremast/slacknotify/__main__.py +++ b/src/foremast/slacknotify/__main__.py @@ -21,9 +21,7 @@ def main(): logging.getLogger(__package__.split(".")[0]).setLevel(args.debug) log.debug('Parsed arguements: %s', args) - info = {'env': args.env, 'app': args.app, 'properties': args.properties} - - if "prod" not in info['env']: + if "prod" not in args.env: log.info('No slack message sent, not a production environment') else: log.info("Sending slack message, production environment")
refactor: Remove unused dictionary
foremast_foremast
train
py
ea2e54c351e97953bf4ecb78cbe43aaac22a83d4
diff --git a/packages/cozy-konnector-libs/src/libs/BaseKonnector.js b/packages/cozy-konnector-libs/src/libs/BaseKonnector.js index <HASH>..<HASH> 100644 --- a/packages/cozy-konnector-libs/src/libs/BaseKonnector.js +++ b/packages/cozy-konnector-libs/src/libs/BaseKonnector.js @@ -89,6 +89,7 @@ class BaseKonnector { */ fail(err) { log('warn', 'Error caught by BaseKonnector') + log('error', JSON.stringify(err.stack)) const error = err.message || err @@ -144,6 +145,7 @@ class BaseKonnector { }) .then(account => { this.fields = Object.assign( + {}, account.auth, account.oauth, cozyFields.folder_to_save
fix: handle old oauth accounts These accounts do not have auth attribute and Object.assign does not accept undefined as first argument
konnectors_libs
train
js
f0338d09088559c57528d054a5a9621c5fe58bed
diff --git a/test/test.js b/test/test.js index <HASH>..<HASH> 100644 --- a/test/test.js +++ b/test/test.js @@ -291,7 +291,7 @@ test('payloadLogFile', function (t) { t.plan(6) const receivedObjects = [] - const filename = path.join(os.tmpdir(), Date.now() + '.ndsjon') + const filename = path.join(os.tmpdir(), Date.now() + '.ndjson') let requests = 0 const server = APMServer(function (req, res) {
test: fix typo (#<I>)
elastic_apm-nodejs-http-client
train
js
841318b348863400945c631a4e8953cf2393a64f
diff --git a/services/datalad/tests/test_draft.py b/services/datalad/tests/test_draft.py index <HASH>..<HASH> 100644 --- a/services/datalad/tests/test_draft.py +++ b/services/datalad/tests/test_draft.py @@ -18,7 +18,7 @@ def test_add_commit_info(client): } jwt_secret = 'shhhhh' os.environ['JWT_SECRET'] = jwt_secret - access_token = jwt.encode(user, jwt_secret) + access_token = jwt.encode(user, jwt_secret).decode('utf-8') cookie = 'accessToken={}'.format(access_token) headers = { 'Cookie': cookie
fix(tests): Revert dropped decode from add_commit_info test
OpenNeuroOrg_openneuro
train
py
9403ad8fb8b36478167109eec14a3286a256a6be
diff --git a/test/common.js b/test/common.js index <HASH>..<HASH> 100644 --- a/test/common.js +++ b/test/common.js @@ -7,8 +7,7 @@ suite('common', function () { test('cloneRequest', function () { var req = new http.IncomingMessage req.headers = { foo: 'bar' } - req.rocky = {} - req.rocky.options = { foo: { bar: true }} + req.rocky = { options: { foo: { bar: true }} } var newReq = common.cloneRequest(req) expect(newReq).to.not.be.equal(req)
refactor: remove version from header
h2non_rocky
train
js
e6bb7da5a198d77435e42567f9fe8147d005dd4b
diff --git a/lib/operations/command_v2.js b/lib/operations/command_v2.js index <HASH>..<HASH> 100644 --- a/lib/operations/command_v2.js +++ b/lib/operations/command_v2.js @@ -15,6 +15,10 @@ class CommandOperationV2 extends OperationBase { this.writeConcern = resolveWriteConcern(parent, this.options); this.explain = false; + // TODO: A lot of our code depends on having the read preference in the options. This should + // go away, but also requires massive test rewrites. + this.options.readPreference = this.readPreference; + // TODO(NODE-2056): make logger another "inheritable" property if (parent.s.logger) { this.logger = parent.s.logger;
refactor: store `readPreference` in operation options This should go away in the future, but our codebase has many baked in assumptions that the readPreference will always be preesnt in passed in `options`. We also have a number of tests that directly inspect these values, which should be corrected in the future.
mongodb_node-mongodb-native
train
js
4511f460b313a8d3634aa574f0c44190728c0df8
diff --git a/src/cli.js b/src/cli.js index <HASH>..<HASH> 100644 --- a/src/cli.js +++ b/src/cli.js @@ -7,17 +7,17 @@ const args = { let file = null, skip = false; +const argv = process.argv.slice(2); for ( - let i = 2, j = 2, ref = process.argv.length; - 2 <= ref ? j < ref : j > ref; - i = 2 <= ref ? ++j : --j + let i = 0, len = argv.length; + i < len; + ++i ) { if (skip) { skip = false; continue; } - - switch (process.argv[i]) { + switch (argv[i]) { case '-n': case '--newline': args.newline = true; @@ -28,12 +28,12 @@ for ( break; case '-f': case '--fg': - args.fg = process.argv[i + 1]; + args.fg = argv[i + 1]; skip = true; break; case '-b': case '--bg': - args.bg = process.argv[i + 1]; + args.bg = argv[i + 1]; skip = true; break; case '-v': @@ -47,7 +47,7 @@ for ( process.exit(0); break; default: - file = process.argv[i]; + file = argv[i]; } }
refactor: simplify argv processing
rburns_ansi-to-html
train
js
e8fa2573257c1699dc04abce5cb54fc2d8e753ef
diff --git a/packages/d3fc-webgl/examples/candlestick.js b/packages/d3fc-webgl/examples/candlestick.js index <HASH>..<HASH> 100644 --- a/packages/d3fc-webgl/examples/candlestick.js +++ b/packages/d3fc-webgl/examples/candlestick.js @@ -14,7 +14,7 @@ const getWebglSeries = () => fc .seriesWebglCandlestick() .bandwidth(10) - .width(2); + .lineWidth(2); const zoom = d3.zoom().on('zoom', () => { x.domain(d3.event.transform.rescaleX(x2).domain()); diff --git a/packages/d3fc-webgl/examples/ohlc.js b/packages/d3fc-webgl/examples/ohlc.js index <HASH>..<HASH> 100644 --- a/packages/d3fc-webgl/examples/ohlc.js +++ b/packages/d3fc-webgl/examples/ohlc.js @@ -14,7 +14,7 @@ const getWebglSeries = () => fc .seriesWebglOhlc() .bandwidth(10) - .width(2); + .lineWidth(2); const zoom = d3.zoom().on('zoom', () => { x.domain(d3.event.transform.rescaleX(x2).domain());
fix: updated examples to match refactored api
d3fc_d3fc
train
js,js
b384f1854b46e1d28393c30ceb20390f770358b8
diff --git a/intranet/apps/users/tests.py b/intranet/apps/users/tests.py index <HASH>..<HASH> 100644 --- a/intranet/apps/users/tests.py +++ b/intranet/apps/users/tests.py @@ -161,7 +161,7 @@ class ProfileTest(IonTestCase): image_path = os.path.join(settings.PROJECT_ROOT, "static/img/default_profile_pic.png") self.assertEqual(response.content, io.open(image_path, mode="rb").read()) response_with_username = self.client.get( - reverse("api_user_profile_picture_default_with_username", args=[user.username]), HTTP_AUTHORIZATION=self.auth + reverse("api_user_profile_picture_default_by_username", args=[user.username]), HTTP_AUTHORIZATION=self.auth ) self.assertEqual(response.content, response_with_username.content)
fix(users): fix spelling in view name
tjcsl_ion
train
py
d5f4c99002521da4398a0ca53ab5d10759048a1d
diff --git a/packages/netlify-cms-core/src/reducers/collections.js b/packages/netlify-cms-core/src/reducers/collections.js index <HASH>..<HASH> 100644 --- a/packages/netlify-cms-core/src/reducers/collections.js +++ b/packages/netlify-cms-core/src/reducers/collections.js @@ -114,9 +114,11 @@ export const selectTemplateName = (collection, slug) => selectors[collection.get('type')].templateName(collection, slug); export const selectIdentifier = collection => { const identifier = collection.get('identifier_field'); - const indentifierFields = identifier ? [identifier, ...IDENTIFIER_FIELDS] : IDENTIFIER_FIELDS; + const identifierFields = identifier ? [identifier, ...IDENTIFIER_FIELDS] : IDENTIFIER_FIELDS; const fieldNames = collection.get('fields').map(field => field.get('name')); - return indentifierFields.find(id => fieldNames.find(name => name.toLowerCase().trim() === id)); + return identifierFields.find(id => + fieldNames.find(name => name.toLowerCase().trim() === id.toLowerCase().trim()), + ); }; export const selectInferedField = (collection, fieldName) => { const inferableField = INFERABLE_FIELDS[fieldName];
fix(netlify-cms-core): fix identifier field validation (#<I>)
netlify_netlify-cms
train
js
363e85a1328da58db14883b28bfd5e4ac8d4d604
diff --git a/test/e2e/test-app.js b/test/e2e/test-app.js index <HASH>..<HASH> 100644 --- a/test/e2e/test-app.js +++ b/test/e2e/test-app.js @@ -186,6 +186,21 @@ describe('CodeFlask Tests', () => { expect($('.codeflask__textarea:not([readonly])').isExisting()).to.be.true; }); + it('should not add line by press enter when editor is readonly', function () { + browser.execute(() => { + // remove all existing editors + document.body.innerHTML = ''; + const rootEl = document.createElement('div'); + document.body.appendChild(rootEl); + + new CodeFlask(rootEl, { readonly: true, lineNumbers: true }); + rootEl.querySelector('.codeflask .codeflask__textarea').dispatchEvent(new KeyboardEvent('keydown',{ key: 'Enter', keyCode: 13 })); + }); + + const lines = $$('.codeflask .codeflask__lines__line'); + expect(lines.length).to.equal(1); + }); + xit('should handle the tab key in the editor', function () { let flask_test browser.execute(() => {
test: should not add line by press enter when editor is readonly
kazzkiq_CodeFlask
train
js
6e2196824dbb50025e2ac822f6adbebb9d48b8dc
diff --git a/test/ejs.js b/test/ejs.js index <HASH>..<HASH> 100755 --- a/test/ejs.js +++ b/test/ejs.js @@ -1017,7 +1017,7 @@ suite('include()', function () { test('include ejs with includer returning template', function () { var file = 'test/fixtures/include-root.ejs'; var inc = function (original, prev) { - if (original === '/include.ejs') { + if (prev === '/include.ejs') { return { template: '<p>Hello template!</p>\n' };
test(includer): rename first param (url -> original)
mde_ejs
train
js
cbe50b26951b873d5e257361a15c5b5b4f1b7b93
diff --git a/common/oatbox/filesystem/wrapper/GoogleStorageWrapper.php b/common/oatbox/filesystem/wrapper/GoogleStorageWrapper.php index <HASH>..<HASH> 100644 --- a/common/oatbox/filesystem/wrapper/GoogleStorageWrapper.php +++ b/common/oatbox/filesystem/wrapper/GoogleStorageWrapper.php @@ -28,7 +28,7 @@ use Google\Cloud\Storage\StorageClient; use Superbalist\Flysystem\GoogleStorage\GoogleStorageAdapter; /** - * + * @deprecated Please install `oat-sa/lib-generis-gcp` and use \oat\Gcp\Gcs\GcsFlyWrapper * @author Joel Bout */ class GoogleStorageWrapper extends ConfigurableService implements AdapterInterface
fix: broken changes prevented, class depricated
oat-sa_generis
train
php
c477c33d114d92e77bef88c534fa79b2cab9b184
diff --git a/schema.py b/schema.py index <HASH>..<HASH> 100644 --- a/schema.py +++ b/schema.py @@ -231,6 +231,17 @@ class Schema(object): return _priority(s._schema) + 0.5 return _priority(s) + def is_valid(self, data): + """Return whether the given data has passed all the validations + that were specified in the given schema. + """ + try: + self.validate(data) + except SchemaError: + return False + else: + return True + def validate(self, data): Schema = self.__class__ s = self._schema
feat: Add an is_valid method to the schema (as in #<I>) (#<I>) * creating is_valid method as suggested in the issue <I> * Remove newlines
keleshev_schema
train
py
4934ad227f043a5554c9a4f717f09f70d2c18cbf
diff --git a/workflow/controller/operator.go b/workflow/controller/operator.go index <HASH>..<HASH> 100644 --- a/workflow/controller/operator.go +++ b/workflow/controller/operator.go @@ -780,7 +780,7 @@ func (woc *wfOperationCtx) podReconciliation() error { woc.onNodeComplete(&node) } } - if !node.FailedOrError() { + if node.Succeeded() { woc.succeededPods[pod.ObjectMeta.Name] = true } }
fix: Running pods are garaged in PodGC onSuccess
argoproj_argo
train
go
c344243d794445053276765fa7dfabd3fdb1d404
diff --git a/lib/plugins/index.js b/lib/plugins/index.js index <HASH>..<HASH> 100644 --- a/lib/plugins/index.js +++ b/lib/plugins/index.js @@ -502,6 +502,7 @@ function getRulesFromPlugins(type, req, res, callback) { } execCallback(); }; + delete opts.headers[ETAG_HEADER]; if (data) { if (Date.now() - data.now <= data.maxAge) { return handleRules(false);
feat: Supports cache the rules of plugin
avwo_whistle
train
js
ccb95315a9ea4da2d492e9a5313e924f2ba97cb7
diff --git a/intranet/apps/announcements/models.py b/intranet/apps/announcements/models.py index <HASH>..<HASH> 100644 --- a/intranet/apps/announcements/models.py +++ b/intranet/apps/announcements/models.py @@ -28,11 +28,11 @@ class AnnouncementManager(Manager): return Announcement.objects.none() return Announcement.objects.filter( - Q(groups__in=user.groups.all()) + Q(user=user) | Q(groups__isnull=True) + | Q(groups__user=user) | Q(announcementrequest__teachers_requested=user) | Q(announcementrequest__user=user) - | Q(user=user) ).distinct() def hidden_announcements(self, user):
perf(announcements): reorder checks in visible_to_user() With this change, the checks are now (I believe) in the order that minimizes the average number of SQL queries required per announcement to determine whether it is visible to any particular user.
tjcsl_ion
train
py
ddee01336153b2a232ed7f4eb7ae65c743285510
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -35,7 +35,7 @@ setup( ], keywords="api graphql protocol api rest relay tartiflette dailymotion", packages=_PACKAGES, - install_requires=["aiohttp>=3.5.4,<3.7.0", "tartiflette<0.13.0,>=0.12.0"], + install_requires=["aiohttp>=3.5.4,<3.7.0", "tartiflette>=0.12.0,<2.0.0"], tests_require=_TEST_REQUIRE, extras_require={"test": _TEST_REQUIRE}, include_package_data=True,
chore(deps): update tartiflette requirement from >=<I>,<<I> to >=<I>,<<I>
dailymotion_tartiflette-aiohttp
train
py
ac2b8da88f3f970c1f0c0e04e134eb65eaba069b
diff --git a/hrp/testcase.go b/hrp/testcase.go index <HASH>..<HASH> 100644 --- a/hrp/testcase.go +++ b/hrp/testcase.go @@ -60,6 +60,9 @@ func (path *TestCasePath) ToTestCase() (*TestCase, error) { if err != nil { return nil, err } + if tc.Config == nil { + return nil, errors.New("incorrect testcase file format, expected config in file") + } err = tc.makeCompat() if err != nil {
fix: panic when config didn't exist in testcase file
HttpRunner_HttpRunner
train
go
d8e864a994e638eafd36a6bc2d9e4c6b0f4375ad
diff --git a/shinken/objects/module.py b/shinken/objects/module.py index <HASH>..<HASH> 100644 --- a/shinken/objects/module.py +++ b/shinken/objects/module.py @@ -35,8 +35,6 @@ class Module(Item): 'module_type': StringProp(), 'modules' : ListProp(default=''), }) - - running_properties = {} macros = {}
fix: removed reset of running_properties dict in module object. was raising key error configurations_errors when some modules get a configuration error.
Alignak-monitoring_alignak
train
py
edbc3801a1f618441f0045fd3546523ee4fa4de1
diff --git a/db.go b/db.go index <HASH>..<HASH> 100644 --- a/db.go +++ b/db.go @@ -420,11 +420,11 @@ func Open(opt Options) (db *DB, err error) { // cleanup stops all the goroutines started by badger. This is used in open to // cleanup goroutines in case of an error. func (db *DB) cleanup() { - db.blockCache.Close() - db.bfCache.Close() db.stopMemoryFlush() db.stopCompactions() + db.blockCache.Close() + db.bfCache.Close() if db.closers.updateSize != nil { db.closers.updateSize.Signal() } @@ -1006,7 +1006,7 @@ func (db *DB) pushHead(ft flushTask) error { } // Store badger head even if vptr is zero, need it for readTs - db.opt.Debugf("Storing value log head: %+v\n", ft.vptr) + db.opt.Infof("Storing value log head: %+v\n", ft.vptr) val := ft.vptr.Encode() // Pick the max commit ts, so in case of crash, our read ts would be higher than all the
fix(cleanup): Do not close cache before compaction (#<I>) This PR fixes a panic that could happen in case `vlog.Open` returns an error. The `db.Cleanup` would close the cache before compaction would finish and as a result of that we will end up with `send of closed channel panic` in ristretto.
dgraph-io_badger
train
go
07367427c247ccb8a39963d0d80415cc3c6f1432
diff --git a/lib/package.js b/lib/package.js index <HASH>..<HASH> 100644 --- a/lib/package.js +++ b/lib/package.js @@ -133,7 +133,7 @@ releases.get_stable_version = function(cb) { var options = { headers: { 'resource-dk': key } } - needle.get(releases_url + latest_text, options, function(err, resp, body) { + needle.get(releases_url + latest_text, key ? options : null, function(err, resp, body) { var ver = body && body.toString().trim(); // log('Latest upstream version: ' + ver);
fix: if device key is null, no headers are included
prey_prey-node-client
train
js
a3985d54fea929c123992374f4f2f0bdd16c1867
diff --git a/packages/cli-plugin-deploy-components/execute/template/index.js b/packages/cli-plugin-deploy-components/execute/template/index.js index <HASH>..<HASH> 100644 --- a/packages/cli-plugin-deploy-components/execute/template/index.js +++ b/packages/cli-plugin-deploy-components/execute/template/index.js @@ -132,8 +132,14 @@ class Template extends Component { const middleware = compose( resources.map(resource => { return async next => { + const resourceData = allComponents[resource]; + // If a resource does not exist or an invalid resource name was provided, throw an error. + if (!resourceData) { + throw new Error(`Resource "${resource}" does not exist.`) + } + const deployComponent = async () => { const start = Date.now(); await executeComponent(
fix: throw an error if provided resource wasn't found
Webiny_webiny-js
train
js
909a2b5388becde1a343e643302889e8ed9cc3c0
diff --git a/packages/mcs-lite-ui/src/InputCheckbox/InputCheckbox.example.js b/packages/mcs-lite-ui/src/InputCheckbox/InputCheckbox.example.js index <HASH>..<HASH> 100644 --- a/packages/mcs-lite-ui/src/InputCheckbox/InputCheckbox.example.js +++ b/packages/mcs-lite-ui/src/InputCheckbox/InputCheckbox.example.js @@ -59,4 +59,16 @@ storiesOf('InputCheckbox', module) Display the device image on scene </StatefulInputCheckbox> )), + ) + .add( + 'With kind props', + withInfo({ + text: '', + inline: true, + propTables: [InputCheckbox, Checkbox], + })(() => ( + <InputCheckbox value onChange={action('onChange')} kind="error"> + Check it + </InputCheckbox> + )), );
feat(ui): add with kind props to story of InputCheckbox
MCS-Lite_mcs-lite
train
js
d4a427e9d5f5ba593e9cf63ed3eacd1b36d9c7a7
diff --git a/lib/plugins/index.js b/lib/plugins/index.js index <HASH>..<HASH> 100644 --- a/lib/plugins/index.js +++ b/lib/plugins/index.js @@ -701,10 +701,15 @@ function getPluginRulesCallback(req, callback) { } function getCodec(type) { - return function(req, callback) { + var isRes = type[2] === 's'; + return function(req, res, callback) { if (!req) { return callback(); } + if (!isRes) { + callback = res; + res = null; + } var codec = rulesMgr.resolveCodec(req); req._codecRule = codec; if (!codec || !CODEC_PLUGIN_RE.test(codec.matcher)) {
feat: support for custom decoder&encoder
avwo_whistle
train
js
74f52a0de1c489a4d2efeae4cf4beae279f424d0
diff --git a/src/authentication.js b/src/authentication.js index <HASH>..<HASH> 100644 --- a/src/authentication.js +++ b/src/authentication.js @@ -59,6 +59,16 @@ export class Authentication { return this.getAccessToken(); } + get responseObject() { + LogManager.getLogger('authentication').warn('Getter Authentication.responseObject is deprecated. Use Authentication.getResponseObject() instead.'); + return this.getResponseObject(); + } + + set responseObject(response) { + LogManager.getLogger('authentication').warn('Setter Authentication.responseObject is deprecated. Use Authentication.setResponseObject(response) instead.'); + this.setResponseObject(response); + } + /* get/set responseObject */ getResponseObject() {
chore(authentication): BC responseObject
SpoonX_aurelia-authentication
train
js
afa882426b893e300da25202b5c56b23d591e9f1
diff --git a/src/addons/dragAndDrop/EventContainerWrapper.js b/src/addons/dragAndDrop/EventContainerWrapper.js index <HASH>..<HASH> 100644 --- a/src/addons/dragAndDrop/EventContainerWrapper.js +++ b/src/addons/dragAndDrop/EventContainerWrapper.js @@ -1,7 +1,6 @@ import PropTypes from 'prop-types' import React from 'react' import { DnDContext } from './DnDContext' -import NoopWrapper from '../../NoopWrapper' import Selection, { getBoundsForNode, @@ -254,7 +253,7 @@ class EventContainerWrapper extends React.Component { className="rbc-addons-dnd-drag-preview" style={{ top, height, width: 100 }} getters={getters} - components={{ ...components, eventWrapper: NoopWrapper }} + components={components} accessors={{ ...accessors, ...dragAccessors }} continuesPrior={startsBeforeDay} continuesAfter={startsAfterDay}
feat: allow using custom event wrapper component while dragging (#<I>) Closes #<I>
intljusticemission_react-big-calendar
train
js
9c247c9ddd2ed85a0593bbc109b9aa37cbd591de
diff --git a/test/unit/cli/parse-options-test.js b/test/unit/cli/parse-options-test.js index <HASH>..<HASH> 100644 --- a/test/unit/cli/parse-options-test.js +++ b/test/unit/cli/parse-options-test.js @@ -41,7 +41,8 @@ test('parse options', function (group) { public: 'options.public', url: 'options.url', dbUrl: 'http://foo:bar@baz.com', - inMemory: 'aNonNullString' + inMemory: 'aNonNullString', + adminPassword: 'secret' }) t.is(config.paths.data, 'options.data', 'uses data option as data path') @@ -49,6 +50,7 @@ test('parse options', function (group) { t.is(config.paths.public, 'options.public', 'uses public option as public path') t.is(config.db.url, 'http://foo:bar@baz.com', 'sets config.db.url from options.dbUrl') t.is(config.inMemory, true, 'Sets config.inMemory to boolean equivalent of options.inMemory') + t.is(config.adminPassword, 'secret', 'Sets config.adminPassword') t.end() })
test: `adminPassword` option
hoodiehq_hoodie
train
js
76996fb03e63d8b201dc72374bb05103fb199d43
diff --git a/test/k8sT/Updates.go b/test/k8sT/Updates.go index <HASH>..<HASH> 100644 --- a/test/k8sT/Updates.go +++ b/test/k8sT/Updates.go @@ -106,7 +106,7 @@ var _ = Describe("K8sUpdates", func() { ExpectAllPodsTerminated(kubectl) }) - It("Tests upgrade and downgrade from a Cilium stable image to master", func() { + SkipItIf(helpers.SkipGKEQuarantined, "Tests upgrade and downgrade from a Cilium stable image to master", func() { var assertUpgradeSuccessful func() assertUpgradeSuccessful, cleanupCallback = InstallAndValidateCiliumUpgrades(
test: Quarantine K8sUpdates on GKE GKE builds have been failing since K8sUpdates was unquarantined. Tests running after K8sUpdates appear to be randomly failing, properly due to some improperly cleaned up shared resource. This commit requarantines K8sUpdates on GKE to fix the GKE build while we investigate this.
cilium_cilium
train
go
6b598157e26180ff5530de3ae89848498116530d
diff --git a/ui/src/components/pagination/QPagination.js b/ui/src/components/pagination/QPagination.js index <HASH>..<HASH> 100644 --- a/ui/src/components/pagination/QPagination.js +++ b/ui/src/components/pagination/QPagination.js @@ -192,19 +192,19 @@ export default defineComponent({ newPage.value = null } - function getBtn (data, page) { - const props = { ...btnProps.value, ...data } + function getBtn (cfg, page) { + const data = { ...btnProps.value, ...cfg } if (page !== void 0) { if (props.toFn !== void 0) { - props.to = props.toFn(page) + data.to = props.toFn(page) } else { - props.onClick = () => set(page) + data.onClick = () => set(page) } } - return h(QBtn, props) + return h(QBtn, data) } // expose public methods
fix(QPagination): toFn() prop not being called #<I>
quasarframework_quasar
train
js
970a46ea7883b31820a06f55aec87825713ab78f
diff --git a/index.js b/index.js index <HASH>..<HASH> 100644 --- a/index.js +++ b/index.js @@ -6,7 +6,7 @@ const deployOnce = require('travis-deploy-once'); const SemanticReleaseError = require('@semantic-release/error'); const resolveConfig = require('./lib/resolve-config'); -module.exports = async function(pluginConfig, {pkg, env, options: {branch} = {}}) { +module.exports = async function(pluginConfig, {pkg, env, options: {branch}}) { const {githubToken, githubUrl, githubApiPathPrefix} = resolveConfig(pluginConfig); if (env.TRAVIS !== 'true') { throw new SemanticReleaseError(
fix: remove unnecessary value for options semantic-release never pass an undefined/value
semantic-release_condition-travis
train
js
9c66bbbcffee909b79a31f6f936d8147531bf970
diff --git a/packages/blueprint-mongodb/lib/populate/populate-embedded.js b/packages/blueprint-mongodb/lib/populate/populate-embedded.js index <HASH>..<HASH> 100644 --- a/packages/blueprint-mongodb/lib/populate/populate-embedded.js +++ b/packages/blueprint-mongodb/lib/populate/populate-embedded.js @@ -40,13 +40,17 @@ module.exports = Populate.extend ({ populate (unseen) { let pending = mapValues (this.populators, (populator, name) => { - const values = unseen[name]; + const plural = populator.plural; + const values = unseen[plural]; if (isEmpty (values)) return null; const ids = flattenDeep (values); + if (isEmpty (ids)) + return null; + return populator.populate (ids).exec (); });
fix: referenced the nested populations model type incorrectly
onehilltech_blueprint
train
js
800f1ce8d4ee806bf544424df94339feac90370a
diff --git a/components/App.js b/components/App.js index <HASH>..<HASH> 100644 --- a/components/App.js +++ b/components/App.js @@ -6,7 +6,7 @@ import Loadable from 'react-loadable'; import {Button} from 'antd'; import * as Sentry from '@sentry/browser'; import $ from 'miaoxing'; -import app, {history} from '@weijs/app'; +import app, {history} from '@mxjs/app'; import http from '@mxjs/http'; import {event} from '@mxjs/event'; import {InternalServerError, NotFound} from '@mxjs/ret';
refactor: weijs => mxjs
miaoxing_app
train
js
a0b9e45e030df8a337075810eab42ba1ab54404d
diff --git a/.eslintrc.js b/.eslintrc.js index <HASH>..<HASH> 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -1,4 +1,7 @@ module.exports = { plugins: ['testing-library', 'jest-dom'], extends: ['react-app'], + rules: { + 'no-console': 'warn', + }, }
chore: adds no-console rule
react-spring_react-use-gesture
train
js
b967c335eb69454b63148a1f16ec70781062a625
diff --git a/lib/rules/no-classic-components.js b/lib/rules/no-classic-components.js index <HASH>..<HASH> 100644 --- a/lib/rules/no-classic-components.js +++ b/lib/rules/no-classic-components.js @@ -3,10 +3,6 @@ const ERROR_MESSAGE = 'Use Glimmer components(@glimmer/component) instead of classic components(@ember/component)'; -//------------------------------------------------------------------------------ -// Rule Definition -//------------------------------------------------------------------------------ - module.exports = { meta: { docs: { @@ -22,22 +18,10 @@ module.exports = { ERROR_MESSAGE, create(context) { - // variables should be defined here - - //---------------------------------------------------------------------- - // Helpers - //---------------------------------------------------------------------- - const report = function(node) { context.report(node, ERROR_MESSAGE); }; - // any helper functions should go here or else delete this section - - //---------------------------------------------------------------------- - // Public - //---------------------------------------------------------------------- - return { ImportDeclaration(node) { const importSource = node.source.value;
refactor: Remove skeleton comments
ember-cli_eslint-plugin-ember
train
js
3924fa6b901b5d3cc315be64ffe11a9b8392556e
diff --git a/src/basic/Item.js b/src/basic/Item.js index <HASH>..<HASH> 100644 --- a/src/basic/Item.js +++ b/src/basic/Item.js @@ -25,7 +25,7 @@ class Item extends Component { constructor(props) { super(props); this.state = { - isFocussed: true, + isFocused: false, text: '', topAnim: new Animated.Value(18), opacAnim: new Animated.Value(1) @@ -34,7 +34,11 @@ class Item extends Component { componentDidMount() { if (this.props.floatingLabel) { if (this.inputProps && this.inputProps.value) { + const effect = () => { + this.setState({ isFocused: true }); + }; this.floatUp(-16); + effect(); } if (this.inputProps && this.inputProps.getRef) this.inputProps.getRef(this._inputRef);
fix(item): Foating label with initial value (#<I>) * fix(item): Foating label has incorrect styles when rendering an input with an initial value #<I> * use setState inside an effect function
GeekyAnts_NativeBase
train
js
bc8542c511a76fe99957508bcca63a2136102bec
diff --git a/lib/datasource-executor.js b/lib/datasource-executor.js index <HASH>..<HASH> 100644 --- a/lib/datasource-executor.js +++ b/lib/datasource-executor.js @@ -208,9 +208,10 @@ function executeDst(api, request, dst) { // TODO: Move requestName generation into request-resolver: var requestName = 'unnamedRequest'; - - if (!dst.attributePath || !dst.attributePath.length) requestName = 'root'; - else requestName = dst.attributePath.join('.') + ':' + dst.dataSourceName; + if (dst.attributePath) { + requestName = (dst.attributePath.length > 0 ? dst.attributePath.join('.') : '{root}') + + ':' + dst.dataSourceName; + } dst.request._status = request._status ? request._status.addChild('dataSourceRequests') : new Status(); dst.request._status.set('requestName', requestName);
fix: unified requestName and do not forget dataSourceName for {root}
godmodelabs_flora
train
js
2f707d95e79e6f9635152baabd9d7ff4897833eb
diff --git a/teslajsonpy/controller.py b/teslajsonpy/controller.py index <HASH>..<HASH> 100644 --- a/teslajsonpy/controller.py +++ b/teslajsonpy/controller.py @@ -169,6 +169,8 @@ async def wake_up(wrapped, instance, args, kwargs) -> Callable: _LOGGER.debug( "Exception: %s\n%s(%s %s)", str(ex), wrapped.__name__, args, kwargs ) + if ex.code == 408 and car_id and instance._id_to_vin(car_id): + instance.car_online[instance._id_to_vin(car_id)] = False raise if ( valid_result(result)
fix: treat <I> exceptions as vehicle asleep
zabuldon_teslajsonpy
train
py
13ef72dc0350ae98961e2e721c7fb0b8167a04b6
diff --git a/resize.go b/resize.go index <HASH>..<HASH> 100644 --- a/resize.go +++ b/resize.go @@ -23,8 +23,8 @@ func Resize(buf []byte, o Options) ([]byte, error) { return nil, err } - // Define default options - applyDefaults(&o, imageType) + // Clone and define default options + o = applyDefaults(o, imageType) if IsTypeSupported(o.Type) == false { return nil, errors.New("Unsupported image output type") @@ -121,7 +121,7 @@ func Resize(buf []byte, o Options) ([]byte, error) { return vipsSave(image, saveOptions) } -func applyDefaults(o *Options, imageType ImageType) { +func applyDefaults(o Options, imageType ImageType) Options { if o.Quality == 0 { o.Quality = QUALITY } @@ -134,6 +134,7 @@ func applyDefaults(o *Options, imageType ImageType) { if o.Interpretation == 0 { o.Interpretation = INTERPRETATION_sRGB } + return o } func normalizeOperation(o *Options, inWidth, inHeight int) {
refactor(resize): clone options by value
h2non_bimg
train
go
dcf0dbd3d245ab526bbe6ff02845725074e6099d
diff --git a/src/Terminal.js b/src/Terminal.js index <HASH>..<HASH> 100644 --- a/src/Terminal.js +++ b/src/Terminal.js @@ -8,6 +8,22 @@ export default class Terminal { this.setStream(stream); this.setWidth(width); this.setHeight(height); + + this._cells = Array.from({length: this.getWidth() * this.getHeight}).map(_ => Cell.create(' ', {x: 0, y: 0})); + } + + getCell(x, y) { + return this._cells[y * this._width + x]; + } + + updateCell(x, y) { + const cell = this.getCell(x, y); + } + + resetCell(x, y) { + const cell = this.getCell(x, y); + cell.setChar(' ').setBackground(false).setForeground(false).setDisplay(false); + return this; } getCursor() {
refactor(terminal): Add initializing cells in the terminal
kittikjs_cursor
train
js
2d87c7c058295274f02ac9b38820913aa7913a14
diff --git a/packages/jsx/src/lib/actions/fetchPosts.js b/packages/jsx/src/lib/actions/fetchPosts.js index <HASH>..<HASH> 100644 --- a/packages/jsx/src/lib/actions/fetchPosts.js +++ b/packages/jsx/src/lib/actions/fetchPosts.js @@ -10,7 +10,7 @@ export const FETCHING_POSTS_SUCCESS = "FETCHING_POSTS_SUCCESS"; export const FETCHING_POSTS_CANCELLED = "FETCHING_POSTS_CANCELLED"; export const FETCHING_POSTS = "FETCHING_POSTS"; -export const FETCHING_POSTS_PER_PAGE = 20; +export const FETCHING_POSTS_PER_PAGE = 24; export const fetchPostsCreator = (fetchUrl, type = "global") => (dispatch, getState) => { const state = getState();
fix(jsx): Reduce post loading jitter even more by upping `FETCHING_POSTS_PER_PAGE`. Ugh. Ideally we figure out the height for each (word) `Post` dynamically by looking at the HTML content, but failing that, just ammortize the jumping effect due to the over/under estimating of it before it's rendered by adding a bunch more `Post`s (`Photo`s with known heights hopefully).
randytarampi_me
train
js
68522cfdef34ef49157a66e09b6b7422587e2c04
diff --git a/src/platforms/web/runtime/components/transition.js b/src/platforms/web/runtime/components/transition.js index <HASH>..<HASH> 100644 --- a/src/platforms/web/runtime/components/transition.js +++ b/src/platforms/web/runtime/components/transition.js @@ -140,7 +140,9 @@ export default { // during entering. const id: string = `__transition-${this._uid}-` child.key = child.key == null - ? id + child.tag + ? child.isComment + ? id + 'comment' + : id + child.tag : isPrimitive(child.key) ? (String(child.key).indexOf(id) === 0 ? child.key : id + child.key) : child.key
fix:the placeholder key in undefined when render async component (#<I>)
IOriens_wxml-transpiler
train
js
fc0b2eb1b45d9805b5cd45de97c924d907c4b2b3
diff --git a/packages/bonde-public/pages/index.js b/packages/bonde-public/pages/index.js index <HASH>..<HASH> 100644 --- a/packages/bonde-public/pages/index.js +++ b/packages/bonde-public/pages/index.js @@ -64,6 +64,8 @@ class Page extends React.Component { <div> <Head> <title>{name}</title> + <meta httpEquiv="X-UA-Compatible" content="IE=edge" /> + <meta name="viewport" content="width=device-width, initial-scale=1" /> <meta name='description' content={goal} /> <meta name='twitter:card' content='summary_large_image' /> <meta name='twitter:title' content={facebookShareTitle} />
fix: add missing responsive meta tag [#<I>]
nossas_bonde-client
train
js
ad4248e6a79abec6128b5b1e60be36320885f1b0
diff --git a/react/MuiCozyTheme/theme.js b/react/MuiCozyTheme/theme.js index <HASH>..<HASH> 100644 --- a/react/MuiCozyTheme/theme.js +++ b/react/MuiCozyTheme/theme.js @@ -269,6 +269,8 @@ const makeOverrides = theme => ({ }, MuiListItemIcon: { root: { + minWidth: 'auto', + marginRight: '1rem', padding: 0 } }, @@ -324,6 +326,10 @@ const makeOverrides = theme => ({ '&$textDense': { fontSize: null } + }, + multiline: { + marginTop: 0, + marginBottom: 0 } }, MuiListSubheader: { @@ -458,6 +464,7 @@ const makeOverrides = theme => ({ MuiDialogActions: { root: { margin: '16px 32px', + padding: 0, [theme.breakpoints.down('sm')]: { margin: '8px 16px', '& button': { @@ -477,6 +484,12 @@ const makeOverrides = theme => ({ marginBottom: '8px' } } + }, + + // To keep muiV3 behavior + // TODO check later if we need this behavior + '& > :not(:first-child):not(:first-child)': { + marginLeft: 4 } } },
feat: Disable MUI v4 new styles to keep old behavior
cozy_cozy-ui
train
js
c626775a48095d98ff45c2a4c6a75acf36f53c2b
diff --git a/.toys/.lib/pull_request_generator.rb b/.toys/.lib/pull_request_generator.rb index <HASH>..<HASH> 100644 --- a/.toys/.lib/pull_request_generator.rb +++ b/.toys/.lib/pull_request_generator.rb @@ -146,7 +146,7 @@ module PullRequestGenerator else @context.logger.info "No files changed; no pull request created" @context.exec ["git", "switch", @orig_branch_name] - @context.exec ["gh", "branch", "-d", @branch_name] + @context.exec ["git", "branch", "-D", @branch_name] end @context.exec ["git", "clean", "-df"] result
chore: Yet another owlbot script fix
googleapis_google-cloud-ruby
train
rb
bb38aa6a19d7a885822ffb2fd0dd29e38a334467
diff --git a/anyconfig/backend/xml.py b/anyconfig/backend/xml.py index <HASH>..<HASH> 100644 --- a/anyconfig/backend/xml.py +++ b/anyconfig/backend/xml.py @@ -160,6 +160,13 @@ def _merge_dicts(dics, to_container=dict): :param dics: [<dict/-like object must not have same keys each other>] :param to_container: callble to make a container object :return: <container> object + + >>> _merge_dicts(({}, )) + {} + >>> _merge_dicts(({'a': 1}, )) + {'a': 1} + >>> sorted(kv for kv in _merge_dicts(({'a': 1}, {'b': 2})).items()) + [('a', 1), ('b', 2)] """ dic_itr = anyconfig.compat.from_iterable(d.items() for d in dics) return to_container(anyconfig.compat.OrderedDict(dic_itr))
fix: add missing testcases as doctest in .backend.xml._merge_dicts
ssato_python-anyconfig
train
py
0d0442263256b4bf7cd301ed6e6dbab59ec2f94c
diff --git a/lib/index.js b/lib/index.js index <HASH>..<HASH> 100644 --- a/lib/index.js +++ b/lib/index.js @@ -133,7 +133,7 @@ function tunnelProxy(server, proxy) { port: options.port, auth: options.auth, url: 'http://' + headers.host, - headers: tunnelPort ? extend({'x-whistle-req-id': req.reqId}, headers) : headers + headers: headers }, function(err, _proxySocket) { if (err) { return emitError(err);
feat: Forwards the request to tunnelServer
avwo_whistle
train
js
811d966c9bc1cbf307fcbd4e839aab51adba9df8
diff --git a/src/constants.js b/src/constants.js index <HASH>..<HASH> 100644 --- a/src/constants.js +++ b/src/constants.js @@ -5,10 +5,12 @@ const permissions = { ManageProducts: 'ManageProducts', ManageOauthClients: 'ManageOauthClients', ManageStates: 'ManageStates', + ManageTypes: 'ManageTypes', ViewCustomers: 'ViewCustomers', ViewOrders: 'ViewOrders', ViewProducts: 'ViewProducts', ViewStates: 'ViewStates', + ViewTypes: 'ViewTypes', }; /* eslint-disable import/prefer-default-export */
fix: view and manage types permissions
commercetools_merchant-center-application-kit
train
js
5533d371c5b4c850942683dfc0d86e4986b261ba
diff --git a/lib/workers/repository/init/apis.js b/lib/workers/repository/init/apis.js index <HASH>..<HASH> 100644 --- a/lib/workers/repository/init/apis.js +++ b/lib/workers/repository/init/apis.js @@ -24,6 +24,7 @@ async function initApis(input) { config.npmrc, config.global ? config.global.exposeEnv : false ); + delete config.gitPrivateKey; return config; }
refactor: delete gitPrivateKey after setting
renovatebot_renovate
train
js
50860c2de0b92f75731023c87fb13c33c0a1194d
diff --git a/Helper/Utilities.php b/Helper/Utilities.php index <HASH>..<HASH> 100644 --- a/Helper/Utilities.php +++ b/Helper/Utilities.php @@ -76,18 +76,20 @@ class Utilities array_intersect_key((array)$data, array_flip(['id'])) ); - if ($source['methodId'] == 'checkoutcom_apm') { - // Add apm to payment information - $paymentInfo->setAdditionalInformation( - 'method_id', - $source['source'] - ); - } elseif ($source['methodId'] == 'checkoutcom_vault') { - // Add vault public hash to payment information - $paymentInfo->setAdditionalInformation( - 'public_hash', - $source['publicHash'] - ); + if (isset($source)) { + if ($source['methodId'] == 'checkoutcom_apm') { + // Add apm to payment information + $paymentInfo->setAdditionalInformation( + 'method_id', + $source['source'] + ); + } elseif ($source['methodId'] == 'checkoutcom_vault') { + // Add vault public hash to payment information + $paymentInfo->setAdditionalInformation( + 'public_hash', + $source['publicHash'] + ); + } } return $order;
chore: fix for set additional info error
checkout_checkout-magento2-plugin
train
php
02bc8c8445a0e4f249f237979ca080cc3cde74b2
diff --git a/src/js/plyr.js b/src/js/plyr.js index <HASH>..<HASH> 100644 --- a/src/js/plyr.js +++ b/src/js/plyr.js @@ -615,6 +615,7 @@ })(); _fullscreen = { + prefix: prefix, // Yet again Microsoft awesomeness, // Sometimes the prefix is 'ms', sometimes 'MS' to keep you on your toes eventType: (prefix === 'ms' ? 'MSFullscreenChange' : prefix + 'fullscreenchange'),
refactor: miss prefix fix _fullscreen.prefix can't work
sampotts_plyr
train
js
7215816797fd61c257a7aa4bb120fcc6941f9cad
diff --git a/supplement/assistant.py b/supplement/assistant.py index <HASH>..<HASH> 100644 --- a/supplement/assistant.py +++ b/supplement/assistant.py @@ -327,6 +327,9 @@ def get_location(project, source, position, filename): elif ctx_type in ('import', 'from-import'): if ctx: + if ctx[-1] == '.': + ctx = ctx[:-1] + module_name = ctx + '.' + match else: module_name = match
fix: incorrect relative name in get_location
baverman_supplement
train
py
b489f1975a25ac7e63be9c5a064b56f67def5cc5
diff --git a/lib/dio/loader_factory.rb b/lib/dio/loader_factory.rb index <HASH>..<HASH> 100644 --- a/lib/dio/loader_factory.rb +++ b/lib/dio/loader_factory.rb @@ -39,7 +39,7 @@ module Dio wrap_load(clazz) do |ctx| dep = deps[ctx.key] return ctx.load unless dep - dep.respond_to?(:is_a) && dep.is_a?(Proc) ? dep.call(*ctx.args) : dep + dep.respond_to?(:is_a?) && dep.is_a?(Proc) ? dep.call(*ctx.args) : dep end end
fix(loader_factory): Fix typo (is_a -> is_a?)
ryym_dio
train
rb
6ffe6d90498f4582845126868241a205ef43f4ab
diff --git a/src/connection.js b/src/connection.js index <HASH>..<HASH> 100644 --- a/src/connection.js +++ b/src/connection.js @@ -12,6 +12,10 @@ class Connection { this.subscriptions = [] this.queue = queue this.auth = new Auth(options) + + setInterval(() => { + if (this.client && !this.client.connected) this.reload() + }, 10000) } /**
fix: Ensure connection status every <I> seconds.
cubic-js_cubic
train
js
4b914ba30940aae79aa2eff30f8cf446f6abe9a2
diff --git a/src/reducers/compositeAggsReducer.js b/src/reducers/compositeAggsReducer.js index <HASH>..<HASH> 100644 --- a/src/reducers/compositeAggsReducer.js +++ b/src/reducers/compositeAggsReducer.js @@ -18,7 +18,7 @@ export default function compositeAggsReducer(state = {}, action) { } return { _doc_count: doc_count, - _key: key[fieldName], + _key: typeof key === 'string' ? key : key[fieldName], top_hits: hitsData, ...flatData, ..._source,
fix: handle string types of keys in src/reducers/compositeAggsReducer.js
appbaseio_reactivecore
train
js
d497b6e27c642a7ad0ec1f521ad619be30e3e9d6
diff --git a/sentry_sdk/client.py b/sentry_sdk/client.py index <HASH>..<HASH> 100644 --- a/sentry_sdk/client.py +++ b/sentry_sdk/client.py @@ -103,13 +103,15 @@ class Client(object): event = handle_in_app( event, self.options["in_app_exclude"], self.options["in_app_include"] ) - event = strip_event(event) before_send = self.options["before_send"] if before_send is not None: event = before_send(event) + # Postprocess the event in the very end so that annotated types do + # generally not surface in before_send if event is not None: + event = strip_event(event) event = flatten_metadata(event) event = convert_types(event) diff --git a/sentry_sdk/utils.py b/sentry_sdk/utils.py index <HASH>..<HASH> 100644 --- a/sentry_sdk/utils.py +++ b/sentry_sdk/utils.py @@ -476,8 +476,9 @@ def strip_event(event): def strip_frame(frame): - frame["vars"], meta = strip_databag(frame.get("vars")) - return frame, ({"vars": meta} if meta is not None else None) + if "vars" in frame: + frame["vars"] = strip_databag(frame["vars"]) + return frame def convert_types(obj):
fix: Strip the event late and correctly handle frame stripping (#<I>)
getsentry_sentry-python
train
py,py
266da85b88365d645072a4a0cf8a7f55bd057e0f
diff --git a/lib/api_connect_client/manager.rb b/lib/api_connect_client/manager.rb index <HASH>..<HASH> 100644 --- a/lib/api_connect_client/manager.rb +++ b/lib/api_connect_client/manager.rb @@ -5,7 +5,7 @@ module ApiConnectClient @admin_pass = admin_pass end - def create_user(first_name, last_name, organization_name, username, password) + def create_developer(first_name, last_name, organization_name, username, password) body = { "firstName" => first_name, "lastName" => last_name, @@ -14,8 +14,6 @@ module ApiConnectClient "username" => username } user = ApiConnectClient::User.new(@admin_user, @admin_pass) - p 'aqui voy' - p user user.create(body.to_json) end
refactor(manager): Rename create_user to create_developer for consisntency
cffiebigc_api-connect-client
train
rb
f86aa6fb8bf8fde281bdb89536353cbb67d797f0
diff --git a/packages/vaex-core/vaex/dataset.py b/packages/vaex-core/vaex/dataset.py index <HASH>..<HASH> 100644 --- a/packages/vaex-core/vaex/dataset.py +++ b/packages/vaex-core/vaex/dataset.py @@ -165,7 +165,9 @@ def _is_limit(x): def _ensure_list(x): return [x] if not _issequence(x) else x def _ensure_string_from_expression(expression): - if isinstance(expression, six.string_types): + if expression is None: + return None + elif isinstance(expression, six.string_types): return expression elif isinstance(expression, Expression): return expression.expression @@ -4943,6 +4945,7 @@ class Dataset(object): :param executor: :return: """ + boolean_expression = _ensure_string_from_expression(boolean_expression) if boolean_expression is None and not self.has_selection(name=name): pass # we don't want to pollute the history with many None selections self.signal_selection_changed.emit(self) # TODO: unittest want to know, does this make sense?
fix: select takes an expression, and expressions can be None
vaexio_vaex
train
py
20b6295ff9f8d5c4a6002eb004d52ea63546f4b7
diff --git a/src/index.js b/src/index.js index <HASH>..<HASH> 100644 --- a/src/index.js +++ b/src/index.js @@ -105,7 +105,7 @@ readFile(path.join(__dirname, 'android/app/src/main/res/values/strings.xml')) // Move files and folders from ./config/foldersAndFiles.js const resolveFoldersAndFiles = new Promise(resolve => { listOfFoldersAndFiles.forEach((element, index) => { - const dest = element.replace(new RegExp(nS_CurrentAppName, 'gi'), nS_NewName); + const dest = element.replace(new RegExp(nS_CurrentAppName, 'i'), nS_NewName); let itemsProcessed = 1; const successMsg = `/${dest} ${colors.green('RENAMED')}`;
fix(rename): only replace project name in directory once. Fixes #<I>. This is a possible issue where the original project string name appears twice such as ios/TestTests. We only need to replace the first 'Test' in this case.
junedomingo_react-native-rename
train
js
976a87f3a76ea943be94c875032c5665171dd7ca
diff --git a/lib/forms/camunda-form.js b/lib/forms/camunda-form.js index <HASH>..<HASH> 100644 --- a/lib/forms/camunda-form.js +++ b/lib/forms/camunda-form.js @@ -506,7 +506,7 @@ CamundaForm.prototype.transformFiles = function(callback) { } var reader = new FileReader(); /* jshint ignore:start */ - reader.onloadend = (function(i, element) { + reader.onloadend = (function(i, element, fileVar) { return function(e) { var binary = ''; var bytes = new Uint8Array( e.target.result ); @@ -527,7 +527,7 @@ CamundaForm.prototype.transformFiles = function(callback) { callCallback(); }; - })(i, element); + })(i, element, fileVar); /* jshint ignore:end */ reader.readAsArrayBuffer(element.files[0]); counter++;
fix(forms): add missing reference Related to CAM-<I>
camunda_camunda-bpm-sdk-js
train
js
302a10fd6158e5596b64909feee6569c39ffc2ed
diff --git a/src/packages/database/query/index.js b/src/packages/database/query/index.js index <HASH>..<HASH> 100644 --- a/src/packages/database/query/index.js +++ b/src/packages/database/query/index.js @@ -9,13 +9,8 @@ import formatSelect from './utils/format-select'; import { runQuery, createRunner } from './runner'; /** - * I am a Query. - * - * @module lux-framework/src/packages/database - * @namespace Database * @class Query - * @constructor - * @extends {Promise} + * @extends Promise * @private */ class Query<+T: any> extends Promise {
docs: remove irrelevant doc comments from query class (#<I>)
postlight_lux
train
js
0e6ffc730a7c9d5f9e5ad7f49fd7a4523567ab58
diff --git a/test/javascripts/notification_spec.js b/test/javascripts/notification_spec.js index <HASH>..<HASH> 100644 --- a/test/javascripts/notification_spec.js +++ b/test/javascripts/notification_spec.js @@ -29,7 +29,6 @@ describe('Notification', function() { }); it("renders a notification count badge", function() { - debugger; expect($('#container .dropdown-notifications-title .dropdown-notifications-badge')).toContainText('4'); });
chore(react-notification): remove debugger from tests
pivotal-cf_pivotal-ui
train
js
44e233c52117a2d349687d05636f760779ce8cf3
diff --git a/src/eduadmin.php b/src/eduadmin.php index <HASH>..<HASH> 100644 --- a/src/eduadmin.php +++ b/src/eduadmin.php @@ -752,6 +752,8 @@ if ( ! class_exists( 'EduAdmin' ) ) : '.', '..', '.git', + '.editorconfig', + '.gitattributes', '.github', '.gitignore', '.gitmodules',
chore: 🤖 Added more ignored files
MultinetInteractive_EduAdmin-WordPress
train
php
52a50331cb0b5d2d183696a91757e4953daf5d48
diff --git a/packages/svg-baker-runtime/src/browser-sprite.js b/packages/svg-baker-runtime/src/browser-sprite.js index <HASH>..<HASH> 100644 --- a/packages/svg-baker-runtime/src/browser-sprite.js +++ b/packages/svg-baker-runtime/src/browser-sprite.js @@ -69,7 +69,7 @@ export default class BrowserSprite extends Sprite { moveGradientsOutsideSymbol(symbolNode.parentNode); } - if (browser.isIE) { + if (browser.isIE || browser.isEdge) { evalStylesIEWorkaround(symbolNode); } });
fix(runtime): apply styles in dynamically appended symbols in Edge
JetBrains_svg-mixer
train
js
77ee528d021ccdf740b19f9ed48259ece5df7705
diff --git a/pgjdbc/src/test/java/org/postgresql/test/jdbc2/AutoRollbackTestSuite.java b/pgjdbc/src/test/java/org/postgresql/test/jdbc2/AutoRollbackTestSuite.java index <HASH>..<HASH> 100644 --- a/pgjdbc/src/test/java/org/postgresql/test/jdbc2/AutoRollbackTestSuite.java +++ b/pgjdbc/src/test/java/org/postgresql/test/jdbc2/AutoRollbackTestSuite.java @@ -104,6 +104,8 @@ public class AutoRollbackTestSuite extends BaseTest4 { failMode != FailMode.DEALLOCATE || TestUtil.haveMinimumServerVersion(con, ServerVersion.v8_3)); Assume.assumeTrue("DISCARD ALL requires PostgreSQL 8.3+", failMode != FailMode.DISCARD || TestUtil.haveMinimumServerVersion(con, ServerVersion.v8_3)); + Assume.assumeTrue("Plan invalidation on table redefinition requires PostgreSQL 8.3+", + failMode != FailMode.ALTER || TestUtil.haveMinimumServerVersion(con, ServerVersion.v8_3)); } @Override
test: assume minimum server version <I> testing autosave with ALTER Prior to <I>, PostgreSQL didn't invalidate cached plans following DDL changes. This is mentioned in the <I> release notes as Automatically re-plan cached queries when table definitions change or statistics are updated <URL>
pgjdbc_pgjdbc
train
java
2634fed0ce9392543a9b14cb1c2a99d8ce422995
diff --git a/src/remove.js b/src/remove.js index <HASH>..<HASH> 100644 --- a/src/remove.js +++ b/src/remove.js @@ -7,8 +7,7 @@ export function remove(inputs, text) { } if (type(text) !== 'String') { - console.log('RAMBDAX_REMOVE_WARN', text) - return '' + throw new Error(`R.remove requires string not ${type(text)}`) } if (type(inputs) !== 'Array') { diff --git a/src/remove.spec.js b/src/remove.spec.js index <HASH>..<HASH> 100644 --- a/src/remove.spec.js +++ b/src/remove.spec.js @@ -24,10 +24,9 @@ test('text is not string', () => { const inputs = [/foo/g, 'bar'] const text = null - const result = remove(inputs, text) - const expectedResult = '' - - expect(result).toEqual(expectedResult) + expect( + () => remove(inputs, text) + ).toThrow() }) test('with regexes', () => {
feat: r.remove thows when text is not string
selfrefactor_rambdax
train
js,js
6ad8d8741b2286b4d9bfc22b51d9b6c7598bb35b
diff --git a/lib/rules/rules.js b/lib/rules/rules.js index <HASH>..<HASH> 100644 --- a/lib/rules/rules.js +++ b/lib/rules/rules.js @@ -17,6 +17,7 @@ var VAR_RE = /\${([^{}]+)}/g; var NO_SCHEMA_RE = /^\/\/[^/]/; var WILDCARD_RE = /^((?:\$?(?:https?|wss?|tunnel):\/\/)?(?:(\*\*?)\.|(~)\/))/; var HOSTNAME_RE = /^(\.\w[\w\-.%]*(:\d+)?)/; +var KEY_RE = /^\{([^\s]+)\}$/; function detactShorthand(url) { if (NO_SCHEMA_RE.test(url)) { @@ -136,8 +137,14 @@ function getLines(text) { if (!text || !(text = text.trim())) { return []; } - - return text.split(/\n|\r\n|\r/g); + var lines = text.split(/\n|\r\n|\r/g); + return lines.map(function(line) { + line = line.trim(); + if (KEY_RE.test(line)) { + return values.get(RegExp.$1) || ''; + } + return line; + }); } function resolveVar(str, vals) {
feat: A single line as {xxx} is the inline rules from the corresponding Values
avwo_whistle
train
js
af4b22a824d7af49d1f531b228e16ffba56d67c2
diff --git a/src/tasks/protractor.js b/src/tasks/protractor.js index <HASH>..<HASH> 100644 --- a/src/tasks/protractor.js +++ b/src/tasks/protractor.js @@ -1,13 +1,19 @@ import { taskMaker } from '../taskMaker'; import protractor from 'gulp-protractor'; +import gutil from 'gulp-util'; +import runSequence from 'run-sequence'; function protractorTasks(gulp, config) { taskMaker(gulp) .createTask({ - name: 'e2e', + name: 'protractor:run', desc: 'Run e2e tests with Protractor', fn: protractorFn, + }).createTask({ + name: 'e2e', + desc: 'Run e2e tests with Protractor', + fn: e2eFn, help: { aliases: [ 'protractor' ], }, @@ -22,6 +28,22 @@ function protractorTasks(gulp, config) { .on('end', () => { cb(); }) .on('error', e => { throw e;}); } + + + function e2eFn(done) { + runSequence.use(gulp)( + 'serve', + 'protractor:run', + error => { + if (error) { + gutil.log(error.message); + } + + done(error); + process.exit(error); + } + ); + } } export { protractorTasks };
feat: automate e2e process further gulp e2e now starts a server, and then runs the tests
ApsisInternational_gulp-config-apsis
train
js
9e670ce0fda2eb81231783534dfb63a744b9eb45
diff --git a/lib/device-connections-factory.js b/lib/device-connections-factory.js index <HASH>..<HASH> 100644 --- a/lib/device-connections-factory.js +++ b/lib/device-connections-factory.js @@ -28,7 +28,7 @@ class iProxy { connection.pipe(socket); socket.pipe(connection); } catch (e) { - this.log.warn(e); + this.log.error(e); connection.end(); } }); @@ -38,6 +38,7 @@ class iProxy { }); this.serverSocket.listen(this.localport); await status; + this.serverSocket.on('error', (e) => this.log.error(e)); } // eslint-disable-next-line require-await @@ -54,10 +55,6 @@ class iProxy { this.log.info('The connection has been closed'); this.serverSocket = null; }); - this.serverSocket.once('error', (e) => { - this.log.error('Failed to close the connection', e); - this.serverSocket = null; - }); this.serverSocket.close(); } }
fix: Listen to socket server errors after its startup (#<I>)
appium_appium-xcuitest-driver
train
js
6b971bf179c69dff6f4bbd223cbd7a0a03e093de
diff --git a/ui/src/mixins/portal.js b/ui/src/mixins/portal.js index <HASH>..<HASH> 100644 --- a/ui/src/mixins/portal.js +++ b/ui/src/mixins/portal.js @@ -4,12 +4,23 @@ export function closePortalMenus (vm, evt) { do { if (vm.$options.name === 'QMenu') { vm.hide(evt) + + // is this a point of separation? if (vm.separateClosePopup === true) { return vm.$parent } } else if (vm.__hasPortal === true) { - return vm + // treat it as point of separation if parent is QPopupProxy + // (so mobile matches desktop behavior) + // and hide it too + if (vm.$parent !== void 0 && vm.$parent.$options.name === 'QPopupProxy') { + vm.hide(evt) + return vm.$parent + } + else { + return vm + } } vm = vm.$parent } while (vm !== void 0)
fix(ClosePopup): fix processing QPopupProxy separation point so mobile matches desktop behavior
quasarframework_quasar
train
js
3b5dc9a01c832803e633cedd5def2c469f58ebb0
diff --git a/bindings/react/examples/components/Input.js b/bindings/react/examples/components/Input.js index <HASH>..<HASH> 100644 --- a/bindings/react/examples/components/Input.js +++ b/bindings/react/examples/components/Input.js @@ -57,7 +57,7 @@ export default class extends React.Component { </p> <Input disabled={false} value={this.state.text} float onChange={event => this.setState({text: event.target.value}) } modifier='material' placeholder='Username' /> - <Input readonly={true} disabled={false} value={this.state.text} float onChange={event => this.setState({text: event.target.value}) } modifier='material' placeholder='Username (read-only)' /> + <Input readOnly={true} disabled={false} value={this.state.text} float onChange={event => this.setState({text: event.target.value}) } modifier='material' placeholder='Username (read-only)' /> <input value={this.state.text} onChange={event => this.setState({text: event.target.value})} />
fix(react): adapt <Input> example to changed readOnly prop case
OnsenUI_OnsenUI
train
js
5997ea54ad6d62768b8728a4a7b39739adc177cd
diff --git a/test/tdigest_test.rb b/test/tdigest_test.rb index <HASH>..<HASH> 100644 --- a/test/tdigest_test.rb +++ b/test/tdigest_test.rb @@ -32,7 +32,7 @@ class TDigestTest < Minitest::Test describe 'with alot of uniformly distributed points' do it 'has minimal error' do - N = 1_000 + N = 10_000 maxerr = 0 values = Array.new(N).map { rand }
test: increase nbr of iterations
castle_tdigest
train
rb
3d97c5369ca43fc29aa05296f02262ff6c9d63a6
diff --git a/app/reducers/counter.js b/app/reducers/counter.js index <HASH>..<HASH> 100644 --- a/app/reducers/counter.js +++ b/app/reducers/counter.js @@ -5,7 +5,7 @@ export const counterReducer = (state = {}, action) => { switch (action.type) { case NODE_ADD: { const nodeType = action.payload.nodeType; - const pinsCount = R.pipe( + const pinCount = R.pipe( R.values, R.length )(nodeType.pins); @@ -13,7 +13,7 @@ export const counterReducer = (state = {}, action) => { state, { nodes: R.inc(state.nodes), - pins: R.add(state.pins, pinsCount), + pins: R.add(state.pins, pinCount), } ); }
style(counterReducer): rename pinsCount -> pinCount
xodio_xod
train
js
1dd33c700e016333c7e24e4b5de311b955b668e3
diff --git a/dpark/beansdb.py b/dpark/beansdb.py index <HASH>..<HASH> 100644 --- a/dpark/beansdb.py +++ b/dpark/beansdb.py @@ -7,6 +7,7 @@ import struct import zlib import cPickle from dpark.util import get_logger +from dpark.file_manager import open_file from dpark.serialize import load_func, dump_func logger = get_logger(__name__) @@ -142,14 +143,13 @@ def write_record(f, key, flag, value, version, ts): class BeansdbReader(object): - def __init__(self, path, key_filter=None, fullscan=False, raw=False, fileinfo=None): + def __init__(self, path, key_filter=None, fullscan=False, raw=False): if key_filter is None: fullscan = True self.path = path self.key_filter = key_filter self.fullscan = fullscan self.raw = raw - self.fileinfo = fileinfo if not fullscan: hint = path[:-5] + '.hint' if not os.path.exists(hint) and not os.path.exists(hint + '.qlz'): @@ -222,10 +222,7 @@ class BeansdbReader(object): return value, err def open_file(self): - if self.fileinfo: - return self.fileinfo - else: - return open(self.path, 'r', 4096 * 1024) + return open_file(self.path) def full_scan(self, begin, end): f = self.open_file()
fix: remove file info in beansdb.py
douban_dpark
train
py
eee7f8f145efbd1fadc063b49c650b013a5f235c
diff --git a/ui/src/components/editor/editor-caret.js b/ui/src/components/editor/editor-caret.js index <HASH>..<HASH> 100644 --- a/ui/src/components/editor/editor-caret.js +++ b/ui/src/components/editor/editor-caret.js @@ -228,8 +228,11 @@ export class Caret { case void 0: return false default: - const state = document.queryCommandState(cmd) - return param !== void 0 ? state === param : state + if (this.hasSelection) { + const state = document.queryCommandState(cmd) + return param !== void 0 ? state === param : state + } + return false } }
fix(editor): Icons are activating/deactivating synchronously when having multiple QEditors with :toolbar props (#<I>) (#<I>)
quasarframework_quasar
train
js
8c928e9fcd21658eb3ee7536363215433f0c8c5c
diff --git a/packages/project-utils/bundling/app/createDevConfig.js b/packages/project-utils/bundling/app/createDevConfig.js index <HASH>..<HASH> 100644 --- a/packages/project-utils/bundling/app/createDevConfig.js +++ b/packages/project-utils/bundling/app/createDevConfig.js @@ -1,4 +1,4 @@ -module.exports = async (options = { openBrowser: false }) => { +module.exports = async (options = { openBrowser: true }) => { const path = require("path"); const appIndexJs = path.resolve("src", "index.tsx");
fix(project-utils): open browser after build
Webiny_webiny-js
train
js
14ed97f8e17a25ffaadad63cc6aa54eb28b50fc3
diff --git a/packages/utiljs-arrays/test/ArraysTest.js b/packages/utiljs-arrays/test/ArraysTest.js index <HASH>..<HASH> 100644 --- a/packages/utiljs-arrays/test/ArraysTest.js +++ b/packages/utiljs-arrays/test/ArraysTest.js @@ -20,6 +20,17 @@ describe("Arrays", () => { }); }); + describe("#sort", () => { + it("should sort an array", () => { + // TODO BUG #short should not throw an error. + const a = [2, 1, 3]; + expect(() => arrays.sort(a)).to.throw(Error); + // const b = arrays.sort(a); + // expect(b).to.not.eql(a); + // expect(b).to.eql([1, 2, 3]); + }); + }); + describe("#shuffle", () => { it("should shuffle array contents", () => { const a = [1, 2, 3];
test: expose a bug in Arrays#sort
creemama_utiljs
train
js
a7b3d82d4a0e4fdf97034f2f8a46e75851ab1fc5
diff --git a/tests/Test/Cli/Tasks/RouteListTaskTest.php b/tests/Test/Cli/Tasks/RouteListTaskTest.php index <HASH>..<HASH> 100644 --- a/tests/Test/Cli/Tasks/RouteListTaskTest.php +++ b/tests/Test/Cli/Tasks/RouteListTaskTest.php @@ -64,7 +64,7 @@ class RouteListTaskTest extends TestCase ['+--------+------+----------+-----------+--------------------------------------------+-----------------------------+'], ['| | | GET | /get | App\Http\Controllers\StubController::index | |'], ['| | | POST | /post | Test\Stub\StubController::index | |'], - ['| | | GET | /u/'.Decorate::info('{user}').' | Test\Stub\StubController::index | |'], + ['| | | GET | /u/'.Decorate::notice('{user}').' | Test\Stub\StubController::index | |'], ['| | | GET|HEAD | /get-head | Test\Stub\StubController::index | Luxury\Http\Middleware\Csrf |'], ['+--------+------+----------+-----------+--------------------------------------------+-----------------------------+'], ]]
fix(RouteListTaskTest): Correct wrong Decoration in test.
phalcon-nucleon_framework
train
php
3a80f9843146b49568057ba2630825c2417bb427
diff --git a/functions.php b/functions.php index <HASH>..<HASH> 100644 --- a/functions.php +++ b/functions.php @@ -305,7 +305,7 @@ function removeDir($dir) } } rmdir($dir); - } elseif (file_exists($dir)) { + } elseif (file_exists($dir) || is_link($dir)) { unlink($dir); } }
fix: bad symlinks can not be detected by file_exist()
phwoolcon_phwoolcon
train
php
03908a1d4f4a046ca0f9dd7dd4e3d2776739bba2
diff --git a/VisComponent/mixin/VegaChart.js b/VisComponent/mixin/VegaChart.js index <HASH>..<HASH> 100644 --- a/VisComponent/mixin/VegaChart.js +++ b/VisComponent/mixin/VegaChart.js @@ -8,7 +8,17 @@ let VegaChart = (Base, spec) => class extends Base { } render () { - this.chart.then(chart => chart.update()); + this.chart.then(chart => { + if (this.width) { + chart = chart.width(this.width); + } + + if (this.height) { + chart = chart.height(this.height); + } + + chart.update(); + }); } get serializationFormats () {
fix(VegaChart): properly interpret this.width and this.height in rendering a Vega chart
Kitware_candela
train
js
5f0c618da80e00273379b84fce306252185b879e
diff --git a/src/internalHelpers/_isValidColor.js b/src/internalHelpers/_isValidColor.js index <HASH>..<HASH> 100644 --- a/src/internalHelpers/_isValidColor.js +++ b/src/internalHelpers/_isValidColor.js @@ -1,2 +1,3 @@ // @flow export const isRgb = (color: string) : bool => /rgb\((\d{1,3}), ?(\d{1,3}), ?(\d{1,3})\)/.test(color) +export const isRgba = (color: string) : bool => /rgba\((\d{1,3}), ?(\d{1,3}), ?(\d{1,3}), ?(\d{1})?.?(\d{1,2})\)/.test(color)
chore(transparentize): Added isRgba regex
styled-components_polished
train
js
719c8947525bcc821ac1847165506fa1c1f96fcc
diff --git a/test/index.js b/test/index.js index <HASH>..<HASH> 100644 --- a/test/index.js +++ b/test/index.js @@ -3,7 +3,7 @@ */ var assert = require('assert'); -var pty = require('pty.js'); +var pty = require('../'); var term = pty.fork('sh', [], { name: 'vt100' });
test: make the test file work from within a git repo
chjj_pty.js
train
js
85818032462aac01aa04f32a80bee3e62270be01
diff --git a/algolia/search/utils_test.go b/algolia/search/utils_test.go index <HASH>..<HASH> 100644 --- a/algolia/search/utils_test.go +++ b/algolia/search/utils_test.go @@ -34,6 +34,9 @@ func TestHasObjectIDField(t *testing.T) { m := map[string]interface{}{"company": "algolia"} require.False(t, hasObjectID(m)) + m["objectID"] = "" + require.False(t, hasObjectID(m)) + m["objectID"] = 42 require.True(t, hasObjectID(m))
test: ensure hasObjectID return false when objectID field exists but is empty
algolia_algoliasearch-client-go
train
go