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
5ebc2783b845d29f33e62f897228e2fca86745eb
diff --git a/framework/directives/progress.js b/framework/directives/progress.js index <HASH>..<HASH> 100755 --- a/framework/directives/progress.js +++ b/framework/directives/progress.js @@ -6,6 +6,7 @@ * @description * [en]A material design progress component. Can be displayed both as a linear or circular progress indicator.[/en] * [ja]マテリアルデザインのprgoressコンポーネントです。linearもしくはcircularなプログレスインジケータを表示できます。[/ja] + * @codepen VvVaZv * @example * <ons-progress * type="circular"
docs(ons-progress): Add CodePen sample.
OnsenUI_OnsenUI
train
js
c9b8bc6b5412b0a3ad08556e2a6fa655bb53efb7
diff --git a/builder/osc/bsusurrogate/builder_acc_test.go b/builder/osc/bsusurrogate/builder_acc_test.go index <HASH>..<HASH> 100644 --- a/builder/osc/bsusurrogate/builder_acc_test.go +++ b/builder/osc/bsusurrogate/builder_acc_test.go @@ -39,8 +39,7 @@ const testBuilderAccBasic = ` "device_name" : "/dev/xvdf", "delete_on_vm_deletion" : false, "volume_size" : 10, - "iops": 300, - "no_device": 0 + "iops": 300 } ], "omi_root_device":{
fix: typo in bsusurrogate acc test
hashicorp_packer
train
go
2c5a5e78ba2c589c40f2ee4643dfca9d1c722bd7
diff --git a/packages/uikit-workshop/src/scripts/components/pl-nav/pl-nav.js b/packages/uikit-workshop/src/scripts/components/pl-nav/pl-nav.js index <HASH>..<HASH> 100644 --- a/packages/uikit-workshop/src/scripts/components/pl-nav/pl-nav.js +++ b/packages/uikit-workshop/src/scripts/components/pl-nav/pl-nav.js @@ -212,7 +212,8 @@ class Nav extends BaseComponent { if ( e.target.closest('.pl-c-nav') === null && e.target.closest('.pl-js-nav-trigger') === null && - e.target.closest('svg') === null + e.target.closest('svg') === null && + e.target.closest('pl-toggle-layout') === null ) { self.cleanupActiveNav(); }
fix: don't auto-close nav when clicking on a nav toggle
bolt-design-system_bolt
train
js
213a8e2c212e0abe55098099f3114e99c2a98761
diff --git a/teslajsonpy/homeassistant/power.py b/teslajsonpy/homeassistant/power.py index <HASH>..<HASH> 100644 --- a/teslajsonpy/homeassistant/power.py +++ b/teslajsonpy/homeassistant/power.py @@ -134,9 +134,15 @@ class PowerSensor(EnergySiteDevice): """ super().refresh() data = self._controller.get_power_params(self._id) + if data: # Note: Some systems that pre-date Tesla aquisition of SolarCity will have `grid_status: Unknown`, - # but will have solar power values + # but will have solar power values. At the same time, newer systems will report spurious reads of 0 Watts + # and grid status unknown. If solar power is 0 return null. + if "grid_status" in data and data["grid_status"] == "Unknown" and data["solar_power"] == 0: + _LOGGER.debug("Spurious energy site power read") + return + self.__power = data["solar_power"] if data["solar_power"] is not None: self.__generating_status = (
fix: improve handling on 0 Watts spurious power reads (#<I>) closes #<I>
zabuldon_teslajsonpy
train
py
1e84b4b7833e7347f1026c506177b462f0dcc940
diff --git a/src/Doc/MethodDoc.js b/src/Doc/MethodDoc.js index <HASH>..<HASH> 100644 --- a/src/Doc/MethodDoc.js +++ b/src/Doc/MethodDoc.js @@ -44,7 +44,9 @@ export default class MethodDoc extends AbstractDoc { super['@param'](); if (this._value.params) return; - this._value.params = ParamParser.guessParams(this._node.value.params); + if (this._value.kind !== 'set') { + this._value.params = ParamParser.guessParams(this._node.value.params); + } } ['@return']() {
test: don't guess with set method.
esdoc_esdoc
train
js
66841716764e29be3d584a775d2cb2519ec3d2fe
diff --git a/index.js b/index.js index <HASH>..<HASH> 100644 --- a/index.js +++ b/index.js @@ -543,6 +543,7 @@ export default class Carousel extends Component { const style = [ containerCustomStyle || {}, + { width: sliderWidth }, // LTR hack; see https://github.com/facebook/react-native/issues/11960 { flexDirection: IS_RTL ? 'row-reverse' : 'row' } ];
fix(module): prevent issues when 'sliderWidth' is smaller than viewport's width
archriss_react-native-snap-carousel
train
js
bf93e5089c11130cc386ad733bd4b405a30afebf
diff --git a/renku/service/entrypoint.py b/renku/service/entrypoint.py index <HASH>..<HASH> 100644 --- a/renku/service/entrypoint.py +++ b/renku/service/entrypoint.py @@ -56,6 +56,7 @@ from renku.service.views.datasets import ( import_dataset_view, list_dataset_files_view, list_datasets_view, + remove_dataset_view, unlink_file_view, ) from renku.service.views.jobs import JOBS_BLUEPRINT_TAG, jobs_blueprint, list_jobs @@ -137,6 +138,7 @@ def build_routes(app): docs.register(create_dataset_view, blueprint=DATASET_BLUEPRINT_TAG) docs.register(import_dataset_view, blueprint=DATASET_BLUEPRINT_TAG) docs.register(edit_dataset_view, blueprint=DATASET_BLUEPRINT_TAG) + docs.register(remove_dataset_view, blueprint=DATASET_BLUEPRINT_TAG) docs.register(unlink_file_view, blueprint=DATASET_BLUEPRINT_TAG) docs.register(list_jobs, blueprint=JOBS_BLUEPRINT_TAG)
fix(service): add datasets.remove to swagger docs (#<I>)
SwissDataScienceCenter_renku-python
train
py
2053195f167526f4724f4a3f095f12ca1005248f
diff --git a/src/pandas_profiling/model/typeset.py b/src/pandas_profiling/model/typeset.py index <HASH>..<HASH> 100644 --- a/src/pandas_profiling/model/typeset.py +++ b/src/pandas_profiling/model/typeset.py @@ -211,10 +211,12 @@ def typeset_types(config: Settings) -> Set[visions.VisionsBaseType]: def is_timedependent(series: pd.Series) -> bool: autocorrelation_threshold = config.vars.timeseries.autocorrelation lags = config.vars.timeseries.lags - for lag in lags: - autcorr = series.autocorr(lag=lag) - if autcorr >= autocorrelation_threshold: - return True + with warnings.catch_warnings(): + warnings.simplefilter("ignore", RuntimeWarning) + for lag in lags: + autcorr = series.autocorr(lag=lag) + if autcorr >= autocorrelation_threshold: + return True return False
feat: filter autocorrelation expected warnings
pandas-profiling_pandas-profiling
train
py
1ea862d86a972fa58dc9b96bf5064dc907189bb7
diff --git a/src/notebook/epics/execute.js b/src/notebook/epics/execute.js index <HASH>..<HASH> 100644 --- a/src/notebook/epics/execute.js +++ b/src/notebook/epics/execute.js @@ -218,10 +218,7 @@ export function executeCellObservable(channels, id, code) { .filter(payload => payload.source === 'set_next_input'); // All child messages for the cell - const cellMessages = iopub - .filter(msg => - executeRequest.header.msg_id === msg.parent_header.msg_id - ); + const cellMessages = iopub.childOf(executeRequest); const cellAction$ = Rx.Observable.merge( Rx.Observable.of(updateCellStatus(id, 'busy')),
refactor(execute): compose children messages using childOf
nteract_nteract
train
js
1a723032cfee3b44144b74bde4c33a3ccd11f80f
diff --git a/vendor/joomla/libraries/joomla/environment/uri.php b/vendor/joomla/libraries/joomla/environment/uri.php index <HASH>..<HASH> 100644 --- a/vendor/joomla/libraries/joomla/environment/uri.php +++ b/vendor/joomla/libraries/joomla/environment/uri.php @@ -233,7 +233,7 @@ class JURI extends JObject $uri =& JURI::getInstance($live_site); $base['prefix'] = $uri->toString( array('scheme', 'host', 'port')); $base['path'] = rtrim($uri->toString( array('path')), '/\\'); - if(JPATH_BASE == JPATH_ADMINISTRATOR) { + if(str_replace('\\', '/', JPATH_BASE) == str_replace('\\', '/', JPATH_ADMINISTRATOR)) { $base['path'] .= '/administrator'; } } else {
fix: make path comparison separator independent
anahitasocial_anahita
train
php
9fda8f131f92d57529fbc463103f9fc64fd4cf28
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 @@ -35,11 +35,6 @@ from __future__ import absolute_import from io import BytesIO import sys - -import anyconfig.backend.base -import anyconfig.compat -import anyconfig.mdicts - try: # First, try lxml which is compatible with elementtree and looks faster a # lot. See also: http://getpython3.com/diveintopython3/xml.html @@ -50,6 +45,10 @@ except ImportError: except ImportError: import elementtree.ElementTree as ET +import anyconfig.backend.base +import anyconfig.compat +import anyconfig.mdicts + _PARAM_PREFIX = "@"
refactor: re-order imports to import standard lib/3rd party ones before app-specific ones
ssato_python-anyconfig
train
py
821f0c7c91796a658db5f2dd2d47c1a40946ab7f
diff --git a/src/helpers.php b/src/helpers.php index <HASH>..<HASH> 100755 --- a/src/helpers.php +++ b/src/helpers.php @@ -2,7 +2,6 @@ use Illuminate\Support\Str; use InfyOm\Generator\Common\FileSystem; -use InfyOm\Generator\Common\GeneratorField; if (!function_exists('g_filesystem')) { /**
refactor: unused import removed
InfyOmLabs_laravel-generator
train
php
c5a55cbc6f406c45ca113c198d50c891687cb820
diff --git a/packages/okam-core/src/swan/helper/triggerEvent.js b/packages/okam-core/src/swan/helper/triggerEvent.js index <HASH>..<HASH> 100644 --- a/packages/okam-core/src/swan/helper/triggerEvent.js +++ b/packages/okam-core/src/swan/helper/triggerEvent.js @@ -40,7 +40,7 @@ export function normalizeEventArgs(component, args) { dataset, id: component.id }, - detail: eventData + detail: args[1] }; args[1] = eventObj;
fix(okam-core): fix $emit event with empty string event detail without keeping the original event detail
ecomfe_okam
train
js
85755c934a0c589d168170373e437270c9290846
diff --git a/pysrt/srtfile.py b/pysrt/srtfile.py index <HASH>..<HASH> 100644 --- a/pysrt/srtfile.py +++ b/pysrt/srtfile.py @@ -188,17 +188,17 @@ class SubRipFile(UserList, object): Use init eol if no other provided. """ path = path or self.path - - save_file = open(path, 'w+') - self.write_into(save_file, encoding=encoding, eol=eol) + encoding = encoding or self.encoding + + save_file = codecs.open(path, 'w+', encoding=encoding) + self.write_into(save_file, eol=eol) save_file.close() - def write_into(self, io, encoding=None, eol=None): - encoding = encoding or self.encoding + def write_into(self, io, eol=None): output_eol = eol or self.eol for item in self: string_repr = unicode(item) if output_eol != '\n': string_repr = string_repr.replace('\n', output_eol) - io.write(string_repr.encode(encoding)) + io.write(string_repr)
refactor: get rid of encoding mess in SubRipFile.write_into
byroot_pysrt
train
py
a70943475db3c148342f316d741ddede48a34796
diff --git a/packages/tab/src/css/index.js b/packages/tab/src/css/index.js index <HASH>..<HASH> 100644 --- a/packages/tab/src/css/index.js +++ b/packages/tab/src/css/index.js @@ -2,7 +2,7 @@ import core from '@pluralsight/ps-design-system-core' import { defaultName as themeDefaultName, names as themeNames -} from '@pluralsight/ps-design-system-theme/react' +} from '@pluralsight/ps-design-system-theme/vars' const listItemTextLightHover = { color: core.colors.gray06
fix(tab): reference vars from vars instead of react module
pluralsight_design-system
train
js
35ba96510be5ac48858804c884e3bdf467c82979
diff --git a/packages/storybook/src/knobs.js b/packages/storybook/src/knobs.js index <HASH>..<HASH> 100644 --- a/packages/storybook/src/knobs.js +++ b/packages/storybook/src/knobs.js @@ -1,8 +1,8 @@ -import * as nativeKnobs from "@storybook/addon-knobs/react"; +import * as builtInKnobs from "@storybook/addon-knobs/react"; import select from "./select-shim"; const knobs = { - nativeKnobs, + builtInKnobs, select };
refactor: renamed confusingly named variable (#<I>)
newsuk_times-components
train
js
68e5e9303245053c73c7b8ddf4a7416ec48c8507
diff --git a/lib/config-to-webpack.js b/lib/config-to-webpack.js index <HASH>..<HASH> 100644 --- a/lib/config-to-webpack.js +++ b/lib/config-to-webpack.js @@ -9,13 +9,19 @@ module.exports = function(config) { var vendorChunk = 'vendors'; var context = path.resolve(config.client.app.path); if (_.isString(config.client.app.buildPattern)) { - config.client.app.buildPattern = [{ - pattern: config.client.app.buildPattern, - splitVendor: true - }]; + config.client.app.buildPattern = [ + config.client.app.buildPattern + ]; } var entries = _.reduce(config.client.app.buildPattern, function(memo, ruleSet) { + if (_.isString(ruleSet)) { + ruleSet = { + pattern: ruleSet, + splitVendor: true + }; + } + _.forEach(glob.sync(ruleSet.pattern), function(file) { var filename = path.parse(file).name;
feat(webpack): buildPattern can also be a list of strings
emartech_boar-tasks-client
train
js
4ecd75ca483157dc84ed81b315a7e46ca5faf985
diff --git a/lib/components/user/notification-prefs-pane.js b/lib/components/user/notification-prefs-pane.js index <HASH>..<HASH> 100644 --- a/lib/components/user/notification-prefs-pane.js +++ b/lib/components/user/notification-prefs-pane.js @@ -368,6 +368,7 @@ class PhoneNumberEditor extends Component { <p> Please check the SMS messaging app on your mobile phone for a text message with a verification code, and enter the code below. + The verification code expires after 10 minutes. </p> <ControlLabel>Verification code:</ControlLabel> <ControlStrip>
refactor(PhoneNumberEditor): Mention code expiration in SMS instructions.
opentripplanner_otp-react-redux
train
js
89e833a145a6d585eabdf881809f1a99f217239a
diff --git a/packages/docs/build/markdown-it.js b/packages/docs/build/markdown-it.js index <HASH>..<HASH> 100644 --- a/packages/docs/build/markdown-it.js +++ b/packages/docs/build/markdown-it.js @@ -11,12 +11,16 @@ const md = require('markdown-it')({ permalinkSymbol: '', permalinkClass: '', slugify: str => { - const slug = String(str) + let slug = String(str) .trim() .toLowerCase() - .replace(/[^a-z0-9 -]/g, '') + .replace(/[^a-z0-9 -]/g, c => c.charCodeAt(0).toString(16)) .replace(/\s+/g, '-') + if (slug.charAt(0).match(/[^a-z]/g)) { + slug = 'section-' + slug + } + return encodeURIComponent(slug) }, })
fix(docs): fix anchors in non-latin translations (#<I>)
vuetifyjs_vuetify
train
js
9470f7fce17258d2f1436f6158b675dd1f94e788
diff --git a/lib/Editor.js b/lib/Editor.js index <HASH>..<HASH> 100644 --- a/lib/Editor.js +++ b/lib/Editor.js @@ -118,7 +118,7 @@ Editor.getOpenParams = Promise.method(function (givenPath) { }, Promise.resolve()); }); -Editor.parseCoordinate = function (n) { return parseInt(n, 10) - 1; }; +Editor.parseCoordinate = function (n) { return (parseInt(n, 10) - 1) || 0; }; Editor.exists = Promise.method(function (givenPath) { return fs.openAsync(givenPath, 'r') .then(function (fd) { return fs.closeAsync(fd); })
fix(open): bugfix for opening paths without coordinates
slap-editor_editor-widget
train
js
d4482533c2362939e043389315b4003296c0e3f4
diff --git a/packages/webpack/lib/utils/errors.js b/packages/webpack/lib/utils/errors.js index <HASH>..<HASH> 100644 --- a/packages/webpack/lib/utils/errors.js +++ b/packages/webpack/lib/utils/errors.js @@ -2,10 +2,11 @@ const { EOL } = require('os'); -class BuildError { +class BuildError extends Error { constructor(stack) { + super(); this.name = this.constructor.name; - this.stack = `${this.name} in ${stack.replace(/\033?\[[0-9]{1,2}m/g, '')}`; + this.stack = `${this.name}: ${stack.replace(/\033?\[[0-9]{1,2}m/g, '')}`; this.message = this.stack.slice(0, this.stack.indexOf(EOL)); } }
refactor(webpack): set up proper inheritance
untool_untool
train
js
8a0ee9aedfee9eb1a5ee6df1644c9020e9e31e97
diff --git a/src/cli.js b/src/cli.js index <HASH>..<HASH> 100644 --- a/src/cli.js +++ b/src/cli.js @@ -9,7 +9,7 @@ import defaultPublisher from './Publisher/publish.js'; let argv = minimist(process.argv.slice(2)); if (argv.h || argv.help) { console.log('usage: esdoc [esdoc.json | path/to/js/src]'); - return; + process.exit(0) } assert.equal(argv._.length, 1, 'specify esdoc.json or dir. see -h');
fix: return at non-function scope.
esdoc_esdoc
train
js
8040f74215c882d4e062e660584317d5de086aa4
diff --git a/test/test.js b/test/test.js index <HASH>..<HASH> 100644 --- a/test/test.js +++ b/test/test.js @@ -344,9 +344,9 @@ module.exports = function (createFn) { }) }) - it('200 GET Customers/?bogus=field should ignore unknown parameters', function (done) { + it('200 GET Customers?foo=bar should ignore unknown parameters', function (done) { request.get({ - url: util.format('%s/api/v1/Customers/?foo=bar', testUrl), + url: util.format('%s/api/v1/Customers?foo=bar', testUrl), json: true }, function (err, res, body) { assert.ok(!err)
chore(tests): remove trailing slash - This was testing for trailing slash instead of unknown parameter
florianholzapfel_express-restify-mongoose
train
js
efb7b0676cf6e57b5446f15e297a187ddc989004
diff --git a/packages/cli/lib/commands/create.js b/packages/cli/lib/commands/create.js index <HASH>..<HASH> 100644 --- a/packages/cli/lib/commands/create.js +++ b/packages/cli/lib/commands/create.js @@ -12,8 +12,13 @@ module.exports = async (name, starter = 'default') => { const starters = ['default', 'wordpress'] const hasYarn = await useYarn() - if (fs.existsSync(dir)) { - return console.log(chalk.red(`Directory «${projectName}» already exists.`)) + try { + const files = fs.readdirSync(dir) + if (files.length > 1) { + return console.log(chalk.red(`Directory «${projectName}» is not empty.`)) + } + } catch (err) { + throw new Error(err.message) } if (starters.includes(starter)) {
fix(cli): create project in current directory (#<I>)
gridsome_gridsome
train
js
da0f7218f097e45e6857974234d1a61d68b144a2
diff --git a/packages/vue-inbrowser-compiler-demi/postinstall.js b/packages/vue-inbrowser-compiler-demi/postinstall.js index <HASH>..<HASH> 100644 --- a/packages/vue-inbrowser-compiler-demi/postinstall.js +++ b/packages/vue-inbrowser-compiler-demi/postinstall.js @@ -3,7 +3,7 @@ const fs = require('fs') function getVuePackageVersion() { try { - const pkg = require('vue/package.json') + const pkg = require('vue') return pkg.version } catch { return 'unknown' @@ -39,8 +39,8 @@ function updateIndexForVue3() { }) } -const pkg = getVuePackageVersion() +const version = getVuePackageVersion() -if (pkg.version.startsWith('3.')) { +if (version.startsWith('3.')) { updateIndexForVue3() }
fix: require version instead of pkg
vue-styleguidist_vue-styleguidist
train
js
5c3967600837cc9e84dbed6a23772a3c21b67c81
diff --git a/packages/create/src/generators/wc-lit-element/templates/_MyEl.js b/packages/create/src/generators/wc-lit-element/templates/_MyEl.js index <HASH>..<HASH> 100644 --- a/packages/create/src/generators/wc-lit-element/templates/_MyEl.js +++ b/packages/create/src/generators/wc-lit-element/templates/_MyEl.js @@ -4,11 +4,9 @@ export class <%= className %> extends LitElement { static get styles() { return css` :host { - --<%= tagName %>-text-color: #000; - display: block; padding: 25px; - color: var(--<%= tagName %>-text-color); + color: var(--<%= tagName %>-text-color, #000); } `; }
fix(create): set default value for variable Previous code set a specific variable value on `:host`, which does not make sense for variables since we probably want to allow overrides from ancestors.
open-wc_open-wc
train
js
fb526c0a3418dba4e18bc8cbc0f63c2d763100bf
diff --git a/asammdf/typing.py b/asammdf/typing.py index <HASH>..<HASH> 100644 --- a/asammdf/typing.py +++ b/asammdf/typing.py @@ -12,7 +12,7 @@ from typing_extensions import Literal from .blocks import v2_v3_blocks, v4_blocks from .blocks.source_utils import Source -StrOrBytesPath = Union[str, bytes, PathLike[str], PathLike[bytes]] +StrOrBytesPath = Union[str, bytes, "PathLike[str]", "PathLike[bytes]"] # asammdf specific types
fix(typing): does not work with Python <I>
danielhrisca_asammdf
train
py
b60f61f79d4315ca09b5c3332f7a7c8998e7ebef
diff --git a/lib/fetch/index.js b/lib/fetch/index.js index <HASH>..<HASH> 100644 --- a/lib/fetch/index.js +++ b/lib/fetch/index.js @@ -1676,24 +1676,16 @@ function httpNetworkFetch ( } } - let iterator - if (decoders.length > 1) { - this.decoder = decoders[0] - iterator = pipeline(...decoders, () => {})[ - Symbol.asyncIterator - ]() - } else if (decoders.length === 1) { - this.decoder = decoders[0] - iterator = this.decoder[Symbol.asyncIterator]() - } else { - this.decoder = new PassThrough() - iterator = this.decoder[Symbol.asyncIterator]() + pipeline(...decoders, () => {}) + } else if (decoders.length === 0) { + // TODO (perf): Avoid intermediate. + decoders.push(new PassThrough()) } - if (this.decoder) { - this.decoder.on('drain', resume) - } + this.decoder = decoders[0].on('drain', resume) + + const iterator = decoders[decoders.length - 1][Symbol.asyncIterator]() pullAlgorithm = async (controller) => { // 4. Set bytes to the result of handling content codings given
refactor: simplify decoders
mcollina_undici
train
js
856fae9fe6dd9a59f9c1db38540042e7a301ffc8
diff --git a/lib/index.js b/lib/index.js index <HASH>..<HASH> 100644 --- a/lib/index.js +++ b/lib/index.js @@ -38,12 +38,15 @@ function fork(options, callback) { if (!promise) { defer = Q.defer(); cache[key] = promise = defer.promise; + promise._firstCall = true; } promise.done(function(result) { - callback(null, result[0], result[1]); + callback(null, result[0], result[1], promise._firstCall); + promise._firstCall = false; }, function(err) { - callback(err); + callback(err, undefined, undefined, promise._firstCall); + promise._firstCall = false; }); if (!defer) {
feat: mark the callback for the first execution
avwo_pfork
train
js
2f18b2772d4ebf76dca22ff2f7428e28b2642564
diff --git a/src/parser.js b/src/parser.js index <HASH>..<HASH> 100644 --- a/src/parser.js +++ b/src/parser.js @@ -967,6 +967,10 @@ function convert(context) { // ^ let startOfInterpolation = op.range[0]; while (source[startOfInterpolation] !== '#') { + if (startOfInterpolation >= source.length) { + throw new Error( + `Unable to find start of interpolation for op ${JSON.stringify(op)}`); + } startOfInterpolation += 1; } let range = [op.range[0], startOfInterpolation]; @@ -978,6 +982,10 @@ function convert(context) { // ^ let endOfInterpolation = op.range[1] - 1; while (source[endOfInterpolation] !== '}') { + if (endOfInterpolation < 0) { + throw new Error( + `Unable to find last interpolation for op ${JSON.stringify(op)}`); + } endOfInterpolation -= 1; } return buildQuasi([endOfInterpolation + 1, op.range[1]]);
fix: add infinite loop safeguards in string interpolation code (#<I>) This should prevent potential future bugs that could cause an infinite loop (although all known cases causing an infinite loop have been fixed).
decaffeinate_decaffeinate-parser
train
js
d3a9ce5afc46ff45adb63f6f06856fa6a29f865c
diff --git a/superset-frontend/src/explore/exploreUtils.js b/superset-frontend/src/explore/exploreUtils.js index <HASH>..<HASH> 100644 --- a/superset-frontend/src/explore/exploreUtils.js +++ b/superset-frontend/src/explore/exploreUtils.js @@ -198,7 +198,12 @@ export const shouldUseLegacyApi = formData => { return useLegacyApi || false; }; -export const buildV1ChartDataPayload = ({ formData, force }) => { +export const buildV1ChartDataPayload = ({ + formData, + force, + resultFormat, + resultType, +}) => { const buildQuery = getChartBuildQueryRegistry().get(formData.viz_type) ?? (buildQueryformData => @@ -210,6 +215,8 @@ export const buildV1ChartDataPayload = ({ formData, force }) => { return buildQuery({ ...formData, force, + result_format: resultFormat, + result_type: resultType, }); }; @@ -260,13 +267,12 @@ export const exportChart = ({ payload = formData; } else { url = '/api/v1/chart/data'; - const buildQuery = getChartBuildQueryRegistry().get(formData.viz_type); - payload = buildQuery({ - ...formData, + payload = buildV1ChartDataPayload({ + formData, force, + resultFormat, + resultType, }); - payload.result_type = resultType; - payload.result_format = resultFormat; } postForm(url, payload); };
fix: chart export fails when buildQuery not present (#<I>)
apache_incubator-superset
train
js
68da3ff250e238793bd662474e7dc421a4a987f8
diff --git a/packages/xod-client/src/project/selectors.js b/packages/xod-client/src/project/selectors.js index <HASH>..<HASH> 100644 --- a/packages/xod-client/src/project/selectors.js +++ b/packages/xod-client/src/project/selectors.js @@ -352,6 +352,7 @@ export const getPatchSearchIndex = createSelector( R.reject( R.anyPass([ isPatchDeadTerminal, + XP.isUtilityPatch, XP.isDeprecatedPatch, patchEqualsToCurPatchPath(maybeCurPatchPath), ])
feat(xod-client): do not show utility patches from suggester
xodio_xod
train
js
c807d83b9aaea188355f1a64b4df96b53870ade4
diff --git a/src/textlint-rule-no-nfd.js b/src/textlint-rule-no-nfd.js index <HASH>..<HASH> 100644 --- a/src/textlint-rule-no-nfd.js +++ b/src/textlint-rule-no-nfd.js @@ -13,6 +13,9 @@ function reporter(context) { } const text = getSource(node); matchCaptureGroupAll(text, /([\u309b\u309c\u309a\u3099])/g).forEach(({index}) => { + if (index === 0) { + return; + } // \u309b\u309c => \u309a\u3099 const dakutenChars = text.slice(index - 1, index + 1); const nfdlized = dakutenChars.replace("\u309B", "\u3099").replace("\u309C", "\u309A")
fix(rule): avoid -index
azu_textlint-rule-no-nfd
train
js
f714250daa67efce08b5a7320e28ca1368eaba06
diff --git a/tests/test_pygdk3.py b/tests/test_pygdk3.py index <HASH>..<HASH> 100644 --- a/tests/test_pygdk3.py +++ b/tests/test_pygdk3.py @@ -1,14 +1,18 @@ +from pyscreenshot.util import use_x_display + from ref import backend_to_check, check_import ok = False if check_import("gi"): - import gi - # Arch: AttributeError: module 'gi' has no attribute 'require_version' - try: - gi.require_version - ok = True - except AttributeError: - pass + if use_x_display(): + import gi + + # Arch: AttributeError: module 'gi' has no attribute 'require_version' + try: + gi.require_version + ok = True + except AttributeError: + pass if ok: def test_pygdk3():
test: check gdk3 import
ponty_pyscreenshot
train
py
313a3fcd83f0f35fced405db9b1442fb4938b1cf
diff --git a/site/assets/js/app.js b/site/assets/js/app.js index <HASH>..<HASH> 100644 --- a/site/assets/js/app.js +++ b/site/assets/js/app.js @@ -41,7 +41,7 @@ if ($lgInlineContainer) { rotate: false, download: false, slideDelay: 400, - plugins: [lgZoom, lgFullscreen, lgShare, lgAutoplay, lgThumbnail], + plugins: [lgZoom, lgShare, lgAutoplay, lgThumbnail], appendSubHtmlTo: '.lg-item', ...getResponsiveThumbnailsSettings(), dynamicEl: [
docs(demo): remove fullscreen from inline demo
sachinchoolur_lightGallery
train
js
dac378b63d910d87dbbc0191893eb24f59804a42
diff --git a/src/InputNumber.js b/src/InputNumber.js index <HASH>..<HASH> 100644 --- a/src/InputNumber.js +++ b/src/InputNumber.js @@ -216,7 +216,11 @@ const InputNumber = React.createClass({ }, render() { - const props = this.props; + const props = {...this.props}; + // Remove React warning. + // Warning: Input elements must be either controlled or uncontrolled (specify either the value prop, or the defaultValue prop, but not both). + delete props.defaultValue; + const prefixCls = props.prefixCls; const classes = classNames({ [prefixCls]: true,
fix: should work with React@<I>
react-component_input-number
train
js
fc4927bcf6eacdf62a5b9f4d4198b93a3d347163
diff --git a/src/js/JSONEditor.js b/src/js/JSONEditor.js index <HASH>..<HASH> 100644 --- a/src/js/JSONEditor.js +++ b/src/js/JSONEditor.js @@ -171,7 +171,7 @@ function JSONEditor (container, options, json) { */ JSONEditor.modes = {} -// debounce interval for JSON schema vaidation in milliseconds +// debounce interval for JSON schema validation in milliseconds JSONEditor.prototype.DEBOUNCE_INTERVAL = 150 JSONEditor.VALID_OPTIONS = [
docs: Fix simple typo, vaidation -> validation (#<I>) There is a small typo in src/js/JSONEditor.js. Should read `validation` rather than `vaidation`.
josdejong_jsoneditor
train
js
8ed5d8f64024ab0e88a2a38c85666733ae8986b8
diff --git a/demo/demo-scriptinclude.js b/demo/demo-scriptinclude.js index <HASH>..<HASH> 100755 --- a/demo/demo-scriptinclude.js +++ b/demo/demo-scriptinclude.js @@ -10,8 +10,16 @@ function init() { foucTarget && (foucTarget.className = ''); // Add the card container listeners, using the necessary event trigger - document.body.dispatchEvent(new CustomEvent('cardstrap', { detail: '.container'})); + document.body.dispatchEvent(new CustomEvent('cardstrap', { + detail: '.container' + })); + + // Listen for any events coming out of evented components + eventedElement.addEventListener('card-comment', function(e) { + console.info(`${e.detail.username} says "${e.detail.comment}"`); + }); + // Initialize the card instances // Data in detail objects could come from a service endpoint eventedElement.dispatchEvent(new CustomEvent('initCard', {
feat(demo): Add event listener for card comments.
aaronkaka_es6-react-component
train
js
4520dd4cfa51dc6b73c66203c55065b87c58088f
diff --git a/test/plugin/test_out_elasticsearch.rb b/test/plugin/test_out_elasticsearch.rb index <HASH>..<HASH> 100644 --- a/test/plugin/test_out_elasticsearch.rb +++ b/test/plugin/test_out_elasticsearch.rb @@ -4107,12 +4107,6 @@ class ElasticsearchOutputTest < Test::Unit::TestCase stub_request(:post, url) .with( body: "{\"query\":{\"ids\":{\"values\":#{ids.uniq.to_json}}},\"_source\":false,\"sort\":[{\"_index\":{\"order\":\"desc\"}}]}", - headers: { - 'Accept'=>'*/*', - 'Content-Type'=>'application/json', - 'Host'=>'localhost:9200', - 'User-Agent'=>'elasticsearch-ruby/7.12.0 (RUBY_VERSION: 2.7.0; linux x86_64; Faraday v1.4.1)' - } ) .to_return(lambda do |req| { :status => 200,
test: out_elasticsearch: Remove a needless headers from affinity stub
uken_fluent-plugin-elasticsearch
train
rb
6add859a8bdcb0cd0a6eded008a63abb724c633c
diff --git a/docs/conf.py b/docs/conf.py index <HASH>..<HASH> 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -31,9 +31,11 @@ # Add any Sphinx extension module names here, as strings. They can be # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom # ones. -extensions = ['sphinx.ext.autodoc', +extensions = [ + 'sphinx.ext.autodoc', 'sphinx.ext.doctest', - 'sphinx.ext.intersphinx'] + 'sphinx.ext.intersphinx', +] # Add any paths that contain templates here, relative to this directory. templates_path = ['_templates'] @@ -49,7 +51,7 @@ master_doc = 'index' # General information about the project. project = 'Seaworthy' -copyright = '2017, Jamie Hewland & Jeremy Thurgood' +copyright = '2017, Praekelt.org' author = 'Jamie Hewland & Jeremy Thurgood' # The version info for the project you're documenting, acts as replacement for @@ -168,7 +170,5 @@ texinfo_documents = [ ] - - # Example configuration for intersphinx: refer to the Python standard library. intersphinx_mapping = {'https://docs.python.org/': None}
docs: Clean up conf.py a bit
praekeltfoundation_seaworthy
train
py
69aaffcccf1143c675bd2977d0bba47178623690
diff --git a/lib/elastomer.js b/lib/elastomer.js index <HASH>..<HASH> 100644 --- a/lib/elastomer.js +++ b/lib/elastomer.js @@ -190,8 +190,22 @@ Elastomer.prototype._injectHtml = function () { if (this.useNative) { this.shadowRoot.innerHTML = this.html.toString() - this.css(this.shadowRoot) + // this.css(this.shadowRoot) this._bind(this.shadowRoot) + if (this.css) { + if (typeof this.css === 'function') { + this.css(this.shadowRoot) + } else { + var style = document.createElement('style') + style.setAttribute('type', 'text/css') + this.shadowRoot.appendChild(style) + if (style.styleSheet) { + style.styleSheet.cssText = this.css.toString() + } else { + style.textContent = this.css.toString() + } + } + } } else { this.shadowRoot.innerHTML = this.html.toString() this._bind(this.shadowRoot.shadow)
fix: Support raw css in native mode
nodys_elastomer
train
js
161596fd1166c18fd8f2c7c4fc4c3ebc11142690
diff --git a/tests/Database/Core/DatabaseStatementTest.php b/tests/Database/Core/DatabaseStatementTest.php index <HASH>..<HASH> 100644 --- a/tests/Database/Core/DatabaseStatementTest.php +++ b/tests/Database/Core/DatabaseStatementTest.php @@ -20,4 +20,14 @@ class DatabaseStatementTest extends TestCase $row = $result->next(); self::assertEquals('superman', $row->name); } + + public function testEmptyResultSet() + { + $db = new Database(new DatabaseSource()); + $db->query('CREATE TABLE heroes(id NUMERIC PRIMARY KEY, name TEXT NULL, enabled INTEGER, power REAL);'); + $db->query("INSERT INTO heroes(id, name, enabled, power) VALUES (1, 'Batman', 1, 5.6);"); + $result = $db->query("SELECT power FROM heroes WHERE id = 99"); + self::assertEquals("SELECT power FROM heroes WHERE id = 99", $result->getPdoStatement()->queryString); + self::assertNull($result->next()); + } }
test: add tests for DatabaseStatement
dadajuice_zephyrus
train
php
a5c09803383025306116a400765909e98e14afb3
diff --git a/src/js/core/drop.js b/src/js/core/drop.js index <HASH>..<HASH> 100644 --- a/src/js/core/drop.js +++ b/src/js/core/drop.js @@ -109,6 +109,7 @@ export default { disconnected() { if (this.isActive()) { + this.hide(false); active = null; } },
fix: ensure eventlisteners are removed on disconnect
uikit_uikit
train
js
5de1d5dd8fb29cbef454352950fd6abc11a3ba27
diff --git a/lib/handlers/upgrade.js b/lib/handlers/upgrade.js index <HASH>..<HASH> 100644 --- a/lib/handlers/upgrade.js +++ b/lib/handlers/upgrade.js @@ -410,7 +410,9 @@ upgrade.processPayment = function (req, res, next) { return getCustomerByUser(req.session.user).then(function (results) { var result = results[0]; debug('.then, stripe.customers.retrieve(%s)', result.stripe_id); // jshint ignore:line - return stripe.customers.retrieve(result.stripe_id).catch(function (err) { + return stripe.customers.update(result.stripe_id, { + source: stripSubscriptionData.card + }).catch(function (err) { // failed to subscribe existing user to stripe metrics.increment('upgrade.fail.existing-user-change-subscription'); console.error('upgrade.fail.existing-user-change-subscription');
fix: fail to re-upgrade Fixes: #<I> Fixes: #<I> Fixes: #<I> Fixes: #<I> Fixes: #<I> Fixes: #<I> This was existing users that had customer records, but Stripe was using their original card details upon resubscribing. This fix updates their profile with the card that they just entered.
jsbin_jsbin
train
js
81b84fb12b67d4f673c83e6db4d3042e416774c7
diff --git a/plugins/inputs/sysstat/sysstat.go b/plugins/inputs/sysstat/sysstat.go index <HASH>..<HASH> 100644 --- a/plugins/inputs/sysstat/sysstat.go +++ b/plugins/inputs/sysstat/sysstat.go @@ -122,7 +122,7 @@ func (s *Sysstat) collect(tempfile string) error { collectInterval := s.interval - parseInterval // If true, interval is not defined yet and Gather is run for the first time. - if collectInterval < 0 { + if collectInterval <= 0 { collectInterval = 1 // In that case we only collect for 1 second. }
fix: avoid calling sadc with invalid 0 interval (#<I>)
influxdata_telegraf
train
go
1e51f2402a6fd4b8f31ab1290fe919f2c534e71d
diff --git a/src/Repositories/Corporation/Extractions.php b/src/Repositories/Corporation/Extractions.php index <HASH>..<HASH> 100644 --- a/src/Repositories/Corporation/Extractions.php +++ b/src/Repositories/Corporation/Extractions.php @@ -38,7 +38,7 @@ trait Extractions { // retrieve any valid extraction for the current corporation return CorporationIndustryMiningExtraction::with( - 'moon', 'moon.system', 'moon.constellation', 'moon.region', 'moon.moon_contents', 'moon.moon_contents.type', + 'moon', 'moon.system', 'moon.constellation', 'moon.region', 'moon.moon_content', 'structure', 'structure.info', 'structure.services') ->where('corporation_id', $corporation_id) ->where('natural_decay_time', '>', carbon()->subSeconds(CorporationIndustryMiningExtraction::THEORETICAL_DEPLETION_COUNTDOWN))
refactor(moons): simplify relationships use pivot instead complex dependencies for moon_content, materials and reactions.
eveseat_services
train
php
d48c673c2bf6203f164f7dff8ed06ca616caf475
diff --git a/src/http-server/src/Router/HandlerMapping.php b/src/http-server/src/Router/HandlerMapping.php index <HASH>..<HASH> 100644 --- a/src/http-server/src/Router/HandlerMapping.php +++ b/src/http-server/src/Router/HandlerMapping.php @@ -164,7 +164,7 @@ class HandlerMapping extends AbstractRouter implements HandlerMappingInterface protected function collectParamRoute(string $route, array $methods, array $conf) { $conf['original'] = $route; - $params = $this->getAvailableParams($opts['params'] ?? []); + $params = $this->getAvailableParams($conf['option']['params'] ?? []); list($first, $conf) = $this->parseParamRoute($route, $params, $conf); // route string have regular @@ -366,7 +366,10 @@ class HandlerMapping extends AbstractRouter implements HandlerMappingInterface } } - return [self::NOT_FOUND, \explode(',', \trim($allowedMethods, ','))]; + return [ + self::NOT_FOUND, + $allowedMethods ? \explode(',', \rtrim($allowedMethods, ',')) : [] + ]; } /**
fix: cannot setting params. Sometimes 'notFound' would be considered 'notAllowed'
swoft-cloud_swoft-http-message
train
php
789e1c8fdc27c80726d63bccad9d0afbbf2d8136
diff --git a/flask_resty/api.py b/flask_resty/api.py index <HASH>..<HASH> 100644 --- a/flask_resty/api.py +++ b/flask_resty/api.py @@ -19,14 +19,7 @@ def handle_api_error(error): def handle_http_exception(error): - # Flask calls the InternalServerError handler with any uncaught app - # exceptions. Re-raise those as generic internal server errors. - if not isinstance(error, HTTPException): - error = ApiError(500) - else: - error = ApiError.from_http_exception(error) - - return error.response + return ApiError.from_http_exception(error).response # ----------------------------------------------------------------------------- diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -28,7 +28,7 @@ setup( keywords="rest flask", packages=("flask_resty",), install_requires=( - "Flask>=1.0.3", + "Flask>=1.1.0", "Flask-SQLAlchemy>=1.0", "marshmallow>=3.0.0", "SQLAlchemy>=1.0.0",
chore: Update minimum Flask version to <I> (#<I>)
4Catalyzer_flask-resty
train
py,py
57c24f8ba763b3a33411901cc019a499847268dd
diff --git a/app/setup.php b/app/setup.php index <HASH>..<HASH> 100755 --- a/app/setup.php +++ b/app/setup.php @@ -89,7 +89,7 @@ add_action('after_setup_theme', function () { * Register relative length units in the editor. * @link https://developer.wordpress.org/block-editor/developers/themes/theme-support/#support-custom-units */ - add_theme_support('custom-units', 'rem', 'vw'); + add_theme_support('custom-units'); /** * Enable support for custom line heights in the editor.
chore(theme): Remove specificity from `custom-units` theme support
roots_sage
train
php
ee5398368e419de9aa11207dcfa330c262dbfdf0
diff --git a/lib/core/topologies/mongos.js b/lib/core/topologies/mongos.js index <HASH>..<HASH> 100644 --- a/lib/core/topologies/mongos.js +++ b/lib/core/topologies/mongos.js @@ -366,7 +366,8 @@ function handleInitialConnectEvent(self, event) { self.s.logger.warn(f(message, _this.name)); } - // This is not a mongos proxy, remove it completely + // This is not a mongos proxy, destroy and remove it completely + _this.destroy(true); removeProxyFrom(self.connectingProxies, _this); // Emit the left event self.emit('left', 'server', _this); @@ -445,10 +446,9 @@ function connectProxies(self, servers) { server.connect(self.s.connectOptions); }, timeoutInterval); } + // Start all the servers - while (servers.length > 0) { - connect(servers.shift(), timeoutInterval++); - } + servers.forEach(server => connect(server, timeoutInterval++)); } function pickProxy(self, session) {
fix(mongos): disconnect proxies which are not mongos instances NODE-<I>
mongodb_node-mongodb-native
train
js
a49cd8a685d99af3dbda3f09474d813df951e40c
diff --git a/pkg/minikube/tunnel/tunnel.go b/pkg/minikube/tunnel/tunnel.go index <HASH>..<HASH> 100644 --- a/pkg/minikube/tunnel/tunnel.go +++ b/pkg/minikube/tunnel/tunnel.go @@ -200,7 +200,7 @@ func setupBridge(t *tunnel) { return } iface := string(response) - pattern := regexp.MustCompile(`.*member: (en\d+) flags=.*`) + pattern := regexp.MustCompile(`.*member: ((?:vm)?en(?:et)?\d+) flags=.*`) submatch := pattern.FindStringSubmatch(iface) if len(submatch) != 2 { t.status.RouteError = fmt.Errorf("couldn't find member in bridge100 interface: %s", iface)
feat: Use new bridge interface name on OSX Monterey
kubernetes_minikube
train
go
672586fd8586fb37fe74d00ce087b177d36f305a
diff --git a/test/cluster/cluster.go b/test/cluster/cluster.go index <HASH>..<HASH> 100644 --- a/test/cluster/cluster.go +++ b/test/cluster/cluster.go @@ -659,8 +659,8 @@ func (c *Cluster) DumpLogs(buildLog *buildlog.Log) { fields := strings.Split(job, "-") jobID := strings.Join(fields[len(fields)-2:], "-") cmds := []string{ - fmt.Sprintf("flynn-host inspect %s", jobID), - fmt.Sprintf("flynn-host log --init %s", jobID), + fmt.Sprintf("timeout 10s flynn-host inspect %s", jobID), + fmt.Sprintf("timeout 10s flynn-host log --init %s", jobID), } if err := run(fmt.Sprintf("%s-%s.log", typ, job), instances[0], cmds...); err != nil { continue
test: Timeout `flynn-host` commands in DumpLogs These commands sometimes block indefinitely in CI (e.g. if getting the log of an interactive job which is stuck).
flynn_flynn
train
go
987afad3f7c910d8e035335ecb4c7c91abf24b39
diff --git a/src/input/pointer.js b/src/input/pointer.js index <HASH>..<HASH> 100644 --- a/src/input/pointer.js +++ b/src/input/pointer.js @@ -131,7 +131,7 @@ ]; // internal constants - //var MOUSE_WHEEL = 0; + var MOUSE_WHEEL = 0; var POINTER_MOVE = 1; var POINTER_DOWN = 2; var POINTER_UP = 3; @@ -354,6 +354,17 @@ } } break; + + case MOUSE_WHEEL: + // event inside of bounds: trigger the MOUSE_WHEEL callback + if (eventInBounds) { + // trigger the corresponding callback + if (triggerEvent(handlers, e.type, e, e.pointerId)) { + handled = true; + break; + } + } + break; } } });
fix: mouse-wheel events were ignored
melonjs_melonJS
train
js
5decc9448e90c119f20e8b945b64fc7fca28590c
diff --git a/packages/cli/src/util.js b/packages/cli/src/util.js index <HASH>..<HASH> 100644 --- a/packages/cli/src/util.js +++ b/packages/cli/src/util.js @@ -62,9 +62,5 @@ export function formatExportName(name) { return `Svg${name}` } - if (/[-]/g.test(name)) { - return camelcase(name, { pascalCase: true }) - } - - return name + return camelcase(name, { pascalCase: true }) } diff --git a/packages/cli/src/util.test.js b/packages/cli/src/util.test.js index <HASH>..<HASH> 100644 --- a/packages/cli/src/util.test.js +++ b/packages/cli/src/util.test.js @@ -34,6 +34,7 @@ describe('util', () => { describe('#formatExportName', () => { it('should ensure a valid export name', () => { + expect(formatExportName('foo')).toBe('Foo') expect(formatExportName('foo-bar')).toBe('FooBar') expect(formatExportName('2foo')).toBe('Svg2foo') expect(formatExportName('2foo-bar')).toBe('Svg2FooBar')
fix: formatExportName for single names (#<I>)
smooth-code_svgr
train
js,js
2209e64905bc57d93ae6eb619edc61afef1ea289
diff --git a/src/scripts/postinstall.js b/src/scripts/postinstall.js index <HASH>..<HASH> 100644 --- a/src/scripts/postinstall.js +++ b/src/scripts/postinstall.js @@ -5121,7 +5121,7 @@ module.exports = function($logger, hookArgs) { for which environment {development|prod} the project was prepared. If needed, we delete the NS .nsprepareinfo file so we force a new prepare */ - var platform = (hookArgs.checkForChangesOpts || hookArgs.platformData).platform.toLowerCase(); + var platform = (hookArgs.checkForChangesOpts || hookArgs.prepareData).platform.toLowerCase(); var projectData = (hookArgs.checkForChangesOpts && hookArgs.checkForChangesOpts.projectData) || hookArgs.projectData; var platformsDir = projectData.platformsDir; var appResourcesDirectoryPath = projectData.appResourcesDirectoryPath;
fix: fix cannot read .toLowerCase() of undefined NativeScript CLI throws `cannot read .toLowerCase() of undefined` error as there isn't platform property in platformData object. We should use prepareData instead.
EddyVerbruggen_nativescript-plugin-firebase
train
js
ca5c6e31609897885514c231ca9e18fcac4e0968
diff --git a/cmd/erasure-metadata.go b/cmd/erasure-metadata.go index <HASH>..<HASH> 100644 --- a/cmd/erasure-metadata.go +++ b/cmd/erasure-metadata.go @@ -102,7 +102,7 @@ func (fi FileInfo) IsValid() bool { func (fi FileInfo) ToObjectInfo(bucket, object string) ObjectInfo { object = decodeDirObject(object) versionID := fi.VersionID - if globalBucketVersioningSys.Enabled(bucket) && versionID == "" { + if (globalBucketVersioningSys.Enabled(bucket) || globalBucketVersioningSys.Suspended(bucket)) && versionID == "" { versionID = nullVersionID }
fix: translate empty versionID string to null version where appropriate (#<I>) We store the null version as empty string. We should translate it to null version for bucket with version suspended too.
minio_minio
train
go
f699154d2bfb59ace9b85d9dfa94b4e4bd823b18
diff --git a/src/Leevel/Di/Container.php b/src/Leevel/Di/Container.php index <HASH>..<HASH> 100644 --- a/src/Leevel/Di/Container.php +++ b/src/Leevel/Di/Container.php @@ -875,7 +875,7 @@ class Container implements IContainer, ArrayAccess /** * 解析数组回调反射参数. */ - protected function parseMethodReflection(callable $injection): array + protected function parseMethodReflection(array $injection): array { return (new ReflectionMethod($injection[0], $injection[1]))->getParameters(); }
chore(di): fix for phpstan level 3
hunzhiwange_framework
train
php
773758d0e8d58fba15859c44ced9ccddcda19e15
diff --git a/src/Support/SelectFields.php b/src/Support/SelectFields.php index <HASH>..<HASH> 100644 --- a/src/Support/SelectFields.php +++ b/src/Support/SelectFields.php @@ -358,7 +358,7 @@ class SelectFields /** * @param array $select - * @param mixed $relation + * @param Relation $relation * @param string|null $parentTable * @param array $field */
chore: phpstan: fix "Cannot call method getForeignKey() on class-string|object."
rebing_graphql-laravel
train
php
d7110727583c91a4e158a0bf5f4e99909d0e1426
diff --git a/apps/pattern-lab/src/index.js b/apps/pattern-lab/src/index.js index <HASH>..<HASH> 100644 --- a/apps/pattern-lab/src/index.js +++ b/apps/pattern-lab/src/index.js @@ -1,10 +1,10 @@ import 'core-js/modules/es6.string.starts-with'; import 'iframe-resizer/js/iframeResizer.contentWindow.min.js'; -// automatically remove the min-height default set to the body element when viewing PL pages from inside an iframe on the docs site. +// automatically remove the min-height default set to the body element when viewing PL pages from inside an iframe on the docs site, but via a utility class window.iFrameResizer = { readyCallback() { - document.body.setAttribute('style', 'min-height: 0;'); + document.body.classList.add('u-bolt-min-height-none'); }, };
refactor: update previous iframe resize logic to handle via a utility class vs inline style
bolt-design-system_bolt
train
js
1eddc19d8ee325affa516442c5802061d4052f24
diff --git a/memote/support/basic.py b/memote/support/basic.py index <HASH>..<HASH> 100644 --- a/memote/support/basic.py +++ b/memote/support/basic.py @@ -253,6 +253,7 @@ def find_unique_metabolites(model): return set(met.id.split("_", 1)[0] for met in model.metabolites) +@lrudecorator(size=2) def find_duplicate_metabolites_in_compartments(model): """ Return list of metabolites with duplicates in the same compartment. @@ -273,14 +274,15 @@ def find_duplicate_metabolites_in_compartments(model): A list of tuples of duplicate metabolites. """ + unique_identifiers = ["inchikey", "inchi"] duplicates = [] - for compartment in model.compartments: - ann_mets = [(met, met.annotation) for met in model.metabolites - if met.compartment == compartment and - "inchikey" in met.annotation] - for a, b in combinations(ann_mets, 2): - if a[1]["inchikey"] == b[1]["inchikey"]: - duplicates.append((a[0].id, b[0].id)) + for met_1, met_2 in combinations(model.metabolites, 2): + if met_1.compartment == met_2.compartment: + for key in unique_identifiers: + if key in met_1.annotation and key in met_2.annotation: + if met_1.annotation[key] == met_2.annotation[key]: + duplicates.append((met_1.id, met_2.id)) + break return duplicates
refactor: expand find_duplicate_metabolites to include inchi strings
opencobra_memote
train
py
e6d4b5420aec12940fbce21852a44c248deb4340
diff --git a/src/registrations.js b/src/registrations.js index <HASH>..<HASH> 100644 --- a/src/registrations.js +++ b/src/registrations.js @@ -52,7 +52,7 @@ export class SingletonRegistration { let resolver = new StrategyResolver(1, fn); if (!this.registerInChild && container !== container.root) { - this.targetContainer = container.root; + resolver.targetContainer = container.root; } return resolver;
fix(registrations): move configuration to correct instance
aurelia_dependency-injection
train
js
02b743ec67543f082988e9a3c1a1c43208035bbd
diff --git a/pippo-core/src/main/java/ro/pippo/core/Response.java b/pippo-core/src/main/java/ro/pippo/core/Response.java index <HASH>..<HASH> 100644 --- a/pippo-core/src/main/java/ro/pippo/core/Response.java +++ b/pippo-core/src/main/java/ro/pippo/core/Response.java @@ -1150,6 +1150,28 @@ public final class Response { } } + /** + * This method resets the response. + */ + public void reset() { + checkCommitted(); + + // reset all headers + headers = new HashMap<>(); + // reset all cookies + cookies = new HashMap<>(); + // reset all locales + locals = new HashMap<>(); + // set status to 0 or INT MAX + status = 0; + + try { + httpServletResponse.reset(); + } catch (Exception e) { + throw new PippoRuntimeException(e); + } + } + public static Response get() { RouteContext routeContext = RouteDispatcher.getRouteContext();
feat(Response): expose method to reset the response
pippo-java_pippo
train
java
4e7bf85fbc97f1b2e95be8124fbf8c065452bba2
diff --git a/src/function/algebra/decomposition/qr.js b/src/function/algebra/decomposition/qr.js index <HASH>..<HASH> 100644 --- a/src/function/algebra/decomposition/qr.js +++ b/src/function/algebra/decomposition/qr.js @@ -53,7 +53,7 @@ function factory (type, config, load, typed) { * * See also: * - * lusolve + * lup, lusolve * * @param {Matrix | Array} A A two dimensional matrix or array * for which to get the QR decomposition.
docs: add link to lup in qr
josdejong_mathjs
train
js
da48eb5f2e66e0364e41a9a4e4212db3c80d20ac
diff --git a/src/console.js b/src/console.js index <HASH>..<HASH> 100644 --- a/src/console.js +++ b/src/console.js @@ -2,8 +2,6 @@ const huey = require('huey') -const {stdout} = process - // Equals true if the console is mocked. let mocking = false @@ -61,11 +59,15 @@ function performCalls() { args[j] = JSON.stringify(arg) } } - if (key == 'warn') { - args.unshift(huey.yellow('warn:')) - } else if (key == 'error') { - args.unshift(huey.red('error:')) + if (typeof process != 'undefined') { + if (key == 'warn') { + args.unshift(huey.yellow('warn:')) + } else if (key == 'error') { + args.unshift(huey.red('error:')) + } + process.stdout.write('\n' + args.join(' ')) + } else { + console[key](args.join(' ')) } - stdout.write('\n' + args.join(' ')) } }
fix: don't assume process.stdout exists
aleclarson_testpass
train
js
dac23ccfdc6314b048c83b7e0e5a5237121f46a2
diff --git a/webapps/webapp/src/test/js/e2e/ci.conf.js b/webapps/webapp/src/test/js/e2e/ci.conf.js index <HASH>..<HASH> 100644 --- a/webapps/webapp/src/test/js/e2e/ci.conf.js +++ b/webapps/webapp/src/test/js/e2e/ci.conf.js @@ -39,7 +39,7 @@ exports.config = { 'tasklist/specs/filter-spec.js', 'tasklist/specs/process-start-spec.js', 'tasklist/specs/tasklist-sorting-spec.js' - 'tasklist/specs/tasklist-search-spec.js', + 'tasklist/specs/tasklist-search-spec.js' ], // A base URL for your application under test. Calls to protractor.get()
fix(e2e): remove wasted comma in ci.conf
camunda_camunda-bpm-platform
train
js
8fddbf66c038f35efe4777abe4ed904123725116
diff --git a/src/internalHelpers/_endsWith.js b/src/internalHelpers/_endsWith.js index <HASH>..<HASH> 100644 --- a/src/internalHelpers/_endsWith.js +++ b/src/internalHelpers/_endsWith.js @@ -1,3 +1,5 @@ +// @flow + /** * Check if a string ends with something */
chore(internal): add @flow to endsWith
styled-components_polished
train
js
d1b0888b425755e9cfce491025cdb3d02ff46c66
diff --git a/src/Controller/Base.php b/src/Controller/Base.php index <HASH>..<HASH> 100644 --- a/src/Controller/Base.php +++ b/src/Controller/Base.php @@ -20,18 +20,19 @@ use ReflectionException; /** * Allow the app to add functionality, if needed + * Negative conditional helps with static analysis */ -if (class_exists('\App\Cron\Controller\Base')) { - abstract class BaseMiddle extends \App\Cron\Controller\Base - { - } -} else { +if (!class_exists('\App\Cron\Controller\Base')) { abstract class BaseMiddle { public function __construct() { } } +} else { + abstract class BaseMiddle extends \App\Cron\Controller\Base + { + } } // --------------------------------------------------------------------------
chore: Swap middle class to help static analysis
nails_module-cron
train
php
c6f6746bfa583fcce338581ea3ea3895463c59a0
diff --git a/krakenapi.go b/krakenapi.go index <HASH>..<HASH> 100644 --- a/krakenapi.go +++ b/krakenapi.go @@ -6,6 +6,7 @@ import ( "crypto/sha512" "encoding/base64" "encoding/json" + "errors" "fmt" "io/ioutil" "net/http" @@ -13,7 +14,6 @@ import ( "strconv" "strings" "time" - "errors" ) const ( @@ -52,6 +52,13 @@ var privateMethods = []string{ "TradeVolume", "AddOrder", "CancelOrder", + "DepositMethods", + "DepositAddresses", + "DepositStatus", + "WithdrawInfo", + "Withdraw", + "WithdrawStatus", + "WithdrawCancel", } // KrakenApi represents a Kraken API Client connection @@ -229,15 +236,15 @@ func (api *KrakenApi) Depth(pair string, count int) (*OrderBook, error) { _, err := api.queryPublic("Depth", url.Values{ "pair": {pair}, "count": {strconv.Itoa(count)}, }, &dr) - + if err != nil { return nil, err } - + if book, found := dr[pair]; found { return &book, nil } - + return nil, errors.New("invalid response") }
feat(API): Added missing private "User funding" methods. (#<I>)
beldur_kraken-go-api-client
train
go
28ce5e646992a3e0a6afe58f8e579656e92853c0
diff --git a/lib/common.js b/lib/common.js index <HASH>..<HASH> 100644 --- a/lib/common.js +++ b/lib/common.js @@ -485,7 +485,7 @@ function getSampleInner(orig,options,samplerOptions,api){ } function getSample(orig,options,samplerOptions,api){ - if (orig && orig.example) return orig.example; + if (orig && orig.example) return clean(orig.example); let result = getSampleInner(orig,options,samplerOptions,api); result = clean(result); result = strim(result,options.maxDepth);
fix: remove x-widdershins-oldref from examples
Mermade_widdershins
train
js
cf62256a079b6114bcfc419bb268834e9062dd6a
diff --git a/api/src/opentrons/hardware_control/api.py b/api/src/opentrons/hardware_control/api.py index <HASH>..<HASH> 100644 --- a/api/src/opentrons/hardware_control/api.py +++ b/api/src/opentrons/hardware_control/api.py @@ -551,9 +551,16 @@ class API(HardwareAPILike): """ Resume motion after a call to :py:meth:`pause`. """ + # Resume must be called immediately to awaken thread running hardware + # methods (ThreadManager) self._backend.resume() - asyncio.run_coroutine_threadsafe(self._execution_manager.resume(), - self._loop) + + async def _chained_calls(): + # mirror what happens API.pause. + await self._execution_manager.resume() + self._backend.resume() + + asyncio.run_coroutine_threadsafe(_chained_calls(), self._loop) def halt(self): """ Immediately stop motion.
fix(api): fix race condition causing pause/running state mismatch. (#<I>) closes #<I>
Opentrons_opentrons
train
py
0ac09d0003ea8c2dc2d433ed1d23b19f7ce4de71
diff --git a/javascript/node/selenium-webdriver/lib/until.js b/javascript/node/selenium-webdriver/lib/until.js index <HASH>..<HASH> 100644 --- a/javascript/node/selenium-webdriver/lib/until.js +++ b/javascript/node/selenium-webdriver/lib/until.js @@ -205,7 +205,7 @@ exports.urlContains = function urlContains(substrUrl) { 'for URL to contain ' + JSON.stringify(substrUrl), function(driver) { return driver.getCurrentUrl().then(function(url) { - return url.indexOf(substrUrl) !== -1; + return url && url.indexOf(substrUrl) !== -1; }); }); };
fix: add until.urlContains null value check (#<I>) `driver.getCurrentUrl()` can return `null` in some cases, which causes a `TypeError` instead of continuing to retry for the expected time.
SeleniumHQ_selenium
train
js
7a1313192abd95ce0240f8647fa50211a1f210fe
diff --git a/lib/utils/to-id.js b/lib/utils/to-id.js index <HASH>..<HASH> 100644 --- a/lib/utils/to-id.js +++ b/lib/utils/to-id.js @@ -10,5 +10,9 @@ module.exports = docOrIdToId */ function docOrIdToId (docOrId) { - return typeof docOrId === 'object' ? docOrId._id : docOrId + if (typeof docOrId === 'object') { + return docOrId._id || docOrId.id + } + + return docOrId }
fix(sync): sync objects with .id property
hoodiehq_pouchdb-hoodie-sync
train
js
0e4879802107362feb475e815c21304187b60447
diff --git a/lib/doc/jsdoc-template/publish.js b/lib/doc/jsdoc-template/publish.js index <HASH>..<HASH> 100644 --- a/lib/doc/jsdoc-template/publish.js +++ b/lib/doc/jsdoc-template/publish.js @@ -20,7 +20,7 @@ var unprefix = R.pipe( var trimCode = R.pipe( R.split(/\n/), - R.map(R.trim), + R.map(R.replace(/^[ ]{5}/, '')), R.join('\n') );
docs: fix indent 5 is a magic number for the amount of indent ramda has in its examples @example R.F(); //=> false └─5─┘ publish: change \s to character group with space
ramda_ramda
train
js
7ab493d18bab0322b2599338af0d83f5043b426e
diff --git a/src/viewer.js b/src/viewer.js index <HASH>..<HASH> 100644 --- a/src/viewer.js +++ b/src/viewer.js @@ -427,7 +427,7 @@ $.Viewer = function( options ) { } // Add updatePixelDensityRatio to resize event - $.addEvent( window, 'resize', this.updatePixelDensityRatio.bind(this) ); + $.addEvent( window, 'resize', this._updatePixelDensityRatio.bind(this) ); //Instantiate a navigator if configured if ( this.showNavigator){ @@ -1614,8 +1614,9 @@ $.extend( $.Viewer.prototype, $.EventSource.prototype, $.ControlDock.prototype, /** * Update pixel density ration, clears all tiles and triggers updates for * all items. + * @private */ - updatePixelDensityRatio: function() { + _updatePixelDensityRatio: function() { var previusPixelDensityRatio = $.pixelDensityRatio; var currentPixelDensityRatio = $.getCurrentPixelDensityRatio(); if (previusPixelDensityRatio !== currentPixelDensityRatio) {
fix: made updatePixelDensityRatio private Prefixed it with a underscore and added @private annotation
openseadragon_openseadragon
train
js
41f7b98164e72802cdffb0d81836d74b48482322
diff --git a/packages/bonde-admin-canary/src/components/Form/FormGraphQL.js b/packages/bonde-admin-canary/src/components/Form/FormGraphQL.js index <HASH>..<HASH> 100644 --- a/packages/bonde-admin-canary/src/components/Form/FormGraphQL.js +++ b/packages/bonde-admin-canary/src/components/Form/FormGraphQL.js @@ -102,6 +102,7 @@ export class FormGraphQLv2 extends React.Component { } FormGraphQLv2.propTypes = { + children: PropTypes.node, mutation: PropTypes.func.isRequired, mutationVariables: PropTypes.object, query: PropTypes.func,
chore(admin-canary): eslint propTypes FormGraphQL
nossas_bonde-client
train
js
45303fc69ad7c97cc930752c9aa530e2bfde8236
diff --git a/ui/src/components/carousel/QCarousel.js b/ui/src/components/carousel/QCarousel.js index <HASH>..<HASH> 100644 --- a/ui/src/components/carousel/QCarousel.js +++ b/ui/src/components/carousel/QCarousel.js @@ -175,9 +175,7 @@ export default Vue.extend({ h('div', { staticClass: 'q-carousel__slides-container', directives: this.panelDirectives - }, [ - this.__getPanelContent(h) - ]) + }, this.__getPanelContent(h)) ].concat(this.__getContent(h))) } }, diff --git a/ui/src/components/stepper/QStepper.js b/ui/src/components/stepper/QStepper.js index <HASH>..<HASH> 100644 --- a/ui/src/components/stepper/QStepper.js +++ b/ui/src/components/stepper/QStepper.js @@ -86,9 +86,7 @@ export default Vue.extend({ h('div', { staticClass: 'q-stepper__content q-panel-parent', directives: this.panelDirectives - }, [ - this.__getPanelContent(h) - ]) + }, this.__getPanelContent(h)) ) },
refactor(panel): Improve panels render method
quasarframework_quasar
train
js,js
ff5d1c2338be7fa6be8ba6eaa19a58bbcd9c4813
diff --git a/test/event-emitters.js b/test/event-emitters.js index <HASH>..<HASH> 100644 --- a/test/event-emitters.js +++ b/test/event-emitters.js @@ -10,7 +10,9 @@ describe('Angular-wrapped PouchDB event emitters', function() { function rawPut(cb) { function put($window) { var rawDB = new $window.PouchDB('db'); - var doc = {_id: 'test'}; + var doc = { + _id: 'test' + }; rawDB.put(doc, function(err, result) { if (err) { throw err;
style: resolve more lint warnings
angular-pouchdb_angular-pouchdb
train
js
df20a106deb5be9d0a1dbb31fb53a257bf07321e
diff --git a/packages/bonde-webpage/src/lib/ux/tell-a-friend-base/tell-a-friend.js b/packages/bonde-webpage/src/lib/ux/tell-a-friend-base/tell-a-friend.js index <HASH>..<HASH> 100644 --- a/packages/bonde-webpage/src/lib/ux/tell-a-friend-base/tell-a-friend.js +++ b/packages/bonde-webpage/src/lib/ux/tell-a-friend-base/tell-a-friend.js @@ -19,7 +19,7 @@ const TellAFriend = ({ widget }) => { const settings = widget.settings || {} - + console.log(widget) return ( <div className='center p3 bg-white darkengray rounded'> <div className='m0 h3 bold'>{message}</div> @@ -28,7 +28,9 @@ const TellAFriend = ({ </div> <p> <FormattedMessage - id='share.components--tell-a-friend.text' + id={widget.settings.finish_message_type === 'donation-recurrent' + ? 'widgets.components--donation.finish-post-donation-messages.tell-a-friend.text' + : 'share.components--tell-a-friend.text'} defaultMessage='Agora, compartilhe com seus amigos!' /> </p>
feat(webpage): refactor tellAFriend share message
nossas_bonde-client
train
js
3e646799a18aa87924c6654d052f41022e452c78
diff --git a/superset/datasets/commands/create.py b/superset/datasets/commands/create.py index <HASH>..<HASH> 100644 --- a/superset/datasets/commands/create.py +++ b/superset/datasets/commands/create.py @@ -61,7 +61,7 @@ class CreateDatasetCommand(BaseCommand): ) db.session.commit() except (SQLAlchemyError, DAOCreateFailedError) as ex: - logger.exception(ex) + logger.warning(ex, exc_info=True) db.session.rollback() raise DatasetCreateFailedError() return dataset
fix(datasets): log create exceptions as warning (#<I>)
apache_incubator-superset
train
py
41dddd5fd7109799876c766443219e53377f94e5
diff --git a/src/components/user-profile-personal-settings-subform/user-profile-personal-settings-subform.js b/src/components/user-profile-personal-settings-subform/user-profile-personal-settings-subform.js index <HASH>..<HASH> 100644 --- a/src/components/user-profile-personal-settings-subform/user-profile-personal-settings-subform.js +++ b/src/components/user-profile-personal-settings-subform/user-profile-personal-settings-subform.js @@ -37,12 +37,12 @@ export const timeZonesToOptions = defaultMemoize(timeZones => */ export const mapLocalesToOptions = defaultMemoize(locales => Object.entries(locales) - .filter(([code]) => code.startsWith('en') || code.startsWith('de')) - .map(([code, value]) => ({ - value: code, + .filter(([locale]) => locale.startsWith('en') || locale.startsWith('de')) + .map(([locale, value]) => ({ + value: locale, label: value.country - ? `${value.language} (${value.country}) (${code})` - : `${value.language} (${code})`, + ? `${value.language} (${value.country}) (${locale})` + : `${value.language} (${locale})`, })) );
refactor(user-profile): rename code to locale to be more descriptive
commercetools_merchant-center-application-kit
train
js
1ec1816d7c76ae079ad3b3e3b7a1bae70e0dd95b
diff --git a/gitlab/utils.py b/gitlab/utils.py index <HASH>..<HASH> 100644 --- a/gitlab/utils.py +++ b/gitlab/utils.py @@ -55,3 +55,7 @@ def sanitized_url(url): parsed = urlparse(url) new_path = parsed.path.replace(".", "%2E") return parsed._replace(path=new_path).geturl() + + +def remove_none_from_dict(data): + return {k: v for k, v in data.items() if v is not None} diff --git a/gitlab/v4/objects.py b/gitlab/v4/objects.py index <HASH>..<HASH> 100644 --- a/gitlab/v4/objects.py +++ b/gitlab/v4/objects.py @@ -760,6 +760,7 @@ class FeatureManager(ListMixin, DeleteMixin, RESTManager): "group": group, "project": project, } + data = utils.remove_none_from_dict(data) server_data = self.gitlab.http_post(path, post_data=data, **kwargs) return self._obj_cls(self, server_data)
fix: remove null values from features POST data, because it fails with HTTP <I>
python-gitlab_python-gitlab
train
py,py
344431cdd48ec19b73fdc5d36f056eb7bee5154b
diff --git a/rootfs/diff.go b/rootfs/diff.go index <HASH>..<HASH> 100644 --- a/rootfs/diff.go +++ b/rootfs/diff.go @@ -44,7 +44,7 @@ func CreateDiff(ctx context.Context, snapshotID string, sn snapshots.Snapshotter return ocispec.Descriptor{}, err } - lowerKey := fmt.Sprintf("%s-parent-view", info.Parent) + lowerKey := fmt.Sprintf("%s-parent-view-%s", info.Parent, uniquePart()) lower, err := sn.View(ctx, lowerKey, info.Parent) if err != nil { return ocispec.Descriptor{}, err @@ -58,7 +58,7 @@ func CreateDiff(ctx context.Context, snapshotID string, sn snapshots.Snapshotter return ocispec.Descriptor{}, err } } else { - upperKey := fmt.Sprintf("%s-view", snapshotID) + upperKey := fmt.Sprintf("%s-view-%s", snapshotID, uniquePart()) upper, err = sn.View(ctx, upperKey, snapshotID) if err != nil { return ocispec.Descriptor{}, err
fix: support simultaneous create diff for same parent snapshot
containerd_containerd
train
go
25a07f60a7a087f0946fa8d27d9f5740c033209e
diff --git a/react/Textarea/Textarea.demo.js b/react/Textarea/Textarea.demo.js index <HASH>..<HASH> 100644 --- a/react/Textarea/Textarea.demo.js +++ b/react/Textarea/Textarea.demo.js @@ -71,13 +71,6 @@ export default { }) }, { - label: 'Secondary Label', - transformProps: props => ({ - ...props, - secondaryLabel: '(secondary)' - }) - }, - { label: 'Show Count', transformProps: props => ({ ...props, diff --git a/react/private/FieldMessage/FieldMessage.demo.js b/react/private/FieldMessage/FieldMessage.demo.js index <HASH>..<HASH> 100644 --- a/react/private/FieldMessage/FieldMessage.demo.js +++ b/react/private/FieldMessage/FieldMessage.demo.js @@ -1,18 +1,5 @@ export default [ { - label: 'Secondary', - type: 'checklist', - states: [ - { - label: 'Secondary message', - transformProps: props => ({ - ...props, - messageProps: { secondary: true } - }) - } - ] - }, - { label: 'Message', type: 'radio', states: [
docs(site): Clean up form element demos (#<I>) Some form element demos were starting to collect a few too many options, but some of them were either an edge case or completely redundant.
seek-oss_seek-style-guide
train
js,js
d78d9744c6f5fd3e6547a802a5b8e26c403ca5d4
diff --git a/javascript/ajaxselect2.init.js b/javascript/ajaxselect2.init.js index <HASH>..<HASH> 100644 --- a/javascript/ajaxselect2.init.js +++ b/javascript/ajaxselect2.init.js @@ -2,6 +2,7 @@ $.entwine("select2", function($) { $("input.ajaxselect2").entwine({ onmatch: function() { + this._super(); var self = this; self.select2({ multiple: self.data('multiple'), diff --git a/javascript/select2.init.js b/javascript/select2.init.js index <HASH>..<HASH> 100644 --- a/javascript/select2.init.js +++ b/javascript/select2.init.js @@ -1,10 +1,10 @@ -jQuery.entwine("select2", function($) { - - $("select.select2").entwine({ - onmatch: function() { - var self = this; - self.select2(); - }, +(function($) { + $.entwine("select2", function($) { + $("select.select2").entwine({ + onmatch: function() { + this._super(); + this.select2(); + } + }); }); -}); - +})(jQuery); \ No newline at end of file
fix(Entwine): Add this._super() to avoid weird breaking issues, Change select2.init.js to be consistent with ajaxselect2.init.js formatting
sheadawson_silverstripe-select2
train
js,js
154c2cc3f86369435221b181d4cc281414637b13
diff --git a/packages/razzle/config/createConfigAsync.js b/packages/razzle/config/createConfigAsync.js index <HASH>..<HASH> 100644 --- a/packages/razzle/config/createConfigAsync.js +++ b/packages/razzle/config/createConfigAsync.js @@ -1022,7 +1022,7 @@ module.exports = ( } if (razzleOptions.debug.config) { console.log(`Printing webpack config for ${target} target`); - console.log(util.inspect(webpackConfig, {depth: null})); + console.log(util.inspect(config, {depth: null})); } resolve(config); });
fix(razzle): webpackConfig undefined webpackConfig undefined, i should be config
jaredpalmer_razzle
train
js
4bc049d23af92051b270f30668cfcc2f342557b8
diff --git a/test/browser/test.js b/test/browser/test.js index <HASH>..<HASH> 100755 --- a/test/browser/test.js +++ b/test/browser/test.js @@ -35,7 +35,7 @@ var sauceClient; var sauceConnectProcess; var tunnelId = process.env.TRAVIS_JOB_NUMBER || 'tunnel-' + Date.now(); -var jobName = tunnelId; +var jobName = tunnelId + '-' + clientStr; var build = (process.env.TRAVIS_COMMIT ? process.env.TRAVIS_COMMIT : Date.now());
fix(sauce): append client str
delta-db_deltadb-common-utils
train
js
289349a314f63069ff6f7e40a9d0f2bf0f6063cf
diff --git a/semantic_release/history/logs.py b/semantic_release/history/logs.py index <HASH>..<HASH> 100644 --- a/semantic_release/history/logs.py +++ b/semantic_release/history/logs.py @@ -109,7 +109,8 @@ def generate_changelog(from_version: str, to_version: str = None) -> dict: changes[message[1]].append(( _hash, # Capitalize the first letter of the message - message[3][0][0].upper() + message[3][0][1:] + message[3][0].capitalize() + )) # Handle breaking change message
refactor(history): use capitalize method for readability
relekang_python-semantic-release
train
py
db5197011aec429dc68730dcde2da25df5059a1f
diff --git a/webapps/ui/tasklist/plugins/tasklistSorting/app/tasklistHeader/cam-tasklist-sorting-choices.js b/webapps/ui/tasklist/plugins/tasklistSorting/app/tasklistHeader/cam-tasklist-sorting-choices.js index <HASH>..<HASH> 100644 --- a/webapps/ui/tasklist/plugins/tasklistSorting/app/tasklistHeader/cam-tasklist-sorting-choices.js +++ b/webapps/ui/tasklist/plugins/tasklistSorting/app/tasklistHeader/cam-tasklist-sorting-choices.js @@ -296,6 +296,8 @@ module.exports = [ element.focus(); } }); + + scope.openDropdownNew = false; }; /**
fix(tasklist): close dropdown after adding filter related to CAM-<I>
camunda_camunda-bpm-platform
train
js
1ffb1c7f466840a6d84279e1fa87aacae7dc1474
diff --git a/src/core/errorBag.js b/src/core/errorBag.js index <HASH>..<HASH> 100644 --- a/src/core/errorBag.js +++ b/src/core/errorBag.js @@ -47,6 +47,7 @@ export default class ErrorBag { } error.scope = !isNullOrUndefined(error.scope) ? error.scope : null; + error.vmId = !isNullOrUndefined(error.vmId) ? error.vmId : (this.vmId || null); return [error]; }
fix: error bag not adding the vmId on manually added errors closes #<I>
baianat_vee-validate
train
js
76dfe138990e3387ac5c987f26af56caca4c11bb
diff --git a/plugins/vega/Histogram/test/histogram.image.js b/plugins/vega/Histogram/test/histogram.image.js index <HASH>..<HASH> 100644 --- a/plugins/vega/Histogram/test/histogram.image.js +++ b/plugins/vega/Histogram/test/histogram.image.js @@ -5,5 +5,5 @@ imageTest({ url: 'http://localhost:28000/examples/histogram', selector: '#vis-element', delay: 1000, - threshold: 0.001 + threshold: 0.005 });
test: allow bigger margin of error to account for pixelwise rendering differences
Kitware_candela
train
js
8a0e051c1dd059f3fede4147154b40f857b7d304
diff --git a/cmd/helm/installer/install.go b/cmd/helm/installer/install.go index <HASH>..<HASH> 100644 --- a/cmd/helm/installer/install.go +++ b/cmd/helm/installer/install.go @@ -166,6 +166,9 @@ func generateDeployment(opts *Options) *extensions.Deployment { }, }, }, + NodeSelector: map[string]string{ + "beta.kubernetes.io/os": "linux", + }, SecurityContext: &api.PodSecurityContext{ HostNetwork: opts.EnableHostNetwork, },
fix(helm): Ensures tiller pod lands on a linux node Without a node selector to ensure that tiller deploys on a linux node, the tiller pod can have issues starting in a mixed cluster. Fixes #<I>
helm_helm
train
go
6a07715c1de19a27dce8c38153ee5ddb06093967
diff --git a/src/structures/Guild.js b/src/structures/Guild.js index <HASH>..<HASH> 100644 --- a/src/structures/Guild.js +++ b/src/structures/Guild.js @@ -266,7 +266,7 @@ class Guild extends Base { */ this.emojis = new GuildEmojiStore(this); if (data.emojis) for (const emoji of data.emojis) this.emojis.add(emoji); - } else { + } else if (data.emojis) { this.client.actions.GuildEmojisUpdate.handle({ guild_id: this.id, emojis: data.emojis,
fix(Guild): only update emojis when they are present in the payload
discordjs_discord.js
train
js
e89098d37fd11180cc030eea6c316c85f32579ea
diff --git a/lib/components/map/default-map.js b/lib/components/map/default-map.js index <HASH>..<HASH> 100644 --- a/lib/components/map/default-map.js +++ b/lib/components/map/default-map.js @@ -13,7 +13,6 @@ import { setMapPopupLocation, setMapPopupLocationAndGeocode } from '../../actions/map' - import BoundsUpdatingOverlay from './bounds-updating-overlay' import EndpointsOverlay from './connected-endpoints-overlay' import ParkAndRideOverlay from './connected-park-and-ride-overlay' diff --git a/lib/components/narrative/line-itin/itin-summary.js b/lib/components/narrative/line-itin/itin-summary.js index <HASH>..<HASH> 100644 --- a/lib/components/narrative/line-itin/itin-summary.js +++ b/lib/components/narrative/line-itin/itin-summary.js @@ -1,6 +1,6 @@ import TriMetModeIcon from '@opentripplanner/icons/lib/trimet-mode-icon' -import React, { Component } from 'react' import PropTypes from 'prop-types' +import React, { Component } from 'react' import { calculateFares, calculatePhysicalActivity, isTransit } from '../../../util/itinerary' import { formatDuration, formatTime } from '../../../util/time'
style: Organize imports per PR comments.
opentripplanner_otp-react-redux
train
js,js
21170c7365cd6d8a98a9942003ace2dc62222428
diff --git a/lib/index.js b/lib/index.js index <HASH>..<HASH> 100644 --- a/lib/index.js +++ b/lib/index.js @@ -123,7 +123,12 @@ PostHTML.prototype.process = function (tree, options) { // async mode var i = 0 + Api.context = tree + var next = function (result, cb) { + // (re)extend the object + Api.call(result) + // all plugins called if (this.plugins.length <= i) { cb(null, result) @@ -135,11 +140,6 @@ PostHTML.prototype.process = function (tree, options) { return next(res || result, cb) } - // (re)extend the object - if (result.extendApi === undefined) { - Api.call(result) - } - // call next var plugin = this.plugins[i++]
perf(index): set the previous tree as the context value for api
posthtml_posthtml
train
js
3b18c9e35a017f6650d97da960eab6f71a090dfc
diff --git a/src/Caouecs/Sirtrevorjs/Converter/SocialConverter.php b/src/Caouecs/Sirtrevorjs/Converter/SocialConverter.php index <HASH>..<HASH> 100644 --- a/src/Caouecs/Sirtrevorjs/Converter/SocialConverter.php +++ b/src/Caouecs/Sirtrevorjs/Converter/SocialConverter.php @@ -38,6 +38,7 @@ class SocialConverter extends BaseConverter implements ConverterInterface .'d.getElementById(id)) return; js = d.createElement(s); js.id = id; js.src = "//connect.' .'facebook.net/en_GB/all.js#xfbml=1";fjs.parentNode.insertBefore(js, fjs);}(document,' .'\'script\',\'facebook-jssdk\'));</script>', + 'tweet' => '<script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>', ], 'amp' => [ 'tweet' => '<script async custom-element="amp-twitter" src="https://cdn.ampproject.org/v0/'
fix: tweet - html - include js
caouecs_Laravel-SirTrevorJS
train
php
33a8d80a422411d7f0226cf98fd95d4ee0523097
diff --git a/util/db/repository_legacy.go b/util/db/repository_legacy.go index <HASH>..<HASH> 100644 --- a/util/db/repository_legacy.go +++ b/util/db/repository_legacy.go @@ -332,8 +332,7 @@ func (l *legacyRepositoryBackend) upsertSecret(name string, data map[string][]by } } if len(secret.Data) == 0 { - isManagedByArgo := (secret.Annotations != nil && secret.Annotations[common.AnnotationKeyManagedBy] == common.AnnotationValueManagedByArgoCD) || - (secret.Labels != nil && secret.Labels[common.LabelKeySecretType] == "repository") + isManagedByArgo := secret.Annotations != nil && secret.Annotations[common.AnnotationKeyManagedBy] == common.AnnotationValueManagedByArgoCD if isManagedByArgo { return l.db.kubeclientset.CoreV1().Secrets(l.db.ns).Delete(context.Background(), name, metav1.DeleteOptions{}) }
chore: Remove unneeded secret type check (#<I>)
argoproj_argo-cd
train
go
bde001f89b06b139fe5f03c8ba155337856d4439
diff --git a/packages/theme-data/src/__stories__/stories.js b/packages/theme-data/src/__stories__/stories.js index <HASH>..<HASH> 100644 --- a/packages/theme-data/src/__stories__/stories.js +++ b/packages/theme-data/src/__stories__/stories.js @@ -74,6 +74,11 @@ export default [ readme: undefined }, { + description: "Component - Accordion", + schema: filterMatchByKey(baseTheme.unresolvedRoles, /^accordion./), + readme: undefined + }, + { description: "Component - Avatar", schema: filterMatchByKey(baseTheme.unresolvedRoles, /^avatar./), readme: undefined
docs: update theme-data stories for Accordion
Autodesk_hig
train
js
90cdeaf742a942e1c9f59f4be7dc2937b8becb95
diff --git a/packages/es-dev-server/src/config.js b/packages/es-dev-server/src/config.js index <HASH>..<HASH> 100644 --- a/packages/es-dev-server/src/config.js +++ b/packages/es-dev-server/src/config.js @@ -184,7 +184,7 @@ export function createConfig(config) { let openPath; if (typeof open === 'string' && open !== '') { // user-provided open path - openPath = path.normalize(open); + openPath = open; } else if (appIndex) { // if an appIndex was provided, use it's directory as open path openPath = `${basePath || ''}${appIndexDir}/`;
fix(es-dev-server): don't normalize file path on a browser path
open-wc_open-wc
train
js
c17ea2380951c0a0104884a7b5d90470b0568568
diff --git a/test/replication-test.js b/test/replication-test.js index <HASH>..<HASH> 100644 --- a/test/replication-test.js +++ b/test/replication-test.js @@ -51,7 +51,7 @@ test('simple read from replicator (no ops)', function (t) { i++ }) .on('end', function () { - t.equal(i, 3434) + t.equal(i, 3130) }) }) @@ -93,7 +93,7 @@ test('simple read from replicated index (no ops)', function (t) { i++ }) .on('end', function () { - t.equal(i, 3434) + t.equal(i, 3130) }) }) @@ -138,7 +138,7 @@ test('validate gzip replication', function (t) { i++ }) .on('end', function () { - t.equal(i, 3434) + t.equal(i, 3130) }) })
test(replication): correct number of keys
fergiemcdowall_search-index-adder
train
js
f1bf2f4a2b4c25f83d3fbeebad386c0e7518f593
diff --git a/packages/avet-shared/src/httpclient.js b/packages/avet-shared/src/httpclient.js index <HASH>..<HASH> 100644 --- a/packages/avet-shared/src/httpclient.js +++ b/packages/avet-shared/src/httpclient.js @@ -18,6 +18,8 @@ export function getHttpClient(ctx, options = {}) { Object.keys(headers).forEach(key => { axios.defaults.headers.common[key] = headers[key]; }); + // 设置 ip + axios.defaults.headers.common['X-Forwarded-For'] = ctx.ip; } const baseURL = getBaseURL(ctx);
feat: httpclient setting ip headers
avetjs_avet
train
js