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
399d6fadb8ae2e2d3335a3fba32fd43c55cb002f
diff --git a/src/Entity/Service.php b/src/Entity/Service.php index <HASH>..<HASH> 100644 --- a/src/Entity/Service.php +++ b/src/Entity/Service.php @@ -105,6 +105,7 @@ class Service implements NodeInterface '70' => 'UPS Access Point Economy', '74' => 'UPS Express 12:00', '93' => 'UPS Sure Post', + '96' => 'UPS Worldwide Express Freight', ]; /** @deprecated */
fix: missing UPS Worldwide Express Freight for international shipping. (#<I>)
gabrielbull_php-ups-api
train
php
be5526ed6c8a11dae4610d6aaef50c32e646e7d6
diff --git a/packages/@vue/cli/lib/util/shouldUseTaobao.js b/packages/@vue/cli/lib/util/shouldUseTaobao.js index <HASH>..<HASH> 100644 --- a/packages/@vue/cli/lib/util/shouldUseTaobao.js +++ b/packages/@vue/cli/lib/util/shouldUseTaobao.js @@ -36,14 +36,21 @@ module.exports = async function shouldUseTaobao () { const userCurrent = (await execa(`npm`, ['config', 'get', 'registry'])).stdout const defaultRegistry = registries.npm + if (removeSlash(userCurrent) !== removeSlash(defaultRegistry)) { // user has configured custom regsitry, respect that return save(false) } - const faster = await Promise.race([ - ping(defaultRegistry), - ping(registries.taobao) - ]) + + let faster + try { + faster = await Promise.race([ + ping(defaultRegistry), + ping(registries.taobao) + ]) + } catch (e) { + return save(false) + } if (faster !== registries.taobao) { // default is already faster
fix: bail when registry ping fails close #<I>
vuejs_vue-cli
train
js
957301576c101535d4a3f9459e3d8a6b75cb6779
diff --git a/gulpfile.babel.js b/gulpfile.babel.js index <HASH>..<HASH> 100755 --- a/gulpfile.babel.js +++ b/gulpfile.babel.js @@ -414,8 +414,13 @@ gulp.task('prepare-css-components', ['prepare'], () => { gulp.task('compress-distribution-package', () => { const src = [ path.join(__dirname, 'build/**'), + path.join(__dirname, 'LICENSE'), + path.join(__dirname, 'CHANGELOG.md'), + path.join(__dirname, 'bindings/*/dist/**'), '!' + path.join(__dirname, 'build/docs/**'), - '!' + path.join(__dirname, 'build/stylus/**') + '!' + path.join(__dirname, 'build/docs'), + '!' + path.join(__dirname, 'build/js/angular/**'), + '!' + path.join(__dirname, 'build/js/angular') ]; return gulp.src(src)
chore(gulpfile): Modified onsenui.zip for nightly build.
OnsenUI_OnsenUI
train
js
7afb11e00d3184e8c479dfbe042bf4c1b3599272
diff --git a/pstoreds/ds_test.go b/pstoreds/ds_test.go index <HASH>..<HASH> 100644 --- a/pstoreds/ds_test.go +++ b/pstoreds/ds_test.go @@ -33,8 +33,6 @@ func TestDsPeerstore(t *testing.T) { func TestDsAddrBook(t *testing.T) { for name, dsFactory := range dstores { t.Run(name+" Cacheful", func(t *testing.T) { - t.Parallel() - opts := DefaultOpts() opts.GCPurgeInterval = 1 * time.Second opts.CacheSize = 1024 @@ -43,8 +41,6 @@ func TestDsAddrBook(t *testing.T) { }) t.Run(name+" Cacheless", func(t *testing.T) { - t.Parallel() - opts := DefaultOpts() opts.GCPurgeInterval = 1 * time.Second opts.CacheSize = 0
test: don't run datastore tests in parallel We have timing dependencies in some of these tests.
libp2p_go-libp2p-peerstore
train
go
ccdb9ff9b0afa96bf6089b43782579a56a988618
diff --git a/src/utils.js b/src/utils.js index <HASH>..<HASH> 100644 --- a/src/utils.js +++ b/src/utils.js @@ -28,7 +28,8 @@ const extract = (regex) => { let style = ''; let matches; - while ((matches = regex.exec(getHTML())) !== null) { + const html = getHTML(); + while ((matches = regex.exec(html)) !== null) { style += `${matches[1]} `; }
perf(utils): only extract HTML once during while loop (#<I>)
styled-components_jest-styled-components
train
js
cb658426c4744c218c5bb6dd3a22e8665118800e
diff --git a/sample/src/about/about.js b/sample/src/about/about.js index <HASH>..<HASH> 100644 --- a/sample/src/about/about.js +++ b/sample/src/about/about.js @@ -21,7 +21,7 @@ export class About { attached() { // let bridge = System.get(System.normalizeSync('aurelia-materialize-bridge')); // this.version = bridge.version; - this.version = '0.10.2'; + this.version = '0.10.4'; } onSelectionChanged(e) { diff --git a/sample/src/main.js b/sample/src/main.js index <HASH>..<HASH> 100644 --- a/sample/src/main.js +++ b/sample/src/main.js @@ -1,4 +1,3 @@ -import 'jquery'; import 'materialize'; //Configure Bluebird Promises.
chore(sample): increase version
aurelia-ui-toolkits_aurelia-materialize-bridge
train
js,js
615afab8bba40efef88d232c9da8397d66fb5f17
diff --git a/src/structures/BaseCommandInteraction.js b/src/structures/BaseCommandInteraction.js index <HASH>..<HASH> 100644 --- a/src/structures/BaseCommandInteraction.js +++ b/src/structures/BaseCommandInteraction.js @@ -182,7 +182,7 @@ class BaseCommandInteraction extends Interaction { // These are here only for documentation purposes - they are implemented by InteractionResponses /* eslint-disable no-empty-function */ - defer() {} + deferReply() {} reply() {} fetchReply() {} editReply() {}
docs: rename implementation of deferReply (#<I>)
discordjs_discord.js
train
js
86677ebcbfaecf712f339b73a568150fc9fd5f5e
diff --git a/src/store.js b/src/store.js index <HASH>..<HASH> 100644 --- a/src/store.js +++ b/src/store.js @@ -25,13 +25,6 @@ export class Store { strict = false } = options - let { - state = {} - } = options - if (typeof state === 'function') { - state = state() || {} - } - // store internal state this._committing = false this._actions = Object.create(null) @@ -56,6 +49,8 @@ export class Store { // strict mode this.strict = strict + const state = this._modules.root.state + // init root module. // this also recursively registers all sub-modules // and collects all module getters inside this._wrappedGetters diff --git a/test/unit/store.spec.js b/test/unit/store.spec.js index <HASH>..<HASH> 100644 --- a/test/unit/store.spec.js +++ b/test/unit/store.spec.js @@ -286,6 +286,14 @@ describe('Store', () => { expect(store.state.a).toBe(3) }) + it('should not call root state function twice', () => { + const spy = jasmine.createSpy().and.returnValue(1) + new Vuex.Store({ + state: spy + }) + expect(spy).toHaveBeenCalledTimes(1) + }) + it('subscribe: should handle subscriptions / unsubscriptions', () => { const subscribeSpy = jasmine.createSpy() const secondSubscribeSpy = jasmine.createSpy()
fix: avoid to call root state function twice (#<I>)
vuejs_vuex
train
js,js
a8e400b09a2587a9e8ea8a0455bc49e899fee751
diff --git a/packages/bonde-admin/src/mobilizations/widgets/__plugins__/content/components/editor-old.js b/packages/bonde-admin/src/mobilizations/widgets/__plugins__/content/components/editor-old.js index <HASH>..<HASH> 100644 --- a/packages/bonde-admin/src/mobilizations/widgets/__plugins__/content/components/editor-old.js +++ b/packages/bonde-admin/src/mobilizations/widgets/__plugins__/content/components/editor-old.js @@ -81,14 +81,11 @@ class EditorOld extends React.Component { } handleClick (e) { + console.log(e) e.preventDefault() - const target = $(e.target).closest('a').prop('hash') - const scrollable = $('#blocks-list') - const yPosition = $(target).offset().top + scrollable.scrollTop() - scrollable.position().top + const target = document.getElementById(e.target) - scrollable.stop().animate({scrollTop: yPosition}, 500, () => { - window.location.hash = target - }) + target.scrollIntoView({behavior: "smooth"}) } save () {
feat(admin): refactor EditorOld hanbleClick
nossas_bonde-client
train
js
49c0c93051f6ca860a39fafca9c0eb7ec986df67
diff --git a/packages/react/.storybook/main.js b/packages/react/.storybook/main.js index <HASH>..<HASH> 100644 --- a/packages/react/.storybook/main.js +++ b/packages/react/.storybook/main.js @@ -13,6 +13,7 @@ const customProperties = require('postcss-custom-properties'); const rtlcss = require('rtlcss'); const { + CARBON_ENABLE_V11_RELEASE, CARBON_REACT_STORYBOOK_USE_CUSTOM_PROPERTIES = 'false', CARBON_REACT_STORYBOOK_USE_RTL, CARBON_REACT_STORYBOOK_USE_SASS_LOADER, @@ -158,6 +159,18 @@ module.exports = { ); } + // Enable process.env variables other than STORYBOOK_* in our preview + // environment + // @see https://github.com/storybookjs/storybook/issues/12270#issuecomment-755398949 + const definePlugin = config.plugins.find((plugin) => { + return plugin.definitions && plugin.definitions['process.env']; + }); + + definePlugin.definitions['process.env'] = { + ...definePlugin.definitions['process.env'], + CARBON_ENABLE_V11_RELEASE: JSON.stringify(CARBON_ENABLE_V11_RELEASE), + }; + return config; }, };
chore(react): update storybook to accept process.env (#<I>)
carbon-design-system_carbon-components
train
js
77968889d06dbbf029052419c30171c5c3cf5ce6
diff --git a/docs/conf.py b/docs/conf.py index <HASH>..<HASH> 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -327,7 +327,7 @@ def process_docstring(app, what, name, obj, options, lines): # Add the field's type to the docstring if isinstance(field, models.ForeignKey): - to = field.rel.to + to = field.remote_field.model lines.append(u':type %s: %s to :class:`~%s.%s`' % (field.name, type(field).__name__, to.__module__, to.__name__)) else:
docs: Fix compatibility with Django <I>
dj-stripe_dj-stripe
train
py
8eadb0d2ecae07ee90391bacc01adc34cde77640
diff --git a/pipes/dns/create_dns.py b/pipes/dns/create_dns.py index <HASH>..<HASH> 100644 --- a/pipes/dns/create_dns.py +++ b/pipes/dns/create_dns.py @@ -1,15 +1,16 @@ """DNS functions for deployment.""" -import logging -from pprint import pformat import argparse -import os import configparser import json +import logging +import os +from pprint import pformat +import boto3.session import gogoutils -from jinja2 import Environment, FileSystemLoader import requests -import boto3.session +from jinja2 import Environment, FileSystemLoader +from tryagain import retries class SpinnakerAppNotFound(Exception): @@ -120,6 +121,7 @@ class SpinnakerDns: return details + @retries(max_attempts=10, wait=10.0, exceptions=SpinnakerElbNotFound) def get_app_aws_elb(self): """Get an application's AWS elb dns name""" url = '{0}/applications/{1}/loadBalancers'.format(self.gate_url, self.app_name)
fix: Need to retry for a couple seconds for ELB See also: PSOBAT-<I>
foremast_foremast
train
py
bed59fd1dff890beb9e9225d8a452ac87b2c28f6
diff --git a/engine/src/test/java/org/camunda/bpm/engine/test/api/externaltask/SetExternalTasksRetriesTest.java b/engine/src/test/java/org/camunda/bpm/engine/test/api/externaltask/SetExternalTasksRetriesTest.java index <HASH>..<HASH> 100644 --- a/engine/src/test/java/org/camunda/bpm/engine/test/api/externaltask/SetExternalTasksRetriesTest.java +++ b/engine/src/test/java/org/camunda/bpm/engine/test/api/externaltask/SetExternalTasksRetriesTest.java @@ -312,6 +312,7 @@ public class SetExternalTasksRetriesTest { } @Test + @RequiredHistoryLevel(ProcessEngineConfiguration.HISTORY_FULL) public void shouldSetExternalTaskRetriesWithLargeList() { // given engineRule.getProcessEngineConfiguration().setBatchJobsPerSeed(1010);
fix(engine): adjust history level conf Related to CAM-<I>
camunda_camunda-bpm-platform
train
java
0bae00fb4433ceb764d9c90c479166c4d80c5a59
diff --git a/test/functional/change_stream_tests.js b/test/functional/change_stream_tests.js index <HASH>..<HASH> 100644 --- a/test/functional/change_stream_tests.js +++ b/test/functional/change_stream_tests.js @@ -39,7 +39,7 @@ describe('Change Streams', function() { // The actual test we wish to run test: function(done) { var configuration = this.configuration; - var client = configuration.newClient(); + const client = configuration.newClient(); client.connect(function(err, client) { assert.ifError(err); @@ -712,7 +712,7 @@ describe('Change Streams', function() { }); const mockServerURL = 'mongodb://localhost:32000/'; - var client = configuration.newClient(mockServerURL); + const client = configuration.newClient(mockServerURL); client.connect(function(err, client) { assert.ifError(err); @@ -1441,7 +1441,7 @@ describe('Change Streams', function() { test: function(done) { var configuration = this.configuration; var crypto = require('crypto'); - var client = configuration.newClient(configuration.url(), { + const client = configuration.newClient(configuration.url(), { poolSize: 1, autoReconnect: false });
test(change-streams): const consistency
mongodb_node-mongodb-native
train
js
cf487ffe27cc35053cdbd417b96dbaa45691faad
diff --git a/lib/components/app/app-menu.js b/lib/components/app/app-menu.js index <HASH>..<HASH> 100644 --- a/lib/components/app/app-menu.js +++ b/lib/components/app/app-menu.js @@ -1,6 +1,6 @@ import React, { Component, Fragment } from 'react' import { connect } from 'react-redux' -import { FormattedMessage, injectIntl } from 'react-intl' +import { FormattedMessage, injectIntl, useIntl } from 'react-intl' import { MenuItem } from 'react-bootstrap' import { withRouter } from 'react-router' import PropTypes from 'prop-types' @@ -241,7 +241,9 @@ export default withRouter( /** * Renders a label and icon either from url or font awesome type */ -const IconAndLabel = injectIntl(({ iconType, iconUrl, intl, label }) => { +const IconAndLabel = ({ iconType, iconUrl, label }) => { + const intl = useIntl() + return ( <span> {iconUrl ? ( @@ -260,4 +262,4 @@ const IconAndLabel = injectIntl(({ iconType, iconUrl, intl, label }) => { {label} </span> ) -}) +}
refactor(app-menu): use react-intl hook in functional component
opentripplanner_otp-react-redux
train
js
4c7e52288d23769fb5d28daba7c235c82533e3ac
diff --git a/public/app/features/panel/panelMenu.js b/public/app/features/panel/panelMenu.js index <HASH>..<HASH> 100644 --- a/public/app/features/panel/panelMenu.js +++ b/public/app/features/panel/panelMenu.js @@ -56,7 +56,7 @@ function (angular, $, _) { if ($scope.panel.links) { _.each($scope.panel.links, function(link) { - var info = linkSrv.getPanelLinkAnchorInfo(link); + var info = linkSrv.getPanelLinkAnchorInfo(link, $scope.panel.scopedVars); menu.push({text: info.title, href: info.href, target: info.target }); }); }
fix(templating): another fix for panel links and repeat panels, #<I>
grafana_grafana
train
js
309a8bffdfec91aca817530d83a20b273e1df641
diff --git a/shared-data/js/helpers/computeWellAccess.js b/shared-data/js/helpers/computeWellAccess.js index <HASH>..<HASH> 100644 --- a/shared-data/js/helpers/computeWellAccess.js +++ b/shared-data/js/helpers/computeWellAccess.js @@ -24,8 +24,12 @@ function findWellAt (labwareName: string, x: number, y: number): ?string { // Not circular, must be a rectangular well // For rectangular wells, (x, y) is at the center. // Here we calculate 'wellOriginX/Y', at the bottom left point (lowest x y values) - const wellOriginX = well.x - (well.width / 2) - const wellOriginY = well.y - (well.length / 2) + + // TODO: Ian 2018-09-17 un-comment the below when definitions update to center + // (right now defs are bottom-left bounding box) + + const wellOriginX = well.x // - (well.width / 2) + const wellOriginY = well.y // - (well.length / 2) return Math.abs(x - wellOriginX) <= well.width && Math.abs(y - wellOriginY) <= well.length
fix(protocol-designer): fix bug with well access for rect wells (#<I>) Fixes #<I>
Opentrons_opentrons
train
js
fd25d19c9c7dbdba745f5bbe5c08d59e5717b74d
diff --git a/src/structures/ClientUser.js b/src/structures/ClientUser.js index <HASH>..<HASH> 100644 --- a/src/structures/ClientUser.js +++ b/src/structures/ClientUser.js @@ -139,7 +139,7 @@ class ClientUser extends Structures.get('User') { * @example * // Set the client user's activity * client.user.setActivity('discord.js', { type: 'WATCHING' }) - * .then(presence => console.log(`Activity set to ${presence.game.name}`)) + * .then(presence => console.log(`Activity set to ${presence.activity.name}`)) * .catch(console.error); */ setActivity(name, options = {}) {
docs(ClientUser): fix example for setActivity method (#<I>)
discordjs_discord.js
train
js
8aaa81bcbc5e628556d9d33921a24e448d8a39bf
diff --git a/packages/blueprint-stripe/lib/models/stripe-account-ref.js b/packages/blueprint-stripe/lib/models/stripe-account-ref.js index <HASH>..<HASH> 100644 --- a/packages/blueprint-stripe/lib/models/stripe-account-ref.js +++ b/packages/blueprint-stripe/lib/models/stripe-account-ref.js @@ -9,7 +9,11 @@ const StripeAccountRefSchema = new Schema({ charges_enabled: { type: Boolean }, /// Payouts are enabled on the Stripe account. - payouts_enabled: { type: Boolean } + payouts_enabled: { type: Boolean }, + + /// The requirements for the account. The content of this object is used + /// to inform the platform what information is needed about a Stripe account. + requirements: {} }); module.exports = StripeAccountRefSchema;
feat: added requirements object to the account ref
onehilltech_blueprint
train
js
be0f6e2f9ffc80ee58305709ebc6b801187e21bb
diff --git a/interfaces/python/infomap.py b/interfaces/python/infomap.py index <HASH>..<HASH> 100644 --- a/interfaces/python/infomap.py +++ b/interfaces/python/infomap.py @@ -70,7 +70,7 @@ def _construct_args(args=None, # algorithm two_level=False, flow_model=None, - directed=False, + directed=None, use_node_weights_as_flow=False, to_nodes=False, teleportation_probability=_DEFAULT_TELEPORTATION_PROB, @@ -170,8 +170,8 @@ def _construct_args(args=None, if flow_model is not None: args += " --flow-model {}".format(flow_model) - if directed: - args += " --directed" + if directed is not None: + args += " --directed" if directed else " --flow-model undirected" if use_node_weights_as_flow: args += " --use-node-weights-as-flow"
fix(python): Using directed=False should use undirected flow
mapequation_infomap
train
py
dbecbfc82dfe06a513f4a45217b9f69b5b924808
diff --git a/robot-server/robot_server/service/app.py b/robot-server/robot_server/service/app.py index <HASH>..<HASH> 100644 --- a/robot-server/robot_server/service/app.py +++ b/robot-server/robot_server/service/app.py @@ -42,7 +42,12 @@ app.include_router(router=legacy_routes, }) # New v2 routes -app.include_router(router=routes) +app.include_router(router=routes, + responses={ + HTTP_422_UNPROCESSABLE_ENTITY: { + "model": ErrorResponse + } + }) @app.on_event("startup")
fix(robot-server): make sure fastapi validation errors are properly documented (#<I>)
Opentrons_opentrons
train
py
ea8c4ccc7679fef944267086871baa0a1c73485b
diff --git a/transactions.js b/transactions.js index <HASH>..<HASH> 100644 --- a/transactions.js +++ b/transactions.js @@ -101,6 +101,13 @@ class Transaction { if (options.readConcern) this.options.readConcern = options.readConcern; if (options.readPreference) this.options.readPreference = options.readPreference; + + // TODO: This isn't technically necessary + this._pinnedServer = undefined; + } + + get server() { + return this._pinnedServer; } /** @@ -122,6 +129,9 @@ class Transaction { const nextStates = stateMachine[this.state]; if (nextStates && nextStates.indexOf(nextState) !== -1) { this.state = nextState; + if (this.state === TxnState.NO_TRANSACTION) { + this.unpinServer(); + } return; } @@ -129,6 +139,16 @@ class Transaction { `Attempted illegal state transition from [${this.state}] to [${nextState}]` ); } + + pinServer(server) { + if (this.isActive) { + this._pinnedServer = server; + } + } + + unpinServer() { + this._pinnedServer = undefined; + } } module.exports = { TxnState, Transaction };
feat: add ability to pin server to transaction state machine
mongodb_node-mongodb-native
train
js
add037140ecce81116bcddffbde1db54b5aa4ae3
diff --git a/test/test.js b/test/test.js index <HASH>..<HASH> 100644 --- a/test/test.js +++ b/test/test.js @@ -13,7 +13,7 @@ const expect = require('chai').expect describe('diff-sync', () => { describe('tables', () => { it('build everything for a simple table in a blank database', () => { - const statements = pgDiffSync(empty, people) + const statements = pgDiffSync(empty, people).map(s => s.trim()) expect(statements).to.eql( [ 'CREATE SCHEMA pg_diff_sync_test;', @@ -58,7 +58,7 @@ describe('diff-sync', () => { }) it('build nested tables', () => { - const statements = pgDiffSync(empty, planets) + const statements = pgDiffSync(empty, planets).map(s => s.trim()) expect(statements).to.eql( [ 'CREATE SCHEMA pg_diff_sync_test;',
test: trim whitespace for test expects
wmfs_pg-diff-sync
train
js
34f1900d4b2332ef91b6669ad70cf6301e05fe6b
diff --git a/views/v3/partials/navigation/mobile.blade.php b/views/v3/partials/navigation/mobile.blade.php index <HASH>..<HASH> 100644 --- a/views/v3/partials/navigation/mobile.blade.php +++ b/views/v3/partials/navigation/mobile.blade.php @@ -1,5 +1,4 @@ @if (!empty($menuItems)) -<?php var_dump($depth); ?> @nav([ 'items' => $menuItems, 'direction' => 'vertical',
fix: Remove debug var_dump from menu viewfile.
helsingborg-stad_Municipio
train
php
90d99f229ca0e35394a3680a97ab2aea4e74045f
diff --git a/ui/seek_bar.js b/ui/seek_bar.js index <HASH>..<HASH> 100644 --- a/ui/seek_bar.js +++ b/ui/seek_bar.js @@ -73,6 +73,14 @@ shaka.ui.SeekBar = class extends shaka.ui.RangeElement { this.markAdBreaks_(); }); + /** + * When user is scrubbing the seek bar - we should pause the video - see https://git.io/JUhHG + * but will conditionally pause or play the video after scrubbing + * depending on its previous state + * + * @private {boolean} + */ + this.wasPlaying_ = false; /** @private {!Array.<!shaka.ads.CuePoint>} */ this.adCuePoints_ = []; @@ -134,6 +142,7 @@ shaka.ui.SeekBar = class extends shaka.ui.RangeElement { * @override */ onChangeStart() { + this.wasPlaying_ = !this.video.paused; this.controls.setSeeking(true); this.video.pause(); } @@ -176,7 +185,10 @@ shaka.ui.SeekBar = class extends shaka.ui.RangeElement { // call the event so that we can respond immediately. this.seekTimer_.tickNow(); this.controls.setSeeking(false); - this.video.play(); + + if (this.wasPlaying_) { + this.video.play(); + } } /** @return {boolean} */
fix(ui): Don't play after seeking while paused (#<I>)
google_shaka-player
train
js
8e1c92e8e10210915341939ac959fa6e4a3bb23b
diff --git a/src/common.js b/src/common.js index <HASH>..<HASH> 100644 --- a/src/common.js +++ b/src/common.js @@ -89,7 +89,7 @@ module.exports = { hostInfo: function hostInfo () { return `Electron Packager ${metadata.version}\n` + `Node ${process.version}\n` + - `Host Operating system: ${process.platform} (${process.arch})` + `Host Operating system: ${process.platform} ${os.release()} (${process.arch})` }, info: info, warning: warning
fix: add os.release() to host info
electron-userland_electron-packager
train
js
c86ee59b96d54ac13755c4d410ed4d6734e17254
diff --git a/satpy/readers/ascat_metop.py b/satpy/readers/ascat_metop.py index <HASH>..<HASH> 100644 --- a/satpy/readers/ascat_metop.py +++ b/satpy/readers/ascat_metop.py @@ -39,12 +39,12 @@ class ASCATMETOPFileHandler(BaseFileHandler): self.filename_info['start_time'] = datetime.strptime(ds.getncattr('start_date') +' '+ds.getncattr('start_time'),'%Y-%m-%d %H:%M:%S') - self.filename_info['stop_time'] = datetime.strptime(ds.getncattr('stop_date') + self.filename_info['end_time'] = datetime.strptime(ds.getncattr('stop_date') +' '+ds.getncattr('stop_time'),'%Y-%m-%d %H:%M:%S') self.filename_info['equator_crossing_time'] = datetime.strptime(ds.getncattr('equator_crossing_date') +' '+ds.getncattr('equator_crossing_time'),'%Y-%m-%d %H:%M:%S') self.filename_info['orbit_number'] = str(ds.getncattr('orbit_number')) - + print(filename_info) self.lons = None self.lats = None
fix: change stop_time to end_time
pytroll_satpy
train
py
e3b452eaf6d21984e44be51161fd57ec4c443777
diff --git a/src/ci.js b/src/ci.js index <HASH>..<HASH> 100644 --- a/src/ci.js +++ b/src/ci.js @@ -3,5 +3,5 @@ export default function (services, chosenService, options) { if (service) return service.scaffolder(options); - return undefined; + return {}; } diff --git a/test/unit/ci-test.js b/test/unit/ci-test.js index <HASH>..<HASH> 100644 --- a/test/unit/ci-test.js +++ b/test/unit/ci-test.js @@ -15,9 +15,7 @@ suite('ci', () => { return assert.becomes(scaffoldCi(scaffolders, chosenService, options), scaffolderResult); }); - test('that choosing a scaffolder without a defined service does not result in an error', () => scaffoldCi( - any.simpleObject(), - any.word(), - any.simpleObject() - )); + test('that choosing a scaffolder without a defined service does not result in an error', async () => { + assert.deepEqual(scaffoldCi(any.simpleObject(), any.word(), any.simpleObject()), {}); + }); });
fix(ci): returned an empty object for `Other` since later code assumes at least an object to be returned
travi_javascript-scaffolder
train
js,js
f38cbbc17ea21e35e59495721d953e8314dcdcdc
diff --git a/bids/layout/layout.py b/bids/layout/layout.py index <HASH>..<HASH> 100644 --- a/bids/layout/layout.py +++ b/bids/layout/layout.py @@ -1377,7 +1377,7 @@ class BIDSLayout(object): Whether to copy each file as a symbolic link or a deep copy. root : str Optional root directory that all patterns are relative - to. Defaults to current working directory. + to. Defaults to dataset root. conflicts : str Defines the desired action when the output path already exists. Must be one of: @@ -1388,13 +1388,15 @@ class BIDSLayout(object): kwargs : dict Optional key word arguments to pass into a get() query. """ + root = self.root if root is None else root + _files = self.get(**kwargs) if files: _files = list(set(files).intersection(_files)) for f in _files: f.copy(path_patterns, symbolic_link=symbolic_links, - root=self.root, conflicts=conflicts) + root=root, conflicts=conflicts) def write_to_file(self, entities, path_patterns=None, contents=None, link_to=None, copy_from=None,
fix: only use project root if root arg is None
bids-standard_pybids
train
py
3175321844897ad4fa88547c9474724736685209
diff --git a/ibis/backends/base/sql/alchemy/registry.py b/ibis/backends/base/sql/alchemy/registry.py index <HASH>..<HASH> 100644 --- a/ibis/backends/base/sql/alchemy/registry.py +++ b/ibis/backends/base/sql/alchemy/registry.py @@ -131,7 +131,11 @@ def _table_column(t, expr): # If the column does not originate from the table set in the current SELECT # context, we should format as a subquery if t.permit_subquery and ctx.is_foreign_expr(table): - return sa.select([out_expr]) + try: + subq = sa_table.subquery() + except AttributeError: + subq = sa_table + return sa.select(subq.c[out_expr.name]) return out_expr
fix(sqlalchemy): ensure correlated subqueries FROM clauses are rendered
ibis-project_ibis
train
py
ce5d100cccd135683bf9f0758d9635789bd65986
diff --git a/core/src/elements/ons-ripple/index.js b/core/src/elements/ons-ripple/index.js index <HASH>..<HASH> 100644 --- a/core/src/elements/ons-ripple/index.js +++ b/core/src/elements/ons-ripple/index.js @@ -42,8 +42,8 @@ const scheme = { * @codepen wKQWdZ * @tutorial vanilla/Reference/ripple * @modifier light-gray - * [en][/en] - * [ja][/ja] + * [en]Change the color of effects to light gray.[/en] + * [ja]エフェクトの色が明るい灰色になります。[/ja] * @guide cross-platform-styling * [en]Cross platform styling[/en] * [ja]Cross platform styling[/ja] @@ -90,6 +90,14 @@ export default class RippleElement extends BaseElement { */ /** + * @attribute center + * @type {Boolean} + * @description + * [en]If this attribute presents, change the position of wave effect to center of the target element.[/en] + * [ja]この要素を設定すると、エフェクトの位置が要素の真ん中から始まります。[/ja] + */ + + /** * @attribute disabled * @description * [en]If this attribute is set, the ripple effect will be disabled.[/en]
docs(ons-ripple): Added some doc comments.
OnsenUI_OnsenUI
train
js
5cfb4e8cf8c00d3fc8c2634dceae2bd8c0c565f9
diff --git a/cmd/helm/helm_test.go b/cmd/helm/helm_test.go index <HASH>..<HASH> 100644 --- a/cmd/helm/helm_test.go +++ b/cmd/helm/helm_test.go @@ -351,6 +351,7 @@ func TestRootCmd(t *testing.T) { }{ { name: "defaults", + args: []string{"home"}, home: filepath.Join(os.Getenv("HOME"), "/.helm"), }, { @@ -365,6 +366,7 @@ func TestRootCmd(t *testing.T) { }, { name: "with $HELM_HOME set", + args: []string{"home"}, envars: map[string]string{"HELM_HOME": "/bar"}, home: "/bar", },
fix(tests): Fixes broken unit test The new unit test was not passing an explict subcommand arg to the root command in the unit test.
helm_helm
train
go
46c4fa952493ae42f74fa3b502371320cd4beecb
diff --git a/inputs/money-input/money-input.js b/inputs/money-input/money-input.js index <HASH>..<HASH> 100644 --- a/inputs/money-input/money-input.js +++ b/inputs/money-input/money-input.js @@ -253,12 +253,15 @@ export default class MoneyInput extends React.Component { handleBlur = () => { const amount = this.props.value.amount.trim(); - if (amount.length > 0) { + // Skip formatting for empty value or when the input is used with an + // unknown currency. + if (amount.length > 0 && currencies[this.props.value.currencyCode]) { const formattedAmount = formatAmount( amount, this.props.value.currencyCode ); - // when the user entered a value with centPrecision, we can format + + // When the user entered a value with centPrecision, we can format // the resulting value to that currency, e.g. 20.1 to 20.10 if (String(formattedAmount) !== amount) { this.props.onChange({
feat(uikit): make MoneyInput work with unknown currencies
commercetools_ui-kit
train
js
0b8b90a3257c4a3ab1e17ecd32b4392d12dfe776
diff --git a/src/switch/__test__/Switch.test.js b/src/switch/__test__/Switch.test.js index <HASH>..<HASH> 100644 --- a/src/switch/__test__/Switch.test.js +++ b/src/switch/__test__/Switch.test.js @@ -35,7 +35,7 @@ describe('<Switch>', () => { it('Test onChange event.', () => { const S = wrapper.find('.w-switch input').at(0); - S.simulate('change'); + S.simulate('change', { target: { checked: true } }); expect(wrapperState.value).toBe(true); expect(S.html()).toContain('<input type="checkbox" value="on">'); });
test(Switch): Update test case.
uiwjs_uiw
train
js
c051ee3e086f6803f0e0c82ab504c5aeb38fd1f9
diff --git a/geth/wrapper.py b/geth/wrapper.py index <HASH>..<HASH> 100644 --- a/geth/wrapper.py +++ b/geth/wrapper.py @@ -280,7 +280,6 @@ def spawn_geth(geth_kwargs, stdin=stdin, stdout=stdout, stderr=stderr, - bufsize=1, ) return command, proc
fix: do not set bufsize (#<I>)
ethereum_py-geth
train
py
ff164f90130eae6bb24b46dd4f2dace0768d8597
diff --git a/cmd/kubeadm/app/phases/etcd/local.go b/cmd/kubeadm/app/phases/etcd/local.go index <HASH>..<HASH> 100644 --- a/cmd/kubeadm/app/phases/etcd/local.go +++ b/cmd/kubeadm/app/phases/etcd/local.go @@ -236,9 +236,8 @@ func GetEtcdPodSpec(cfg *kubeadmapi.ClusterConfiguration, endpoint *kubeadmapi.A }, Resources: v1.ResourceRequirements{ Requests: v1.ResourceList{ - v1.ResourceCPU: resource.MustParse("100m"), - v1.ResourceMemory: resource.MustParse("100Mi"), - v1.ResourceEphemeralStorage: resource.MustParse("100Mi"), + v1.ResourceCPU: resource.MustParse("100m"), + v1.ResourceMemory: resource.MustParse("100Mi"), }, }, LivenessProbe: staticpodutil.LivenessProbe(probeHostname, "/health", probePort, probeScheme),
feat: remove ephemeral-storage etcd requirement
kubernetes_kubernetes
train
go
de61151d985825f0aea639929eb3bbf059b562a5
diff --git a/packages/date-publication/src/date-time.js b/packages/date-publication/src/date-time.js index <HASH>..<HASH> 100644 --- a/packages/date-publication/src/date-time.js +++ b/packages/date-publication/src/date-time.js @@ -38,7 +38,7 @@ class DatePublication extends Component { } DatePublication.propTypes = { - children: PropTypes.node.isRequired, + children: PropTypes.oneOfType([PropTypes.func, PropTypes.node]).isRequired, date: PropTypes.string.isRequired, showDay: PropTypes.bool };
refactor: amend prop type to work with article summary (#<I>)
newsuk_times-components
train
js
edaef82d441bb7a5d504a99d996dd359dccded74
diff --git a/src/cli/core/utils/sort.js b/src/cli/core/utils/sort.js index <HASH>..<HASH> 100644 --- a/src/cli/core/utils/sort.js +++ b/src/cli/core/utils/sort.js @@ -56,6 +56,8 @@ export function predicatBy(prop, order){ return function (a, b) { var i = 0 while( i < len ) { a = a[prop[i]]; b = b[prop[i]]; i++ } + if (!isNaN(a)) a = parseFloat(a) + if (!isNaN(b)) b = parseFloat(b) if (a < b) { return -1*order } else if (a > b) {
fix: sql request issue with order number Order by a key that is a number doesn't work with key saved with quote inside json data and nead to be parsed as a number before getting compared inside if statement
abecms_abecms
train
js
d6a3a7ba2ab088d3d011dec0fa341c74966671ec
diff --git a/test/test_git_deploy.go b/test/test_git_deploy.go index <HASH>..<HASH> 100644 --- a/test/test_git_deploy.go +++ b/test/test_git_deploy.go @@ -107,10 +107,6 @@ func (s *GitDeploySuite) TestClojureBuildpack(t *c.C) { s.runBuildpackTest(t, "clojure-flynn-example", nil) } -func (s *GitDeploySuite) TestGradleBuildpack(t *c.C) { - s.runBuildpackTest(t, "gradle-flynn-example", nil) -} - func (s *GitDeploySuite) TestPlayBuildpack(t *c.C) { s.runBuildpackTest(t, "play-flynn-example", nil) }
test: Remove Gradle buildpack test The deploy fails with: Downloading <URL>
flynn_flynn
train
go
9ecbdfd4de1fa7d3246ca14d182d951cf9ce0124
diff --git a/src/elements/form/extras/form-field/FormField.js b/src/elements/form/extras/form-field/FormField.js index <HASH>..<HASH> 100644 --- a/src/elements/form/extras/form-field/FormField.js +++ b/src/elements/form/extras/form-field/FormField.js @@ -31,9 +31,11 @@ export class FormField { ngOnInit() { setTimeout(() => { this.field = this.inputs.first; - this.field.inputState.subscribe((evt) => { - this.inactive = evt.value; - }); + if (this.field) { + this.field.inputState.subscribe((evt) => { + this.inactive = evt.value; + }); + } }); } }
fix(form): Fix NPE when using a manual form field
bullhorn_novo-elements
train
js
92aebc7520f88babdc6e266536086e07263514c3
diff --git a/src/stateDirectives.js b/src/stateDirectives.js index <HASH>..<HASH> 100644 --- a/src/stateDirectives.js +++ b/src/stateDirectives.js @@ -251,7 +251,7 @@ function $StateRefActiveDirective($state, $stateParams, $interpolate) { if (typeof $attrs.uiSrefActiveEq !== 'undefined') { return $state.$current.self === state && matchesParams(); } else { - return $state.includes(state.name) && matchesParams(); + return state && $state.includes(state.name) && matchesParams(); } }
fix(uiSref): Check that state is defined in isMatch() Fixes #<I> Fixes #<I>
ui-router_angular
train
js
3d294588a7c36151f4adfbbb75307f2665e87687
diff --git a/packages/@vue/cli-plugin-eslint/index.js b/packages/@vue/cli-plugin-eslint/index.js index <HASH>..<HASH> 100644 --- a/packages/@vue/cli-plugin-eslint/index.js +++ b/packages/@vue/cli-plugin-eslint/index.js @@ -7,7 +7,7 @@ module.exports = (api, { lintOnSave }) => { .pre() .include .add(api.resolve('src')) - .add(api.resolve('test')) + .add(api.resolve('tests')) .end() .test(/\.(vue|(j|t)sx?)$/) .use('eslint-loader')
fix: include test -> tests for eslint-loader
vuejs_vue-cli
train
js
74c0ba5fc6fbd885a8fea21c101199bcd5f7aa0e
diff --git a/dom/src/render-dom.js b/dom/src/render-dom.js index <HASH>..<HASH> 100644 --- a/dom/src/render-dom.js +++ b/dom/src/render-dom.js @@ -180,14 +180,18 @@ function makeIsStrictlyInRootScope(rootList, namespace) { return matched && namespace.indexOf(`.${c}`) === -1 } return function isStrictlyInRootScope(leaf) { + let someClassIsForeign = false for (let parent = leaf; parent !== null; parent = parent.parentElement) { if (rootList.indexOf(parent) >= 0) { return true } const classList = parent.className.split(` `) - const someClassIsForeign = classList.some(classIsForeign) - return !someClassIsForeign + someClassIsForeign = classList.some(classIsForeign) + if (someClassIsForeign) { + break + } } + return !someClassIsForeign } }
fix(render-dom): avoid early termination loop in `isStrictlyInRootScope` Move `someClassIsForeign` declaration and function return statement outside loop.
cyclejs_cyclejs
train
js
c7013c64ee7c41930fae34b732c1333f64268a70
diff --git a/source/rafcon/gui/mygaphas/utils/cache/value_cache.py b/source/rafcon/gui/mygaphas/utils/cache/value_cache.py index <HASH>..<HASH> 100644 --- a/source/rafcon/gui/mygaphas/utils/cache/value_cache.py +++ b/source/rafcon/gui/mygaphas/utils/cache/value_cache.py @@ -27,12 +27,15 @@ class ValueCache(object): self.empty() self._context = Context(prec=precision) - def empty(self): + def empty(self, name=None): """Empty the cache - All values are removed. + :param name: The name of the cache that is to be deleted or None if whole cache is to be deleted """ - self._cache = {} + if name is None: + self._cache = {} + else: + self._cache[name] = {} def store_value(self, name, value, parameters=None): """Stores the value of a certain variable
feat(ValueCache): Allow to empty single cache
DLR-RM_RAFCON
train
py
ad82bc183f634e83b4fc1c0413c61fd237508941
diff --git a/test/qtismtest/runtime/tests/AssessmentTestSessionAttemptsTest.php b/test/qtismtest/runtime/tests/AssessmentTestSessionAttemptsTest.php index <HASH>..<HASH> 100644 --- a/test/qtismtest/runtime/tests/AssessmentTestSessionAttemptsTest.php +++ b/test/qtismtest/runtime/tests/AssessmentTestSessionAttemptsTest.php @@ -48,7 +48,7 @@ class AssessmentTestSessionAttemptsTest extends QtiSmAssessmentTestSessionTestCa $this::assertEquals(AssessmentItemSession::COMPLETION_STATUS_COMPLETED, $this->session['Q01.completionStatus']); } - public function testDoesNotTakeAttemptsWhenInvokingBeginAttemptForSuspendedItemsWithoutEndAttempt() + public function testDoesNotTakeAnAttemptWhenInvokingBeginAttemptConsecutivelyWithoutEndingTheAttempt() { $this->session->beginTestSession();
chore: rename test method in AssessmentTestSessionAttemptsTest
oat-sa_qti-sdk
train
php
6ce5d0dc0b998659aeb13bece30c1cf4ffa80400
diff --git a/nodes/trigger-state/ui-trigger-state.js b/nodes/trigger-state/ui-trigger-state.js index <HASH>..<HASH> 100644 --- a/nodes/trigger-state/ui-trigger-state.js +++ b/nodes/trigger-state/ui-trigger-state.js @@ -71,6 +71,10 @@ RED.nodes.registerType('trigger-state', { haServer.init(node, '#node-input-server'); haServer.autocomplete('entities', (entities) => { availableEntities = entities; + $('#node-input-entityid').autocomplete({ + source: entities, + minLength: 0, + }); }); haServer.autocomplete('properties', (properties) => { availableProperties = properties;
fix(trigger-state): fix autocomplete for entity id field
zachowj_node-red-contrib-home-assistant-websocket
train
js
53624cc48d52f00648b07de8ad579529820038e8
diff --git a/packages/razzle/config/paths.js b/packages/razzle/config/paths.js index <HASH>..<HASH> 100644 --- a/packages/razzle/config/paths.js +++ b/packages/razzle/config/paths.js @@ -6,7 +6,7 @@ const url = require('url'); // Make sure any symlinks in the project folder are resolved: // https://github.com/facebookincubator/create-react-app/issues/637 -const appDirectory = fs.realpathSync(process.cwd()); +const appDirectory = fs.realpathSync(process.env.RAZZLE_APP_PATH || process.cwd()); const resolveApp = relativePath => path.resolve(appDirectory, relativePath); const envPublicUrl = process.env.PUBLIC_URL;
feat(razzle): make appDirectory configurable via ENV configuration
jaredpalmer_razzle
train
js
a61d46eeb0df96022d70d580dc6ff1fd0a301f73
diff --git a/emiz/weather/mizfile/mizfile_get_metar.py b/emiz/weather/mizfile/mizfile_get_metar.py index <HASH>..<HASH> 100644 --- a/emiz/weather/mizfile/mizfile_get_metar.py +++ b/emiz/weather/mizfile/mizfile_get_metar.py @@ -84,6 +84,10 @@ def get_metar_from_mission( mission = miz.mission wind = _get_wind(mission) visibility = min(mission.weather.visibility, 9999) + if mission.weather.fog_visibility > 0: + visibility = min(mission.weather.fog_visibility, visibility) + if visibility: + visibility = ('{:04d}M'.format(visibility)) precipitations = _get_precipitations(mission) clouds = _get_clouds(mission) temp = _get_temp(mission) @@ -97,3 +101,7 @@ def get_metar_from_mission( metar = f'{icao} {time} {wind} {visibility} {precipitations} {clouds} {temp} {pres} {qual}' return re.sub(' +', ' ', metar) + + +if __name__ == '__main__': + print(get_metar_from_mission(r'C:\Users\bob\Saved Games\DCS\Missions\ESST\TRMT_6.2.0.miz'))
fix: fix visibility in METAR from mission in case of fog
etcher-be_emiz
train
py
9b21bd4b87f8eff9e6cb998c5f335669238f044c
diff --git a/go/test/endtoend/cellalias/cell_alias_test.go b/go/test/endtoend/cellalias/cell_alias_test.go index <HASH>..<HASH> 100644 --- a/go/test/endtoend/cellalias/cell_alias_test.go +++ b/go/test/endtoend/cellalias/cell_alias_test.go @@ -185,7 +185,7 @@ func TestMain(m *testing.M) { return 1, err } } - if err := localCluster.VtctlclientProcess.InitShardPrimary(keyspaceName, shard1.Name, shard1Primary.Cell, shard1Primary.TabletUID); err != nil { + if err := localCluster.VtctlclientProcess.InitializeShard(keyspaceName, shard1.Name, shard1Primary.Cell, shard1Primary.TabletUID); err != nil { return 1, err } @@ -203,7 +203,7 @@ func TestMain(m *testing.M) { } } - if err := localCluster.VtctlclientProcess.InitShardPrimary(keyspaceName, shard2.Name, shard2Primary.Cell, shard2Primary.TabletUID); err != nil { + if err := localCluster.VtctlclientProcess.InitializeShard(keyspaceName, shard2.Name, shard2Primary.Cell, shard2Primary.TabletUID); err != nil { return 1, err }
test: use PRS instead of ISP in cell_alias_test
vitessio_vitess
train
go
6474b3ffe0b5c01296ac1f53bae6bacfda9215c5
diff --git a/test/page.spec.js b/test/page.spec.js index <HASH>..<HASH> 100644 --- a/test/page.spec.js +++ b/test/page.spec.js @@ -781,6 +781,25 @@ module.exports.addTests = function({testRunner, expect, headless, Errors, Device await page.addScriptTag({content: 'window.__injected = 42;'}); expect(await page.evaluate(() => window.__injected)).toBe(42); }); + it('should bypass CSP in iframes as well', async({page, server}) => { + await page.goto(server.EMPTY_PAGE); + { + // Make sure CSP prohibits addScriptTag in an iframe. + const frame = await utils.attachFrame(page, 'frame1', server.PREFIX + '/csp.html'); + await frame.addScriptTag({content: 'window.__injected = 42;'}).catch(e => void e); + expect(await frame.evaluate(() => window.__injected)).toBe(undefined); + } + + // By-pass CSP and try one more time. + await page.setBypassCSP(true); + await page.reload(); + + { + const frame = await utils.attachFrame(page, 'frame1', server.PREFIX + '/csp.html'); + await frame.addScriptTag({content: 'window.__injected = 42;'}).catch(e => void e); + expect(await frame.evaluate(() => window.__injected)).toBe(42); + } + }); }); describe('Page.addScriptTag', function() {
test: ensure Page.setBypassCSP works with iFrames (#<I>)
GoogleChrome_puppeteer
train
js
f6468c72e6a2244aed4f48b0efca5148e7b0bab1
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 @@ -109,7 +109,7 @@ def _tweak_ns(tag, **options): :param tag: XML tag element :param nspaces: A namespaces dict, {uri: prefix} :param options: Extra keyword options may contain 'nspaces' keyword option - provide a namespace dict, {uri: prefix} + provide a namespace dict, {uri: prefix} >>> _tweak_ns("a", nspaces={}) 'a' diff --git a/anyconfig/schema.py b/anyconfig/schema.py index <HASH>..<HASH> 100644 --- a/anyconfig/schema.py +++ b/anyconfig/schema.py @@ -55,6 +55,7 @@ def validate(data, schema, ac_schema_safe=True, **options): :param schema: Schema object (a dict or a dict-like object) instantiated from schema JSON file or schema JSON string :param options: Other keyword options such as: + - ac_schema_safe: Exception (jsonschema.ValidationError or jsonschema.SchemaError or others) will be thrown during validation process due to any validation or related errors. However, these will
fix: indentation and white space docstring fixes
ssato_python-anyconfig
train
py,py
cd0be2174222c0e5e3ee08fc1ac60db7df346c9a
diff --git a/node.go b/node.go index <HASH>..<HASH> 100644 --- a/node.go +++ b/node.go @@ -142,7 +142,7 @@ func outputXML(buf *bytes.Buffer, n *Node, preserveSpaces bool) { func (n *Node) OutputXML(self bool) string { preserveSpaces := calculatePreserveSpaces(n, false) var buf bytes.Buffer - if self { + if self && n.Type != DocumentNode { outputXML(&buf, n, preserveSpaces) } else { for n := n.FirstChild; n != nil; n = n.NextSibling {
fix: when node is root, not output unnecessary string
antchfx_xmlquery
train
go
949ad6be5a3ad196e7c739749d82bc46824b1c7a
diff --git a/packages/simplebar/src/simplebar.js b/packages/simplebar/src/simplebar.js index <HASH>..<HASH> 100755 --- a/packages/simplebar/src/simplebar.js +++ b/packages/simplebar/src/simplebar.js @@ -149,7 +149,7 @@ export default class SimpleBar { mutations.forEach(mutation => { Array.prototype.forEach.call(mutation.addedNodes, addedNode => { if (addedNode.nodeType === 1) { - if (addedNode.dataset.simplebar) { + if (addedNode.hasAttribute('data-simplebar')) { !addedNode.SimpleBar && new SimpleBar(addedNode, SimpleBar.getElOptions(addedNode)); } else { @@ -166,10 +166,7 @@ export default class SimpleBar { Array.prototype.forEach.call(mutation.removedNodes, removedNode => { if (removedNode.nodeType === 1) { - if ( - removedNode.dataset.simplebar && - removedNode.dataset.simplebar !== 'init' - ) { + if (removedNode.hasAttribute('data-simplebar')) { removedNode.SimpleBar && removedNode.SimpleBar.unMount(); } else { Array.prototype.forEach.call(
chore: revert wrong assertion on mutation observer init
Grsmto_simplebar
train
js
73f34f902634e9778597e129f46895aa8b643d72
diff --git a/lib/internal/inspect-protocol.js b/lib/internal/inspect-protocol.js index <HASH>..<HASH> 100644 --- a/lib/internal/inspect-protocol.js +++ b/lib/internal/inspect-protocol.js @@ -202,7 +202,6 @@ class Client extends EventEmitter { this._http.destroy(); } this._http = null; - this._open = false; this._lastId = 0; this._socket = null; this._pending = {};
refactor: Remove unused field
nodejs_node-inspect
train
js
ee68e8c4fab5250f69dd144406a0179170e864d5
diff --git a/p2p/host/eventbus/basic.go b/p2p/host/eventbus/basic.go index <HASH>..<HASH> 100644 --- a/p2p/host/eventbus/basic.go +++ b/p2p/host/eventbus/basic.go @@ -104,15 +104,10 @@ func (s *sub) Out() <-chan interface{} { } func (s *sub) Close() error { - stop := make(chan struct{}) go func() { - for { - select { - case <-s.ch: - case <-stop: - close(s.ch) - return - } + // drain the event channel, will return when closed and drained. + // this is necessary to unblock publishes to this channel. + for range s.ch { } }() @@ -135,7 +130,7 @@ func (s *sub) Close() error { s.dropper(n.typ) } } - close(stop) + close(s.ch) return nil }
fix: completely drain on close Issue: We could partially drain and end up with, e.g., a close event missing a matching open event.
libp2p_go-libp2p
train
go
535512dfd1ead9d97ff5a30ea8eac1cd88b147c5
diff --git a/source/application/hooks/transforms/index.js b/source/application/hooks/transforms/index.js index <HASH>..<HASH> 100644 --- a/source/application/hooks/transforms/index.js +++ b/source/application/hooks/transforms/index.js @@ -7,16 +7,30 @@ import { } from 'lodash'; import { + resolve as resolvePackage +} from 'try-require'; + +import { deprecation, ok, wait } from '../../../library/log/decorations'; function loadTransform(path) { + const available = resolvePackage(path); + + if (!available) { + return null; + } + try { return require(path); } catch (error) { - return null; + error.message = [ + `Error while loading transform ${path}:`, + error.message + ].join('\n'); + return error; } }
fix: expose errors during module init in loaded transforms
patternplate-archive_patternplate-server
train
js
f9b9d6371294a5cd42109b9b56701d7bf2b28123
diff --git a/src/targets/services/cleanOrphanAccounts.js b/src/targets/services/cleanOrphanAccounts.js index <HASH>..<HASH> 100644 --- a/src/targets/services/cleanOrphanAccounts.js +++ b/src/targets/services/cleanOrphanAccounts.js @@ -1,3 +1,4 @@ +require('babel-polyfill') const cozyFetch = require('../../lib/services/cozyFetch') const logMessagePrefix = level => diff --git a/src/targets/services/triggerBouncing.js b/src/targets/services/triggerBouncing.js index <HASH>..<HASH> 100644 --- a/src/targets/services/triggerBouncing.js +++ b/src/targets/services/triggerBouncing.js @@ -1,3 +1,4 @@ +require('babel-polyfill') const cozyFetch = require('../../lib/services/cozyFetch') const LOGIN_FAILED_ERROR = 'LOGIN_FAILED'
fix: add polyfill in services :wrench:
cozy_cozy-home
train
js,js
4badcd92007ebeeb1638b27051f6cf3025f026e7
diff --git a/lib/chromedriver.js b/lib/chromedriver.js index <HASH>..<HASH> 100644 --- a/lib/chromedriver.js +++ b/lib/chromedriver.js @@ -26,6 +26,7 @@ const MIN_CD_VERSION_WITH_W3C_SUPPORT = 75; const DEFAULT_PORT = 9515; const CHROMEDRIVER_CHROME_MAPPING = { // Chromedriver version: minimum Chrome version + '79.0.3945.36': '79.0.3945.36', '78.0.3904.70': '78.0.3904.70', '77.0.3865.40': '77.0.3865.40', '76.0.3809.126': '76.0.3809.126',
feat: update CD to <I> (#<I>)
appium_appium-chromedriver
train
js
ddc0c764ff8f434b49c2125adc20d4a972af71f9
diff --git a/docs/gatsby-config.js b/docs/gatsby-config.js index <HASH>..<HASH> 100644 --- a/docs/gatsby-config.js +++ b/docs/gatsby-config.js @@ -17,6 +17,13 @@ module.exports = { description: 'A guide to using Apollo Server', githubRepo: 'apollographql/apollo-server', defaultVersion: '3', + remarkTypescriptOptions: { + throwOnError: true, + prettierOptions: { + trailingComma: 'all', + singleQuote: true, + }, + }, // We build our docs including older versions which are synced from // GitHub at build time. If you want to be able to work on docs while // offline, set $OFFLINE and we won't include the old versions.
docs: Throw on remark-ts errors and set custom prettier options (#<I>) * Throw on remark-ts errors and set custom prettier options * Fix prettier error in gatsby-config.js
apollographql_apollo-server
train
js
3f3b61071851d8ed94f2374baa4185ea6e3ce704
diff --git a/src/render/add_movement.js b/src/render/add_movement.js index <HASH>..<HASH> 100644 --- a/src/render/add_movement.js +++ b/src/render/add_movement.js @@ -14,6 +14,8 @@ function __addMovement(deltaX = 0, deltaY = 0) { movement } = this; + this.__updateThrottle(); + let limit = this.__getDeltaLimit(); movement.x = pickInRange(movement.x + deltaX * options.speed, ...limit.x); diff --git a/src/render/set_movement.js b/src/render/set_movement.js index <HASH>..<HASH> 100644 --- a/src/render/set_movement.js +++ b/src/render/set_movement.js @@ -14,6 +14,8 @@ function __setMovement(deltaX = 0, deltaY = 0) { movement } = this; + this.__updateThrottle(); + let limit = this.__getDeltaLimit(); movement.x = pickInRange(deltaX * options.speed, ...limit.x);
fix(wheel): update scrollbar on movement change
idiotWu_smooth-scrollbar
train
js,js
061946ca19b823b8d414d33746613a1312a4ef78
diff --git a/testSetup.js b/testSetup.js index <HASH>..<HASH> 100644 --- a/testSetup.js +++ b/testSetup.js @@ -2,3 +2,6 @@ // Overwrite TTY mode to always render without ansi codes process.stdout.isTTY = false + +// Increase timeout for slow CI runners +jest.setTimeout(10000)
test: increase jest timeout for slow CI runners
okonet_lint-staged
train
js
a22b856494a8c599c9d1acea4edb8a210c1a12d1
diff --git a/src/client/websocket/WebSocketConnection.js b/src/client/websocket/WebSocketConnection.js index <HASH>..<HASH> 100644 --- a/src/client/websocket/WebSocketConnection.js +++ b/src/client/websocket/WebSocketConnection.js @@ -269,13 +269,15 @@ class WebSocketConnection extends EventEmitter { this.inflate.push(data, flush && zlib.Z_SYNC_FLUSH); if (!flush) return; + let packet; try { - const packet = WebSocket.unpack(this.inflate.result); - this.onPacket(packet); - if (this.client.listenerCount('raw')) this.client.emit('raw', packet); + packet = WebSocket.unpack(this.inflate.result); } catch (err) { this.client.emit('debug', err); + return; } + this.onPacket(packet); + if (this.client.listenerCount('raw')) this.client.emit('raw', packet); } /**
fix(WebSocketConnection): make errors in event handlers throw again The error from something like client.on('ready', () => undefined.f); would just be emitted as debug event instead of being thrown. Simply moving the emitting part out of the try catch again solves this.
discordjs_discord.js
train
js
7f1c2ce180fef05426da43429d03e30abc1fe97c
diff --git a/src/Worker.php b/src/Worker.php index <HASH>..<HASH> 100755 --- a/src/Worker.php +++ b/src/Worker.php @@ -48,7 +48,6 @@ class Worker implements LoggerAwareInterface $this->sessionId = ($sessionId !== null) ? $sessionId : uniqid(); if (function_exists('pcntl_signal')) { - declare (ticks = 1); pcntl_signal(SIGTERM, [$this, 'signalHandler']); pcntl_signal(SIGINT, [$this, 'signalHandler']); pcntl_signal(SIGHUP, [$this, 'signalHandler']);
fix: Remove ticks strategy to handle UNIX signals.
Evaneos_daemon
train
php
253a0b5fff9ff6fbf097bc244d62de512ea50c8b
diff --git a/bin/dependencies.js b/bin/dependencies.js index <HASH>..<HASH> 100644 --- a/bin/dependencies.js +++ b/bin/dependencies.js @@ -28,7 +28,7 @@ const BINARIES = [ { // optional to process animated GIFs mandatory: false, - cmd: 'gifsicle2', + cmd: 'gifsicle', url: 'http://www.lcdf.org/gifsicle', msg: 'You will not be able to process animated GIFs.' }
fix(core): typo in the startup dependency check (gifsicle2)
thumbsup_thumbsup
train
js
b95228ed89fa163056945210f4ebd3554165f390
diff --git a/examples/with-context-api/components/Counter.js b/examples/with-context-api/components/Counter.js index <HASH>..<HASH> 100644 --- a/examples/with-context-api/components/Counter.js +++ b/examples/with-context-api/components/Counter.js @@ -12,7 +12,7 @@ const reducer = (state, action) => { case 'INCREASE_BY': return state + action.payload default: - throw new Error(`Unkown action: ${action.type}`) + throw new Error(`Unknown action: ${action.type}`) } }
chore: fix typo of Unkown to Unknown (#<I>)
zeit_next.js
train
js
fe6c420fbc735b1bddb877eefa727f1fd8d7dd50
diff --git a/packages/node_modules/@webex/plugin-meetings/src/reachability/index.js b/packages/node_modules/@webex/plugin-meetings/src/reachability/index.js index <HASH>..<HASH> 100755 --- a/packages/node_modules/@webex/plugin-meetings/src/reachability/index.js +++ b/packages/node_modules/@webex/plugin-meetings/src/reachability/index.js @@ -8,6 +8,7 @@ import {StatelessSparkPlugin} from '@ciscospark/spark-core'; import LoggerProxy from '../common/logs/logger-proxy'; import peerConnectionManager from '../peer-connection-manager'; +import MediaUtil from '../media/util'; import {ICE_STATE, MEETINGS, REACHABILITY, ANSWER} from '../constants'; import ReachabilityRequest from './request'; @@ -175,7 +176,7 @@ export default class Reachability extends StatelessSparkPlugin { clusterList.forEach((cluster) => { const clusterId = cluster; - peerConnectionManager.createOffer({receiveAudio: true, receiveVideo: false}) + peerConnectionManager.createOffer(MediaUtil.createPeerConnection()) .then((peerConnection) => { peerConnectionMap[clusterId] = peerConnection;
fix(meetings): fix reachability data
webex_spark-js-sdk
train
js
963ef96a1f870d75e98d7b07e70335e8209ee239
diff --git a/src/index.js b/src/index.js index <HASH>..<HASH> 100644 --- a/src/index.js +++ b/src/index.js @@ -18,7 +18,7 @@ function minify( options = {} ) { rollupBanner = banner; }, - transformBundle( bundle ) { + transformBundle( bundle, { banner: bundleBanner } ) { const minifyOptions = filterMinifyOptions( options ); const babelConf = { presets: [ [ minifyPreset, minifyOptions ] ], @@ -27,7 +27,7 @@ function minify( options = {} ) { }; if ( isFnOrString( options.banner ) || isFnOrString ( rollupBanner ) ) { - let banner = options.banner || rollupBanner; + let banner = options.banner || bundleBanner || rollupBanner; banner = isFn ( banner ) ? banner() : banner; const bannerContent = getCommentContent( banner ); let isAlreadyInserted = false;
fix(banner): fetch banner data from options passed to transformBundle closes #<I>
Comandeer_rollup-plugin-babel-minify
train
js
cb19de67b00a54d4886dbedc2468280d0d2dbe73
diff --git a/lib/launchers/capture_timeout.js b/lib/launchers/capture_timeout.js index <HASH>..<HASH> 100644 --- a/lib/launchers/capture_timeout.js +++ b/lib/launchers/capture_timeout.js @@ -8,23 +8,22 @@ function CaptureTimeoutLauncher (timer, captureTimeout) { return } - const self = this let pendingTimeoutId = null - this.on('start', function () { - pendingTimeoutId = timer.setTimeout(function () { + this.on('start', () => { + pendingTimeoutId = timer.setTimeout(() => { pendingTimeoutId = null - if (self.state !== self.STATE_BEING_CAPTURED) { + if (this.state !== this.STATE_BEING_CAPTURED) { return } - log.warn('%s have not captured in %d ms, killing.', self.name, captureTimeout) - self.error = 'timeout' - self.kill() + log.warn('%s have not captured in %d ms, killing.', this.name, captureTimeout) + this.error = 'timeout' + this.kill() }, captureTimeout) }) - this.on('done', function () { + this.on('done', () => { if (pendingTimeoutId) { timer.clearTimeout(pendingTimeoutId) pendingTimeoutId = null
refactor(launcher): use this directly instead assign to self variable in capture_timeout launcher (#<I>)
karma-runner_karma
train
js
f7d33a63a5af97b863874b5892d375c647c755b7
diff --git a/http/dashboard_test.go b/http/dashboard_test.go index <HASH>..<HASH> 100644 --- a/http/dashboard_test.go +++ b/http/dashboard_test.go @@ -261,7 +261,7 @@ func TestService_handleGetDashboards(t *testing.T) { "dashboards": [ { "id": "da7aba5e5d81e550", - "organizationID": "0000000000000001", + "orgID": "0000000000000001", "name": "hello", "description": "oh hello there!", "meta": { @@ -794,7 +794,7 @@ func TestService_handlePatchDashboard(t *testing.T) { body: ` { "id": "020f755c3c082000", - "orgID": "0000000000000001", + "orgID": "0000000000000001", "name": "example", "description": "", "labels": [],
fix(http): canonicize dashboard organization field
influxdata_influxdb
train
go
c43e40f2f0cc2ae4cd4b5f7eebf94168f0eb603a
diff --git a/test/test-bot-variables.js b/test/test-bot-variables.js index <HASH>..<HASH> 100644 --- a/test/test-bot-variables.js +++ b/test/test-bot-variables.js @@ -49,6 +49,21 @@ exports.test_global_variables = async function(test) { return test.done(); }; +exports.test_global_variables_set_by = async function(test) { + var bot; + bot = new TestCase(test, ` + + get mode + - Debug mode is: <env myMode> + + + set debug mode * + - <env debug=<star>>Switched to <star>. + `); + await bot.reply("Get mode.", "Debug mode is: undefined"); + bot.rs._global['myMode'] = 0; + await bot.reply("Get mode.", "Debug mode is: 0"); + return test.done(); +}; + exports.test_bot_variables_utf8 = async function(test) { var bot; bot = new TestCase(test, `
test: add test for the variable bug
aichaos_rivescript-js
train
js
c236c944c496ff645ba375317fc2d6be1545cf40
diff --git a/Filter/Type/ManyToManyFilterType.php b/Filter/Type/ManyToManyFilterType.php index <HASH>..<HASH> 100644 --- a/Filter/Type/ManyToManyFilterType.php +++ b/Filter/Type/ManyToManyFilterType.php @@ -117,11 +117,18 @@ class ManyToManyFilterType extends FilterType $propertyAccessor = PropertyAccess::createPropertyAccessor(); foreach (call_user_func($this->callable) as $entity) { + $value = null; + if ($this->labelAccessorPath == '__toString') { + $value = $entity->__toString(); + } else { + $value = $propertyAccessor->getValue($entity, $this->labelAccessorPath); + } + $field .= sprintf( '<option value="%s" %s>%s</option>', $entity->getId(), $entity->getId() == (int) $value ? 'selected="selected"' : '', - $propertyAccessor->getValue($entity, $this->labelAccessorPath) + $value ); } $field .= '</select>';
fix(filter): fixes many to many filter
whatwedo_TableBundle
train
php
78bcbdb11cc90b1b7e51507fd3b30ef0c17477a4
diff --git a/lib/plugin.js b/lib/plugin.js index <HASH>..<HASH> 100644 --- a/lib/plugin.js +++ b/lib/plugin.js @@ -1,11 +1,12 @@ var path = require('path'); +var BRIDGE_FILE_PATH = path.normalize(__dirname + '/../client/commonjs_bridge.js'); var initCommonJS = function(/* config.files */ files) { // Include the file that resolves all the dependencies on the client. files.push({ - pattern: path.normalize(__dirname + '/../client/commonjs_bridge.js'), + pattern: BRIDGE_FILE_PATH, included: true, served: true, watched: false @@ -17,6 +18,10 @@ var createPreprocesor = function(logger) { var log = logger.create('preprocessor.commonjs'); return function(content, file, done) { + if (file.originalPath === BRIDGE_FILE_PATH) { + return done(content); + } + log.debug('Processing "%s".', file.originalPath); var output =
fix: do not preprocess the bridge file
karma-runner_karma-commonjs
train
js
ddaacb50ebd0979daafe9fdb50e7946dd16c0065
diff --git a/lib/agent.js b/lib/agent.js index <HASH>..<HASH> 100644 --- a/lib/agent.js +++ b/lib/agent.js @@ -137,7 +137,7 @@ Agent.prototype.start = function (opts) { return this } else if (this._conf.logLevel === 'trace') { var _ancestors = ancestors(module) - var basedir = path.dirname(_ancestors[_ancestors.length - 1]) + var basedir = path.dirname(process.argv[1]) var stackObj = {} Error.captureStackTrace(stackObj)
fix(agent): fix basedir in debug mode when starting agent with -r (#<I>)
elastic_apm-agent-nodejs
train
js
337d2a3caf472418f830c5e8b2a017d3f28d2639
diff --git a/scripts/check-deps.js b/scripts/check-deps.js index <HASH>..<HASH> 100644 --- a/scripts/check-deps.js +++ b/scripts/check-deps.js @@ -2,6 +2,8 @@ if (process.platform != 'win32') { var commandExists = require('command-exists'); var colors = require('colors'); var depedencies = [ + 'make', + 'gcc', 'automake', 'autoconf', 'pkg-config',
chore(install): Add make and gcc to dependencies
nteract_nteract
train
js
9999f47bf6f54ca8fb441b8890775056a7e566e8
diff --git a/lib/datasource/rubygems/get-rubygems-org.js b/lib/datasource/rubygems/get-rubygems-org.js index <HASH>..<HASH> 100644 --- a/lib/datasource/rubygems/get-rubygems-org.js +++ b/lib/datasource/rubygems/get-rubygems-org.js @@ -21,13 +21,13 @@ async function updateRubyGemsVersions() { logger.debug('Rubygems: Fetching rubygems.org versions'); newLines = (await got(url, options)).body; } catch (err) /* istanbul ignore next */ { - if (err.statusCode === 416) { - logger.debug('Rubygems: No update'); - } else { + if (err.statusCode !== 416) { logger.warn({ err }, 'Rubygems error - resetting cache'); contentLength = 0; packageReleases = Object.create(null); // Because we might need a "constructor" key + throw new Error('registry-failure'); } + logger.debug('Rubygems: No update'); lastSync = new Date(); return; }
fix(rubygems): throw registry-failure when failing to download
renovatebot_renovate
train
js
cebbcfe6291a7827eea5649bf5576d86353bc0b5
diff --git a/tests/common.py b/tests/common.py index <HASH>..<HASH> 100644 --- a/tests/common.py +++ b/tests/common.py @@ -19,8 +19,8 @@ def worker(*args, **kwargs): skip_in_ci = pytest.mark.skipif( - os.getenv("GITHUB_ACTION") is not None or - os.getenv("APPVEYOR") is not None, + os.getenv("APPVEYOR") is not None or + os.getenv("GITHUB_ACTION") is not None, reason="test skipped in CI" )
test: reorder clauses in skip_in_ci
Bogdanp_dramatiq
train
py
29a5240f640291f724c8781f3d291f45c1ac39bb
diff --git a/extensions/approval/src/Listener/ApproveContent.php b/extensions/approval/src/Listener/ApproveContent.php index <HASH>..<HASH> 100644 --- a/extensions/approval/src/Listener/ApproveContent.php +++ b/extensions/approval/src/Listener/ApproveContent.php @@ -63,7 +63,7 @@ class ApproveContent if ($post->number == 1) { $post->discussion->is_approved = true; - $post->discussion->save(); } + $post->discussion->save(); } }
fix:discussion was not updated correctly after approval
flarum_core
train
php
0f77e96e46e9739f58f86db64b2a2794f678da7f
diff --git a/tasks/publish.js b/tasks/publish.js index <HASH>..<HASH> 100644 --- a/tasks/publish.js +++ b/tasks/publish.js @@ -22,7 +22,7 @@ gulp.task('publish', function(){ if (error) { console.error(error); } - var owners = ['charleshansen', 'rdy', 'stubbornella', 'vinsonchuong']; + var owners = ['charleshansen', 'rdy', 'stubbornella', 'vinsonchuong', 'gpleiss']; (function next() { if (owners.length) { npm.commands.owner(['add', owners.pop(), `pui-css-${component}`], next);
chore(publishing): Add Geoff as contributor for npm packages
pivotal-cf_pivotal-ui
train
js
29efc609eb4d79124ebd68fc5291675736dcef6c
diff --git a/src/components/seo.js b/src/components/seo.js index <HASH>..<HASH> 100644 --- a/src/components/seo.js +++ b/src/components/seo.js @@ -85,12 +85,13 @@ SEO.defaultProps = { lang: `en`, meta: [], keywords: [], + description: ``, } SEO.propTypes = { description: PropTypes.string, lang: PropTypes.string, - meta: PropTypes.array, + meta: PropTypes.arrayOf(PropTypes.object), keywords: PropTypes.arrayOf(PropTypes.string), title: PropTypes.string.isRequired, }
feat(starters): enhance proptypes for SEO component (#<I>) ## Description Fix the Gatsby `default` and `blog` starters `SEO` components prop-types. Props: * meta: propTypes * description: defaultProps ## Related Issues N/a
gatsbyjs_gatsby-starter-default
train
js
19a3788a032d187fc788d64b07a38042ca2e90a4
diff --git a/tests/utils.py b/tests/utils.py index <HASH>..<HASH> 100644 --- a/tests/utils.py +++ b/tests/utils.py @@ -552,7 +552,7 @@ def focus_graphical_editor_in_page(page): def check_if_locale_exists(locale): import subprocess output = subprocess.check_output(["locale", "-a"]) - if locale in output: + if locale.encode() in output: return True else: return False
test: make locale comparison py2 and py3 compatible
DLR-RM_RAFCON
train
py
8cf3966d5ce53405d659f6c896023ac7f25894a2
diff --git a/src/lib/cli.js b/src/lib/cli.js index <HASH>..<HASH> 100644 --- a/src/lib/cli.js +++ b/src/lib/cli.js @@ -13,6 +13,8 @@ import {startVerdaccio, listenDefaultCallback} from './bootstrap'; import findConfigFile from './config-path'; import { parseConfigFile } from './utils'; +require('pkginfo')(module); + if (process.getuid && process.getuid() === 0) { global.console.warn(bgYellow('Verdaccio doesn\'t need superuser privileges. Don\'t run it under root.')); }
fix: add missing pkg version and name on start up
verdaccio_verdaccio
train
js
d42bfc31d0c294b50e9e4362207c47b4e8f23449
diff --git a/index.js b/index.js index <HASH>..<HASH> 100644 --- a/index.js +++ b/index.js @@ -252,7 +252,7 @@ class Homefront { let lastKey = normalizedKey.pop(); let source = this.fetch(normalizedKey); - if (typeof source === 'object') { + if (typeof source === 'object' && typeof source[lastKey] !== 'undefined') { delete source[lastKey]; }
fix(project): Check before trying to remove
SpoonX_homefront
train
js
eaf8cf85af2155b12d0d5bda649d8e942498706a
diff --git a/test/wallet.js b/test/wallet.js index <HASH>..<HASH> 100644 --- a/test/wallet.js +++ b/test/wallet.js @@ -304,7 +304,7 @@ describe('Wallet', function() { }) describe('processConfirmedTx', function(){ - it('does not fail on scripts with no corresponding Address', function() { + it('does not throw on scripts with no corresponding Address', function() { var pubKey = wallet.getPrivateKey(0).pub var script = scripts.pubKeyOutput(pubKey) var tx2 = new Transaction()
test: rephrase fail -> throw
BitGo_bitgo-utxo-lib
train
js
b7c6687d9b9691ae2ef2e2cd1b90c798fc1a3e1b
diff --git a/lib/commands.js b/lib/commands.js index <HASH>..<HASH> 100644 --- a/lib/commands.js +++ b/lib/commands.js @@ -1,28 +1,13 @@ import { SevenZipStream } from './stream.js' -import { listenStdEvents } from './listeners.js' +import { matchPropsColon, matchPropsEquals, matchProgress } from './parser.js' -/** - * Add command - * @param archive {String} Path to the archive - * @param source {String|Array} Source to add - * @param options {Object} An object of acceptable options to 7za bin. - */ export function add (archive, source, options) { const opts = Object.assign({}, options) opts._commandArgs = ['a'] opts._commandArgs.push(archive, source) - opts._parser = 'symbolFile' + opts._matchHeaders = matchPropsEquals + opts._matchFiles = matchProgress + opts._matchFooters = matchPropsColon const stream = new SevenZipStream(opts) - listenStdEvents(stream) - return stream -} - -export function test (archive, options) { - const opts = Object.assign({}, options) - opts._commandArgs = ['t'] - opts._commandArgs.push(archive) - opts._parser = 'symbolFile' - const stream = new SevenZipStream(opts) - listenStdEvents(stream) return stream }
fix: Add command uses codebase refactoring
quentinrossetti_node-7z
train
js
d7611a185561f975b9c90da7212215ff75bec1b3
diff --git a/test/select.spec.js b/test/select.spec.js index <HASH>..<HASH> 100644 --- a/test/select.spec.js +++ b/test/select.spec.js @@ -1358,6 +1358,8 @@ describe('select', () => { .to.be.equal('SELECT `bar`, `baz`, `foo` FROM `tablename` WHERE `bar` = ?') expect(getParsedSql('SELECT bar, baz, foo FROM tablename WHERE bar = ? and baz = ?')) .to.be.equal('SELECT `bar`, `baz`, `foo` FROM `tablename` WHERE `bar` = ? AND `baz` = ?') + expect(getParsedSql("SELECT * FROM tabla WHERE id = ? AND name LIKE '%jos%' AND city_id = ?")) + .to.be.equal("SELECT * FROM `tabla` WHERE `id` = ? AND `name` LIKE '%jos%' AND `city_id` = ?") }) it('should parse pg prepared statements', () => {
refactor: add more test case
taozhi8833998_node-sql-parser
train
js
94ada1e16722d11a64276c89817fef9d2ae72000
diff --git a/packages/theme-data/src/baseTheme/components/tag.js b/packages/theme-data/src/baseTheme/components/tag.js index <HASH>..<HASH> 100644 --- a/packages/theme-data/src/baseTheme/components/tag.js +++ b/packages/theme-data/src/baseTheme/components/tag.js @@ -126,7 +126,7 @@ export default { "tag.on.hover.backgroundColor": { type: COLOR, value: { - ref: "colorScheme.background.empty.level100To250.hover", + ref: "colorScheme.background.on.hover", }, }, "tag.on.focus.backgroundColor": { @@ -138,7 +138,7 @@ export default { "tag.on.pressed.backgroundColor": { type: COLOR, value: { - ref: "colorScheme.background.empty.level100To250.pressed", + ref: "colorScheme.background.on.default", }, transform: { alpha: 0.7,
fix: set tag on background color refs to correct value
Autodesk_hig
train
js
dfc309c9d60caa39552ac09a120442ede6eeb759
diff --git a/dump2polarion/exporters/testcases_exporter.py b/dump2polarion/exporters/testcases_exporter.py index <HASH>..<HASH> 100644 --- a/dump2polarion/exporters/testcases_exporter.py +++ b/dump2polarion/exporters/testcases_exporter.py @@ -68,7 +68,7 @@ class TestcaseTransform: "due-date": "dueDate", "initial-estimate": "initialEstimate", "status-id": "status", - "linked-items": "linkedWorkItems", + "linked-work-items": "linkedWorkItems", } # type: Dict[str, Optional[str]] CUSTOM_FIELDS = { @@ -314,7 +314,7 @@ class TestcaseExport: linked_items = testcase_data.get("linked-items") or testcase_data.get("linked-work-items") if not linked_items: return - if isinstance(linked_items, str) and "," in linked_items: + if isinstance(linked_items, str) and "," in linked_items or " " in linked_items: # multiple unprocessed linked items (should be list already), skip them return if isinstance(linked_items, (dict, str)):
fix: Regard spaces between requirements as separators Also change mapping of original linkedWorkItems to linked-work-items
mkoura_dump2polarion
train
py
2bc93e285beaedba414ad0fd49f86718c1866ac5
diff --git a/lib/manager/npm/extract/index.js b/lib/manager/npm/extract/index.js index <HASH>..<HASH> 100644 --- a/lib/manager/npm/extract/index.js +++ b/lib/manager/npm/extract/index.js @@ -24,7 +24,7 @@ async function extractDependencies(content, packageFile, config) { const error = new Error('config-validation'); error.configFile = packageFile; error.validationError = - 'Nested package.json must not contain renovate configuration. Please use pathRules in your main config instead.'; + 'Nested package.json must not contain renovate configuration. Please use `packageRules` with `paths` in your main config instead.'; throw error; } const packageJsonName = packageJson.name;
fix: correct nested config recommendation
renovatebot_renovate
train
js
8d5eed73b77cae7b82b0b477960c3788c32dc174
diff --git a/packages/building-utils/test/index-html/polyfills.test.js b/packages/building-utils/test/index-html/polyfills.test.js index <HASH>..<HASH> 100644 --- a/packages/building-utils/test/index-html/polyfills.test.js +++ b/packages/building-utils/test/index-html/polyfills.test.js @@ -59,7 +59,8 @@ describe('polyfills', () => { module: false, nomodule: false, sourcemap: undefined, - test: "!('attachShadow' in Element.prototype) || !('getRootNode' in Element.prototype)", + test: + "!('attachShadow' in Element.prototype) || !('getRootNode' in Element.prototype) || (window.ShadyDOM && window.ShadyDOM.force)", }, { code: undefined,
fix(building-utils): fix wcs test
open-wc_open-wc
train
js
2592a890dd68106f3355c4933854b0f78e7ee566
diff --git a/server/index.js b/server/index.js index <HASH>..<HASH> 100644 --- a/server/index.js +++ b/server/index.js @@ -28,7 +28,7 @@ app.get('/', (req, res) => { template(html, { interpolate: /"<%=([\s\S]+?)%>"/g })({ agrees: serialized, title: argv.title, - }), + }) ) })
fix: fix trailing comma for node 6
recruit-tech_agreed-ui
train
js
b35eaf664dd2485631ff788a3a60c1183e58c085
diff --git a/src/Definition/GenericStorage.php b/src/Definition/GenericStorage.php index <HASH>..<HASH> 100644 --- a/src/Definition/GenericStorage.php +++ b/src/Definition/GenericStorage.php @@ -29,7 +29,7 @@ class GenericStorage extends Common if ($this->getLength() && $this->getLength() != "") { $sql .= "(" . $this->getLength() . ")"; } - $sql .= ($this->nullable) ? " NULL" : " NOT NULL"; + $sql .= ($this->isNullable()) ? " NULL" : " NOT NULL"; if ($this->default) { $sql .= " DEFAULT '" . $this->default . "'"; } else if ($this->isNullable()) {
fix(GenericStorage): use isNullable method
keboola_php-datatypes
train
php
d97ee1d30e3bc0d7f045f1282517db6fb632d8db
diff --git a/tests/system/Config/DotEnvTest.php b/tests/system/Config/DotEnvTest.php index <HASH>..<HASH> 100644 --- a/tests/system/Config/DotEnvTest.php +++ b/tests/system/Config/DotEnvTest.php @@ -158,7 +158,7 @@ final class DotEnvTest extends CIUnitTestCase $dotenv = new DotEnv($this->fixturesFolder, '.env'); $dotenv->load(); - $this->assertSame('complex', $_SERVER['SimpleConfig.simple.name']); + $this->assertSame('complex', $_SERVER['SimpleConfig_simple_name']); } public function testLoadsGetServerVar()
test: update test code Because fixture `.env` was changed.
codeigniter4_CodeIgniter4
train
php
3f7b15fd6a189f4aa0316acf4d1ffaa23a175489
diff --git a/bin/cheminfo-publish.js b/bin/cheminfo-publish.js index <HASH>..<HASH> 100755 --- a/bin/cheminfo-publish.js +++ b/bin/cheminfo-publish.js @@ -101,16 +101,6 @@ This will skip the following steps: if (org === 'cheminfo-js') { org = 'cheminfo'; } - const adminList = JSON.parse( - await execNpmStdout('team', 'ls', `${org}:developers`) - ); - debug('npm org developers: %s', adminList); - if (adminList.indexOf(name) === -1) { - errorLog( - `Org (${org}) does not exist or you (${name}) are not allowed to publish in it` - ); - return; - } // Get the name of the package const packageName = packageJSON.name;
fix: remove team ls check Npm doesn't return a JSON anymore
cheminfo_tools
train
js
e873574e8c5ed95f39b0627991b57bf49eb29cbc
diff --git a/pkg/middleware/logger.go b/pkg/middleware/logger.go index <HASH>..<HASH> 100644 --- a/pkg/middleware/logger.go +++ b/pkg/middleware/logger.go @@ -22,6 +22,7 @@ import ( "github.com/Unknwon/macaron" "github.com/grafana/grafana/pkg/log" + "github.com/grafana/grafana/pkg/setting" ) func Logger() macaron.Handler { @@ -36,7 +37,9 @@ func Logger() macaron.Handler { switch rw.Status() { case 200, 304: content = fmt.Sprintf("%s", content) - return + if !setting.RouterLogging { + return + } case 404: content = fmt.Sprintf("%s", content) case 500:
fix(logging): fixed so that router_logging = true actually logs all http requests, fixes #<I>
grafana_grafana
train
go
12edc38e3f8009d35913181e00d4025189d269da
diff --git a/src/Action/Action.php b/src/Action/Action.php index <HASH>..<HASH> 100644 --- a/src/Action/Action.php +++ b/src/Action/Action.php @@ -20,6 +20,18 @@ class Action 'confirmation' => null, ]; + protected array $allowedTypes = [ + 'label' => ['string', 'null'], + 'attr' => 'array', + 'icon' => ['string', 'null'], + 'route' => ['string', 'null'], + 'route_parameters' => ['array', 'callable'], + 'voter_attribute' => ['string', 'null', 'object'], + 'priority' => 'int', + 'confirmation' => ['array', 'null'], + 'block_prefix' => 'string', + ]; + /** * it's possible to pass functions as option value to create dynamic labels, routes and more. */ @@ -31,6 +43,11 @@ class Action $resolver->setDefaults(array_merge([ 'block_prefix' => StringUtil::fqcnToBlockPrefix(static::class), ], $this->defaultOptions)); + + foreach($this->allowedTypes as $key => $types) { + $resolver->setAllowedTypes($key, $types); + } + $this->options = $resolver->resolve($this->options); }
feat(option-resolver): added allowed types
whatwedo_CoreBundle
train
php
878c8ad36c5050f1e9f550b57016485daca41e67
diff --git a/react/MuiCozyTheme/makeOverrides.js b/react/MuiCozyTheme/makeOverrides.js index <HASH>..<HASH> 100644 --- a/react/MuiCozyTheme/makeOverrides.js +++ b/react/MuiCozyTheme/makeOverrides.js @@ -711,7 +711,7 @@ const makeInvertedOverrides = invertedTheme => { MuiCheckbox: { colorPrimary: { '&$checked:not($disabled)': { - color: invertedTheme.palette.success.main + color: invertedTheme.palette.primary.light } }, colorSecondary: {
fix: Use correct color for checkbox in inverted theme
cozy_cozy-ui
train
js
6ca9d9cf3e9472479506b0d29f32877b0403c41f
diff --git a/connection/pool.js b/connection/pool.js index <HASH>..<HASH> 100644 --- a/connection/pool.js +++ b/connection/pool.js @@ -1572,7 +1572,7 @@ function _execute(self) { // if the command is designated noResponse, call the callback immeditely if (workItem.noResponse && typeof workItem.cb === 'function') { - workItem.cb(null, { result: { ok: 1 } }); + workItem.cb(null, null); } if (writeSuccessful && workItem.immediateRelease && self.authenticating) {
refactor(pool): callback with null error and reply on noResponse
mongodb_node-mongodb-native
train
js
baf9fe614cf04a6ed0789b0a67de9bd77241ab5f
diff --git a/model/authorization/TestTakerAuthorizationService.php b/model/authorization/TestTakerAuthorizationService.php index <HASH>..<HASH> 100644 --- a/model/authorization/TestTakerAuthorizationService.php +++ b/model/authorization/TestTakerAuthorizationService.php @@ -79,11 +79,9 @@ class TestTakerAuthorizationService extends ConfigurableService implements TestT 'Terminated/Finished delivery execution "'.$deliveryExecution->getIdentifier().'" cannot be resumed' ); } - $deliveryUri = $deliveryExecution->getDelivery()->getUri(); if ( - $this->isProctored($deliveryUri, $user) - && $state !== ProctoredDeliveryExecution::STATE_AUTHORIZED + $this->isMissingProctorAuthorization($deliveryExecution, $user) && !$this->isActiveUnSecureDelivery($deliveryExecution, $state) ) { $this->throwUnAuthorizedException($deliveryExecution); @@ -146,6 +144,12 @@ class TestTakerAuthorizationService extends ConfigurableService implements TestT return $secure; } + protected function isMissingProctorAuthorization(DeliveryExecutionInterface $deliveryExecution, User $user) + { + return $this->isProctored($deliveryExecution->getDelivery()->getUri(), $user) + && $deliveryExecution->getState()->getUri() !== ProctoredDeliveryExecution::STATE_AUTHORIZED; + } + /** * Throw the appropriate Exception *
chore: allow proctor authorization check override
oat-sa_extension-tao-proctoring
train
php
52a3de2d4bb1473f12e7fed481a9f444061ffca0
diff --git a/src/index.js b/src/index.js index <HASH>..<HASH> 100644 --- a/src/index.js +++ b/src/index.js @@ -1,20 +1,28 @@ import React from 'react'; import { render } from 'react-dom'; -import { AppContainer } from 'react-hot-loader'; + import bala from 'balajs'; import configureStore from './store/configureStore'; import Root from './components/Root'; import { initialize } from './actions'; +let Wrap; + +if (process.env.NODE_ENV === 'development') { + Wrap = require('react-hot-loader').AppContainer; +} else { + Wrap = ({ children }) => children; +} + module.exports = function githubEmbed(node, pathToSettings) { const store = configureStore(); store.dispatch(initialize(pathToSettings)); render( - <AppContainer> + <Wrap> <Root store={store} /> - </AppContainer>, + </Wrap>, bala.one(node) ); @@ -25,9 +33,9 @@ module.exports = function githubEmbed(node, pathToSettings) { const RootContainer = require('./components/Root').default; render( - <AppContainer> + <Wrap> <RootContainer store={store} /> - </AppContainer>, + </Wrap>, bala.one(node) ); });
fix: Get rid of react-hot-loader in production
finom_github-embed
train
js
2f5424bdac7c97d0a371dd72084ac02d5e774f1a
diff --git a/src/structures/GuildChannel.js b/src/structures/GuildChannel.js index <HASH>..<HASH> 100644 --- a/src/structures/GuildChannel.js +++ b/src/structures/GuildChannel.js @@ -573,23 +573,20 @@ class GuildChannel extends Channel { * @returns {Promise<GuildChannel>} */ clone(options = {}) { - Util.mergeDefault( - { - name: this.name, - permissionOverwrites: this.permissionOverwrites, - topic: this.topic, - type: this.type, - nsfw: this.nsfw, - parent: this.parent, - bitrate: this.bitrate, - userLimit: this.userLimit, - rateLimitPerUser: this.rateLimitPerUser, - position: this.position, - reason: null, - }, - options, - ); - return this.guild.channels.create(options.name, options); + return this.guild.channels.create(options.name, { + name: this.name, + permissionOverwrites: this.permissionOverwrites, + topic: this.topic, + type: this.type, + nsfw: this.nsfw, + parent: this.parent, + bitrate: this.bitrate, + userLimit: this.userLimit, + rateLimitPerUser: this.rateLimitPerUser, + position: this.position, + reason: null, + ...options, + }); } /* eslint-enable max-len */
fix(GuildChannel): spread clone options to avoid infinite recursion (#<I>)
discordjs_discord.js
train
js