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
8acf18fe820bed72e6957ed2f7686d37430b178b
diff --git a/src/link-handler.js b/src/link-handler.js index <HASH>..<HASH> 100644 --- a/src/link-handler.js +++ b/src/link-handler.js @@ -82,10 +82,10 @@ export class DefaultLinkHandler extends LinkHandler { info.anchor = target; info.href = href; - let hasModifierKey = (event.altKey || event.ctrlKey || event.metaKey || event.shiftKey); + let leftButtonClicked = event.which === 1; let isRelative = href && !(href.charAt(0) === '#' || (/^[a-z]+:/i).test(href)); - info.shouldHandleEvent = !hasModifierKey && isRelative; + info.shouldHandleEvent = leftButtonClicked && isRelative; return info; }
fix(history-browser): open link in new tab when it clicked with middle button
aurelia_history-browser
train
js
756540ed396be80308975fb5c092796dd3f54a58
diff --git a/python_modules/dagster/dagster/core/definitions/decorators/repository_decorator.py b/python_modules/dagster/dagster/core/definitions/decorators/repository_decorator.py index <HASH>..<HASH> 100644 --- a/python_modules/dagster/dagster/core/definitions/decorators/repository_decorator.py +++ b/python_modules/dagster/dagster/core/definitions/decorators/repository_decorator.py @@ -204,7 +204,7 @@ def repository( def lazy_loaded_repository(): return { 'jobs': {'expensive_job': make_expensive_job}, - 'schedules': {'expensive_schedule: make_expensive_schedule} + 'schedules': {'expensive_schedule': make_expensive_schedule} }
docs: fix example with lazy loading repository (#<I>)
dagster-io_dagster
train
py
f9f3be9ec78fb3451e34320293fc2e17df247d0c
diff --git a/packages/components/bolt-navlink/navlink.js b/packages/components/bolt-navlink/navlink.js index <HASH>..<HASH> 100644 --- a/packages/components/bolt-navlink/navlink.js +++ b/packages/components/bolt-navlink/navlink.js @@ -44,8 +44,14 @@ class BoltNavLink extends BoltComponent() { } } - onClick() { - if (!this.props.active) { + onClick(event) { + // prevent browser default if we're smooth scrolling to a navlink. this ensures a smoother, less jumpy animation in browsers (like Safari) + if (this._shadowLink.getAttribute('href').indexOf('#') !== -1){ + event.preventDefault(); + } + + // manually add smooth scroll to dropdown links since these are added to the page AFTER smooth scroll event bindings would hae been added. + if (!this.props.active && this.props.isDropdownLink) { const scrollTarget = getScrollTarget(this._shadowLink); if (scrollTarget) { smoothScroll.animateScroll(scrollTarget, this._shadowLink, defaultScrollOptions);
fix: update the <bolt-navlink> to check if the link being interacted with is a hashed link and if so, preventDefault to ensure a much less jumpy smooth scroll experience. Fixes issues noticed when testing in Safari
bolt-design-system_bolt
train
js
a2e2263735ab87cdca980fc8a66394f9bbf0f5da
diff --git a/edx_rest_framework_extensions/paginators.py b/edx_rest_framework_extensions/paginators.py index <HASH>..<HASH> 100644 --- a/edx_rest_framework_extensions/paginators.py +++ b/edx_rest_framework_extensions/paginators.py @@ -78,11 +78,11 @@ class NamespacedPageNumberPagination(pagination.PageNumberPagination): def paginate_search_results(object_class, search_results, page_size, page): """ - Takes edx-search results and returns a Page object populated + Takes search results and returns a Page object populated with db objects for that page. :param object_class: Model class to use when querying the db for objects. - :param search_results: edX-search results. + :param search_results: search results. :param page_size: Number of results per page. :param page: Page number. :return: Paginator object with model objects
docs: generalize "edx-search" to "search" in pagination docstring (#<I>) When this code was extracted from edx-platform, it was likely used to paginate search results specifically from the "edx-search" library (<URL>
edx_edx-drf-extensions
train
py
af61639fc917491d93875fe78191dc376304e6ff
diff --git a/core/poi/lib/utils/validateConfig.js b/core/poi/lib/utils/validateConfig.js index <HASH>..<HASH> 100644 --- a/core/poi/lib/utils/validateConfig.js +++ b/core/poi/lib/utils/validateConfig.js @@ -5,10 +5,7 @@ module.exports = (api, config) => { api.logger.debug('Validating config', config) const struct = superstruct() - const entry = struct.optional( - struct.union(['string', 'array', 'object']), - 'index' - ) + const entry = struct.optional(struct.union(['string', 'array', 'object'])) const output = struct( { @@ -165,6 +162,18 @@ module.exports = (api, config) => { result.output.fileNames ) + if (!result.entry) { + if (api.pkg.data.source) { + api.logger.debug( + 'Using the value of `source` field in `package.json` as app entry' + ) + result.entry = api.pkg.data.source + } else { + api.logger.debug('Using `index` as app entry') + result.entry = 'index' + } + } + // Always disable cache in test mode if (process.env.NODE_ENV === 'test') { result.cache = false
feat: use source field from package.json as default app entry
egoist_poi
train
js
e4be666c2c273c56f04b8f965efc88bb9aff0032
diff --git a/src/managers/ThreadManager.js b/src/managers/ThreadManager.js index <HASH>..<HASH> 100644 --- a/src/managers/ThreadManager.js +++ b/src/managers/ThreadManager.js @@ -198,7 +198,7 @@ class ThreadManager extends BaseManager { */ async fetchArchived({ type = 'public', fetchAll = false, before, limit } = {}, cache = true) { let path = this.client.api.channels(this.channel.id); - if (type === 'private' && fetchAll) { + if (type === 'private' && !fetchAll) { path = path.users('@me'); } let timestamp;
fix(ThreadManager): fixed wrong private and fetchAll check (#<I>)
discordjs_discord.js
train
js
34808f498fa9bfd0680163519c4ebfa55e0af6d4
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 @@ -217,6 +217,11 @@ fi cd $flynn +# Also fetch Github PR commits +if ! git config --get-all remote.origin.fetch | grep -q '^+refs/pull'; then + git config --add remote.origin.fetch '+refs/pull/*/head:refs/remotes/origin/pr/*' +fi + git fetch git checkout --quiet {{ . }} tup
test: Fetch Github PR commits
flynn_flynn
train
go
c1ec45bbcc9d85a528c03cb0e53ce2d520c63ffb
diff --git a/bindings/angular2/webpack.prod.config.js b/bindings/angular2/webpack.prod.config.js index <HASH>..<HASH> 100644 --- a/bindings/angular2/webpack.prod.config.js +++ b/bindings/angular2/webpack.prod.config.js @@ -91,19 +91,19 @@ module.exports = { commonjs: '@angular/core', commonjs2: '@angular/core', amd: '@angular/core', - root: 'ng.core' + root: ['ng', 'core'] }, '@angular/common': { // UMD commonjs: '@angular/common', commonjs2: '@angular/common', amd: '@angular/common', - root: 'ng.common' + root: ['ng', 'common'] }, '@angular/platform-browser': { // UMD commonjs: '@angular/platform-browser', commonjs2: '@angular/platform-browser', amd: '@angular/platform-browser', - root: 'ng.platformBrowser' + root: ['ng', 'platformBrowser'] }, 'onsenui': { // UMD commonjs: 'onsenui',
fix(angular2): Set `root` of external packages in webpack prod config correctly.
OnsenUI_OnsenUI
train
js
670d9804263b36c652a43aa00f71aeba475b45c3
diff --git a/packages/veui/src/directives/outside.js b/packages/veui/src/directives/outside.js index <HASH>..<HASH> 100644 --- a/packages/veui/src/directives/outside.js +++ b/packages/veui/src/directives/outside.js @@ -68,9 +68,9 @@ function parseParams (el, arg, modifiers, value, context) { // delay 表示如果鼠标移动到 includeTargets 元素之外多少毫秒之后,才会触发 handler let delay = 0 find(keys(modifiers), key => { - let keyInt = parseInt(key, 10) - if (!isNaN(keyInt) && modifiers[key]) { - delay = keyInt + let keyNum = Number(key) + if (!isNaN(keyNum) && keyNum >= 0 && modifiers[key]) { + delay = keyNum return true } }) @@ -97,7 +97,8 @@ function parseParams (el, arg, modifiers, value, context) { trigger = normalizedValue.trigger || trigger || 'click' if ('delay' in normalizedValue) { - delay = parseInt(normalizedValue.delay, 10) || 0 + let delayNum = Number(normalizedValue.delay) || 0 + delay = delayNum >= 0 ? delayNum : 0 } if ('excludeSelf' in normalizedValue) {
fix: nonstrict `delay` limitations in `outside` directive. (#<I>) * fix: stricter `delay` string pattern for `outside` directive
ecomfe_veui
train
js
c4c98fb34946bc775fda03388e1faade183b1e2e
diff --git a/src/processor/g2Update.js b/src/processor/g2Update.js index <HASH>..<HASH> 100644 --- a/src/processor/g2Update.js +++ b/src/processor/g2Update.js @@ -107,7 +107,7 @@ const iUpdate = { const { name, visible, ...others } = axisConfig.props; const { name: nextName, visible: nextVisible, ...nextOthers } = axisConfig.updateProps; - warning(name === nextName, '`name` propertry should not be changed in `<Axis />`'); + // warning(name === nextName, '`name` propertry should not be changed in `<Axis />`'); if (visible !== nextVisible) { chart.axis(name, !!nextVisible);
feat: Removes warning sign that appear when the axis name changes.
alibaba_BizCharts
train
js
c0d159140d7144966e944116ec10ed4f905462ff
diff --git a/nx-dev/nx-dev/redirect-rules.config.js b/nx-dev/nx-dev/redirect-rules.config.js index <HASH>..<HASH> 100644 --- a/nx-dev/nx-dev/redirect-rules.config.js +++ b/nx-dev/nx-dev/redirect-rules.config.js @@ -174,7 +174,7 @@ const overviewUrls = { '/next/overview': '/packages/next', '/detox/overview': '/packages/detox', '/react-native/overview': '/packages/react-native', - '/packages/nx-plugin': '/packages/nx-plugin', + '/nx-plugin/overview': '/packages/nx-plugin', }; /**
docs(nxdev): update nx-plugin redirect rule (#<I>)
nrwl_nx
train
js
b057b3b7a90032ea3584496bffb09c306dc8b6f6
diff --git a/server/server.js b/server/server.js index <HASH>..<HASH> 100644 --- a/server/server.js +++ b/server/server.js @@ -2,7 +2,6 @@ var loopback = require('loopback'); var boot = require('loopback-boot'); -var debug = require('debug')('typedefs'); var app = module.exports = loopback(); @@ -11,10 +10,10 @@ app.start = function () { return app.listen(function () { app.emit('started'); var baseUrl = app.get('url').replace(/\/$/, ''); - debug('Web server listening at: %s', baseUrl); + console.log('Web server listening at: %s', baseUrl); if (app.get('loopback-component-explorer')) { var explorerPath = app.get('loopback-component-explorer').mountPath; - debug('Browse your REST API at %s%s', baseUrl, explorerPath); + console.log('Browse your REST API at %s%s', baseUrl, explorerPath); } }); };
feat(App): Support aggregated types fixes #1
Tallyb_loopback-graphql
train
js
f97b01d53378a802e4d8c292a15406acbfe448ae
diff --git a/src/core/util.js b/src/core/util.js index <HASH>..<HASH> 100644 --- a/src/core/util.js +++ b/src/core/util.js @@ -65,7 +65,7 @@ export function $override(name, fn) { * @return {*} new */ export function clone(source) { - if (source == null || typeof source != 'object') { + if (source == null || typeof source !== 'object') { return source; } @@ -269,13 +269,13 @@ export function mixin(target, source, overlay) { * @param {Array|TypedArray} data */ export function isArrayLike(data) { - if (! data) { + if (!data) { return; } - if (typeof data == 'string') { + if (typeof data === 'string') { return false; } - return typeof data.length == 'number'; + return typeof data.length === 'number'; } /** @@ -459,7 +459,7 @@ export function isObject(value) { // Avoid a V8 JIT bug in Chrome 19-20. // See https://code.google.com/p/v8/issues/detail?id=2291 for more details. var type = typeof value; - return type === 'function' || (!!value && type == 'object'); + return type === 'function' || (!!value && type === 'object'); } /**
fix: fix some syntax error in util
ecomfe_zrender
train
js
4d78633c4dd96d4cccdbcf7723850d691ea75369
diff --git a/src/cli/cli.js b/src/cli/cli.js index <HASH>..<HASH> 100644 --- a/src/cli/cli.js +++ b/src/cli/cli.js @@ -1,3 +1,6 @@ +/** + * Created by tivie + */ 'use strict'; var yargs = require('yargs');
refactor(CLI): bump to include breaking change notice BREAKING CHANGE: CLI tool now uses the same option defaults as showdown main library. This mean the default flavor is vanilla and ghCodeBlocks options is enabled by default. To update, add `--ghCodeBlocks="false"` to the command.
showdownjs_showdown
train
js
d5c027962ce0aedb2419e1eb62dc4279778f1e6c
diff --git a/src/Keboola/OAuth/OAuth20.php b/src/Keboola/OAuth/OAuth20.php index <HASH>..<HASH> 100644 --- a/src/Keboola/OAuth/OAuth20.php +++ b/src/Keboola/OAuth/OAuth20.php @@ -26,6 +26,10 @@ class OAuth20 extends AbstractOAuth public function createToken($callbackUrl, array $sessionData, array $query) { + if (empty($query['code'])) { + throw new UserException("'code' not returned in query from the auth API!"); + } + $guzzle = new Client(); try { $response = $guzzle->post(
fix: Throw an exception if code isn't presented in <I> callback
keboola_php-oauth
train
php
c9fd3069100439692c59818c5cb13c6b350c7741
diff --git a/packages/collector/test/tracing/cloud/aws-sdk/v3/dynamodb/app.js b/packages/collector/test/tracing/cloud/aws-sdk/v3/dynamodb/app.js index <HASH>..<HASH> 100644 --- a/packages/collector/test/tracing/cloud/aws-sdk/v3/dynamodb/app.js +++ b/packages/collector/test/tracing/cloud/aws-sdk/v3/dynamodb/app.js @@ -151,7 +151,16 @@ const checkTableStatus = async (operation, res) => { TableName: tableName }); - const newRes = await dynamoDB.send(command); + let newRes; + + try { + newRes = await dynamoDB.send(command); + } catch (err) { + // CASE: aws returns 404, but should not return 404 + // ignore + newRes = res; + } + cls.isTracing() && cls.setTracingLevel('1'); await checkTableStatus(operation, newRes); }
test: random failure reducation tracing/cloud/aws-sdk/v3/dynamodb/app.js
instana_nodejs-sensor
train
js
614d51c647d7330977cdbee87eeadcffccb07039
diff --git a/packages/actionmenu/src/react/item.js b/packages/actionmenu/src/react/item.js index <HASH>..<HASH> 100644 --- a/packages/actionmenu/src/react/item.js +++ b/packages/actionmenu/src/react/item.js @@ -103,7 +103,7 @@ export default function Item(props) { props.nested && isActive && React.cloneElement(props.nested, { - css: calcNestedMenuPosition( + style: calcNestedMenuPosition( itemRef.current.getBoundingClientRect().width, props._origin ),
fix(actionmenu): incorrectly named prop 'css' should be 'style'
pluralsight_design-system
train
js
00a0aeef6eb25b55ef93b488762815624397acd1
diff --git a/models/classes/Lists/Business/Validation/DependsOnPropertyValidator.php b/models/classes/Lists/Business/Validation/DependsOnPropertyValidator.php index <HASH>..<HASH> 100644 --- a/models/classes/Lists/Business/Validation/DependsOnPropertyValidator.php +++ b/models/classes/Lists/Business/Validation/DependsOnPropertyValidator.php @@ -26,8 +26,8 @@ use tao_helpers_Uri; use tao_helpers_form_Form; use oat\generis\model\OntologyAwareTrait; use oat\oatbox\validator\ValidatorInterface; -use oat\tao\helpers\form\elements\ElementValue; use oat\tao\helpers\form\elements\ElementAware; +use oat\tao\helpers\form\elements\ElementValue; use tao_helpers_form_FormElement as FormElement; use oat\tao\helpers\form\validators\CrossElementEvaluationAware; use oat\tao\model\Lists\Business\Domain\DependencyRepositoryContext;
refactor: sort use-statements
oat-sa_tao-core
train
php
8b632efe3010326f77c893780fdfedbaaa90a409
diff --git a/proselint/tools.py b/proselint/tools.py index <HASH>..<HASH> 100644 --- a/proselint/tools.py +++ b/proselint/tools.py @@ -216,11 +216,13 @@ def errors_to_json(errors): def line_and_column(text, position): """Return the line number and column of a position in a string.""" position_counter = 0 - for idx_line, line in enumerate(text.splitlines(True)): + line_no = 0 + for line in text.splitlines(True): if (position_counter + len(line.rstrip())) >= position: - return (idx_line, position - position_counter) - else: - position_counter += len(line) + break + position_counter += len(line) + line_no += 1 + return (line_no, position - position_counter) def lint(input_file, debug=False, config_file_path=None):
fix(tools): correct potentially unbound return for line_and_column (#<I>)
amperser_proselint
train
py
843b188ef0282b2df56cc6c00f6ca8fe6c5389a1
diff --git a/src/component/title.js b/src/component/title.js index <HASH>..<HASH> 100644 --- a/src/component/title.js +++ b/src/component/title.js @@ -226,7 +226,7 @@ echarts.extendComponentView({ r: titleModel.get('borderRadius') }, style: style, - subPixelOptimize: !!style.lineWidth, + subPixelOptimize: true, silent: true });
fix: tweak <I>f<I>de (fix subpixel optimize with no lineWidth in zrender) (related: #<I> #<I>)
apache_incubator-echarts
train
js
48f0710fe71ba33af878622cbe8677e1008c20b8
diff --git a/packages/components/bolt-tooltip/src/tooltip.standalone.js b/packages/components/bolt-tooltip/src/tooltip.standalone.js index <HASH>..<HASH> 100644 --- a/packages/components/bolt-tooltip/src/tooltip.standalone.js +++ b/packages/components/bolt-tooltip/src/tooltip.standalone.js @@ -109,6 +109,7 @@ class TooltipTrigger extends withPreact() { constructor(self) { self = super(self); + this.useShadow = false; // @todo: Get this working with shadowDOM + slots return self; }
fix: update tooltip component to opt out of using shadow DOM for the time being
bolt-design-system_bolt
train
js
ac5079a0859c058255fe411bc229b806c93ecb71
diff --git a/src/test/java/com/lob/model/AreaTest.java b/src/test/java/com/lob/model/AreaTest.java index <HASH>..<HASH> 100644 --- a/src/test/java/com/lob/model/AreaTest.java +++ b/src/test/java/com/lob/model/AreaTest.java @@ -68,8 +68,8 @@ public class AreaTest extends BaseTest { assertNotNull(area.getId()); assertEquals("Test Area", area.getDescription()); assertNotNull(area.getZipCodes()); - assertEquals(945, area.getAddresses()); - assertEquals("735.21", area.getPrice()); + assertTrue(area.getAddresses() > 0); + assertNotNull(area.getPrice()); assertNotNull(area.getUrl()); assertEquals("residential", area.getTargetType()); assertNotNull(area.getThumbnails()); @@ -104,8 +104,8 @@ public class AreaTest extends BaseTest { assertNotNull(area.getId()); assertEquals("Test Area", area.getDescription()); assertNotNull(area.getZipCodes()); - assertEquals(3591, area.getAddresses()); - assertEquals("1310.72", area.getPrice()); + assertTrue(area.getAddresses() > 0); + assertNotNull(area.getPrice()); assertNotNull(area.getUrl()); assertEquals("residential", area.getTargetType()); assertNotNull(area.getThumbnails());
chore(tests): fix area tests to be more resilient (#<I>)
lob_lob-java
train
java
ae159b8eaa43d60455f76eb92d6b62bb898a48f6
diff --git a/src/flow.js b/src/flow.js index <HASH>..<HASH> 100644 --- a/src/flow.js +++ b/src/flow.js @@ -1210,8 +1210,8 @@ if (typeof preprocess === 'function') { switch (this.preprocessState) { case 0: - preprocess(this); this.preprocessState = 1; + preprocess(this); return; case 1: return;
fix: #<I> support preprocess called in sync
flowjs_flow.js
train
js
1bbb8f682563bedbd14a16bdb99dc163ad660377
diff --git a/docs/styleguide.config.js b/docs/styleguide.config.js index <HASH>..<HASH> 100644 --- a/docs/styleguide.config.js +++ b/docs/styleguide.config.js @@ -48,7 +48,7 @@ module.exports = { ] }, { - name: 'Layout', + name: 'Layout components', components: () => [ '../react/Layout/Layout.jsx', '../react/Hero/index.jsx',
fix: Use different names from Layout component
cozy_cozy-ui
train
js
052b0c02646f9375fcea675605aa42011564d0dc
diff --git a/core/src/elements/ons-tabbar/index.js b/core/src/elements/ons-tabbar/index.js index <HASH>..<HASH> 100644 --- a/core/src/elements/ons-tabbar/index.js +++ b/core/src/elements/ons-tabbar/index.js @@ -535,10 +535,7 @@ export default class TabbarElement extends BaseElement { } _destroy() { - const tabs = this.tabs; - while (tabs[0]) { - tabs[0].remove(); - } + this.tabs.forEach(tab => tab.remove()); this.remove(); }
fix(ons-tabbar): Infinite loop after rectoring.
OnsenUI_OnsenUI
train
js
d5fc5318c7ff98eeecb36b22b40de1069694e500
diff --git a/generators/app/templates/test/setup.js b/generators/app/templates/test/setup.js index <HASH>..<HASH> 100644 --- a/generators/app/templates/test/setup.js +++ b/generators/app/templates/test/setup.js @@ -26,7 +26,7 @@ let mongoServer beforeAll(async () => { mongoServer = new MongodbMemoryServer() const mongoUri = await mongoServer.getUri() - await mongoose.connect(mongoUri, (err) => { + await mongoose.connect(mongoUri, undefined, (err) => { if (err) console.error(err) }) })
fix: fix tests failed error (#<I>) Second parameter of mongoose.connect should be the opts, if no specific opts needed, pass undefined.
diegohaz_rest
train
js
812bc6363bc23e4addf5e39bd4d3f2a0b6254d18
diff --git a/lib/cli.js b/lib/cli.js index <HASH>..<HASH> 100644 --- a/lib/cli.js +++ b/lib/cli.js @@ -129,10 +129,14 @@ module.exports = function(program) { var themeName = program.rmTheme , transName = program.rmTransition; - // ... make sure there's an actual name - - rmUserAsset('theme', themeName); - rmUserAsset('transition', transName); + if(themeName !== true) { + rmUserAsset('theme', themeName); + } + + if(transName !== true) { + rmUserAsset('transition', transName); + } + return; }
fix: Make sure we were actually give an theme/trans to delete
jtrussell_bedecked
train
js
7b6cd3bfa56463e1b6517d768fe7e3fdf59d0c71
diff --git a/schedula/utils/dsp.py b/schedula/utils/dsp.py index <HASH>..<HASH> 100644 --- a/schedula/utils/dsp.py +++ b/schedula/utils/dsp.py @@ -1047,7 +1047,7 @@ class SubDispatchPipe(SubDispatchFunction): s = key_map[s] if s.stopper.is_set(): - raise DispatcherAbort(sol, "Stop requested.") + raise DispatcherAbort("Stop requested.", sol=sol) has_node = v not in s.workflow.node if has_node or not s._set_node_output(v, False, next_nds=nxt_nds): diff --git a/schedula/utils/sol.py b/schedula/utils/sol.py index <HASH>..<HASH> 100644 --- a/schedula/utils/sol.py +++ b/schedula/utils/sol.py @@ -218,7 +218,7 @@ class Solution(Base, collections.OrderedDict): n = (d, _, (v, sol)) = heapq.heappop(fringe) if sol.stopper.is_set(): - raise DispatcherAbort(self, "Stop requested.") + raise DispatcherAbort("Stop requested.", sol=self) # Skip terminated sub-dispatcher or visited nodes. if sol.index in dsp_closed or (v is not START and v in sol.dist):
fix(abort): abort was setting Exception.args instead of `sol` attribute + Sideffect was that str(ex) was too big and it included the solution. + 2 irrelevant(?) TCs fail: `Directive.test_build` & `Draw.test_view`.
vinci1it2000_schedula
train
py,py
1887dab86be83da3fc947a22dde0f5a02cad9d49
diff --git a/app-vite/lib/modes/ssr/ssr-devserver.js b/app-vite/lib/modes/ssr/ssr-devserver.js index <HASH>..<HASH> 100644 --- a/app-vite/lib/modes/ssr/ssr-devserver.js +++ b/app-vite/lib/modes/ssr/ssr-devserver.js @@ -307,7 +307,7 @@ class SsrDevServer extends AppDevserver { const { publicPath } = this.#appOptions publicPath !== '/' && app.use((req, res, next) => { - const pathname = new URL(req.url, `http://${request.headers.host}`).pathname || '/' + const pathname = new URL(req.url, `http://${req.headers.host}`).pathname || '/' if (pathname.startsWith(publicPath) === true) { next()
fix(app-vite): "request" instead of "req" for SSR devserver #<I>
quasarframework_quasar
train
js
db4086779b42c163310ebc77c561b09c1f1eb771
diff --git a/src/plugins/notify/index.js b/src/plugins/notify/index.js index <HASH>..<HASH> 100644 --- a/src/plugins/notify/index.js +++ b/src/plugins/notify/index.js @@ -179,7 +179,10 @@ class Notify { parentDom.appendChild($body); } //fix: button在focus状态,enter或者空格键都会再次触发 - document.querySelector(':focus').blur(); + let focusClicked = document.querySelector(':focus'); + if (focusClicked) { + focusClicked.blur(); + } if (param.hasCloseIcon) { $body.querySelector(`.${notifyCloseCls}`).onclick = function () { that.close();
fix(Notity): check if there is a focus dom
heyui_heyui
train
js
36c3c7db3514f4c4c827ab9da2cbd23cdd9ce635
diff --git a/lib/collection.js b/lib/collection.js index <HASH>..<HASH> 100644 --- a/lib/collection.js +++ b/lib/collection.js @@ -1388,8 +1388,6 @@ Collection.prototype.estimatedDocumentCount = function(options, callback) { if (typeof options === 'function') (callback = options), (options = {}); options = options || {}; - options = typeof options.maxTimeMS === 'number' ? options : {}; - return executeOperation(this.s.topology, count, [this, null, options, callback]); };
fix(estimated-document-count): support options other than maxTimeMs
mongodb_node-mongodb-native
train
js
70966e6fc35596c90c6a7ac4a594a858d0b6b410
diff --git a/intranet/apps/printing/views.py b/intranet/apps/printing/views.py index <HASH>..<HASH> 100644 --- a/intranet/apps/printing/views.py +++ b/intranet/apps/printing/views.py @@ -175,6 +175,7 @@ def check_page_range(page_range, max_pages): pages += range_high - range_low + 1 else: + single_range = int(single_range) if single_range <= 0 or single_range > max_pages: # check in page range return False
fix(printing): convert page to int
tjcsl_ion
train
py
37699c66830e6ca2f9082832a9a8f83356d4eb51
diff --git a/sqlalchemy_mptt/mixins.py b/sqlalchemy_mptt/mixins.py index <HASH>..<HASH> 100644 --- a/sqlalchemy_mptt/mixins.py +++ b/sqlalchemy_mptt/mixins.py @@ -449,7 +449,7 @@ class BaseNestedSets(object): @classmethod def rebuild_tree(cls, session, tree_id): - """ This method rebuid tree. + """ This method rebuild tree. Args: session (:mod:`sqlalchemy.orm.session.Session`): SQLAlchemy session @@ -501,7 +501,7 @@ class BaseNestedSets(object): @classmethod def rebuild(cls, session, tree_id=None): - """ This function rebuid tree. + """ This function rebuild tree. Args: session (:mod:`sqlalchemy.orm.session.Session`): SQLAlchemy session
docs: Fix simple typo, rebuid -> rebuild There is a small typo in sqlalchemy_mptt/mixins.py. Should read `rebuild` rather than `rebuid`.
uralbash_sqlalchemy_mptt
train
py
9543d57a68ebc1c1f7d2db7472f539ebe9f3ee95
diff --git a/packages/node_modules/@webex/internal-plugin-ediscovery/src/index.js b/packages/node_modules/@webex/internal-plugin-ediscovery/src/index.js index <HASH>..<HASH> 100644 --- a/packages/node_modules/@webex/internal-plugin-ediscovery/src/index.js +++ b/packages/node_modules/@webex/internal-plugin-ediscovery/src/index.js @@ -436,6 +436,12 @@ registerInternalPlugin('ediscovery', EDiscovery, { return object; } + if (!spaceSummary.participants || !spaceSummary.participants.length) { + ctx.webex.logger.error(`Known error - detected space with no participant - unable to decrypt name for space ${spaceSummary.spaceId}`); + + return object; + } + return requestWithRetries(ctx.webex.internal.encryption, ctx.webex.internal.encryption.decryptText, [spaceSummary.encryptionKeyUrl, spaceSummary.spaceName, {onBehalfOf: spaceSummary.participants[0]}]) .then((decryptedSpaceName) => {
fix(ediscovery): add participant check to content summary decryption
webex_spark-js-sdk
train
js
3e9cc03bd15b4b81e94a098c368ab2968b9f1996
diff --git a/lib/platform/git/storage.js b/lib/platform/git/storage.js index <HASH>..<HASH> 100644 --- a/lib/platform/git/storage.js +++ b/lib/platform/git/storage.js @@ -77,8 +77,9 @@ class Storage { await cleanLocalBranches(); await git.raw(['remote', 'prune', 'origin']); const fetchSeconds = - Math.round(10 * convertHrtime(process.hrtime(fetchStart)).seconds) / - 10; + Math.round( + 1 + 10 * convertHrtime(process.hrtime(fetchStart)).seconds + ) / 10; logger.info({ fetchSeconds }, 'git fetch completed'); clone = false; } catch (err) { @@ -91,8 +92,9 @@ class Storage { const cloneStart = process.hrtime(); await git.clone(config.url, '.', ['--depth=2', '--no-single-branch']); const cloneSeconds = - Math.round(10 * convertHrtime(process.hrtime(cloneStart)).seconds) / - 10; + Math.round( + 1 + 10 * convertHrtime(process.hrtime(cloneStart)).seconds + ) / 10; logger.info({ cloneSeconds }, 'git clone completed'); }
fix(gitfs): avoid divide by zero
renovatebot_renovate
train
js
4be822584213f158520ee9fb69d84c2727fed544
diff --git a/src/js/core/img.js b/src/js/core/img.js index <HASH>..<HASH> 100644 --- a/src/js/core/img.js +++ b/src/js/core/img.js @@ -97,7 +97,7 @@ export default { const image = isImg(this.$el) ? this.$el : getImageFromElement(this.$el, this.dataSrc); this._data.image = image; - setSrcAttrs(this.$el, image.currentSrc); + setSrcAttrs(this.$el, image.currentSrc || this.dataSrc); this.observer.disconnect(); },
fix: dataSrc fallback for uk-svg in combination with uk-img
uikit_uikit
train
js
9a95081dc1f839b56d74af09020b2d908dd66765
diff --git a/lib/customTOC.js b/lib/customTOC.js index <HASH>..<HASH> 100644 --- a/lib/customTOC.js +++ b/lib/customTOC.js @@ -21,7 +21,7 @@ module.exports = function yaml() { if (depth === 2) { level2.push((lastH2 = node)) } else if (depth === 3) { - lastH2.children.push(node) + if (lastH2) lastH2.children.push(node) } })
fix: possible error when no h2 present
AngusFu_md2vue
train
js
585cd6651864082f586c3322a85cda2d9e9bd715
diff --git a/packages/node_modules/@ciscospark/plugin-authorization-browser-first-party/test/automation/spec/authorization-code-grant.js b/packages/node_modules/@ciscospark/plugin-authorization-browser-first-party/test/automation/spec/authorization-code-grant.js index <HASH>..<HASH> 100644 --- a/packages/node_modules/@ciscospark/plugin-authorization-browser-first-party/test/automation/spec/authorization-code-grant.js +++ b/packages/node_modules/@ciscospark/plugin-authorization-browser-first-party/test/automation/spec/authorization-code-grant.js @@ -14,7 +14,7 @@ const redirectUri = process.env.CISCOSPARK_REDIRECT_URI || process.env.REDIRECT_ describe('plugin-authorization-browser-first-party', function () { this.timeout(120000); describe('Authorization', () => { - describe('Authorization Code Grant', () => { + describe.skip('Authorization Code Grant', () => { let browser, user; before(() => testUsers.create({count: 1})
test(plugin-authorization-browser): skip test until RCA can be performed
webex_spark-js-sdk
train
js
9686d0709d9fb7824df7fbdbc2db97b51b2f9e07
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -37,7 +37,9 @@ def list_filepaths(tdir): return [f for f in glob.glob(os.path.join(tdir, '*')) if os.path.isfile(f)] -data_files = [("share/man/man1", list_filepaths("docs/"))] +# TBD: +# data_files = [("share/man/man1", list_filepaths("docs/"))] +data_files = [("share/man/man1", ["docs/anyconfig_cli.1"])] class SrpmCommand(Command):
fix: make not doc rst sources installed like man pages
ssato_python-anyconfig
train
py
583982f5233a5b659dd325a3b1955a2136dbf547
diff --git a/lib/components/map/connected-transit-vehicle-overlay.js b/lib/components/map/connected-transit-vehicle-overlay.js index <HASH>..<HASH> 100644 --- a/lib/components/map/connected-transit-vehicle-overlay.js +++ b/lib/components/map/connected-transit-vehicle-overlay.js @@ -9,7 +9,7 @@ const mapStateToProps = (state, ownProps) => { let vehicleList = [] if (viewedRoute?.routeId) { - vehicleList = state.otp.transitIndex?.routes?.[viewedRoute.routeId].vehicles + vehicleList = state.otp.transitIndex?.routes?.[viewedRoute.routeId]?.vehicles if (viewedRoute.patternId) { vehicleList = vehicleList.filter( (vehicle) => vehicle.patternId === viewedRoute.patternId
refactor: avoid crash on missing route data
opentripplanner_otp-react-redux
train
js
26f7d98946edb240e15fd8f2bac4aa76e7e3e7b2
diff --git a/packages/ui-utils/src/dom/containsActiveElement.js b/packages/ui-utils/src/dom/containsActiveElement.js index <HASH>..<HASH> 100644 --- a/packages/ui-utils/src/dom/containsActiveElement.js +++ b/packages/ui-utils/src/dom/containsActiveElement.js @@ -23,6 +23,7 @@ */ import findDOMNode from './findDOMNode' +import contains from './contains' import getActiveElement from './getActiveElement' /** @@ -38,5 +39,5 @@ import getActiveElement from './getActiveElement' export default function containsActiveElement (el) { const node = el && findDOMNode(el) const active = getActiveElement() - return (node && (active === node || node.contains(active))) + return (node && (active === node || contains(node,active))) }
fix(ui-utils): ensure 'getActiveElement' is using the instui 'contains' refs: INSTUI-<I> TEST PLAN: - verify getActiveElement.js is importing our own contains.js vs falling back to browser - could not think of a valid test for local verification Change-Id: I<I>ae<I>e<I>b<I>cb<I>f Reviewed-on: <URL>
instructure_instructure-ui
train
js
b7c26b68941e256462e443731993317ce8793645
diff --git a/system/HTTP/ContentSecurityPolicy.php b/system/HTTP/ContentSecurityPolicy.php index <HASH>..<HASH> 100644 --- a/system/HTTP/ContentSecurityPolicy.php +++ b/system/HTTP/ContentSecurityPolicy.php @@ -298,7 +298,7 @@ class ContentSecurityPolicy * * Should be called just prior to sending the response to the user agent. */ - public function finalize(ResponseInterface &$response) + public function finalize(ResponseInterface $response) { if ($this->autoNonce === false) { return; @@ -663,7 +663,7 @@ class ContentSecurityPolicy * placeholders with actual nonces, that we'll then add to our * headers. */ - protected function generateNonces(ResponseInterface &$response) + protected function generateNonces(ResponseInterface $response) { $body = $response->getBody(); @@ -695,7 +695,7 @@ class ContentSecurityPolicy * Content-Security-Policy and Content-Security-Policy-Report-Only headers * with their values to the response object. */ - protected function buildHeaders(ResponseInterface &$response) + protected function buildHeaders(ResponseInterface $response) { /** * Ensure both headers are available and arrays...
refactor: remove unneeded `&` references
codeigniter4_CodeIgniter4
train
php
cf909524c43015917b36392b7cf5fcc104fafdfb
diff --git a/bases.py b/bases.py index <HASH>..<HASH> 100644 --- a/bases.py +++ b/bases.py @@ -343,6 +343,7 @@ class NodeNG(BaseClass): """ is_statement = False optional_assign = False # True for For (and for Comprehension if py <3.0) + is_function = False # True for Function nodes # attributes below are set by the builder module or by raw factories lineno = None fromlineno = None diff --git a/scoped_nodes.py b/scoped_nodes.py index <HASH>..<HASH> 100644 --- a/scoped_nodes.py +++ b/scoped_nodes.py @@ -133,7 +133,7 @@ class LocalsDictNodeNG(LookupMixIn, NodeNG): # nested scope: if parent scope is a function, that's fine # else jump to the module pscope = self.parent.scope() - if not isinstance(pscope, Function): + if not pscope.is_function: pscope = pscope.root() return pscope.scope_lookup(node, name) return builtin_lookup(name) # Module @@ -508,8 +508,8 @@ class Function(StmtMixIn, Lambda): _astng_fields = ('decorators', 'args', 'body') special_attributes = set(('__name__', '__doc__', '__dict__')) + is_function = True # attributes below are set by the builder module or by raw factories - blockstart_tolineno = None def __init__(self, name, doc):
refactor: add a "is_function" attribute (wip)
PyCQA_astroid
train
py,py
f140b34be82a861e33186bee0eabb279d232b3d2
diff --git a/lib/browserify.js b/lib/browserify.js index <HASH>..<HASH> 100644 --- a/lib/browserify.js +++ b/lib/browserify.js @@ -34,7 +34,7 @@ module.exports = function ({ }) if (minify) { - pipeline.transform({ global: true }, uglifyify) + pipeline.transform(uglifyify, {global: true}) } return pipeline
fix(uglify): Fix the order of uglify.
conveyal_mastarm
train
js
6556ab4e0523e6be9f89f80f9b2d075338841a0b
diff --git a/lib/launchers/base.js b/lib/launchers/base.js index <HASH>..<HASH> 100644 --- a/lib/launchers/base.js +++ b/lib/launchers/base.js @@ -5,12 +5,12 @@ const Promise = require('bluebird') const log = require('../logger').create('launcher') const helper = require('../helper') -const BEING_CAPTURED = 1 -const CAPTURED = 2 -const BEING_KILLED = 3 -const FINISHED = 4 -const RESTARTING = 5 -const BEING_FORCE_KILLED = 6 +const BEING_CAPTURED = 'BEING_CAPTURED' +const CAPTURED = 'CAPTURED' +const BEING_KILLED = 'BEING_KILLED' +const FINISHED = 'FINISHED' +const RESTARTING = 'RESTARTING' +const BEING_FORCE_KILLED = 'BEING_FORCE_KILLED' /** * Base launcher that any custom launcher extends. @@ -29,7 +29,17 @@ function BaseLauncher (id, emitter) { this.emitAsync = KarmaEventEmitter.prototype.emitAsync.bind(this) this.id = id - this.state = null + this._state = null + Object.defineProperty(this, 'state', { + get: () => { + return this._state + }, + set: (toState) => { + log.debug(`${this._state} -> ${toState}`) + this._state = toState + } + }) + this.error = null let killingPromise
fix(launcher): Log state transitions in debug (#<I>) See #<I>
karma-runner_karma
train
js
fd3a8f20ef1a15f01795db98d3997a75f5a02701
diff --git a/test/after-each-order-spec.js b/test/after-each-order-spec.js index <HASH>..<HASH> 100644 --- a/test/after-each-order-spec.js +++ b/test/after-each-order-spec.js @@ -1,18 +1,35 @@ -/* global describe, it, afterEach */ -describe('after each callbacks', function () { +/* global describe, it, afterEach, after, afterAll */ +var suite = describe; +// Mocha vs Jasmine +var afterTests = typeof afterAll === 'function' ? afterAll : after; + +suite('after each callbacks', function () { // just a dummy unit test to figure out how afterEach callbacks run - it('passes', function () {}); + var labels = ''; + it('passes', function () { + labels += 'test'; + }); afterEach(function one() { console.log('one'); + labels += '1'; }); afterEach(function one() { console.log('two'); + labels += '2'; }); afterEach(function one() { console.log('three'); + labels += '3'; + }); + + // does NOT run in Jasmine? + afterTests(function checkOrder() { + la(labels === 'test123', 'invalid order', labels); + console.log('labels', labels); + // throw new Error('labels ' + labels); }); /* result
chore(test): trying to test order of callbacks
kensho_ng-describe
train
js
05f792bd6c4fdd515ba9233b3b8500501d99d2fb
diff --git a/packages/ringcentral-integration/modules/DetailedPresence/index.js b/packages/ringcentral-integration/modules/DetailedPresence/index.js index <HASH>..<HASH> 100644 --- a/packages/ringcentral-integration/modules/DetailedPresence/index.js +++ b/packages/ringcentral-integration/modules/DetailedPresence/index.js @@ -155,6 +155,6 @@ export default class DetailedPresence extends Presence { } async fetchRemainingCalls() { - return throttle(this::this._fetch(), FETCH_THRESHOLD); + return throttle(this::this._fetch, FETCH_THRESHOLD); } }
fix(DetailedPresence): fix the wrong usage of throttle by fetchRemainingCalls method (#<I>) * Change the method invoking via passing _fetch ref.
ringcentral_ringcentral-js-widgets
train
js
20f08101e22ed36ddf36d11c6631d0dc4e390b37
diff --git a/howdoi/howdoi.py b/howdoi/howdoi.py index <HASH>..<HASH> 100755 --- a/howdoi/howdoi.py +++ b/howdoi/howdoi.py @@ -712,18 +712,22 @@ def prompt_stash_remove(args, stash_list, view_stash=True): def perform_sanity_check(): + '''Perform sanity check. + Returns exit code for program. An exit code of -1 means a validation error was encountered. + ''' try: _sanity_check() except GoogleValidationError: _print_err('Google query failed') - return + return -1 except BingValidationError: _print_err('Bing query failed') - return + return -1 except DDGValidationError: _print_err('DuckDuckGo query failed') - return + return -1 print('Ok') + return 0 def command_line_runner(): # pylint: disable=too-many-return-statements,too-many-branches @@ -735,8 +739,9 @@ def command_line_runner(): # pylint: disable=too-many-return-statements,too-man return if args['sanity_check']: - perform_sanity_check() - return + sys.exit( + perform_sanity_check() + ) if args['clear_cache']: if _clear_cache():
fix: add non-zero exit code to validation errors in sanity check
gleitz_howdoi
train
py
7f4960ba7f0f38de13883b0fe1f327e60694a7ba
diff --git a/src/Main.js b/src/Main.js index <HASH>..<HASH> 100755 --- a/src/Main.js +++ b/src/Main.js @@ -2,6 +2,7 @@ import Observer from './Observer'; import GlobalEmitter from './GlobalEmitter'; import mixin from './mixin'; import { isSocketIo } from './utils'; +import defaults from './defaults'; export default { install(Vue, socket, options) { @@ -14,4 +15,5 @@ export default { Vue.prototype.$socket = observer.Socket; Vue.mixin(mixin(GlobalEmitter)); }, + defaults, }; diff --git a/src/index.js b/src/index.js index <HASH>..<HASH> 100644 --- a/src/index.js +++ b/src/index.js @@ -1,5 +1,3 @@ import Main from './Main'; -import defaults from './defaults'; export default Main; -export { defaults };
feat(options): move export to plugin field (instead of named export)
probil_vue-socket.io-extended
train
js,js
f18fc80b70bf7b6b26fffa70b0a8d0502a6c4801
diff --git a/src/dialer/index.js b/src/dialer/index.js index <HASH>..<HASH> 100644 --- a/src/dialer/index.js +++ b/src/dialer/index.js @@ -252,14 +252,15 @@ class Dialer { // Combine the timeout signal and options.signal, if provided const timeoutController = new TimeoutController(this.timeout) - // this controller will potentially be used while dialing lots of - // peers so prevent MaxListenersExceededWarning appearing in the console - setMaxListeners && setMaxListeners(Infinity, timeoutController.signal) const signals = [timeoutController.signal] options.signal && signals.push(options.signal) const signal = anySignal(signals) + // this signal will potentially be used while dialing lots of + // peers so prevent MaxListenersExceededWarning appearing in the console + setMaxListeners && setMaxListeners(Infinity, signal) + const pendingDial = { dialRequest, controller: timeoutController,
fix: increase listeners on any-signal (#<I>) Increase the number of listeners we allow on the actual signal we pass along, instead of the signal we pass into any-signal.
libp2p_js-libp2p
train
js
9981f27f8b2260ddb5f27afbff833dec0d13d428
diff --git a/test/test_framework.go b/test/test_framework.go index <HASH>..<HASH> 100644 --- a/test/test_framework.go +++ b/test/test_framework.go @@ -158,12 +158,24 @@ func (s server) launch() { // add the environment try("Adding micro env", s.t, func() ([]byte, error) { outp, err := exec.Command("micro", "env", "add", s.envName, fmt.Sprintf("127.0.0.1:%v", s.portNum)).CombinedOutput() + if err != nil { + return outp, err + } if len(outp) > 0 { return outp, errors.New("Not added") } - return outp, err - }, 5*time.Second) - // fmt.Println("Env added ok") + + outp, err = exec.Command("micro", "env").CombinedOutput() + if err != nil { + return outp, err + } + if !strings.Contains(string(outp), s.envName) { + return outp, errors.New("Not added") + } + + fmt.Println(string(outp)) + return outp, nil + }, 15*time.Second) try("Calling micro server", s.t, func() ([]byte, error) { outp, err := exec.Command("micro", s.envFlag(), "list", "services").CombinedOutput()
test: ensure env is added
micro_micro
train
go
9dd8cc749eeb880faef8678e3dd66fda55545e9b
diff --git a/scripts/release.js b/scripts/release.js index <HASH>..<HASH> 100755 --- a/scripts/release.js +++ b/scripts/release.js @@ -32,8 +32,9 @@ promptVersion(packageJson.version, (version) => { }); function checkEnvironment() { - const currentBranch = shell.exec('git rev-parse --abbrev-ref HEAD', {silent: true}).toString(); + const currentBranch = shell.exec('git rev-parse --abbrev-ref HEAD', {silent: true}).toString().trim(); + console.log(currentBranch); if (currentBranch !== 'develop') { shell.echo('The release script should be started from develop'.error); process.exit(1);
chore(tool): Correctly detect branch in release.js
algolia_algoliasearch-helper-js
train
js
4b014404058fd67840c8d99fca9f778422c15edd
diff --git a/lib/client.js b/lib/client.js index <HASH>..<HASH> 100644 --- a/lib/client.js +++ b/lib/client.js @@ -407,7 +407,6 @@ class Parser extends HTTPParser { this.client = client this.socket = socket - this.destroyed = false this.statusCode = null this.upgrade = false @@ -502,13 +501,11 @@ class Parser extends HTTPParser { if (statusCode === 100) { util.destroy(socket, new SocketError('bad response')) - this.destroyed = true return 1 } if (upgrade !== request.upgrade) { util.destroy(socket, new SocketError('bad upgrade')) - this.destroyed = true return 1 } @@ -552,9 +549,9 @@ class Parser extends HTTPParser { } [HTTPParser.kOnBody] (chunk, offset, length) { - const { client, socket, statusCode, destroyed } = this + const { client, socket, statusCode } = this - if (destroyed) { + if (!statusCode) { return } @@ -576,10 +573,10 @@ class Parser extends HTTPParser { } [HTTPParser.kOnMessageComplete] () { - const { client, socket, statusCode, headers, upgrade, destroyed } = this + const { client, socket, statusCode, headers, upgrade } = this const request = client[kQueue][client[kRunningIdx]] - if (destroyed) { + if (!statusCode) { return }
refactor: use statusCode instead of destroyed
mcollina_undici
train
js
f19fd1cad274c0b04d9aaa87f67cc294cfcaebe6
diff --git a/switchbot/devices/bulb.py b/switchbot/devices/bulb.py index <HASH>..<HASH> 100644 --- a/switchbot/devices/bulb.py +++ b/switchbot/devices/bulb.py @@ -131,6 +131,8 @@ class SwitchbotBulb(SwitchbotDevice): def _update_state(self, result: bytes) -> None: """Update device state.""" + if len(result) < 10: + return self._state["r"] = result[3] self._state["g"] = result[4] self._state["b"] = result[5]
fix: add a guard to the bulb to reject invalid state updates (#<I>)
Danielhiversen_pySwitchbot
train
py
5d2c8da754b264e346c27fc4a4bda3f84826a8eb
diff --git a/packages/@vue/cli/lib/util/ProjectPackageManager.js b/packages/@vue/cli/lib/util/ProjectPackageManager.js index <HASH>..<HASH> 100644 --- a/packages/@vue/cli/lib/util/ProjectPackageManager.js +++ b/packages/@vue/cli/lib/util/ProjectPackageManager.js @@ -126,7 +126,8 @@ class PackageManager { args.push(`--registry=${registry}`) if (registry === registries.taobao) { - args.push(`--disturl=${TAOBAO_DIST_URL}`) + // for node-gyp + process.env.NODEJS_ORG_MIRROR = TAOBAO_DIST_URL } return args
refactor: replace --disturl option with NODEJS_ORG_MIRROR env variable for better compatibility with pnpm 4 (which does not allow the `--disturl` option)
vuejs_vue-cli
train
js
e8a2d69c1123f3f8a45bcc0e58c755af56d107f7
diff --git a/pyvim/layout.py b/pyvim/layout.py index <HASH>..<HASH> 100644 --- a/pyvim/layout.py +++ b/pyvim/layout.py @@ -528,7 +528,7 @@ class EditorLayout(object): def _create_window_frame(self, editor_buffer): """ - Create a Window for the buffer, with underneat a status bar. + Create a Window for the buffer, with underneath a status bar. """ @Condition def wrap_lines():
docs: fix simple typo, underneat -> underneath There is a small typo in pyvim/layout.py. Should read `underneath` rather than `underneat`.
prompt-toolkit_pyvim
train
py
0156cb62773e13004d00fd4c8ecbae100762a74f
diff --git a/ibis/expr/analysis.py b/ibis/expr/analysis.py index <HASH>..<HASH> 100644 --- a/ibis/expr/analysis.py +++ b/ibis/expr/analysis.py @@ -79,16 +79,7 @@ class ScalarAggregate: return expr node = expr.op() - subbed_args = [] - for arg in node.args: - if isinstance(arg, (tuple, list)): - subbed_arg = [self._visit(x) for x in arg] - else: - subbed_arg = self._visit(arg) - subbed_args.append(subbed_arg) - - new_op = type(node)(*subbed_args) - new_expr = new_op.to_expr() + new_expr = node.__class__(*map(self._visit, node.args)).to_expr() if expr.has_name(): new_expr = new_expr.name(name=expr.get_name())
refactor: remove dead branch in substitution
ibis-project_ibis
train
py
6bcb786a8d37dd22ae15825578a32253ba050605
diff --git a/test/urlMatcherFactorySpec.js b/test/urlMatcherFactorySpec.js index <HASH>..<HASH> 100644 --- a/test/urlMatcherFactorySpec.js +++ b/test/urlMatcherFactorySpec.js @@ -1,20 +1,19 @@ var module = angular.mock.module; var uiRouter = require("ui-router"); -var UrlMatcher, ParamSet, Param; - +var provide, UrlMatcher, ParamSet, Param; + +beforeEach(function() { + var app = angular.module('ui.router.router.test', function () { }); + app.config(function ($urlMatcherFactoryProvider) { + provider = $urlMatcherFactoryProvider; + UrlMatcher = provider.UrlMatcher; + ParamSet = provider.ParamSet; + Param = provider.Param; + }); +}); describe("UrlMatcher", function () { - - var provider; - beforeEach(function() { - angular.module('ui.router.router.test', function() {}).config(function ($urlMatcherFactoryProvider) { - provider = $urlMatcherFactoryProvider; - UrlMatcher = provider.UrlMatcher; - ParamSet = provider.ParamSet; - Param = provider.Param; - }); - module('ui.router.router', 'ui.router.router.test'); inject(function($injector) {
test(urlMatcher): move angular DI capture block to top of file
ui-router_angular
train
js
2c780514979864d8043647169663f12d0d9a4c3b
diff --git a/src/swarm.js b/src/swarm.js index <HASH>..<HASH> 100644 --- a/src/swarm.js +++ b/src/swarm.js @@ -21,7 +21,7 @@ module.exports = (common) => { before(function (done) { // CI takes longer to instantiate the daemon, so we need to increase the // timeout for the before step - this.timeout(60 * 1000) + this.timeout(100 * 1000) common.setup((err, factory) => { expect(err).to.not.exist()
chore: bump swarm timeout
ipfs_interface-js-ipfs-core
train
js
306ff1bdff13c3127d2d73755b84047614702a3e
diff --git a/grappa/reporters/code.py b/grappa/reporters/code.py index <HASH>..<HASH> 100644 --- a/grappa/reporters/code.py +++ b/grappa/reporters/code.py @@ -37,8 +37,8 @@ class CodeReporter(BaseReporter): # Context manager based assertions that does not imply new test calls. CONTEXT_EXPR = re.compile( - r'[\.](not)?[\_]?(have|has|be|to|that|' - r'satisfy|which|include)[\_]?(not)?[\.]') + r'[\.](not)?[\_]?(have|has|be|to|that|_is|is_not|' + r'satisfy|which|that_is|which_is|include)[\_]?(not)?[\.]') def match_line(self, line): return any([
feat(reporters): add code reporter
grappa-py_grappa
train
py
c3fa1e3b13086b354094a620c9148db9070302b3
diff --git a/src/connection.js b/src/connection.js index <HASH>..<HASH> 100644 --- a/src/connection.js +++ b/src/connection.js @@ -2832,12 +2832,13 @@ export class Connection { const {result} = res; const {value, context} = result; + assert(value.data[1] === 'base64'); sub.callback( { executable: value.executable, owner: new PublicKey(value.owner), lamports: value.lamports, - data: Buffer.from(value.data, 'base64'), + data: Buffer.from(value.data[0], 'base64'), }, context, );
fix: properly decode account notifications (#<I>)
solana-labs_solana-web3.js
train
js
a7ea7904839542b06f67af08a95d9b186ad82e4e
diff --git a/src/Stores/UiStore.js b/src/Stores/UiStore.js index <HASH>..<HASH> 100644 --- a/src/Stores/UiStore.js +++ b/src/Stores/UiStore.js @@ -536,6 +536,7 @@ class UI { return } const formatCommand = command => ({ + time: command.date, clientId: command.clientId, payload: { name: command.payload.name, @@ -543,6 +544,7 @@ class UI { }, type: command.type, }) + const commands = JSON.stringify(this.session.commands.map(formatCommand)) fs.writeFile(this.exportFilePath + "/reactotron_timeline.txt", commands, err => { if (err) {
feat: allow exporting command timestamps
infinitered_reactotron
train
js
d5621d99a121dc3acc0f8973a42c7d178cbfe8c5
diff --git a/referenceConf.js b/referenceConf.js index <HASH>..<HASH> 100644 --- a/referenceConf.js +++ b/referenceConf.js @@ -30,8 +30,10 @@ exports.config = { sauceUser: null, sauceKey: null, - // The address of a running selenium server. - seleniumAddress: 'http://localhost:4444/wd/hub', + // The address of a running selenium server. If specified, Protractor will + // connect to an already running instance of selenium. This usually looks like + // seleniumAddress: 'http://localhost:4444/wd/hub' + seleniumAddress: null // ----- What tests to run ----- //
docs(configuration): make the roll of seleniumAddress clear Makes seleniumAddress null by default in the reference configuration, which prevents odd error messages being the fist thing you see if you just install selenium and then run tests against the reference config.
angular_protractor
train
js
672b8d78a0ddcb3a36ec9042946167c85c49a9bf
diff --git a/packages/theme-data/src/baseTheme/components/badge.js b/packages/theme-data/src/baseTheme/components/badge.js index <HASH>..<HASH> 100644 --- a/packages/theme-data/src/baseTheme/components/badge.js +++ b/packages/theme-data/src/baseTheme/components/badge.js @@ -86,7 +86,7 @@ export default { }, }, "badge.outline.borderColor": { - type: BORDER_WIDTH, + type: COLOR, value: { ref: "colorScheme.surface.level100", },
refactor: updated badge outline basic type
Autodesk_hig
train
js
087f368740db45022aece9d1f3375538e237121a
diff --git a/pymatgen/core/periodic_table.py b/pymatgen/core/periodic_table.py index <HASH>..<HASH> 100644 --- a/pymatgen/core/periodic_table.py +++ b/pymatgen/core/periodic_table.py @@ -612,6 +612,10 @@ class Element(Enum): # angular moment (L) and number of valence e- (v_e) """ + # the number of valence of noble gas is 0 + if self.group == 18: + return (np.nan, 0) + L_symbols = 'SPDFGHIKLMNOQRTUVWXYZ' valence = [] full_electron_config = self.full_electronic_structure diff --git a/pymatgen/core/tests/test_periodic_table.py b/pymatgen/core/tests/test_periodic_table.py index <HASH>..<HASH> 100644 --- a/pymatgen/core/tests/test_periodic_table.py +++ b/pymatgen/core/tests/test_periodic_table.py @@ -67,6 +67,10 @@ class ElementTestCase(PymatgenTest): with self.assertRaises(ValueError): Element("U").valence + valence = Element("He").valence + self.assertTrue(np.isnan(valence[0])) + self.assertEqual(valence[1], 0) + def test_term_symbols(self): testsets = {"Li": [['2S0.5']], # s1 "C": [['1D2.0'],
fix: Element.valence of noble gases, and add tests
materialsproject_pymatgen
train
py,py
3ba41b5472c9cbb4c2f8c9e3864be1c087b0b77f
diff --git a/src/trumbowyg.js b/src/trumbowyg.js index <HASH>..<HASH> 100644 --- a/src/trumbowyg.js +++ b/src/trumbowyg.js @@ -432,8 +432,11 @@ jQuery.trumbowyg = { t.initPlugins(); - // Disable image resize in Firefox - t.doc.execCommand('enableObjectResizing', false, false); + try { + // Disable image resize, try-catch for old IE + t.doc.execCommand('enableObjectResizing', false, false); + } catch (e) { + } t.doc.execCommand('defaultParagraphSeparator', false, 'p'); t.buildEditor();
fix: try-catch enableObjectResizing to avoid IE error This commit is an alternative to #<I> since this property shoud be supported by other browsers fix #<I>
Alex-D_Trumbowyg
train
js
0dacf1bb3bd53da32a24cf2286cf081aecf22806
diff --git a/lib/plugins/aws/info/display.js b/lib/plugins/aws/info/display.js index <HASH>..<HASH> 100644 --- a/lib/plugins/aws/info/display.js +++ b/lib/plugins/aws/info/display.js @@ -45,10 +45,11 @@ module.exports = { const description = apiKeyInfo.description ? ` - ${apiKeyInfo.description}` : ''; if (conceal) { apiKeysMessage += `\n ${apiKeyInfo.name}${description}`; + outputSectionItems.push(`${apiKeyInfo.name}${description}`); } else { apiKeysMessage += `\n ${apiKeyInfo.name}: ${apiKeyInfo.value}${description}`; + outputSectionItems.push(`${apiKeyInfo.name}: ${apiKeyInfo.value}${description}`); } - outputSectionItems.push(`${apiKeyInfo.name}: ${apiKeyInfo.value}${description}`); }); this.serverless.serviceOutputs.set('api keys', outputSectionItems); } else {
refactor: Support `conceal` option in modern logs
serverless_serverless
train
js
0c240729e4c4aead3adcb2847f0812ea8f601628
diff --git a/packages/webpack/lib/plugins/stats.js b/packages/webpack/lib/plugins/stats.js index <HASH>..<HASH> 100644 --- a/packages/webpack/lib/plugins/stats.js +++ b/packages/webpack/lib/plugins/stats.js @@ -26,6 +26,7 @@ exports.StatsPlugin = class WebpackStatsPlugin { ); resolvable.resolve({ ...stats, entryAssetsByType }); }); + compiler.hooks.watchRun.tap('untool-stats', () => resolvable.reset()); }; } };
fix(webpack): reset resolvable on watch run
untool_untool
train
js
1737ba8cc7fb3461bbe2ccab22532186f812e328
diff --git a/tests/integrations/aws_lambda/test_aws.py b/tests/integrations/aws_lambda/test_aws.py index <HASH>..<HASH> 100644 --- a/tests/integrations/aws_lambda/test_aws.py +++ b/tests/integrations/aws_lambda/test_aws.py @@ -57,6 +57,9 @@ def lambda_client(): @pytest.fixture(params=["python3.6", "python3.7", "python3.8", "python2.7"]) def run_lambda_function(tmpdir, lambda_client, request, relay_normalize): + if request.param == "python3.8": + pytest.xfail("Python 3.8 is currently broken") + def inner(code, payload): runtime = request.param tmpdir.ensure_dir("lambda_tmp").remove()
chore: xfail aws to get going with release
getsentry_sentry-python
train
py
0e42d1a7e8bdb9e58b23f9cf33a6c3b0bffa070d
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 @@ -85,8 +85,7 @@ export default class Button extends Intact { _onClick(e) { if (this.get('disabled') || this.get('loading')) { - e.preventDefault(); - return; + return e.preventDefault(); } if (this.group) { diff --git a/components/dropdown/dropdown.js b/components/dropdown/dropdown.js index <HASH>..<HASH> 100644 --- a/components/dropdown/dropdown.js +++ b/components/dropdown/dropdown.js @@ -19,9 +19,9 @@ export default class Dropdown extends Intact { _init() { this._saveOriginalEvents(); - this.on('$change:children', () => { + this.on('$receive:children', () => { this._saveOriginalEvents(); - }); + }, {keep: true}); } _saveOriginalEvents() {
fix: dropdown cannot fix children when destroyed
ksc-fe_kpc
train
js,js
b65d98fc7c5eb48a968c2dd9011c80016ff58790
diff --git a/packages/ringcentral-widgets/components/LogBasicInfo/index.js b/packages/ringcentral-widgets/components/LogBasicInfo/index.js index <HASH>..<HASH> 100644 --- a/packages/ringcentral-widgets/components/LogBasicInfo/index.js +++ b/packages/ringcentral-widgets/components/LogBasicInfo/index.js @@ -136,6 +136,7 @@ export default function LogBasicInfo(props) { ) : null } <span + data-sign="callStatus" className={statusClassName} title={statusI18n}> {statusI18n}
chore(E2E-label): add `callStatus` in log basic info (#<I>)
ringcentral_ringcentral-js-widgets
train
js
6a77d0344ffb549cec65664379f6253a03e36e6c
diff --git a/test/e2e/lib/driver-manager.js b/test/e2e/lib/driver-manager.js index <HASH>..<HASH> 100644 --- a/test/e2e/lib/driver-manager.js +++ b/test/e2e/lib/driver-manager.js @@ -4,6 +4,7 @@ import webdriver from 'selenium-webdriver'; import firefox from 'selenium-webdriver/firefox'; import chrome from 'selenium-webdriver/chrome'; +import chromedriver from 'chromedriver'; import config from 'config'; import proxy from 'selenium-webdriver/proxy'; import SauceLabs from 'saucelabs'; @@ -163,7 +164,7 @@ export async function startBrowser( { useCustomUA = true, resizeBrowserWindow = options.addArguments( '--app=https://www.wordpress.com' ); // eslint-disable-next-line no-case-declarations - const service = new chrome.ServiceBuilder() + const service = new chrome.ServiceBuilder( chromedriver.path ) .loggingTo( './chromedriver.' + process.pid + '.log' ) .enableVerboseLogging() .build();
ci: Do not assume chromedriver is in $PATH (#<I>)
Automattic_wp-calypso
train
js
b47d16ca6e3049c0f22773fd0f942f40e4adf39d
diff --git a/mistletoe/block_token.py b/mistletoe/block_token.py index <HASH>..<HASH> 100644 --- a/mistletoe/block_token.py +++ b/mistletoe/block_token.py @@ -844,6 +844,7 @@ class Footnote(BlockToken): elif '\n' in string[offset:new_offset]: return offset, offset, '' else: + # XXX: Can this actually ever happen? return None offset = new_offset escaped = False @@ -871,9 +872,13 @@ class Footnote(BlockToken): @staticmethod def backtrack(lines, string, offset): """ - Called when we peeked some lines and found nothing + Called when we iterated over some lines and found nothing relevant on them. This returns those lines back to the parsing process. """ + + # call lstrip() to prevent returning too many lines back (hence infinite loop), like in this case: + # * valid footlink definition line: `[key]: valueN\r\n` (here `offset` points to `\r` after parsing the definition) + # * follow-up line containing just text: `something\n` (only this line should be re-processed and parsed as a Paragraph) lines._index -= string[offset:].lstrip().count('\n')
docs: add some remarks to the lstrip() call which was added to fix #<I>
miyuchina_mistletoe
train
py
083851acff871c00ee951b484ccea2769971fccc
diff --git a/lib/shikashi/sandbox.rb b/lib/shikashi/sandbox.rb index <HASH>..<HASH> 100644 --- a/lib/shikashi/sandbox.rb +++ b/lib/shikashi/sandbox.rb @@ -346,6 +346,16 @@ module Shikashi :privileges => privileges_, :source => source) + code = "nil;\n " + code + + unless no_base_namespace + if (base_namespace.instance_of? Module) + code = "module #{base_namespace}\n #{code}\n end\n" + else + code = "class #{base_namespace}\n #{code}\n end\n" + end + end + evalhook_packet = @hook_handler.packet(code) Shikashi::Sandbox::Packet.new(evalhook_packet, privileges_, source) end
refactor: added module of basenamespace for sandboxed packages
tario_shikashi
train
rb
a8a09fe8b0d241045e23f8a6b9f2b4c0b627ee94
diff --git a/src/Security/AuthorizationContextAwareTrait.php b/src/Security/AuthorizationContextAwareTrait.php index <HASH>..<HASH> 100644 --- a/src/Security/AuthorizationContextAwareTrait.php +++ b/src/Security/AuthorizationContextAwareTrait.php @@ -1,4 +1,6 @@ -<?php declare(strict_types=1); +<?php + +declare(strict_types=1); namespace Graphael\Security; @@ -10,7 +12,7 @@ use Symfony\Component\Security\Core\Exception\AccessDeniedException; trait AuthorizationContextAwareTrait { - private function assertSameUsername(array $context, ?string $username): void + protected function assertSameUsername(array $context, ?string $username): void { $this->assertGranted( $context, @@ -20,13 +22,12 @@ trait AuthorizationContextAwareTrait ); } - private function assertGranted( + protected function assertGranted( array $context, array $attributes, $subject = null, string $deniedMessage = 'Access Denied.' - ): void - { + ): void { $checker = $context[Server::CONTEXT_AUTHORIZATION_KEY]; assert($checker instanceof AuthorizationCheckerInterface);
fix: methods protected vs private #<I>
linkorb_graphael
train
php
97b7e0fca58e5993f05be6b9f462d48d8d0923be
diff --git a/zpay32/invoice.go b/zpay32/invoice.go index <HASH>..<HASH> 100644 --- a/zpay32/invoice.go +++ b/zpay32/invoice.go @@ -144,7 +144,8 @@ type Invoice struct { Destination *btcec.PublicKey // minFinalCLTVExpiry is the value that the creator of the invoice - // expects to be used for the + // expects to be used for the CLTV expiry of the HTLC extended to it in + // the last hop. // // NOTE: This value is optional, and should be set to nil if the // invoice creator doesn't have a strong requirement on the CLTV expiry
fix: incomplete comment about minFinalCLTVExpiry
lightningnetwork_lnd
train
go
98400238cc24b75d427b25b119f66bb295bfab7c
diff --git a/examples/protractor-cucumber/protractor.conf.js b/examples/protractor-cucumber/protractor.conf.js index <HASH>..<HASH> 100644 --- a/examples/protractor-cucumber/protractor.conf.js +++ b/examples/protractor-cucumber/protractor.conf.js @@ -22,8 +22,8 @@ exports.config = { crew: [ ArtifactArchiver.storingArtifactsAt('./target/site/serenity'), new SerenityBDDReporter(), - // ConsoleReporter.forDarkTerminals(), - new StreamReporter(), + ConsoleReporter.forDarkTerminals(), + // new StreamReporter(), ] }, diff --git a/examples/protractor-jasmine/protractor.conf.js b/examples/protractor-jasmine/protractor.conf.js index <HASH>..<HASH> 100644 --- a/examples/protractor-jasmine/protractor.conf.js +++ b/examples/protractor-jasmine/protractor.conf.js @@ -22,7 +22,7 @@ exports.config = { crew: [ ArtifactArchiver.storingArtifactsAt('./target/site/serenity'), new SerenityBDDReporter(), - new ConsoleReporter(), + ConsoleReporter.withDefaultColourSupport(), ] },
docs(examples): Demonstrated the instantiation of the ConsoleReporter re #<I>
jan-molak_serenity-js
train
js,js
5b1d7df4e2e71d5e60bd24e1b507018a23eaad1a
diff --git a/Twig/CoreExtension.php b/Twig/CoreExtension.php index <HASH>..<HASH> 100644 --- a/Twig/CoreExtension.php +++ b/Twig/CoreExtension.php @@ -2,6 +2,7 @@ namespace NetBull\CoreBundle\Twig; +use Symfony\Component\Intl\Countries; use Symfony\Component\Intl\Intl; use Symfony\Component\DomCrawler\Crawler; use Symfony\Component\Routing\RouterInterface; @@ -226,11 +227,7 @@ class CoreExtension extends AbstractExtension */ public function getCountryName(string $code, string $locale = '') : string { - $countries = Intl::getRegionBundle()->getCountryNames($locale); - - return array_key_exists($code, $countries) - ? $countries[$code] - : $code; + return Countries::getName($code, $locale); } /**
fix: removed deprecated method
netbull_CoreBundle
train
php
cb5df28fb21ec52690964c2f9ecf3b2ad217145d
diff --git a/lib/cursor.js b/lib/cursor.js index <HASH>..<HASH> 100644 --- a/lib/cursor.js +++ b/lib/cursor.js @@ -107,13 +107,15 @@ var Cursor = function(bson, ns, cmd, options, topology, topologyOptions) { transforms: options.transforms }; + if (typeof options.session === 'object') { + this.cursorState.session = options.session; + } + // Add promoteLong to cursor state if (typeof topologyOptions.promoteLongs === 'boolean') { this.cursorState.promoteLongs = topologyOptions.promoteLongs; } else if (typeof options.promoteLongs === 'boolean') { this.cursorState.promoteLongs = options.promoteLongs; - } else if (typeof options.session === 'object') { - this.cursorState.session = options.session; } // Add promoteValues to cursor state
fix(cursor): check for sessions independently in core cursor
mongodb-js_mongodb-core
train
js
04aa35b20d28fd008a93fedbbc5d518c23962912
diff --git a/packages/express/lib/static.js b/packages/express/lib/static.js index <HASH>..<HASH> 100644 --- a/packages/express/lib/static.js +++ b/packages/express/lib/static.js @@ -7,6 +7,7 @@ module.exports = (method, options, config, initialize, finalize) => { const app = new Router(); initialize(app, method); finalize(app, method); + app.use((req, res) => res.status(404).end()); return options => { if (typeof options === 'string') { options = { url: options };
feat(express): add <I> middleware to renderer add catchall to handle soft, i.e. app level, misses during static rendering
untool_untool
train
js
ed915d5ca8df4fd708b201c58f4c150a8928fa9b
diff --git a/module.flow.js b/module.flow.js index <HASH>..<HASH> 100644 --- a/module.flow.js +++ b/module.flow.js @@ -92,8 +92,9 @@ declare module '@solana/web3.js' { declare export class TransactionInstruction { fee: number; - - constructor(opts?: TransactionInstructionCtorFields): TransactionInstruction; + keys: Array<PublicKey>; + programId: PublicKey; + userdata: Buffer; } declare type TransactionCtorFields = {| @@ -103,6 +104,7 @@ declare module '@solana/web3.js' { declare export class Transaction { signature: ?Buffer; fee: number; + instructions: Array<TransactionInstruction>; constructor(opts?: TransactionCtorFields): Transaction; add(item: TransactionInstruction | TransactionInstructionCtorFields): Transaction;
fix(flow): add transaction instructions field
solana-labs_solana-web3.js
train
js
ad3255c84cf68efc490600fe8f47ec1fb5ae6b24
diff --git a/packages/mdc-top-app-bar/addon/components/mdc-top-app-bar.js b/packages/mdc-top-app-bar/addon/components/mdc-top-app-bar.js index <HASH>..<HASH> 100644 --- a/packages/mdc-top-app-bar/addon/components/mdc-top-app-bar.js +++ b/packages/mdc-top-app-bar/addon/components/mdc-top-app-bar.js @@ -47,7 +47,7 @@ export default Component.extend (Theme, { // Notify the listeners that our style has changed. if (this._topAppBar) { - this._topAppBar.emit ('MDCTopAppBar:change', {style}); + this._topAppBar.emit ('MDCTopAppBar:change', {style}, true); } if (isEmpty (style)) { @@ -72,6 +72,10 @@ export default Component.extend (Theme, { didInsertElement () { this._super (...arguments); this._createComponent (); + + // Notify the listeners of the original style. + let style = this.get ('style'); + this._topAppBar.emit ('MDCTopAppBar:change', {style}, true); }, didUpdate () {
fix: Notify listeners of the top app bar style when created
onehilltech_ember-cli-mdc
train
js
19550a328cf4d81b27c4786aec423649d83bbbf9
diff --git a/lib/datasource/npm.js b/lib/datasource/npm.js index <HASH>..<HASH> 100644 --- a/lib/datasource/npm.js +++ b/lib/datasource/npm.js @@ -220,6 +220,9 @@ async function getDependency(name, retries = 5) { throw new Error('registry-failure'); } const retryAfter = err.headers['retry-after'] || 30; + logger.info( + `npm too many requests. retrying after ${retryAfter} seconds` + ); await delay(1000 * (retryAfter + 1)); return getDependency(name, retries - 1); }
refactor: log npm <I> retries
renovatebot_renovate
train
js
129c035c55dbcb589b543f09e59585eff945b572
diff --git a/samcli/commands/init/__init__.py b/samcli/commands/init/__init__.py index <HASH>..<HASH> 100644 --- a/samcli/commands/init/__init__.py +++ b/samcli/commands/init/__init__.py @@ -51,8 +51,6 @@ def cli(ctx, location, runtime, output_dir, name, no_input): $ sam init --location git+ssh://git@github.com/aws-samples/cookiecutter-aws-sam-python.git \b $ sam init --location hg+ssh://hg@bitbucket.org/repo/template-name - \b - $ sam init --location hg+ssh://hg@bitbucket.org/repo/template-name \b Initializes a new SAM project using custom template in a Zipfile
fix: Removed dual line in init help text (#<I>)
awslabs_aws-sam-cli
train
py
35f27d10f3f3a04647df128e26684651f9268b24
diff --git a/packages/taro-api/src/polyfill.js b/packages/taro-api/src/polyfill.js index <HASH>..<HASH> 100644 --- a/packages/taro-api/src/polyfill.js +++ b/packages/taro-api/src/polyfill.js @@ -1,8 +1,6 @@ -import { isFunction, isUndefined, isObject } from './utils' +import { isFunction, isObject, isUndefined } from './utils' -function isBadObj (x) { - !isObject(x) || x === null -} +const isBadObj = (x) => !isObject(x) function throwTypeError (s) { throw new TypeError(s) diff --git a/packages/taro-api/src/utils.js b/packages/taro-api/src/utils.js index <HASH>..<HASH> 100644 --- a/packages/taro-api/src/utils.js +++ b/packages/taro-api/src/utils.js @@ -7,5 +7,5 @@ export function isUndefined (x) { } export function isObject (x) { - return typeof x === 'object' + return x && typeof x === 'object' }
fix(taro-api): exclude null from isObject
NervJS_taro
train
js,js
f111c1656fd7aa829f43982e4c2b64f7a6971960
diff --git a/qa/integration-tests-engine/src/test/java/org/camunda/bpm/integrationtest/jobexecutor/JobPrioritizationFailureJavaSerializationTest.java b/qa/integration-tests-engine/src/test/java/org/camunda/bpm/integrationtest/jobexecutor/JobPrioritizationFailureJavaSerializationTest.java index <HASH>..<HASH> 100644 --- a/qa/integration-tests-engine/src/test/java/org/camunda/bpm/integrationtest/jobexecutor/JobPrioritizationFailureJavaSerializationTest.java +++ b/qa/integration-tests-engine/src/test/java/org/camunda/bpm/integrationtest/jobexecutor/JobPrioritizationFailureJavaSerializationTest.java @@ -77,6 +77,8 @@ public class JobPrioritizationFailureJavaSerializationTest extends AbstractFoxPl final WebArchive webArchive = initWebArchiveDeployment("pa1.war", "org/camunda/bpm/integrationtest/processes-javaSerializationEnabled-pa1.xml") .addClass(PriorityBean.class) .addAsResource("org/camunda/bpm/integrationtest/jobexecutor/JobPrioritizationTest.priorityProcess.bpmn20.xml"); + + TestContainer.addContainerSpecificProcessEngineConfigurationClass(webArchive); return webArchive; }
fix(test): fix integration test Related with CAM-<I>
camunda_camunda-bpm-platform
train
java
632e1c47ce4b8b75c93ef69b660aa1d3ba012714
diff --git a/src/Http/Controllers/Squads/ApplicationsController.php b/src/Http/Controllers/Squads/ApplicationsController.php index <HASH>..<HASH> 100644 --- a/src/Http/Controllers/Squads/ApplicationsController.php +++ b/src/Http/Controllers/Squads/ApplicationsController.php @@ -65,6 +65,10 @@ class ApplicationsController extends Controller */ public function store(Request $request, int $id) { + $request->validate([ + 'message' => 'required', + ]); + $squad = Squad::find($id); $application = new SquadApplication([
feat(squads): add validation to ensure message set (#<I>)
eveseat_web
train
php
234d92e89b4d89233c45ed0760b4026e03eea74b
diff --git a/lib/config.js b/lib/config.js index <HASH>..<HASH> 100644 --- a/lib/config.js +++ b/lib/config.js @@ -33,7 +33,7 @@ config.DATA_ID = 'x-whistle-data-id' + '-' + uid; config.CLIENT_PORT_HEAD = 'x-whistle-client-port-' + uid; config.HTTPS_FLAG = config.whistleSsl + '.'; config.WEBUI_HEAD = 'x-forwarded-from-whistle-' + uid; -config.WEBUI_PATH = '/...whistle.5b6af7b9884e1165...///'; +config.WEBUI_PATH = '/...whistle-path.5b6af7b9884e1165...///'; function getHomedir() { //默认设置为`~`,防止Linux在开机启动时Node无法获取homedir
refactor: change the value of whistle path
avwo_whistle
train
js
b5a68cf6177dc0ed80eda722605db064f3fe2062
diff --git a/semantic_release/cli.py b/semantic_release/cli.py index <HASH>..<HASH> 100644 --- a/semantic_release/cli.py +++ b/semantic_release/cli.py @@ -4,6 +4,7 @@ import sys import click from semantic_release import ci_checks +from semantic_release.errors import GitError from .history import (evaluate_version_bump, get_current_version, get_new_version, get_previous_version, set_new_version) @@ -132,13 +133,17 @@ def publish(**kwargs): if check_token(): click.echo('Updating changelog') - log = generate_changelog(current_version, new_version) - post_changelog( - owner, - name, - new_version, - markdown_changelog(new_version, log, header=False) - ) + try: + log = generate_changelog(current_version, new_version) + post_changelog( + owner, + name, + new_version, + markdown_changelog(new_version, log, header=False) + ) + except GitError: + click.echo(click.style('Posting changelog failed.', 'red'), err=True) + else: click.echo( click.style('Missing token: cannot post changelog', 'red'), err=True)
fix: Make changelog problems not fail whole publish Can be fixed with changelog command later.
relekang_python-semantic-release
train
py
bf416e2148f4f0c2cc333c1cb3d321c8d970b5a4
diff --git a/index.js b/index.js index <HASH>..<HASH> 100644 --- a/index.js +++ b/index.js @@ -95,7 +95,7 @@ cmd.edit = () => { } function splitEntity (entity = '') { - let [, scope, team] = entity.match(/^@?([^:]+):(.*)$/) || [] + const [, scope, team] = entity.match(/^@?([^:]+):(.*)$/) || [] return { scope, team } }
chore: fixed failing linting; because of dep update
npm_libnpmteam
train
js
15cada474979dd476381ff59cc524459f858c748
diff --git a/test/unit/package/dependencies-test.js b/test/unit/package/dependencies-test.js index <HASH>..<HASH> 100644 --- a/test/unit/package/dependencies-test.js +++ b/test/unit/package/dependencies-test.js @@ -8,7 +8,7 @@ suite('dependencies', () => { let sandbox; const dependenciesLists = any.listOf(() => any.fromList([any.listOf(any.string), undefined]), {min: 5}); const dependenciesFromAllContributors = dependenciesLists.reduce((acc, list) => (list ? [...acc, ...list] : acc), []); - const devDependenciesLists = any.listOf(() => any.listOf(any.string), {min: 5}); + const devDependenciesLists = any.listOf(() => any.listOf(any.string), {size: dependenciesLists.length}); const devDependenciesFromAllContributors = devDependenciesLists.reduce((acc, list) => ([...acc, ...list]), []); const contributors = any.listOf( index => ({
test(flakiness): fixed length matching problem for dependencies since the deps and dev-deps lists werent the same length
travi_javascript-scaffolder
train
js
a03c7030f35f6b226c4abc23f250c021d96d1808
diff --git a/test.js b/test.js index <HASH>..<HASH> 100644 --- a/test.js +++ b/test.js @@ -116,7 +116,11 @@ test('should have empty string err.stack property if opts.showStack: false', fun var err = stacktraceMetadata(new Error('abc'), { showStack: false }) + test.strictEqual(err.stack, '') + test.ok(err.line) + test.ok(err.column) + test.ok(err.filename) done() }) @@ -126,7 +130,7 @@ test('should have props like `err.line`, `err.filename` and `err.column`', funct test.strictEqual(e.name, 'Error') test.strictEqual(e.message, 'my special error') - test.strictEqual(e.line, 124) + test.strictEqual(e.line, 128) test.strictEqual(e.column, 13) test.strictEqual(e.place, 'Function.myQuxTest') test.strictEqual(e.filename, 'test.js')
fix(tests): improve test fixes #4
tunnckoCore_stacktrace-metadata
train
js
f3b5e3f732b57491af9ff6532181607e29f77f7c
diff --git a/src/Repositories/Corporation/Security.php b/src/Repositories/Corporation/Security.php index <HASH>..<HASH> 100644 --- a/src/Repositories/Corporation/Security.php +++ b/src/Repositories/Corporation/Security.php @@ -23,9 +23,9 @@ namespace Seat\Services\Repositories\Corporation; use Illuminate\Support\Collection; -use Seat\Eveapi\Models\Corporation\CorporationMemberTitle; use Seat\Eveapi\Models\Corporation\CorporationRole; use Seat\Eveapi\Models\Corporation\CorporationRoleHistory; +use Seat\Eveapi\Models\Corporation\CorporationTitle; /** * Class Security. @@ -72,9 +72,8 @@ trait Security public function getCorporationMemberSecurityTitles(int $corporation_id): Collection { - return CorporationMemberTitle::join('corporation_titles', 'corporation_member_titles.title_id', '=', - 'corporation_titles.title_id') - ->where('corporation_member_titles.corporation_id', $corporation_id) - ->get(); + return CorporationTitle::with('characters') + ->where('corporation_id', $corporation_id) + ->get(); } }
fix(titles): reduce abnormal loop on corp titles page (#<I>) Exploit the new Eloquent Pivot relationship to render the corporation title page properly and avoid excessive memory consummation. Closes eveseat/seat#<I>
eveseat_services
train
php
fb50ddab85de4299562162f3d79aed84ba650c41
diff --git a/test/legacy-tests.test.js b/test/legacy-tests.test.js index <HASH>..<HASH> 100644 --- a/test/legacy-tests.test.js +++ b/test/legacy-tests.test.js @@ -1,4 +1,3 @@ -/* eslint-disable handle-callback-err */ 'use strict' const expressSession = require('express-session') @@ -128,6 +127,7 @@ describe('legacy tests', () => { store.set(sid, data, err => { assert.strictEqual(err, null) collection.findOne({ _id: sid }, (err, session) => { + assert.strictEqual(err, null) assertSessionEquals(sid, data, session) cleanup(store, collection, done) }) @@ -210,6 +210,7 @@ describe('legacy tests', () => { session: JSON.stringify(testData), }) store.get(sid, (err, session) => { + assert.strictEqual(err, null) assert.deepStrictEqual(session, testData) cleanup(store, collection, done) }) @@ -419,7 +420,9 @@ describe('legacy tests', () => { const sid = 'test_set_memory-sid' const data = makeData() store.set(sid, data, async err => { + expect(err).toBeFalsy() store.get(sid, (err, session) => { + assert.strictEqual(err, null) for (const prop in session.session) { if (prop === 'cookie') { // Make sure the cookie is intact
test: remove eslint disable handle-callback-err and fix test
jdesboeufs_connect-mongo
train
js
bf4b75ee9c8a3af896d1921462902bb4dad3da3d
diff --git a/gulpfile.js b/gulpfile.js index <HASH>..<HASH> 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -545,8 +545,10 @@ function getBrowsersFromCLI() { var outputList = []; for (var i = 0; i < inputList.length; i++) { var input = inputList[i]; - if (sauceConf.customLaunchers.hasOwnProperty(input)) { - //Non-sauce browsers case: overrides everything, ignoring other options + var karmaChromeLauncher = require('karma-chrome-launcher'); + if (sauceConf.customLaunchers.hasOwnProperty(input) || karmaChromeLauncher.hasOwnProperty("launcher:" + input)) { + // In case of non-sauce browsers, or browsers defined in karma-chrome-launcher (Chrome, ChromeCanary and Dartium): + // overrides everything, ignoring other options outputList = [input]; isSauce = false; break;
fix(build): error when running `npm test` locally Closes #<I>
angular_angular
train
js
28ee2d9e57f92e6b59ed50df64a597ded27d4b56
diff --git a/gofight.go b/gofight.go index <HASH>..<HASH> 100644 --- a/gofight.go +++ b/gofight.go @@ -106,7 +106,11 @@ func TestRequest(t *testing.T, url string) { client := &http.Client{Transport: tr} resp, err := client.Get(url) - defer resp.Body.Close() + defer func() { + if err := resp.Body.Close(); err != nil { + log.Println("close body err:", err) + } + }() assert.NoError(t, err)
fix: check body closed. (#<I>)
appleboy_gofight
train
go
cdaaa95e1da30bb879d3af5f261993adf81115e6
diff --git a/lib/init.js b/lib/init.js index <HASH>..<HASH> 100644 --- a/lib/init.js +++ b/lib/init.js @@ -59,6 +59,7 @@ function addTransforms(req, res) { function initResZipTransform() { if (!initedResTransform) { initedResTransform = true; + res._hasZipBody = true; removeContentLength(); res.add(function(src, next) { var pipeIconvStream = util.getPipeIconvStream(res.headers);
refactor: remove content-length if change the body
avwo_whistle
train
js
f8915f385b687095a8bafafacc303579b2cb95cc
diff --git a/tooling/lib/test/index.js b/tooling/lib/test/index.js index <HASH>..<HASH> 100644 --- a/tooling/lib/test/index.js +++ b/tooling/lib/test/index.js @@ -8,7 +8,6 @@ const dotenv = require('dotenv'); dotenv.config(); dotenv.config({path: '.env.default'}); -process.env.NODE_ENV = process.env.NODE_ENV || 'test'; const { gatherFiles @@ -29,6 +28,9 @@ const {glob} = require('../../util/package'); /* eslint-disable complexity */ exports.testPackage = async function testPackage(options, packageName) { + // Move NODE_ENV override into the exported function since babel-node is processing everything above + process.env.NODE_ENV = process.env.NODE_ENV || 'test'; + // eslint-disable-next-line global-require require('babel-register')({ only: [
fix(tooling): stop yargs test command from setting NODE_ENV
webex_spark-js-sdk
train
js
d985bee22c92a9dfe67ee6d98bf37ef3fddbfc42
diff --git a/www/nearit.js b/www/nearit.js index <HASH>..<HASH> 100644 --- a/www/nearit.js +++ b/www/nearit.js @@ -115,11 +115,11 @@ NearIT.prototype.getProfileId = function(successCallback, errorCallback) { /** * Set NearIT user profile Id * @param string profileId A previously stored NearIT profile id - * @param {Function} successCallback The function to call when the call is successful - * @param {Function} errorCallback The function to call when there is an error + * @deprecated @param {Function} successCallback + * @deprecated @param {Function} errorCallback */ NearIT.prototype.setProfileId = function(profileId, successCallback, errorCallback) { - exec(successCallback, errorCallback, this.serviceName, "setProfileId", [profileId]); + exec(this.serviceName, "setProfileId", [profileId]); }; /*
refactor(plugin): setProfileId calls native method without callbacks
nearit_Cordova-SDK
train
js
0bbaef4bd7f4faa1da05081fc38efffaf82a7107
diff --git a/lib/components/map/bike-rental-overlay.js b/lib/components/map/bike-rental-overlay.js index <HASH>..<HASH> 100644 --- a/lib/components/map/bike-rental-overlay.js +++ b/lib/components/map/bike-rental-overlay.js @@ -36,7 +36,6 @@ class BikeRentalOverlay extends Component { <div> {stations.map((station) => { let icon - console.log(station) if (station.isFloatingBike) { icon = divIcon({ iconSize: [24, 24],
style(overlay): Remove console output in bike-rental-overlay
opentripplanner_otp-react-redux
train
js