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
3d3c4a1ea36519abf10f72fd9608ab0d8a8b0b07
diff --git a/test/test.js b/test/test.js index <HASH>..<HASH> 100644 --- a/test/test.js +++ b/test/test.js @@ -820,12 +820,18 @@ process.once('uncaughtException', function(err) { if (t > -1 && !/(?:^|\n)AssertionError: /i.test(''+err)) console.error(makeMsg('Unexpected Exception:')); else if (t > -1) { - // Remake the assertion error since `JSON.stringify()` has a tendency to - // remove properties - err.message = format('\n%s\n%s\n%s', - inspect(err.actual, false, 6), - err.operator, - inspect(err.expected, false, 6)); + // Only change the message format when it's necessary to make it potentially + // more readable + if ((typeof err.actual === 'object' && err.actual !== null) + || (typeof err.expected === 'object' && err.expected !== null)) { + // Remake the assertion error since `JSON.stringify()` has a tendency to + // remove properties from `.actual` and `.expected` objects + err.message = format('\n%s\n%s\n%s', + inspect(err.actual, false, 6), + err.operator, + inspect(err.expected, false, 6)); + } + // Hack in the name of the test that failed var oldStack = err.stack; var oldMsg = err.message;
test: use simpler assertions for non-object comparisons
mscdex_node-mariasql
train
js
5d294c5d8a2ec926ccf49939586338b6d8f06a37
diff --git a/routes/accounts.js b/routes/accounts.js index <HASH>..<HASH> 100644 --- a/routes/accounts.js +++ b/routes/accounts.js @@ -22,6 +22,7 @@ function accountRoutes (server, options, next) { auth: false, validate: { headers: validations.bearerTokenHeader, + query: validations.accountQuery, payload: validations.accountPayload, failAction: joiFailAction }
fix(routes): POST /accounts?include=foobar -> <I>
hoodiehq_hoodie-account-server
train
js
4a9b205a15d94812fcbb1efc052eab413331a38a
diff --git a/cmd/s3-peer-rpc-handlers.go b/cmd/s3-peer-rpc-handlers.go index <HASH>..<HASH> 100644 --- a/cmd/s3-peer-rpc-handlers.go +++ b/cmd/s3-peer-rpc-handlers.go @@ -48,6 +48,9 @@ type SetBucketNotificationPeerArgs struct { NCfg *notificationConfig } +// BucketUpdate - implements bucket notification updates, +// the underlying operation is a network call updates all +// the peers participating in bucket notification. func (s *SetBucketNotificationPeerArgs) BucketUpdate(client BucketMetaState) error { return client.UpdateBucketNotification(s) } @@ -72,6 +75,9 @@ type SetBucketListenerPeerArgs struct { LCfg []listenerConfig } +// BucketUpdate - implements bucket listener updates, +// the underlying operation is a network call updates all +// the peers participating in listen bucket notification. func (s *SetBucketListenerPeerArgs) BucketUpdate(client BucketMetaState) error { return client.UpdateBucketListener(s) } @@ -118,6 +124,9 @@ type SetBucketPolicyPeerArgs struct { PChBytes []byte } +// BucketUpdate - implements bucket policy updates, +// the underlying operation is a network call updates all +// the peers participating for new set/unset policies. func (s *SetBucketPolicyPeerArgs) BucketUpdate(client BucketMetaState) error { return client.UpdateBucketPolicy(s) }
docs: Add missing comments for exported functions.
minio_minio
train
go
f15710381595d671160e5d6178d4b0e92a18ff43
diff --git a/src/engine/canvas.js b/src/engine/canvas.js index <HASH>..<HASH> 100644 --- a/src/engine/canvas.js +++ b/src/engine/canvas.js @@ -38,7 +38,6 @@ export function createCommentCanvas(cmt, fontSize) { } var canvas = document.createElement('canvas'); var ctx = canvas.getContext('2d'); - ctx.scale(dpr, dpr); var style = cmt.style || {}; style.font = style.font || '10px sans-serif'; style.textBaseline = style.textBaseline || 'bottom'; @@ -53,6 +52,7 @@ export function createCommentCanvas(cmt, fontSize) { Math.ceil(canvasHeight(style.font, fontSize)) + strokeWidth * 2; canvas.width = cmt.width * dpr; canvas.height = cmt.height * dpr; + ctx.scale(dpr, dpr); for (var key in style) { ctx[key] = style[key]; }
fix: scale ctx after set canvas width and height close #<I>
weizhenye_Danmaku
train
js
31a03a9413e6a03dd49fb4e281aae158a76a8d48
diff --git a/packages/cozy-client/src/ObservableQuery.js b/packages/cozy-client/src/ObservableQuery.js index <HASH>..<HASH> 100644 --- a/packages/cozy-client/src/ObservableQuery.js +++ b/packages/cozy-client/src/ObservableQuery.js @@ -101,7 +101,7 @@ export default class ObservableQuery { } getStore() { - return this.client.getOrCreateStore() + return this.client.store } } diff --git a/packages/cozy-client/src/Provider.js b/packages/cozy-client/src/Provider.js index <HASH>..<HASH> 100644 --- a/packages/cozy-client/src/Provider.js +++ b/packages/cozy-client/src/Provider.js @@ -33,10 +33,7 @@ export default class CozyProvider extends Component { getChildContext() { return { - store: - this.props.store || - this.context.store || - this.props.client.getOrCreateStore(), + store: this.props.store || this.context.store || this.props.client.store, client: this.props.client } }
refactor: ObservableQuery and Provider do not create the store for the client
cozy_cozy-client
train
js,js
db1b0ec1f36d79812c1723b49288271e4e1bc81b
diff --git a/chore/chore.config.js b/chore/chore.config.js index <HASH>..<HASH> 100644 --- a/chore/chore.config.js +++ b/chore/chore.config.js @@ -63,4 +63,4 @@ module.exports = (function () { return config; -})(); +})(); \ No newline at end of file
fix(formatting): removed empty line
BioPhoton_angular1-star-rating
train
js
e0ac8cad23211133cec38501ba843cfa170276d8
diff --git a/packages/posthtml-transform/lib/plugin.js b/packages/posthtml-transform/lib/plugin.js index <HASH>..<HASH> 100644 --- a/packages/posthtml-transform/lib/plugin.js +++ b/packages/posthtml-transform/lib/plugin.js @@ -8,7 +8,7 @@ const { normalizeRules } = require('./utils'); const defaultConfig = { skipRootTag: false, - convertAlphaColors: false + convertAlphaColors: true }; module.exports = (rules, config = {}) => {
chore: convert alpha colors by default
JetBrains_svg-mixer
train
js
5bff9c3f2872cccb01ab6385a8c0c38977c358b0
diff --git a/packages/@vue/cli/lib/Upgrader.js b/packages/@vue/cli/lib/Upgrader.js index <HASH>..<HASH> 100644 --- a/packages/@vue/cli/lib/Upgrader.js +++ b/packages/@vue/cli/lib/Upgrader.js @@ -45,6 +45,7 @@ module.exports = class Upgrader { } for (const p of upgradable) { + this.pkg = getPackageJson(this.context) await this.upgrade(p.name, { to: p.latest }) }
fix(upgrade-all): avoid accidentally writing outdated package.json back (#<I>)
vuejs_vue-cli
train
js
07ccf4ecb6ceef6afb6372dd5a31484d02fcf670
diff --git a/core/src/ons/platform.js b/core/src/ons/platform.js index <HASH>..<HASH> 100644 --- a/core/src/ons/platform.js +++ b/core/src/ons/platform.js @@ -87,7 +87,7 @@ class Platform { // iOS devices //---------------- /** - * @methos isIPhone + * @method isIPhone * @signature isIPhone() * @description * [en]Returns whether the device is iPhone.[/en] @@ -99,7 +99,7 @@ class Platform { } /** - * @methos isIPhoneX + * @method isIPhoneX * @signature isIPhoneX() * @description * [en]Returns whether the device is iPhone X.[/en]
fix(docs): Fix typos in `platform.js`.
OnsenUI_OnsenUI
train
js
cc61e5bb1a6823f765212942ee01e7b034ba7698
diff --git a/blocks/bloom/filter_test.go b/blocks/bloom/filter_test.go index <HASH>..<HASH> 100644 --- a/blocks/bloom/filter_test.go +++ b/blocks/bloom/filter_test.go @@ -6,6 +6,14 @@ import ( "testing" ) +func TestBasicFilter(t *testing.T) { + f := BasicFilter().(*filter) + + if len(f.filter) != 2048 { + t.Fatal("basic filter should have length 2048, has:", len(f.filter)) + } +} + func TestFilter(t *testing.T) { f := NewFilter(128)
test: Bloom filter, basic filter test License: MIT
ipfs_go-ipfs
train
go
759cdc3dbc31ad98f2ac99ab065cdaf9fca59449
diff --git a/src/Core/Model/ShippingMethod/ShippingRate.php b/src/Core/Model/ShippingMethod/ShippingRate.php index <HASH>..<HASH> 100644 --- a/src/Core/Model/ShippingMethod/ShippingRate.php +++ b/src/Core/Model/ShippingMethod/ShippingRate.php @@ -16,15 +16,15 @@ use Commercetools\Core\Model\Common\Money; * @method ShippingRate setFreeAbove(Money $freeAbove = null) * @method bool getIsMatching() * @method ShippingRate setIsMatching(bool $isMatching = null) - * @method Money getTiers() - * @method ShippingRate setTiers(Money $tiers = null) + * @method ShippingRatePriceTierCollection getTiers() + * @method ShippingRate setTiers(ShippingRatePriceTierCollection $tiers = null) */ class ShippingRate extends ShippingRateDraft { public function fieldDefinitions() { $fields = parent::fieldDefinitions(); - $fields['tiers'] = [static::TYPE => Money::class]; + $fields['tiers'] = [static::TYPE => ShippingRatePriceTierCollection::class]; $fields['isMatching'] = [static::TYPE => 'bool', static::OPTIONAL => true]; return $fields; }
test(ShippingRate): fix type for ShippingRate tiers
commercetools_commercetools-php-sdk
train
php
c32e42188c478b69bab4d0acea87e237265a8ff7
diff --git a/core/lib/engine_http.js b/core/lib/engine_http.js index <HASH>..<HASH> 100644 --- a/core/lib/engine_http.js +++ b/core/lib/engine_http.js @@ -348,6 +348,13 @@ HttpEngine.prototype.step = function step(requestSpec, ee, opts) { method: requestParams.method, headers: requestParams.headers }; + + if (context._jar._jar && typeof context._jar._jar.getCookieStringSync === 'function') { + requestInfo = Object.assign(requestInfo, { + cookie: context._jar._jar.getCookieStringSync(requestParams.url) + }); + } + if (requestParams.json && typeof requestParams.json !== 'boolean') { requestInfo.json = requestParams.json; }
feat(http): Show cookies in debug output
artilleryio_artillery
train
js
ac514435429a5cbd59a73cf332314b2cfae1750e
diff --git a/packages/ringcentral-widgets/components/SmCallControl/index.js b/packages/ringcentral-widgets/components/SmCallControl/index.js index <HASH>..<HASH> 100644 --- a/packages/ringcentral-widgets/components/SmCallControl/index.js +++ b/packages/ringcentral-widgets/components/SmCallControl/index.js @@ -22,7 +22,7 @@ export default function SmCallControl(props) { isOnMute, callStatus, currentLocale, callDirection, } = props; - // reject conditons: call direction is inbound & call status is ringing + // reject conditions: call direction is inbound & call status is ringing function canRejectCall() { return ( callDirections.inbound === callDirection && @@ -32,7 +32,7 @@ export default function SmCallControl(props) { const muteIcon = isOnMute ? MuteIcon : UnmuteIcon; const muteAction = isOnMute ? onUnmute : onMute; - const muteTitle = isOnMute ? 'mute' : 'unmute'; + const muteTitle = isOnMute ? 'unmute' : 'mute'; const endTile = canRejectCall() ? 'reject' : 'hangup'; const endAction = canRejectCall() ? onReject : onHangup; const disabledCtrl = callStatus === telephonyStatuses.ringing;
fix: small call control tooltip (#<I>)
ringcentral_ringcentral-js-widgets
train
js
2940716e1de82717045f0a1051a3a1fcc6718b04
diff --git a/index.js b/index.js index <HASH>..<HASH> 100644 --- a/index.js +++ b/index.js @@ -190,9 +190,9 @@ module.exports = postcss.plugin('postcss-mixins', function (opts) { } var root if (ext === '.sss') { - root = sugarss.parse(contents) + root = sugarss.parse(contents, { from: relative }) } else { - root = postcss.parse(contents) + root = postcss.parse(contents, { from: relative }) } root.walkAtRules('define-mixin', function (atrule) { defineMixin(result, mixins, atrule)
fix: pass from opt when parsing (#<I>)
postcss_postcss-mixins
train
js
7b0f59735b16991e38b3f67a74b13c71cb528e1e
diff --git a/build/tasks/publish-modules.js b/build/tasks/publish-modules.js index <HASH>..<HASH> 100644 --- a/build/tasks/publish-modules.js +++ b/build/tasks/publish-modules.js @@ -11,18 +11,21 @@ if (yargs.argv.registry) { let execResult; + console.log(`Publishing module opentest-server...`); shelljs.cd(path.join(rootDir, 'dist', 'module-opentest-server')); execResult = shelljs.exec(`npm publish --registry ${yargs.argv.registry}`); if (execResult.code != 0) { throw new Error('Failed to publish module opentest-server.'); } + console.log(`Publishing module opentest-actor...`); shelljs.cd(path.join(rootDir, 'dist', 'module-opentest-actor')); execResult = shelljs.exec(`npm publish --registry ${yargs.argv.registry}`); if (execResult.code != 0) { throw new Error('Failed to publish module opentest-actor.'); } + console.log(`Publishing module opentest...`); shelljs.cd(path.join(rootDir, 'dist', 'module-opentest')); execResult = shelljs.exec(`npm publish --registry ${yargs.argv.registry}`); if (execResult.code != 0) {
feat(build): improve logging
mcdcorp_opentest
train
js
c5248371843686e6be682430b4fd424f59ae11ab
diff --git a/src/core/relay.js b/src/core/relay.js index <HASH>..<HASH> 100644 --- a/src/core/relay.js +++ b/src/core/relay.js @@ -9,7 +9,6 @@ import { TlsInbound, TlsOutbound, WsInbound, WsOutbound } from '../transports'; -import {logger} from '../utils'; function preparePresets(presets) { // add at least one "tracker" preset to the list
test: fix eslint
blinksocks_blinksocks
train
js
44016126f3b290a0a31b306cdfa9646670d5b32d
diff --git a/components/Button/components/GenericButton.js b/components/Button/components/GenericButton.js index <HASH>..<HASH> 100644 --- a/components/Button/components/GenericButton.js +++ b/components/Button/components/GenericButton.js @@ -105,7 +105,7 @@ function renderLink(props: Props) { function buttonClass(props: Props) { if (props.reversed && !props.reverseColor) { - console.warn('please provide a fallback colour for revered buttons'); + console.warn('please provide a fallback colour for reversed buttons'); } const variantClass = diff --git a/guide/src/pages/components/Button/_buttonPresets.js b/guide/src/pages/components/Button/_buttonPresets.js index <HASH>..<HASH> 100644 --- a/guide/src/pages/components/Button/_buttonPresets.js +++ b/guide/src/pages/components/Button/_buttonPresets.js @@ -96,7 +96,7 @@ const buttonPresets = [ }, { name: 'Primary Reversed', - node: <Button label="Label" primary reversed />, + node: <Button label="Label" primary reversed reverseColor="ocean" />, darkBackground: true, }, {
fix(button): typo in code comments
cultureamp_cultureamp-style-guide
train
js,js
913eaa10083cc05bf3b57607667a17b24e32785a
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -11,7 +11,7 @@ except ImportError: # with -e flag. This package will be either distributed with C # sources or as properly built wheels from Travis CI and Appveyor. if os.environ.get('READTHEDOCS', None) == 'True': - cythonize = lambda x: x + cythonize = lambda extensions, **kwargs: extensions else: raise
docs: another RTD-related setup.py fix
swistakm_pyimgui
train
py
6b65ed64ae9f11feef765f8ae92b27a9daa654b1
diff --git a/test/processes/chromedriver.test.js b/test/processes/chromedriver.test.js index <HASH>..<HASH> 100644 --- a/test/processes/chromedriver.test.js +++ b/test/processes/chromedriver.test.js @@ -59,7 +59,7 @@ describe('ChromeDriver', () => { ); }); - it('errors out prettily if none found', async () => { + it.skip('errors out prettily if none found', async () => { const err = await assert.rejects(startChromeDriver()); assert.include('You can provide your own', err.stack); });
test: disable non-standard chromedriver tests
testiumjs_testium-core
train
js
90a7e476a04d26babc88002e9035cad2ed485b07
diff --git a/semantic_release/hvcs.py b/semantic_release/hvcs.py index <HASH>..<HASH> 100644 --- a/semantic_release/hvcs.py +++ b/semantic_release/hvcs.py @@ -15,8 +15,8 @@ debug = ndebug.create(__name__) debug_gh = ndebug.create(__name__ + ':github') debug_gl = ndebug.create(__name__ + ':gitlab') -# Add a mime type for wheels so asset upload doesn't fail -mimetypes.add_type('application/x-wheel+zip', '.whl', False) +# Add a mime type for wheels +mimetypes.add_type('application/octet-stream', '.whl') class Base(object):
fix(github): use application/octet-stream for .whl files application/octet-stream is more generic, but it is better than using a non-official MIME type.
relekang_python-semantic-release
train
py
ca6f01587aa0caf1b72017339dda80a38eb0f8a8
diff --git a/gridsome/app/components/Image.js b/gridsome/app/components/Image.js index <HASH>..<HASH> 100644 --- a/gridsome/app/components/Image.js +++ b/gridsome/app/components/Image.js @@ -143,17 +143,24 @@ function intersectionHandler ({ intersectionRatio, target }) { } function loadImage (el) { + const src = el.getAttribute('data-src') + const srcset = el.getAttribute('data-srcset') + const sizes = el.getAttribute('data-sizes') + + if (!src) return + el.onload = function () { - delete el.dataset.src - delete el.dataset.srcset - delete el.dataset.sizes - delete el.onload + el.removeAttribute('data-src') + el.removeAttribute('data-srcset') + el.removeAttribute('data-sizes') el.classList.remove('g-image--loading') el.classList.add('g-image--loaded') + + delete el.onload } - el.src = el.dataset.src - el.srcset = el.dataset.srcset - el.sizes = el.dataset.sizes + el.src = src + el.srcset = srcset + el.sizes = sizes }
fix(g-image): run onload event once Might be ralated to #<I>
gridsome_gridsome
train
js
fa11d4475d9d5f2fcc016b5e36e202b2fa40694e
diff --git a/jaxrs/src/main/java/org/jboss/aerogear/unifiedpush/rest/filter/CORSFilter.java b/jaxrs/src/main/java/org/jboss/aerogear/unifiedpush/rest/filter/CORSFilter.java index <HASH>..<HASH> 100644 --- a/jaxrs/src/main/java/org/jboss/aerogear/unifiedpush/rest/filter/CORSFilter.java +++ b/jaxrs/src/main/java/org/jboss/aerogear/unifiedpush/rest/filter/CORSFilter.java @@ -25,5 +25,7 @@ public class CORSFilter implements ContainerResponseFilter { responseContext.getHeaders().add( "Access-Control-Allow-Methods", "GET, POST, PUT, DELETE, OPTIONS, HEAD"); + responseContext.getHeaders().add( + "Access-Control-Expose-Headers", "*"); } -} \ No newline at end of file +}
fix: added Access-Control-Expose-Headers header to the corsfilter class
aerogear_aerogear-unifiedpush-server
train
java
63d74b9da4a4d0c5121b070d18753074a0aa1d69
diff --git a/src/Leevel/Database/Ddd/Meta.php b/src/Leevel/Database/Ddd/Meta.php index <HASH>..<HASH> 100644 --- a/src/Leevel/Database/Ddd/Meta.php +++ b/src/Leevel/Database/Ddd/Meta.php @@ -119,7 +119,6 @@ class Meta public static function setDatabaseResolver(?Closure $databaseResolver = null): void { static::$databaseResolver = $databaseResolver; - if (null === $databaseResolver) { static::$resolveDatabase = null; } @@ -156,6 +155,7 @@ class Meta { return $this->select() ->where($condition) + ->limit(1) ->update($saveData); } @@ -166,6 +166,7 @@ class Meta { return $this->select() ->where($condition) + ->limit(1) ->delete(); }
refactor(ddd): add limit(1) for entity meta update and delete
hunzhiwange_framework
train
php
6caccf7577aeb877ce294111adb4e21a74cad171
diff --git a/docs/config/processors/buildConfig.js b/docs/config/processors/buildConfig.js index <HASH>..<HASH> 100644 --- a/docs/config/processors/buildConfig.js +++ b/docs/config/processors/buildConfig.js @@ -5,7 +5,7 @@ var exec = require('child_process').exec; module.exports = function buildConfigProcessor(log) { return { $runBefore: ['rendering-docs'], - $unAfter: ['indexPageProcessor'], + $runAfter: ['indexPageProcessor'], $process: process };
fix(build): correct in buildConfig.js Closes #<I>.
angular_material
train
js
05ccb319d259b5e30b7324a0fc007bb013d19f3b
diff --git a/php/base/Exchange.php b/php/base/Exchange.php index <HASH>..<HASH> 100644 --- a/php/base/Exchange.php +++ b/php/base/Exchange.php @@ -1839,7 +1839,7 @@ class Exchange { $array = array_values($array); $valueIsSet = isset($value); $sinceIsSet = isset($since); - $array = array_filter($array, function ($element) use ($valueIsSet, $value, $sinceIsSet, $since, $field) { + $array = array_filter($array, function ($element) use ($valueIsSet, $value, $sinceIsSet, $since, $field, $key) { return ($valueIsSet ? ($element[$field] === $value) : true) && ($sinceIsSet ? ($element[$key] >= $since) : true); });
fix: undefined index $key was used
ccxt_ccxt
train
php
e4d63ace97d6a34b69bf713e7951bec18ca4bae6
diff --git a/packages/react/src/components/FileUploader/FileUploader.js b/packages/react/src/components/FileUploader/FileUploader.js index <HASH>..<HASH> 100644 --- a/packages/react/src/components/FileUploader/FileUploader.js +++ b/packages/react/src/components/FileUploader/FileUploader.js @@ -40,7 +40,7 @@ export class FileUploaderButton extends Component { * Provide the label text to be read by screen readers when interacting with * this control */ - labelText: PropTypes.string, + labelText: PropTypes.node, /** * Specify whether you want the component to list the files that have been
feat(FileUploadButton): Allow node in place of string. (#<I>) This allows the end user to make the text more customizable i.e. allow icons or other renderable items for the button.
carbon-design-system_carbon-components
train
js
92b889e810b438f448c9a3dbb794112691f11acd
diff --git a/scripts/listPackagesWithTests.js b/scripts/listPackagesWithTests.js index <HASH>..<HASH> 100644 --- a/scripts/listPackagesWithTests.js +++ b/scripts/listPackagesWithTests.js @@ -43,8 +43,11 @@ const CUSTOM_HANDLERS = { // Split "api-apw" tests into batches of "api-apw": () => { return [ - "packages/api-apw/* --keyword=cms:ddb --keyword=apw:base", - "packages/api-apw/* --keyword=cms:ddb-es --keyword=apw:base" + // TODO: APW tests currently only work with DynamoDB-only (it's hard-coded in the tests). + // That is because we currently have no way to load multiple storage operations at the same time. + "packages/api-apw/*" + // "packages/api-apw/* --keyword=cms:ddb --keyword=apw:base", + // "packages/api-apw/* --keyword=cms:ddb-es --keyword=apw:base" ]; } };
fix: run APW tests without keywords
Webiny_webiny-js
train
js
1b58c3da3b75c51265d162cb6ab77c59e52414fc
diff --git a/packages/upload-core/src/upload.js b/packages/upload-core/src/upload.js index <HASH>..<HASH> 100644 --- a/packages/upload-core/src/upload.js +++ b/packages/upload-core/src/upload.js @@ -402,7 +402,7 @@ class Upload { this.status = status; try { this.parseErrorMessage(message, err); - } catch { + } catch (e) { /* the error callback should always be called */ }
fix(upload-core): leave the catch param syntax
Availity_sdk-js
train
js
e42d037f01df7dbdbe635905a537423cbc38b10b
diff --git a/app/templates/entry/client-prefetch.js b/app/templates/entry/client-prefetch.js index <HASH>..<HASH> 100644 --- a/app/templates/entry/client-prefetch.js +++ b/app/templates/entry/client-prefetch.js @@ -104,8 +104,8 @@ export function addPreFetchHooks (router<%= store ? ', store' : '' %>, publicPat preFetchList.reduce( (promise, preFetch) => promise.then(() => hasRedirected === false && preFetch({ <% if (store) { %>store,<% } %> - currentRoute: to, - previousRoute: from, + currentRoute: to.value, + previousRoute: from.value, redirect, urlPath, publicPath diff --git a/app/templates/entry/server-entry.js b/app/templates/entry/server-entry.js index <HASH>..<HASH> 100644 --- a/app/templates/entry/server-entry.js +++ b/app/templates/entry/server-entry.js @@ -165,7 +165,7 @@ export default ssrContext => { (promise, preFetchFn) => promise.then(() => hasRedirected === false && preFetchFn({ <% if (store) { %>store,<% } %> ssrContext, - currentRoute: router.currentRoute, + currentRoute: router.currentRoute.value, redirect, urlPath: ssrContext.req.url, publicPath
fix(app): preFetch's currentRoute is a ref instead of the actual value #<I>
quasarframework_quasar
train
js,js
461ad3f75224e9fe399a4d1137db6a6ca32cc298
diff --git a/index.js b/index.js index <HASH>..<HASH> 100644 --- a/index.js +++ b/index.js @@ -143,19 +143,17 @@ Liftoff.prototype.launch = function (opts, fn) { return this.completions(completion); } - var execute = fn.bind(this, this.buildEnvironment(opts)); - if (this.nodeFlags) { flaggedRespawn(this.nodeFlags, process.argv, function (ready, child) { if (child !== process) { this.emit('respawn', child); } if (ready) { - execute(); + fn.call(this, this.buildEnvironment(opts)); } }.bind(this)); } else { - execute(); + fn.call(this, this.buildEnvironment(opts)); } };
fix: Avoid calling buildEnvironment until ready
js-cli_js-liftoff
train
js
f45b3ced78dc90650853008426c0cd3483fe8c44
diff --git a/test.js b/test.js index <HASH>..<HASH> 100644 --- a/test.js +++ b/test.js @@ -32,6 +32,8 @@ try { var start = Date.now(); var res = sleep(1000); var end = Date.now(); +console.log('Time as returned by sleep():', res); +console.log('Time counted on our own: ', end - start); assert(Math.abs(1000 - res) < 100); assert(Math.abs(1000 - (end - start)) < 100);
test: Log the real waited time
ForbesLindesay_thread-sleep
train
js
bef8483e6927f2df4e030375fd1c810c27244de3
diff --git a/test/cartridgeSassSpec.js b/test/cartridgeSassSpec.js index <HASH>..<HASH> 100644 --- a/test/cartridgeSassSpec.js +++ b/test/cartridgeSassSpec.js @@ -56,7 +56,7 @@ describe('As a gulpfile', function() { it('should add the generated styles path to the clean config', function() { var relative = path.relative(process.cwd(), basicrunner.config.cleanPaths[0]); - expect(relative).to.equal('public/_client/styles'); + expect(relative).to.equal(path.join('public', '_client', 'styles')); }); }); })
test: Update the testcase to use path.join The test was looking for a specific path using unix style seperators, which was breaking on windows
cartridge_cartridge-sass
train
js
00df1c770e2ea68c6f14a0eb86cf4c66ad643e42
diff --git a/lib/pgsync/task.rb b/lib/pgsync/task.rb index <HASH>..<HASH> 100644 --- a/lib/pgsync/task.rb +++ b/lib/pgsync/task.rb @@ -258,7 +258,7 @@ module PgSync when "random_ip" "(1 + RANDOM() * 254)::int::text || '.0.0.1'" when "random_letter" - "chr(65 + (RANDOM() * 26)::int)" + "chr(65 + (RANDOM() * 25)::int)" when "random_string" "RIGHT(MD5(RANDOM()::text), 10)" when "null", nil
fix: size of alphabet on random_letter (#<I>)
ankane_pgsync
train
rb
509efb9a57faa30bae7326cd7bc5e1bd9792ecdf
diff --git a/lib/gzr/version.rb b/lib/gzr/version.rb index <HASH>..<HASH> 100644 --- a/lib/gzr/version.rb +++ b/lib/gzr/version.rb @@ -20,5 +20,5 @@ # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. module Gzr - VERSION = "0.2.50" + VERSION = '0.2.50' end
chore: fix version number quotes for release-please
looker-open-source_gzr
train
rb
5fac8d40f535ec8f3d1cf2187fbbe3418d82cf62
diff --git a/git/repo/base.py b/git/repo/base.py index <HASH>..<HASH> 100644 --- a/git/repo/base.py +++ b/git/repo/base.py @@ -100,8 +100,8 @@ class Repo(object): repo = Repo("$REPOSITORIES/Development/git-python.git") - In *Cygwin*, path may be a `'cygdrive/...'` prefixed path. - - If `None, current-directory is used. - - The :envvar:`GIT_DIR` if set and not empty takes precendance over this parameter. + - If it evaluates to false, :envvar:`GIT_DIR` is used, and if this also evals to false, + the current-directory is used. :param odbt: Object DataBase type - a type which is constructed by providing the directory containing the database objects, i.e. .git/objects. It will @@ -114,7 +114,9 @@ class Repo(object): :raise InvalidGitRepositoryError: :raise NoSuchPathError: :return: git.Repo """ - epath = os.getenv('GIT_DIR') or path or os.getcwd() + epath = path or os.getenv('GIT_DIR') + if not epath: + epath = os.getcwd() if Git.is_cygwin(): epath = decygpath(epath) epath = _expand_path(epath or path or os.getcwd())
fix(repo): Use GIT_DIR only if no repo-path given FIX #<I> according to Byron's comment: <URL>
gitpython-developers_GitPython
train
py
3b13db2dac7479a9fd1e1ebdd1b6f03a98231684
diff --git a/pgjdbc/src/test/java/org/postgresql/test/jdbc2/NotifyTest.java b/pgjdbc/src/test/java/org/postgresql/test/jdbc2/NotifyTest.java index <HASH>..<HASH> 100644 --- a/pgjdbc/src/test/java/org/postgresql/test/jdbc2/NotifyTest.java +++ b/pgjdbc/src/test/java/org/postgresql/test/jdbc2/NotifyTest.java @@ -81,13 +81,13 @@ public class NotifyTest { // Wait a bit to let the notify come through... Changed this so the test takes ~2 seconds // less to run and is still as effective. PGNotification[] notifications = null; - try { - int retries = 300; - while (retries-- > 0 - && (notifications = conn.unwrap(PGConnection.class).getNotifications()) == null ) { - Thread.sleep(100); + PGConnection connection = conn.unwrap(PGConnection.class); + for (int i = 0; i < 3000; i++) { + notifications = connection.getNotifications(); + if (notifications.length > 0) { + break; } - } catch (InterruptedException ie) { + Thread.sleep(10); } assertNotNull("Notification is expected to be delivered when subscription was created"
test: fix API usage in NotifyTest Previously the test waited for a non-null getNotifications() array, however, the method never return null values. The test should wait for a non-empty array instead.
pgjdbc_pgjdbc
train
java
ae9965dd690ba637a4ac00ed479d83e24c046a1a
diff --git a/packages/webpack/src/index.js b/packages/webpack/src/index.js index <HASH>..<HASH> 100644 --- a/packages/webpack/src/index.js +++ b/packages/webpack/src/index.js @@ -41,11 +41,17 @@ function svgrLoader(source) { ) }) - readSvg() - .then(svg => convert(svg, options, { webpack: { previousExport } })) - .then(jsCode => (babel ? pBabelTransform(jsCode) : jsCode)) - .then(result => callback(null, result)) - .catch(err => callback(err)) + const tranformSvg = svg => + convert(svg, options, { webpack: { previousExport } }) + .then(jsCode => (babel ? pBabelTransform(jsCode) : jsCode)) + .then(result => callback(null, result)) + .catch(err => callback(err)) + + if (exportMatches) { + readSvg().then(tranformSvg) + } else { + tranformSvg(source) + } } export default svgrLoader
fix(webpack): use source when possible (#<I>) Actually file is read in all cases, this is useless and inefficient.
smooth-code_svgr
train
js
e9a8dd8f060afe31c10b46cbcb0603000d127817
diff --git a/src/base/error_mixin.js b/src/base/error_mixin.js index <HASH>..<HASH> 100644 --- a/src/base/error_mixin.js +++ b/src/base/error_mixin.js @@ -9,25 +9,25 @@ const ErrorMixin = { * @return {Object} Object with formatted error data including origin and scope */ createError(error) { - !this.name && (this.name = this.constructor && this.constructor.type || 'errorMixin') - if (!this.playerError) { - Log.warn(this.name, 'PlayerError is not defined. Error: ', error) - return error - } + const scope = this.constructor && this.constructor.type || 'errorMixin' + const origin = this.name || scope const defaultError = { description: '', level: PlayerError.Levels.FATAL, - origin: this.name, - scope: this.name, + origin, + scope, raw: {}, } const errorData = Object.assign({}, defaultError, error, { - code: `${this.name}:${error && error.code || 'unknown'}` + code: `${origin}:${error && error.code || 'unknown'}` }) - this.playerError.error(errorData) + if (this.playerError) + this.playerError.error(errorData) + else + Log.warn(origin, 'PlayerError is not defined. Error: ', errorData) return errorData }
fix(error_mixin): set scope as component type instead of name
clappr_clappr
train
js
0cb9fc489a749257c4af48d1b7b39c09cdf14209
diff --git a/packages/app-frontend/src/features/timeline/index.js b/packages/app-frontend/src/features/timeline/index.js index <HASH>..<HASH> 100644 --- a/packages/app-frontend/src/features/timeline/index.js +++ b/packages/app-frontend/src/features/timeline/index.js @@ -108,7 +108,7 @@ export function setupTimelineBridgeEvents (bridge) { const scrollTime = event.time + 100 if (scrollTime > maxTime.value) { if (endTime.value === maxTime.value) { - if (endTime.value - startTime.value > 10000) { + if (endTime.value - startTime.value > 10000 || startTime.value !== 0) { // Autoscroll const size = endTime.value - startTime.value startTime.value = scrollTime - size
fix(timeline): preserve resized scrollbar
vuejs_vue-devtools
train
js
ed18ec297b84a346afa121f8bfa1b3d8a938f934
diff --git a/coursera/test/test_parsing.py b/coursera/test/test_parsing.py index <HASH>..<HASH> 100644 --- a/coursera/test/test_parsing.py +++ b/coursera/test/test_parsing.py @@ -12,7 +12,6 @@ from six import iteritems from mock import patch, Mock, mock_open from coursera import coursera_dl -from .test_utils import assertEqual, assertEquals, assertTrue, assertFalse, assertRaises # JSon Handling
test: test_parsing: Remove unused imports.
coursera-dl_coursera-dl
train
py
5f09af8a4b14fce776f22a55d1a43fee7e45ba01
diff --git a/asammdf/mdf.py b/asammdf/mdf.py index <HASH>..<HASH> 100644 --- a/asammdf/mdf.py +++ b/asammdf/mdf.py @@ -4951,6 +4951,8 @@ class MDF: acq_name : str, optional filter occurrences on channel group acquisition name, by default None + .. versionadded:: 6.0.0 + Returns ------- tuple[tuple[int, int], ...]
docs(mdf): re-add missing versionadded in whereis
danielhrisca_asammdf
train
py
780f9d6e4932fa3a21f20ae2709956389cada8cd
diff --git a/test/test.js b/test/test.js index <HASH>..<HASH> 100644 --- a/test/test.js +++ b/test/test.js @@ -80,7 +80,7 @@ describe('html-toc', function() { it('should support custom slugger', function() { var actual = toc(fixture('options-slugger'), { slugger: function(text) { - const re = /[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~\s]/g; + var re = /[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~\s]/g; return text.trim().replace(re, ''); } });
test: use var instead of const
jonschlinkert_html-toc
train
js
ca3bb43b14a932de5021356faa4e4601d6dc932a
diff --git a/tests/gui/widget/test_history.py b/tests/gui/widget/test_history.py index <HASH>..<HASH> 100644 --- a/tests/gui/widget/test_history.py +++ b/tests/gui/widget/test_history.py @@ -21,11 +21,11 @@ from rafcon.utils import log # test environment elements import testing_utils from testing_utils import call_gui_callback -from .test_state_type_change import store_state_elements, check_state_elements, \ +from gui.widget.test_state_type_change import store_state_elements, check_state_elements, \ check_list_ES, check_list_HS, check_list_BCS, check_list_PCS, \ check_list_root_ES, check_list_root_HS, check_list_root_BCS, check_list_root_PCS, \ get_state_editor_ctrl_and_store_id_dict, check_elements_ignores -from .test_states_editor import check_state_editor_models +from gui.widget.test_states_editor import check_state_editor_models import pytest NO_SAVE = False
test(history): No relative imports
DLR-RM_RAFCON
train
py
4ec2bf9b398a203fc1ea0426ba5433626511498c
diff --git a/src/func/index.js b/src/func/index.js index <HASH>..<HASH> 100644 --- a/src/func/index.js +++ b/src/func/index.js @@ -1,6 +1,7 @@ import * as alias from './alias'; import * as identifier from './identifier'; import * as imports from './import'; +import * as language from './language'; import * as relationship from './relationship'; import * as set from './set'; @@ -10,6 +11,7 @@ export default function init() { alias, identifier, imports, + language, relationship, set };
feat(func): Add langauge to the object of exports
bookbrainz_bookbrainz-data-js
train
js
fa66dfce3c1bd7219356fcb86884b8d1333036be
diff --git a/lib/attributes-to-props.js b/lib/attributes-to-props.js index <HASH>..<HASH> 100644 --- a/lib/attributes-to-props.js +++ b/lib/attributes-to-props.js @@ -35,7 +35,10 @@ function attributesToProps(attributes) { reactProperty = config.html[propertyName.toLowerCase()]; if (reactProperty) { if ( - DOMProperty.properties.hasOwnProperty(reactProperty) && + Object.prototype.hasOwnProperty.call( + DOMProperty.properties, + reactProperty + ) && DOMProperty.properties[reactProperty].hasBooleanValue ) { props[reactProperty] = true;
fix(attributes-to-props): fix lint error `no-prototype-builtins` After updating `eslint` from ^<I> to ^<I>, the following error appeared: ``` Disallow use of Object.prototypes builtins directly (no-prototype-builtins) ``` <URL>
remarkablemark_html-react-parser
train
js
d5b08094b77fbda1a8def9395849f4ae0b308158
diff --git a/src/Leevel/Cache/File.php b/src/Leevel/Cache/File.php index <HASH>..<HASH> 100644 --- a/src/Leevel/Cache/File.php +++ b/src/Leevel/Cache/File.php @@ -253,4 +253,5 @@ class File extends Connect implements IConnect } } -fns(create_file::class); +// import fn. +class_exists(create_file::class); diff --git a/src/Leevel/Collection/Collection.php b/src/Leevel/Collection/Collection.php index <HASH>..<HASH> 100644 --- a/src/Leevel/Collection/Collection.php +++ b/src/Leevel/Collection/Collection.php @@ -385,4 +385,5 @@ class Collection implements IArray, IJson, IteratorAggregate, ArrayAccess, Count } } -fns(type_these::class); +// import fn. +class_exists(type_these::class);
refactor(fn): use class_exits to import fn
hunzhiwange_framework
train
php,php
f8ef784cffff663cd4c5f0ec3ac493ef39e6040a
diff --git a/tsdb/shard.go b/tsdb/shard.go index <HASH>..<HASH> 100644 --- a/tsdb/shard.go +++ b/tsdb/shard.go @@ -1769,8 +1769,8 @@ func (fs *MeasurementFieldSet) SetMeasurementFieldSetWriter(queueLength int) { func (w *MeasurementFieldSetWriter) Close() { if w != nil { close(w.writeRequests) + w.wg.Wait() } - w.wg.Wait() } func (fs *MeasurementFieldSet) Save() error {
fix: don't access a field in a nil struct (#<I>) (#<I>) (cherry picked from commit aca<I>e<I>f<I>e<I>d<I>c<I>cd1db<I>)
influxdata_influxdb
train
go
2ee45be570095b0ea19aea1ae4445c2286e1b91e
diff --git a/src/Observer.js b/src/Observer.js index <HASH>..<HASH> 100755 --- a/src/Observer.js +++ b/src/Observer.js @@ -1,7 +1,7 @@ import Socket from 'socket.io-client'; import GlobalEmitter from './GlobalEmitter'; -export default class { +export default class Observer { constructor(connection, store) { if (typeof connection === 'string') { this.Socket = Socket(connection);
refactor: add class name to Observer
probil_vue-socket.io-extended
train
js
78795394dde18f2c9e9d01acbb9f89f9ea3b6ba8
diff --git a/internal/pipe/blob/upload.go b/internal/pipe/blob/upload.go index <HASH>..<HASH> 100644 --- a/internal/pipe/blob/upload.go +++ b/internal/pipe/blob/upload.go @@ -83,6 +83,7 @@ func doUpload(ctx *context.Context, conf config.Blob) error { artifact.ByType(artifact.Signature), artifact.ByType(artifact.Certificate), artifact.ByType(artifact.LinuxPackage), + artifact.ByType(artifact.SBOM), ) if len(conf.IDs) > 0 { filter = artifact.And(filter, artifact.ByIDs(conf.IDs...)) diff --git a/internal/pipe/release/release.go b/internal/pipe/release/release.go index <HASH>..<HASH> 100644 --- a/internal/pipe/release/release.go +++ b/internal/pipe/release/release.go @@ -155,6 +155,7 @@ func doPublish(ctx *context.Context, client client.Client) error { artifact.ByType(artifact.Signature), artifact.ByType(artifact.Certificate), artifact.ByType(artifact.LinuxPackage), + artifact.ByType(artifact.SBOM), ) if len(ctx.Config.Release.IDs) > 0 {
fix: upload sboms to release
goreleaser_goreleaser
train
go,go
7b2e5fa2d7085f8d0c800aa6ee1390e697112d6d
diff --git a/lib/config.js b/lib/config.js index <HASH>..<HASH> 100644 --- a/lib/config.js +++ b/lib/config.js @@ -19,7 +19,7 @@ var noop = function() {}; var LOCAL_UI_HOST_LIST = ['local.whistlejs.com', 'local.wproxy.org', 'rootca.pro']; var PLUGIN_RE = /^([a-z\d_\-]+)\.(.+)$/; var INTER_PORT_RE = /^(?:(\d{1,5})\.)?([a-z\d_\-]+)\.(.+)$/; -var idleTimeout = 60000; +var idleTimeout = 60000 * 3; var pluginMgr; var variableProperties = ['port', 'encrypted', 'ATS', 'sockets', 'timeout', 'dataDirname', 'storage', 'baseDir', 'username', 'password', 'uipath', 'debug', 'debugMode', 'localUIHost', 'extra', 'rules', 'values', 'dnsCache'];
refactor: Set idleTimeout = <I> * 3
avwo_whistle
train
js
1282cc53eca7abe53a062375f8ca54fb51ee277f
diff --git a/ui/src/directives/Intersection.js b/ui/src/directives/Intersection.js index <HASH>..<HASH> 100644 --- a/ui/src/directives/Intersection.js +++ b/ui/src/directives/Intersection.js @@ -31,10 +31,18 @@ function update (el, ctx, { modifiers, value }) { ctx.observer !== void 0 && ctx.observer.unobserve(el) ctx.observer = new IntersectionObserver(([ entry ]) => { - if ( - typeof ctx.handler === 'function' && - (el.__vue__ !== void 0 ? el.__vue__._inactive !== true : document.body.contains(el) === true) - ) { + if (typeof ctx.handler === 'function') { + // if observed element is part of a vue transition + // then we need to be careful... + if ( + entry.rootBounds === null && + (el.__vue__ !== void 0 ? el.__vue__._inactive !== true : document.body.contains(el) === true) + ) { + ctx.observer.unobserve(el) + ctx.observer.observe(el) + return + } + const res = ctx.handler(entry, ctx.observer) if (
fix(Intersection): correctly handle case when directive is applied to native element #<I>
quasarframework_quasar
train
js
86f1b44117580a66c639ebb327137b50dc414fe4
diff --git a/data/extract.py b/data/extract.py index <HASH>..<HASH> 100644 --- a/data/extract.py +++ b/data/extract.py @@ -2,6 +2,7 @@ import sys import json import os import distutils.core +from os.path import dirname, realpath if sys.version_info[:2] >= (3, 3): from importlib.machinery import SourceFileLoader @@ -32,6 +33,8 @@ except ImportError: @mock.patch.object(setuptools, 'setup') @mock.patch.object(distutils.core, 'setup') def invoke(mock1, mock2): + # Inserting the parent directory of the target setup.py in Python import path: + sys.path.append(dirname(realpath(sys.argv[-1]))) # This is setup.py which calls setuptools.setup load_source('_target_setup_', sys.argv[-1]) # called arguments are in `mock_setup.call_args`
fix(pip_setup): Allow setup.py to import stuff from their own package (#<I>)
renovatebot_renovate
train
py
29fd40213ab9ced535ac6ec5e499084b461a81a4
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 @@ -562,7 +562,8 @@ func (c *Cluster) DumpLogs(buildLog *buildlog.Log) { for _, cmd := range cmds { fmt.Fprintln(out, "HostID:", inst.ID, "-", cmd) fmt.Fprintln(out) - err := inst.Run(cmd, &Streams{Stdout: out, Stderr: out}) + script := fmt.Sprintf(`/usr/bin/env DISCOVERD="http://%s:1111" %s`, inst.IP, cmd) + err := inst.Run("bash", &Streams{Stdin: strings.NewReader(script), Stdout: out, Stderr: out}) fmt.Fprintln(out) if err != nil { return err
test: Set DISCOVERD when dumping logs Services now listen on the external VM IP since <I>f4.
flynn_flynn
train
go
a0fd72b6dd8f9ce890edefa877e8ea645f36b758
diff --git a/api/src/opentrons/hardware_control/simulator.py b/api/src/opentrons/hardware_control/simulator.py index <HASH>..<HASH> 100644 --- a/api/src/opentrons/hardware_control/simulator.py +++ b/api/src/opentrons/hardware_control/simulator.py @@ -5,7 +5,7 @@ from threading import Event from typing import Dict, Optional, List, Tuple from contextlib import contextmanager from opentrons import types -from opentrons.config.pipette_config import config_models +from opentrons.config.pipette_config import config_models, configs from opentrons.drivers.smoothie_drivers import SimulatingDriver from . import modules @@ -15,11 +15,17 @@ MODULE_LOG = logging.getLogger(__name__) def find_config(prefix: str) -> str: """ Find the most recent config matching `prefix` """ - matches = [conf for conf in config_models if conf.startswith(prefix)] + if prefix in config_models: + return prefix + + # We need to check for the nickname of pipettes if the prefix given + # is not the exact model. This is because gen2 nicknames are not + # subsets of gen2 pipette model strings. + matches = [conf for conf in config_models + if configs[conf]['name'].startswith(prefix)] + if not matches: raise KeyError('No match found for prefix {}'.format(prefix)) - if prefix in matches: - return prefix else: return sorted(matches)[0]
fix(api): apiv2: simulator should find pipettes by name versus model (#<I>) Due to the nickname not being a subset of the model name in gen2 anymore, the simulator for api v2 no longer recognized p<I>_single_gen2 as a valid name to load a pipette into a protocol context. This change looks through the `name` field of the model config in the simulator while loading the requested pipettes.
Opentrons_opentrons
train
py
d648ef85045fb97d8d1f6a637e915fa912a6c6c9
diff --git a/android/src/main/java/com/dylanvann/fastimage/FastImageViewConverter.java b/android/src/main/java/com/dylanvann/fastimage/FastImageViewConverter.java index <HASH>..<HASH> 100644 --- a/android/src/main/java/com/dylanvann/fastimage/FastImageViewConverter.java +++ b/android/src/main/java/com/dylanvann/fastimage/FastImageViewConverter.java @@ -55,7 +55,7 @@ class FastImageViewConverter { put("contain", ScaleType.FIT_CENTER); put("cover", ScaleType.CENTER_CROP); put("stretch", ScaleType.FIT_XY); - put("center", ScaleType.CENTER); + put("center", ScaleType.CENTER_INSIDE); }}; // Resolve the source uri to a file path that android understands.
fix(android): make center ResizeMode work correctly
DylanVann_react-native-fast-image
train
java
a0fc56fff167524c8d8d768196c1e7da9c2734bb
diff --git a/tests/test_settings.py b/tests/test_settings.py index <HASH>..<HASH> 100644 --- a/tests/test_settings.py +++ b/tests/test_settings.py @@ -57,6 +57,14 @@ def test_base_settings(): assert settings.sentry_release is None +def test_base_settings_apply(): + BaseSettings().apply() + + +def test_base_settings_apply_with_loggers(): + BaseSettings().apply(loggers=("aiohttp", "rororo")) + + def test_base_settings_from_env(monkeypatch): monkeypatch.setenv("DEBUG", "on") assert BaseSettings().debug is True
chore(settings): Cover applying settings with tests.
playpauseandstop_rororo
train
py
ed14752ba10f6f272924fc96df5eab4b58e85e86
diff --git a/lib/request.js b/lib/request.js index <HASH>..<HASH> 100644 --- a/lib/request.js +++ b/lib/request.js @@ -138,7 +138,7 @@ function truncEach (arr, len) { function capturePayload (endpoint, payload) { var dumpfile = path.join(os.tmpdir(), 'opbeat-' + endpoint + '-' + Date.now() + '.json') fs.writeFile(dumpfile, JSON.stringify(payload), function (err) { - if (err) debug('could not capture intake payload: %s', err.message) - else debug('intake payload captured: %s', dumpfile) + if (err) console.log('could not capture intake payload: %s', err.message) + else console.log('intake payload captured: %s', dumpfile) }) }
refactor(debug): always log OPBEAT_DEBUG_PAYLOAD info to STDOUT
opbeat_opbeat-node
train
js
cbdca3ec86c1697f8788669fae957d87973293eb
diff --git a/packages/components/bolt-image/src/image.js b/packages/components/bolt-image/src/image.js index <HASH>..<HASH> 100644 --- a/packages/components/bolt-image/src/image.js +++ b/packages/components/bolt-image/src/image.js @@ -86,7 +86,8 @@ class BoltImage extends withLitHtml() { onResize() { if ( this.isLoaded && - (this.getAttribute('sizes') === 'auto' || !this.getAttribute('sizes')) + (this.getAttribute('sizes') === 'auto' || !this.getAttribute('sizes')) && + this.offsetWidth > 0 ) { this.sizes = `${this.offsetWidth}px`; }
fix: only set 'sizes' if image has width, fixes fuzzy images in tabs
bolt-design-system_bolt
train
js
6afc2a38ba63b443771d2850fae3687f153ba097
diff --git a/tests/conftest.py b/tests/conftest.py index <HASH>..<HASH> 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -169,3 +169,11 @@ def erepo(repo_dir): yield repo finally: repo.tearDown() + + +@pytest.fixture(scope="session", autouse=True) +def _close_pools(): + from dvc.remote.pool import close_pools + + yield + close_pools()
test: close pools on tests cleanup This avoids weird errors as pools are collected by gc in broken env.
iterative_dvc
train
py
41673b738232f64da2ded3b15be0f798135ae351
diff --git a/src/structures/GuildChannel.js b/src/structures/GuildChannel.js index <HASH>..<HASH> 100644 --- a/src/structures/GuildChannel.js +++ b/src/structures/GuildChannel.js @@ -582,8 +582,7 @@ class GuildChannel extends Channel { * @returns {Promise<GuildChannel>} */ clone(options = {}) { - return this.guild.channels.create(options.name, { - name: this.name, + return this.guild.channels.create(options.name ?? this.name, { permissionOverwrites: this.permissionOverwrites, topic: this.topic, type: this.type,
fix(GuildChannel): clone errors when options.name isn't provided (#<I>)
discordjs_discord.js
train
js
4553965d9c4a8d99bd0d381c1180c08e07eff5fd
diff --git a/decompress_zip.go b/decompress_zip.go index <HASH>..<HASH> 100644 --- a/decompress_zip.go +++ b/decompress_zip.go @@ -74,7 +74,9 @@ func (d *ZipDecompressor) Decompress(dst, src string, dir bool, umask os.FileMod // Open the file for reading srcF, err := f.Open() if err != nil { - srcF.Close() + if srcF != nil { + srcF.Close() + } return err }
fix(decompresser_zip): fix panic when decompressing protected zip file (#<I>) (#<I>)
hashicorp_go-getter
train
go
fffd8f820f9d6ba6bcecc21f3fd78ab75bde3c30
diff --git a/scripts/gulp-utils.js b/scripts/gulp-utils.js index <HASH>..<HASH> 100644 --- a/scripts/gulp-utils.js +++ b/scripts/gulp-utils.js @@ -181,7 +181,7 @@ exports.addClosurePrefixes = function() { 'goog.provide(\'' + closureModuleName + '\');', requires, file.contents.toString(), - closureModuleName + '= angular.module(' + moduleInfo.module + ');' + closureModuleName + ' = angular.module(' + moduleInfo.module + ');' ].join('\n')); } this.push(file);
chore(build): adds space in closure transform method
angular_material
train
js
d4d11d826e294a0333f6009dc074f5e28f4a4b75
diff --git a/test/functional/readpreference_tests.js b/test/functional/readpreference_tests.js index <HASH>..<HASH> 100644 --- a/test/functional/readpreference_tests.js +++ b/test/functional/readpreference_tests.js @@ -55,7 +55,7 @@ describe('ReadPreference', function() { * @ignore */ it('Should correctly apply collection level read Preference to group', { - metadata: { requires: { mongodb: '>=2.6.0,<=4.1.1', topology: ['single', 'ssl'] } }, + metadata: { requires: { mongodb: '>=2.6.0,<=4.0.x', topology: ['single', 'ssl'] } }, // The actual test we wish to run test: function(done) {
test(read-preference): don't test group command on mdb <I>+
mongodb_node-mongodb-native
train
js
50e6d7b9e1db7cededf59d7387885ae740321417
diff --git a/index.js b/index.js index <HASH>..<HASH> 100644 --- a/index.js +++ b/index.js @@ -29,8 +29,8 @@ require('./lib/rollbar') const conn = await amqp.connect(env.AMQP_URL) const channel = await conn.createChannel() - // only allow 128 items to pile up - channel.prefetch(128) + // only allow 256 items to pile up + channel.prefetch(256) // 5 different prios because order matters // e.g. always sync before everything else @@ -67,8 +67,12 @@ require('./lib/rollbar') if (env.NODE_ENV !== 'testing') { setInterval(function collectAccountQueueStats () { - statsd.gauge('queues.account-jobs', Object.keys(queues).length) - }, 5000) + const queueKeys = Object.keys(queues) + statsd.gauge('queues.account-jobs', queueKeys.length) + queueKeys.map((queueId) => { + statsd.gauge('queues.account-jobs-by-job', queues[queueId].length || 0, { tag: queueId }) + }) + }, 20000) } if (env.IS_ENTERPRISE) {
feat: collect per-user queue metrics, handle more concurrent jobs
greenkeeperio_greenkeeper
train
js
5847f0d31b025ed2d503ed167023abcf9a70c268
diff --git a/lib/handlers/file-proxy.js b/lib/handlers/file-proxy.js index <HASH>..<HASH> 100644 --- a/lib/handlers/file-proxy.js +++ b/lib/handlers/file-proxy.js @@ -191,6 +191,7 @@ module.exports = function(req, res, next) { if (range) { headers['content-range'] = 'bytes ' + (range.start + '-' + range.end) + '/' + size; headers['accept-ranges'] = 'bytes'; + headers['content-length'] = range.end - range.start + 1; reader.statusCode = 206; } res.response(reader); diff --git a/lib/util/index.js b/lib/util/index.js index <HASH>..<HASH> 100644 --- a/lib/util/index.js +++ b/lib/util/index.js @@ -2242,6 +2242,7 @@ exports.parseRange = function(req, size) { start = Math.min(s, start); end = Math.max(end, e); }); + end = Math.min(size, end); if (start < 0 || end < 0 || start > end) { return; }
feat: supports response `<I> Partial Content` in Map Local
avwo_whistle
train
js,js
b6a64d342ff93ca1b9cc76d010603a28d610f56a
diff --git a/src/ModuleRepository.php b/src/ModuleRepository.php index <HASH>..<HASH> 100644 --- a/src/ModuleRepository.php +++ b/src/ModuleRepository.php @@ -135,7 +135,9 @@ class ModuleRepository $sortedModules = []; foreach ($sorting AS $moduleName) { - $sortedModules[$moduleName] = $this->modules[$moduleName]; + if ($this->moduleExist($moduleName)) { + $sortedModules[$moduleName] = $this->modules[$moduleName]; + } } $this->modules = $sortedModules;
fix: trying to sort module that already doesn't exists (but persist in cache) - ex.: while removing module from composer
grape-fluid_grape-fluid
train
php
4947d0d5f954947b723dc099f3d9f9557088cfbb
diff --git a/lib/mainstreet/address_verifier.rb b/lib/mainstreet/address_verifier.rb index <HASH>..<HASH> 100644 --- a/lib/mainstreet/address_verifier.rb +++ b/lib/mainstreet/address_verifier.rb @@ -43,7 +43,9 @@ module MainStreet end def result - @result ||= begin + return @result if defined?(@result) + + @result = begin options = {lookup: lookup} options[:country] = @country if @country && !usa? # don't use smarty streets zipcode only API
fix: Prevent repeat search calls when result is nil (#<I>)
ankane_mainstreet
train
rb
bee6a9747950d0eacc9373e55742728ce4799f51
diff --git a/.eslintrc b/.eslintrc index <HASH>..<HASH> 100644 --- a/.eslintrc +++ b/.eslintrc @@ -1,5 +1,5 @@ { - "extends": "airbnb/base", + "extends": "airbnb/legacy", "rules": { "no-console": 0, "spaced-comment": 0, diff --git a/lib/index.js b/lib/index.js index <HASH>..<HASH> 100644 --- a/lib/index.js +++ b/lib/index.js @@ -1,5 +1,5 @@ /* (c) 2015 Ari Porad (@ariporad) <http://ariporad.com>. License: ariporad.mit-license.org */ -const Promise = require('bluebird'); +//var Promise = require('bluebird'); module.exports = function doSomething() { diff --git a/test/_setup.js b/test/_setup.js index <HASH>..<HASH> 100644 --- a/test/_setup.js +++ b/test/_setup.js @@ -7,4 +7,4 @@ chai.use(require('chai-as-promised')); chai.should(); global.expect = chai.expect; -global.assert = chai.assert; \ No newline at end of file +global.assert = chai.assert;
chore: fix eslint (this doesn't use ES6)
ariporad_pirates
train
eslintrc,js,js
32b016001a16e365315fd9a2465a5feb153afea5
diff --git a/ui/src/components/table/QTable.js b/ui/src/components/table/QTable.js index <HASH>..<HASH> 100644 --- a/ui/src/components/table/QTable.js +++ b/ui/src/components/table/QTable.js @@ -562,7 +562,7 @@ export default createComponent({ topSelection = slots[ 'top-selection' ], hasSelection = hasSelectionMode.value === true && topSelection !== void 0 - && rowsSelectedNumber.vaue > 0, + && rowsSelectedNumber.value > 0, topClass = 'q-table__top relative-position row items-center' if (top !== void 0) {
fix(QTable): top-selection slot not being rendered correctly #<I>
quasarframework_quasar
train
js
363d17bae07cc0c90bf14eb9caa98954b3a1cc8a
diff --git a/src/Hash/Drivers/Bcrypt.js b/src/Hash/Drivers/Bcrypt.js index <HASH>..<HASH> 100644 --- a/src/Hash/Drivers/Bcrypt.js +++ b/src/Hash/Drivers/Bcrypt.js @@ -32,8 +32,8 @@ class Bcrypt { * * @return {String} */ - make (value, config = {}) { - const round = config.round || 10 + make (value, config) { + const round = config.round || config || 10 return new Promise(function (resolve, reject) { bcrypt.hash(value, round, function (error, hash) {
feat(hash): remove breaking change for bcrypt driver
adonisjs_adonis-framework
train
js
cd71e5dd52c3f5facb576baafc5ad19f03e56949
diff --git a/google-cloud-dialogflow/synth.py b/google-cloud-dialogflow/synth.py index <HASH>..<HASH> 100644 --- a/google-cloud-dialogflow/synth.py +++ b/google-cloud-dialogflow/synth.py @@ -27,7 +27,7 @@ library = gapic.ruby_library( generator_args={ "ruby-cloud-gem-name": "google-cloud-dialogflow", "ruby-cloud-title": "Dialogflow", - "ruby-cloud-description": "Dialogflow is an end-to-end, build-once deploy-everywhere development suite for creating conversational interfaces for websites, mobile applications, popular messaging platforms, and IoT devices. You can use it to build interfaces (such as chatbots and conversational IVR) that enable natural and rich interactions between your users and your business.", + "ruby-cloud-description": "Dialogflow is an end-to-end, build-once deploy-everywhere development suite for creating conversational interfaces for websites, mobile applications, popular messaging platforms, and IoT devices. You can use it to build interfaces (such as chatbots and conversational IVR) that enable natural and rich interactions between your users and your business. This client is for Dialogflow ES, providing the standard agent type suitable for small and simple agents.", "ruby-cloud-env-prefix": "DIALOGFLOW", "ruby-cloud-wrapper-of": "v2:0.8", "ruby-cloud-product-url": "https://cloud.google.com/dialogflow",
chore(dialogflow): Update synth file to add a note about ES to the gem description (#<I>)
googleapis_google-cloud-ruby
train
py
380e0eee27fd1c2e806d7d1e74b3f98ab84b2009
diff --git a/test/runner/config.js b/test/runner/config.js index <HASH>..<HASH> 100644 --- a/test/runner/config.js +++ b/test/runner/config.js @@ -97,9 +97,6 @@ class NativeConfiguration { newTopology(host, port, options) { options = Object.assign({}, options); - host = host || this.options.host; - port = port || this.options.port; - const hosts = host == null ? [].concat(this.options.hosts) : [{ host, port }]; if (this.usingUnifiedTopology()) { return new core.Topology(hosts, options);
test: `newTopology` should use all hosts from a connection string If no host or port is provided, then `newTopology` should use all hosts provided in a connection string.
mongodb_node-mongodb-native
train
js
7d27acd1b01cbe81e98784f34a077e3c5e6e1fc1
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 @@ -86,7 +86,7 @@ export default { cursor: 'pointer', outline: 'none', - // > __icon + // __icon '&:hover > div': { background: core.colors.gray03 } @@ -110,7 +110,12 @@ export default { paddingRight: core.layout.spacingMedium }, [`.psds-tab__overflow-button.psds-theme--${themeNames.light}`]: { - color: core.colors.gray06 + color: core.colors.gray06, + + // __icon + '&:hover > div': { + background: core.colors.gray01 + } }, [`.psds-tab__overflow-button--left.psds-theme--${themeNames.light}`]: { background: `linear-gradient(to left, transparent, ${transparentize( @@ -124,6 +129,7 @@ export default { core.colors.white )} 50%)` }, + '.psds-tab__overflow-button__icon': { display: 'flex', alignItems: 'center',
fix(tab): make the light theme overflow button correct
pluralsight_design-system
train
js
c01bc6c6fdf327e5de57eab2bda997ad551430c2
diff --git a/index.js b/index.js index <HASH>..<HASH> 100644 --- a/index.js +++ b/index.js @@ -1,6 +1,7 @@ 'use strict'; var cycle = require('cycle'); +var util = require('util') // // Expose base Transport
fix: require 'util' (#7) util.inspect is used in index.js but `util` is previously not required, causing error.
winstonjs_winston-compat
train
js
0b64280cd08d2a2e82c5a34e075209be1c91c1d7
diff --git a/build/bin/build-entry.js b/build/bin/build-entry.js index <HASH>..<HASH> 100644 --- a/build/bin/build-entry.js +++ b/build/bin/build-entry.js @@ -9,6 +9,7 @@ var IMPORT_TEMPLATE = 'import {{name}} from \'../packages/{{package}}\';'; var ISNTALL_COMPONENT_TEMPLATE = ' Vue.component({{name}}.name, {{name}});'; var MAIN_TEMPLATE = `{{include}} import '../src/assets/font/iconfont.css'; +import merge from './utils/merge'; const version = '{{version}}'; const install = function(Vue, config = {}) { @@ -16,11 +17,10 @@ const install = function(Vue, config = {}) { {{install}} Vue.use(InfiniteScroll); - Vue.use(Lazyload, { + Vue.use(Lazyload, merge({ loading: require('./assets/loading-spin.svg'), - attempt: 3, - ...config.lazyload - }); + attempt: 3 + }, config.lazyload)); Vue.$messagebox = Vue.prototype.$messagebox = MessageBox; Vue.$toast = Vue.prototype.$toast = Toast;
fix: … will transform to Object.assign by buble (#<I>)
wisedu_bh-mint-ui2
train
js
18f6332acec4a6c92388b3f6efad291b0f3473b2
diff --git a/packages/site/pages/components/row.js b/packages/site/pages/components/row.js index <HASH>..<HASH> 100644 --- a/packages/site/pages/components/row.js +++ b/packages/site/pages/components/row.js @@ -179,7 +179,7 @@ export default withServerProps(_ => ( 'row title or linked title' ]), PropTypes.row([ - 'truncatedTitle', + 'titleTruncated', 'boolean', null, <code>false</code>,
fix(site): row titleTruncated typo Fixes: #<I>
pluralsight_design-system
train
js
3c309f06d46ea211ad6f329fe000ad2d23ef00c9
diff --git a/tests/TestCase.php b/tests/TestCase.php index <HASH>..<HASH> 100644 --- a/tests/TestCase.php +++ b/tests/TestCase.php @@ -13,7 +13,6 @@ declare(strict_types=1); namespace ArkEcosystem\Tests\Client; -use GuzzleHttp\Client; use GuzzleHttp\HandlerStack; use GuzzleHttp\Psr7\Request; use GuzzleHttp\Psr7\Response;
style: Apply fixes from StyleCI (#<I>)
ArkEcosystem_php-client
train
php
58c25beeb62039d0702dee3ed033c204debd18ca
diff --git a/lib/plugins/index.js b/lib/plugins/index.js index <HASH>..<HASH> 100644 --- a/lib/plugins/index.js +++ b/lib/plugins/index.js @@ -19,7 +19,11 @@ module.exports = (context, pluginsPath) => { if (isPlainObject(plugin)) { Object.entries(plugin).forEach(([type, func]) => { if (PLUGINS_DEFINITIONS[type]) { - Reflect.defineProperty(func, 'pluginName', {value: 'Inline plugin', writable: false, enumerable: true}); + Reflect.defineProperty(func, 'pluginName', { + value: isPlainObject(name) ? 'Inline plugin' : name, + writable: false, + enumerable: true, + }); plugins[type] = [...(PLUGINS_DEFINITIONS[type].multiple ? plugins[type] || [] : []), [func, config]]; } });
fix: fix logs for plugins loaded with `plugins` option
semantic-release_semantic-release
train
js
15b0ceeb7cd278bb0c2fcf9af19247acf12f9e09
diff --git a/src/Leevel/Console/Application.php b/src/Leevel/Console/Application.php index <HASH>..<HASH> 100644 --- a/src/Leevel/Console/Application.php +++ b/src/Leevel/Console/Application.php @@ -79,8 +79,6 @@ class Application extends SymfonyApplication /** * 返回应用容器. - * - * @return \Leevel\Di\Container */ public function getContainer(): IContainer {
chore(console): fix for phpstan level 3
hunzhiwange_framework
train
php
9166a3c062cb988a9d0a92ff9e74c2635c98b62a
diff --git a/src/services/localeService.js b/src/services/localeService.js index <HASH>..<HASH> 100644 --- a/src/services/localeService.js +++ b/src/services/localeService.js @@ -6,25 +6,32 @@ angular 'use strict'; - var localeData = $window.cc.Lang; - var self = {}; - self.getTranslation = function (path) { + self.translationData = {}; + + // Call this in your app's run phase to use your global translation object + self.setTranslationData = function (obj) { + self.translationData = obj; + }; + + self.getTranslation = function (path, failSilent) { if (!path) { - return localeData; + return self.translationData; } var objects = path.split('.'); var locale = ''; var length = objects.length; - var ln = localeData; + var ln = self.translationData; objects.every(function (el, i) { try { if (!ln[el]) { - throw new Error('No translation found for: "' + el + '"'); + if (!failSilent) { + throw new Error('No translation found for: "' + el + '"'); + } } else { if (i + 1 !== length) { ln = ln[el];
feat(localeService): make service configurable and add option to fail silently
sofa_angular-sofa-template-code
train
js
56e5c0b218e729514790564e5b0746bd2dad1683
diff --git a/algolia/search/responses_search.go b/algolia/search/responses_search.go index <HASH>..<HASH> 100644 --- a/algolia/search/responses_search.go +++ b/algolia/search/responses_search.go @@ -9,7 +9,7 @@ import ( type QueryRes struct { AppliedRules []AppliedRule `json:"appliedRules"` AroundLatLng string `json:"aroundLatLng"` - AutomaticRadius string `json:"automaticRadius"` + AutomaticRadius float64 `json:"automaticRadius"` ExhaustiveFacetsCount bool `json:"exhaustiveFacetsCount"` ExhaustiveNbHits bool `json:"exhaustiveNbHits"` Explain map[string]map[string]interface{} `json:"explain"`
fix(response): AutomaticRadius is a float not a string
algolia_algoliasearch-client-go
train
go
f41f8cac08604370b78acea157346cccff88222c
diff --git a/lib/driver.js b/lib/driver.js index <HASH>..<HASH> 100644 --- a/lib/driver.js +++ b/lib/driver.js @@ -857,9 +857,9 @@ class XCUITestDriver extends BaseDriver { const runOpts = { scaleFactor: this.opts.scaleFactor, connectHardwareKeyboard: !!this.opts.connectHardwareKeyboard, - pasteboardAutomaticSync: this.opts.simulatorPasteboardAutomaticSync || 'off', + pasteboardAutomaticSync: this.opts.simulatorPasteboardAutomaticSync ?? 'off', isHeadless: !!this.opts.isHeadless, - tracePointer: !!this.opts.simulatorTracePointer, + tracePointer: this.opts.simulatorTracePointer, devicePreferences: {}, };
chore: Do not enforce trace pointer setting (#<I>)
appium_appium-xcuitest-driver
train
js
56f449335f87e0f4189449e63d8c2f221a5482a7
diff --git a/examples/.ipython_config.py b/examples/.ipython_config.py index <HASH>..<HASH> 100644 --- a/examples/.ipython_config.py +++ b/examples/.ipython_config.py @@ -1,3 +1,3 @@ -c.InteractiveShellApp.exec_lines = [ +c.InteractiveShellApp.exec_lines = [ # noqa 'from pathlib import Path; import sys; sys.path.append(str((Path(__file__).parent / "..").resolve()))' ]
chore: ignore error checking for this config file (main)
nok_sklearn-porter
train
py
fe14afff6fdf46f1b1dda0f2643cd29a0b841595
diff --git a/cocaine/tools/dispatcher.py b/cocaine/tools/dispatcher.py index <HASH>..<HASH> 100644 --- a/cocaine/tools/dispatcher.py +++ b/cocaine/tools/dispatcher.py @@ -220,7 +220,7 @@ def metrics(options): """Show services metrics """ options.executor.executeAction('metrics', **{ - 'runtime': options.getService('metrics'), + 'metrics': options.getService('metrics'), })
fix(tools): misprint - runtime->metrics
cocaine_cocaine-tools
train
py
79575e16bf8d64f4eefd237f25000d9aae01edab
diff --git a/packages/testing-helpers/src/litFixture.js b/packages/testing-helpers/src/litFixture.js index <HASH>..<HASH> 100644 --- a/packages/testing-helpers/src/litFixture.js +++ b/packages/testing-helpers/src/litFixture.js @@ -70,7 +70,7 @@ export async function litFixture(template, options = {}) { const [node] = /** @type {T[]} */ (Array.from(el.shadowRoot.childNodes).filter(isUsefulNode)); - await elementUpdated(node.firstElementChild); + await elementUpdated(node); return node; }
fix(testing-helpers): await to the wrong element In case scopedElements litFixture was awaiting for element update of node.firstElementChild which was null instead of node.
open-wc_open-wc
train
js
5d74650195cea3341f474915df3a17d99ebc5e6f
diff --git a/lib/datasource/npm/npmrc.js b/lib/datasource/npm/npmrc.js index <HASH>..<HASH> 100644 --- a/lib/datasource/npm/npmrc.js +++ b/lib/datasource/npm/npmrc.js @@ -22,7 +22,7 @@ function setNpmrc(input) { const existingNpmrc = npmrc; npmrcRaw = input; logger.debug('Setting npmrc'); - npmrc = ini.parse(input); + npmrc = ini.parse(input.replace(/\\n/g, '\n')); // massage _auth to _authToken for (const [key, val] of Object.entries(npmrc)) { // istanbul ignore if
fix(npm): handle npmrc newline characters Replace \n chars with newlines in npmrc before sending to ini.parse(). Closes #<I>
renovatebot_renovate
train
js
22c74b435ebbd1c8bd8af04f9570e2e0317053a4
diff --git a/stories/Parallax.stories.js b/stories/Parallax.stories.js index <HASH>..<HASH> 100644 --- a/stories/Parallax.stories.js +++ b/stories/Parallax.stories.js @@ -12,13 +12,25 @@ stories.addParameters({ stories.add('Default', () => ( <div> - <Parallax imageSrc="http://materializecss.com/images/parallax1.jpg"/> + <Parallax + image={ + <img src="http://materializecss.com/images/parallax1.jpg" alt="" /> + } + /> <div className="section white"> <div className="row container"> <h2 className="header">Parallax</h2> - <p className="grey-text text-darken-3 lighten-3">Parallax is an effect where the background content or image in this case, is moved at a different speed than the foreground content while scrolling.</p> + <p className="grey-text text-darken-3 lighten-3"> + Parallax is an effect where the background content or image in this + case, is moved at a different speed than the foreground content while + scrolling. + </p> </div> </div> - <Parallax imageSrc="http://materializecss.com/images/parallax2.jpg"/> + <Parallax + image={ + <img src="http://materializecss.com/images/parallax2.jpg" alt="" /> + } + /> </div> ));
fix: Parallax story now uses the correct props
react-materialize_react-materialize
train
js
f07ef31f1c33c76cb338adb38c99cd04490485e3
diff --git a/lib/Linting.js b/lib/Linting.js index <HASH>..<HASH> 100644 --- a/lib/Linting.js +++ b/lib/Linting.js @@ -72,6 +72,10 @@ export default function Linting( } }); + eventBus.on('diagram.clear', function() { + self.clearIssues(); + }); + this._init(); };
fix(Linting): clear issues on diagram.clear
bpmn-io_bpmn-js-bpmnlint
train
js
43eb8b711ab9d1eda9f2dafe138cd6f5d2c3e935
diff --git a/client.go b/client.go index <HASH>..<HASH> 100644 --- a/client.go +++ b/client.go @@ -17,7 +17,7 @@ import ( const ( deprecatedSuffix = "/features" clientName = "unleash-client-go" - clientVersion = "3.3.0" + clientVersion = "3.3.1" ) var defaultStrategies = []strategy.Strategy{
chore: release <I> (#<I>)
Unleash_unleash-client-go
train
go
05a917e1239b27be748b9d61d516ac2069d638e1
diff --git a/lib/gh/response.rb b/lib/gh/response.rb index <HASH>..<HASH> 100644 --- a/lib/gh/response.rb +++ b/lib/gh/response.rb @@ -26,7 +26,7 @@ module GH when respond_to(:to_str) then @body = body.to_str when respond_to(:to_hash) then @data = body.to_hash when respond_to(:to_ary) then @data = body.to_ary - when nil then @data = {} + when nil, '' then @data = {} else raise ArgumentError, "cannot parse #{body.inspect}" end
fix(response): handle empty string commits lostisland/faraday@f<I>ffaabb<I>d<I>c<I>a<I>e6a<I> changed the net-http adapter to return empty strings for empty bodies instead of nil, which then causes the JSON parser to error when attempting to parse it, since an empty string is not valid JSON.
travis-ci_gh
train
rb
5534de418b1646953e62564bea6058c0bcd3c420
diff --git a/actor-apps/core-js/src/main/java/im/actor/model/js/providers/notification/JsManagedNotification.java b/actor-apps/core-js/src/main/java/im/actor/model/js/providers/notification/JsManagedNotification.java index <HASH>..<HASH> 100644 --- a/actor-apps/core-js/src/main/java/im/actor/model/js/providers/notification/JsManagedNotification.java +++ b/actor-apps/core-js/src/main/java/im/actor/model/js/providers/notification/JsManagedNotification.java @@ -29,7 +29,7 @@ public class JsManagedNotification { } }; - var MAX_DEFER = 3000; + var MAX_DEFER = 300; var deferStart = null; var deferredShow = null; @@ -48,7 +48,7 @@ public class JsManagedNotification { } else { deferredShow = setTimeout(function () { showNotification(title, body, icon) - }, 1000) + }, 300) } };
fix(js): Redice notification delays
actorapp_actor-platform
train
java
b3e6b1d7c894216c4b26d1a9bbdd3dece2836c63
diff --git a/test/test-script-only.js b/test/test-script-only.js index <HASH>..<HASH> 100644 --- a/test/test-script-only.js +++ b/test/test-script-only.js @@ -7,7 +7,7 @@ require('./build-example')(['--scripts'], function(er) { var info = require(path.resolve('package.json')); assert.equal(info.name, 'loopback-example-app'); - var gitLsOutput = shell.exec('git ls-tree -r --name-only deploy').output; + var gitLsOutput = shell.exec('git ls-tree -r --long deploy').output; var paths = gitLsOutput.split('\n'); var bundled = paths.filter(function(path) { return path.match(/node_modules/);
test: improve debugability of test-script-only I added this in an effort to track down why it was failing, despite a manual incocation afterwards clearly showing the syslog paths that the test is failing to find. For some reason, however, I can't reproduce the error after adding this.. so.. ¯\_(ツ)_/¯
strongloop_strong-build
train
js
9e5be2c744bd88d32064d9ccdba342cc8392da09
diff --git a/lib/github-queue.js b/lib/github-queue.js index <HASH>..<HASH> 100644 --- a/lib/github-queue.js +++ b/lib/github-queue.js @@ -42,7 +42,8 @@ function getGitHubMethod (gen) { } function write (installationId, gen) { - statsd.increment('queues.github_write_requests', [installationId, getGitHubMethod(gen)]) + statsd.increment('queues.github_write_requests') + statsd.gauge('queues.github_write_requests_tagged', [installationId, getGitHubMethod(gen)]) const stats = { type: 'write', queued: Date.now() @@ -75,7 +76,8 @@ function write (installationId, gen) { } function read (installationId, gen) { - statsd.increment('queues.github_read_requests', [installationId, getGitHubMethod(gen)]) + statsd.increment('queues.github_read_requests') + statsd.gauge('queues.github_read_requests_tagged', [installationId, getGitHubMethod(gen)]) const stats = { type: 'read', queued: Date.now()
feat: turns out you can’s tag increments
greenkeeperio_greenkeeper
train
js
448212de0c2938b248dde7f7fae8b3c4ebd13457
diff --git a/test/ctor.js b/test/ctor.js index <HASH>..<HASH> 100644 --- a/test/ctor.js +++ b/test/ctor.js @@ -50,6 +50,17 @@ describe('ActiveDirectory', function() { assert((defaultAttributes.user || []).length > 0); done(); }); + it('should throw an InvalidCredentialsError exception if the username/password are incorrect.', function(done) { + var ad = new ActiveDirectory(_.extend({}, config, { + password: 'TheWrongPassword!', + username: 'AnInvalidUsername', + })); + ad.findUser('unknown', function(err, user) { + assert.notEqual(null, err); + assert.equal(err.name, 'InvalidCredentialsError'); + done(); + }); + }); }); });
test: Excepted exception/err when invalid username/password provided.
gheeres_node-activedirectory
train
js
77f7a8d1134805bde207cd3f42e77e50066a6d20
diff --git a/dramatiq/__main__.py b/dramatiq/__main__.py index <HASH>..<HASH> 100644 --- a/dramatiq/__main__.py +++ b/dramatiq/__main__.py @@ -25,15 +25,18 @@ verbosity = { def import_broker(value): - module, name = value, None + modname, varname = value, None if ":" in value: - module, name = value.split(":", 1) + modname, varname = value.split(":", 1) - module = importlib.import_module(module) - if name is not None: - broker = getattr(module, name, None) + module = importlib.import_module(modname) + if varname is not None: + if not hasattr(module, varname): + raise ImportError(f"Module {modname!r} does not define a {varname!r} variable.") + + broker = getattr(module, varname) if not isinstance(broker, Broker): - raise ImportError(f"{value!r} is not a Broker") + raise ImportError(f"Variable {varname!r} from module {modname!r} is not a Broker.") return broker return get_broker() @@ -83,6 +86,9 @@ def worker_process(args, worker_id, logging_fd): worker = Worker(broker, worker_threads=args.threads) worker.start() + except ImportError as e: + logger.critical(e) + return os._exit(1) except ConnectionError as e: logger.critical("Broker connection failed. %s", e) return os._exit(1)
fix: handle import errors more gracefully in main
Bogdanp_dramatiq
train
py
eadf70bc044c9f0107adc0617fe2162a0fa24e0e
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -1,4 +1,4 @@ -from distutils.core import setup +from setuptools import setup setup( name = 'pods', packages = ['pods'], # this must be the same as the name above
fix: pkg: New using setuptools for setup
sods_ods
train
py
9f93ef3c3a298d5bab480fe5281e65cbe78117fa
diff --git a/scripts/release/cp-pkgs.js b/scripts/release/cp-pkgs.js index <HASH>..<HASH> 100644 --- a/scripts/release/cp-pkgs.js +++ b/scripts/release/cp-pkgs.js @@ -59,19 +59,14 @@ function cpAsset(asset) { let basename = path.basename(asset); const extname = path.extname(asset); - const isMap = extname === '.map'; const isJs = extname === '.js'; const isEs = basename.includes('.es'); const isCss = basename.includes('.css'); - if (!isEs && !isCss && (isJs || isMap )) { - if (isMap) { - basename = 'index.js.map'; + if (!isEs && !isCss && isJs) { + if (basename.includes('.min')) { + basename = 'index.min.js'; } else { - if (basename.includes('.min')) { - basename = 'index.min.js'; - } else { - basename = 'index.js'; - } + basename = 'index.js'; } }
fix(infrastructure): fix source mappings under dist directory (#<I>)
material-components_material-components-web-react
train
js
3813f0b6736966dffc0f71f9886af645af26baa8
diff --git a/src/components/layout/QLayoutDrawer.js b/src/components/layout/QLayoutDrawer.js index <HASH>..<HASH> 100644 --- a/src/components/layout/QLayoutDrawer.js +++ b/src/components/layout/QLayoutDrawer.js @@ -330,6 +330,7 @@ export default { this.applyBackdrop(0) this.applyPosition(this.stateDirection * width) el.classList.remove('q-layout-drawer-delimiter') + document.body.classList.remove(bodyClassBelow) } }) return
fix(QLayoutDrawer): overflow:hidden lingers after closing a drawer by dragging #<I>
quasarframework_quasar
train
js
78d3a5136aef0b2faf2abfbdd9da4774a034ac34
diff --git a/components/button/index.js b/components/button/index.js index <HASH>..<HASH> 100644 --- a/components/button/index.js +++ b/components/button/index.js @@ -52,15 +52,9 @@ export default class Button extends Intact { } _mount() { - let parentVNode = this.parentVNode; - - while (parentVNode && parentVNode.tag !== Group) { - parentVNode = parentVNode.parentVNode; - } - - if (parentVNode) { - this.group = parentVNode.children; + this._findGroup(); + if (this.group) { this.set({ _checkType: this.group.get('checkType'), _value: this.group.get('value') @@ -69,6 +63,9 @@ export default class Button extends Intact { } _beforeUpdate() { + // we need recheck the group, #402 + this._findGroup(); + if (this.group) { this.set({ _checkType: this.group.get('checkType'), @@ -77,6 +74,16 @@ export default class Button extends Intact { } } + _findGroup() { + let parentVNode = this.parentVNode; + + while (parentVNode && parentVNode.tag !== Group) { + parentVNode = parentVNode.parentVNode; + } + + this.group = parentVNode ? parentVNode.children : null; + } + showLoading() { this.set('loading', true); }
fix(Button): can not update the group state, close #<I>
ksc-fe_kpc
train
js
d6b717f945c9deeba0cc6e0f23efe895e9464c3c
diff --git a/src/handle-runtime-problems.js b/src/handle-runtime-problems.js index <HASH>..<HASH> 100644 --- a/src/handle-runtime-problems.js +++ b/src/handle-runtime-problems.js @@ -22,7 +22,7 @@ module.exports = function handleRuntimeProblems(blueprintData) { const ranges = blueprintUtils.warningLocationToRanges(annotation.location, apiDescriptionDocument); message = `Parser ${annotation.type} in file '${filename}': ${annotation.message}`; if (ranges && ranges.length) { - message += `on ${blueprintUtils.rangesToLinesText(ranges)}`; + message += ` on ${blueprintUtils.rangesToLinesText(ranges)}`; } log(message); } else {
chore: Adding space before error line number
apiaryio_dredd
train
js