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
c372b8ab390af137e3292c0e77a2628dedacfc9b
diff --git a/ui/src/components/uploader/QUploaderBase.js b/ui/src/components/uploader/QUploaderBase.js index <HASH>..<HASH> 100644 --- a/ui/src/components/uploader/QUploaderBase.js +++ b/ui/src/components/uploader/QUploaderBase.js @@ -479,7 +479,7 @@ export default { 'q-uploader--flat no-shadow': this.flat, 'disabled q-uploader--disable': this.disable }, - on: this.editable === true && this.isUploading !== true + on: this.canAddFiles === true ? { dragover: this.__onDragOver } : null }, [
fix(QUploader): drag-n-drop failing when adding second file to a non-multiple QUploader #<I>
quasarframework_quasar
train
js
ce346efebea4497b1af5a1a74607c8417e31880e
diff --git a/models/AccountModel.js b/models/AccountModel.js index <HASH>..<HASH> 100644 --- a/models/AccountModel.js +++ b/models/AccountModel.js @@ -29,6 +29,7 @@ module.exports = function( Model, config ) { }, subDomain: { type: String, + length: 191, required: true, unique: true }
fix(subDomain): Correctly set the max length to the allowed bytes
CleverStack_clever-accounts
train
js
121343c37ad2765b195cf94931b230df65d677ca
diff --git a/src/main/java/com/conveyal/gtfs/validator/MTCValidator.java b/src/main/java/com/conveyal/gtfs/validator/MTCValidator.java index <HASH>..<HASH> 100644 --- a/src/main/java/com/conveyal/gtfs/validator/MTCValidator.java +++ b/src/main/java/com/conveyal/gtfs/validator/MTCValidator.java @@ -25,7 +25,6 @@ public class MTCValidator extends FeedValidator { @Override public void validate() { - // Validate field lengths (agency, stop, trip). for (Agency agency : feed.agencies) { validateFieldLength(agency, agency.agency_id, 50); validateFieldLength(agency, agency.agency_name, 50);
refactor(MTCValidator): Remove extra comment in validate()
conveyal_gtfs-lib
train
java
616d12351f3dab743a1eb3d60812d2da5c7e07c3
diff --git a/babel.config.js b/babel.config.js index <HASH>..<HASH> 100644 --- a/babel.config.js +++ b/babel.config.js @@ -1,20 +1,13 @@ module.exports = { babelrcRoots: [".", "./website/*"], presets: [["@babel/env", { loose: true }], "@babel/react"], - plugins: ["dev-expression"], + plugins: [ + "dev-expression", + ["@babel/plugin-proposal-class-properties", { loose: true }] + ], env: { test: { presets: [["@babel/preset-env", { targets: { node: "current" } }]] } - }, - overrides: [ - { - test: "./packages/react-router/modules/*", - plugins: [["@babel/plugin-proposal-class-properties", { loose: true }]] - }, - { - test: "./packages/react-router-dom/modules/*", - plugins: [["@babel/plugin-proposal-class-properties", { loose: true }]] - } - ] + } };
refactor: simplify project-wide babel config
ReactTraining_react-router
train
js
89ca9b2fef7cce93667d078c415a8869c6184d89
diff --git a/index.js b/index.js index <HASH>..<HASH> 100644 --- a/index.js +++ b/index.js @@ -124,7 +124,8 @@ function Angular2ConventionsLoader(source, sourcemap) { var __args = /@(Component|Directive)\({([\s\S]*?)}\)\s*export\s*class\s*([\s\S]+)\s*(extends|implements|{)$/m.exec(src.slice(offset)); if (__args && __args[3]) { var __className = __args[3].split(' ')[0]; - __selector = dashCase(__className); + // if component dash case else [attr] + __selector = (decorator === 'Component') ? dashCase(__className) : '[' + __className + ']'; __selector = __selector.replace('-component', ''); metadata = 'selector: "' + selectorPrefix + __selector + '",\n' + metadata; __args = null;
feat: for Directive wrap in [attr] selector
AngularClass_angular2-conventions-loader
train
js
7be760342fa433278ca6271dd7661a3132b96e1a
diff --git a/spec/dpl/providers/convox_spec.rb b/spec/dpl/providers/convox_spec.rb index <HASH>..<HASH> 100644 --- a/spec/dpl/providers/convox_spec.rb +++ b/spec/dpl/providers/convox_spec.rb @@ -86,13 +86,17 @@ describe Dpl::Providers::Convox do end describe 'given --env "ONE=$one,TWO=two"' do - it { should have_run 'convox env set ONE="$one" TWO="two" --rack rack --app app --replace' } + it { should have_run 'convox env set ONE\=\$one TWO\=two --rack rack --app app --replace' } + end + + describe 'given --env "ONE=$one,TWO=two,THREE=three four five"' do + it { should have_run 'convox env set ONE\=\$one TWO\=two THREE\=three\ four\ five --rack rack --app app --replace' } end describe 'given --env_file .env --env TWO=two', run: false do file '.env', 'ONE=$one' before { subject.run } - it { should have_run 'convox env set ONE="$one" TWO="two" --rack rack --app app --replace' } + it { should have_run 'convox env set ONE\=\$one TWO\=two --rack rack --app app --replace' } end describe 'missing env file, given --env_file .env', run: false do
test: fixed tests for usage of Shellwords's escape instead ShVars
travis-ci_dpl
train
rb
6448cab533c1c0124545f44007f08766bc3530c5
diff --git a/packages/orbit-components/src/Modal/index.js b/packages/orbit-components/src/Modal/index.js index <HASH>..<HASH> 100644 --- a/packages/orbit-components/src/Modal/index.js +++ b/packages/orbit-components/src/Modal/index.js @@ -77,8 +77,10 @@ const ModalWrapper = styled.div` !isMobileFullPage && "12px"}; // TODO: create token border-top-right-radius: ${({ isMobileFullPage }) => !isMobileFullPage && "12px"}; // TODO: create token - transition: ${transition(["top"], "normal", "ease-in-out")}; - top: ${({ loaded, isMobileFullPage }) => (loaded ? !isMobileFullPage && "32px" : "100%")}; + transition: ${transition(["transform"], "normal", "ease-in-out")}; + transform: translateY( + ${({ loaded, isMobileFullPage }) => (loaded ? !isMobileFullPage && "32px" : "100%")} + ); ${onlyIE(css` /* IE flex bug, the content won't be centered if there is not 'height' property @@ -88,7 +90,7 @@ const ModalWrapper = styled.div` ${media.largeMobile(css` position: relative; - top: 0; + transform: none; max-width: ${getSizeToken}; align-items: center; `)};
fix(Modal): reduce Cumulative Layout Shift
kiwicom_orbit-components
train
js
e81afed66d9e49fcca3679b663bd7c0319067c31
diff --git a/lib/browser/api/web-contents.js b/lib/browser/api/web-contents.js index <HASH>..<HASH> 100644 --- a/lib/browser/api/web-contents.js +++ b/lib/browser/api/web-contents.js @@ -354,9 +354,6 @@ WebContents.prototype._init = function () { app.emit('renderer-process-crashed', event, this, ...args) }) - deprecate.event(this, 'did-get-response-details', '-did-get-response-details') - deprecate.event(this, 'did-get-redirect-request', '-did-get-redirect-request') - // The devtools requests the webContents to reload. this.on('devtools-reload-page', function () { this.reload()
chore: remove dead code (#<I>)
electron_electron
train
js
f568d7ee3b6154628941c018a7ab4485234902c7
diff --git a/docs/lib/Home/index.js b/docs/lib/Home/index.js index <HASH>..<HASH> 100644 --- a/docs/lib/Home/index.js +++ b/docs/lib/Home/index.js @@ -21,7 +21,7 @@ export default () => { Easy to use form validation for <a href="https://github.com/reactstrap/reactstrap">reactstrap</a> </p> <p> - <Button outline color="danger" href="https://github.com/availity/availity-reactstrap-validation">View on Github</Button> + <Button outline color="danger" href="https://github.com/availity/availity-reactstrap-validation">View on GitHub</Button> <Button color="danger" tag={Link} to="/components/">View Components</Button> </p> </Col> diff --git a/docs/lib/UI/Nav.js b/docs/lib/UI/Nav.js index <HASH>..<HASH> 100644 --- a/docs/lib/UI/Nav.js +++ b/docs/lib/UI/Nav.js @@ -48,7 +48,7 @@ export default class UINav extends Component { </NavItem> <NavItem> <NavLink href="https://github.com/availity/availity-reactstrap-validation"> - Github + GitHub </NavLink> </NavItem> </Nav>
docs(typo): changing Github to GitHub (#<I>)
Availity_availity-reactstrap-validation
train
js,js
5a3868ed91b4dba6f0613882e417627695603683
diff --git a/src/components/buttons/buttons.js b/src/components/buttons/buttons.js index <HASH>..<HASH> 100644 --- a/src/components/buttons/buttons.js +++ b/src/components/buttons/buttons.js @@ -75,10 +75,11 @@ function MaterialButtonDirective(ngHrefDirectives, $expectAria) { innerElement .addClass('material-button-inner') - .append(element.contents()) - .append('<material-ripple start="center" initial-opacity="0.25" opacity-decay-velocity="0.75"></material-ripple>'); + .append(element.contents()); - element.append(innerElement); + element + .append(innerElement) + .append('<material-ripple start="center" initial-opacity="0.25" opacity-decay-velocity="0.75"></material-ripple>'); return function postLink(scope, element, attr) { $expectAria(element, 'aria-label', element.text());
refactor(buttons): put material-ripple outside inner-button
angular_material
train
js
119766c5fa70cc1e5dcb0edb69c1a2652d7dbb5b
diff --git a/src/lib/htmlPropsUtils.js b/src/lib/htmlPropsUtils.js index <HASH>..<HASH> 100644 --- a/src/lib/htmlPropsUtils.js +++ b/src/lib/htmlPropsUtils.js @@ -29,6 +29,7 @@ export const htmlInputAttrs = [ 'readOnly', 'required', 'step', + 'title', 'type', 'value', ]
fix(Input): pass `title` down to an input element (#<I>) fix(Input): pass `title` down to an input element
Semantic-Org_Semantic-UI-React
train
js
a1c01ded9c988c082ec51bc76a33b547216e39e3
diff --git a/script/lib/config.py b/script/lib/config.py index <HASH>..<HASH> 100644 --- a/script/lib/config.py +++ b/script/lib/config.py @@ -15,7 +15,7 @@ PLATFORM = { LINUX_BINARIES = [ 'chrome-sandbox', - 'crashpad_handler', + 'chrome_crashpad_handler', 'electron', 'libEGL.so', 'libGLESv2.so',
fix: really strip crashpad handler binary (#<I>)
electron_electron
train
py
6e9ec1aa9e975ad997e9a6fb255c846786a8a1de
diff --git a/scripts/orm/sql/adapters/postgres/connections.js b/scripts/orm/sql/adapters/postgres/connections.js index <HASH>..<HASH> 100644 --- a/scripts/orm/sql/adapters/postgres/connections.js +++ b/scripts/orm/sql/adapters/postgres/connections.js @@ -59,12 +59,10 @@ Connections.prototype._unregisterAll = function (db, host, username, password, p Connections.prototype._unregister = function (id, db, host, username, password, port) { var connString = this._connString(db, host, username, password, port); - // TODO: should this code be removed? Are we seeing "partitioners ids missing" errors in the - // server log? // Prevent against race conditions during close - // if (!this._connections[connString]) { - // return Promise.resolve(); - // } + if (!this._connections[connString]) { + return Promise.resolve(); + } delete this._connections[connString].ids[id];
fix(postgres): prevent race conditions
delta-db_deltadb-server
train
js
2a1c5f4e11f5d868e883f60ff3f8df97815cdc07
diff --git a/src/main/java/ameba/util/bean/BeanMap.java b/src/main/java/ameba/util/bean/BeanMap.java index <HASH>..<HASH> 100644 --- a/src/main/java/ameba/util/bean/BeanMap.java +++ b/src/main/java/ameba/util/bean/BeanMap.java @@ -572,8 +572,8 @@ public class BeanMap<T> extends AbstractMap<String, Object> implements Cloneable beanClass = (Class<T>) bean.getClass(); bean = (T) ((BeanMap) bean).getBean(); } else { - Set<Entry> entries = ((Map) getBean()).entrySet(); - for (Entry entry : entries) { + Set<Map.Entry> entries = ((Map) getBean()).entrySet(); + for (Map.Entry entry : entries) { String name = transformPropertyName((String) entry.getKey()); if (StringUtils.isNotBlank(name) && entry.getValue() != null) { types.put(name, entry.getValue().getClass());
refactor: 增强bean transformer
icode_ameba-utils
train
java
0a746ab7a19928cc2ada7f7329ce6e87f154111d
diff --git a/test/timers.mocha.js b/test/timers.mocha.js index <HASH>..<HASH> 100644 --- a/test/timers.mocha.js +++ b/test/timers.mocha.js @@ -49,7 +49,6 @@ describe('Timers', function () { setImmediate(function setImmediateTest1 () { dump = inspector.dump(); utils.testCommon(dump); - console.log(require('util').inspect(dump, {showHidden: false, depth: null})); assert.equal(dump.setImmediates.length, 2); assert.equal(dump.setImmediates[0].name, 'setImmediateTest2'); });
test: remove console.log from test
keymetrics_event-loop-inspector
train
js
3a316d795598f429a1f55afa60c6ef4a2ac70fe9
diff --git a/config/typescript/tsconfig.js b/config/typescript/tsconfig.js index <HASH>..<HASH> 100644 --- a/config/typescript/tsconfig.js +++ b/config/typescript/tsconfig.js @@ -3,6 +3,7 @@ const { paths } = require('../../context'); module.exports = () => ({ compilerOptions: { + skipLibCheck: true, // Fixes https://github.com/cypress-io/cypress/issues/1087 esModuleInterop: true, allowSyntheticDefaultImports: true, resolveJsonModule: true,
fix(lint): Suppress global type clash between Jest and Cypress (#<I>)
seek-oss_sku
train
js
64649ee5231f897d336be4c3d17ad965900d07fd
diff --git a/views/js/richPassage/xincludeRendererAddStyles.js b/views/js/richPassage/xincludeRendererAddStyles.js index <HASH>..<HASH> 100644 --- a/views/js/richPassage/xincludeRendererAddStyles.js +++ b/views/js/richPassage/xincludeRendererAddStyles.js @@ -40,9 +40,10 @@ define(['lodash', 'jquery', 'uri', 'util/url', 'core/dataProvider/request', 'tao }); head.append(styleElem); if (element.name !== 'tao-user-styles.css') { - $(`[href="${link}"]`).load((e) => { - formatStyles(e.target, passageClassName); - }) + const cssFile = $(`[href="${link}"]`); + if (cssFile) { + formatStyles(cssFile, passageClassName); + } } });
fix: format CSS on Item authoring
oat-sa_extension-tao-mediamanager
train
js
aad9cb1851316edeefcb3386999503af3a484346
diff --git a/provider/digitalocean.py b/provider/digitalocean.py index <HASH>..<HASH> 100644 --- a/provider/digitalocean.py +++ b/provider/digitalocean.py @@ -54,7 +54,7 @@ def destroy_layer(layer): conn = _create_digitalocean_connection(layer['creds']) name = "deis-{formation}-{id}".format(**layer) # retrieve and delete the SSH key created - for k in conn.all_ssh_keys(): + for k in conn.ssh_keys(): if k.name == name: conn.destroy_ssh_key(k.id) @@ -93,7 +93,7 @@ def _get_droplet_kwargs(node, conn): 'size_id': _get_id(conn.sizes(), params.get('size', '4GB')), 'image_id': _get_id(conn.images(my_images=True), params.get('image', 'deis-node-image')), 'region_id': _get_id(conn.regions(), params.get('region', 'San Francisco 1')), - 'ssh_key_ids': [str(_get_id(conn.all_ssh_keys(), + 'ssh_key_ids': [str(_get_id(conn.ssh_keys(), "deis-{formation}-{layer}".format(**node)))], 'virtio': True, 'private_networking': True
fix(providers): update dop calls Before dop <I>, the call to get all SSH keys listed on your account was called all_ssh_keys(). In <I>, they introduced a couple of breaking changes, including the change to rename all_ssh_keys() to ssh_keys(). ref: <URL>
deis_controller-sdk-go
train
py
221a6c054df862afb6c5a16b09eee6b4f144a274
diff --git a/packages/building-webpack/modern-and-legacy-config.js b/packages/building-webpack/modern-and-legacy-config.js index <HASH>..<HASH> 100644 --- a/packages/building-webpack/modern-and-legacy-config.js +++ b/packages/building-webpack/modern-and-legacy-config.js @@ -126,7 +126,7 @@ function createConfig(options, legacy) { new WebpackIndexHTMLPlugin( merge( { - multiBuild: production, + multiBuild: true, legacy, polyfills: { coreJs: true,
fix(building-webpack): always multi-build in dev mode (#<I>)
open-wc_open-wc
train
js
f9b5104ca32fb006bef0cfa0622ef2df23abe4f2
diff --git a/index.js b/index.js index <HASH>..<HASH> 100644 --- a/index.js +++ b/index.js @@ -28,7 +28,7 @@ module.exports = exports = function define (definition) { return Object.defineProperties( new (mixinable.bind.apply(mixinable, [mixinable].concat(args)))(), { - clone: { + __clone__: { value: create.bind.apply(create, [create].concat(args)) }, __implementations__: {
refactor: mark clone method as internal
untool_mixinable
train
js
8f9d10cdf21a1079e26c889fa6da72a453378612
diff --git a/packages/core/src/tracing/instrumentation/protocols/graphql.js b/packages/core/src/tracing/instrumentation/protocols/graphql.js index <HASH>..<HASH> 100644 --- a/packages/core/src/tracing/instrumentation/protocols/graphql.js +++ b/packages/core/src/tracing/instrumentation/protocols/graphql.js @@ -218,7 +218,7 @@ function addFieldsAndArguments(span, definition) { return arg.name && typeof arg.name.value === 'string' ? arg.name.value : '?'; }); } - }, {}); + }); }); }
fix(tracing): remove superfluous argument This was an array.reduce call at some time and the accumulator has not been deleted when changing it ot array.forEach.
instana_nodejs-sensor
train
js
b9f56060174dc68a95a169ee226d0c412aae6fc6
diff --git a/app/templates/entry/client-entry.js b/app/templates/entry/client-entry.js index <HASH>..<HASH> 100644 --- a/app/templates/entry/client-entry.js +++ b/app/templates/entry/client-entry.js @@ -164,9 +164,6 @@ async function start ({ app, router<%= store ? ', store, storeKey' : '' %> }<%= app.mount('#q-app') }, false) // on deviceready <% } else { %> - <% if (ctx.mode.capacitor) { %> - app.config.globalProperties.$q.capacitor = window.Capacitor - <% } %> app.mount('#q-app') <% } %>
chore(ui): addition to previous commit
quasarframework_quasar
train
js
42df8a2589b35ca7de01b26ffa5fc4c6873a7f9d
diff --git a/packages/docs/themes/cerebral-website/page/__content/page__content.bemhtml.js b/packages/docs/themes/cerebral-website/page/__content/page__content.bemhtml.js index <HASH>..<HASH> 100644 --- a/packages/docs/themes/cerebral-website/page/__content/page__content.bemhtml.js +++ b/packages/docs/themes/cerebral-website/page/__content/page__content.bemhtml.js @@ -8,7 +8,7 @@ block('page').elem('content').match(function () { content: [ { elem: 'col', - elemMods: { sw: 24, lw: 5, mol: true }, + elemMods: { sw: 24, lw: 5, sol: true, mol: true }, content: { block: 'side-nav' } }, {
fix: side-nav last for small screens
cerebral_cerebral
train
js
92faa18158da929ed1b618acffb5c51c1e064970
diff --git a/models/classes/webhooks/WebhookRegistryManagerInterface.php b/models/classes/webhooks/WebhookRegistryManagerInterface.php index <HASH>..<HASH> 100644 --- a/models/classes/webhooks/WebhookRegistryManagerInterface.php +++ b/models/classes/webhooks/WebhookRegistryManagerInterface.php @@ -26,5 +26,5 @@ use oat\tao\model\webhooks\configEntity\Webhook; interface WebhookRegistryManagerInterface { - public function addWebhookConfig(Webhook $webhook, string $event); + public function addWebhookConfig(Webhook $webhook, string $event): void; }
fix: addWebhookConfig is having return type
oat-sa_tao-core
train
php
7ed79e56721069e90686a52d11eb7430d4cbf96e
diff --git a/src/jquery.gridster.js b/src/jquery.gridster.js index <HASH>..<HASH> 100644 --- a/src/jquery.gridster.js +++ b/src/jquery.gridster.js @@ -114,7 +114,7 @@ * @constructor */ function Gridster(el, options) { - this.options = $.extend(true, defaults, options); + this.options = $.extend(true, {}, defaults, options); this.$el = $(el); this.$wrapper = this.$el.parent(); this.$widgets = this.$el.children(
fix(gridster): leaking options with multiple Gridster instances `defaults` was being overwritten. See [jQuery documentation](<URL>): > Keep in mind that the target object (first argument) will be modified, and will also be returned from $.extend().
ducksboard_gridster.js
train
js
d0cd76231cac91408dde94a18e3a49f49e538d10
diff --git a/packages/cozy-client/src/authentication/mobile.js b/packages/cozy-client/src/authentication/mobile.js index <HASH>..<HASH> 100644 --- a/packages/cozy-client/src/authentication/mobile.js +++ b/packages/cozy-client/src/authentication/mobile.js @@ -11,7 +11,7 @@ import { CordovaWindow } from '../types' * @type {CordovaWindow} */ // @ts-ignore -const win = window +const win = typeof window !== 'undefined' ? window : null const authenticateWithSafari = url => { return new Promise((resolve, reject) => {
fix: Do not assign window to win if window is not defined
cozy_cozy-client
train
js
8f9d039948788546fa48522d505df35bb1e510a5
diff --git a/index.js b/index.js index <HASH>..<HASH> 100644 --- a/index.js +++ b/index.js @@ -144,7 +144,7 @@ //. //. ### Variadic functions //. -//. Ramda provides several functions with take any number of arguments. These +//. Ramda provides several functions which take any number of arguments. These //. are known as [variadic functions][]. Additionally, Ramda provides several //. functions which take variadic functions as arguments. Although natural in //. a dynamically typed language, variadic functions are at odds with the type
fix(typo): `with` should be `which`
sanctuary-js_sanctuary
train
js
461d615c045623f9f2417c9e5dc1cb397aea3433
diff --git a/Gruntfile.js b/Gruntfile.js index <HASH>..<HASH> 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -107,6 +107,7 @@ module.exports = function(grunt) { ]); grunt.registerTask('release', [ + 'sauce', 'pack', 'compress', 'changelog',
chore(gruntfile): Add sauce task to release steps [skip ci]
mbenford_ngTagsInput
train
js
5f52da13ce440bedd08174316d3a467df9b69711
diff --git a/lib/rules/rules.js b/lib/rules/rules.js index <HASH>..<HASH> 100644 --- a/lib/rules/rules.js +++ b/lib/rules/rules.js @@ -35,7 +35,7 @@ var ALL_STAR_RE = /^\*{3,}$/; var STAR_RE = /\*+/g; var PORT_PATTERN_RE = /^!?:\d{1,5}$/; var QUERY_RE = /[?#].*$/; -var COMMENT_RE = /#.*$/gm; +var COMMENT_RE = /#.*$/; var CONTROL_RE = /[\u001e\u001f\u200e\u200f\u200d\u200c\u202a\u202d\u202e\u202c\u206e\u206f\u206b\u206a\u206d\u206c]/g; function domainToRegExp(all, index) { @@ -727,10 +727,9 @@ function resolveMatchFilter(list) { } function parseText(rulesMgr, text, root, append) { - text = text.replace(COMMENT_RE, '').replace(CONTROL_RE, ''); getLines(text, root).forEach(function(line) { var raw = line; - line = line.trim(); + line = line.replace(COMMENT_RE, '').replace(CONTROL_RE, '').trim(); line = line && line.split(/\s+/); var len = line && line.length; if (!len || len < 2) {
refactor: filter unicode control characters
avwo_whistle
train
js
4953161e23f9ea6cad008ad5af2f4aef7ac2bc8d
diff --git a/stellar_sdk/operation/allow_trust.py b/stellar_sdk/operation/allow_trust.py index <HASH>..<HASH> 100644 --- a/stellar_sdk/operation/allow_trust.py +++ b/stellar_sdk/operation/allow_trust.py @@ -62,9 +62,9 @@ class AllowTrust(Operation): authorize: Union[TrustLineEntryFlag, bool], source: Optional[Union[MuxedAccount, str]] = None, ) -> None: + # We keep this class to ensure that the SDK can correctly parse historical transactions. warnings.warn( - "Will be removed in version v5.0.0, " - "use `stellar_sdk.operation.set_trust_line_flags.SetTrustLineFlags` instead.", + "Use `stellar_sdk.operation.set_trust_line_flags.SetTrustLineFlags` instead.", DeprecationWarning, ) super().__init__(source)
chore: Amend the deprecation warning message of `AllowTrust`. We keep this class to ensure that the SDK can correctly parse historical transactions.
StellarCN_py-stellar-base
train
py
a12a59bc4fb5687f52510afc7a5e5e3708e018ca
diff --git a/lib/util/process-browser.js b/lib/util/process-browser.js index <HASH>..<HASH> 100644 --- a/lib/util/process-browser.js +++ b/lib/util/process-browser.js @@ -5,7 +5,7 @@ "use strict"; -exports.process = { +moudle.exports = { versions: {}, nextTick(fn) { const args = Array.prototype.slice.call(arguments, 1);
fix: process-browser.js Fix browser bundling of the `process-browser.js` since it used as `require('process').versions` so the module itself is exported and not `process` as a key
webpack_enhanced-resolve
train
js
4cc6e3b6558e110de54c69722d3d8ce7b4c82c5c
diff --git a/webpack-plugins/final-stats-writer-plugin.js b/webpack-plugins/final-stats-writer-plugin.js index <HASH>..<HASH> 100644 --- a/webpack-plugins/final-stats-writer-plugin.js +++ b/webpack-plugins/final-stats-writer-plugin.js @@ -40,10 +40,19 @@ class FinalStatsWriterPlugin { ); } - fs.writeFileSync( - this.config.outputPath, - JSON.stringify(finalStats, null, 2) - ); + try { + fs.accessSync(this.config.outputPath, fs.F_OK); + fs.writeFileSync( + this.config.outputPath, + JSON.stringify(finalStats, null, 2) + ); + } catch (error) { + console.warn( + `[FinalStatsWriterPlugin] The dist folder could not be found at ${ + this.config.outputPath + }. Check the console for errors during the webpack compilation.` + ); + } } }
chore(mc-scripts): do not hide real webpack error
commercetools_merchant-center-application-kit
train
js
e095411f3f7684b2ad96f31abb5eba3cd7fd54da
diff --git a/client/karma.js b/client/karma.js index <HASH>..<HASH> 100644 --- a/client/karma.js +++ b/client/karma.js @@ -118,17 +118,32 @@ var Karma = function (socket, iframe, opener, navigator, location) { return false } - this.result = function (result) { + this.result = function (originalResult) { + var convertedResult = {} + + // Convert all array-like objects to real arrays. + for (var propertyName in originalResult) { + if (originalResult.hasOwnProperty(propertyName)) { + var propertyValue = originalResult[propertyName] + + if (Object.prototype.toString.call(propertyValue) === '[object Array]') { + convertedResult[propertyName] = Array.prototype.slice.call(propertyValue) + } else { + convertedResult[propertyName] = propertyValue + } + } + } + if (!startEmitted) { socket.emit('start', {total: null}) startEmitted = true } if (resultsBufferLimit === 1) { - return socket.emit('result', result) + return socket.emit('result', convertedResult) } - resultsBuffer.push(result) + resultsBuffer.push(convertedResult) if (resultsBuffer.length === resultsBufferLimit) { socket.emit('result', resultsBuffer)
fix(client): don't crash if receive array-like results fixes #<I>
karma-runner_karma
train
js
eb6c688c1061be814f56848bfdcb4d5bf9761ba3
diff --git a/packages/ad/src/ad.js b/packages/ad/src/ad.js index <HASH>..<HASH> 100644 --- a/packages/ad/src/ad.js +++ b/packages/ad/src/ad.js @@ -1,6 +1,6 @@ import React, { Component } from "react"; import { Subscriber } from "react-broadcast"; -import { View } from "react-native"; +import { View, Platform } from "react-native"; import { screenWidth } from "@times-components/utils"; import { getSlotConfig, prebidConfig, getPrebidSlotConfig } from "./utils"; import adInit from "./utils/ad-init"; @@ -99,7 +99,10 @@ class Ad extends Component { ? { height: 0, width: 0 } : { height: config.maxSizes.height, - width: config.maxSizes.width + width: + Platform.OS === "ios" || Platform.OS === "android" + ? screenWidth() + : config.maxSizes.width }; const AdComponent = (
feat: make ads <I>% width on native platforms (#<I>)
newsuk_times-components
train
js
de0a1f92655897d358023121eb4dfdf443cee641
diff --git a/packages/cozy-pouch-link/src/PouchManager.js b/packages/cozy-pouch-link/src/PouchManager.js index <HASH>..<HASH> 100644 --- a/packages/cozy-pouch-link/src/PouchManager.js +++ b/packages/cozy-pouch-link/src/PouchManager.js @@ -116,12 +116,22 @@ export default class PouchManager { () => this.startReplicationLoop(), false ) + document.addEventListener( + 'offline', + () => this.stopReplicationLoop(), + false + ) + document.addEventListener( + 'online', + () => this.startReplicationLoop(), + false + ) this.listenerLaunched = true } } removeListener() { - if (this.listenerLaunched) { + if (isMobileApp() && this.listenerLaunched) { document.removeEventListener( 'pause', () => this.stopReplicationLoop(), @@ -137,6 +147,16 @@ export default class PouchManager { () => this.startReplicationLoop(), false ) + document.removeEventListener( + 'offline', + () => this.stopReplicationLoop(), + false + ) + document.removeEventListener( + 'online', + () => this.startReplicationLoop(), + false + ) this.listenerLaunched = false } }
feat: Stop Start replication when device is online/offline
cozy_cozy-client
train
js
10e2510a10c1491de29b41bad796068d809de5d6
diff --git a/packages/micro-journeys/src/utils/equalize-relative-heights.js b/packages/micro-journeys/src/utils/equalize-relative-heights.js index <HASH>..<HASH> 100644 --- a/packages/micro-journeys/src/utils/equalize-relative-heights.js +++ b/packages/micro-journeys/src/utils/equalize-relative-heights.js @@ -31,6 +31,7 @@ const validateItem = item => { */ const validateParamsForEqualizeRelativeHeights = items => { items.forEach((item, i) => { + const { container, elToEqualize, paddingEqualizationTarget } = item; if (!validateItem(item)) { throw new Error( `Element provided to equalizeRelativeHeights has no width. container: ${container.offsetWidth}, elToEqualize: ${elToEqualize.offsetWidth}, paddingEqualizationTarget: ${paddingEqualizationTarget.offsetWidth}`,
fix(micro-journeys): error code in equalizeRelativeHeights
bolt-design-system_bolt
train
js
4a8ddb71e19b7f13948b3cbcbe61ece8153ef3a0
diff --git a/examples/BoomApp/app/screens/settings/SettingsScreenClassic.js b/examples/BoomApp/app/screens/settings/SettingsScreenClassic.js index <HASH>..<HASH> 100644 --- a/examples/BoomApp/app/screens/settings/SettingsScreenClassic.js +++ b/examples/BoomApp/app/screens/settings/SettingsScreenClassic.js @@ -20,7 +20,7 @@ export default class SettingsScreenClassic extends Component { constructor(props) { super(props); this.state = { - themeIndex: ScreenService.currentThemeIndex + themeIndex: ScreenService.getCurrentThemeIndex() } } diff --git a/examples/BoomApp/app/util/ScreenService.js b/examples/BoomApp/app/util/ScreenService.js index <HASH>..<HASH> 100644 --- a/examples/BoomApp/app/util/ScreenService.js +++ b/examples/BoomApp/app/util/ScreenService.js @@ -74,7 +74,7 @@ themes[currentThemeIndex].setup(); export default ScreenService = { - currentThemeIndex, + getCurrentThemeIndex: () => currentThemeIndex, setCurrentThemeIndex: index => { currentThemeIndex = index; themes[currentThemeIndex].setup();
fix(BoomApp): fix settings screen
akveo_react-native-ui-kitten
train
js,js
8f1911fd6c13d5eeca8c2abbc2e83b9356223767
diff --git a/test/test-case-factory.js b/test/test-case-factory.js index <HASH>..<HASH> 100644 --- a/test/test-case-factory.js +++ b/test/test-case-factory.js @@ -225,10 +225,9 @@ class TestCaseFactory { _forkChild (runnerPath, args) { return new Promise((resolve, reject) => { console.log('Executing > ', runnerPath, args.join(' ')) - // const command = this._cover(runnerPath, args) - const command = {path: runnerPath, args} + const command = this._cover(runnerPath, args) const child = fork(command.path, command.args, { - stdio: [0, 'pipe', 'pipe', 'ipc'], + silent: true, cwd: this.testCasePath })
chore(build): try to fix the travis build
mucsi96_nightwatch-cucumber
train
js
7da27ced81b6d9edc78c93cbd4401025797e1bc9
diff --git a/packages/xod-client-electron/src/app/workspaceActions.js b/packages/xod-client-electron/src/app/workspaceActions.js index <HASH>..<HASH> 100644 --- a/packages/xod-client-electron/src/app/workspaceActions.js +++ b/packages/xod-client-electron/src/app/workspaceActions.js @@ -3,7 +3,7 @@ import P from 'path'; import FS from 'fs'; import EventEmitter from 'events'; -import XP from 'xod-project'; +import * as XP from 'xod-project'; import { resolvePath, writeFile,
chore(xod-client-electron): fix merging mistakes
xodio_xod
train
js
db15cd847ad07d2492d885bdf3804b8f35ef02b1
diff --git a/command/exec_test.go b/command/exec_test.go index <HASH>..<HASH> 100644 --- a/command/exec_test.go +++ b/command/exec_test.go @@ -31,7 +31,7 @@ func TestExecCommand_implements(t *testing.T) { func TestExecCommandRun(t *testing.T) { t.Parallel() cfg := agent.TestConfig() - cfg.DisableRemoteExec = &agent.BoolFalse + cfg.DisableRemoteExec = agent.Bool(false) a := agent.NewTestAgent(t.Name(), cfg) defer a.Shutdown()
test: replace one more BoolFalse with agent.Bool()
hashicorp_consul
train
go
abecaf776e474ea9122ce405596a4b8466d2b11f
diff --git a/bids/layout/index.py b/bids/layout/index.py index <HASH>..<HASH> 100644 --- a/bids/layout/index.py +++ b/bids/layout/index.py @@ -38,7 +38,12 @@ def _check_path_matches_patterns(path, patterns, root=None): # Path now can be downcast to str path = str(path) for patt in patterns: - if isinstance(patt, (str, Path)): + if isinstance(patt, Path): + patt = str( + patt if root is None + else patt.relative_to(root) + ) + if isinstance(patt, str): if str(patt) in path: return True elif patt.search(path):
fix: relativeness also affects Path patterns
bids-standard_pybids
train
py
ece9486182db705923e3f04618c5f6a37e71076d
diff --git a/pkg/helm/environment/environment.go b/pkg/helm/environment/environment.go index <HASH>..<HASH> 100644 --- a/pkg/helm/environment/environment.go +++ b/pkg/helm/environment/environment.go @@ -28,11 +28,12 @@ import ( "github.com/spf13/pflag" + "k8s.io/client-go/util/homedir" "k8s.io/helm/pkg/helm/helmpath" ) // DefaultHelmHome is the default HELM_HOME. -var DefaultHelmHome = filepath.Join("$HOME", ".helm") +var DefaultHelmHome = filepath.Join(homedir.HomeDir(), ".helm") // EnvSettings describes all of the environment settings. type EnvSettings struct {
fix(helm): home env not set on Windows When setting $HELM_HOME, only $HOME was considered. This variable is not always present on Windows.
helm_helm
train
go
f0db81d1c102859fdbc69e63d234550618a77753
diff --git a/lib/ext.js b/lib/ext.js index <HASH>..<HASH> 100644 --- a/lib/ext.js +++ b/lib/ext.js @@ -251,10 +251,10 @@ internals.onPostHandler = function (request, reply) { } if (internals.config.meta.successStatusCode) { - return reply(response).code(internals.config.meta.successStatusCode); + return reply.continue(response).code(internals.config.meta.successStatusCode); } - return reply(response); + return reply.continue(response); } return reply.continue();
fix: reply.continue instead of reply
fknop_hapi-pagination
train
js
0df8db6819b0452528fbd3efce6b8f11e147fb3b
diff --git a/test.js b/test.js index <HASH>..<HASH> 100644 --- a/test.js +++ b/test.js @@ -597,27 +597,27 @@ test('sync helper test', function(t) { )(); t.throws( instance.foo.bind(instance), - 'got promise in sync mode', + { message: 'got promise in sync mode' }, 'override throws if result is a promise' ); t.throws( instance.bar.bind(instance), - 'got promise in sync mode', + { message: 'got promise in sync mode' }, 'parallel throws if result is a promise' ); t.throws( instance.baz.bind(instance), - 'got promise in sync mode', + { message: 'got promise in sync mode' }, 'pipe throws if result is a promise' ); t.throws( instance.qux.bind(instance), - 'got promise in sync mode', + { message: 'got promise in sync mode' }, 'sequence throws if result is a promise' ); t.throws( instance.quz.bind(instance), - 'got promise in sync mode', + { message: 'got promise in sync mode' }, 'compose throws if result is a promise' ); });
refactor: update to new ava throws syntax AVA 3 requires throws assertions to have an expectations object instead of string or regexp to match against.
untool_mixinable
train
js
9c2ffe9759430d6da8b2b2f6ea8141e4c56ed5c3
diff --git a/topologies/replset.js b/topologies/replset.js index <HASH>..<HASH> 100644 --- a/topologies/replset.js +++ b/topologies/replset.js @@ -1022,7 +1022,6 @@ ReplSet.prototype.destroy = function(options) { // Clear out all monitoring for (var i = 0; i < this.intervalIds.length; i++) { this.intervalIds[i].stop(); - this.intervalIds[i].stop(); } // Reset list of intervalIds
chore(topology): removing double timeout clear This was accidentally introduced during the following refactor: cd<I>d<I>f<I>ad<I>c6a<I>ffcfa<I>d1e7d3a2
mongodb_node-mongodb-native
train
js
8fe300325c793994cfd7e6a508b6185df05b0684
diff --git a/src/Search/Bitap/convertMaskToIndices.php b/src/Search/Bitap/convertMaskToIndices.php index <HASH>..<HASH> 100644 --- a/src/Search/Bitap/convertMaskToIndices.php +++ b/src/Search/Bitap/convertMaskToIndices.php @@ -27,7 +27,7 @@ function convertMaskToIndices(array $matchmask = [], ?int $minMatchCharLength = } // (i-1 - start) + 1 => i - start - if ($matchmask[$i - 1] ?? false && $i - $start >= $minMatchCharLength) { + if (($matchmask[$i - 1] ?? false) && $i - $start >= $minMatchCharLength) { $indices[] = [$start, $i - 1]; }
fix: wrap ?? operation in paranthese to following precede && operator
Loilo_Fuse
train
php
04206fb6ad7eeba96d27388ef0c37823c3e775ac
diff --git a/test/engine_fs_test.go b/test/engine_fs_test.go index <HASH>..<HASH> 100644 --- a/test/engine_fs_test.go +++ b/test/engine_fs_test.go @@ -548,6 +548,7 @@ func (e *fsEngine) InitTest(ver libkbfs.MetadataVer, uids[0] = nameToUID(e.tb, config0) for i, name := range users[1:] { c := libkbfs.ConfigAsUser(config0, name) + setBlockSizes(e.tb, c, blockSize, blockChangeSize) c.SetClock(clock) cfgs[i+1] = c uids[i+1] = nameToUID(e.tb, c) diff --git a/test/engine_libkbfs.go b/test/engine_libkbfs.go index <HASH>..<HASH> 100644 --- a/test/engine_libkbfs.go +++ b/test/engine_libkbfs.go @@ -63,6 +63,7 @@ func (k *LibKBFS) InitTest(ver libkbfs.MetadataVer, // create the rest of the users as copies of the original config for _, name := range users[1:] { c := libkbfs.ConfigAsUser(config, name) + setBlockSizes(k.tb, c, blockSize, blockChangeSize) c.SetClock(clock) userMap[name] = c k.refs[c] = make(map[libkbfs.Node]bool)
test: DSL tests didn't set block sizes for subsequent users Oops!
keybase_client
train
go,go
b581e7a8a86b5205aa0fcfdee6c3a9ece8bbe5e4
diff --git a/react/MuiCozyTheme/theme.js b/react/MuiCozyTheme/theme.js index <HASH>..<HASH> 100644 --- a/react/MuiCozyTheme/theme.js +++ b/react/MuiCozyTheme/theme.js @@ -83,7 +83,8 @@ const makeTypography = palette => ({ caption: { fontSize: 12, lineHeight: 1.313, - color: palette.text.secondary + color: palette.text.secondary, + display: 'block' } })
feat: Force caption to display as block MUI changed the default display of captions, they no longer as blocks by default, leading to bad margins. Let's force captions to be blocks
cozy_cozy-ui
train
js
7e657745b319ec7540ee04c9a38c7a7db5c7337a
diff --git a/src/trumbowyg.js b/src/trumbowyg.js index <HASH>..<HASH> 100644 --- a/src/trumbowyg.js +++ b/src/trumbowyg.js @@ -681,6 +681,7 @@ Object.defineProperty(jQuery.trumbowyg, 'defaultOptions', { setTimeout(function () { t.semanticCode(false, true); t.$c.trigger('tbwpaste', e); + t.$c.trigger('tbwchange'); }, 0); });
fix: trigger tbwchange even on tbwpaste fix #<I>
Alex-D_Trumbowyg
train
js
ca6c0113d4d908594bb162d64ee8e73319f96cf6
diff --git a/packages/core/elements/index.js b/packages/core/elements/index.js index <HASH>..<HASH> 100644 --- a/packages/core/elements/index.js +++ b/packages/core/elements/index.js @@ -5,20 +5,20 @@ polyfillLoader.then(res => { import(/* webpackMode: 'eager', webpackChunkName: 'replace-with-children' - */ '@bolt/core/elements/replace-with-children'); + */ './replace-with-children'); } if (!window.customElements.get('replace-with-grandchildren')) { import(/* webpackMode: 'eager', webpackChunkName: 'replace-with-grandchildren' - */ '@bolt/core/elements/replace-with-grandchildren'); + */ './replace-with-grandchildren'); } if (!window.customElements.get('bolt-action')) { import(/* webpackMode: 'eager', webpackChunkName: 'bolt-action' - */ '@bolt/core/elements/bolt-action'); + */ './bolt-action'); } });
refactor: update Bolt core's element import to use local paths (since we're already in Bolt core)
bolt-design-system_bolt
train
js
08bea734c9c737f89730669336ce0b0d038a57b4
diff --git a/lib/client/bundler/index.js b/lib/client/bundler/index.js index <HASH>..<HASH> 100644 --- a/lib/client/bundler/index.js +++ b/lib/client/bundler/index.js @@ -161,7 +161,7 @@ module.exports = function(ss,options) { return f.substring(0,6) === 'index.'; } function diskToRequire(rel) { - return '/' + rel.replace('\\','/').replace('/./','/'); //TODO drop last replace + return '/' + rel.replace(/\\/g,'/'); } for(var i = 0,rel; (rel = client.paths.code[i]); ++i) {
fix(windows): proper windows separator replacement
socketstream_socketstream
train
js
33ac259d66c90e96489d0512ac762f969458f5bd
diff --git a/src/components/autocomplete/js/highlightController.js b/src/components/autocomplete/js/highlightController.js index <HASH>..<HASH> 100644 --- a/src/components/autocomplete/js/highlightController.js +++ b/src/components/autocomplete/js/highlightController.js @@ -4,7 +4,7 @@ angular function MdHighlightCtrl ($scope, $element, $interpolate) { var term = $element.attr('md-highlight-text'), - text = $interpolate($element.text())($scope), + text = $interpolate($element.html())($scope), flags = $element.attr('md-highlight-flags') || '', watcher = $scope.$watch(term, function (term) { var regex = getRegExp(term, flags),
fix(autocomplete): pulls in text content as HTML to prevent it from being un-escaped
angular_material
train
js
c66a6450c6b8a36d0a9036ffee4034c5f63f91b4
diff --git a/lib/comm/receiver.js b/lib/comm/receiver.js index <HASH>..<HASH> 100644 --- a/lib/comm/receiver.js +++ b/lib/comm/receiver.js @@ -10,8 +10,7 @@ class Receiver { try { this.handleMessage(this.parseMessage(event.data)); } catch (e) { - console.log(e.message); - console.log('Message received:', event.data); + return; } }); }
feat(receiver): remove console log
emartech_emarsys-integration-client-js
train
js
bb2c22760cef1fd8f879e434562c46a1593d4f9b
diff --git a/spotinst/client.go b/spotinst/client.go index <HASH>..<HASH> 100644 --- a/spotinst/client.go +++ b/spotinst/client.go @@ -18,10 +18,10 @@ type Client struct { // User agent for client UserAgent string - // Spotinst makes a call to an authorization API using your username and - // password, returning an 'Access Token' and a 'Refresh Token'. - // Our use case does not require the refresh token, but we should implement - // for completeness. + // Spotinst makes a call to an authorization API using your username and + // password, returning an 'Access Token' and a 'Refresh Token'. + // Our use case does not require the refresh token, but we should implement + // for completeness. AccessToken string RefreshToken string
fix(client): indent comments
spotinst_spotinst-sdk-go
train
go
477f23f3c0aeeba6d906ec5d30273c97f30be3af
diff --git a/okdownload/src/main/java/com/liulishuo/okdownload/core/dispatcher/DownloadDispatcher.java b/okdownload/src/main/java/com/liulishuo/okdownload/core/dispatcher/DownloadDispatcher.java index <HASH>..<HASH> 100644 --- a/okdownload/src/main/java/com/liulishuo/okdownload/core/dispatcher/DownloadDispatcher.java +++ b/okdownload/src/main/java/com/liulishuo/okdownload/core/dispatcher/DownloadDispatcher.java @@ -258,7 +258,7 @@ public class DownloadDispatcher { } for (DownloadCall call : runningSyncCalls) { - if (call.task == task|| call.task.getId() == task.getId()) { + if (call.task == task || call.task.getId() == task.getId()) { needCallbackCalls.add(call); needCancelCalls.add(call); return;
chore: fix stylecheck issue on download-dispatcher
lingochamp_okdownload
train
java
e5b93a0b4a2b0da4758f0e7010e7f8ef364b9812
diff --git a/tests/ast/test_folding.py b/tests/ast/test_folding.py index <HASH>..<HASH> 100644 --- a/tests/ast/test_folding.py +++ b/tests/ast/test_folding.py @@ -108,6 +108,8 @@ builtins_modified = [ "def foo(bar: int128 = MAX_INT128): pass", "def foo(): bar = MAX_INT128", "def foo(): return MAX_INT128", + "log.foo(MAX_INT128)", + "log.foo(42, MAX_INT128)", ] @@ -127,6 +129,7 @@ builtins_unmodified = [ "def foo(MAX_INT128: int128 = 42): pass", "def foo(): MAX_INT128 = 42", "def MAX_INT128(): pass", + "log.MAX_INT128(42)", ]
test: constants as call args
ethereum_vyper
train
py
8dcd854bc25575d71224b3b5dc99e559a0318278
diff --git a/lib/line-header.js b/lib/line-header.js index <HASH>..<HASH> 100644 --- a/lib/line-header.js +++ b/lib/line-header.js @@ -106,7 +106,14 @@ class LineHeader extends stream.Transform { this.checks.forEach(function (check) { let err = check(fieldData); if (err) { - this.emit("error", err); + if (!data.error) { + data.error = []; + } + if (Array.isArray(err)) { + data.error.push.apply(err); + } else { + data.error.push(err); + } } }); @@ -120,12 +127,19 @@ class LineHeader extends stream.Transform { } } - this.emit("header", header); + this.emit('header', header); if (this.mandatoryColumnCheck) { let err = this.mandatoryColumnCheck(foundColumns); if (err) { - this.emit("error", err); + if (!data.error) { + data.error = []; + } + if (Array.isArray(err)) { + data.error.push.apply(err); + } else { + data.error.push(err); + } } } }
fix: The errors will now be embedded into the data stream.
Kronos-Integration_kronos-interceptor-line-header
train
js
da61e2d784f89bf4860386e9d07a8f2757c13024
diff --git a/packages/article-summary/src/article-summary-headline.js b/packages/article-summary/src/article-summary-headline.js index <HASH>..<HASH> 100644 --- a/packages/article-summary/src/article-summary-headline.js +++ b/packages/article-summary/src/article-summary-headline.js @@ -1,5 +1,5 @@ import React from "react"; -import { Text } from "react-native"; +import { Text, Platform } from "react-native"; import PropTypes from "prop-types"; import styles from "./styles"; @@ -9,6 +9,7 @@ const ArticleSummaryHeadline = ({ className, headline, style }) => ( <Text accessibilityRole="header" aria-level="3" + allowFontScaling={Platform.OS === "ios"} className={className} style={[styles.headline, styles.headlineWrapper, style]} >
fix: (REPLAT-<I>) disable fontSizing on article headlines (#<I>)
newsuk_times-components
train
js
13f329aeaf713fb87a62c1d0c390959cea4d58e5
diff --git a/packages/create-resolve-app/bin/index.js b/packages/create-resolve-app/bin/index.js index <HASH>..<HASH> 100755 --- a/packages/create-resolve-app/bin/index.js +++ b/packages/create-resolve-app/bin/index.js @@ -11,7 +11,7 @@ const EOL = require('os').EOL const optionDefinitions = [ { name: 'scripts', type: String }, - { name: 'sample', type: Boolean }, + { name: 'todo', type: Boolean }, { name: 'exact-versions', type: Boolean }, { name: 'version', alias: 'V', type: Boolean }, { name: 'help', alias: 'h', type: Boolean } @@ -20,7 +20,7 @@ const optionDefinitions = [ const optionsInfo = `Options:${EOL}` + EOL + - ' --sample creates a single page application representing a typical Todo List' + + ' --todo creates a single page application representing a typical Todo List' + EOL + ` -V, --version outputs the version number${EOL}` + ` -h, --help outputs usage information${EOL}` @@ -77,7 +77,7 @@ if (unknownOptions && unknownOptions.length) { moduleCreator( appName, options.scripts, - !options.sample, + !options.todo, resolveVersion, !!options['exact-versions'] )
fix(create-resolve-app): rename sample -> todo (#<I>)
reimagined_resolve
train
js
e9834daa3116ccf1c63887543ca8acd2b3eef355
diff --git a/src/transport/tcp/tcpConnection.js b/src/transport/tcp/tcpConnection.js index <HASH>..<HASH> 100644 --- a/src/transport/tcp/tcpConnection.js +++ b/src/transport/tcp/tcpConnection.js @@ -153,11 +153,22 @@ TcpConnection.createConnectingConnection = function( connection._initSocket(socket); if (onConnectionEstablished) onConnectionEstablished(connection); }); + var timer = setTimeout(function(){ + log.error('TcpConnection: timeout when connecting to %j in %d ms', remoteEndPoint, connectionTimeout); + connection.close(); + if (onConnectionFailed) onConnectionFailed(connection, new Error('Connection failed')); + }, connectionTimeout) socket.once('error', onError); function onError(err) { + clearTimeout(timer); if (onConnectionFailed) onConnectionFailed(connection, err); } + socket.once('connect', onConnect); + function onConnect() { + log.info('TcpConnection: successfully connected to %j', remoteEndPoint); + clearTimeout(timer); + } return connection; }; -module.exports = TcpConnection; \ No newline at end of file +module.exports = TcpConnection;
feat(tcp): add timeout when trying to connect to a TCP endpoint * the timeout parameters in options will trigger a timeout only when the socket is connected (cf. <URL>
nicdex_node-eventstore-client
train
js
26fdd39b7d555795e0bff63f10ef5eb858f6e5da
diff --git a/src/Controller/Admin.php b/src/Controller/Admin.php index <HASH>..<HASH> 100644 --- a/src/Controller/Admin.php +++ b/src/Controller/Admin.php @@ -5,8 +5,16 @@ namespace Phwoolcon\Controller; use Phwoolcon\Config; use Phwoolcon\Controller; use Phwoolcon\Session; +use Phwoolcon\View; -abstract class Admin extends Controller +/** + * Class Admin + * @package Phwoolcon\Controller + * + * @property View $view + * @method Controller addPageTitle(string $title) + */ +trait Admin { public function initialize() diff --git a/src/Controller/Api.php b/src/Controller/Api.php index <HASH>..<HASH> 100644 --- a/src/Controller/Api.php +++ b/src/Controller/Api.php @@ -2,10 +2,9 @@ namespace Phwoolcon\Controller; -use Phwoolcon\Controller; use Phwoolcon\Router; -abstract class Api extends Controller +trait Api { public function initialize()
refactor: change admin/api controller class to trait
phwoolcon_phwoolcon
train
php,php
85884e3521287bb5b0a744622beba89c236e5492
diff --git a/packages/analytics-core/src/analytics.js b/packages/analytics-core/src/analytics.js index <HASH>..<HASH> 100644 --- a/packages/analytics-core/src/analytics.js +++ b/packages/analytics-core/src/analytics.js @@ -217,6 +217,11 @@ export default class AvAnalytics { }; trackPageView = url => { + // hashchanges are an object so we want to grab the new url from it + if (typeof url === 'object') { + url = url.newURL; + } + url = url || window.location.href; const promises = []; this.plugins.forEach(plugin => {
refactor(analytics-core): fixed issue with hashchange not having proper url
Availity_sdk-js
train
js
5bd3178f666892ef3e0f0aff1d5ea78247bccb25
diff --git a/webapps/client/scripts/pages/userEdit.js b/webapps/client/scripts/pages/userEdit.js index <HASH>..<HASH> 100644 --- a/webapps/client/scripts/pages/userEdit.js +++ b/webapps/client/scripts/pages/userEdit.js @@ -152,7 +152,9 @@ define([ 'angular', 'require' ], function(angular, require) { }; $scope.removeGroup = function(groupId) { - var encodedGroupId = groupId.replace(/\//g, '%2F'); + var encodedGroupId = groupId + .replace(/\//g, '%2F') + .replace(/\\/g, '%5C'); GroupMembershipResource.delete({'userId':$scope.encodedUserId, 'groupId': encodedGroupId}).$promise.then( function(){ Notifications.addMessage({type:'success', status:'Success', message:'User '+$scope.user.id+' removed from group.'});
fix(groups): allow to remove group with backslashes from user related to #CAM-<I>
camunda_camunda-bpm-platform
train
js
897b6561f137a965f435f8466591781339f96af9
diff --git a/generators/newapp/new.go b/generators/newapp/new.go index <HASH>..<HASH> 100644 --- a/generators/newapp/new.go +++ b/generators/newapp/new.go @@ -146,21 +146,21 @@ services: {{ end -}} before_script: - {{ if eq .dbType "postgres" -}} - - psql -c 'create database {{.name}}_test;' -U postgres - {{ end -}} - - mkdir -p $TRAVIS_BUILD_DIR/public/assets +{{ if eq .dbType "postgres" -}} + - psql -c 'create database {{.name}}_test;' -U postgres +{{ end -}} + - mkdir -p $TRAVIS_BUILD_DIR/public/assets go_import_path: {{.packagePath}} install: - go get github.com/gobuffalo/buffalo/buffalo - {{ if .withDep -}} +{{ if .withDep -}} - go get github.com/golang/dep/cmd/dep - dep ensure - {{ else -}} - - go get $(go list ./... | grep -v /vendor/) - {{ end -}} +{{ else -}} + - go get $(go list ./... | grep -v /vendor/) +{{ end -}} script: buffalo test `
fix: remove mixed tabs and spaces from .travis.yml template Travis CI builds for new projects fail because of tabs in the generated .travis.yml file
gobuffalo_buffalo
train
go
0d0349744567847b5e09dbc3b1577387fd7ce1a2
diff --git a/lib/tunnel.js b/lib/tunnel.js index <HASH>..<HASH> 100644 --- a/lib/tunnel.js +++ b/lib/tunnel.js @@ -48,6 +48,9 @@ function tunnelProxy(server, proxy) { var useTunnelPolicy = policy == 'tunnel'; var isLocalUIUrl = !useTunnelPolicy && (config.isLocalUIUrl(hostname) || config.isPluginUrl(hostname)); var _rules = req.rules = (isICloundCKDB || isLocalUIUrl) ? {} : rules.initRules(req); + if (!isLocalUIUrl && util.isLocalAddress(hostname)) { + isLocalUIUrl = options.port == config.port || options.port == config.uiport; + } rules.resolveRulesFile(req, function() { var filter = req.filter; var disable = req.disable;
feat: auto intecept the https request of local webui
avwo_whistle
train
js
ec0fee620843cf8f878d19a00d44c016cc2323ab
diff --git a/cmd/erasure-server-pool.go b/cmd/erasure-server-pool.go index <HASH>..<HASH> 100644 --- a/cmd/erasure-server-pool.go +++ b/cmd/erasure-server-pool.go @@ -900,7 +900,11 @@ func (z *erasureServerPools) DeleteObjects(ctx context.Context, bucket string, o defer multiDeleteLock.Unlock(lkctx.Cancel) if z.SinglePool() { - return z.serverPools[0].DeleteObjects(ctx, bucket, objects, opts) + deleteObjects, dErrs := z.serverPools[0].DeleteObjects(ctx, bucket, objects, opts) + for i := range deleteObjects { + deleteObjects[i].ObjectName = decodeDirObject(deleteObjects[i].ObjectName) + } + return deleteObjects, dErrs } // Fetch location of up to 10 objects concurrently. @@ -954,6 +958,7 @@ func (z *erasureServerPools) DeleteObjects(ctx context.Context, bucket string, o if derr != nil { derrs[orgIndexes[i]] = derr } + deletedObjects[i].ObjectName = decodeDirObject(deletedObjects[i].ObjectName) dobjects[orgIndexes[i]] = deletedObjects[i] } mu.Unlock()
fix: the returned object key when object is directory (#<I>)
minio_minio
train
go
c438a362ac13e2168325741912e887f397b61342
diff --git a/docs/lib/jsdoc/merge_params.js b/docs/lib/jsdoc/merge_params.js index <HASH>..<HASH> 100644 --- a/docs/lib/jsdoc/merge_params.js +++ b/docs/lib/jsdoc/merge_params.js @@ -1,7 +1,7 @@ 'use strict'; exports.defineTags = function(dictionary) { - dictionary.defineTag('merge-props', { + dictionary.defineTag('mergeProps', { mustHaveValue: true, canHaveName: true, onTagged: function(doclet, tag) { @@ -10,7 +10,7 @@ exports.defineTags = function(dictionary) { } }); - dictionary.defineTag('merge-params', { + dictionary.defineTag('mergeParams', { mustHaveValue: true, canHaveType: true, canHaveName: true,
docs(merge): update tags for merge operations to be camelCase Done for syntax highlighting
mongodb_node-mongodb-native
train
js
d7d9623740eb40a586fcb55f83ce6c301de5ba38
diff --git a/lib/Downloader.js b/lib/Downloader.js index <HASH>..<HASH> 100644 --- a/lib/Downloader.js +++ b/lib/Downloader.js @@ -65,7 +65,7 @@ class Downloader { * @param {string} downloadHost */ setDownloadHost(downloadHost) { - this._downloadHost = downloadHost; + this._downloadHost = downloadHost.replace(/\/+$/, ''); } /**
fix: downloader host fault tolerance (#<I>) Strip trailing slashes from Downloader download host.
GoogleChrome_puppeteer
train
js
54038e85d2976b09c96ef099a3d8732e91734c8b
diff --git a/src/main/index.js b/src/main/index.js index <HASH>..<HASH> 100644 --- a/src/main/index.js +++ b/src/main/index.js @@ -109,11 +109,14 @@ export function createSplashSubscriber() { height: 400, title: 'loading', frame: false, + show: false }); const index = join(__dirname, '..', '..', 'static', 'splash.html'); win.loadURL(`file://${index}`); - win.show(); + win.once('ready-to-show', () => { + win.show(); + }); }, null, () => { // Close the splash page when completed
fix(splash): Show splash window gracefully
nteract_nteract
train
js
505ce2372c708460bf5ed47712412c72f605e095
diff --git a/cmd/influx/main.go b/cmd/influx/main.go index <HASH>..<HASH> 100644 --- a/cmd/influx/main.go +++ b/cmd/influx/main.go @@ -157,10 +157,12 @@ func influxCmd(opts ...genericCLIOptFn) *cobra.Command { } fOpts.mustRegister(cmd) - // this is after the flagOpts register b/c we don't want to show the default value - // in the usage display. This will add it as the token value, then if a token flag - // is provided too, the flag will take precedence. - flags.token = getTokenFromDefaultPath() + if flags.token != "" { + // this is after the flagOpts register b/c we don't want to show the default value + // in the usage display. This will add it as the token value, then if a token flag + // is provided too, the flag will take precedence. + flags.token = getTokenFromDefaultPath() + } cmd.PersistentFlags().BoolVar(&flags.local, "local", false, "Run commands locally against the filesystem") cmd.PersistentFlags().BoolVar(&flags.skipVerify, "skip-verify", false, "SkipVerify controls whether a client verifies the server's certificate chain and host name.")
fix(influx): fix issue with locla state overriding env vars for token closes: #<I>
influxdata_influxdb
train
go
33d8578c8302fbd45946294069c67adf68f4f189
diff --git a/api/graph.go b/api/graph.go index <HASH>..<HASH> 100644 --- a/api/graph.go +++ b/api/graph.go @@ -37,13 +37,13 @@ type GraphAccessKey struct { // GraphComposite defines a composite type GraphComposite struct { - Axis string `json:"axis,omitempty"` // string - Color string `json:"color,omitempty"` // string - DataFormula *string `json:"data_formula,omitempty"` // string or null - Hidden bool `json:"hidden,omitempty"` // boolean - LegendFormula *string `json:"legend_formula,omitempty"` // string or null - Name string `json:"name,omitempty"` // string - Stack *uint `json:"stack,omitempty"` // uint or null + Axis string `json:"axis"` // string + Color string `json:"color"` // string + DataFormula *string `json:"data_formula"` // string or null + Hidden bool `json:"hidden"` // boolean + LegendFormula *string `json:"legend_formula"` // string or null + Name string `json:"name"` // string + Stack *uint `json:"stack"` // uint or null } // GraphDatapoint defines a datapoint
fix: several of these composite fields are required and should not be omitempty
circonus-labs_circonus-gometrics
train
go
f756bbd94be194723b084f73cbae5a813caa8a20
diff --git a/src/DependencyInjection/JWTAuthExtension.php b/src/DependencyInjection/JWTAuthExtension.php index <HASH>..<HASH> 100644 --- a/src/DependencyInjection/JWTAuthExtension.php +++ b/src/DependencyInjection/JWTAuthExtension.php @@ -55,7 +55,9 @@ class JWTAuthExtension extends Extension if (isset($config['validations'])) { if (array_key_exists('azp', $config['validations'])) { if (! empty($config['validations']['azp'])) { - $validations['azp'] = $config['validations']['azp']; + if (true !== $config['validations']['azp']) { + $validations['azp'] = $config['validations']['azp']; + } } else { $validations['azp'] = null; } @@ -63,7 +65,9 @@ class JWTAuthExtension extends Extension if (array_key_exists('aud', $config['validations'])) { if (! empty($config['validations']['aud'])) { - $validations['aud'] = $config['validations']['aud']; + if (true !== $config['validations']['aud']) { + $validations['aud'] = $config['validations']['aud']; + } } else { $validations['aud'] = null; }
feat: Passing true for azp and aud jwt validators will use default values from client_id and audience
auth0_jwt-auth-bundle
train
php
1b777ef837735983ed709a648afc177f4f4351b4
diff --git a/src/playbacks/html5_video/html5_video.js b/src/playbacks/html5_video/html5_video.js index <HASH>..<HASH> 100644 --- a/src/playbacks/html5_video/html5_video.js +++ b/src/playbacks/html5_video/html5_video.js @@ -356,8 +356,7 @@ export default class HTML5Video extends Playback { this._bufferingState = buffering if (buffering) { this.trigger(Events.PLAYBACK_BUFFERING, this.name) - } - else { + } else { this.trigger(Events.PLAYBACK_BUFFERFULL, this.name) } }
style(html5_video): fix wrong else indentation on _handleBufferingEvents
clappr_clappr
train
js
2a59235749593ac5ff0897ccc2f39f29dbfc9415
diff --git a/collapsible-motion/collapsible-motion.js b/collapsible-motion/collapsible-motion.js index <HASH>..<HASH> 100644 --- a/collapsible-motion/collapsible-motion.js +++ b/collapsible-motion/collapsible-motion.js @@ -14,6 +14,7 @@ const createOpeningAnimation = height => keyframes` overflow: hidden; } 100% { + height: auto; overflow: visible; } `;
fix(collapsible-motion): readds height: auto to css animation
commercetools_ui-kit
train
js
502482f077dc2c60159c657d0788fc408742fcc5
diff --git a/lib/index.js b/lib/index.js index <HASH>..<HASH> 100644 --- a/lib/index.js +++ b/lib/index.js @@ -112,7 +112,10 @@ module.exports = co.wrap(function*(name, opts = {}) { packageInfo[pkg.name] = pkg // Save package info for caching config.externals = config.externals.concat( - pkg.peerDependencies ? Object.keys(pkg.peerDependencies) : [] + pkg.peerDependencies ? Object.keys(pkg.peerDependencies).filter(name => { + // Don't include packages in the `externals` if they are also in `entry` + return parsed.every(parsedPkg => parsedPkg.name !== name) + }) : [] ) }) })
fix: don't install peerDeps if they are used in entry
egoist_package-size
train
js
11f0e10e15b45892066506e77630f4d6237ae390
diff --git a/src/choose-blueprint-updates.js b/src/choose-blueprint-updates.js index <HASH>..<HASH> 100644 --- a/src/choose-blueprint-updates.js +++ b/src/choose-blueprint-updates.js @@ -34,14 +34,14 @@ async function chooseBlueprint({ } /** - * Facilitate prompting the user for which bllueprint that want to update + * Facilitate prompting the user for which bllueprint they want to update * - * @param cwd - * @param emberCliUpdateJson - * @param reset - * @param compare - * @param codemods - * @param to + * @param {string} cwd - Used in `checkForBlueprintUpdates` in order to generate url or path to it if on local disk + * @param {object} emberCliUpdateJson - Use the `blueprints` property from this + * @param {boolean} reset - Optional + * @param {boolean} compare - Optional + * @param {boolean} codemods - Optional + * @param {string} to - Optional (could be undefined). * @returns {Promise<{blueprint: (*|{}), areAllUpToDate, to: string}>} */ async function chooseBlueprintUpdates({
docs: more param docs
ember-cli_ember-cli-update
train
js
62cd251327ca5618feb75cf77df84fae8b1aa057
diff --git a/src/sku/components/SkuRowItem.js b/src/sku/components/SkuRowItem.js index <HASH>..<HASH> 100644 --- a/src/sku/components/SkuRowItem.js +++ b/src/sku/components/SkuRowItem.js @@ -47,9 +47,8 @@ export default createComponent({ genImage(classPrefix) { const { imgUrl } = this; - - if (imgUrl && this.largePicturePreview) { - if (this.lazyLoad) { + if (imgUrl) { + if (this.largePicturePreview && this.lazyLoad) { return ( <img class={`${classPrefix}-img`} src={imgUrl} vLazy={imgUrl} /> ); @@ -83,7 +82,13 @@ export default createComponent({ /> )} {this.genImage(classPrefix)} - <span class={`${classPrefix}-name`}>{this.skuValue.name}</span> + <div class={`${classPrefix}-name`}> + <span + class={this.largePicturePreview ? 'van-multi-ellipsis--l2' : ''} + > + {this.skuValue.name} + </span> + </div> </span> ); },
fix(Sku): small image mode and text ellipsis (#<I>)
youzan_vant
train
js
49622c9bff08a6c7f395845a5a3e9ac5fc570c14
diff --git a/packages/www/gulpfile.js b/packages/www/gulpfile.js index <HASH>..<HASH> 100644 --- a/packages/www/gulpfile.js +++ b/packages/www/gulpfile.js @@ -58,8 +58,7 @@ gulp.task("docs:dist", () => { gulp.task("docs:index", () => { return gulp .src([ - "dist/*.html", - "dist/*.ico" + "dist/*.html" ]) .pipe(gulp.dest(".")); });
chore(www): `docs` task doesn't need to copy `*.ico` anymore.
randytarampi_me
train
js
42a7f833135cc8ead4bb865fc95b98543bc8fe3d
diff --git a/src/lib/Component/LinkComponent.php b/src/lib/Component/LinkComponent.php index <HASH>..<HASH> 100644 --- a/src/lib/Component/LinkComponent.php +++ b/src/lib/Component/LinkComponent.php @@ -49,6 +49,7 @@ class LinkComponent implements Renderable $this->twig = $twig; $this->href = $href; $this->type = $type; + $this->rel = $rel; $this->crossorigin = $crossorigin; $this->integrity = $integrity; }
fix: add missing rel handling to Link component
ezsystems_ezplatform-admin-ui
train
php
d1e0babcf616727164e45dc55e176f1cda5f1203
diff --git a/src/Models/Killmails/KillmailAttacker.php b/src/Models/Killmails/KillmailAttacker.php index <HASH>..<HASH> 100644 --- a/src/Models/Killmails/KillmailAttacker.php +++ b/src/Models/Killmails/KillmailAttacker.php @@ -127,7 +127,7 @@ class KillmailAttacker extends Model // generate unique hash for the model based on attacker meta-data self::creating(function ($model) { - $model->hash = md5(serialize([ + $model->attacker_hash = md5(serialize([ $model->character_id, $model->corporation_id, $model->alliance_id,
fix(kills): Update column to store unique hash.
eveseat_eveapi
train
php
6dbd28fc405d066da6a36027313708bb33b948c5
diff --git a/tests/integration/uncategorized/uncategorized.test.js b/tests/integration/uncategorized/uncategorized.test.js index <HASH>..<HASH> 100644 --- a/tests/integration/uncategorized/uncategorized.test.js +++ b/tests/integration/uncategorized/uncategorized.test.js @@ -64,3 +64,26 @@ describe('noPrependStageInUrl tests', () => { expect(json.statusCode).toEqual(404) }) }) + +describe('prefix options', () => { + // init + beforeAll(() => + setup({ + servicePath: resolve(__dirname), + args: ['--prefix', 'someprefix'], + }), + ) + + // cleanup + afterAll(() => teardown()) + + describe('when the prefix option is used', () => { + test('the prefixed path should return a payload', async () => { + const url = joinUrl(TEST_BASE_URL, '/someprefix/dev/uncategorized-1') + const response = await fetch(url) + const json = await response.json() + + expect(json).toEqual({ foo: 'bar' }) + }) + }) +})
chore(tests): Add integration test for prefix option
dherault_serverless-offline
train
js
5cb03c94ae359737fde46770e5fa8f5966cb73f8
diff --git a/lib/workers/repository/error.js b/lib/workers/repository/error.js index <HASH>..<HASH> 100644 --- a/lib/workers/repository/error.js +++ b/lib/workers/repository/error.js @@ -83,6 +83,7 @@ async function handleError(config, err) { err, message: err.message, body: err.response ? err.response.body : undefined, + stack: err.stack, }, `Repository has unknown error` );
fix: log stack trace for unknown errors
renovatebot_renovate
train
js
9c74e93a27e5e3c3033befc22df84ea182d0125e
diff --git a/lib/manager/composer/artifacts.js b/lib/manager/composer/artifacts.js index <HASH>..<HASH> 100644 --- a/lib/manager/composer/artifacts.js +++ b/lib/manager/composer/artifacts.js @@ -69,7 +69,7 @@ async function getArtifacts( const envVars = ['COMPOSER_CACHE_DIR']; cmd += envVars.map(e => `-e ${e} `); cmd += `-w ${cwd} `; - cmd += `composer:1.7.2`; + cmd += `renovate/composer composer`; } else { logger.info('Running composer via global composer'); cmd = 'composer';
refactor(composer): use renovate/composer docker image
renovatebot_renovate
train
js
a567869e213f0d5d46875e86bb59e1198e29040a
diff --git a/client/js/traditional/traditional.form.upload.handler.js b/client/js/traditional/traditional.form.upload.handler.js index <HASH>..<HASH> 100644 --- a/client/js/traditional/traditional.form.upload.handler.js +++ b/client/js/traditional/traditional.form.upload.handler.js @@ -52,7 +52,7 @@ qq.traditional.FormUploadHandler = function(options, proxy) { */ function createForm(id, iframe) { var params = options.paramsStore.get(id), - method = "POST", + method = options.method.toLowerCase() === "get" ? "GET" : "POST", endpoint = options.endpointStore.get(id), name = getName(id);
chore(form-uploads): allow "upload" via GET for gh-pages demo #<I>
FineUploader_fine-uploader
train
js
3928f70065f3a802270182d1f0251deb317d4416
diff --git a/packages/plugin-csl/src/engines.js b/packages/plugin-csl/src/engines.js index <HASH>..<HASH> 100644 --- a/packages/plugin-csl/src/engines.js +++ b/packages/plugin-csl/src/engines.js @@ -27,6 +27,20 @@ for (const format in CSL.Output.Formats) { // END /** + * @access private + * @param {String} lang - language code + * @return {String} locale XML + */ +function retrieveLocale (lang) { + const unnormalised = lang.replace('-', '_') + if (locales.has(lang)) { + return locales.get(lang) + } else if (locales.has(unnormalised)) { + return locales.get(unnormalised) + } +} + +/** * Object containing CSL Engines * * @access private @@ -79,7 +93,7 @@ const prepareEngine = function (data, templateName, language, format) { const template = templates.get(templates.has(templateName) ? templateName : 'apa') language = locales.has(language) ? language : 'en-US' - const engine = fetchEngine(templateName, language, template, key => items[key], locales.get.bind(locales)) + const engine = fetchEngine(templateName, language, template, key => items[key], retrieveLocale) engine.setOutputFormat(format) return engine
fix(plugin-csl): check for non-normalised language codes Citeproc-js normalises language codes. This patch checks for the presence of locales under non-normalised language codes, if there are no locales present under the normalised language code. Fix <URL>
citation-js_citation-js
train
js
7d1e605e7619d3eaef443deda2a16441d6b12fc4
diff --git a/lib/forms/camunda-form.js b/lib/forms/camunda-form.js index <HASH>..<HASH> 100644 --- a/lib/forms/camunda-form.js +++ b/lib/forms/camunda-form.js @@ -490,7 +490,7 @@ CamundaForm.prototype.transformFiles = function(callback) { } var reader = new FileReader(); /* jshint ignore:start */ - reader.onloadend = (function(i) { + reader.onloadend = (function(i, element) { return function(e) { var binary = ''; var bytes = new Uint8Array( e.target.result ); @@ -511,7 +511,7 @@ CamundaForm.prototype.transformFiles = function(callback) { callCallback(); }; - })(i); + })(i, element); /* jshint ignore:end */ reader.readAsArrayBuffer(element.files[0]); counter++;
fix(fileupload): scope element
camunda_camunda-bpm-sdk-js
train
js
b0b5e14b7763d46c611cfeebabc124596a450de0
diff --git a/libnetwork/ipam/allocator_test.go b/libnetwork/ipam/allocator_test.go index <HASH>..<HASH> 100644 --- a/libnetwork/ipam/allocator_test.go +++ b/libnetwork/ipam/allocator_test.go @@ -1141,19 +1141,21 @@ func benchMarkRequest(subnet string, b *testing.B) { } } -func BenchmarkRequest_24(b *testing.B) { - a, _ := getAllocator(true) - benchmarkRequest(b, a, "10.0.0.0/24") -} +func BenchmarkRequest(b *testing.B) { -func BenchmarkRequest_16(b *testing.B) { - a, _ := getAllocator(true) - benchmarkRequest(b, a, "10.0.0.0/16") -} + subnets := []string{ + "10.0.0.0/24", + "10.0.0.0/16", + "10.0.0.0/8", + } -func BenchmarkRequest_8(b *testing.B) { - a, _ := getAllocator(true) - benchmarkRequest(b, a, "10.0.0.0/8") + for _, subnet := range subnets { + name := fmt.Sprintf("%vSubnet", subnet) + b.Run(name, func(b *testing.B) { + a, _ := getAllocator(true) + benchmarkRequest(b, a, subnet) + }) + } } func TestAllocateRandomDeallocate(t *testing.T) {
test: update tests to use sub-benchmarks Go <I> added the subtest feature which can make table-driven tests much easier to run and debug. Some tests are not using this feature.
moby_moby
train
go
6bae234ef1c33c55e65bce9c3a4802f5d15ab7a4
diff --git a/docs/src/layouts/doc-layout/use-search.js b/docs/src/layouts/doc-layout/use-search.js index <HASH>..<HASH> 100644 --- a/docs/src/layouts/doc-layout/use-search.js +++ b/docs/src/layouts/doc-layout/use-search.js @@ -45,7 +45,7 @@ export default function useSearch (scope, $q, $route) { indexUid: 'quasar-v2', inputSelector: '.doc-search input', // layout: 'simple', - debug: true, + debug: false, meilisearchOptions: { limit: 7 },
chore(docs): search - one further tweak
quasarframework_quasar
train
js
c711a9f4beb95d58c18fd57f63b07516ce21227b
diff --git a/src/cli/cms/templates/handlebars/setVariable.js b/src/cli/cms/templates/handlebars/setVariable.js index <HASH>..<HASH> 100644 --- a/src/cli/cms/templates/handlebars/setVariable.js +++ b/src/cli/cms/templates/handlebars/setVariable.js @@ -9,7 +9,7 @@ export default function setVariable(varName, varValue, options){ if (varValue === 'false') { varValue = false } - if (varValue.indexOf('{') > -1) { + if (typeof varValue == 'string' && varValue.indexOf('{') > -1) { varValue = JSON.parse(varValue) }
fix: BC break on setVariable HBS Helper
abecms_abecms
train
js
b12f816ea530ad52b7ab31cb2f64865513c0d001
diff --git a/tests/banner.js b/tests/banner.js index <HASH>..<HASH> 100644 --- a/tests/banner.js +++ b/tests/banner.js @@ -83,7 +83,7 @@ describe( 'banner and comments support', () => { banner: '/* hublabubla */' } }; - const rollupOptions = Object.assign( defaultRollupOptions, bannerOptions ); + const rollupOptions = Object.assign( {}, defaultRollupOptions, bannerOptions ); const bundleOptions = Object.assign( {}, defaultBundleOptions, bannerOptions ); return createTransformTest( {
test(banner): make sure default options are immutable
Comandeer_rollup-plugin-babel-minify
train
js
9c628ae595f145d8110d88dae92145c9b9c00535
diff --git a/src/elements/table/Table.js b/src/elements/table/Table.js index <HASH>..<HASH> 100644 --- a/src/elements/table/Table.js +++ b/src/elements/table/Table.js @@ -556,7 +556,7 @@ export class NovoTableElement { for (let row of this.rows) { row._selected = value; } - this.selected = value ? this.rows : 0; + this.selected = value ? this.rows : []; this.showSelectAllMessage = false; this.selectedPageCount = this.selectedPageCount > 0 ? this.selectedPageCount - 1 : 0; this.emitSelected(this.selected);
fix(table): Fixing bug where the selected was set to 0 if you select/unselect the whole page
bullhorn_novo-elements
train
js
abc60df33bf2b1735d1ac23961daf6d5cde14f53
diff --git a/app/src/shell/buildroot/update-epics.js b/app/src/shell/buildroot/update-epics.js index <HASH>..<HASH> 100644 --- a/app/src/shell/buildroot/update-epics.js +++ b/app/src/shell/buildroot/update-epics.js @@ -25,6 +25,8 @@ import { passRobotApiErrorAction, } from '../../robot-api' +import { actions as robotActions } from '../../robot' + import { getBuildrootTargetVersion, getBuildrootSession, @@ -363,6 +365,12 @@ export const removeMigratedRobotsEpic: Epic = (_, state$) => }) ) +export const disconnectRpcOnStartEpic: Epic = action$ => + action$.pipe( + ofType(BR_START_UPDATE), + switchMap<_, _, mixed>(() => of(robotActions.disconnect())) + ) + export const buildrootUpdateEpic = combineEpics( startUpdateEpic, cancelSessionOnConflictEpic, @@ -375,5 +383,6 @@ export const buildrootUpdateEpic = combineEpics( restartAfterCommitEpic, watchForOfflineAfterRestartEpic, watchForOnlineAfterRestartEpic, - removeMigratedRobotsEpic + removeMigratedRobotsEpic, + disconnectRpcOnStartEpic )
refactor(app): Disconnect RPC session on update start (#<I>)
Opentrons_opentrons
train
js
8527098c2fbcc7dbfbf74b81a96dfd09795f744e
diff --git a/lib/gruff/base.rb b/lib/gruff/base.rb index <HASH>..<HASH> 100644 --- a/lib/gruff/base.rb +++ b/lib/gruff/base.rb @@ -595,9 +595,8 @@ module Gruff Gruff::Renderer::Line.new(color: @marker_shadow_color).render(@graph_left, y + 1, @graph_right, y + 1) end - marker_label = BigDecimal(index.to_s) * BigDecimal(@increment.to_s) + BigDecimal(minimum_value.to_s) - unless @hide_line_numbers + marker_label = BigDecimal(index.to_s) * BigDecimal(@increment.to_s) + BigDecimal(minimum_value.to_s) label = label(marker_label, @increment) text_renderer = Gruff::Renderer::Text.new(label, font: @font, size: @marker_font_size, color: @font_color) text_renderer.render(@graph_left - LABEL_MARGIN, 1.0, 0.0, y, Magick::EastGravity)
refactor: Calcurate the marker label value if needed
topfunky_gruff
train
rb
b416288426da7de196a6d0d5ad0d4f9859f136c9
diff --git a/index.js b/index.js index <HASH>..<HASH> 100644 --- a/index.js +++ b/index.js @@ -6,14 +6,14 @@ module.exports = function (pluginConfig, config, cb) { if (env.WERCKER !== "true") { return cb(new SRError( - "ENOWERCKER: semantic-release didn’t run on wercker and therefore a new version won’t be published.", + "ENOWERCKER semantic-release didn’t run on wercker and therefore a new version won’t be published.", "ENOWERCKER" )); } if (env.WERCKER_GIT_BRANCH !== options.branch) { return cb(new SRError( - "EBRANCHMISMATCH: This test run was triggered on the branch " + env.WERCKER_GIT_BRANCH + + "EBRANCHMISMATCH This test run was triggered on the branch " + env.WERCKER_GIT_BRANCH + ", while semantic-release is configured to only publish from " + options.branch + ".", "EBRANCHMISMATCH" )); @@ -22,7 +22,7 @@ module.exports = function (pluginConfig, config, cb) { // WERCKER_RESULT is set only for after-steps if (env.hasOwnProperty("WERCKER_RESULT") && env.WERCKER_RESULT !== "passed") { return cb(new SRError( - "EFAILED: This test run was not passed and therefore a new version won’t be published.", + "EFAILED This test run was not passed and therefore a new version won’t be published.", "EFAILED" )); }
fix: Remove redundant commas from error code Redundant comma causes errors of semantic-release step failed to parse error code from message.
io-monad_sr-condition-wercker
train
js
1b2439aabe4f8eecc9fb5ab8153f7ef04768a976
diff --git a/commitlint.config.js b/commitlint.config.js index <HASH>..<HASH> 100644 --- a/commitlint.config.js +++ b/commitlint.config.js @@ -8,7 +8,7 @@ module.exports = { 'footer-max-line-length': [2, 'always', 72], 'header-max-length': [2, 'always', 72], 'scope-case': [2, 'always', 'start-case'], - 'scope-enum': [2, 'always', ['', 'Binary Installer', 'Variables']], + 'scope-enum': [2, 'always', ['', 'Binary Installer', 'Plugins', 'Variables']], 'subject-case': [2, 'always', 'sentence-case'], 'subject-empty': [2, 'never'], 'subject-full-stop': [2, 'never', '.'],
chore: Register 'Plugins' commit message scope
serverless_serverless
train
js
a244af514133dec27f8b1e0ffed1151b16caac01
diff --git a/src/anyconfig/ioinfo.py b/src/anyconfig/ioinfo.py index <HASH>..<HASH> 100644 --- a/src/anyconfig/ioinfo.py +++ b/src/anyconfig/ioinfo.py @@ -37,10 +37,7 @@ def guess_io_type(obj): >>> apath = "/path/to/a_conf.ext" >>> assert guess_io_type(apath) == IOI_PATH_STR - - >>> import pathlib - >>> if pathlib is not None: - ... assert guess_io_type(pathlib.Path(apath)) == IOI_PATH_OBJ + >>> assert guess_io_type(pathlib.Path(apath)) == IOI_PATH_OBJ >>> assert guess_io_type(open(__file__)) == IOI_STREAM >>> guess_io_type(1) # doctest: +ELLIPSIS Traceback (most recent call last):
refactor: remove 'import ...' line from a doctest because it's imported already
ssato_python-anyconfig
train
py
6504a4fd004a26b1fe586f328ef35768c6e6d67a
diff --git a/src/extra/dna-vdom-component.js b/src/extra/dna-vdom-component.js index <HASH>..<HASH> 100644 --- a/src/extra/dna-vdom-component.js +++ b/src/extra/dna-vdom-component.js @@ -185,12 +185,19 @@ export class DNAVDomComponent extends DNATemplateComponent { // Render the template let html = this.getViewContent(); if (html !== null) { - let tmp = document.createElement('div'); - this._vtree = this._vtree || nodeToVDOM(tmp); - tmp.innerHTML = html; - let tree = nodeToVDOM(tmp, { - hooks: registry(this.is).useVirtualDomHooks, - }); + let tree = new virtualDom.VNode(this.tagName); + this._vtree = this._vtree || tree; + let parser = new DOMParser(); + let doc = parser.parseFromString( + `<${this.tagName}>${html}</${this.tagName}>`, + 'text/html' + ); + let tmp = doc.body && doc.body.firstChild; + if (tmp) { + tree = nodeToVDOM(tmp, { + hooks: registry(this.is).useVirtualDomHooks, + }); + } let diff = virtualDom.diff(this._vtree || nodeToVDOM(), tree); virtualDom.patch(this, diff); this._vtree = tree;
refactor: use DOMParser instaed of instantiate a DOMNode in DNAVDomComponent #3
chialab_dna
train
js
37566c42893a41828ab8c541874ef24030e23724
diff --git a/src/Controller.js b/src/Controller.js index <HASH>..<HASH> 100644 --- a/src/Controller.js +++ b/src/Controller.js @@ -121,9 +121,9 @@ class Controller extends EventEmitter { const pathArray = ensurePath(path) const signalKey = pathArray.pop() const module = pathArray.reduce((currentModule, key) => { - return currentModule.modules[key] + return currentModule ? currentModule.modules[key] : undefined }, this.module) - const signal = module.signals[signalKey] + const signal = module && module.signals[signalKey] if (!signal) { throwError(`There is no signal at path "${path}"`)
fix(Controller): throw error when wrong signal path
cerebral_cerebral
train
js
d124700503f502bac2b130557861d07fc72fe1b2
diff --git a/tests/template.py b/tests/template.py index <HASH>..<HASH> 100644 --- a/tests/template.py +++ b/tests/template.py @@ -2,7 +2,7 @@ # Copyright (C) 2015 - 2017 Satoru SATOH <ssato @ redhat.com> # License: MIT # -# pylint: disable=missing-docstring, unused-variable +# pylint: disable=missing-docstring, unused-variable, invalid-name import os.path import os import unittest
fix: disable pylint: invalid-name check
ssato_python-anyconfig
train
py
6e66b11f6e5f26af1db1a7a45bf41e159a2185d1
diff --git a/lib/mongo/gridfs/grid_io.rb b/lib/mongo/gridfs/grid_io.rb index <HASH>..<HASH> 100644 --- a/lib/mongo/gridfs/grid_io.rb +++ b/lib/mongo/gridfs/grid_io.rb @@ -251,8 +251,9 @@ module Mongo # @return [Mongo::GridIO] self def each return read_all unless block_given? - while chunk = read(chunk_size) + while chunk = read(chunk_size) yield chunk + break if chunk.empty? end self end
fix: reading chunks from an empty (zero-length) grid-stored file reading chunks from an empty file caused an endless loop
mongodb_mongo-ruby-driver
train
rb