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
5af26ebc7bc88b41667a53cf7bbc7f841cb5a7cf
diff --git a/tests/specs/scoped.js b/tests/specs/scoped.js index <HASH>..<HASH> 100644 --- a/tests/specs/scoped.js +++ b/tests/specs/scoped.js @@ -233,6 +233,18 @@ test('scoped Store .findOrAdd() with missing id throws an error', function (t) { }) }) +test('scoped Store .findOrAdd(string) with missing new object throws an error', function (t) { + t.plan(1) + + var store = new Store('test-db-scoped-find-add', merge({remote: 'test-db-scoped-find-add'}, options)) + var testStore = store('test') + + testStore.findOrAdd('newstringid') + .catch(function (err) { + t.is(err.message, 'Missing ID', 'error has correct message') + }) +}) + test('scoped Store .update()', function (t) { t.plan(2)
test: ensure that .findOrAdd(string) with missing new object calls add
hoodiehq_hoodie-store-client
train
js
1d23c96ea64ba37e303f99134ebeb58c70561042
diff --git a/src/tools/base/BaseBrushTool.js b/src/tools/base/BaseBrushTool.js index <HASH>..<HASH> 100644 --- a/src/tools/base/BaseBrushTool.js +++ b/src/tools/base/BaseBrushTool.js @@ -196,11 +196,18 @@ class BaseBrushTool extends BaseTool { this._drawing = false; this._mouseUpRender = true; - const measurementData = + let measurementData = null; + const brushModule = store.modules.brush; + const toolState = getToolState(element, this.name) || getToolState(element, 'brush'); + const currentSegmentationIndex = brushModule.state.drawColorId; + + if (toolState.data && toolState.data.length > currentSegmentationIndex) { + measurementData = toolState.data[currentSegmentationIndex]; + } const eventData = { - toolType: this.name, + toolName: this.name, element, measurementData, evtDetail: evt.detail,
fix: toolName instead of toolType, and better data for brush on MEASUREMENT_COMPLETED
cornerstonejs_cornerstoneTools
train
js
41e1c3d728a00c340cd57ce9e1edffcd0b951446
diff --git a/Renderer/AddressRenderer.php b/Renderer/AddressRenderer.php index <HASH>..<HASH> 100644 --- a/Renderer/AddressRenderer.php +++ b/Renderer/AddressRenderer.php @@ -62,8 +62,8 @@ class AddressRenderer implements AddressRendererInterface 'country' => $address->getCountry(), 'countryName' => $this->countryNameProvider->getDisplayNameForCountry($address->getCountry(), $locale), 'format' => $format, - 'omit_recipient' => (isset($options['omit_recipient'])) ? (bool) $options['omit_recipient'] : false, - 'omit_country' => (isset($options['omit_country'])) ? (bool) $options['omit_country'] : false, + 'omitRecipient' => (isset($options['omit_recipient'])) ? (bool) $options['omit_recipient'] : false, + 'omitCountry' => (isset($options['omit_country'])) ? (bool) $options['omit_country'] : false, ] ); }
fix(render): Fix casing on omit flags (#<I>)
usemarkup_addressing
train
php
d11aafc5f855ed60ccd2389b93447cea2a3cc518
diff --git a/src/packages/logger/request-logger/templates.js b/src/packages/logger/request-logger/templates.js index <HASH>..<HASH> 100644 --- a/src/packages/logger/request-logger/templates.js +++ b/src/packages/logger/request-logger/templates.js @@ -84,7 +84,9 @@ Processed ${cyan(`${method}`)} "${path}" ${magenta('Params')} ${ * @private */ function countDigits(num: number) { - return Math.floor(Math.log10(num) + 1); + const digits = Math.floor(Math.log10(num) + 1); + + return digits > 0 && Number.isFinite(digits) ? digits : 1; } /**
fix: pad function is failing due to negative values (#<I>) fix: wrong variable name
postlight_lux
train
js
0d4b4dc34127a27f7ca6e5c41197f3aaacc79cb8
diff --git a/workflow/sync/sync_manager.go b/workflow/sync/sync_manager.go index <HASH>..<HASH> 100644 --- a/workflow/sync/sync_manager.go +++ b/workflow/sync/sync_manager.go @@ -192,7 +192,9 @@ func (cm *Manager) Release(wf *wfv1.Workflow, nodeName string, syncRef *wfv1.Syn syncLockHolder.removeFromQueue(holderKey) log.Debugf("%s sync lock is released by %s", lockName.EncodeName(), holderKey) lockKey := lockName.EncodeName() - wf.Status.Synchronization.GetStatus(syncRef.GetType()).LockReleased(holderKey, lockKey) + if wf.Status.Synchronization != nil { + wf.Status.Synchronization.GetStatus(syncRef.GetType()).LockReleased(holderKey, lockKey) + } } }
fix: Panic in Workflow Retry (#<I>)
argoproj_argo
train
go
db26b1a1e66477a6f526dac56ecaaa50d2cf4700
diff --git a/index.js b/index.js index <HASH>..<HASH> 100644 --- a/index.js +++ b/index.js @@ -97,6 +97,10 @@ function wrapInControlFlow(globalFn, fnName) { } }, flow); }, 'Run ' + fnName + description + ' in control flow').then(seal(done), function(err) { + if (!err) { + err = new Error('Unknown Error'); + err.stack = ''; + } err.stack = err.stack + '\nFrom asynchronous test: \n' + driverError.stack; done.fail(err); });
fix(stacktrace): do not crash if beforeEach block is rejected without any stated reason (#<I>) Closes #<I>
angular_jasminewd
train
js
a559376acd3af31eee2c632f24ec40b2861b02d9
diff --git a/src/resolvelib/structs.py b/src/resolvelib/structs.py index <HASH>..<HASH> 100644 --- a/src/resolvelib/structs.py +++ b/src/resolvelib/structs.py @@ -116,7 +116,8 @@ class _FactoryIterableView(object): """ def __init__(self, factory): - self._iterable = factory() + self._factory = factory + self._iterable = None def __repr__(self): return "{}({})".format(type(self).__name__, list(self)) @@ -131,7 +132,10 @@ class _FactoryIterableView(object): __nonzero__ = __bool__ # XXX: Python 2. def __iter__(self): - self._iterable, current = itertools.tee(self._iterable) + iterable = ( + self._factory() if self._iterable is None else self._iterable + ) + self._iterable, current = itertools.tee(iterable) return current
fix: all the factory only when needed
sarugaku_resolvelib
train
py
45bcc21cd7bfaa19ea0592af4a85ddea8c7ca8b1
diff --git a/spec/dummy/config/application.rb b/spec/dummy/config/application.rb index <HASH>..<HASH> 100644 --- a/spec/dummy/config/application.rb +++ b/spec/dummy/config/application.rb @@ -26,5 +26,6 @@ module Dummy # config.i18n.default_locale = :de config.secret_key_base = 'TODO Put something here' config.action_controller.permit_all_parameters = true + config.active_record.sqlite3.represent_boolean_as_integer = true end end
chore(sqlite): fix warning
platanus_activeadmin_addons
train
rb
c95cc76a0a3b52c751c1a0f00895cf1b34b66b28
diff --git a/__tests__/NfcManager.test.js b/__tests__/NfcManager.test.js index <HASH>..<HASH> 100644 --- a/__tests__/NfcManager.test.js +++ b/__tests__/NfcManager.test.js @@ -7,7 +7,7 @@ import {NativeNfcManager, NfcManagerEmitter, callNative} from '../src/NativeNfcM describe('NfcManager (ios)', () => { Platform.setOS('ios'); - const NfcManagerModule = require('../src/NfcManager'); + const NfcManagerModule = require('../src/index.js'); const NfcManager = NfcManagerModule.default; const {NfcEvents} = NfcManagerModule; const lastNativeCall = () => callNative.mock.calls[callNative.mock.calls.length - 1];
fix: import NfcManager from new location
whitedogg13_react-native-nfc-manager
train
js
fffd00cbe8ba7fe66775bb9fe4ac126155b1e316
diff --git a/lib/Serverless.js b/lib/Serverless.js index <HASH>..<HASH> 100644 --- a/lib/Serverless.js +++ b/lib/Serverless.js @@ -36,9 +36,9 @@ class Serverless { this.pluginManager = new PluginManager(this); // use the servicePath from the options or try to find it in the CWD + this.cliInputArgv = process.argv.slice(2); configObject.servicePath = - configObject.servicePath || - this.utils.findServicePath(minimist(process.argv.slice(2)).config); + configObject.servicePath || this.utils.findServicePath(minimist(this.cliInputArgv).config); this.config = new Config(this, configObject); @@ -60,7 +60,7 @@ class Serverless { this.instanceId = new Date().getTime().toString(); // create a new CLI instance - this.cli = new this.classes.CLI(this); + this.cli = new this.classes.CLI(this, this.cliInputArgv); // get an array of commands and options that should be processed this.processedInput = this.cli.processInput();
refactor(CLI): Reuse same argv slice Will allow reliable memoization of argv resolution
serverless_serverless
train
js
38f04230a3064f84701a1c7eca862fd6bb2c256f
diff --git a/src/components/list/list.js b/src/components/list/list.js index <HASH>..<HASH> 100644 --- a/src/components/list/list.js +++ b/src/components/list/list.js @@ -48,10 +48,8 @@ angular.module('material.components.list', [ function mdListDirective() { return { restrict: 'E', - link: function($scope, $element, $attr) { - $element.attr({ - 'role' : 'list' - }); + compile: function(element) { + element[0].setAttribute('role', 'list'); } }; } @@ -79,10 +77,8 @@ function mdListDirective() { function mdItemDirective() { return { restrict: 'E', - link: function($scope, $element, $attr) { - $element.attr({ - 'role' : 'listitem' - }); + compile: function(element) { + element[0].setAttribute('role', 'listitem'); } }; }
fix(list): adds role attributes in compile rather than link for performance improvements #<I>
angular_material
train
js
a53d9ce6c79c99445d0962b2af91de0dc69dea70
diff --git a/packages/cli-plugin-deploy-pulumi/utils/getStackOutput.js b/packages/cli-plugin-deploy-pulumi/utils/getStackOutput.js index <HASH>..<HASH> 100644 --- a/packages/cli-plugin-deploy-pulumi/utils/getStackOutput.js +++ b/packages/cli-plugin-deploy-pulumi/utils/getStackOutput.js @@ -15,7 +15,9 @@ const getOutputJson = async (stack, env) => { } ); - return JSON.parse(stdout); + // Let's get the output after the first line break. Everything before is just yarn stuff. + const extractedJSON = stdout.substring(stdout.indexOf("\n")); + return JSON.parse(extractedJSON); } catch (e) { return null; }
fix: skip first line when parsing stack JSON output
Webiny_webiny-js
train
js
a316dd02f5a7d8dee33d99370afda8738985bc10
diff --git a/lib/updaters/types/json.js b/lib/updaters/types/json.js index <HASH>..<HASH> 100644 --- a/lib/updaters/types/json.js +++ b/lib/updaters/types/json.js @@ -11,6 +11,12 @@ module.exports.writeVersion = function (contents, version) { const indent = detectIndent(contents).indent const newline = detectNewline(contents) json.version = version + + if (json.packages && json.packages['']) { + // package-lock v2 stores version there too + json.packages[''].version = version + } + return stringifyPackage(json, indent, newline) }
fix(updater): npm7 package lock's inner version not being updated (#<I>)
conventional-changelog_standard-version
train
js
704dd712084b1aca49493b68cbd01dd2672f0e41
diff --git a/packages/wpcom.js/test/test.wpcom.site.tag.js b/packages/wpcom.js/test/test.wpcom.site.tag.js index <HASH>..<HASH> 100644 --- a/packages/wpcom.js/test/test.wpcom.site.tag.js +++ b/packages/wpcom.js/test/test.wpcom.site.tag.js @@ -21,6 +21,7 @@ describe('wpcom.site.tag', function(){ // Create a testing_tag before to start tests var testing_tag; before(function(done){ + fixture.tag.name += Math.random() * 1000000 | 0; site.tag() .add(fixture.tag, function(err, tag) { if (err) throw err;
test: add random number to tag name
Automattic_wp-calypso
train
js
cae0bca4dbf09ca7ede8bb9919b505c83985f30d
diff --git a/src/CacheKey.php b/src/CacheKey.php index <HASH>..<HASH> 100644 --- a/src/CacheKey.php +++ b/src/CacheKey.php @@ -129,18 +129,8 @@ class CacheKey } if ($period && $period->hasFixedDateTimes()) { - $startDateTime = ''; - $endDateTime = ''; - - try { - $startDateTime = $period->getStartDateTimestamp(); - } catch (\Exception $th) { - } - - try { - $endDateTime = $period->getEndDateTimestamp(); - } catch (\Exception $th) { - } + $startDateTime = $period->getStartDateTimestamp(); + $endDateTime = $period->getEndDateTimestamp(); return "{$startDateTime}|{$endDateTime}".'.'; }
refactor: remove try catch blocks
cyrildewit_eloquent-viewable
train
php
dcf588800faf7f5d1f9be13d0bcc5528a2c2cf18
diff --git a/examples/python/infomap-networkx.py b/examples/python/infomap-networkx.py index <HASH>..<HASH> 100644 --- a/examples/python/infomap-networkx.py +++ b/examples/python/infomap-networkx.py @@ -37,8 +37,8 @@ def find_communities(G): def draw_network(G): # position map pos = nx.spring_layout(G) - # community ids - communities = list(nx.get_node_attributes(G, 'community').values()) + # community index + communities = [c - 1 for c in nx.get_node_attributes(G, 'community').values()] num_communities = max(communities) + 1 # color map from http://colorbrewer2.org/
fix(python): Fix color indices in networkx example
mapequation_infomap
train
py
f0caaa1e83b7e17b574c53f7d754021ebfaa5933
diff --git a/src/Client/OAuth/Manager.php b/src/Client/OAuth/Manager.php index <HASH>..<HASH> 100644 --- a/src/Client/OAuth/Manager.php +++ b/src/Client/OAuth/Manager.php @@ -7,6 +7,7 @@ namespace Commercetools\Core\Client\OAuth; +use Commercetools\Core\Error\ApiException; use GuzzleHttp\Psr7\Request; use Psr\Http\Message\ResponseInterface; use Commercetools\Core\AbstractHttpClient; @@ -142,7 +143,11 @@ class Manager extends AbstractHttpClient 'scope' => $scope . ':' . $this->getConfig()->getProject() ]; - $response = $this->execute($data); + try { + $response = $this->execute($data); + } catch (ApiException $exception) { + throw ApiException::create($exception->getRequest(), $exception->getResponse()); + } $result = json_decode($response->getBody(), true);
fix(OAuthManager): don't expose api credentials through exception callstack
commercetools_commercetools-php-sdk
train
php
8677a5234d0ea8fa7cbe8b65066bd59d3f501fa5
diff --git a/platform/nativescript/plugins/modal-plugin.js b/platform/nativescript/plugins/modal-plugin.js index <HASH>..<HASH> 100644 --- a/platform/nativescript/plugins/modal-plugin.js +++ b/platform/nativescript/plugins/modal-plugin.js @@ -1,3 +1,23 @@ +import { updateDevtools } from '../util' + +let sequentialCounter = 0 + +function serializeModalOptions(options) { + if (process.env.NODE_ENV === 'production') { + return null + } + + const allowed = ['fullscreen'] + + return Object.keys(options) + .filter(key => allowed.includes(key)) + .map(key => { + return `${key}: ${options[key]}` + }) + .concat(`uid: ${++sequentialCounter}`) + .join(', ') +} + function _findParentModalEntry(vm) { if (!vm) { return false @@ -58,10 +78,12 @@ export default { }, render: h => h(component, { - props: options.props + props: options.props, + key: serializeModalOptions(options) }) }) const modalPage = navEntryInstance.$mount().$el.nativeView + updateDevtools() this.$el.nativeView.showModal(modalPage, options) })
feat: improve modals in DevTools
nativescript-vue_nativescript-vue
train
js
b43cb71c3ba08d3b16d312dab11905800c0856b7
diff --git a/docs/conf.py b/docs/conf.py index <HASH>..<HASH> 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -34,7 +34,6 @@ version = scuba.version.__version__ # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom # ones. extensions = [ - 'sphinx.ext.autosectionlabel', 'myst_parser', ]
docs: Disable autosectionlabel extension This produces a lot of warnings for the "Added" etc. sub-headings in CHANGELOG.md, and we don't really use it much anyway.
JonathonReinhart_scuba
train
py
bef72423f3bb7530d1c5b2e5a3bdb498c10ddb39
diff --git a/library/src/main/java/com/liulishuo/filedownloader/services/FileDownloadRunnable.java b/library/src/main/java/com/liulishuo/filedownloader/services/FileDownloadRunnable.java index <HASH>..<HASH> 100644 --- a/library/src/main/java/com/liulishuo/filedownloader/services/FileDownloadRunnable.java +++ b/library/src/main/java/com/liulishuo/filedownloader/services/FileDownloadRunnable.java @@ -572,7 +572,8 @@ public class FileDownloadRunnable implements Runnable { * Only handle the case of Chunked resource, if it is not chunked, has already been handled * in {@link #getRandomAccessFile(boolean, long)}. */ - if (model.getTotal() == -1 && ex instanceof IOException) { + if (model.getTotal() == -1 && ex instanceof IOException && + new File(model.getPath()).exists()) { // chunked final long freeSpaceBytes = FileDownloadUtils. getFreeSpaceBytes(model.getPath());
fix(chunked-crash): handle the crash when delete the chunked-download-file during downloading calculate the free space with the path must exist
lingochamp_FileDownloader
train
java
f211ebedaaff68430f9c11a953403e6aab437739
diff --git a/lib/workers/pr/index.js b/lib/workers/pr/index.js index <HASH>..<HASH> 100644 --- a/lib/workers/pr/index.js +++ b/lib/workers/pr/index.js @@ -137,7 +137,7 @@ async function ensurePr(prConfig) { }); } // istanbul ignore next - for (let i = 50; i < upgrade.releases.length; i += 1) { + for (let i = 20; i < upgrade.releases.length; i += 1) { if (upgrade.releases[i].releaseNotes) { upgrade.releases[i].releaseNotes.body = null; }
fix: limit embedded changelogs to last <I> releases
renovatebot_renovate
train
js
cbf719121e8515f3c127e63d50e9927ffa3443a7
diff --git a/lib/scalra.js b/lib/scalra.js index <HASH>..<HASH> 100644 --- a/lib/scalra.js +++ b/lib/scalra.js @@ -36,11 +36,12 @@ addScriptJs("/web/config.js"); // perform action only after page is loaded document.addEventListener ("DOMContentLoaded", function () { - + console.log('document.location:'); + console.log(document.location); var onConnected = (typeof onConnect === 'function' ? onConnect : function () {console.log('server connected'); }); var onSocketEvent = (typeof onSocketEvent === 'function' ? onSocketEvent : undefined); var type = (typeof connectType === 'string' ? connectType : 'http'); - var host = (typeof connectHost === 'string' ? connectHost : document.location.host); + var host = (typeof connectHost === 'string' ? connectHost : document.location.hostname); console.log('connectType: ' + type); console.log('connectHost: ' + host);
fix: host determination in /lib/scalra.js
imonology_scalra
train
js
1577932525f31b9f174cbfd585d40b64c94279c8
diff --git a/test/ext/max-age.js b/test/ext/max-age.js index <HASH>..<HASH> 100644 --- a/test/ext/max-age.js +++ b/test/ext/max-age.js @@ -803,7 +803,7 @@ module.exports = function () { ++i; return x + y; }; - mfn = memoize(fn, { maxAge: 600, preFetch: 1 / 6 }); + mfn = memoize(fn, { maxAge: 6000, preFetch: 1 / 6 }); a(mfn(3, 7), 10, "Result #1"); a(i, 1, "Called #1"); a(mfn(3, 7), 10, "Result #2"); @@ -850,10 +850,10 @@ module.exports = function () { a(mfn(5, 8), 13, "Result: After Refetch #3 B"); a(i, 4, "Called: After Refetch #3 B"); d(); - }, 200); - }, 300); - }, 100); - }, 450); + }, 2000); + }, 3000); + }, 1000); + }, 4500); } } };
test: increase timeouts to avoid race conditions
medikoo_memoizee
train
js
a30b0cb0b3536797dc82ba40c56d61c9e7f8f0bf
diff --git a/packages/xod-client/src/editor/reducer.js b/packages/xod-client/src/editor/reducer.js index <HASH>..<HASH> 100644 --- a/packages/xod-client/src/editor/reducer.js +++ b/packages/xod-client/src/editor/reducer.js @@ -599,9 +599,9 @@ const editorReducer = (state = {}, action) => { const currentPatchPath = currentTab.patchPath; const currentOffset = currentTab.offset; return R.compose( + setTabOffset(currentOffset, DEBUGGER_TAB_ID), drillDown(action.payload.patchPath, null), R.assoc('currentTabId', DEBUGGER_TAB_ID), - setTabOffset(currentOffset, DEBUGGER_TAB_ID), addTabWithProps(DEBUGGER_TAB_ID, TAB_TYPES.DEBUGGER, currentPatchPath) )(state); }
fix(xod-client): preserve patch offset when starting debugger Closes #<I>
xodio_xod
train
js
02aa7b28da4a31fe51dff2ab25d7751c576a7d47
diff --git a/test/integration/ssg-data-404/test/index.test.js b/test/integration/ssg-data-404/test/index.test.js index <HASH>..<HASH> 100644 --- a/test/integration/ssg-data-404/test/index.test.js +++ b/test/integration/ssg-data-404/test/index.test.js @@ -48,6 +48,11 @@ const runTests = () => { } describe('SSG data 404', () => { + if (process.platform === 'win32') { + it('should skip this suite on Windows', () => {}) + return + } + describe('dev mode', () => { beforeAll(async () => { appPort = await findPort()
ci: stabilize Window CI (#<I>) This skips a test suite that always flakes on Windows due to `http-proxy` <> Windows interop issues.
zeit_next.js
train
js
2234ec939fffa86b2da10c373ccbf5e7f9869168
diff --git a/bin/use.js b/bin/use.js index <HASH>..<HASH> 100755 --- a/bin/use.js +++ b/bin/use.js @@ -10,7 +10,7 @@ var error = util.error; var warn = util.warn; var info = util.info; var readConfig = util.readConfig; -var MAX_RULES_LEN = 1024 * 16; +var MAX_RULES_LEN = 1024 * 256; var DEFAULT_OPTIONS = { host: '127.0.0.1', port: 8899 }; var options; @@ -142,7 +142,7 @@ module.exports = function(filepath, storage, force) { } var rules = getString(result.rules); if (rules.length > MAX_RULES_LEN) { - error('The rules cannot be empty and the size cannot exceed 16k.'); + error('The rules cannot be empty and the size cannot exceed 256k.'); return; } var setRules = function() {
refactor: set max_local_rules_length=<I>k
avwo_whistle
train
js
2768c75d6fda3d0c2925feb2089963a6008a408f
diff --git a/lib/hooks.php b/lib/hooks.php index <HASH>..<HASH> 100644 --- a/lib/hooks.php +++ b/lib/hooks.php @@ -358,6 +358,7 @@ function get_subscriptions($hook, $type, $return, $params) { // Notification has already been sent to the owner of the container in the save action $container = $object->getContainerEntity(); unset($all_subscriptions[$container->guid]); + unset($all_subscriptions[$container->owner_guid]); return $all_subscriptions; }
fix(notifications): avoid sending duplicate notifications to content owners
hypeJunction_hypeInteractions
train
php
5b11b5f04eb8cad9447a9ed2f5415b7dd9d011a4
diff --git a/test/test.js b/test/test.js index <HASH>..<HASH> 100644 --- a/test/test.js +++ b/test/test.js @@ -54,7 +54,7 @@ describe('gulp-alex', () => { stream.on('data', (file) => { expect(file).to.eql(validFile); - expect(reporter.called).to.eql(true); + expect(reporter.calledOnce).to.eql(true); done(); }); @@ -74,7 +74,7 @@ describe('gulp-alex', () => { stream.on('data', (file) => { expect(file).to.eql(fileWithOneError); - expect(reporter.called).to.eql(true); + expect(reporter.calledOnce).to.eql(true); done(); });
refactor(test): use calledOnce instead of called
dustinspecker_gulp-alex
train
js
43c3fac8c0fb6244404bb5ab1fda6ebe42e884c6
diff --git a/library/src/main/java/com/liulishuo/filedownloader/util/FileDownloadExecutors.java b/library/src/main/java/com/liulishuo/filedownloader/util/FileDownloadExecutors.java index <HASH>..<HASH> 100644 --- a/library/src/main/java/com/liulishuo/filedownloader/util/FileDownloadExecutors.java +++ b/library/src/main/java/com/liulishuo/filedownloader/util/FileDownloadExecutors.java @@ -33,7 +33,7 @@ import java.util.concurrent.atomic.AtomicInteger; * second, the thread will be terminate to reduce the cost of resources. */ public class FileDownloadExecutors { - private final static int DEFAULT_IDLE_SECOND = 5; + private final static int DEFAULT_IDLE_SECOND = 10; public static ThreadPoolExecutor newDefaultThreadPool(int nThreads, String prefix) { return newDefaultThreadPool(nThreads, new LinkedBlockingQueue<Runnable>(), prefix);
feat: change the keepalive second for each executor, since when downloading multiple tasks thread release and recreate too frequently
lingochamp_FileDownloader
train
java
7a2df3d08289d4e900450f6770c141e2b8ece5b5
diff --git a/nupic/algorithms/anomaly.py b/nupic/algorithms/anomaly.py index <HASH>..<HASH> 100644 --- a/nupic/algorithms/anomaly.py +++ b/nupic/algorithms/anomaly.py @@ -101,7 +101,7 @@ class Anomaly(object): self._buf = numpy.array([0] * self._windowSize, dtype=numpy.float) self._i = 0 # index pointer to actual position elif slidingWindowSize <= 0: - raise ValueException( + raise ValueError( "Anomaly: if you define slidingWindowSize, it has to be an " "integer > 0; slidingWindowSize=%r" % slidingWindowSize) elif slidingWindowSize is not None:
fix: typo in ValueError
numenta_nupic
train
py
bc9ec5a7506cd2db0e4a0c13f920e32101dad6dd
diff --git a/packages/docs/src/vuetify/index.js b/packages/docs/src/vuetify/index.js index <HASH>..<HASH> 100644 --- a/packages/docs/src/vuetify/index.js +++ b/packages/docs/src/vuetify/index.js @@ -9,10 +9,10 @@ export function createVuetify () { const vuetify = new Vuetify({ theme: { options: { - themeCache: { + themeCache: typeof document !== 'undefined' ? { get: key => localStorage.getItem(key), set: (key, value) => localStorage.setItem(key, value), - }, + } : undefined, minifyTheme, }, themes: {
docs: check for document before using localStorage
vuetifyjs_vuetify
train
js
e1692770d4bc1c6967b00cbab87f6a681046e5a4
diff --git a/src/DynamicRedirect.js b/src/DynamicRedirect.js index <HASH>..<HASH> 100644 --- a/src/DynamicRedirect.js +++ b/src/DynamicRedirect.js @@ -11,9 +11,9 @@ */ const { URL } = require('url'); const { fetch } = require('@adobe/helix-fetch').context({ - httpsProtocols: - /* istanbul ignore next */ - process.env.HELIX_FETCH_FORCE_HTTP1 ? ['http1'] : ['http2', 'http1'], + // force HTTP/1 in order to avoid issues with long-lived HTTP/2 sessions + // on azure/kubernetes based I/O Runtime + httpsProtocols: ['http1'], }); const DEFAULT_TYPE = 'permanent';
feat: force http1 when invoking other runtime actions The upcoming/new I/O Runtime environment is Azure-based and supports HTTP/2. This might lead to issues with long-lived HTTP/2 sessions.
adobe_helix-shared
train
js
a205f88310653331c96f51402d148c576dd79db8
diff --git a/lib/cli/handle-error.js b/lib/cli/handle-error.js index <HASH>..<HASH> 100644 --- a/lib/cli/handle-error.js +++ b/lib/cli/handle-error.js @@ -159,10 +159,7 @@ module.exports = async (exception, options = {}) => { const errorMsg = stripAnsi( exceptionTokens.stack && !isUserError ? exceptionTokens.stack : exceptionTokens.message ); - writeText(style.error('\nError:')); - if (errorMsg) { - writeText(` ${errorMsg.split('\n').join('\n ')}`); - } + writeText(null, style.error('Error:'), errorMsg); legacy.consoleLog(chalk.yellow(' Get Support --------------------------------------------')); legacy.consoleLog(`${chalk.yellow(' Docs: ')}docs.serverless.com`);
refactor(CLI): Improve modern error reporting
serverless_serverless
train
js
ec69fe7b78585889f68d898eee43f9182ef43e76
diff --git a/spec/operators/single-spec.js b/spec/operators/single-spec.js index <HASH>..<HASH> 100644 --- a/spec/operators/single-spec.js +++ b/spec/operators/single-spec.js @@ -144,19 +144,4 @@ describe('Observable.prototype.single()', function () { expectObservable(e1.single(predicate)).toBe(expected, {z: undefined}); expectSubscriptions(e1.subscriptions).toBe(e1subs); }); - - it('should not break unsubscription chain when unsubscribed explicitly', function () { - var e1 = hot('--a--b--c--|'); - var unsub = ' ! '; - var e1subs = '^ ! '; - var expected = '---- '; - - var result = e1 - .mergeMap(function (x) { return Observable.of(x); }) - .single() - .mergeMap(function (x) { return Observable.of(x); }); - - expectObservable(result, unsub).toBe(expected); - expectSubscriptions(e1.subscriptions).toBe(e1subs); - }); }); \ No newline at end of file
test(single): remove duplicated test
ReactiveX_rxjs
train
js
0de1cf53a4a445b3a62221c7225adf16841ea1c7
diff --git a/packages/hoc-disabled-tooltip/src/disabledTooltip.test.js b/packages/hoc-disabled-tooltip/src/disabledTooltip.test.js index <HASH>..<HASH> 100644 --- a/packages/hoc-disabled-tooltip/src/disabledTooltip.test.js +++ b/packages/hoc-disabled-tooltip/src/disabledTooltip.test.js @@ -66,7 +66,7 @@ describe("disabledTooltip HOC", function() { test("mouseover and mouseleave events should change showTooltip state on disabled fields", function() { const EnhancedInput = disabledTooltip("input"); - let component = mount(<EnhancedInput disabled />); + const component = mount(<EnhancedInput disabled />); const hitArea = component.find(".hit"); const defaultState = component.state();
refactor(minor): a small change, replace a let with a const affects: @crave/farmblocks-hoc-disabled-tooltip
CraveFood_farmblocks
train
js
62673d56921dbdf71bd1b71657a546c14fc2908c
diff --git a/ui/src/utils/patterns.js b/ui/src/utils/patterns.js index <HASH>..<HASH> 100644 --- a/ui/src/utils/patterns.js +++ b/ui/src/utils/patterns.js @@ -13,12 +13,13 @@ export const testPattern = { time: v => /^([0-1]?\d|2[0-3]):[0-5]\d$/.test(v), fulltime: v => /^([0-1]?\d|2[0-3]):[0-5]\d:[0-5]\d$/.test(v), timeOrFulltime: v => /^([0-1]?\d|2[0-3]):[0-5]\d(:[0-5]\d)?$/.test(v), - + // -- RFC 5322 -- // -- Added in v2.6.6 -- // This is a basic helper validation. // For something more complex (like RFC 822) you should write and use your own rule. // We won't be accepting PRs to enhance the one below because of the reason above. + // eslint-disable-next-line email: v => /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(v), hexColor: v => hex.test(v),
chore(ui): fix linting issue from previous PR
quasarframework_quasar
train
js
277945bf42671fa103ddf86e0a423fa860f2db5f
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 @@ -60,7 +60,7 @@ s - skip <info>(keep current file)</info> file_exists("./{$filename}") && $event->getIO()->askConfirmation("Use './{$filename}'? [<options=bold>y</options=bold>/n]", true) ) { - self::getFromIO($event->getIO(), $filename, "./{$filename}"); + self::getFromIO($event->getIO(), $filename, "."); } else { self::getFromS3($event->getIO(), $s3key, self::PARAMETERS_DIR . $filename, true); } @@ -79,7 +79,7 @@ s - skip <info>(keep current file)</info> */ protected static function getFromIO(IOInterface $io, $filename, $pathname = "") { - if (!file_exists($pathname)) { + if (!file_exists($pathname . "/" . $filename)) { if ($io->isInteractive()) { $try = 0; while (!file_exists($pathname . '/' . $filename)) {
fix: Non-interactive selection of parameters.yml in ScriptHandler
keboola_syrup
train
php
3d2e12fef1e32bdd7337be24b6ee1fd8d5fdf2de
diff --git a/test/test-validators.js b/test/test-validators.js index <HASH>..<HASH> 100644 --- a/test/test-validators.js +++ b/test/test-validators.js @@ -67,6 +67,10 @@ describe('Validators:', function () { assert.throws(() => { validateWidthTolerance(0) }) }); + it('throws if widthTolerance is less than 0', () => { + assert.throws(() => { validateWidthTolerance(-3) }) + }); + it('does not throw on valid widthTolerance', () => { assert.doesNotThrow(() => { validateWidthTolerance(0.08) }) });
test: throws if widthTolerance is < 0
imgix_imgix-core-js
train
js
d0a04423bccdd906dd11d4295cb58fc4d53c15ff
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index <HASH>..<HASH> 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -16,6 +16,7 @@ require "aruba/api" require "capybara/rails" require 'capybara/poltergeist' Capybara.javascript_driver = :poltergeist +Capybara.ignore_hidden_elements = false Dir[File.expand_path("../support/**/*.rb", __FILE__)].each { |f| require f }
chore(tests): change Capybara default visibility setting
abe33_awesome_form
train
rb
7de51e93e9fa3bffa3001c6f0b69126bc3c87815
diff --git a/src/_provider/watcher.js b/src/_provider/watcher.js index <HASH>..<HASH> 100644 --- a/src/_provider/watcher.js +++ b/src/_provider/watcher.js @@ -70,7 +70,7 @@ angular.module('a8m.filter-watcher', []) $$timeout(function() { if(!$rootScope.$$phase) $$cache = {}; - }); + }, 2000); } /**
fix(watcher): add min timeout to cache clean
a8m_angular-filter
train
js
aae25fa92ee07f4e7eeb01e7fd383fec67a8e5ae
diff --git a/src/downshift.js b/src/downshift.js index <HASH>..<HASH> 100644 --- a/src/downshift.js +++ b/src/downshift.js @@ -75,7 +75,7 @@ class Downshift extends Component { if (i == null) { return '' } - if (process.env.NODE_ENV !== 'production' && isPlainObject(i)) { + if (process.env.NODE_ENV !== 'production' && isPlainObject(i) && !i.hasOwnProperty('toString')) { //eslint-disable-next-line no-console console.warn( 'downshift: An object was passed to the default implementation of `itemToString`. You should probably provide your own `itemToString` implementation. Please refer to the `itemToString` API documentation.',
fix: allow custom toString methods on objects (#<I>)
downshift-js_downshift
train
js
451a6d526da4e66fa9858e0ac755062db5e05e3a
diff --git a/test/unit/waves.js b/test/unit/waves.js index <HASH>..<HASH> 100644 --- a/test/unit/waves.js +++ b/test/unit/waves.js @@ -58,6 +58,7 @@ describe('Waves', () => { it('applies a color class', () => { element.setAttribute('md-waves', 'color: green;'); + waves.color = 'green'; waves.attached(); taskQueue.flushMicroTaskQueue();
refactor(waves-test): set color property directly
aurelia-ui-toolkits_aurelia-materialize-bridge
train
js
7e09b7241e374bf60b36cfab9c7ed5261a80a267
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -75,7 +75,7 @@ setup( "cryptography>=3.3.2", "deprecation>=2.1.0, <2.2.0", "flask>=1.1.0, <2.0.0", - "flask-appbuilder>=3.3.0, <4.0.0", + "flask-appbuilder>=3.3.2, <4.0.0", "flask-caching>=1.10.0", "flask-compress", "flask-talisman",
chore: Bump FAB to <I> (#<I>)
apache_incubator-superset
train
py
0c659eb1b31dbae2d104353acc3c6e721c318d0c
diff --git a/packages/widget-chat/webpack.config.js b/packages/widget-chat/webpack.config.js index <HASH>..<HASH> 100644 --- a/packages/widget-chat/webpack.config.js +++ b/packages/widget-chat/webpack.config.js @@ -132,6 +132,10 @@ module.exports = { include: [/node_modules/], loaders: ['style-loader', 'css-loader'] }, { + test: /\.json$/, + loader: 'url' + }, + { test: /\.woff$/, // Inline small woff files and output them below font/. // Set mimetype just in case. @@ -152,5 +156,8 @@ module.exports = { include: path.resolve(__dirname, '..') } ] + }, + node: { + fs: 'empty' } };
fix(widget-chat): webpack configurations for plugin-conversation changes
webex_spark-js-sdk
train
js
09ac37368bdeb2a43d85f0f070698ca0c67301d0
diff --git a/src/utils/subscription-registry.js b/src/utils/subscription-registry.js index <HASH>..<HASH> 100644 --- a/src/utils/subscription-registry.js +++ b/src/utils/subscription-registry.js @@ -116,8 +116,9 @@ class SubscriptionRegistry { } _onSocketClose (socket) { - for (const name of this._names.get(socket) || []) { - this.unsubscribe(name, socket) + const names = this._names.get(socket) || new Set() + for (const name of names) { + this.unsubscribe(name, socket, true) } }
fix(subscription-registry): silent unsub on close.
deepstreamIO_deepstream.io
train
js
d52bec2681a4d5afd82b723eed9f467545e03567
diff --git a/src/index.js b/src/index.js index <HASH>..<HASH> 100644 --- a/src/index.js +++ b/src/index.js @@ -236,11 +236,11 @@ export class Logger { error(message: string, ...rest: any[]): void {} /** - * Sets the level of logging this logger + * Sets the level of logging for this logger instance * * @param level Matches a value of logLevel specifying the level of logging. */ - setLevel(level: LogLevel): void { + setLevel(level: number): void { this.level = level; } }
fix(logging): relax type on Logger.setLevel() for compatibility with TypeScript
aurelia_logging
train
js
ddd4213fcfaba25a35a5cca6dc63d23243546be8
diff --git a/lib/browser-sync.js b/lib/browser-sync.js index <HASH>..<HASH> 100644 --- a/lib/browser-sync.js +++ b/lib/browser-sync.js @@ -705,6 +705,15 @@ BrowserSync.prototype.cleanup = function (cb) { bs.events.removeAllListeners(); } + // Close any core file watchers + if (bs.watchers) { + Object.keys(bs.watchers).forEach(function (key) { + bs.watchers[key].watchers.forEach(function (watcher) { + watcher.close(); + }); + }); + } + // Run any additional clean up tasks bs._cleanupTasks.forEach(function (fn) { if (_.isFunction(fn)) {
fix(cleanup): close any watchers registered in options - fixes #<I>
BrowserSync_browser-sync
train
js
c9fe442882d7446e63f8536b35bb90d213018b26
diff --git a/index.js b/index.js index <HASH>..<HASH> 100644 --- a/index.js +++ b/index.js @@ -2,11 +2,11 @@ /* global hexo */ -var ftpsync = require('ftpsync'); +const ftpsync = require('ftpsync'); -hexo.extend.deployer.register('ftpsync', function(args, callback) { +hexo.extend.deployer.register('ftpsync', (args, callback) => { if (!args.host || !args.user || args.pass == null) { - var help = [ + const help = [ 'You should argsure deployment settings in _config.yml first!', '', 'Example:', @@ -37,6 +37,7 @@ hexo.extend.deployer.register('ftpsync', function(args, callback) { connections: args.connections || 1, ignore: args.ignore || [] }; + ftpsync.log.verbose = args.verbose || false; if (ftpsync.settings.port > 65535 || ftpsync.settings.port < 1) {
refactor: es6-fy
hexojs_hexo-deployer-ftpsync
train
js
d875704d577905a1d752ade96c73d6771458d67a
diff --git a/packages/zent/src/tabs/index.js b/packages/zent/src/tabs/index.js index <HASH>..<HASH> 100644 --- a/packages/zent/src/tabs/index.js +++ b/packages/zent/src/tabs/index.js @@ -132,7 +132,8 @@ export default class Tabs extends (PureComponent || Component) { renderWithPanel() { let { prefix, className, children, activeKey, activeId } = this.props; // 向上兼容 - activeId = activeId === undefined ? activeKey : activeId; + // 因为defaultProps里面activeId和activeKey默认值为空,所以不应该用是否是undefined来处理 + activeId = activeId === '' ? activeKey : activeId; let tabListData = tabUtil.getTabListData(children, activeId); return ( <div className={`${prefix}-tabs ${className}`}>
fix: 修复Tabs组件activeKey兼容问题
youzan_zent
train
js
3f9ad9bfffb7897a2ad57289bdeb4e76cdc7e824
diff --git a/packages/vuetify/src/mixins/detachable.js b/packages/vuetify/src/mixins/detachable.js index <HASH>..<HASH> 100644 --- a/packages/vuetify/src/mixins/detachable.js +++ b/packages/vuetify/src/mixins/detachable.js @@ -40,8 +40,11 @@ export default { beforeMount () { this.$nextTick(() => { - if (this.activatorNode && this.activatorNode.elm) { - this.$el.parentNode.insertBefore(this.activatorNode.elm, this.$el) + if (this.activatorNode) { + const activator = Array.isArray(this.activatorNode) ? this.activatorNode : [this.activatorNode] + activator.forEach(node => { + node.elm && this.$el.parentNode.insertBefore(node.elm, this.$el) + }) } }) },
fix(detachable): extract all elements from activator scoped slot
vuetifyjs_vuetify
train
js
51c455adb7f22d2035d5080d921ed261ccebb1e7
diff --git a/engine/src/test/java/org/camunda/bpm/engine/test/history/useroperationlog/UserOperationLogJobTest.java b/engine/src/test/java/org/camunda/bpm/engine/test/history/useroperationlog/UserOperationLogJobTest.java index <HASH>..<HASH> 100644 --- a/engine/src/test/java/org/camunda/bpm/engine/test/history/useroperationlog/UserOperationLogJobTest.java +++ b/engine/src/test/java/org/camunda/bpm/engine/test/history/useroperationlog/UserOperationLogJobTest.java @@ -448,7 +448,7 @@ public class UserOperationLogJobTest extends AbstractUserOperationLogTest { public void testExecuteByJobExecutor() { // given a job runtimeService.startProcessInstanceByKey("asyncTaskProcess"); - managementService.createJobQuery().singleResult(); + assertEquals(1L, managementService.createJobQuery().count()); // when a job is executed by the job executor waitForJobExecutorToProcessAllJobs(TimeUnit.MILLISECONDS.convert(5L, TimeUnit.SECONDS));
test(engine): improve assertions related to CAM-<I>
camunda_camunda-bpm-platform
train
java
f1ea8fad91fb167e387c9aee96f31ce2e7a0fbb1
diff --git a/model/Export/Extractor/OntologyExtractorRunner.php b/model/Export/Extractor/OntologyExtractorRunner.php index <HASH>..<HASH> 100644 --- a/model/Export/Extractor/OntologyExtractorRunner.php +++ b/model/Export/Extractor/OntologyExtractorRunner.php @@ -39,7 +39,7 @@ class OntologyExtractorRunner public static function run(core_kernel_classes_Resource $item, core_kernel_classes_Property $classProperty) { $itemProperty = $item->getProperty($classProperty->getUri()); - $labelItemProperty = $itemProperty->getLabel(); + $labelItemProperty = str_replace('"', '\'', $itemProperty->getLabel()); $extractor = new OntologyExtractor(); $extractor->addColumn($labelItemProperty, ['property' => $classProperty->getUri()]);
fix: excape double quotes in csv headers
oat-sa_extension-tao-itemqti
train
php
e96013bf91218797d58d67ebf43fa777b11378a0
diff --git a/core/src/main/java/com/orientechnologies/orient/core/metadata/sequence/OSequenceOrdered.java b/core/src/main/java/com/orientechnologies/orient/core/metadata/sequence/OSequenceOrdered.java index <HASH>..<HASH> 100644 --- a/core/src/main/java/com/orientechnologies/orient/core/metadata/sequence/OSequenceOrdered.java +++ b/core/src/main/java/com/orientechnologies/orient/core/metadata/sequence/OSequenceOrdered.java @@ -45,7 +45,7 @@ public class OSequenceOrdered extends OSequence { } @Override - public synchronized long nextWork() throws OSequenceLimitReachedException { + public long nextWork() throws OSequenceLimitReachedException { ODatabaseDocumentInternal mainDb = getDatabase(); boolean tx = mainDb.getTransaction().isActive(); try {
chore: reduce lock span of the sequence next operation
orientechnologies_orientdb
train
java
d86440506dd37101e60adec591d4b017e7765ec6
diff --git a/framework/core/src/Foundation/Application.php b/framework/core/src/Foundation/Application.php index <HASH>..<HASH> 100644 --- a/framework/core/src/Foundation/Application.php +++ b/framework/core/src/Foundation/Application.php @@ -21,7 +21,7 @@ class Application * * @var string */ - const VERSION = '1.4.0'; + const VERSION = '1.5.0-dev'; /** * The IoC container for the Flarum application.
chore: update version constant during cycle <I>
flarum_core
train
php
e554f6748915eed88b9dcd6003388cf446750903
diff --git a/react/MuiCozyTheme/theme.js b/react/MuiCozyTheme/theme.js index <HASH>..<HASH> 100644 --- a/react/MuiCozyTheme/theme.js +++ b/react/MuiCozyTheme/theme.js @@ -110,7 +110,7 @@ export const normalTheme = createMuiTheme({ }, text: { primary: getCssVariableValue('charcoalGrey'), - secondary: getCssVariableValue('slateGrey') + secondary: getCssVariableValue('coolGrey') }, grey: { 0: getCssVariableValue('white'),
fix: Text secondary color is coolGrey
cozy_cozy-ui
train
js
129ac775f1934f8f8e51006c12c6f19d8543954e
diff --git a/packages/ipfs-core/src/components/libp2p.js b/packages/ipfs-core/src/components/libp2p.js index <HASH>..<HASH> 100644 --- a/packages/ipfs-core/src/components/libp2p.js +++ b/packages/ipfs-core/src/components/libp2p.js @@ -129,7 +129,10 @@ function getLibp2pOptions ({ options, config, datastore, keychainConfig, peerId, }) ], streamMuxers: [ - new Mplex() + new Mplex({ + // temporary fix until we can limit streams on a per-protocol basis + maxStreamsPerConnection: Infinity + }) ], connectionEncryption: [ NOISE diff --git a/packages/ipfs-core/src/components/pubsub.js b/packages/ipfs-core/src/components/pubsub.js index <HASH>..<HASH> 100644 --- a/packages/ipfs-core/src/components/pubsub.js +++ b/packages/ipfs-core/src/components/pubsub.js @@ -98,7 +98,7 @@ export function createPubsub ({ network, config }) { // no more pubsub handlers, remove message listener if (Object.keys(handlers).length === 0) { libp2p.pubsub.removeEventListener('message', onMessage) - onMessage = null + onMessage = undefined } }
fix: onMessage assignment should be undefined not null (#<I>) Assign according to the type
ipfs_js-ipfs
train
js,js
84e47b82a51b3a2b0b12f1584739a6b4fa95b05f
diff --git a/examples/with-iron-session/components/Header.js b/examples/with-iron-session/components/Header.js index <HASH>..<HASH> 100644 --- a/examples/with-iron-session/components/Header.js +++ b/examples/with-iron-session/components/Header.js @@ -43,7 +43,10 @@ const Header = () => { href="/api/logout" onClick={async (e) => { e.preventDefault() - await mutateUser(fetchJson('/api/logout')) + mutateUser( + await fetchJson('/api/logout', { method: 'POST' }), + false + ) router.push('/login') }} >
docs(examples): with-iron-session logout must be called via POST (#<I>) 1. Logout is better called in a POST request (avoids caching in most situations + avoids weird CSRF "logout attacks", i.e. can't be logged out by clicking on an email link) 2. We should wait for logout to complete before mutating the user, otherwise some weird race conditions might prevent swr to catch the right logged out state
zeit_next.js
train
js
98506d3d30dc4cb74b811dcab02e4a7ef51b1408
diff --git a/tests/integration/routes/accounts/post-accounts-test.js b/tests/integration/routes/accounts/post-accounts-test.js index <HASH>..<HASH> 100644 --- a/tests/integration/routes/accounts/post-accounts-test.js +++ b/tests/integration/routes/accounts/post-accounts-test.js @@ -107,15 +107,14 @@ getServer(function (error, server) { group.end() }) - // prepared test for https://github.com/hoodiehq/hoodie-server-account/issues/126 test('POST /accounts?include=foobar', function (t) { var options = _.defaultsDeep({ url: '/accounts?include=foobar' }, routeOptions) server.inject(options, function (response) { - // t.is(response.statusCode, 400, 'returns 400 status') - // t.deepEqual(response.result.errors[0].detail, 'Allowed value for ?include is \'profile\'', 'returns error message') + t.is(response.statusCode, 400, 'returns 400 status') + t.deepEqual(response.result.errors[0].detail, 'Allowed value for ?include is \'profile\'', 'returns error message') t.end() }) })
test(routes): POST /accounts?include=foobar -> <I>
hoodiehq_hoodie-account-server
train
js
5fee67f0c5be1bcdb787c384adcefd20b637f759
diff --git a/deisctl/deisctl.go b/deisctl/deisctl.go index <HASH>..<HASH> 100644 --- a/deisctl/deisctl.go +++ b/deisctl/deisctl.go @@ -35,6 +35,7 @@ Commands, use "deisctl help <command>" to learn more: start start components stop stop components restart stop, then start components + status view status of components scale grow or shrink the number of routers, registries or store gateways journal print the log output of a component config set platform or component values
fix(deisctl): add status command to help screen Status command exists but is missing from the initial help screen
deis_deis
train
go
e8c44b534c867f099ac82c532be5e229d4fb03f6
diff --git a/views/js/layout/search.js b/views/js/layout/search.js index <HASH>..<HASH> 100644 --- a/views/js/layout/search.js +++ b/views/js/layout/search.js @@ -125,7 +125,7 @@ define(['jquery', 'layout/actions', 'ui/searchModal', 'core/store', 'context'], if (storedSearchResults) { $resultsCounter.css('display', 'initial'); $searchAreaButtonsContainer.css('right', '15px'); - $resultsCounterContainer.text(storedSearchResults.records > 99 ? '+99' : storedSearchResults.records); + $resultsCounterContainer.text(storedSearchResults.totalCount > 99 ? '+99' : storedSearchResults.totalCount); } else { $searchAreaButtonsContainer.css('right', '30px'); $resultsCounter.css('display', 'none');
chore(search-retention): display total number of records instead of current page records
oat-sa_tao-core
train
js
c8801db0b020113a000d41b78c0cefd7ef080928
diff --git a/src/field/field.js b/src/field/field.js index <HASH>..<HASH> 100644 --- a/src/field/field.js +++ b/src/field/field.js @@ -93,11 +93,10 @@ function getFields(graffitiModels) { }; } -function getSchema(collections) { - const graffitiModels = getModels(collections); +function getSchema(mongooseModels) { + const graffitiModels = getModels(mongooseModels); const fields = getFields(graffitiModels); - const res = new GraphQLSchema(fields); - return res; + return new GraphQLSchema(fields); } export default {
refactor(field): naming coherence naming coherence to make the code simpler to understand throughout
RisingStack_graffiti-mongoose
train
js
018506770a2db712560203c67ebc8f1d63b627d0
diff --git a/src/index.js b/src/index.js index <HASH>..<HASH> 100644 --- a/src/index.js +++ b/src/index.js @@ -150,3 +150,4 @@ export TextAreaSkeleton from './components/TextArea/TextArea.Skeleton'; export TextInputSkeleton from './components/TextInput/TextInput.Skeleton'; export ToggleSkeleton from './components/Toggle/Toggle.Skeleton'; export ToggleSmallSkeleton from './components/ToggleSmall/ToggleSmall.Skeleton'; +export IconSkeleton from './components/Icon/Icon.Skeleton';
fix(icon-skeleton): Add missing export for IconSkeleton component (#<I>)
carbon-design-system_carbon-components-react
train
js
d6fb94672d41fba236b3bc617954a149b737cb47
diff --git a/.eslintrc.js b/.eslintrc.js index <HASH>..<HASH> 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -3,7 +3,7 @@ module.exports = { extends: [ 'plugin:react/recommended', 'plugin:@typescript-eslint/recommended', - 'prettier/@typescript-eslint', + 'prettier', 'plugin:prettier/recommended', ], plugins: ['react-hooks'], @@ -19,6 +19,8 @@ module.exports = { 'react-hooks/rules-of-hooks': 'error', 'react-hooks/exhaustive-deps': 'warn', '@typescript-eslint/explicit-function-return-type': 'off', + '@typescript-eslint/explicit-module-boundary-types': 'off', + 'prettier/prettier': ['error', { endOfLine: 'auto' }], }, settings: { react: {
chore: Update eslint config with latest dependency updates
cahilfoley_snowfall
train
js
2c3b39d7e7e1cb27684238450d7bc393d9fe2b9d
diff --git a/rakelib/kokoro/kokoro.rb b/rakelib/kokoro/kokoro.rb index <HASH>..<HASH> 100644 --- a/rakelib/kokoro/kokoro.rb +++ b/rakelib/kokoro/kokoro.rb @@ -36,6 +36,9 @@ class Kokoro < Command @updated_gems.each do |gem| run_ci gem do run "bundle exec rake ci", 1800 + # TODO: Remove date requirement + require "date" + next unless Date.today > Date.new(2020, 4, 7) local_docs_test if should_link_check? gem || ( autorelease_pending? && @should_release )
chore: postpone link checking on presubmits for one week
googleapis_google-cloud-ruby
train
rb
400018141b678b415891b2df55c0cc76c45c987d
diff --git a/packages/node_modules/@webex/plugin-meetings/src/common/logs/request.js b/packages/node_modules/@webex/plugin-meetings/src/common/logs/request.js index <HASH>..<HASH> 100644 --- a/packages/node_modules/@webex/plugin-meetings/src/common/logs/request.js +++ b/packages/node_modules/@webex/plugin-meetings/src/common/logs/request.js @@ -37,6 +37,8 @@ export default class LogsRequest { } catch (error) { LoggerProxy.logger.error('Logs:request#uploadLogs --> uploading user logs failed', error); + + return Promise.reject(error); } return id;
fix(plugin-meetings): prevent success message when log upload fails
webex_spark-js-sdk
train
js
5d96b5f382ecf064522cef9f1d57fbec6a072ee4
diff --git a/src/Button.js b/src/Button.js index <HASH>..<HASH> 100644 --- a/src/Button.js +++ b/src/Button.js @@ -58,7 +58,7 @@ const Button = styled.button` props.disabled ? null : props.theme.colors.darkBlue}; } - ${fullWidth} ${space} ${size}; + ${fullWidth} ${size} ${space}; ` const numberStringOrArray = PropTypes.oneOfType([
fix(button): Switch css hierarchy so that passed in paddings are not overwritten by default size
jrs-innovation-center_design-system
train
js
8173710be53b12646d1a19c6620696f3603a1b67
diff --git a/routes/admin/authenticated/sidebar/community-settings/invite/page.js b/routes/admin/authenticated/sidebar/community-settings/invite/page.js index <HASH>..<HASH> 100644 --- a/routes/admin/authenticated/sidebar/community-settings/invite/page.js +++ b/routes/admin/authenticated/sidebar/community-settings/invite/page.js @@ -16,12 +16,17 @@ var styles = require('exenv').canUseDOM ? require('./page.scss') : {} const CommunitySettingsInfoPage = ({ fields: { email }, + resetForm, location, community, downloadActivists, ...formProps }) => ( - <FormRedux nosubmit {...formProps}> + <FormRedux + {...formProps} + nosubmit + onFinishSubmit={() => resetForm()} + > <FormGroup controlId='email' {...email}> <ControlLabel>Pessoas</ControlLabel> <FormControl
chore(community): reset invite form after submit fix #<I>
nossas_bonde-client
train
js
4ed176c2657a55a6d394446407cb3d2e6f622f81
diff --git a/src/tools/annotation/CircleRoiTool.js b/src/tools/annotation/CircleRoiTool.js index <HASH>..<HASH> 100644 --- a/src/tools/annotation/CircleRoiTool.js +++ b/src/tools/annotation/CircleRoiTool.js @@ -34,17 +34,13 @@ const logger = getLogger('tools:annotation:EllipticalRoiTool'); * @extends Tools.Base.BaseAnnotationTool */ export default class CircleRoiTool extends BaseAnnotationTool { - constructor(configuration = {}) { - const defaultConfig = { + constructor(props = {}) { + const defaultProps = { name: 'CircleRoi', supportedInteractionTypes: ['Mouse', 'Touch'], }; - const initialConfiguration = Object.assign(defaultConfig, configuration); - - super(initialConfiguration); - - this.initialConfiguration = initialConfiguration; + super(props, defaultProps); } createNewMeasurement(eventData) {
fix(mergeConfig): Applying merge config fix into CircleRoiTool
cornerstonejs_cornerstoneTools
train
js
a4fd391ba1c9faa1004e879f314beb80c3afe0b6
diff --git a/Gruntfile.js b/Gruntfile.js index <HASH>..<HASH> 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -267,7 +267,7 @@ module.exports = function(grunt) { grunt.registerTask('bench', ['metrics']); - if (process.env.SAUCE_USERNAME) { + if (process.env.SAUCE_ACCESS_KEY) { grunt.registerTask('sauce', ['concat:tests', 'connect', 'saucelabs-mocha']); } else { grunt.registerTask('sauce', []);
chore: execute saucelabs-task only if access-key exists - up to now, the existance of the SAUCE_USERNAME was checked but this variable is even present in pull-requests from other repos. This means that builds fail, because the access key is not there. This change looks for SAUCE_ACCESS_KEY instead, which is a secure variable, only present in build originating from the handlebars.js repo.
wycats_handlebars.js
train
js
fb5fe555cf8a184e8e933359433acb3b44946d93
diff --git a/packages/xod-project/src/constants.js b/packages/xod-project/src/constants.js index <HASH>..<HASH> 100644 --- a/packages/xod-project/src/constants.js +++ b/packages/xod-project/src/constants.js @@ -85,6 +85,7 @@ export const STATIC_TYPES_COMPATIBILITY = { }, [PIN_TYPE.PORT]: { [PIN_TYPE.PORT]: true, + [PIN_TYPE.STRING]: true, }, };
feat(xod-project): make the port type castable to the string type
xodio_xod
train
js
6898097c45d53a3176882a3d9cb86c0015f8d491
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -11,11 +11,13 @@ def get_version(): if line.startswith('__version__'): return eval(line.split('=')[-1]) +with open("README.rst", "r") as readme_file: + readme = readme_file.read() setup(name='python-gitlab', version=get_version(), description='Interact with GitLab API', - long_description='Interact with GitLab API', + long_description=readme, author='Gauvain Pocentek', author_email='gauvain@pocentek.net', license='LGPLv3',
docs(setup): use proper readme on PyPI
python-gitlab_python-gitlab
train
py
3be851cc73a69b7c58fa74834fefe7eaa3db251e
diff --git a/src/geshi/perl.php b/src/geshi/perl.php index <HASH>..<HASH> 100644 --- a/src/geshi/perl.php +++ b/src/geshi/perl.php @@ -197,7 +197,12 @@ $language_data = array ( 'SCRIPT_DELIMITERS' => array( ), 'HIGHLIGHT_STRICT_BLOCK' => array( + ), + 'PARSER_CONTROL' => array( + 'COMMENTS' => array( + 'DISALLOWED_BEFORE' => '$' ) + ) ); ?>
fix: Fixed $# not being comment in Perl
GeSHi_geshi-1.0
train
php
8143fcc39730ac4f94dd36b5c7e0698c01222b05
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -3,7 +3,7 @@ from setuptools import setup with open('README.MD') as readme_file: README = readme_file.read() -VERSION = '0.0.2' +VERSION = '0.0.3' setup( name='chuda',
chore(setup): upgrade to <I>
Varkal_chuda
train
py
b5fa198cdcc6d0aa72c80af9faf3557e7c66aab3
diff --git a/actions/class.PropertiesAuthoring.php b/actions/class.PropertiesAuthoring.php index <HASH>..<HASH> 100644 --- a/actions/class.PropertiesAuthoring.php +++ b/actions/class.PropertiesAuthoring.php @@ -329,7 +329,7 @@ class tao_actions_PropertiesAuthoring extends tao_actions_CommonModule $groups = $myForm->getGroups(); foreach ($data['properties'] as $prop) { - if (empty($prop['range']) || empty($prop['uri']) || empty($prop['depends-on-property'])) { + if (empty($prop['range']) || empty($prop['uri'])) { continue; } @@ -338,6 +338,7 @@ class tao_actions_PropertiesAuthoring extends tao_actions_CommonModule if (isset($elementUri)) { $index = strstr($elementUri, '_', true); $elementRangeArray[$index . '_range_list'] = $prop['range']; + if ($prop['depends-on-property']) { $elementRangeArray[$index . '_depends-on-property'] = $prop['depends-on-property']; $elementRangeArray[$index . '_uri'] = $prop['uri'];
fix: populate property fields after request
oat-sa_tao-core
train
php
938072f0ebd6943920440510abb1071eea9010e6
diff --git a/lib/NewWatchingPlugin.js b/lib/NewWatchingPlugin.js index <HASH>..<HASH> 100644 --- a/lib/NewWatchingPlugin.js +++ b/lib/NewWatchingPlugin.js @@ -2,11 +2,14 @@ MIT License http://www.opensource.org/licenses/mit-license.php Author Tobias Koppers @sokra */ -function NewWatchingPlugin() {} -module.exports = NewWatchingPlugin; +'use strict'; + +class NewWatchingPlugin { + apply(compiler) { + compiler.plugin("compilation", function(compilation) { + compilation.warnings.push(new Error("The 'NewWatchingPlugin' is no longer necessary (now default)")); + }); + } +} -NewWatchingPlugin.prototype.apply = function(compiler) { - compiler.plugin("compilation", function(compilation) { - compilation.warnings.push(new Error("The 'NewWatchingPlugin' is no longer necessary (now default)")); - }); -}; +module.exports = NewWatchingPlugin;
refactor(es6): Upgrade NewWatchingPlugin to es6 (#<I>)
webpack_webpack
train
js
c22cd16c9be1cd442da8d970ff7fe54dae355d13
diff --git a/edx_rest_api_client/auth.py b/edx_rest_api_client/auth.py index <HASH>..<HASH> 100644 --- a/edx_rest_api_client/auth.py +++ b/edx_rest_api_client/auth.py @@ -13,7 +13,15 @@ class JwtAuth(AuthBase): Deprecated: See https://github.com/edx/edx-platform/blob/master/openedx/core/djangoapps/oauth_dispatch/docs/decisions/0008-use-asymmetric-jwts.rst - Note: Remove pyjwt dependency when this class is removed. + Todos: + * Remove pyjwt dependency from edx-rest-api-client when this class is + removed. + * This class is only used by ecomworker according to data supplied by + the `deprecated_jwt_signing` custom attribute. This class should be + moved to ecomworker and out of the shared library until it can be + removed completely. The new class should rename + `deprecated_jwt_signing` to `deprecated_ecomworker_jwt_signing` + to ensure the transition. """
docs: add more deprecated JwtAuth notes (#<I>)
edx_edx-rest-api-client
train
py
fa34c32b0766a2bec6bada967c98f80784382d19
diff --git a/swarm-bat/src/BatMux.js b/swarm-bat/src/BatMux.js index <HASH>..<HASH> 100644 --- a/swarm-bat/src/BatMux.js +++ b/swarm-bat/src/BatMux.js @@ -169,13 +169,12 @@ BatMux.prototype.drain = function () { } } if (!this.data.length && this.end) { - this.onTrunkDataEnd(); + for(var tag in this.branches) { + this.branches[tag].end(); + } } }; BatMux.prototype.onTrunkDataEnd = function () { - for(var tag in this.branches) { - this.branches[tag].end(); - } this.end = true; };
fix(bat): emit `end` after all streams' data is sent
gritzko_swarm
train
js
40633a335b112d3cec5c8be5a8f3bfa284404b33
diff --git a/src/EngineWindow.js b/src/EngineWindow.js index <HASH>..<HASH> 100644 --- a/src/EngineWindow.js +++ b/src/EngineWindow.js @@ -97,20 +97,19 @@ class EngineWindow { const heightRatio = container.clientHeight / targetHeight const currRatio = (widthRatio < heightRatio) ? widthRatio : heightRatio - let ratio if(settings.upscale) { - ratio = currRatio + this.ratio = currRatio } else { - ratio = (currRatio > 1.0) ? 1.0 : currRatio + this.ratio = (currRatio > 1.0) ? 1.0 : currRatio } this.width = targetWidth this.height = targetHeight canvas.width = targetWidth canvas.height = targetHeight - canvas.style.width = `${targetWidth * ratio}px` - canvas.style.height = `${targetHeight * ratio}px` + canvas.style.width = `${targetWidth * this.ratio}px` + canvas.style.height = `${targetHeight * this.ratio}px` this.updateOffset() Engine.gl.viewport(0, 0, targetWidth, targetHeight)
fix: setup screen ratio when its changed
tenjou_meta2d
train
js
b5d5fe19b1df13608a2a04514cffaa9dcf7548d7
diff --git a/src/main/java/io/minio/MinioClient.java b/src/main/java/io/minio/MinioClient.java index <HASH>..<HASH> 100644 --- a/src/main/java/io/minio/MinioClient.java +++ b/src/main/java/io/minio/MinioClient.java @@ -1180,7 +1180,7 @@ public final class MinioClient { String tempFileName = fileName + "." + etag + ".part.minio"; Path tempFilePath = Paths.get(tempFileName); - boolean tempFileExists = Files.exists(filePath); + boolean tempFileExists = Files.exists(tempFilePath); if (tempFileExists && !Files.isRegularFile(tempFilePath)) { throw new IOException(tempFileName + ": not a regular file");
fix: temp file existence checking is wrong getObject method (#<I>) Previously in getObject method, temp file existence check is wrongly with actual file name. This causes exception when the destination file exists. This patch fixes the issue.
minio_minio-java
train
java
82cc52ecf5ac8bb32fe67e98e37de5ba9015c723
diff --git a/leancloud/object_.py b/leancloud/object_.py index <HASH>..<HASH> 100644 --- a/leancloud/object_.py +++ b/leancloud/object_.py @@ -527,7 +527,7 @@ class Object(object): self._merge_magic_field(server_data) self._rebuild_attributes() - def _finish_fetch(self, server_data, has_data): + def _finish_fetch(self, server_data, existed): self._op_set_queue = [{}] self._merge_magic_field(server_data) @@ -539,7 +539,7 @@ class Object(object): self._op_set_queue = [{}] - self._has_data = has_data + self._existed = existed def _rebuild_attribute(self, key): if self._attributes.get(key):
fix: wrong existed value when object is fetched from server
leancloud_python-sdk
train
py
d3b5338bf0de1b4fcc0b7218bb72d7cb70da7cc8
diff --git a/piazza_api/piazza.py b/piazza_api/piazza.py index <HASH>..<HASH> 100644 --- a/piazza_api/piazza.py +++ b/piazza_api/piazza.py @@ -79,7 +79,7 @@ class Piazza(object): classes = [] for rawc in raw_classes: c = {k: rawc[k] for k in ['name', 'term']} - c['num'] = rawr.get('course_number', '') + c['num'] = rawc.get('course_number', '') c['nid'] = rawc['id'] c['is_ta'] = rawc.get('is_ta', False) classes.append(c)
fix(devel): Fixed typo introduced in commit for "get_user_classes"!
hfaran_piazza-api
train
py
bbf1a278291157cf70c2d99a4072c247ede452a9
diff --git a/anyconfig/schema.py b/anyconfig/schema.py index <HASH>..<HASH> 100644 --- a/anyconfig/schema.py +++ b/anyconfig/schema.py @@ -149,16 +149,13 @@ def gen_schema(node, **options): :return: A dict represents JSON schema of this node """ - typemap = options.get("ac_schema_typemap", _SIMPLETYPE_MAP) - - ret = dict(type="null") - if node is None: - return ret + return dict(type="null") _type = type(node) if _type in _SIMPLE_TYPES: + typemap = options.get("ac_schema_typemap", _SIMPLETYPE_MAP) ret = dict(type=typemap[_type]) elif isinstance(node, dict):
refactor: code moves into cond. blocks to make objects lazily
ssato_python-anyconfig
train
py
07535a54dc17a98263548be8f333c41c080f934a
diff --git a/env.go b/env.go index <HASH>..<HASH> 100644 --- a/env.go +++ b/env.go @@ -292,8 +292,10 @@ func getOr(key, defaultValue string, defExists bool, envs map[string]string) (va func set(field reflect.Value, sf reflect.StructField, value string, funcMap map[reflect.Type]ParserFunc) error { var tm = asTextUnmarshaler(field) if tm != nil { - var err = tm.UnmarshalText([]byte(value)) - return newParseError(sf, err) + if err := tm.UnmarshalText([]byte(value)); err != nil { + return newParseError(sf, err) + } + return nil } var typee = sf.Type
refactor: make unmarshal error handling clearer
caarlos0_env
train
go
17dd1de7a683ff03f084c0c5fcac587877f75263
diff --git a/packages/reactstrap-validation-date/tests/AvDateRange.test.js b/packages/reactstrap-validation-date/tests/AvDateRange.test.js index <HASH>..<HASH> 100644 --- a/packages/reactstrap-validation-date/tests/AvDateRange.test.js +++ b/packages/reactstrap-validation-date/tests/AvDateRange.test.js @@ -100,4 +100,33 @@ describe('AvDateRange', () => { expect(onInvalidSubmit).toHaveBeenCalled(); }); }); + + test('should pass on date range with min and max distance', async () => { + const { getByText } = render( + <DateRange + name="standAlone" + start={{ + name: 'date.start', + value: '01/01/2001', + }} + end={{ + name: 'date.end', + value: '01/05/2001', + }} + distance={{ + min: { value: 2, units: 'day' }, + max: { + value: 6, + units: 'day', + }, + }} + /> + ); + + fireEvent.click(getByText('Submit')); + + await wait(() => { + expect(onValidSubmit).toHaveBeenCalled(); + }); + }); });
test(reactstrap-validation-date): added test cases for min and max
Availity_availity-react
train
js
63488d341e0f2acea7b8948e6918a69ac88d0050
diff --git a/widgets/url-sync/index.js b/widgets/url-sync/index.js index <HASH>..<HASH> 100644 --- a/widgets/url-sync/index.js +++ b/widgets/url-sync/index.js @@ -2,7 +2,6 @@ var AlgoliaSearchHelper = require('algoliasearch-helper').AlgoliaSearchHelper; var isEqual = require('lodash/lang/isEqual'); var merge = require('lodash/object/merge'); -var forEach = require('lodash/collection/forEach'); function timerMaker(t0) { var t = t0; @@ -110,10 +109,6 @@ class URLSync { if (isEqual(fullHelperState, fullState)) return; - forEach(window.document.querySelectorAll('input'), function(i) { - i.blur(); - }); - helper.setState(fullState).search(); }); }
fix(url-sync): make input not to lose focus
algolia_instantsearch.js
train
js
051962177660199b86cd7e5c870a6a39e1654cdd
diff --git a/lib/util/internal/getRelativePath.js b/lib/util/internal/getRelativePath.js index <HASH>..<HASH> 100644 --- a/lib/util/internal/getRelativePath.js +++ b/lib/util/internal/getRelativePath.js @@ -2,5 +2,9 @@ import stripPathPrefix from './stripPathPrefix' const getRootPath = require('./getRootPath') export default function (filename) { - return stripPathPrefix(getRootPath(filename), filename) + const rootPath = getRootPath(filename) + if (!rootPath) { + return false + } + return stripPathPrefix(rootPath, filename) }
fix(internal): Correctly ignore files outside of Meteor projects #<I>
dferber90_eslint-plugin-meteor
train
js
217685deab79d41bb8819f06c968f6ce38f980aa
diff --git a/packages/mrm/src/__tests__/index.spec.js b/packages/mrm/src/__tests__/index.spec.js index <HASH>..<HASH> 100644 --- a/packages/mrm/src/__tests__/index.spec.js +++ b/packages/mrm/src/__tests__/index.spec.js @@ -458,6 +458,7 @@ describe('getAllTasks', () => { task3: 'Taks 2.3', task4: 'Taks 2.4', task5: 'Taks 2.5', + task6: 'Taks 3.6', }); }); });
test: fixed getAllTasks test
sapegin_mrm
train
js
ebdbbe4870002fb4d408cf355b2074906bd9bf69
diff --git a/packages/megalo-template-compiler/build.js b/packages/megalo-template-compiler/build.js index <HASH>..<HASH> 100644 --- a/packages/megalo-template-compiler/build.js +++ b/packages/megalo-template-compiler/build.js @@ -5024,7 +5024,7 @@ var eventTypeMap$2 = { CalloutTap: ['callouttap'], ControlTap: ['controltap'], RegionChange: ['regionchange'], - Messag: ['message'], + Message: ['message'], PlusClick: ['plusclick'], TabClick: ['tabclick'], CardClick: ['cardclick'],
fix: message event on webview could not be listened
kaola-fed_megalo
train
js
8b668a786626b77903ecf9dc976f220b75bd74f7
diff --git a/packages/breadcrumbs/Breadcrumbs.js b/packages/breadcrumbs/Breadcrumbs.js index <HASH>..<HASH> 100644 --- a/packages/breadcrumbs/Breadcrumbs.js +++ b/packages/breadcrumbs/Breadcrumbs.js @@ -34,7 +34,7 @@ const Breadcrumbs = ({ crumbs, active, emptyState, children, feedback }) => { <BreadcrumbItem active>{active || emptyState}</BreadcrumbItem> {feedback && ( <Feedback - appName={feedback.appName || active} + appName={feedback.appName} className="d-flex flex-fill justify-content-end" {...feedback} />
refactor(breadcrumbs): appname the required prop passed to feedback
Availity_availity-react
train
js
aeedb40a67bbe0340d0fe7afb564fae1a99b9c32
diff --git a/storybook/stories/components/search/results.js b/storybook/stories/components/search/results.js index <HASH>..<HASH> 100644 --- a/storybook/stories/components/search/results.js +++ b/storybook/stories/components/search/results.js @@ -32,8 +32,8 @@ export default function SearchResults({ </Grid> </Col> </Grid> - {new Array(results).fill(0).map(() => - <Grid> + {times(results, key => + <Grid key={key}> <Col size={5}> <Grid margin={[0, 0, 0.5, 0]} dev={1}> Orci tempus venenatis @@ -68,7 +68,7 @@ export default function SearchResults({ </Col> <Col marginBottom={0} size={4} align="center"> {times(pages, num => - <Col marginBottom={0} size="auto"> + <Col marginBottom={0} size="auto" key={num}> {num + 1} </Col> )}
test(warnings): Reduce warnings when running tests (#<I>) `yarn test` was showing some unnecessary warnings. Fixes related issues (by adding keys)"
gymnastjs_gymnast
train
js
0a4fa371959595ff4ebcadba37f983dd71c6ed5b
diff --git a/index.js b/index.js index <HASH>..<HASH> 100644 --- a/index.js +++ b/index.js @@ -4,7 +4,7 @@ var loaderUtils = require('loader-utils'); module.exports = function(source) { this.cacheable && this.cacheable(); var query = loaderUtils.parseQuery(this.query); - var options = this.options.ejsLoader || {}; + var options = this.options ? this.options.ejsLoader || {} : {}; ['escape', 'interpolate', 'evaluate'].forEach(function(templateSetting) { var setting = query[templateSetting];
fix: update for webpack 4 this.options is not available in webpack4 so we check and return an empty object instead.
difelice_ejs-loader
train
js
f5441da71ea6a290a4643f2b2ed51bbe44263ca9
diff --git a/packages/jsx/src/lib/middleware/ui.js b/packages/jsx/src/lib/middleware/ui.js index <HASH>..<HASH> 100644 --- a/packages/jsx/src/lib/middleware/ui.js +++ b/packages/jsx/src/lib/middleware/ui.js @@ -6,7 +6,7 @@ import {SWIPEABLE_CHANGE_INDEX, SWIPEABLE_TAB_CHANGE_INDEX} from "../actions/rou const getSwipeableTabs = () => { const swipeableTabsElement = document.getElementsByClassName("nav-tabs__swipeable")[0]; - const swipeableTabs = swipeableTabsElement && M && M.Tabs.getInstance(swipeableTabsElement); + const swipeableTabs = swipeableTabsElement && window.M && M.Tabs.getInstance(swipeableTabsElement); return swipeableTabs; };
fix(jsx): Don't assume that we'll always have `M` in scope here. Redux.
randytarampi_me
train
js
75cd7b83f49766c9170a982ef76a6ff5ee2b3f36
diff --git a/okdownload/src/main/java/com/liulishuo/okdownload/core/dispatcher/CallbackDispatcher.java b/okdownload/src/main/java/com/liulishuo/okdownload/core/dispatcher/CallbackDispatcher.java index <HASH>..<HASH> 100644 --- a/okdownload/src/main/java/com/liulishuo/okdownload/core/dispatcher/CallbackDispatcher.java +++ b/okdownload/src/main/java/com/liulishuo/okdownload/core/dispatcher/CallbackDispatcher.java @@ -45,11 +45,6 @@ public class CallbackDispatcher { private final Handler uiHandler; - CallbackDispatcher(@NonNull Handler handler, @NonNull DownloadListener transmit) { - this.uiHandler = handler; - this.transmit = transmit; - } - CallbackDispatcher(@NonNull Handler handler) { this.uiHandler = handler; this.transmit = new DefaultTransmitListener();
refactor: remove useless constructor of callback-dispatcher
lingochamp_okdownload
train
java
5b8839bb6fe54abb9e95b9beed100566b2c5fc6e
diff --git a/src/component/timeline/SliderTimelineView.js b/src/component/timeline/SliderTimelineView.js index <HASH>..<HASH> 100644 --- a/src/component/timeline/SliderTimelineView.js +++ b/src/component/timeline/SliderTimelineView.js @@ -618,11 +618,17 @@ function getViewRect(model, api) { } function makeIcon(timelineModel, objPath, rect, opts) { - return graphic.createIcon( + const style = opts.style; + const icon = graphic.createIcon( timelineModel.get(objPath), opts || {}, new BoundingRect(rect[0], rect[1], rect[2], rect[3]) ); + // TODO createIcon won't use style in opt. + if (style) { + icon.setStyle(style); + } + return icon; } /**
fix(timeline): fix icon style not work bug brought in #<I>
apache_incubator-echarts
train
js
7c8f2487473aa3dbc620334747d4f6b6af87b09d
diff --git a/pvl/grammar.py b/pvl/grammar.py index <HASH>..<HASH> 100755 --- a/pvl/grammar.py +++ b/pvl/grammar.py @@ -255,8 +255,8 @@ class ISISGrammar(PVLGrammar): object_pref_keywords = ("Object", "End_Object") object_keywords = {"OBJECT": "END_OBJECT"} - # A single-line comment that starts with the octothorpe (#) is not part of PVL nor ODL, - # but it is used when ISIS writes out comments. + # A single-line comment that starts with the octothorpe (#) is not part + # of PVL or ODL, but it is used when ISIS writes out comments. comments = (("/*", "*/"), ("#", "\n")) def __init__(self): diff --git a/pvl/pvl_validate.py b/pvl/pvl_validate.py index <HASH>..<HASH> 100644 --- a/pvl/pvl_validate.py +++ b/pvl/pvl_validate.py @@ -147,7 +147,7 @@ def pvl_flavor( except (LexerError, ParseError) as err: logging.error(f"{dialect} load error {filename} {err}") loads = False - except: + except: # noqa E722 if verbose <= 1: logging.error( f"{dialect} load error {filename}, try -vv for more info."
docs: fixed some lint issues
planetarypy_pvl
train
py,py
46e1764e586e09c3be828e804dd66706525f3df6
diff --git a/it.jnrpe.services.events/src/main/java/it/jnrpe/services/events/console/ConsoleEventManager.java b/it.jnrpe.services.events/src/main/java/it/jnrpe/services/events/console/ConsoleEventManager.java index <HASH>..<HASH> 100644 --- a/it.jnrpe.services.events/src/main/java/it/jnrpe/services/events/console/ConsoleEventManager.java +++ b/it.jnrpe.services.events/src/main/java/it/jnrpe/services/events/console/ConsoleEventManager.java @@ -29,7 +29,6 @@ public class ConsoleEventManager implements IEventManager { @Override public void onEvent(IEventType type, String message) { final Date timestamp = new Date(); - System.out.println( - String.format("%tF %tT [%s] - %s", timestamp, timestamp, type.type(), message)); + System.out.printf("%tF %tT [%s] - %s%n", timestamp, timestamp, type.type(), message); } }
refactor: removed useless String.format
ziccardi_jnrpe
train
java
f527f56bb23cfa1aa30cee0f5e3785f714243909
diff --git a/packages/spark-core/src/plugins/credentials/auth-interceptor.js b/packages/spark-core/src/plugins/credentials/auth-interceptor.js index <HASH>..<HASH> 100644 --- a/packages/spark-core/src/plugins/credentials/auth-interceptor.js +++ b/packages/spark-core/src/plugins/credentials/auth-interceptor.js @@ -54,12 +54,12 @@ export default class AuthInterceptor extends Interceptor { } /** - * @see Interceptor#onRequestError + * @see Interceptor#onResponseError * @param {Object} options * @param {Error} reason * @returns {Object} */ - onRequestError(options, reason) { + onResponseError(options, reason) { return this.shouldAttemptReauth(reason, options) .then((shouldAttemptReauth) => { if (shouldAttemptReauth) { @@ -69,7 +69,7 @@ export default class AuthInterceptor extends Interceptor { Reflect.deleteProperty(reason.options.headers, `authorization`); } - return this.spark.credentials.authorize({force: true}) + return this.spark.refresh({force: true}) .then(() => this.replay(options)); }
fix(spark-core): actually refresh the access token in event of <I>
webex_spark-js-sdk
train
js
e6d68139f063c48a0b1cf29dfbe012e460b31ce8
diff --git a/alot/command.py b/alot/command.py index <HASH>..<HASH> 100644 --- a/alot/command.py +++ b/alot/command.py @@ -366,7 +366,7 @@ class ComposeCommand(Command): cmpl = AccountCompleter(ui.accountman) fromaddress = ui.prompt(prefix='From>', completer=cmpl, tab=1) validaddresses = [a.address for a in accounts] + [None] - while fromaddress not in validaddresses: + while fromaddress not in validaddresses: # TODO: not cool ui.notify('no account for this address. (<esc> cancels)') fromaddress = ui.prompt(prefix='From>', completer=cmpl) if not fromaddress: @@ -378,10 +378,16 @@ class ComposeCommand(Command): #get To header if 'To' not in self.mail: to = ui.prompt(prefix='To>', completer=ContactsCompleter()) + if to == None: + ui.notify('canceled') + return self.mail['To'] = encode_header('to', to) if settings.config.getboolean('general', 'ask_subject') and \ not 'Subject' in self.mail: subject = ui.prompt(prefix='Subject>') + if subject == None: + ui.notify('canceled') + return self.mail['Subject'] = encode_header('subject', subject) ui.apply_command(EnvelopeEditCommand(mail=self.mail))
fix: handle canceling in compose prompts issue #<I>
pazz_alot
train
py
2b374c6b8793e8de0ab168451bd35171627ee2fd
diff --git a/scripts/integration.js b/scripts/integration.js index <HASH>..<HASH> 100644 --- a/scripts/integration.js +++ b/scripts/integration.js @@ -1,6 +1,5 @@ const fs = require("fs") const path = require("path") -const ora = require("ora") const { execSync } = require("child_process") const BUILD_DIR = path.resolve("build/packages") @@ -13,12 +12,11 @@ function listDirs(dir) { } function linkDependencies(example) { - const spinner = ora("Linking " + example) + console.log("Linking " + example) const dependencies = packages.map(name => `@lingui/${name}`).join(" ") execSync("yalc link " + dependencies, { cwd: path.join(EXAMPLES_DIR, example) }) - spinner.succeed() } function linkPackage(packageName) {
chore: remove ora from setup script for intergration tests
lingui_js-lingui
train
js
2936a1377672c9fa01a7f5951217ed8f0e914471
diff --git a/packages/pob/generators/core/lerna/index.js b/packages/pob/generators/core/lerna/index.js index <HASH>..<HASH> 100644 --- a/packages/pob/generators/core/lerna/index.js +++ b/packages/pob/generators/core/lerna/index.js @@ -23,6 +23,11 @@ module.exports = class LernaGenerator extends Generator { version: 'independent', npmClient: 'yarn', useWorkspaces: true, + commands: { + publish: { + npmClient: 'npm', + }, + }, }; this.fs.writeJSON(this.destinationPath('lerna.json'), lernaConfig);
fix: always use npm to publish with lerna
christophehurpeau_pob-lerna
train
js