Dataset Viewer
Auto-converted to Parquet
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
221aab3352ebef9b7f3d215b8adafcb44db1c3ff
diff --git a/lib/core/topologies/replset.js b/lib/core/topologies/replset.js index <HASH>..<HASH> 100644 --- a/lib/core/topologies/replset.js +++ b/lib/core/topologies/replset.js @@ -300,15 +300,11 @@ function connectNewServers(self, servers, callback) { // Destroyed if (self.state === DESTROYED || self.state === UNREFERENCED) { - return this.destroy({ force: true }); + this.destroy({ force: true }); + return done(); } if (event === 'connect') { - // Destroyed - if (self.state === DESTROYED || self.state === UNREFERENCED) { - return _self.destroy({ force: true }); - } - // Update the state var result = self.s.replicaSetState.update(_self); // Update the state with the new server @@ -363,8 +359,7 @@ function connectNewServers(self, servers, callback) { connectingServer.destroy({ force: true }); self.s.connectingServers.splice(existingServerIdx, 1); - done(); - return; + return done(); } // Create a new server instance
refactor(replset): reduce server count when destroyed
mongodb_node-mongodb-native
train
js
c206fea7026234975dcfa51f3d8e0a423297ae3c
diff --git a/src/on/_domeventregexp.js b/src/on/_domeventregexp.js index <HASH>..<HASH> 100644 --- a/src/on/_domeventregexp.js +++ b/src/on/_domeventregexp.js @@ -1,3 +1,3 @@ // the regexp allows to parse things like "click::x(.y)" // it's shared between few modules -export default /([^::]+)::([^\(\)]+)?(?:\((.*)\))?/; +export default /([^::]+)::([^()]+)?(?:\((.*)\))?/; diff --git a/src/parsebindings/_parserdata.js b/src/parsebindings/_parserdata.js index <HASH>..<HASH> 100644 --- a/src/parsebindings/_parserdata.js +++ b/src/parsebindings/_parserdata.js @@ -29,7 +29,7 @@ calc(parserData, { }, escRightBracket: { source: 'rightBracket', - handler: right => right.replace(/(\]|\)|\?)/g, '\\$1') + handler: right => right.replace(/(]|\)|\?)/g, '\\$1') }, bindingReg: { source: ['escLeftBracket', 'escRightBracket'],
refactor: Get rid of newly appeared ESLint errors
matreshkajs_matreshka
train
js,js
77cd6025884e5bee578afbc321e22993615c3942
diff --git a/system/Filters/Filters.php b/system/Filters/Filters.php index <HASH>..<HASH> 100644 --- a/system/Filters/Filters.php +++ b/system/Filters/Filters.php @@ -91,6 +91,11 @@ class Filters { $this->config = $config; $this->request = & $request; + $this->setResponse($response); + } + + public function setResponse(ResponseInterface $response) + { $this->response = & $response; }
refactor: add setResponse method.
codeigniter4_CodeIgniter4
train
php
f530093d2c2daaff26e4e8d995186065b6b14a6c
diff --git a/lib/components/form/location-field.js b/lib/components/form/location-field.js index <HASH>..<HASH> 100644 --- a/lib/components/form/location-field.js +++ b/lib/components/form/location-field.js @@ -61,7 +61,7 @@ class LocationField extends Component { componentDidMount () { if (this.props.static) { - ReactDOM.findDOMNode(this.refs['formControl']).focus() + ReactDOM.findDOMNode(this.formControl).focus() } } @@ -108,6 +108,7 @@ class LocationField extends Component { value: '', geocodedFeatures: [] }) + ReactDOM.findDOMNode(this.formControl).focus() } _onDropdownToggle = (v, e) => { @@ -347,7 +348,8 @@ class LocationField extends Component { const placeholder = currentPosition.fetching === type ? 'Fetching location...' : label || type - const textControl = <FormControl ref='formControl' + const textControl = <FormControl + ref={ctl => { this.formControl = ctl }} className={this._getFormControlClassname()} type='text' value={this.state.value}
feat(form): Focus location input for typing when 'X' pressed. Addresses conveyal/trimet-mod-otp#<I>
opentripplanner_otp-react-redux
train
js
b35e537eaab6257302f9d6f306e21387921775ef
diff --git a/src/collapsible/collapsible.js b/src/collapsible/collapsible.js index <HASH>..<HASH> 100644 --- a/src/collapsible/collapsible.js +++ b/src/collapsible/collapsible.js @@ -30,10 +30,8 @@ export class MdCollapsible { refresh() { let accordion = getBooleanFromAttributeValue(this.accordion); if (accordion) { - // this.element.setAttribute('data-collapsible', 'accordion'); this.attributeManager.addAttributes({ 'data-collapsible': 'accordion' }); } else { - // this.element.setAttribute('data-collapsible', 'expandable'); this.attributeManager.addAttributes({ 'data-collapsible': 'expandable' }); }
refactor(md-collapsible): removed comments
aurelia-ui-toolkits_aurelia-materialize-bridge
train
js
b1761984d14eca925d4616e57c280693c45454b0
diff --git a/packages/application-shell/src/index.js b/packages/application-shell/src/index.js index <HASH>..<HASH> 100644 --- a/packages/application-shell/src/index.js +++ b/packages/application-shell/src/index.js @@ -19,6 +19,12 @@ export { selectUserId, selectProjectKeyFromUrl } from './utils'; export { default as AsyncChunkLoader } from './components/async-chunk-loader'; export { GtmContext } from './components/gtm-booter'; export { + default as GtmUserLogoutTracker, +} from './components/gtm-user-logout-tracker'; +export { + default as SetupFlopFlipProvider, +} from './components/setup-flop-flip-provider'; +export { default as handleApolloErrors, } from './components/handle-apollo-errors';
feat(app-shell): add re-export of gtm logout and flopflip (#<I>)
commercetools_merchant-center-application-kit
train
js
2a16ab86c7e6e803575f54e9d3f3f8232eb08753
diff --git a/www/src/components/PropTable.js b/www/src/components/PropTable.js index <HASH>..<HASH> 100644 --- a/www/src/components/PropTable.js +++ b/www/src/components/PropTable.js @@ -1,6 +1,6 @@ import styled from 'astroturf'; import { graphql } from 'gatsby'; -import capitalize from 'lodash/capitalize'; +import upperFirst from 'lodash/upperFirst'; import sortBy from 'lodash/sortBy'; import PropTypes from 'prop-types'; import * as React from 'react'; @@ -150,7 +150,7 @@ class PropTable extends React.Component { ) : ( <span> controlled by: <Code>{controllable}</Code>, initial prop:{' '} - <Code>{`default${capitalize(propName)}`}</Code> + <Code>{`default${upperFirst(propName)}`}</Code> </span> );
docs: replace lodash capitalize with upperFirst in PropTable (#<I>)
react-bootstrap_react-bootstrap
train
js
fa80ae5a0a66c020b3694492bac3f72659863a3b
diff --git a/components/menu/__tests__/index.test.js b/components/menu/__tests__/index.test.js index <HASH>..<HASH> 100644 --- a/components/menu/__tests__/index.test.js +++ b/components/menu/__tests__/index.test.js @@ -118,6 +118,23 @@ describe('Menu', () => { expect(wrapper.find('.ant-menu-submenu-selected').length).toBe(1); }); + it('forceSubMenuRender', () => { + const wrapper = mount( + <Menu mode="horizontal"> + <SubMenu key="1" title="submenu1"> + <Menu.Item key="1-1"> + <span className="bamboo" /> + </Menu.Item> + </SubMenu> + </Menu>, + ); + + expect(wrapper.find('.bamboo').hostNodes()).toHaveLength(0); + + wrapper.setProps({ forceSubMenuRender: true }); + expect(wrapper.find('.bamboo').hostNodes()).toHaveLength(1); + }); + it('should accept defaultOpenKeys in mode horizontal', () => { const wrapper = mount( <Menu defaultOpenKeys={['1']} mode="horizontal">
test: more test case (#<I>)
ant-design_ant-design
train
js
b0282fe40571f1b6c5f8052db4cea8ce7f17b6a9
diff --git a/lib/rules/rules.js b/lib/rules/rules.js index <HASH>..<HASH> 100644 --- a/lib/rules/rules.js +++ b/lib/rules/rules.js @@ -1509,6 +1509,9 @@ function matchFilter(url, filter, req) { if (filter.from === 'httpsServer') { return filter.not ? !req.fromHttpsServer : req.fromHttpsServer; } + if (filter.from === 'httpsPort') { + return filter.not ? !req.isHttpsServer : req.isHttpsServer; + } return false; } if (filterProp(req.method, filter.method, filter.mPattern)) {
refactor: from=httpsPort
avwo_whistle
train
js
70266d019f078b6c9dc9f8715350dc0f0eec3a2b
diff --git a/spec/operators/zipAll-spec.js b/spec/operators/zipAll-spec.js index <HASH>..<HASH> 100644 --- a/spec/operators/zipAll-spec.js +++ b/spec/operators/zipAll-spec.js @@ -678,4 +678,23 @@ describe('Observable.prototype.zipAll', function () { expect(vals).toDeepEqual(r[i++]); }, null, done); }); -}); \ No newline at end of file + + it('should not break unsubscription chain when unsubscribed explicitly', function () { + var a = hot('---1---2---3---|'); + var unsub = ' !'; + var asubs = '^ !'; + var b = hot('--4--5--6--7--8--|'); + var bsubs = '^ !'; + var expected = '---x---y--'; + var values = { x: ['1', '4'], y: ['2', '5']}; + + var r = Observable.of(a, b) + .mergeMap(function (x) { return Observable.of(x); }) + .zipAll() + .mergeMap(function (x) { return Observable.of(x); }); + + expectObservable(r, unsub).toBe(expected, values); + expectSubscriptions(a.subscriptions).toBe(asubs); + expectSubscriptions(b.subscriptions).toBe(bsubs); + }); +});
test(zipAll): add test against breaking unsubscription chain Relates to #<I>.
ReactiveX_rxjs
train
js
43da56d6a3e8dcdca9ae750f09a0f3f587966219
diff --git a/test/automated_test.py b/test/automated_test.py index <HASH>..<HASH> 100755 --- a/test/automated_test.py +++ b/test/automated_test.py @@ -55,6 +55,7 @@ from concurrency_test import ConcurrencyTest from commands_test import CommandsTest from commander_test import CommanderTest from probeserver_test import ProbeserverTest +from user_script_test import UserScriptTest XML_RESULTS_TEMPLATE = "test_results{}.xml" LOG_FILE_TEMPLATE = "automated_test_result{}.txt" @@ -79,6 +80,7 @@ all_tests = [ CommandsTest(), CommanderTest(), ProbeserverTest(), + UserScriptTest(), ] # Actual list used at runtime, filted by command line args.
test: automated_test: add missing user_script_test.
mbedmicro_pyOCD
train
py
5ccf7ed9b3be5e5c6911c49bfd6d031657dc194d
diff --git a/pkg/client/deployments.go b/pkg/client/deployments.go index <HASH>..<HASH> 100644 --- a/pkg/client/deployments.go +++ b/pkg/client/deployments.go @@ -121,6 +121,6 @@ func (c *Client) PostDeployment(res *common.Resource) error { } var out struct{} - _, err = c.Post("/deployments", data, &out) + _, err = c.Post("deployments", data, &out) return err }
fix(client): fix append deployments url Fixes issue when base url has a prefix
helm_helm
train
go
63cea83a6b016bb13e85c8f8ec0cb7aede628041
diff --git a/src/SleepingOwl/Admin/ColumnFilters/Select.php b/src/SleepingOwl/Admin/ColumnFilters/Select.php index <HASH>..<HASH> 100644 --- a/src/SleepingOwl/Admin/ColumnFilters/Select.php +++ b/src/SleepingOwl/Admin/ColumnFilters/Select.php @@ -92,9 +92,10 @@ class Select extends BaseColumnFilter public function apply($repository, $column, $query, $search, $fullSearch, $operator = 'like') { - if (empty($search)) return; + #if (empty($search)) return; + if ($search === '') return; - if ($operator == 'like') + if ($operator == 'like') { $search = '%' . $search . '%'; } @@ -115,4 +116,4 @@ class Select extends BaseColumnFilter } } -} \ No newline at end of file +}
fix: column select filter check for empty value
LaravelRUS_SleepingOwlAdmin
train
php
841c6c31015955ff92cffd937f19f2c78ce27e8d
diff --git a/lib/server/index.js b/lib/server/index.js index <HASH>..<HASH> 100644 --- a/lib/server/index.js +++ b/lib/server/index.js @@ -133,8 +133,6 @@ function createServer (options, scripts, context) { app = context.app = connect(); context.connect = connect; - utils.addMiddleware(app, middleware); - app.use(function (req, res, next) { snippetUtils.isOldIe(req); return next(); @@ -148,6 +146,8 @@ function createServer (options, scripts, context) { app.use(snippetUtils.getSnippetMiddleware(options.snippet, options.snippetOptions)); + utils.addMiddleware(app, middleware); + utils.addBaseDir(app, server.baseDir, index); if (server.routes) {
feat(server): allow to inject browser-sync client.js in custom middlewares
BrowserSync_browser-sync
train
js
64f7465a6c63088bd55aacc0d11afe9b2c8af0f7
diff --git a/test/rename.js b/test/rename.js index <HASH>..<HASH> 100644 --- a/test/rename.js +++ b/test/rename.js @@ -16,9 +16,12 @@ module.exports = function (t, a, d) { return deferred(lstat(name1)(a.never, function () { a.ok(true, "No first file"); }), lstat(name2)(function (stats2) { - // Do not compare eventual birthtime + // Do not compare eventual birthtime and ctime + // as in some envs they may not reflect value of source file delete stats1.birthtime; delete stats2.birthtime; + delete stats1.ctime; + delete stats2.ctime; a.deep(stats1, stats2, "Same"); return unlink(name2); }))(false);
test: do not test not guaranteed data
medikoo_fs2
train
js
fd9fc4a1983e8bd2c9bad52453849316ba322d89
diff --git a/Extractor/RecursiveJob.php b/Extractor/RecursiveJob.php index <HASH>..<HASH> 100644 --- a/Extractor/RecursiveJob.php +++ b/Extractor/RecursiveJob.php @@ -6,7 +6,8 @@ use Keboola\Juicer\Config\JobConfig, Keboola\Juicer\Common\Logger, Keboola\Juicer\Client\ClientInterface, Keboola\Juicer\Parser\ParserInterface; -use Keboola\Filter\Filter; +use Keboola\Filter\Filter, + Keboola\Filter\Exception\FilterException; use Keboola\Utils\Utils; use Keboola\Juicer\Exception\UserException; /** @@ -86,7 +87,11 @@ class RecursiveJob extends Job implements RecursiveJobInterface foreach($this->config->getChildJobs() as $jobId => $child) { if (!empty($child->getConfig()['recursionFilter'])) { - $filter = Filter::create($child->getConfig()['recursionFilter']); + try { + $filter = Filter::create($child->getConfig()['recursionFilter']); + } catch(FilterException $e) { + throw new UserException($e->getMessage(), 0, $e); + } } foreach($data as $result) {
fix: Catch exception from recursion filter
keboola_juicer
train
php
292101971d0da4fb25a65dbb23944c9dace820bd
diff --git a/views/js/qtiCreator/widgets/interactions/helpers/answerState.js b/views/js/qtiCreator/widgets/interactions/helpers/answerState.js index <HASH>..<HASH> 100644 --- a/views/js/qtiCreator/widgets/interactions/helpers/answerState.js +++ b/views/js/qtiCreator/widgets/interactions/helpers/answerState.js @@ -20,6 +20,7 @@ define([ 'jquery', 'lodash', 'i18n', + 'services/features', 'taoQtiItem/qtiItem/helper/response', 'taoQtiItem/qtiCreator/widgets/helpers/formElement', 'taoQtiItem/qtiCreator/widgets/component/minMax/minMax', @@ -30,6 +31,7 @@ define([ $, _, __, + features, responseHelper, formElement, minMaxComponentFactory, @@ -252,7 +254,7 @@ define([ serial: response.getSerial(), defineCorrect: defineCorrect, editMapping: editMapping, - editFeedbacks: template !== 'CUSTOM', + editFeedbacks: template !== 'CUSTOM' && features.isVisible('taoQtiItem/qtiCreator/widgets/interactions/modalFeedbacks'), mappingDisabled: _.isEmpty(response.mapEntries), template: template, templates: _getAvailableRpTemplates(
feat: use config to toggle modalFeedbacks response feature
oat-sa_extension-tao-itemqti
train
js
e6c4071f5a294100f0dbab40ec37b73310165ce8
diff --git a/allauth/socialaccount/providers/openid/tests.py b/allauth/socialaccount/providers/openid/tests.py index <HASH>..<HASH> 100644 --- a/allauth/socialaccount/providers/openid/tests.py +++ b/allauth/socialaccount/providers/openid/tests.py @@ -1,3 +1,5 @@ +from unittest import expectedFailure + from django.test import override_settings from django.urls import reverse @@ -23,7 +25,9 @@ class OpenIDTests(TestCase): dict(openid='http://www.google.com')) self.assertTrue('openid' in resp.context['form'].errors) + @expectedFailure def test_login(self): + # Location: https://s.yimg.com/wm/mbr/html/openid-eol-0.0.1.html resp = self.client.post(reverse(views.login), dict(openid='http://me.yahoo.com')) assert 'login.yahooapis' in resp['location'] @@ -55,6 +59,7 @@ class OpenIDTests(TestCase): ) get_user_model().objects.get(first_name='raymond') + @expectedFailure @override_settings(SOCIALACCOUNT_PROVIDERS={'openid': {'SERVERS': [ dict(id='yahoo', name='Yahoo',
fix(openid): Mark tests as expected failures Long term solution: phase out OpenID <I> support. Current test relies on Yahoo (dead now) and Hyves (should be long dead, if it isn't, it's undead). This fix silences the tests, until someone wants to find a new provider or mock the discovery, but OpenID itself has moved on to the next shiny version: OpenID Connect, so it is best to sunset this support.
pennersr_django-allauth
train
py
c9e2079ab82901c6f9345337d1b1a577fdc58a23
diff --git a/model/storage/RdsStorage.php b/model/storage/RdsStorage.php index <HASH>..<HASH> 100644 --- a/model/storage/RdsStorage.php +++ b/model/storage/RdsStorage.php @@ -244,7 +244,7 @@ class RdsStorage extends ConfigurableService implements RevisionStorageInterface [self::DATA_RESOURCE], $query, $options, - $predicate, + $predicate ); $resourcesUri = []; @@ -260,7 +260,7 @@ class RdsStorage extends ConfigurableService implements RevisionStorageInterface [self::DATA_RESOURCE, self::DATA_OBJECT], $query, $options, - $predicate, + $predicate ); $resourcesData= [];
fix: compatibility with php <I>
oat-sa_extension-tao-revision
train
php
d77da037234af7e7420701fb23f68c94bace4cf1
diff --git a/source/rafcon/gui/resave_state_machines.py b/source/rafcon/gui/resave_state_machines.py index <HASH>..<HASH> 100755 --- a/source/rafcon/gui/resave_state_machines.py +++ b/source/rafcon/gui/resave_state_machines.py @@ -62,9 +62,7 @@ def trigger_gui_signals(*args): menubar_ctrl = main_window_controller.get_controller('menu_bar_controller') try: sm_manager_model.selected_state_machine_id = state_machine.state_machine_id - gui_helper_state_machine.save_state_machine_as(path=setup_config['target_path'][0]) - while state_machine.marked_dirty: - time.sleep(0.1) + call_gui_callback(gui_helper_state_machine.save_state_machine_as, path=setup_config['target_path'][0]) except: logger.exception("Could not save state machine") finally: @@ -161,7 +159,6 @@ def convert_libraries_in_path(config_path, lib_path, target_path=None, gui_confi logger.debug("lib_root_path/lib_path .*-folder are ignored if within lib_path, " "e.g. -> {0} -> full path is {1}".format(lib, child_lib_path)) - if __name__ == '__main__': import sys if len(sys.argv) < 3:
fix(resave_state_machines): synced call of save_state_machine_as
DLR-RM_RAFCON
train
py
ef641dc3c9ebbd0ad820e2a78213994c9d82b8a6
diff --git a/src/jump/__init__.py b/src/jump/__init__.py index <HASH>..<HASH> 100644 --- a/src/jump/__init__.py +++ b/src/jump/__init__.py @@ -28,7 +28,7 @@ def py_hash(key, num_buckets): Raises: ValueError: If `num_buckets` is not a positive number. """ - b, j = -1, 0 + b, j = -1, 0.0 if num_buckets < 1: raise ValueError(
ci(mypy): fix incompatible types in assignment src/jump/__init__.py:<I>:<I>: error: Incompatible types in assignment (expression has type "float", variable has type "int") j = float(b + 1) * (float(1 << <I>) / float((key >> <I>) + 1)) ^
lithammer_python-jump-consistent-hash
train
py
079725321d7a540c58e970815a757fe4298f4cd2
diff --git a/addon/components/lt-infinity.js b/addon/components/lt-infinity.js index <HASH>..<HASH> 100644 --- a/addon/components/lt-infinity.js +++ b/addon/components/lt-infinity.js @@ -20,6 +20,7 @@ export default Component.extend(InViewportMixin, { this.setProperties({ viewportSpy: true, + viewportUseIntersectionObserver: false, viewportTolerance: { left: width, right: width,
fix(lt-infinity): disable intersection observer
offirgolan_ember-light-table
train
js
072958796a64c2175de9e4cb0de10a8025f0dc7c
diff --git a/src/components/slider/slider.js b/src/components/slider/slider.js index <HASH>..<HASH> 100644 --- a/src/components/slider/slider.js +++ b/src/components/slider/slider.js @@ -111,9 +111,9 @@ function SliderDirective($$rAF, $window, $mdAria, $mdUtil, $mdConstant, $mdThemi var throttledRefreshDimensions = $mdUtil.throttle(refreshSliderDimensions, 5000); // Default values, overridable by attrs - attr.min ? attr.$observe('min', updateMin) : updateMin(0); - attr.max ? attr.$observe('max', updateMax) : updateMax(100); - attr.step ? attr.$observe('step', updateStep) : updateStep(1); + angular.isDefined(attr.min) ? attr.$observe('min', updateMin) : updateMin(0); + angular.isDefined(attr.max) ? attr.$observe('max', updateMax) : updateMax(100); + angular.isDefined(attr.step)? attr.$observe('step', updateStep) : updateStep(1); // We have to manually stop the $watch on ngDisabled because it exists // on the parent scope, and won't be automatically destroyed when
fix(slider): fix for attributes being ignored fix for changes to attributes on the slider element being ignored if their value is initally falsy. Now observes attributes regardless of initial value, as long as attributes are present closes #<I>. closes #<I>.
angular_material
train
js
9a9310df107107b4e0dfaa6283e4b1d0cdc0d8f2
diff --git a/namesys/namesys_test.go b/namesys/namesys_test.go index <HASH>..<HASH> 100644 --- a/namesys/namesys_test.go +++ b/namesys/namesys_test.go @@ -15,6 +15,7 @@ import ( ci "github.com/libp2p/go-libp2p-crypto" peer "github.com/libp2p/go-libp2p-peer" pstoremem "github.com/libp2p/go-libp2p-peerstore/pstoremem" + record "github.com/libp2p/go-libp2p-record" ) type mockResolver struct { @@ -97,7 +98,10 @@ func TestPublishWithCache0(t *testing.T) { t.Fatal(err) } - routing := offroute.NewOfflineRouter(dst, ipns.Validator{KeyBook: ps}) + routing := offroute.NewOfflineRouter(dst, record.NamespacedValidator{ + "ipns": ipns.Validator{KeyBook: ps}, + "pk": record.PublicKeyValidator{}, + }) nsys := NewNameSystem(routing, dst, 0) p, err := path.ParsePath(unixfs.EmptyDirNode().Cid().String())
test: fix namesys test License: MIT
ipfs_go-ipfs
train
go
1cca3e072429e82dc10962080670cb215726e638
diff --git a/src/Endpoints/Zones.php b/src/Endpoints/Zones.php index <HASH>..<HASH> 100644 --- a/src/Endpoints/Zones.php +++ b/src/Endpoints/Zones.php @@ -164,10 +164,14 @@ class Zones implements API throw new EndpointException('No files or tags to purge.'); } - $options = [ - 'files' => $files, - 'tags' => $tags - ]; + $options = []; + if (!is_null($files)) { + $options['files'] = $files; + } + + if (!is_null($tags)) { + $options['tags'] = $tags; + } $user = $this->adapter->delete('zones/' . $zoneID . '/purge_cache', $options);
fix: Cloudflare Api doesn't like empty tags
cloudflare_cloudflare-php
train
php
b05c218018656a2a7fe81fb842c2c024c35f3952
diff --git a/packages/node_modules/@webex/plugin-meetings/src/metrics/index.js b/packages/node_modules/@webex/plugin-meetings/src/metrics/index.js index <HASH>..<HASH> 100644 --- a/packages/node_modules/@webex/plugin-meetings/src/metrics/index.js +++ b/packages/node_modules/@webex/plugin-meetings/src/metrics/index.js @@ -82,7 +82,7 @@ class Metrics { let {meeting} = options; if (this.keys.indexOf(event) === -1) { - LoggerProxy.logger.error(`Metrics: Event ${event} doesnt exist in dictionary`); + LoggerProxy.logger.error(`Metrics->postEvent: Event ${event} doesn't exist in dictionary`); } if (!meeting && meetingId) { @@ -105,7 +105,7 @@ class Metrics { } else { - LoggerProxy.logger.error('Metrics->postEvent: Meeting object not defined'); + LoggerProxy.logger.info(`Metrics->postEvent: Event received for meetingId:${meetingId}, but meeting not found in collection.`); } }
feat(meetings): change to postEvent info message A mercury event could come in after the meeting object has been destroyed. This case is known and should not throw an error.
webex_spark-js-sdk
train
js
abfac84e67854c168e78133d839528c33dd99e8b
diff --git a/src/platforms/mp/runtime/modules/attrs.js b/src/platforms/mp/runtime/modules/attrs.js index <HASH>..<HASH> 100644 --- a/src/platforms/mp/runtime/modules/attrs.js +++ b/src/platforms/mp/runtime/modules/attrs.js @@ -41,7 +41,7 @@ function updateAttrs (oldVnode: VNodeWithData, vnode: VNodeWithData) { // only update daynamic attrs in runtime if (old !== cur && (bindingAttrs.indexOf(key) > -1 || key === 'slot')) { // if using local image file, set path to the root - if (vnode.tag === 'img' && key === 'src' && !/^\/|https?|data:/.test(cur)) { + if (cur && vnode.tag === 'img' && key === 'src' && !/^\/|https?|data:/.test(cur)) { cur = `/${cur}` } updateVnodeToMP(vnode, key, cur)
fix: should not set src to '/' when it's '' #<I>
kaola-fed_megalo
train
js
3db4b2363c4663fd0ff905ee797e1bdd60554718
diff --git a/packages/eslint-config-udemy-website/index.js b/packages/eslint-config-udemy-website/index.js index <HASH>..<HASH> 100644 --- a/packages/eslint-config-udemy-website/index.js +++ b/packages/eslint-config-udemy-website/index.js @@ -93,6 +93,14 @@ module.exports = { 'not `import { BrowserRouter, HashRouter, Router } from \'react-router-dom\';`.', exceptions: ['base-components/memoized-browser-router.react-component(?:\\.spec)?\\.js$'], }, + { + // For correct implementation + source: '^react-router-dom(?:\\.js)?$', + specifier: '^Link$', + message: 'Please `import Link from \'base-components/link.react-component\';`, ' + + 'not `import { Link } from \'react-router-dom\';`.', + exceptions: ['base-components/link.react-component(?:\\.spec)?\\.js$'], + }, ]], 'underscore/prefer-noop': ['error', 'always'], },
feat: import blacklist Link from react-router-dom
udemy_js-tooling
train
js
e55ca3ba30eee319c9ad9da1c4ae5a3a57542c61
diff --git a/src/inscriptis/css.py b/src/inscriptis/css.py index <HASH>..<HASH> 100644 --- a/src/inscriptis/css.py +++ b/src/inscriptis/css.py @@ -29,8 +29,8 @@ CSS = { 'h5': HtmlElement('h5', display=Display.block, margin_before=1, margin_after=1), 'h6': HtmlElement('h6', display=Display.block, margin_before=1, margin_after=1), - 'ul': HtmlElement('ul', display=Display.block, margin_before=0, margin_after=1, padding=4), - 'ol': HtmlElement('ol', display=Display.block, margin_before=0, margin_after=1, padding=4), + 'ul': HtmlElement('ul', display=Display.block, margin_before=0, margin_after=0, padding=4), + 'ol': HtmlElement('ol', display=Display.block, margin_before=0, margin_after=0, padding=4), 'li': HtmlElement('li', display=Display.block), 'address': HtmlElement('address', display=Display.block),
fix: improved style sheet for enumerations.
weblyzard_inscriptis
train
py
3e392676a01164595c119069ed1f9da2afeeb962
diff --git a/version/version.go b/version/version.go index <HASH>..<HASH> 100644 --- a/version/version.go +++ b/version/version.go @@ -1,7 +1,7 @@ package version import ( - "github.com/coreos/updatectl/third_party/github.com/coreos/go-semver/semver" + "github.com/coreos-inc/updatectl/third_party/github.com/coreos/go-semver/semver" ) const Version = "0.1.0+git"
fix(version): import path was incorrect. build was not working.
coreos_updateservicectl
train
go
2305d2609aa781c4357e9e14a5a979e50c5c8714
diff --git a/event/bus.go b/event/bus.go index <HASH>..<HASH> 100644 --- a/event/bus.go +++ b/event/bus.go @@ -59,7 +59,7 @@ func (self *EventBus) dispatch(ev *Event) { handlerFunc := reflect.ValueOf(listener.Handler).MethodByName(handlerFuncName) if handlerFunc.IsValid() { log.V(2).Infof("Calling event handler for %s on listener %s", ev.Type, listener.String()) - go handlerFunc.Call([]reflect.Value{reflect.ValueOf(ev)}) + go handlerFunc.Call([]reflect.Value{reflect.ValueOf(*ev)}) } } }
fix(EventBus): dereference Event before handing to listeners
coreos_fleet
train
go
9324d5c1a14193aef9cd46cd81574ba9e9d4a979
diff --git a/query/stdlib/testing/end_to_end_test.go b/query/stdlib/testing/end_to_end_test.go index <HASH>..<HASH> 100644 --- a/query/stdlib/testing/end_to_end_test.go +++ b/query/stdlib/testing/end_to_end_test.go @@ -134,6 +134,8 @@ var skipTests = map[string]string{ "drop_referenced": "need to support known errors in new test framework (https://github.com/influxdata/flux/issues/536)", "yield": "yield requires special test case (https://github.com/influxdata/flux/issues/535)", "rowfn_with_import": "imported libraries are not visible in user-defined functions (https://github.com/influxdata/flux/issues/1000)", + + "window_group_mean_ungroup": "window trigger optimization modifies sort order of its output tables (https://github.com/influxdata/flux/issues/1067)", } func TestFluxEndToEnd(t *testing.T) {
test(stdlib): skip failing window test due to new trigger optimization (#<I>)
influxdata_influxdb
train
go
8d71d820e0faa89a33659a454d5f2ede8b48ad89
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 @@ -87,11 +87,11 @@ class CodeReporter(BaseReporter): if line == trace.lineno: if config.use_colors: - head += Fore.RED + '>' + Style.RESET_ALL + head += Fore.RED + '> ' + Style.RESET_ALL else: - head += '>' + head += '> ' else: - head += ' ' + head += ' ' buf.append(indent + head + code) return buf
refactor(reporter): add additional separator space in code reporter
grappa-py_grappa
train
py
bbfb944cc185f99daa39247ae98dcb64743bf881
diff --git a/intranet/settings/__init__.py b/intranet/settings/__init__.py index <HASH>..<HASH> 100644 --- a/intranet/settings/__init__.py +++ b/intranet/settings/__init__.py @@ -786,6 +786,4 @@ if PRODUCTION: sentry_logging = LoggingIntegration( level=logging.INFO, event_level=logging.ERROR # Capture info and above as breadcrumbs # Send errors as events ) - sentry_sdk.init( - SENTRY_PUBLIC_DSN, integrations=[DjangoIntegration(), sentry_logging, CeleryIntegration()], send_default_pii=True - ) + sentry_sdk.init(SENTRY_PUBLIC_DSN, integrations=[DjangoIntegration(), sentry_logging, CeleryIntegration()], send_default_pii=True)
style: re-blackify settings
tjcsl_ion
train
py
4ca72207532b1f2d848d326c3fc7f50b13f03043
diff --git a/lib/v8-to-istanbul.js b/lib/v8-to-istanbul.js index <HASH>..<HASH> 100644 --- a/lib/v8-to-istanbul.js +++ b/lib/v8-to-istanbul.js @@ -8,7 +8,7 @@ const CovSource = require('./source') const { readFileSync } = require('fs') const { SourceMapConsumer } = require('source-map') -const isOlderNode10 = /^v10\.[0-5]/u.test(process.version) +const isOlderNode10 = /^v10\.(([0-9]\.)|(1[0-5]\.))/u.test(process.version) // Injected when Node.js is loading script into isolate pre Node 10.16.x. // see: https://github.com/nodejs/node/pull/21573.
fix: regex for detecting Node < <I> was off
istanbuljs_v8-to-istanbul
train
js
4f53d936d547b424f331d6a376053075b567f5ce
diff --git a/rollup.config.js b/rollup.config.js index <HASH>..<HASH> 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -50,8 +50,8 @@ export default [ { input: srcEntry, output: [ - { file: pkg.main, format: 'cjs' }, - { file: pkg.module, format: 'es' } + { file: pkg.main, format: 'cjs', exports: 'default' }, + { file: pkg.module, format: 'es', exports: 'default' } ], external: [ 'min-dash',
chore: disable bundle warning We're fine with ESM / CommonJS non-interoperability.
bpmn-io_bpmn-moddle
train
js
b57f4e6321db8073b676b7eea2dbbaaaaacdeb84
diff --git a/src/index.test.js b/src/index.test.js index <HASH>..<HASH> 100644 --- a/src/index.test.js +++ b/src/index.test.js @@ -1,7 +1,5 @@ -'use strict'; - -var test = require('ava'); -var mixinable = require('./index'); +import test from 'ava'; +import * as mixinable from './index'; var async = mixinable.async; var sync = mixinable.sync;
test: convert test to esm syntax
untool_mixinable
train
js
1d515606f24e9d62b8321be0f2421c45ad483a62
diff --git a/lib/inspectors/data.js b/lib/inspectors/data.js index <HASH>..<HASH> 100644 --- a/lib/inspectors/data.js +++ b/lib/inspectors/data.js @@ -221,10 +221,9 @@ module.exports = function(req, res, next) { if (reqDelay > 0) { return setTimeout(function() { res.destroy(); - next(); }, reqDelay); } - res.destroy(); + return res.destroy(); } next(); };
feat: allow to abort request
avwo_whistle
train
js
60a7160d477c59c9d855ca824c62e655592131f6
diff --git a/src/main/java/org/firmata4j/firmata/FirmataDevice.java b/src/main/java/org/firmata4j/firmata/FirmataDevice.java index <HASH>..<HASH> 100644 --- a/src/main/java/org/firmata4j/firmata/FirmataDevice.java +++ b/src/main/java/org/firmata4j/firmata/FirmataDevice.java @@ -378,7 +378,7 @@ public class FirmataDevice implements IODevice { * may then safely sit in the host's much larger serial * input buffer until it is dealt with by onPinStateReceive */ - Thread.sleep(10); + Thread.sleep(100); } } catch (IOException ex) { LOGGER.error(String.format("Error requesting state of pin %d", pin.getIndex()), ex);
fix(firmata-device): increase dalay when sending pin state requests Arduino Mega gets input buffer overflown with initial pin state requests Fixes #<I>
kurbatov_firmata4j
train
java
d31b4f2f5924aec17015052ed8e3e9bdad278cdf
diff --git a/src/authentication.js b/src/authentication.js index <HASH>..<HASH> 100644 --- a/src/authentication.js +++ b/src/authentication.js @@ -225,12 +225,15 @@ export class Authentication { redirect(redirectUrl, defaultRedirectUrl) { // stupid rule to keep it BC if (redirectUrl === true) { - LogManager.getLogger('authentication').warn('DEPRECATED: Setting redirectUrl === true to actually *not redirect* is deprecated. Set redirectUrl === false instead.'); + LogManager.getLogger('authentication').warn('DEPRECATED: Setting redirectUrl === true to actually *not redirect* is deprecated. Set redirectUrl === 0 instead.'); return; } - // explicit false means don't redirect + // stupid rule to keep it BC if (redirectUrl === false) { - LogManager.getLogger('authentication').warn('BREAKING CHANGE: redirectUrl === false means "Do not redirect" now! Set redirectUrl to undefined or null to use the defaultRedirectUrl if so desired.'); + LogManager.getLogger('authentication').warn('BREAKING CHANGE: Setting redirectUrl === false to actually *do redirect* is deprecated. Set redirectUrl to undefined or null to use the defaultRedirectUrl if so desired.'); + } + // BC hack. explicit 0 means don't redirect. false will be added later and 0 deprecated + if (redirectUrl === 0) { return; } if (typeof redirectUrl === 'string') {
chore(authentication): BC hack. use redirectUri === 0 to not redirect
SpoonX_aurelia-authentication
train
js
871b3f119fc992e93dd4e3c52fdfb277ef5d6fd7
diff --git a/src/EloquentViewableServiceProvider.php b/src/EloquentViewableServiceProvider.php index <HASH>..<HASH> 100644 --- a/src/EloquentViewableServiceProvider.php +++ b/src/EloquentViewableServiceProvider.php @@ -15,7 +15,6 @@ namespace CyrildeWit\EloquentViewable; use Illuminate\Support\ServiceProvider; use Jaybizzle\CrawlerDetect\CrawlerDetect; -use CyrildeWit\EloquentViewable\ViewableService; use CyrildeWit\EloquentViewable\Contracts\CrawlerDetector; use CyrildeWit\EloquentViewable\Contracts\View as ViewContract; use CyrildeWit\EloquentViewable\Contracts\ViewableService as ViewableServiceContract; diff --git a/src/Viewable.php b/src/Viewable.php index <HASH>..<HASH> 100644 --- a/src/Viewable.php +++ b/src/Viewable.php @@ -14,7 +14,6 @@ declare(strict_types=1); namespace CyrildeWit\EloquentViewable; use Illuminate\Database\Eloquent\Builder; -use CyrildeWit\EloquentViewable\ViewableService; use Illuminate\Database\Eloquent\Relations\MorphMany; use CyrildeWit\EloquentViewable\Contracts\View as ViewContract;
style: apply fixes from StyleCI (#<I>)
cyrildewit_eloquent-viewable
train
php,php
212587fa2a8e2cfb9cfce07ef042cbb411671004
diff --git a/packages/cli/src/commands/server/runServer.js b/packages/cli/src/commands/server/runServer.js index <HASH>..<HASH> 100644 --- a/packages/cli/src/commands/server/runServer.js +++ b/packages/cli/src/commands/server/runServer.js @@ -48,7 +48,6 @@ async function runServer(argv: Array<string>, ctx: ConfigT, args: Args) { port: args.port, resetCache: args.resetCache, watchFolders: args.watchFolders, - projectRoot: ctx.root, sourceExts: args.sourceExts, reporter, }); diff --git a/packages/cli/src/tools/loadMetroConfig.js b/packages/cli/src/tools/loadMetroConfig.js index <HASH>..<HASH> 100644 --- a/packages/cli/src/tools/loadMetroConfig.js +++ b/packages/cli/src/tools/loadMetroConfig.js @@ -71,7 +71,6 @@ export const getDefaultConfig = (ctx: ConfigT) => { export type ConfigOptionsT = {| maxWorkers?: number, port?: number, - projectRoot?: string, resetCache?: boolean, watchFolders?: string[], sourceExts?: string[],
fix: don't set `projetRoot` for Metro (#<I>)
react-native-community_cli
train
js,js
1bbb22784fcc136436670fb3db9ef671923b8140
diff --git a/app/get.js b/app/get.js index <HASH>..<HASH> 100644 --- a/app/get.js +++ b/app/get.js @@ -44,7 +44,7 @@ export default async function get(app, createContext) { let props = {} if (!isRequireable(name)) { - const inline = window.panelsJson && window.panelsJson[location.hostname] + const inline = window.panelsJson && window.panelsJson[name] if (inline) { data = inline.module
fix: use the app's domain instead of the location of the page
UXtemple_panels
train
js
eada8fedc41e772b85150a9e13344c8bc3352598
diff --git a/bin/job-worker.php b/bin/job-worker.php index <HASH>..<HASH> 100644 --- a/bin/job-worker.php +++ b/bin/job-worker.php @@ -8,9 +8,11 @@ use Hodor\Config\LoaderFacade as Config; use Hodor\JobQueue\QueueFactory as QueueFactory; $args = new Arguments(); -$config = Config::loadFromFile($args->getConfigFile()); +$config_file = $args->getConfigFile(); +$queue_name = $args->getQueueName(); +$config = Config::loadFromFile($config_file); $queue_factory = new QueueFactory($config); -$worker_queue = $queue_factory->getWorkerQueue('default'); +$worker_queue = $queue_factory->getWorkerQueue($queue_name); $worker_queue->runNext();
feat(queue): add queue name argument to job-worker
lightster_hodor
train
php
b78b9c9fd250c8ff1cedb738beb83f2768e05574
diff --git a/test/integration/create.js b/test/integration/create.js index <HASH>..<HASH> 100644 --- a/test/integration/create.js +++ b/test/integration/create.js @@ -140,6 +140,7 @@ module.exports = function (createFn, setup, dismantle) { _message: 'Customer validation failed', errors: { name: { + $isValidatorError: true, kind: 'required', message: 'Path `name` is required.', name: 'ValidatorError', diff --git a/test/integration/middleware.js b/test/integration/middleware.js index <HASH>..<HASH> 100644 --- a/test/integration/middleware.js +++ b/test/integration/middleware.js @@ -748,6 +748,7 @@ module.exports = function (createFn, setup, dismantle) { message: 'Customer validation failed: name: Path `name` is required.', errors: { name: { + $isValidatorError: true, kind: 'required', message: 'Path `name` is required.', name: 'ValidatorError',
fix(test): mongoose validation error tests (#<I>)
florianholzapfel_express-restify-mongoose
train
js,js
b7f4e08661cd149a29ae7107241a16928dc606eb
diff --git a/lib/configuration/variables/sources/resolve-external-plugin-sources.js b/lib/configuration/variables/sources/resolve-external-plugin-sources.js index <HASH>..<HASH> 100644 --- a/lib/configuration/variables/sources/resolve-external-plugin-sources.js +++ b/lib/configuration/variables/sources/resolve-external-plugin-sources.js @@ -48,10 +48,7 @@ module.exports = (configuration, resolverConfiguration, externalPlugins) => { resolverConfiguration.sources[sourceName] = sourceConfig; resolverConfiguration.fulfilledSources.add(sourceName); } - } else if ( - externalPlugin.variableResolvers && - configuration.variablesResolutionMode < 20210326 - ) { + } else if (externalPlugin.variableResolvers) { logDeprecation( 'NEW_VARIABLES_RESOLVER', `Plugin "${pluginName}" attempts to extend old variables resolver. ` +
fix(Variables): Unconditionally deprecate old vars engine extensions
serverless_serverless
train
js
847d6de900e36b55ada0453799abe89edb8b8909
diff --git a/lib/https/server-agent.js b/lib/https/server-agent.js index <HASH>..<HASH> 100644 --- a/lib/https/server-agent.js +++ b/lib/https/server-agent.js @@ -3,7 +3,7 @@ var Q = require('q'); var ca = require('./ca'); var MAX_SERVERS = 320; var MAX_PORT = 60000; -var curPort = 40000; +var curPort = 42002; var TIMEOUT = 6000; // var DELAY = 100;
refactor: Modify the port range of https server
avwo_whistle
train
js
f487cf9489fe3a8199f4510c13b3aa6b867fa985
diff --git a/src/components/Loading/Loading.js b/src/components/Loading/Loading.js index <HASH>..<HASH> 100644 --- a/src/components/Loading/Loading.js +++ b/src/components/Loading/Loading.js @@ -34,16 +34,29 @@ export default class Loading extends React.Component { * Specify whether you would like the small variant of <Loading> */ small: PropTypes.bool, + + /** + * Specify an description that would be used to best describe the loading state + */ + description: PropTypes.string, }; static defaultProps = { active: true, withOverlay: true, small: false, + description: 'Active loading indicator', }; render() { - const { active, className, withOverlay, small, ...other } = this.props; + const { + active, + className, + withOverlay, + small, + description, + ...other + } = this.props; const loadingClasses = classNames(`${prefix}--loading`, className, { [`${prefix}--loading--small`]: small, @@ -57,6 +70,7 @@ export default class Loading extends React.Component { const loading = ( <div {...other} + aria-label={description} aria-live={active ? 'assertive' : 'off'} className={loadingClasses}> <svg className={`${prefix}--loading__svg`} viewBox="-75 -75 150 150">
fix(Loading): adds aria-label and description property to component (#<I>) * fix: adds property description * fix: adds description property to aria-label * fix: typo * fix: typo
carbon-design-system_carbon-components-react
train
js
4c174cfdb32da78ea860ca9182cea77a092f5597
diff --git a/test/specs/Conformance-test.js b/test/specs/Conformance-test.js index <HASH>..<HASH> 100644 --- a/test/specs/Conformance-test.js +++ b/test/specs/Conformance-test.js @@ -17,7 +17,7 @@ describe('Conformance', () => { describe(constructorName, () => { it('extends Component', () => { - expect(Component.prototype).to.eql(React.Component.prototype) + expect(Component.prototype).to.deep.equal(React.Component.prototype) }) it(`constructor name matches filename "${constructorName}"`, () => {
refactor(Conformance-test): use readable deep.equal assertion
Semantic-Org_Semantic-UI-React
train
js
1e3db9e857e6c1851c56bd038267f819e2dfc499
diff --git a/views/cypress/tests/test.spec.js b/views/cypress/tests/test.spec.js index <HASH>..<HASH> 100644 --- a/views/cypress/tests/test.spec.js +++ b/views/cypress/tests/test.spec.js @@ -91,4 +91,14 @@ describe('Tests', () => { ); }); }); + + after(() => { + cy.deleteClassFromRoot( + selectors.root, + selectors.assetClassForm, + selectors.deleteClass, + selectors.deleteConfirm, + classMovedName + ); + }); });
chore: add hook for delete moved class
oat-sa_extension-tao-test
train
js
31cfed77f75cce57eecdbd4b52d9d57c6f30839e
diff --git a/src/helpers.js b/src/helpers.js index <HASH>..<HASH> 100644 --- a/src/helpers.js +++ b/src/helpers.js @@ -89,7 +89,7 @@ export function runQuery (instance, query, needResponse) { if (needResponse) { response = parseResponse(instance.db.exec(query.toString())) if (query._sequence && query._sequence[0].method === 'hasTable') { - return !!response.length + response = !!response.length } } else { instance.db.run(query.toString())
fix(query): return type should always be Promise
citycide_trilogy
train
js
5727d6afff5e868282f22963aaa5f16a7f11b1e8
diff --git a/webpack.config.js b/webpack.config.js index <HASH>..<HASH> 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -26,7 +26,7 @@ module.exports = ( env ) => { // The point or points to enter the application. entry: env.element ? { 'main': `./packages/${ env.element }/${ capitalize( env.element ) }.tsx`, - 'main.demo': `./packages/${ env.element }/${ capitalize( env.element ) }.demo.tsx`, + 'main.demo': `./packages/${ env.element }/index.demo.tsx`, 'vendors': './vendors.ts', 'polyfills': './polyfills.ts', 'styles': './styles.ts'
chore(webpack): fix demo component config (#<I>)
wc-catalogue_blaze-elements
train
js
6e11cbf6b48790a81b123aec4115a5cd5f5f18bb
diff --git a/src/Models/Corporation/CorporationMemberTracking.php b/src/Models/Corporation/CorporationMemberTracking.php index <HASH>..<HASH> 100644 --- a/src/Models/Corporation/CorporationMemberTracking.php +++ b/src/Models/Corporation/CorporationMemberTracking.php @@ -202,6 +202,7 @@ class CorporationMemberTracking extends Model /** * @return \Illuminate\Database\Eloquent\Relations\BelongsTo + * @deprecated */ public function user() {
refactor(relationship): deprecating user relation from member tracking
eveseat_eveapi
train
php
987075553102b750e0f9e31d2ceeb1d05998acfb
diff --git a/index.js b/index.js index <HASH>..<HASH> 100644 --- a/index.js +++ b/index.js @@ -80,7 +80,7 @@ module.exports = function (options) { less.render( content, - + function(err, result) { if (err) { cb(FOUND_ERROR, 'Error while compiling less template "' + path + '". Error from "less" plugin: ' + err); @@ -111,15 +111,15 @@ module.exports = function (options) { var parts = []; parts.push(Buffer(content.substring(0, matches.index))); - parts.push(Buffer('styles: [\'')); + parts.push(Buffer('styles: [`')); for (var i=0; i<entrances.length; i++) { parts.push(Buffer(entrances[i].replace(/\n/g, ''))); if (i < entrances.length - 1) { - parts.push(Buffer('\', \'')); + parts.push(Buffer('`, `)); } } - parts.push(Buffer('\']')); + parts.push(Buffer('`]')); parts.push(Buffer(content.substr(matches.index + matches[0].length))); return Buffer.concat(parts); }
feat(joinParts): use backticks insted of singlequotes
amritk_gulp-angular2-embed-sass
train
js
1521bcc53a8d32339376035f9d5db3b496dfa61f
diff --git a/rbac_api.go b/rbac_api.go index <HASH>..<HASH> 100644 --- a/rbac_api.go +++ b/rbac_api.go @@ -234,6 +234,8 @@ func (e *Enforcer) GetImplicitUsersForPermission(permission ...string) ([]string subjects := append(pSubjects, gSubjects...) util.ArrayRemoveDuplicates(&subjects) + subjects = util.SetSubtract(subjects, gInherit) + res := []string{} for _, user := range subjects { req := util.JoinSliceAny(user, permission...) @@ -247,7 +249,5 @@ func (e *Enforcer) GetImplicitUsersForPermission(permission ...string) ([]string } } - res = util.SetSubtract(res, gInherit) - return res, nil }
perf: improve performance in GetImplicitUsersForPermission
casbin_casbin
train
go
5b08eb632bb7b605196ca653e43afe43e1c38d93
diff --git a/src/NativeUI/Canvas/RemoteRenderer/index.js b/src/NativeUI/Canvas/RemoteRenderer/index.js index <HASH>..<HASH> 100644 --- a/src/NativeUI/Canvas/RemoteRenderer/index.js +++ b/src/NativeUI/Canvas/RemoteRenderer/index.js @@ -36,11 +36,11 @@ export default class RemoteRenderer { localTime: 0, }; - this.renderOnIdle = () => { + this.renderOnIdle = (force = false) => { if (this.__timeout === null) { this.__timeout = setTimeout(() => { - if (!this.render()) { - this.renderOnIdle(); + if (!this.render(force)) { + this.renderOnIdle(force); } }, 250); } @@ -49,8 +49,8 @@ export default class RemoteRenderer { this.mouseListener = new VtkWebMouseListener(pvwClient); this.mouseListener.setInteractionDoneCallback((interact) => { this.quality = interact ? this.interactiveQuality : this.stillQuality; - if (!this.render()) { - this.renderOnIdle(); + if (!this.render(!interact)) { + this.renderOnIdle(!interact); } }); }
fix(RemoteRenderer): Fix still render call to clear cache
Kitware_paraviewweb
train
js
b951f3a9334c4087b656b8576101948a50ab9c33
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -54,7 +54,7 @@ setup( author='Valentin Lab', author_email='valentin.lab@kalysto.org', url='http://github.com/vaab/colour', - license='GPL License', + license='BSD License', py_modules=['colour'], data_files=['rgb.txt'], namespace_packages=[],
fix: inconsistency in licence information (removed GPL mention). (fixes #8)
vaab_colour
train
py
8362aef1d992f8a656471c7a8b7915d9f04aec8a
diff --git a/tests/unit/validatorDecorator.js b/tests/unit/validatorDecorator.js index <HASH>..<HASH> 100644 --- a/tests/unit/validatorDecorator.js +++ b/tests/unit/validatorDecorator.js @@ -151,6 +151,16 @@ test('rules getter', () => { expect(v1.rules).toBe(base.rules); }); +test('pauses and resumes', () => { + const base = new Validator(); + const v1 = new Decorator(base, { _uid: 0 }); + + v1.pause(); + expect(v1._paused).toBe(true); + v1.resume(); + expect(v1._paused).toBe(false); +}); + test('removes base instance when destroyed', () => { const vm = { _uid: 0 }; const base = new Validator();
test: added pause() and resume() tests for the decorator
baianat_vee-validate
train
js
1fa39960c1cb406fc4741990db553948201e964d
diff --git a/packages/cli/src/lingui-compile.js b/packages/cli/src/lingui-compile.js index <HASH>..<HASH> 100644 --- a/packages/cli/src/lingui-compile.js +++ b/packages/cli/src/lingui-compile.js @@ -41,7 +41,7 @@ function command(config, format, options) { console.log("Compiling message catalogs…") return locales.map(locale => { - const [language] = locale.split("_") + const [language] = locale.split(/[_-]/) if (!plurals[language]) { console.log( chalk.red(
fix: support locales with hyphens in cli compile (#<I>)
lingui_js-lingui
train
js
a047285371476dcd0682b7a74d1e01f9b64d1a6d
diff --git a/src/writer.js b/src/writer.js index <HASH>..<HASH> 100644 --- a/src/writer.js +++ b/src/writer.js @@ -7,10 +7,10 @@ import fs from 'fs'; import path from 'path'; import mkdirp from 'mkdirp'; import {stripColor} from 'chalk'; -import Promise from 'promise'; +import {denodeify} from 'promise'; -const mkdir = Promise.denodeify(mkdirp); -const writeFile = Promise.denodeify(fs.writeFile); +const mkdir = denodeify(mkdirp); +const writeFile = denodeify(fs.writeFile); /** * Creates the output folder and writes formatted text to a file.
refactor(writer): destructure denodeify import
olegskl_gulp-stylelint
train
js
c57f84dcf7fbf769b15e891e1254e08de1c163de
diff --git a/bin/cli.js b/bin/cli.js index <HASH>..<HASH> 100755 --- a/bin/cli.js +++ b/bin/cli.js @@ -142,18 +142,6 @@ function (chunk) { //convert to normal array so we can concatenate var _chunk = typedToArray(chunk); - //check if chunk is bigger than frame - if (_chunk.length > FRAME_SIZE) { - // if so, we'll extract stuff from it frame by frame, until we're left with something that's short enough to buffer - while (_chunk.length > FRAME_SIZE) { - var frame = _chunk.slice(0, FRAME_SIZE); - _chunk.splice(0, HOP_SIZE); - extractFeatures(frame); - if (!opt.options.p) process.stdout.write("-"); - frameCount++; - } - } - buffer = buffer.concat(_chunk); //if we're long enough, splice the frame, and extract features on it while (buffer.length >= FRAME_SIZE) {
fix(cli): stop double extracting in certain cases
meyda_meyda
train
js
3a5387346925cb7a579ef199c261d7c7de4a3423
diff --git a/packages/netlify-cms-widget-number/src/schema.js b/packages/netlify-cms-widget-number/src/schema.js index <HASH>..<HASH> 100644 --- a/packages/netlify-cms-widget-number/src/schema.js +++ b/packages/netlify-cms-widget-number/src/schema.js @@ -1,8 +1,8 @@ export default { properties: { - step: { type: 'integer' }, + step: { type: 'number' }, valueType: { type: 'string' }, - min: { type: 'integer' }, - max: { type: 'integer' }, + min: { type: 'number' }, + max: { type: 'number' }, }, };
fix(widget-number): use number instead of integer in schema (#<I>)
netlify_netlify-cms
train
js
933672fd0191134f97d8a47cd1c6d140bcee81b6
diff --git a/lib/workers/pr/changelog/index.js b/lib/workers/pr/changelog/index.js index <HASH>..<HASH> 100644 --- a/lib/workers/pr/changelog/index.js +++ b/lib/workers/pr/changelog/index.js @@ -7,14 +7,8 @@ module.exports = { }; const cacheNamespace = 'changelog'; -function getCacheKey({ - versionScheme, - fromVersion, - toVersion, - repositoryUrl, - releases, -}) { - return `${repositoryUrl}-${versionScheme}-${fromVersion}-${toVersion}-${ +function getCacheKey({ repositoryUrl, releases }) { + return `${repositoryUrl}-${ releases ? releases.map(release => release.version).join('-') : '' }`; }
refactor: simplify changelog cache key
renovatebot_renovate
train
js
5b46e0fd6be5f65dd99dd9d4ca1f8f71676bf3e8
diff --git a/src/netlify-identity.js b/src/netlify-identity.js index <HASH>..<HASH> 100644 --- a/src/netlify-identity.js +++ b/src/netlify-identity.js @@ -90,6 +90,7 @@ function instantiateGotrue(APIUrl) { return new GoTrue({ APIUrl: parts.join(""), setCookie: !isLocal }); } if (isLocal) { + store.setIsLocal(isLocal); return null; }
fix: ensure isLocal boolean is set on init
netlify_netlify-identity-widget
train
js
34f33538d8e9d7d4b285a167e023cbe959b17eca
diff --git a/projects.go b/projects.go index <HASH>..<HASH> 100644 --- a/projects.go +++ b/projects.go @@ -35,11 +35,11 @@ type ProjectInput struct { SubmitType string `json:"submit_type,omitempty"` Branches []string `json:"branches,omitempty"` Owners []string `json:"owners,omitempty"` - UseContributorAgreements string `json:"use_contributor_agreements"` - UseSignedOffBy string `json:"use_signed_off_by"` - CreateNewChangeForAllNotInTarget string `json:"create_new_change_for_all_not_in_target"` - UseContentMerge string `json:"use_content_merge"` - RequireChangeID string `json:"require_change_id"` + UseContributorAgreements string `json:"use_contributor_agreements,omitempty"` + UseSignedOffBy string `json:"use_signed_off_by,omitempty"` + CreateNewChangeForAllNotInTarget string `json:"create_new_change_for_all_not_in_target,omitempty"` + UseContentMerge string `json:"use_content_merge,omitempty"` + RequireChangeID string `json:"require_change_id,omitempty"` MaxObjectSizeLimit string `json:"max_object_size_limit,omitempty"` PluginConfigValues map[string]map[string]string `json:"plugin_config_values,omitempty"` }
fix: omit optional empty fields in ProjectInput (#<I>) This will stop a mostly-default ProjectInput from generating a number of empty fields in the JSON payload that confuse gerrit, e.g. { "use_signed_off_by": "" } The issue shows up when calling CreateProject. This is a fix for issue #<I>.
andygrunwald_go-gerrit
train
go
6a90eb6c382231570fc41ee74932faa321cf55b6
diff --git a/src/components/StructuredList/StructuredList-story.js b/src/components/StructuredList/StructuredList-story.js index <HASH>..<HASH> 100644 --- a/src/components/StructuredList/StructuredList-story.js +++ b/src/components/StructuredList/StructuredList-story.js @@ -97,8 +97,8 @@ storiesOf('StructuredList', module) <StructuredListWrapper selection border> <StructuredListHead> <StructuredListRow head> - <StructuredListCell head>ColumnA</StructuredListCell>, - <StructuredListCell head>ColumnB</StructuredListCell>, + <StructuredListCell head>ColumnA</StructuredListCell> + <StructuredListCell head>ColumnB</StructuredListCell> <StructuredListCell head>ColumnC</StructuredListCell> <StructuredListCell head>{''}</StructuredListCell> </StructuredListRow>
fix(structured-list): remove stray commas in story (#<I>)
carbon-design-system_carbon-components-react
train
js
c5f2c2d1d1e2d1fad2763e0baf3db387e438d804
diff --git a/src/aurelia-form.js b/src/aurelia-form.js index <HASH>..<HASH> 100644 --- a/src/aurelia-form.js +++ b/src/aurelia-form.js @@ -41,7 +41,7 @@ export function configure(aurelia, config) { config.elements = config.elements || {}; defaultElements.forEach(element => { - config.elements[element] = `form-${element}` + config.elements[element] = config.elements[element] || `form-${element}` }); }
fix(project): no override if already registered
SpoonX_aurelia-form
train
js
e1b4dc84b4c4c515691f56aea65b6cd78a79439c
diff --git a/lib/merge-reports/report-builder.js b/lib/merge-reports/report-builder.js index <HASH>..<HASH> 100644 --- a/lib/merge-reports/report-builder.js +++ b/lib/merge-reports/report-builder.js @@ -45,15 +45,6 @@ module.exports = class ReportBuilder { .value(); } - async _copyToReportDir(files, {from, to}) { - await Promise.map(files, async (dataName) => { - const srcDataPath = path.resolve(from, dataName); - const destDataPath = path.resolve(to, dataName); - - await fs.move(srcDataPath, destDataPath); - }); - } - async _saveDataFile(data) { const formattedData = serverUtils.prepareCommonJSData(data); const destDataPath = path.resolve(this.destPath, 'data.js');
chore(merge-reports): remove unused code
gemini-testing_html-reporter
train
js
6bdbd2bf5059dac58e65cdf3fbafe618e182d907
diff --git a/superset/connectors/sqla/models.py b/superset/connectors/sqla/models.py index <HASH>..<HASH> 100644 --- a/superset/connectors/sqla/models.py +++ b/superset/connectors/sqla/models.py @@ -309,7 +309,8 @@ class TableColumn(Model, BaseColumn): ], ) -> str: """Convert datetime object to a SQL expression string""" - sql = self.db_engine_spec.convert_dttm(self.type, dttm) if self.type else None + dttm_type = self.type or ("DATETIME" if self.is_dttm else None) + sql = self.db_engine_spec.convert_dttm(dttm_type, dttm) if dttm_type else None if sql: return sql
fix: the calculated columns explicit type convert into date (#<I>)
apache_incubator-superset
train
py
1a0bec859eeb95f9c334af1a5b3c88646d03a722
diff --git a/test/e2e/sauce/karma.conf.js b/test/e2e/sauce/karma.conf.js index <HASH>..<HASH> 100644 --- a/test/e2e/sauce/karma.conf.js +++ b/test/e2e/sauce/karma.conf.js @@ -1,3 +1,5 @@ +var TRAVIS_WITHOUT_SAUCE = process.env.TRAVIS_SECURE_ENV_VARS === 'false'; + module.exports = function(config) { config.set({ frameworks: ['jasmine'], @@ -8,7 +10,7 @@ module.exports = function(config) { autoWatch: true, - browsers: ['sl_chrome_linux'], + browsers: [TRAVIS_WITHOUT_SAUCE ? 'Firefox' : 'sl_chrome_linux'], reporters: ['dots'],
test(e2e): do not use sauce if secured vars not available This makes the "sauce" e2e test use Firefox, when testing pull requests.
karma-runner_karma
train
js
6f49d86b8f45ead65832f3774929277449b530e0
diff --git a/site/src/pages/index.js b/site/src/pages/index.js index <HASH>..<HASH> 100644 --- a/site/src/pages/index.js +++ b/site/src/pages/index.js @@ -130,7 +130,7 @@ function Home() { </section> <section className={styles.section}> <VisuallyHidden as="h2">Mrm use cases</VisuallyHidden> - <h3>What to hack quickly on some idea?</h3> + <h3>Want to hack quickly on some idea?</h3> <p> Install everything you need for a basic JavaScript project with a single command, and start working in less than a minute: @@ -145,7 +145,7 @@ function Home() { <CodeBlock language="bash">{`npx mrm license readme contributing`}</CodeBlock> </section> <section className={styles.section}> - <h3>What to work on a very old project?</h3> + <h3>Want to work on a very old project?</h3> <p> Run the same commands again to upgrade and migrate all the configs.
docs(site): Fix typo on index page (#<I>)
sapegin_mrm
train
js
91a5027db783f445889bdb65ab2ca32e82329cd8
diff --git a/tests/index.test.js b/tests/index.test.js index <HASH>..<HASH> 100644 --- a/tests/index.test.js +++ b/tests/index.test.js @@ -325,3 +325,16 @@ it('can deal with non-numerical version numbers returned by browserslist for saf })) .toBeTruthy() }) + +it('gracefully fails on invalid inputs', () => { + expect( + matchesUA(undefined)) + .toBeFalsy() + + expect( + matchesUA(null)) + .toBeFalsy() +}) + + +
chore(tests): add failing test case
browserslist_browserslist-useragent
train
js
47240481b9c0e7341bd51a3021f092124837c8e1
diff --git a/src/SearchParameters/index.js b/src/SearchParameters/index.js index <HASH>..<HASH> 100644 --- a/src/SearchParameters/index.js +++ b/src/SearchParameters/index.js @@ -1036,7 +1036,7 @@ SearchParameters.prototype = { return this.numericRefinements[attribute] && !isUndefined(this.numericRefinements[attribute][operator]) && - this.numericRefinements[attribute][operator].indexOf(value) !== -1; + indexOf(this.numericRefinements[attribute][operator], value) !== -1; }, /** * Returns true if the tag refined, false otherwise
fix: IE8 has no Array.indexOf Yes. I. Know. :D
algolia_algoliasearch-helper-js
train
js
21326f67a0205bdae067526fd5ffeee9a2db598e
diff --git a/src/client/ClientDataResolver.js b/src/client/ClientDataResolver.js index <HASH>..<HASH> 100644 --- a/src/client/ClientDataResolver.js +++ b/src/client/ClientDataResolver.js @@ -171,7 +171,7 @@ class ClientDataResolver { * @returns {string} */ resolveInviteCode(data) { - const inviteRegex = /discord(?:app\.com\/invite|\.gg)\/([\w-]{2,255})/i; + const inviteRegex = /discord(?:app\.com\/invite|\.gg(?:\/invite)?)\/([\w-]{2,255})/i; const match = inviteRegex.exec(data); if (match && match[1]) return match[1]; return data;
feat(ClientDataResolver): account for discord.gg/invite/<code> invites
discordjs_discord.js
train
js
662e7ac5c2af3bcfd3c5211829b2d9bf183cd9a9
diff --git a/graphistry/pygraphistry.py b/graphistry/pygraphistry.py index <HASH>..<HASH> 100644 --- a/graphistry/pygraphistry.py +++ b/graphistry/pygraphistry.py @@ -425,7 +425,7 @@ class PyGraphistry(object): :returns: {'entities': DF, 'events': DF, 'edges': DF, 'nodes': DF, 'graph': Plotter} :rtype: dict - **Example: Connect user<-row->boss ** + **Example: Connect user<-row->boss** :: @@ -434,7 +434,7 @@ class PyGraphistry(object): h = graphistry.hypergraph(users_df) g = h['graph'].plot() - **Example: Connect user->boss ** + **Example: Connect user->boss** :: @@ -443,7 +443,7 @@ class PyGraphistry(object): h = graphistry.hypergraph(users_df, direct=True) g = h['graph'].plot() - **Example: Connect user<->boss ** + **Example: Connect user<->boss** :: @@ -452,7 +452,7 @@ class PyGraphistry(object): h = graphistry.hypergraph(users_df, direct=True, opts={'EDGES': {'user': ['boss'], 'boss': ['user']}}) g = h['graph'].plot() - **Example: Only consider some columns for nodes ** + **Example: Only consider some columns for nodes** ::
fix(docs): typos
graphistry_pygraphistry
train
py
1210f66f95e2bd873fbe30411cb3debf7f26e1c6
diff --git a/test/helpers/asserts.js b/test/helpers/asserts.js index <HASH>..<HASH> 100644 --- a/test/helpers/asserts.js +++ b/test/helpers/asserts.js @@ -14,7 +14,7 @@ function comparePolygons(a, b){ let start = a.vertices[0]; let index = b.vertices.findIndex(v => { if (!v) {return false;} - + return v._x === start._x && v._y === start._y && v._z === start._z; }); if (index === -1) { @@ -38,7 +38,7 @@ function assertSameGeometry(t, a, b, failMessage) { if (!containsCSG(a, b) || !containsCSG(b, a)) { failMessage = failMessage == undefined ? 'CSG do not have the same geometry' : failMessage; t.fail(failMessage); - } + }else{ t.pass()} } // a contains b if b polygons are also found in a @@ -59,4 +59,4 @@ function containsCSG(a, b){ module.exports = { assertSameGeometry: assertSameGeometry, comparePolygons: comparePolygons -}; \ No newline at end of file +};
fix(asserts): fixed issue with asserts in latest ava
jscad_csg.js
train
js
ce3e5e0cb425bacc08dbbba1c3678f998bdf624f
diff --git a/packages/xod-client/src/project/nodeLayout.js b/packages/xod-client/src/project/nodeLayout.js index <HASH>..<HASH> 100644 --- a/packages/xod-client/src/project/nodeLayout.js +++ b/packages/xod-client/src/project/nodeLayout.js @@ -261,10 +261,8 @@ export const getBusNodePositionForPin = (node, pin) => { const pinOrder = XP.getPinOrder(pin); return { - x: nodePosition.x + pinOrder * SLOT_SIZE.WIDTH, - y: - nodePosition.y + - SLOT_SIZE.HEIGHT * (pinDirection === XP.PIN_DIRECTION.INPUT ? -1 : 1), + x: nodePosition.x + pinOrder, + y: nodePosition.y + (pinDirection === XP.PIN_DIRECTION.INPUT ? -1 : 1), }; };
fix(xod-client): fix splitting links with buses
xodio_xod
train
js
09bb8fea48d184073746e1c5bbd41be9a02fd441
diff --git a/lib/service/util.js b/lib/service/util.js index <HASH>..<HASH> 100644 --- a/lib/service/util.js +++ b/lib/service/util.js @@ -6,7 +6,6 @@ var wsParser = require('ws-parser'); var CRLF = Buffer.from('\r\n'); var TYPE_RE = /(request|response)-length:/i; -var noop = function() {}; var frameIndex = 100000; var TYPES = ['whistle', 'Fiddler']; @@ -371,10 +370,15 @@ function resolveFrames(res, frames, callback) { res.headers = res.headers || {}; var receiver = wsParser.getReceiver(res); var execCallback = function() { - receiver.onData = noop; - callback(result); + if (receiver) { + receiver = null; + callback(result); + } }; var index = 0; + receiver.onerror = execCallback; + receiver.onData = execCallback; + receiver.onclose = execCallback; receiver.onData = function(chunk, opts) { var frame = frames[index]; ++index; @@ -393,7 +397,7 @@ function resolveFrames(res, frames, callback) { setImmediate(execCallback); } }; - setTimeout(execCallback, 1600); + setTimeout(execCallback, 2000); frames.forEach((frame) => { receiver.add(frame.bin); });
feat: extract websocket frames from saz file
avwo_whistle
train
js
d29ba4fe7ef8be0a88c17a675f18e04bef75acf8
diff --git a/basher.go b/basher.go index <HASH>..<HASH> 100644 --- a/basher.go +++ b/basher.go @@ -85,7 +85,9 @@ func ApplicationWithPath( } for _, script := range scripts { - bash.Source(script, loader) + if err := bash.Source(script, loader); err != nil { + log.Fatal(err) + } } if copyEnv { bash.CopyEnv()
fix: error when unable to source script
progrium_go-basher
train
go
cf2afe85a25313f0e458c41b9a89fa6843c56ba5
diff --git a/python/setup.py b/python/setup.py index <HASH>..<HASH> 100755 --- a/python/setup.py +++ b/python/setup.py @@ -109,7 +109,7 @@ if platform.system() == 'Darwin': setup( name='neuroglancer', - version='2.16', + version='2.17', description='Python data backend for neuroglancer, a WebGL-based viewer for volumetric data', author='Jeremy Maitin-Shepard, Jan Funke', author_email='jbms@google.com, jfunke@iri.upc.edu',
chore: bump python package version to <I>
google_neuroglancer
train
py
c443bacc9890ea0ba0ac0ecd6a6a8b958f52970d
diff --git a/go/vt/vtctl/reparentutil/emergency_reparenter.go b/go/vt/vtctl/reparentutil/emergency_reparenter.go index <HASH>..<HASH> 100644 --- a/go/vt/vtctl/reparentutil/emergency_reparenter.go +++ b/go/vt/vtctl/reparentutil/emergency_reparenter.go @@ -449,7 +449,7 @@ func (erp *EmergencyReparenter) reparentReplicas( replicaMutex sync.Mutex ) - replCtx, replCancel := context.WithTimeout(ctx, opts.WaitReplicasTimeout) + replCtx, replCancel := context.WithTimeout(context.Background(), opts.WaitReplicasTimeout) event.DispatchUpdate(ev, "reparenting all tablets")
feat: fix the bug by not using the parent context when creating a context for the RPCs to run
vitessio_vitess
train
go
282143d7df90188a78147a38714f4ecda3b1a0ec
diff --git a/tests/integration/__init__.py b/tests/integration/__init__.py index <HASH>..<HASH> 100644 --- a/tests/integration/__init__.py +++ b/tests/integration/__init__.py @@ -209,6 +209,8 @@ def use_cluster(cluster_name, nodes, ipformat=None, start=True): CCM_CLUSTER.set_configuration_options({'start_native_transport': True}) if CASSANDRA_VERSION >= '2.2': CCM_CLUSTER.set_configuration_options({'enable_user_defined_functions': True}) + if CASSANDRA_VERSION >= '3.0': + CCM_CLUSTER.set_configuration_options({'enable_scripted_user_defined_functions': True}) common.switch_cluster(path, cluster_name) CCM_CLUSTER.populate(nodes, ipformat=ipformat) try:
test: Another UDF config option introduced in C* <I>
datastax_python-driver
train
py
8a5be79ed2a672e57168a9d10a4bbf2c8583c213
diff --git a/src/controllers/BaseNode.js b/src/controllers/BaseNode.js index <HASH>..<HASH> 100644 --- a/src/controllers/BaseNode.js +++ b/src/controllers/BaseNode.js @@ -271,7 +271,7 @@ class BaseNode { case 'lte': return actualValue <= cValue; case 'starts_with': - return actualValue.startsWith(cValue); + return actualValue && actualValue.startsWith(cValue); case 'in_group': { const ent = this.homeAssistant.getStates(cValue); const groupEntities =
fix(get-entities): Check if property exists before seeing if it starts with something Fixes #<I>
zachowj_node-red-contrib-home-assistant-websocket
train
js
09639ceb967dc027fb61f699a6a89247d2249357
diff --git a/src/web/server.js b/src/web/server.js index <HASH>..<HASH> 100644 --- a/src/web/server.js +++ b/src/web/server.js @@ -237,7 +237,7 @@ module.exports = class Server extends mix(Emitter) { }; this._render(match.route.view, context) - .then(v => res.send(v).end()) + .then(v => res.send(v)) .catch(err => next(err)); } @@ -251,7 +251,7 @@ module.exports = class Server extends mix(Emitter) { } this._render(this._theme.errorView(), { error: err }) - .then(v => res.send(v).end()) + .then(v => res.send(v)) .catch(err => next(err)); this.emit('error', err, res.locals.__request);
fix: remove end from server rendering (#<I>)
frctl_fractal
train
js
c3ef9249f809bfcec8849cb5adc7505301698874
diff --git a/src/Syrup/CoreBundle/DeploymentHandler/ScriptHandler.php b/src/Syrup/CoreBundle/DeploymentHandler/ScriptHandler.php index <HASH>..<HASH> 100644 --- a/src/Syrup/CoreBundle/DeploymentHandler/ScriptHandler.php +++ b/src/Syrup/CoreBundle/DeploymentHandler/ScriptHandler.php @@ -56,6 +56,11 @@ s - skip <info>(keep current file)</info> }, 3, "y"); + } elseif ( + file_exists("./{$filename}") + && $event->getIO()->askConfirmation("Use './{$filename}'? [<options=bold>y</options=bold>/n]", true) + ) { + $this->getFromIO($event->getIO(), $filename, "./{$filename}"); } else { self::getFromS3($event->getIO(), $s3key, self::PARAMETERS_DIR . $filename, true); }
feat: ScriptHandler will consider ./parameters.yml to support generator script
keboola_syrup
train
php
a8460e5d4c08b4e1d9031b65335884aa497706f3
diff --git a/src/packages/serializer/index.js b/src/packages/serializer/index.js index <HASH>..<HASH> 100644 --- a/src/packages/serializer/index.js +++ b/src/packages/serializer/index.js @@ -407,13 +407,13 @@ class Serializer { } let serialized: { - id: number, + id: string, type: string, links?: Object, attributes: Object, relationships?: Object } = { - id, + id: id.toString(), type, attributes }; @@ -519,7 +519,7 @@ class Serializer { return { data: { - id, + id: id.toString(), type }, diff --git a/test/integration/serializer.js b/test/integration/serializer.js index <HASH>..<HASH> 100644 --- a/test/integration/serializer.js +++ b/test/integration/serializer.js @@ -19,7 +19,7 @@ describe('Integration: class Serializer', () => { it('serializes id', () => { const { data: { id } } = subject; - expect(id).to.equal(1); + expect(id).to.equal('1'); }); it('serializes attributes', () => {
fix: resource IDs must be strings (#<I>) * errors is a top level member * Resource ID must be a string
postlight_lux
train
js,js
5af0c5ad3a52ba8bfa16cce90855efce761395ed
diff --git a/reposerver/server.go b/reposerver/server.go index <HASH>..<HASH> 100644 --- a/reposerver/server.go +++ b/reposerver/server.go @@ -64,6 +64,8 @@ func NewServer(metricsServer *metrics.MetricsServer, cache *reposervercache.Cach grpc.Creds(credentials.NewTLS(tlsConfig)), grpc.UnaryInterceptor(grpc_middleware.ChainUnaryServer(unaryInterceptors...)), grpc.StreamInterceptor(grpc_middleware.ChainStreamServer(streamInterceptors...)), + grpc.MaxRecvMsgSize(apiclient.MaxGRPCMessageSize), + grpc.MaxSendMsgSize(apiclient.MaxGRPCMessageSize), }, }, nil }
fix: reposerver: Set GRPC max message size (#<I>)
argoproj_argo-cd
train
go
35f6f44447f294fa69a034f63a0dd28092bdb3a8
diff --git a/intranet/apps/announcements/views.py b/intranet/apps/announcements/views.py index <HASH>..<HASH> 100644 --- a/intranet/apps/announcements/views.py +++ b/intranet/apps/announcements/views.py @@ -101,6 +101,7 @@ def request_announcement_view(request): ann = AnnouncementRequest.objects.get(id=obj.id) logger.debug(teacher_objs) approve_self = False + teacher = None for teacher in teacher_objs: ann.teachers_requested.add(teacher) if teacher == request.user: diff --git a/intranet/apps/api/tests.py b/intranet/apps/api/tests.py index <HASH>..<HASH> 100644 --- a/intranet/apps/api/tests.py +++ b/intranet/apps/api/tests.py @@ -43,6 +43,8 @@ class ApiTest(IonTestCase): oauth2_settings._SCOPES = ["read", "write"] # pylint: disable=protected-access + self.auth = None + def make_token(self): tok = AccessToken.objects.create( user=self.user,
refactor: assign uninitialized variables to None to make Pylint happy
tjcsl_ion
train
py,py
ef31016da989e255f8e18166279aafc33a6df0a8
diff --git a/tooling/circle-cli/index.js b/tooling/circle-cli/index.js index <HASH>..<HASH> 100755 --- a/tooling/circle-cli/index.js +++ b/tooling/circle-cli/index.js @@ -31,5 +31,8 @@ const commands = requireDir(`./commands`); Object.keys(commands).forEach((cmd) => yargs.command(commands[cmd])); -yargs - .help(); +// Aparently, referencing .argv is critically important to make yargs work. +// eslint-disable-next-line no-unused-vars +const argv = yargs + .help() + .argv;
fix(tooling): use yargs correctly
webex_spark-js-sdk
train
js
3d8b0e5228445b5e63db794620a66e1c1ce5d6f0
diff --git a/builder/osc/common/omi_config.go b/builder/osc/common/omi_config.go index <HASH>..<HASH> 100644 --- a/builder/osc/common/omi_config.go +++ b/builder/osc/common/omi_config.go @@ -136,7 +136,7 @@ func (c *OMIConfig) prepareRegions(accessConfig *AccessConfig) (errs []error) { if (accessConfig != nil) && (region == accessConfig.RawRegion) { // make sure we don't try to copy to the region we originally // create the OMI in. - log.Printf("Cannot copy OMI to AWS session region '%s', deleting it from `omi_regions`.", region) + log.Printf("Cannot copy OMI to OUTSCALE session region '%s', deleting it from `omi_regions`.", region) continue } regions = append(regions, region) @@ -147,7 +147,6 @@ func (c *OMIConfig) prepareRegions(accessConfig *AccessConfig) (errs []error) { return errs } -// See https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CopyImage.html func validateKmsKey(kmsKey string) (valid bool) { kmsKeyIdPattern := `[a-f0-9-]+$` aliasPattern := `alias/[a-zA-Z0-9:/_-]+$`
fix: change logs in omi config
hashicorp_packer
train
go
c4b770f3053a8a9794c5916281fc0517a590b0fa
diff --git a/internal/db/issue.go b/internal/db/issue.go index <HASH>..<HASH> 100644 --- a/internal/db/issue.go +++ b/internal/db/issue.go @@ -315,9 +315,7 @@ func (issue *Issue) clearLabels(e *xorm.Session) (err error) { // NOTE: issue.removeLabel slices issue.Labels, so we need to create another slice to be unaffected. labels := make([]*Label, len(issue.Labels)) - for i := range issue.Labels { - labels[i] = issue.Labels[i] - } + copy(labels, issue.Labels) for i := range labels { if err = issue.removeLabel(e, labels[i]); err != nil { return fmt.Errorf("removeLabel: %v", err) diff --git a/internal/form/form.go b/internal/form/form.go index <HASH>..<HASH> 100644 --- a/internal/form/form.go +++ b/internal/form/form.go @@ -99,11 +99,8 @@ func validate(errs binding.Errors, data map[string]interface{}, f Form, l macaro Assign(f, data) typ := reflect.TypeOf(f) - val := reflect.ValueOf(f) - if typ.Kind() == reflect.Ptr { typ = typ.Elem() - val = val.Elem() } for i := 0; i < typ.NumField(); i++ {
chore: fix lint errors (#<I>)
gogs_gogs
train
go,go
73228a262bb96d196f71aecfd89b36e0488e8423
diff --git a/src/index.js b/src/index.js index <HASH>..<HASH> 100755 --- a/src/index.js +++ b/src/index.js @@ -91,6 +91,10 @@ export const loadScript = function (id) { }) } +const isTrackable = (name) => { + return !(config.excludes.length && config.excludes.indexOf(name) !== -1) +} + /** * Vue installer * @param {Vue instance} Vue @@ -110,11 +114,22 @@ const install = function (Vue, options = {}) { Vue.track = Vue.ga = { event, page } Vue.prototype.$track = Vue.prototype.$ga = { event, page } - if (router) { - const { excludes } = config + // I don't like timeouts but apparently the currentRoute is not fully available yet + // so need to wait the famous 0 second. + // @todo: find a better way + setTimeout(() => { + const route = router.currentRoute + if (!isTrackable(route.name)) { + return + } + + Vue.track.page(route.path, route.name, window.location.href) + }, 0) + + if (router) { router.afterEach(({ path, name }) => { - if (excludes.length && excludes.indexOf(name) !== -1) { + if (!isTrackable(name)) { return }
feat(track): track first page loaded
MatteoGabriele_vue-analytics
train
js
4f54becca9f2b229f00c398b5525e26eda77387d
diff --git a/test.js b/test.js index <HASH>..<HASH> 100644 --- a/test.js +++ b/test.js @@ -866,7 +866,8 @@ describe('packet.generate', function () { Block1: 27, 'Proxy-Uri': 35, 'Proxy-Scheme': 39, - Size1: 60 + Size1: 60, + 'No-Response': 258 } Object.keys(longOptions).forEach(function (option) { @@ -921,8 +922,15 @@ describe('packet.generate', function () { }) }) - ;['560', '720'].forEach(function (option) { - const optionNum = '' + option + const evenLongerOptions = { + 560: 560, + 720: 720, + 'OCF-Accept-Content-Format-Version': 2049, + 'OCF-Content-Format-Version': 2053 + } + + Object.keys(evenLongerOptions).forEach(function (option) { + const optionNum = evenLongerOptions[option] it('should generate ' + option + ' option with unextended length', function () { packet = {
test: add tests for longer option codes
mcollina_coap-packet
train
js
e269cefe9cd0b16756c9d9283cec80ede66bfea7
diff --git a/src/repository.js b/src/repository.js index <HASH>..<HASH> 100644 --- a/src/repository.js +++ b/src/repository.js @@ -128,7 +128,7 @@ export class Repository { populatedData[key] = repository.populateEntities(value); } - return entity.setData(populatedData); + return entity.setData(populatedData).markClean(); } /**
refactor(repository): Mark populated entities as clean
SpoonX_aurelia-orm
train
js
89b2a9a0aa14647110a175e96aec9109babf9afa
diff --git a/lib/plugins/filter/before_post_render/titlecase.js b/lib/plugins/filter/before_post_render/titlecase.js index <HASH>..<HASH> 100644 --- a/lib/plugins/filter/before_post_render/titlecase.js +++ b/lib/plugins/filter/before_post_render/titlecase.js @@ -1,10 +1,11 @@ 'use strict'; -const titlecase = require('titlecase'); +let titlecase; function titlecaseFilter(data) { if (!this.config.titlecase || !data.title) return; + if (!titlecase) titlecase = require('titlecase'); data.title = titlecase(data.title); }
perf(titlecase): lazy require (#<I>)
hexojs_hexo
train
js
732fd01cc580f356a1f85d78e2e87bc3445628c8
diff --git a/tests/func/test_repro.py b/tests/func/test_repro.py index <HASH>..<HASH> 100644 --- a/tests/func/test_repro.py +++ b/tests/func/test_repro.py @@ -127,9 +127,6 @@ class TestReproWorkingDirectoryAsOutput(TestDvc): self.dvc.reproduce(faulty_stage_path) def test_nested(self): - from dvc.stage import Stage - - # # . # |-- a # | |__ nested
test: drop a reimport (#<I>)
iterative_dvc
train
py
dc11387b69103a8a00dec2ad97937f95db8010f2
diff --git a/lib/ditty.rb b/lib/ditty.rb index <HASH>..<HASH> 100644 --- a/lib/ditty.rb +++ b/lib/ditty.rb @@ -40,10 +40,6 @@ module Ditty @mutex.synchronize { @hash.inject(memo, &block) } end - def each(&block) - @mutex.synchronize { @hash.each(&block) } - end - def each_with_object(memo, &block) @mutex.synchronize { @hash.each_with_object(memo, &block) } end diff --git a/lib/ditty/components/ditty.rb b/lib/ditty/components/ditty.rb index <HASH>..<HASH> 100644 --- a/lib/ditty/components/ditty.rb +++ b/lib/ditty/components/ditty.rb @@ -7,7 +7,7 @@ module Ditty class Ditty def self.load controllers = File.expand_path('../controllers', __dir__) - Dir.glob("#{controllers}/*.rb").each { |f| require f } + Dir.glob("#{controllers}/*.rb").sort.each { |f| require f } require 'ditty/models/user' require 'ditty/models/role'
fix: Issues reported by rubocop
EagerELK_ditty
train
rb,rb
cbf65340ec77951e0bc73fb5063f67a895a5e21a
diff --git a/index.js b/index.js index <HASH>..<HASH> 100644 --- a/index.js +++ b/index.js @@ -39,11 +39,6 @@ export const VIEW_PRODUCTS_PERMISSION = { resource: 'products', }; -export const MANAGE_CUSTOMERS_PERMISSION = { - mode: 'manage', - resource: 'customers', -}; - export const MANAGE_OAUTH_CLIENTS = { mode: 'manage', resource: 'oauth_clients',
refactor(customers): to use permission constants over custom constant
commercetools_merchant-center-application-kit
train
js
b277a18190ae82b9a0d7b2f7c4741f0b4e941f13
diff --git a/src/js/cropper.js b/src/js/cropper.js index <HASH>..<HASH> 100644 --- a/src/js/cropper.js +++ b/src/js/cropper.js @@ -106,7 +106,12 @@ class Cropper { const { element, options } = this; - if (!options.checkOrientation || !window.ArrayBuffer) { + if ( + !options.rotatable + || !options.scalable + || !options.checkOrientation + || !window.ArrayBuffer + ) { this.clone(); return; }
fix: check orientation only when it is rotatable and scalable
fengyuanchen_cropperjs
train
js
a24d5ece55c4b36ebd962fe062daecc80dbece99
diff --git a/js/src/figure.js b/js/src/figure.js index <HASH>..<HASH> 100644 --- a/js/src/figure.js +++ b/js/src/figure.js @@ -734,6 +734,11 @@ var FigureView = widgets.DOMWidgetView.extend( { d.object_ticklabel.text = "" // TODO: removing and adding new tick marks will result in just many empty text sprites }, update_scatters: function() { + if(this.scatter_views) { + this.scatter_views.forEach((scatter) => { + scatter.remove_from_scene() + }) + } var scatters = this.model.get('scatters'); if(scatters) { //this.scatters.update(scatters); @@ -748,6 +753,11 @@ var FigureView = widgets.DOMWidgetView.extend( { } }, update_meshes: function() { + if(this.mesh_views) { + this.mesh_views.forEach((mesh) => { + mesh.remove_from_scene() + }) + } var meshes = this.model.get('meshes'); if(meshes) { //this.meshes.update(meshes);
fix: remove old views of scatter and mesh when traits change
maartenbreddels_ipyvolume
train
js
End of preview. Expand in Data Studio
README.md exists but content is empty.
Downloads last month
4