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 |
|---|---|---|---|---|---|
e95a01a94a8be0d327e3e9a837671913d9b064e7
|
diff --git a/test/integration/10-cluster-broker-dynamic.js b/test/integration/10-cluster-broker-dynamic.js
index <HASH>..<HASH> 100644
--- a/test/integration/10-cluster-broker-dynamic.js
+++ b/test/integration/10-cluster-broker-dynamic.js
@@ -226,7 +226,7 @@ describe(require('../_lib/test-helper').testName(__filename, 3), function () {
});
}
- it.only('starts the cluster internal first, connects a client to the local instance, and is able to access the remote component via the broker, check we cannot access denied methods', function(done) {
+ it('starts the cluster internal first, connects a client to the local instance, and is able to access the remote component via the broker, check we cannot access denied methods', function(done) {
var thisClient;
|
test: removed only from test <I>
|
happner_happner-cluster
|
train
|
js
|
6584c8b7849502ba34ee8309481e555c7cb7a76c
|
diff --git a/src/InfoViz/Native/HistogramSelector/index.js b/src/InfoViz/Native/HistogramSelector/index.js
index <HASH>..<HASH> 100644
--- a/src/InfoViz/Native/HistogramSelector/index.js
+++ b/src/InfoViz/Native/HistogramSelector/index.js
@@ -674,8 +674,7 @@ function histogramSelector(publicAPI, model) {
model.container = element;
if (model.container !== null) {
- const cSel = d3.select(model.container)
- .style('overflow-y', 'hidden');
+ const cSel = d3.select(model.container);
createHeader(cSel);
// wrapper height is set insize resize()
const wrapper = cSel.append('div')
|
fix(HistogramSelector): Prevent HistogramSelector from editing its container style element
|
Kitware_paraviewweb
|
train
|
js
|
fbd915622b24f9e15e3ce294ef0a088e523b319f
|
diff --git a/src/commands/sites/sites-create.js b/src/commands/sites/sites-create.js
index <HASH>..<HASH> 100644
--- a/src/commands/sites/sites-create.js
+++ b/src/commands/sites/sites-create.js
@@ -50,7 +50,7 @@ const getSiteNameInput = async (name, user, api) => {
validate: (input) => /^[a-zA-Z\d-]+$/.test(input) || 'Only alphanumeric characters and hyphens are allowed',
},
])
- name = nameInput
+ name = nameInput || siteSuggestion
}
return { name, siteSuggestion }
|
fix: make site suggestion flow consistent (#<I>)
|
netlify_cli
|
train
|
js
|
4810fc17fb27fb1b63a721ce7f9f731539ea0e39
|
diff --git a/index.js b/index.js
index <HASH>..<HASH> 100644
--- a/index.js
+++ b/index.js
@@ -22,8 +22,8 @@ function hash(filepath, bits, format) {
resolve(imageFromBuffer(content));
});
})
- .then(image => hashRaw(getImageData(image), bits))
- .then(hexHash => {
+ .then((image) => hashRaw(getImageData(image), bits))
+ .then((hexHash) => {
if (format === "hex") return hexHash;
if (format === "binary") return hexToBinary(hexHash);
});
@@ -56,7 +56,7 @@ function hexToBinary(s) {
C: "1100",
D: "1101",
E: "1110",
- F: "1111"
+ F: "1111",
};
let ret = "";
for (let i = 0; i < s.length; i++) {
@@ -82,7 +82,7 @@ function binaryToHex(s) {
"1100": "c",
"1101": "d",
"1110": "e",
- "1111": "f"
+ "1111": "f",
};
let ret = "";
for (let i = 0; i < s.length; i += 4) {
@@ -96,5 +96,5 @@ module.exports = {
hash,
hashRaw,
hexToBinary,
- binaryToHex
+ binaryToHex,
};
|
fix(chore): prettier check
|
pwlmaciejewski_imghash
|
train
|
js
|
d29e5269ed80fb75afa4e6e31d44049187de9697
|
diff --git a/src/playbacks/hls/hls.js b/src/playbacks/hls/hls.js
index <HASH>..<HASH> 100644
--- a/src/playbacks/hls/hls.js
+++ b/src/playbacks/hls/hls.js
@@ -115,7 +115,7 @@ export default class HLS extends HTML5VideoPlayback {
this._extrapolatedWindowNumSegments = !this.options.playback || typeof (this.options.playback.extrapolatedWindowNumSegments) === 'undefined' ? 2 : this.options.playback.extrapolatedWindowNumSegments
this._playbackType = Playback.VOD
- this._lastTimeUpdate = null
+ this._lastTimeUpdate = { current: 0, total: 0 }
this._lastDuration = null
// for hls streams which have dvr with a sliding window,
// the content at the start of the playlist is removed as new
@@ -143,7 +143,6 @@ export default class HLS extends HTML5VideoPlayback {
// #EXT-X-PLAYLIST-TYPE
this._playlistType = null
this._recoverAttemptsRemaining = this.options.hlsRecoverAttempts || 16
- this._startTimeUpdateTimer()
}
_setup() {
@@ -354,6 +353,7 @@ export default class HLS extends HTML5VideoPlayback {
this._setup()
super.play()
+ this._startTimeUpdateTimer()
}
pause() {
|
refactor(hls): change _lasTimeUpdate initial value
|
clappr_clappr
|
train
|
js
|
d5a11561316d743f5d5875210e00e924b47e585e
|
diff --git a/src/widgets/star-rating/star-rating.js b/src/widgets/star-rating/star-rating.js
index <HASH>..<HASH> 100644
--- a/src/widgets/star-rating/star-rating.js
+++ b/src/widgets/star-rating/star-rating.js
@@ -29,7 +29,8 @@ starRating({
/**
* Instantiate a list of refinements based on a rating attribute
- * The underlying attribute needs to have values from 0 to N
+ * The ratings must be integer values. You can still keep the precise float value in another attribute
+ * to be used in the custom ranking configuration. So that the actual hits ranking is precise.
* @function starRating
* @param {string|DOMElement} options.container CSS Selector or DOMElement to insert the widget
* @param {string} options.attributeName Name of the attribute for filtering
|
docs(star-rating): ratings must be integers
fixes #<I>
this is a documentation hotfix
|
algolia_instantsearch.js
|
train
|
js
|
929109a0907fabc9a23cd1295bda9e48f307b46e
|
diff --git a/lib/interceptor.js b/lib/interceptor.js
index <HASH>..<HASH> 100644
--- a/lib/interceptor.js
+++ b/lib/interceptor.js
@@ -17,12 +17,12 @@ class RowProcessorInterceptor extends Interceptor {
parserFactory(config, true);
}
- static get type() {
+ static get name() {
return "data-processor-row";
}
get type() {
- return RowProcessorInterceptor.type;
+ return RowProcessorInterceptor.name;
}
receive(request, oldRequest) {
|
fix(interceptor): Fix the name and type of the interceptor
|
Kronos-Integration_kronos-interceptor-object-data-processor-row
|
train
|
js
|
e3417eeb9d73450a6fa64462888903e9679e12c7
|
diff --git a/tasks/lib/changelog.js b/tasks/lib/changelog.js
index <HASH>..<HASH> 100755
--- a/tasks/lib/changelog.js
+++ b/tasks/lib/changelog.js
@@ -162,8 +162,6 @@ var writeChangelog = function(stream, commits, version) {
breaks: {}
};
- sections.breaks[EMPTY_COMPONENT] = [];
-
commits.forEach(function(commit) {
var section = sections[commit.type];
var component = commit.component || EMPTY_COMPONENT;
@@ -174,6 +172,8 @@ var writeChangelog = function(stream, commits, version) {
}
commit.breaks.forEach(function(breakMsg) {
+ sections.breaks[EMPTY_COMPONENT] = sections.breaks[EMPTY_COMPONENT] || [];
+
sections.breaks[EMPTY_COMPONENT].push({
subject: breakMsg,
hash: commit.hash,
|
chore(changelog): avoid writing empty sections
|
karma-runner_karma
|
train
|
js
|
66fd752f6c0ed2ce961c34e5a8696cbab89a8cce
|
diff --git a/src/Leevel/Support/Dto.php b/src/Leevel/Support/Dto.php
index <HASH>..<HASH> 100644
--- a/src/Leevel/Support/Dto.php
+++ b/src/Leevel/Support/Dto.php
@@ -81,7 +81,7 @@ abstract class Dto implements IArray, ArrayAccess
throw new TypeError($e);
}
- // 遍历所有属性会校验所有属性值是否初始化
+ // 遍历校验所有公共属性值是否初始化
$this->all();
}
|
refactor(support): Refact comment of dto
|
hunzhiwange_framework
|
train
|
php
|
ef97274b250afd610807d087e6dbf6700afe2ced
|
diff --git a/lib/client/live_reload.js b/lib/client/live_reload.js
index <HASH>..<HASH> 100644
--- a/lib/client/live_reload.js
+++ b/lib/client/live_reload.js
@@ -3,8 +3,7 @@
// Detects changes in client files and sends an event to connected browsers instructing them to refresh the page
'use strict';
-var chokidar, consoleMessage, cssExtensions, lastRun, pathlib, log,
- __indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) {return i;}} return -1; };
+var chokidar, consoleMessage, cssExtensions, lastRun, pathlib, log;
require('colors');
@@ -60,7 +59,7 @@ module.exports = function(ss, options) {
//
onChange = function (path) {
var action, _ref;
- action = (_ref = pathlib.extname(path), __indexOf.call(cssExtensions, _ref) >= 0) ? 'updateCSS' : 'reload';
+ action = (_ref = pathlib.extname(path), cssExtensions.indexOf(_ref) >= 0) ? 'updateCSS' : 'reload';
if ((Date.now() - lastRun[action]) > 1000) { // Reload browser max once per second
log.info('✎'.green, consoleMessage[action].grey);
ss.publish.all('__ss:' + action);
|
perf(array): indexOf direct call
No need to support Node JS without Array.indexOf
|
socketstream_socketstream
|
train
|
js
|
7cd8c044ef29f10ec6e1f47430237fb0232d25ee
|
diff --git a/addon/-private/radar/models/radar.js b/addon/-private/radar/models/radar.js
index <HASH>..<HASH> 100644
--- a/addon/-private/radar/models/radar.js
+++ b/addon/-private/radar/models/radar.js
@@ -286,7 +286,7 @@ export default class Radar {
this._nextScroll = undefined;
this._nextAdjustment = undefined;
- this._scrollHandler = run.bind(this, () => {
+ this._scrollHandler = run.bind(this, (offsets) => {
if (this.isTracking) {
this._nextScroll = run.scheduleOnce('sync', this, this.filterMovement, offsets);
}
@@ -294,8 +294,8 @@ export default class Radar {
this._resizeHandler = run.bind(this, () => {
this._nextResize = run.debounce(this, this.resizeSatellites, this.resizeDebounce);
});
- this._scrollAdjuster = run.bind(this, () => {
- this._nextAdjustment = run.scheduleOnce('sync', this, this.updateScrollPosition);
+ this._scrollAdjuster = run.bind(this, (offsets) => {
+ this._nextAdjustment = run.scheduleOnce('sync', this, this.updateScrollPosition, offsets);
});
let handlerOpts = SUPPORTS_PASSIVE ? { capture: true, passive: true } : true;
|
fix(radar): resolves conflicts from last merge
|
html-next_vertical-collection
|
train
|
js
|
48cf001461ec7fded47872a6f22482df18d01c5c
|
diff --git a/controller/clusterinfoupdater.go b/controller/clusterinfoupdater.go
index <HASH>..<HASH> 100644
--- a/controller/clusterinfoupdater.go
+++ b/controller/clusterinfoupdater.go
@@ -123,7 +123,7 @@ func (c *clusterInfoUpdater) updateClusterInfo(cluster appv1.Cluster, info *cach
} else {
clusterInfo.ConnectionState.Status = appv1.ConnectionStatusUnknown
if appCount == 0 {
- clusterInfo.ConnectionState.Message = "Cluster has no application and not being monitored."
+ clusterInfo.ConnectionState.Message = "Cluster has no applications and is not being monitored."
}
}
|
fix: Minor cleanup for app errors #<I> (#<I>)
First timer commit to fix a gramma issue
|
argoproj_argo-cd
|
train
|
go
|
637aee4424e26ffce2bb1398e2a587b0ce1d6d94
|
diff --git a/lib/producer/topic_publish_info.js b/lib/producer/topic_publish_info.js
index <HASH>..<HASH> 100644
--- a/lib/producer/topic_publish_info.js
+++ b/lib/producer/topic_publish_info.js
@@ -5,7 +5,7 @@ class TopicPublishInfo {
this.orderTopic = false;
this.haveTopicRouterInfo = false;
this.messageQueueList = [];
- this.sendWhichQueue = 0;
+ this.sendWhichQueue = Math.floor(Math.random() * Math.floor(Math.pow(2, 31))); // 打散 queue 选择起点
}
/**
@@ -36,6 +36,9 @@ class TopicPublishInfo {
return null;
}
index = this.sendWhichQueue++;
+ if (!Number.isSafeInteger(this.sendWhichQueue)) {
+ this.sendWhichQueue = 0; // 超出安全范围,重置为 0
+ }
pos = Math.abs(index) % this.messageQueueList.length;
return this.messageQueueList[pos];
}
|
fix: random-publish-queue-select-start-point (#<I>)
* fix: random-publish-queue-select-start-point
* fix: sendWhichQueue may exceed MAX_SAEF_INTEGER
|
ali-sdk_ali-ons
|
train
|
js
|
5157c6f425e8c996d2519b1dc3b593050dac2751
|
diff --git a/lib/app/app.js b/lib/app/app.js
index <HASH>..<HASH> 100644
--- a/lib/app/app.js
+++ b/lib/app/app.js
@@ -76,9 +76,9 @@ export function createApp () {
})
const options = {}
-
- themeEnhanceApp({ Vue, options, router })
- enhanceApp({ Vue, options, router })
+
+ themeEnhanceApp({ Vue, options, router, siteData })
+ enhanceApp({ Vue, options, router, siteData })
const app = new Vue(
Object.assign(options, {
|
feat: also expose siteData in enhanceApp.js
|
vuejs_vuepress
|
train
|
js
|
71924f4b9e0da01af0d6b063e2165284cf943931
|
diff --git a/src/js/plugins/forward.js b/src/js/plugins/forward.js
index <HASH>..<HASH> 100644
--- a/src/js/plugins/forward.js
+++ b/src/js/plugins/forward.js
@@ -73,7 +73,7 @@ class Forward extends BaseComponent {
*/
const toggles = SelectorEngine.find(SELECTOR_TOGGLE)
toggles.forEach((toggle) => {
- EventHandler.on(toggle, EVENT_CLICK_DATA_API, (evt) => {
+ EventHandler.one(toggle, EVENT_CLICK_DATA_API, (evt) => {
evt.preventDefault()
const forward = Forward.getOrCreateInstance(toggle)
forward.goToTarget()
|
chore(core): changes for forward activation
|
italia_bootstrap-italia
|
train
|
js
|
df65f0d4c325782f62fc4b48b30a22fcb0c04962
|
diff --git a/lib/tunnel.js b/lib/tunnel.js
index <HASH>..<HASH> 100644
--- a/lib/tunnel.js
+++ b/lib/tunnel.js
@@ -77,7 +77,14 @@ function tunnelProxy(server, proxy) {
return true;
};
var isIntercept = function() {
- return isLocalUIUrl || (!isDisabeIntercept() && isEnableIntercept());
+ if (isLocalUIUrl || (!isDisabeIntercept() && isEnableIntercept())) {
+ return true;
+ }
+ if (!isIPHost || disable.captureIp || disable.captureIP) {
+ return false;
+ }
+ var enable = req.enable;
+ return (isWebPort && enable.captureIp) || enable.captureIP;
};
var plugin = !isIntercept() && pluginMgr.resolveWhistlePlugins(req);
var handlePluginRules = function(_rulesMgr) {
|
feat: add enable://captureIp to capture the connect which the hostname is ip
|
avwo_whistle
|
train
|
js
|
14d65f4ae88b9c7d30291464e0f0638237aadc75
|
diff --git a/src/sagemaker/_studio.py b/src/sagemaker/_studio.py
index <HASH>..<HASH> 100644
--- a/src/sagemaker/_studio.py
+++ b/src/sagemaker/_studio.py
@@ -46,6 +46,7 @@ def _append_project_tags(tags=None, working_dir=None):
return tags
all_tags = tags or []
+ additional_tags = [tag for tag in additional_tags if tag not in all_tags]
all_tags.extend(additional_tags)
return all_tags
diff --git a/tests/unit/sagemaker/test_studio.py b/tests/unit/sagemaker/test_studio.py
index <HASH>..<HASH> 100644
--- a/tests/unit/sagemaker/test_studio.py
+++ b/tests/unit/sagemaker/test_studio.py
@@ -94,3 +94,11 @@ def test_append_project_tags(tmpdir):
{"Key": "sagemaker:project-id", "Value": "proj-1234"},
{"Key": "sagemaker:project-name", "Value": "proj-name"},
]
+
+ tags = _append_project_tags(
+ [{"Key": "sagemaker:project-id", "Value": "proj-1234"}], working_dir
+ )
+ assert tags == [
+ {"Key": "sagemaker:project-id", "Value": "proj-1234"},
+ {"Key": "sagemaker:project-name", "Value": "proj-name"},
+ ]
|
fix: remove duplicated tags in _append_project_tags (#<I>)
|
aws_sagemaker-python-sdk
|
train
|
py,py
|
e3b62790113cbc760439d3764b5066cebad714be
|
diff --git a/src/Notifier.php b/src/Notifier.php
index <HASH>..<HASH> 100644
--- a/src/Notifier.php
+++ b/src/Notifier.php
@@ -146,7 +146,7 @@ class Notifier
private function newHTTPClient()
{
if (array_key_exists('httpClient', $this->opt)) {
- if ($this->opt['httpClient'] instanceof GuzzleHttp\ClientInterface) {
+ if ($this->opt['httpClient'] instanceof \GuzzleHttp\ClientInterface) {
return $this->opt['httpClient'];
}
throw new Exception('phpbrake: httpClient must implement GuzzleHttp\ClientInterface');
|
fix: http client type check in notifier
|
airbrake_phpbrake
|
train
|
php
|
90a3d8588046b6117bcb8448620f74ec91cc0fab
|
diff --git a/redis/pool.go b/redis/pool.go
index <HASH>..<HASH> 100644
--- a/redis/pool.go
+++ b/redis/pool.go
@@ -381,21 +381,17 @@ func (p *Pool) waitVacantConn(ctx context.Context) (waited time.Duration, err er
start = time.Now()
}
- if ctx == nil {
- <-p.ch
- } else {
+ select {
+ case <-p.ch:
+ // Additionally check that context hasn't expired while we were waiting,
+ // because `select` picks a random `case` if several of them are "ready".
select {
- case <-p.ch:
- // Additionally check that context hasn't expired while we were waiting,
- // because `select` picks a random `case` if several of them are "ready".
- select {
- case <-ctx.Done():
- return 0, ctx.Err()
- default:
- }
case <-ctx.Done():
return 0, ctx.Err()
+ default:
}
+ case <-ctx.Done():
+ return 0, ctx.Err()
}
if wait {
|
chore: Remove unneeded ctx == nil check (#<I>)
Remove an check for ctx being nil which is no longer possible.
|
gomodule_redigo
|
train
|
go
|
e87c5bc2d91e1794daff02598aadd46c9fb18ffa
|
diff --git a/index.js b/index.js
index <HASH>..<HASH> 100644
--- a/index.js
+++ b/index.js
@@ -194,7 +194,13 @@ class ServerlessIotLocal {
const client = mqtt.connect(`ws://localhost:${httpPort}/mqqt`)
client.on('error', console.error)
+
+ const connectMonitor = setInterval(() => {
+ this.log(`still haven't connected to local Iot broker!`)
+ }, 5000).unref()
+
client.on('connect', () => {
+ clearInterval(connectMonitor)
this.log('connected to local Iot broker')
for (let topicMatcher in topicsToFunctionsMap) {
client.subscribe(topicMatcher)
|
feat: monitor initial connection to broker, log if unable to connect
|
tradle_serverless-iot-local
|
train
|
js
|
da2b7cd97a73191d9bd219718e8e5d9370ef12df
|
diff --git a/MANIFEST.in b/MANIFEST.in
index <HASH>..<HASH> 100644
--- a/MANIFEST.in
+++ b/MANIFEST.in
@@ -24,4 +24,4 @@ graft mishmash/web
graft mishmash/alembic
recursive-include mishmash *.ini
-prune etc
+prune docker
diff --git a/mishmash/__about__.py b/mishmash/__about__.py
index <HASH>..<HASH> 100644
--- a/mishmash/__about__.py
+++ b/mishmash/__about__.py
@@ -1,7 +1,7 @@
# -*- coding: utf-8 -*-
from collections import namedtuple
-__version__ = "0.2.0-b5"
+__version__ = "0.2-b5"
__release_name__ = ""
__years__ = "2013-2017"
diff --git a/mishmash/commands/info.py b/mishmash/commands/info.py
index <HASH>..<HASH> 100644
--- a/mishmash/commands/info.py
+++ b/mishmash/commands/info.py
@@ -5,7 +5,6 @@ from pyfiglet import figlet_format
from sqlalchemy.exc import ProgrammingError, OperationalError
# FIXME: replace thise console utils with nicfit.console
from eyed3.utils.console import printError
-from eyed3.utils.console import cprint, cformat
from .. import version
from ..core import Command
from ..orm import Track, Artist, Album, Meta, Tag, Library, NULL_LIB_ID
|
fix: manifest file updates for docker
|
nicfit_MishMash
|
train
|
in,py,py
|
da47d2aecafe77e4571e07644fdc174c9602807c
|
diff --git a/src/providers/subdb.js b/src/providers/subdb.js
index <HASH>..<HASH> 100644
--- a/src/providers/subdb.js
+++ b/src/providers/subdb.js
@@ -12,7 +12,7 @@ const SUBDB_API_URL = 'http://api.thesubdb.com'
* @returns {Promise<string>} the subtitles, formatted as .srt
*/
async function getSubtitles (file) {
- const digest = await computeHash(file)
+ const digest = await hash(file)
return getSubtitlesByHash(digest)
}
@@ -45,7 +45,7 @@ async function getSubtitlesByHash (hash) {
* @returns {Promise<string>} a hex string representing the MD5 digest of the
* first 64kB and the last 64kB of the given file
*/
-async function computeHash (file) {
+async function hash (file) {
const filesize = await fileUtil.getFileSize(file)
const chunkSize = 64 * 1024
|
refactor: rename function
|
BeLi4L_subz-hero
|
train
|
js
|
cb9ce1e791abac7fcb2eb784bf54affbb26a00ae
|
diff --git a/npm_scripts/release.js b/npm_scripts/release.js
index <HASH>..<HASH> 100644
--- a/npm_scripts/release.js
+++ b/npm_scripts/release.js
@@ -67,6 +67,6 @@ stdin.question(`Next version (current is ${currentVersion})? `, (nextVersion) =>
// Go back from whence you came
exec(`git checkout ${branchName}`);
-});
+ stdin.close();
-stdin.close();
+});
|
chore: Fix closing of stdin.
|
Pearson-Higher-Ed_compounds
|
train
|
js
|
19df4f7b1265405e4f2c6ae8705af5ceae7796d4
|
diff --git a/packages/react/src/components/Switch/Switch.js b/packages/react/src/components/Switch/Switch.js
index <HASH>..<HASH> 100644
--- a/packages/react/src/components/Switch/Switch.js
+++ b/packages/react/src/components/Switch/Switch.js
@@ -56,7 +56,9 @@ const Switch = React.forwardRef(function Switch(props, tabRef) {
aria-selected={selected}
{...other}
{...commonProps}>
- <span className={`${prefix}--content-switcher__label`}>{text}</span>
+ <span className={`${prefix}--content-switcher__label`} title={text}>
+ {text}
+ </span>
</button>
);
});
|
fix(ContentSwitcher): enable title by default (#<I>)
|
carbon-design-system_carbon-components
|
train
|
js
|
1f71dfb2f8a3d43336b4a0ecbfb749393e39083d
|
diff --git a/pyvisa/highlevel.py b/pyvisa/highlevel.py
index <HASH>..<HASH> 100644
--- a/pyvisa/highlevel.py
+++ b/pyvisa/highlevel.py
@@ -1035,7 +1035,8 @@ class VisaLibraryBase(object):
return (ResourceInfo(parsed.interface_type_const,
parsed.board,
- parsed.resource_class, None, None),
+ parsed.resource_class,
+ str(parsed), None),
constants.StatusCode.success)
except ValueError:
return 0, constants.StatusCode.error_invalid_resource_name
|
fix(highlevel): added resource_name to parse_resource_extended
Using ResourceManager.resource_info returned inconsistent results
between the NI-VISA backend vs other backends which didn't extend
visalib.parse_resource_extended (e.g. PyVISA-sim) and code relying
on the "normalization" behavior of resource_info.resource_name
would not work.
|
pyvisa_pyvisa
|
train
|
py
|
5324150ff43ea590c6eead5f50c447872d83ff14
|
diff --git a/lib/ditty/models/user.rb b/lib/ditty/models/user.rb
index <HASH>..<HASH> 100644
--- a/lib/ditty/models/user.rb
+++ b/lib/ditty/models/user.rb
@@ -57,7 +57,9 @@ module Ditty
end
def username
- identity_dataset.first.username
+ identity = identity_dataset.first
+ return identity.username if identity
+ email
end
class << self
|
fix: Default to email as username if the user has no identity
|
EagerELK_ditty
|
train
|
rb
|
123d29b9be4abcdba6f0fa0a1d3aa56a838091e6
|
diff --git a/frontend/src/component/menu/routes.js b/frontend/src/component/menu/routes.js
index <HASH>..<HASH> 100644
--- a/frontend/src/component/menu/routes.js
+++ b/frontend/src/component/menu/routes.js
@@ -1,4 +1,3 @@
-import CreateFeatureToggle from '../../page/features/create';
import CopyFeatureToggle from '../../page/features/copy';
import ViewFeatureToggle from '../../page/features/show';
import Features from '../../page/features';
|
fix: remove unused component in routes
|
Unleash_unleash
|
train
|
js
|
e6df315ee87138a08aa75b5fcfdce504d5a0aa4c
|
diff --git a/lib/skeleton.js b/lib/skeleton.js
index <HASH>..<HASH> 100644
--- a/lib/skeleton.js
+++ b/lib/skeleton.js
@@ -4,6 +4,12 @@ var Promise = require('bluebird');
var lpad = require('./util').lpad;
var Class = require('./class');
+function isPromise( probe ) {
+
+ return probe instanceof Promise || ( probe && probe.then &&
+ probe.constructor && probe.constructor.name === 'Promise' );
+}
+
function formatPath(dir, name) {
return path.join(dir, name);
}
@@ -75,7 +81,7 @@ var Skeleton = Class.extend({
migration = require(this.path).up.apply(this, params);
if( migration === null ) migration = Promise.resolve();
- if( migration instanceof Promise ) {
+ if( isPromise( migration ) ) {
migration
.then(function() {
@@ -118,7 +124,7 @@ var Skeleton = Class.extend({
migration = require(this.path).down.apply(this, params);
if( migration === null ) migration = Promise.resolve();
- if( migration instanceof Promise ) {
+ if( isPromise( migration ) ) {
migration
.then(function() {
|
refactor(migration): Make check for promise more reliable
|
db-migrate_node-db-migrate
|
train
|
js
|
fee988a88bc6abe07d01535fa87f946f353f01e1
|
diff --git a/packages/node_modules/@webex/internal-plugin-flag/src/flag.js b/packages/node_modules/@webex/internal-plugin-flag/src/flag.js
index <HASH>..<HASH> 100644
--- a/packages/node_modules/@webex/internal-plugin-flag/src/flag.js
+++ b/packages/node_modules/@webex/internal-plugin-flag/src/flag.js
@@ -1,7 +1,7 @@
/*!
* Copyright (c) 2015-2019 Cisco Systems, Inc. See LICENSE file.
*/
-
+import {flatten} from 'lodash';
import {WebexPlugin} from '@webex/webex-core';
const Flag = WebexPlugin.extend({
@@ -131,7 +131,7 @@ const Flag = WebexPlugin.extend({
})
);
- return responses.flat();
+ return flatten(responses);
},
/**
|
fix(flag): 'flat' isn't available everywhere
|
webex_spark-js-sdk
|
train
|
js
|
40f5351ed9a8e41cb1fb1765aeb6a5b5a39f4913
|
diff --git a/lib/config/postcss.js b/lib/config/postcss.js
index <HASH>..<HASH> 100644
--- a/lib/config/postcss.js
+++ b/lib/config/postcss.js
@@ -118,8 +118,8 @@ module.exports = function (options, webpackConfig) {
onSaveSpritesheet: spritesOnSaveSpritesheet
}
}),
- discernFontSVG(),
- postcssIconFont(svg2fontOptions)
+ postcssIconFont(svg2fontOptions),
+ discernFontSVG()
];
};
};
@@ -142,7 +142,7 @@ function discernFontSVG() {
searchValue = '.svg';
index = decl.value.indexOf(searchValue);
if (index > -1) {
- decl.value = strSplice(decl.value, index + searchValue.length, 0, '__font');
+ decl.value = strSplice(decl.value, index + searchValue.length, 0, '?__font');
return false;
}
}
|
refactor: postcss插件执行顺序更新
|
zuzucheFE_guido
|
train
|
js
|
f42711f98198a4390b2843e0e66ef5e83cd9c852
|
diff --git a/lib/plugin.js b/lib/plugin.js
index <HASH>..<HASH> 100644
--- a/lib/plugin.js
+++ b/lib/plugin.js
@@ -156,8 +156,7 @@ class Client {
sse,
routingRules,
manageResources,
- tags,
- prefixText;
+ tags;
return this._validateConfig()
.then(() => {
@@ -189,17 +188,15 @@ class Client {
routingRules = this.options.routingRules || null;
tags = this.options.tags || [];
- if (keyPrefix) {
- prefixText = `under the prefix '${keyPrefix}'`;
- }
-
const deployDescribe = ['This deployment will:'];
if (this.cliOptions['delete-contents']) {
deployDescribe.push(`- Remove all existing files from bucket '${bucketName}'`);
}
deployDescribe.push(
- `- Upload all files from '${distributionFolder}' to bucket '${bucketName}' ${prefixText}`
+ `- Upload all files from '${distributionFolder}' to bucket '${bucketName}'${
+ keyPrefix ? ` under the prefix '${keyPrefix}'` : ''
+ }`
);
if (this.cliOptions['config-change'] !== false && manageResources !== false) {
|
fix(log): don't log undefined string
|
fernando-mc_serverless-finch
|
train
|
js
|
eb260436d6c9ab39145b4da95fc085e04b4cfa9a
|
diff --git a/task/backend/inmem_store.go b/task/backend/inmem_store.go
index <HASH>..<HASH> 100644
--- a/task/backend/inmem_store.go
+++ b/task/backend/inmem_store.go
@@ -286,7 +286,10 @@ func (s *inmem) CreateNextRun(ctx context.Context, taskID platform.ID, now int64
// FinishRun removes runID from the list of running tasks and if its `now` is later then last completed update it.
func (s *inmem) FinishRun(ctx context.Context, taskID, runID platform.ID) error {
+ s.mu.RLock()
stm, ok := s.runners[taskID.String()]
+ s.mu.RUnlock()
+
if !ok {
return errors.New("taskRunner not found")
}
|
fix(task): remove race condition when finishing a inmem run (#<I>)
* fix(task): remove race condition when finishing a inmem run
|
influxdata_influxdb
|
train
|
go
|
b59c6eafaf8ac5671d10edd909b5acd628d0d237
|
diff --git a/src/client/virgil-client.js b/src/client/virgil-client.js
index <HASH>..<HASH> 100644
--- a/src/client/virgil-client.js
+++ b/src/client/virgil-client.js
@@ -111,6 +111,9 @@ function createVirgilClient(accessToken, options) {
return cardsReadOnlyClient.search(criteria)
.then(function (response) {
+ if (response.data === null) {
+ return [];
+ }
return response.data.map(CardModel.import);
})
.then(function (cards) {
|
fix: handle null response in virgilClient#searchCards
|
VirgilSecurity_virgil-sdk-javascript
|
train
|
js
|
6e1a7238f896578200bfecc2cb20528661ba8498
|
diff --git a/packages/node_modules/@webex/internal-plugin-mercury/test/unit/spec/mercury.js b/packages/node_modules/@webex/internal-plugin-mercury/test/unit/spec/mercury.js
index <HASH>..<HASH> 100644
--- a/packages/node_modules/@webex/internal-plugin-mercury/test/unit/spec/mercury.js
+++ b/packages/node_modules/@webex/internal-plugin-mercury/test/unit/spec/mercury.js
@@ -68,7 +68,6 @@ describe('plugin-mercury', () => {
webex.internal.device = {
register: sinon.stub().returns(Promise.resolve()),
refresh: sinon.stub().returns(Promise.resolve()),
- markUrlFailedAndGetNew: sinon.stub().returns(Promise.resolve()),
webSocketUrl: 'ws://example.com',
getWebSocketUrl: sinon.stub().returns(Promise.resolve('ws://example-2.com')),
useServiceCatalogUrl: sinon.stub().returns(Promise.resolve('https://service-catalog-url.com'))
|
test(internal-plugin-mercury): update stubs
Update the stubs in the mercury plugin tests to no longer
target device#markUrlFailedAndGetNew().
|
webex_spark-js-sdk
|
train
|
js
|
27e8b645033ae176c768566b794d65c98c6802e5
|
diff --git a/packages/workflow/webpack.config.production.js b/packages/workflow/webpack.config.production.js
index <HASH>..<HASH> 100644
--- a/packages/workflow/webpack.config.production.js
+++ b/packages/workflow/webpack.config.production.js
@@ -69,6 +69,12 @@ const plugin = (settings) => {
idHint: 'vendors',
chunks: 'all',
priority: 1
+ },
+ moment: {
+ test: /[/\\]node_modules[/\\](moment)[/\\]/,
+ idHint: 'vendors',
+ chunks: 'all',
+ priority: 2
}
// TODO: re-implement cacheGroups for styles?
// TODO: Add cacheGroup for Availity packages in node_modules ?
diff --git a/packages/workflow/webpack.config.profile.js b/packages/workflow/webpack.config.profile.js
index <HASH>..<HASH> 100644
--- a/packages/workflow/webpack.config.profile.js
+++ b/packages/workflow/webpack.config.profile.js
@@ -56,6 +56,12 @@ const plugin = (settings) => {
idHint: 'vendors',
chunks: 'all',
priority: 1
+ },
+ moment: {
+ test: /[/\\]node_modules[/\\](moment)[/\\]/,
+ idHint: 'vendors',
+ chunks: 'all',
+ priority: 2
}
// TODO: re-implement cacheGroups for styles?
// TODO: Add cacheGroup for Availity packages in node_modules ?
|
feat(workflow): add a cacheGroup for moment
|
Availity_availity-workflow
|
train
|
js,js
|
82f1502ba5f96284c48c6587b594bf49aa41ab78
|
diff --git a/scripts/release.js b/scripts/release.js
index <HASH>..<HASH> 100644
--- a/scripts/release.js
+++ b/scripts/release.js
@@ -66,9 +66,6 @@ function updateLockfile(opts = {}) {
// Merge the "yarn.lock" changes into the version commit.
exec(`git add yarn.lock`)
exec(`git commit --amend --no-edit`)
-
- // Ensure the "dist" directories are in good condition.
- exec(`yarn prepare`)
}
function exec(cmd, { silent } = {}) {
|
chore: remove extraneous "yarn prepare" call
|
react-spring_react-spring
|
train
|
js
|
70c06aca1636b525b51ec5d26a7e4e4297c4ee05
|
diff --git a/cmd/telegraf/telegraf.go b/cmd/telegraf/telegraf.go
index <HASH>..<HASH> 100644
--- a/cmd/telegraf/telegraf.go
+++ b/cmd/telegraf/telegraf.go
@@ -262,7 +262,7 @@ func runAgent(ctx context.Context,
log.Printf("I! Loaded aggregators: %s", strings.Join(c.AggregatorNames(), " "))
log.Printf("I! Loaded processors: %s", strings.Join(c.ProcessorNames(), " "))
if !*fRunOnce && (*fTest || *fTestWait != 0) {
- log.Print(color.RedString("W! Outputs are not used in testing mode!"))
+ log.Print("W! " + color.RedString("Outputs are not used in testing mode!"))
} else {
log.Printf("I! Loaded outputs: %s", strings.Join(c.OutputNames(), " "))
}
|
fix: warning output when running with --test (#<I>)
|
influxdata_telegraf
|
train
|
go
|
0f5d526a66f180f441a6c408348228054a97476b
|
diff --git a/hawtio-system/src/main/java/io/hawt/web/proxy/ProxyDetails.java b/hawtio-system/src/main/java/io/hawt/web/proxy/ProxyDetails.java
index <HASH>..<HASH> 100644
--- a/hawtio-system/src/main/java/io/hawt/web/proxy/ProxyDetails.java
+++ b/hawtio-system/src/main/java/io/hawt/web/proxy/ProxyDetails.java
@@ -32,7 +32,7 @@ public class ProxyDetails implements ProxyAddress {
public static final String USER_PARAM = "_user";
public static final String PWD_PARAM = "_pwd";
- private static Set<String> ignoreHeaderNames = new HashSet<String>(Arrays.asList(USER_PARAM, PWD_PARAM, "_url", "url"));
+ private static final Set<String> ignoreHeaderNames = new HashSet<>(Arrays.asList(USER_PARAM, PWD_PARAM, "_url", "url"));
public ProxyDetails(HttpServletRequest httpServletRequest) {
this(httpServletRequest.getPathInfo());
@@ -66,10 +66,6 @@ public class ProxyDetails implements ProxyAddress {
public ProxyDetails(String pathInfo) {
hostAndPort = pathInfo.replace(" ", "%20");
- if (hostAndPort == null) {
- return;
- }
-
while (hostAndPort.startsWith("/")) {
hostAndPort = hostAndPort.substring(1);
}
|
refactor(hawtio-system): small refactoring
|
hawtio_hawtio
|
train
|
java
|
2cbe6cdfd816eab82a697ae9d3620d2d9c897d0e
|
diff --git a/build.go b/build.go
index <HASH>..<HASH> 100644
--- a/build.go
+++ b/build.go
@@ -210,7 +210,7 @@ func createPackage(options linuxPackageOptions) {
// copy sample ini file to /etc/grafana
runPrint("cp", "conf/sample.ini", filepath.Join(packageRoot, options.configFilePath))
// copy sample ldap toml config file to /etc/grafana/ldap.toml
- runPrint("cp", "conf/sample.ini", filepath.Join(packageRoot, ldapFilePath))
+ runPrint("cp", "conf/sample.ini", filepath.Join(packageRoot, options.ldapFilePath))
args := []string{
"-s", "dir",
|
fix(build): fixed issue in build.go
|
grafana_grafana
|
train
|
go
|
30b0ab4a0b4e87153c0b787cc40283fc204b556e
|
diff --git a/src/components/VSelect/index.js b/src/components/VSelect/index.js
index <HASH>..<HASH> 100644
--- a/src/components/VSelect/index.js
+++ b/src/components/VSelect/index.js
@@ -28,6 +28,8 @@ const wrapper = {
}
if (props.autocomplete || props.combobox || props.tags) {
+ data.attrs.combobox = props.combobox
+ data.attrs.tags = props.tags
return h(VAutocomplete, data, children)
} else {
return h(VSelect, data, children)
|
fix(VAutocomplete): pass correct props in through the VSelect wrapper
|
vuetifyjs_vuetify
|
train
|
js
|
2f2904af6cd859faabb07ee19792e2790de41da4
|
diff --git a/actor-sdk/sdk-core/runtime/runtime-js/src/main/java/im/actor/runtime/js/websocket/WebSocketConnection.java b/actor-sdk/sdk-core/runtime/runtime-js/src/main/java/im/actor/runtime/js/websocket/WebSocketConnection.java
index <HASH>..<HASH> 100644
--- a/actor-sdk/sdk-core/runtime/runtime-js/src/main/java/im/actor/runtime/js/websocket/WebSocketConnection.java
+++ b/actor-sdk/sdk-core/runtime/runtime-js/src/main/java/im/actor/runtime/js/websocket/WebSocketConnection.java
@@ -115,7 +115,7 @@ public class WebSocketConnection extends AsyncConnection {
* @param url
*/
private native JavaScriptObject createJSWebSocket(final String url, final WebSocketConnection webSocket) /*-{
- var jsWebSocket = new WebSocket(url, ['binary']);
+ var jsWebSocket = new WebSocket(url);
jsWebSocket.binaryType = "arraybuffer"
jsWebSocket.onopen = function () {
|
fix(js): Fixing web socket initialization
|
actorapp_actor-platform
|
train
|
java
|
90c46e896de13064d3c8d5b36e0cbf1a68cccd9b
|
diff --git a/pkg/chartutil/values.go b/pkg/chartutil/values.go
index <HASH>..<HASH> 100644
--- a/pkg/chartutil/values.go
+++ b/pkg/chartutil/values.go
@@ -94,12 +94,18 @@ func tableLookup(v Values, simple string) (Values, error) {
if !ok {
return v, ErrNoTable
}
- //vv, ok := v2.(map[string]interface{})
- vv, ok := v2.(Values)
- if !ok {
- return vv, ErrNoTable
+ if vv, ok := v2.(map[string]interface{}); ok {
+ return vv, nil
+ }
+
+ // This catches a case where a value is of type Values, but doesn't (for some
+ // reason) match the map[string]interface{}. This has been observed in the
+ // wild, and might be a result of a nil map of type Values.
+ if vv, ok := v2.(Values); ok {
+ return vv, nil
}
- return vv, nil
+
+ return map[string]interface{}{}, ErrNoTable
}
// ReadValues will parse YAML byte data into a Values.
|
fix(chartutil): fix Table() method to test Values
This makes the Table() method more flexible than the original version.
It allows either a map[string]interface{} or a chartutil.Values to be
treated as a table.
|
helm_helm
|
train
|
go
|
12665d1407a45899efbe4f9fd05005085aeb93c4
|
diff --git a/censys/asm/assets/assets.py b/censys/asm/assets/assets.py
index <HASH>..<HASH> 100644
--- a/censys/asm/assets/assets.py
+++ b/censys/asm/assets/assets.py
@@ -29,6 +29,7 @@ class Assets(CensysAsmAPI):
tag: Optional[List[str]] = None,
tag_operator: Optional[str] = None,
source: Optional[List[str]] = None,
+ discovery_trail: Optional[bool] = None,
) -> Iterator[dict]:
"""Requests assets data.
@@ -38,6 +39,7 @@ class Assets(CensysAsmAPI):
tag (list): Optional; List of tags to search for.
tag_operator (str): Optional; Operator to use when searching for tags.
source (list): Optional; List of sources to search for.
+ discovery_trail (bool): Optional; Bool indicating whether to return discovery trail.
Yields:
dict: The assets result returned.
@@ -49,6 +51,8 @@ class Assets(CensysAsmAPI):
args["tagOperator"] = tag_operator
if source:
args["source"] = source
+ if discovery_trail:
+ args["discoveryTrail"] = discovery_trail
yield from self._get_page(
self.base_path, page_number=page_number, page_size=page_size, args=args
)
|
feat: Add API support for asset discovery trails
The Censys API offers a parameter that allows pulling back discovery
trails, but this parameter is not currently exposed via this library.
This commit adds support for this parameter.
|
censys_censys-python
|
train
|
py
|
929a69128ad868d3b74a4da6b4d0b2ca145eff78
|
diff --git a/tests/test_configmanager.py b/tests/test_configmanager.py
index <HASH>..<HASH> 100644
--- a/tests/test_configmanager.py
+++ b/tests/test_configmanager.py
@@ -25,6 +25,7 @@ from tests.engine_helpers import *
import autokey.model.folder
from autokey.configmanager.configmanager import ConfigManager
+import autokey.configmanager.predefined_user_files
from autokey.service import PhraseRunner
import autokey.service
from autokey.scripting import Engine
@@ -56,3 +57,9 @@ def test_item_has_same_hotkey(create_engine):
hotkey=(modifiers, key)
testHK = create_test_hotkey(engine, folder, hotkey)
assert ConfigManager.item_has_same_hotkey(testHK, modifiers, key, None)
+
+def test_create_predefined_user_files_my_phrases_folder(create_engine):
+ engine, folder = create_engine
+ # --- Setup ---
+ phrases_folder = autokey.configmanager.predefined_user_files.create_my_phrases_folder()
+ scripts_folder = autokey.configmanager.predefined_user_files.create_sample_scripts_folder()
|
test: Add tests for creating predefined_user_files
|
autokey_autokey
|
train
|
py
|
f8a0f4a1657d19e6ba3655a3c9f322c9c7400e91
|
diff --git a/benchmarks/bench.py b/benchmarks/bench.py
index <HASH>..<HASH> 100644
--- a/benchmarks/bench.py
+++ b/benchmarks/bench.py
@@ -123,10 +123,10 @@ def main(args):
else:
if args.use_green_threads:
- subprocess_args = ["dramatiq", "bench", "-p", "8"]
+ subprocess_args = ["dramatiq-gevent", "bench", "-p", "8", "-t", "250"]
else:
- subprocess_args = ["dramatiq-gevent", "bench", "-p", "8", "-t", "250"]
+ subprocess_args = ["dramatiq", "bench", "-p", "8"]
proc = subprocess.Popen(subprocess_args)
processed = 0
|
fix: handle --use-green-threads properly in bench
|
Bogdanp_dramatiq
|
train
|
py
|
d2611d42d37676514e24b3de9bbbb05731edb537
|
diff --git a/core/node/libp2p.go b/core/node/libp2p.go
index <HASH>..<HASH> 100644
--- a/core/node/libp2p.go
+++ b/core/node/libp2p.go
@@ -198,7 +198,7 @@ func makeAddrsFactory(cfg config.Addresses) (p2pbhost.AddrsFactory, error) {
if err != nil {
return nil, err
}
- noAnnAddrs[maddr.String()] = true
+ noAnnAddrs[string(maddr.Bytes())] = true
}
return func(allAddrs []ma.Multiaddr) []ma.Multiaddr {
@@ -212,7 +212,7 @@ func makeAddrsFactory(cfg config.Addresses) (p2pbhost.AddrsFactory, error) {
var out []ma.Multiaddr
for _, maddr := range addrs {
// check for exact matches
- ok := noAnnAddrs[maddr.String()]
+ ok := noAnnAddrs[string(maddr.Bytes())]
// check for /ipcidr matches
if !ok && !filters.AddrBlocked(maddr) {
out = append(out, maddr)
|
chore: avoid converting addresses to human readable strings
License: MIT
|
ipfs_go-ipfs
|
train
|
go
|
8df3dd9797c8afda79dfa99d90aadee6b0d7a093
|
diff --git a/git/remote.py b/git/remote.py
index <HASH>..<HASH> 100644
--- a/git/remote.py
+++ b/git/remote.py
@@ -50,8 +50,8 @@ def add_progress(kwargs, git, progress):
given, we do not request any progress
:return: possibly altered kwargs"""
if progress is not None:
- v = git.version_info
- if v[0] > 1 or v[1] > 7 or v[2] > 0 or v[3] > 3:
+ v = git.version_info[:2]
+ if v >= (1, 7):
kwargs['progress'] = True
# END handle --progress
# END handle progress
|
fix(remote): improve version check
Make version check much more readable, and fix it at
the same time. The previous implementation would assume
progress is supported just by looking at the patch-level
for instance.
A quick check of the git sources seems to indicate the
--progress flag exists in <I> of the git command-line
already.
Fixes #<I>
|
gitpython-developers_GitPython
|
train
|
py
|
868ad1ce2af961a9de300cfc0dcc0b0318ef716c
|
diff --git a/test/bulb/index.js b/test/bulb/index.js
index <HASH>..<HASH> 100644
--- a/test/bulb/index.js
+++ b/test/bulb/index.js
@@ -72,9 +72,9 @@ describe('Bulb', function () {
});
});
- describe('#getColorTemperatureRange get', function () {
+ describe('#colorTemperatureRange get', function () {
it('should return is_variable_color_temp from cached sysInfo if supported (LB120/LB130/KL430)', function () {
- const range = bulb.getColorTemperatureRange;
+ const range = bulb.colorTemperatureRange;
if (bulb.supportsColorTemperature) {
expect(range)
.to.to.have.property('min')
@@ -99,7 +99,7 @@ describe('Bulb', function () {
}
});
it('should return null if not supported (LB100)', function () {
- const range = bulb.getColorTemperatureRange;
+ const range = bulb.colorTemperatureRange;
if (!bulb.supportsColorTemperature) {
expect(range).to.be.null;
expect(testDevice.model).to.not.match(/lb1[23]0/);
|
test: fix getColorTemperatureRange test
|
plasticrake_tplink-smarthome-api
|
train
|
js
|
44c5096860600d7558461b5998fcdfe2f08ca848
|
diff --git a/lib/workers.js b/lib/workers.js
index <HASH>..<HASH> 100644
--- a/lib/workers.js
+++ b/lib/workers.js
@@ -12,6 +12,7 @@ var inherits = require('inherits');
var defaultOptions = {
+ pollingDelay: 0,
pollingInterval: 1500,
lockTimeMs: 4000
};
@@ -44,7 +45,7 @@ function Workers(baseUrl, options) {
var engineApi = new EngineApi(baseUrl);
- var timer = setInterval(poll, options.pollingInterval);
+ var pollingTimer;
var consumerId = options.consumerId || uuid.v4();
@@ -144,13 +145,25 @@ function Workers(baseUrl, options) {
this.poll = poll;
this.destroy = function() {
- emit('destroy');
+ emit('destroy', consumerId);
- clearInterval(timer);
+ clearInterval(pollingTimer);
};
- emit('start', consumerId);
+ function start() {
+ emit('start', consumerId);
+
+ pollingTimer = setInterval(poll, options.pollingInterval);
+ }
+
+ this.start = start;
+
+ // disable auto-start by setting polling delay to -1
+ if (options.pollingDelay !== -1) {
+ // delay start by pollingDelay + random value
+ setTimeout(start, options.pollingDelay + (options.pollingDelay * Math.random()));
+ }
}
inherits(Workers, Emitter);
|
feat(workers): add pollingDelay
|
nikku_camunda-worker-node
|
train
|
js
|
777e2eb0ed10689142a0ee715f4735c88320868f
|
diff --git a/src/index.js b/src/index.js
index <HASH>..<HASH> 100644
--- a/src/index.js
+++ b/src/index.js
@@ -54,7 +54,7 @@ module.exports.reporter = reporterType => {
})
}
- if (reporterType === 'fail' && foundIssues) {
+ if (isFailReporter && foundIssues) {
failedFiles.push(file.path)
}
|
refactor(src): use isFailReporter var
|
dustinspecker_gulp-alex
|
train
|
js
|
cfa2cb96172cda7ab153244140912d3af3021122
|
diff --git a/hrp/plugin.go b/hrp/plugin.go
index <HASH>..<HASH> 100644
--- a/hrp/plugin.go
+++ b/hrp/plugin.go
@@ -17,6 +17,7 @@ const (
goPluginFile = "debugtalk.so" // built from go plugin
hashicorpGoPluginFile = "debugtalk.bin" // built from hashicorp go plugin
hashicorpPyPluginFile = "debugtalk.py" // used for hashicorp python plugin
+ projectInfoFile = "proj.json" // used for ensuring root project
)
func initPlugin(path string, logOn bool) (plugin funplugin.IPlugin, pluginDir string, err error) {
@@ -118,9 +119,15 @@ func GetProjectRootDirPath(path string) (rootDir string, err error) {
rootDir = filepath.Dir(pluginPath)
return
}
+ // fix: no debugtalk file in project but having proj.json created by startpeoject
+ projPath, err := locateFile(path, projectInfoFile)
+ if err == nil {
+ rootDir = filepath.Dir(projPath)
+ return
+ }
// failed to locate project root dir
- // maybe project plugin debugtalk.xx is not exist
+ // maybe project plugin debugtalk.xx and proj.json are not exist
// use current dir instead
return os.Getwd()
}
|
fix: failed to locate root dir even if proj.json exist
|
HttpRunner_HttpRunner
|
train
|
go
|
097e30a29923667a0a37e6a6d26cf23699f4ad93
|
diff --git a/registry/registry.go b/registry/registry.go
index <HASH>..<HASH> 100644
--- a/registry/registry.go
+++ b/registry/registry.go
@@ -94,9 +94,6 @@ func (r *Registry) GetMachineJobs(machine *machine.Machine) map[string]job.Job {
func (r *Registry) ScheduleJob(job *job.Job, machine *machine.Machine) {
key := path.Join(keyPrefix, machinePrefix, machine.BootId, schedulePrefix, job.Name)
r.Etcd.Set(key, job.Payload.Value, 0)
-
- key = path.Join(keyPrefix, schedulePrefix, job.Name)
- r.Etcd.Delete(key)
}
// Persist the changes in a provided Machine's Job to Etcd with the provided TTL
|
refactor(registry): Stop deleting globally-scheduled Jobs
The global schedule is the entrypoint for clients to ask the system
to run something. These entries cannot be deleted as the scheduler
will not be able to reschedule jobs that fail on any given Machine.
|
coreos_fleet
|
train
|
go
|
4378963480f8c1322a64a203f3f982c33e365ca3
|
diff --git a/test/specs/wrapper.spec.js b/test/specs/wrapper.spec.js
index <HASH>..<HASH> 100644
--- a/test/specs/wrapper.spec.js
+++ b/test/specs/wrapper.spec.js
@@ -1,5 +1,5 @@
import { describeWithShallowAndMount } from '~resources/utils'
-import { enableAutoDestroy, resetAutoDestroyState } from '~vue/test-utils'
+import { enableAutoDestroy, resetAutoDestroyState } from '@vue/test-utils'
describeWithShallowAndMount('Wrapper', mountingMethod => {
;['vnode', 'element', 'vm', 'options'].forEach(property => {
|
test: fix bad reference to vtu package
|
vuejs_vue-test-utils
|
train
|
js
|
b0b87072c2c6b7b5a0bd3316f01f1f7de460d280
|
diff --git a/src/components/VSelect/VSelect.js b/src/components/VSelect/VSelect.js
index <HASH>..<HASH> 100644
--- a/src/components/VSelect/VSelect.js
+++ b/src/components/VSelect/VSelect.js
@@ -655,7 +655,6 @@ export default {
// and click doesn't target the input
setTimeout(() => {
if (this.menuIsActive) return
- console.log('here')
this.focus()
this.menuIsActive = true
|
fix(v-select): removed dev code
|
vuetifyjs_vuetify
|
train
|
js
|
5d17b59d23b499c9c256f1b7fb02654026a98ddf
|
diff --git a/src/Logging/Drivers/Daily.php b/src/Logging/Drivers/Daily.php
index <HASH>..<HASH> 100755
--- a/src/Logging/Drivers/Daily.php
+++ b/src/Logging/Drivers/Daily.php
@@ -8,6 +8,16 @@ use Modulus\Hibernate\Logging\Driver;
class Daily extends Driver
{
/**
+ * Create log file if it doesn't already exists
+ *
+ * @return void
+ */
+ public function __construct()
+ {
+ if (!file_exists($this->getLogFile())) touch($this->getLogFile());
+ }
+
+ /**
* Get log file
*
* @return string
|
feat: Create log file if it doesn't already exists
|
modulusphp_hibernate
|
train
|
php
|
ea4b9400ca5993d133c18a249c4654e5489640f2
|
diff --git a/sample/src/about/about.js b/sample/src/about/about.js
index <HASH>..<HASH> 100644
--- a/sample/src/about/about.js
+++ b/sample/src/about/about.js
@@ -21,7 +21,7 @@ export class About {
attached() {
// let bridge = System.get(System.normalizeSync('aurelia-materialize-bridge'));
// this.version = bridge.version;
- this.version = '0.23.0';
+ this.version = '0.24.0';
}
onSelectionChanged(e) {
|
chore(sample): increase version
|
aurelia-ui-toolkits_aurelia-materialize-bridge
|
train
|
js
|
526456ab1cfdb828ffc0072197646fc7e3ef4758
|
diff --git a/packages/docs/themes/cerebral-website/page/__head/page__head.bemhtml.js b/packages/docs/themes/cerebral-website/page/__head/page__head.bemhtml.js
index <HASH>..<HASH> 100644
--- a/packages/docs/themes/cerebral-website/page/__head/page__head.bemhtml.js
+++ b/packages/docs/themes/cerebral-website/page/__head/page__head.bemhtml.js
@@ -17,3 +17,13 @@ block('page').elem('head')(
]
})
)
+
+block('page').elem('head').match(function (){
+ return this._meta && this._meta.redirect
+})(
+ content()(function () {
+ return applyNext().concat([
+ { elem: 'meta', attrs: { 'http-equiv': 'refresh', content: '0; url="' + this._meta.redirect + '.html"' } }
+ ])
+ })
+)
|
feat(page): support redirect tag in meta
|
cerebral_cerebral
|
train
|
js
|
cce4ace86de1784f1434f1ab0727775db6af6cd6
|
diff --git a/lib/api-client/resources/group.js b/lib/api-client/resources/group.js
index <HASH>..<HASH> 100644
--- a/lib/api-client/resources/group.js
+++ b/lib/api-client/resources/group.js
@@ -130,6 +130,14 @@ Group.get = function (options, done) {
* @param {Function} done
*/
Group.list = function (options, done) {
+ if (arguments.length === 1) {
+ done = options;
+ options = {};
+ }
+ else {
+ options = options || {};
+ }
+
return this.http.get(this.path, {
data: options,
done: done || noop
|
feat(group): allow list to be called w/o options
Related to #CAM-<I>
|
camunda_camunda-bpm-sdk-js
|
train
|
js
|
c2614a9d6b378ac0580637fc27e60788177e9587
|
diff --git a/src/index.js b/src/index.js
index <HASH>..<HASH> 100644
--- a/src/index.js
+++ b/src/index.js
@@ -134,7 +134,7 @@ function Weight(i, t, m, n, s) {
}
/**
- *
+ * @private
* @param m Number of points
* @param n Polynomial grade
* @param s Derivative
|
chore: add private in fullWeights docs
|
mljs_savitzky-golay-generalized
|
train
|
js
|
cd8f17ecf5b6e7aef14a54a9bec51fa8cd167f69
|
diff --git a/src/components/Stats/Stats.js b/src/components/Stats/Stats.js
index <HASH>..<HASH> 100644
--- a/src/components/Stats/Stats.js
+++ b/src/components/Stats/Stats.js
@@ -6,13 +6,6 @@ import autoHideContainerHOC from '../../decorators/autoHideContainer.js';
import headerFooterHOC from '../../decorators/headerFooter.js';
export class RawStats extends Component {
- shouldComponentUpdate(nextProps) {
- return (
- this.props.nbHits !== nextProps.nbHits ||
- this.props.processingTimeMS !== nextProps.processingTimeMS
- );
- }
-
render() {
const data = {
hasManyResults: this.props.nbHits > 1,
|
fix(Stats): let the widget render on all values (#<I>)
This removes the implementation of shouldComponentUpdate. This can be seen as a regression but given that it's a pretty simple widget, the impact shouldn't be noticeable.
Fix #<I>
|
algolia_instantsearch.js
|
train
|
js
|
3141d1a7b724e9432201c848a399be18f627bc8e
|
diff --git a/source/times.js b/source/times.js
index <HASH>..<HASH> 100644
--- a/source/times.js
+++ b/source/times.js
@@ -33,7 +33,7 @@ var times = _curry2(function times(fn, n) {
list = [];
for (var x = 0; x < len; x += 1) {
- list[x] = fn(x);
+ list.push(fn(x));
}
return list;
|
chore(times): using `push` method instead of direct assignment
|
ramda_ramda
|
train
|
js
|
20a60c4f9c4fc150f90420e0e3f76a46c5f6d18e
|
diff --git a/index.js b/index.js
index <HASH>..<HASH> 100644
--- a/index.js
+++ b/index.js
@@ -58,6 +58,7 @@ L.Control.SideBySide = L.Control.extend({
range.min = 0
range.max = 1
range.step = 'any'
+ range.value = 0.5
this._addEvents()
this._updateLayers()
this._updateClip()
|
fix: Make slider start in middle on Firefox
|
digidem_leaflet-side-by-side
|
train
|
js
|
714c61837b1cc15df51cb0dcd24aea623a5555f7
|
diff --git a/client/deis.py b/client/deis.py
index <HASH>..<HASH> 100755
--- a/client/deis.py
+++ b/client/deis.py
@@ -1495,8 +1495,8 @@ class DeisClient(object):
"""
Sets tags for an application.
- A tag is a key/value pair used to tag an application's containers.
- This is often used to restrict workloads to specific hosts.
+ A tag is a key/value pair used to tag an application's containers and is passed to the scheduler.
+ This is often used to restrict workloads to specific hosts matching the scheduler-configured metadata.
Usage: deis tags:set [options] <key>=<value>...
|
docs: clarify tags_set usage
Mention that tags are passed to the scheduler.
|
deis_deis
|
train
|
py
|
13191395581cdc2f3f052c5564b528aad67a2bcc
|
diff --git a/src/radio/Radio.js b/src/radio/Radio.js
index <HASH>..<HASH> 100644
--- a/src/radio/Radio.js
+++ b/src/radio/Radio.js
@@ -30,10 +30,18 @@ export default class Radio extends Component {
'disabled': disabled, // 禁用状态
'checked': checked, // 选中
});
+ const inputProps = {
+ ref: (node) => { this.radio = node },
+ type: 'radio',
+ disabled: disabled,
+ checked: checked || false,
+ value: value || children,
+ onChange: this.handleChange.bind(this),
+ }
return (
<label {...other} className={cls}>
<span className={`${prefixCls}-inner`}>
- <input ref={(node) => { this.radio = node }} checked={checked} type="radio" disabled={disabled} value={value || children} onChange={this.handleChange.bind(this)} />
+ <input {...inputProps} />
</span>
<span className={`${prefixCls}-text`}>{children || value}</span>
</label>
|
fix(Radio): Radio checked can not be undefined.
|
uiwjs_uiw
|
train
|
js
|
c5ffe0c2dac14b940b600acaccda3b387ca14a28
|
diff --git a/airflow/providers/amazon/aws/hooks/logs.py b/airflow/providers/amazon/aws/hooks/logs.py
index <HASH>..<HASH> 100644
--- a/airflow/providers/amazon/aws/hooks/logs.py
+++ b/airflow/providers/amazon/aws/hooks/logs.py
@@ -66,9 +66,7 @@ class AwsLogsHook(AwsBaseHook):
| 'ingestionTime' (int): The time in milliseconds the event was ingested.
"""
next_token = None
-
- event_count = 1
- while event_count > 0:
+ while True:
if next_token is not None:
token_arg: Optional[Dict[str, str]] = {'nextToken': next_token}
else:
@@ -94,7 +92,7 @@ class AwsLogsHook(AwsBaseHook):
yield from events
- if 'nextForwardToken' in response:
+ if next_token != response['nextForwardToken']:
next_token = response['nextForwardToken']
else:
return
|
fix: cloudwatch logs fetch logic (#<I>)
|
apache_airflow
|
train
|
py
|
2ad7bd3664aba48a3536ca3409e9ce17c948f555
|
diff --git a/tests/integration-all/http-api/tests.js b/tests/integration-all/http-api/tests.js
index <HASH>..<HASH> 100644
--- a/tests/integration-all/http-api/tests.js
+++ b/tests/integration-all/http-api/tests.js
@@ -211,7 +211,10 @@ describe('HTTP API Integration Test', function() {
return resolveEndpoint();
});
- after(async () => {
+ after(async function() {
+ // Added temporarily to inspect random fails
+ // TODO: Remove once properly diagnosed
+ if (this.test.parent.tests.some(test => test.state === 'failed')) return;
log.notice('Removing service...');
await removeService(tmpDirPath);
});
|
test: Temporary debug patch for randomly failing test
|
serverless_serverless
|
train
|
js
|
a20d19217d136461b78d9a53c167aab47fc3adba
|
diff --git a/plinq.go b/plinq.go
index <HASH>..<HASH> 100644
--- a/plinq.go
+++ b/plinq.go
@@ -68,7 +68,7 @@ func (q ParallelQuery) AsOrdered() (p ParallelQuery) {
// See AsOrdered() for remarks.
func (q ParallelQuery) AsUnordered() (p ParallelQuery) {
p = q.copyMetaWithValues()
- p.ordered = true
+ p.ordered = false
return
}
|
fix: make AsUnordered really unordered
|
ahmetb_go-linq
|
train
|
go
|
7d5b1137760084d647c7a7df02f97e50bb28b7a4
|
diff --git a/app-vite/lib/quasar-config-file.js b/app-vite/lib/quasar-config-file.js
index <HASH>..<HASH> 100644
--- a/app-vite/lib/quasar-config-file.js
+++ b/app-vite/lib/quasar-config-file.js
@@ -307,7 +307,8 @@ class QuasarConfFile {
metaConf
}
- if (this.#ctx.dev) {
+ // if DEV and not BEX mode (BEX does not use a regular devserver)
+ if (this.#ctx.dev && this.#ctx.mode.bex !== true) {
if (this.#opts.host) {
cfg.devServer.host = this.#opts.host
}
|
feat(app-vite): do not parse and configure devserver options when in BEX mode (not needed)
|
quasarframework_quasar
|
train
|
js
|
b6bbb528e971912a6a4a1873214c9a0cb33c128e
|
diff --git a/src/Keboola/Syrup/Command/JobCommand.php b/src/Keboola/Syrup/Command/JobCommand.php
index <HASH>..<HASH> 100644
--- a/src/Keboola/Syrup/Command/JobCommand.php
+++ b/src/Keboola/Syrup/Command/JobCommand.php
@@ -226,7 +226,7 @@ class JobCommand extends ContainerAwareCommand
// Update job with results
$endTime = time();
$createdTime = $this->job->getCreatedTime();
- $waitSeconds = is_null($createdTime)?:$endTime - strtotime($createdTime);
+ $waitSeconds = is_null($createdTime)?:$startTime - strtotime($createdTime);
$this->job->setStatus($jobStatus);
$this->job->setResult($jobResult);
|
fix: waitSeconds in job
|
keboola_syrup
|
train
|
php
|
b562d277f2e4d59f717bbd71e80c92c5c4c079c3
|
diff --git a/test/unit/logger.spec.js b/test/unit/logger.spec.js
index <HASH>..<HASH> 100644
--- a/test/unit/logger.spec.js
+++ b/test/unit/logger.spec.js
@@ -43,6 +43,9 @@ test.group('Logger | File Driver', (group) => {
})
group.after((done) => {
+ if (process.platform === 'win32') {
+ return done()
+ }
fs.remove(path.join(__dirname, 'tmp'), done)
})
|
ci(logger): do not remove dir after test on win<I>
|
adonisjs_adonis-framework
|
train
|
js
|
1fa090c656cbab55bdbfb101b503b53811b50dff
|
diff --git a/lib/runner.js b/lib/runner.js
index <HASH>..<HASH> 100644
--- a/lib/runner.js
+++ b/lib/runner.js
@@ -45,7 +45,7 @@ var config = {
*/
var merge = function(into, from) {
for (key in from) {
- if (into[key] instanceof Object) {
+ if (into[key] instanceof Object && !(into[key] instanceof Array)) {
merge(into[key], from[key]);
} else {
into[key] = from[key];
|
fix(runner): merge should override entire arrays, not just parts of them
Closes #<I>
|
angular_protractor
|
train
|
js
|
4638adcedeb6a9e2c68a5dbead6135487c439fe5
|
diff --git a/aurelia-bootstrap-datetimepicker/src/abp-datetime-picker.js b/aurelia-bootstrap-datetimepicker/src/abp-datetime-picker.js
index <HASH>..<HASH> 100644
--- a/aurelia-bootstrap-datetimepicker/src/abp-datetime-picker.js
+++ b/aurelia-bootstrap-datetimepicker/src/abp-datetime-picker.js
@@ -304,13 +304,11 @@ export class AbpDatetimePickerCustomElement {
}
modelChanged(newValue, oldValue) {
- if (isNaN(Date.parse(newValue)) && newValue !== null) {
+ if (!moment(newValue, this._format, true).isValid() && newValue !== null) {
throw new Error('Datetimepicker, model.bind must be of type Date');
}
if (newValue !== oldValue && newValue) {
- if (moment(newValue, this._format, true).isValid()) {
- this.value = moment(newValue, this._format, true).format(this._format);
- }
+ this.value = moment(newValue, this._format, true).format(this._format);
}
}
|
fix(edge): issue #<I> modelChanged fails in Edge browser
|
ghiscoding_Aurelia-Bootstrap-Plugins
|
train
|
js
|
c7df773318708cbe94e56fadbef043b3e52df3e2
|
diff --git a/tests/before_travis_test.js b/tests/before_travis_test.js
index <HASH>..<HASH> 100644
--- a/tests/before_travis_test.js
+++ b/tests/before_travis_test.js
@@ -136,7 +136,7 @@ function configureOrmModule() {
{ reg: /Database username/ , write: 'travis\n' , done: false },
{ reg: /Database password/ , write: '\n' , done: false },
{ reg: /Database name/ , write: 'test_db\n' , done: false },
- { reg: /Database dialect/ , write: '\n' , done: false },
+ { reg: /Database dialect/ , write: 'mysql\n' , done: false },
{ reg: /Database host/ , write: '127.0.0.1\n', done: false },
{ reg: /Database port/ , write: '3306\n' , done: false },
]
|
fix(travis): Before Travis Script debugging
|
CleverStack_clever-orm
|
train
|
js
|
fcf1d4c3af3ce600b281bb2e19d645b1bedee72c
|
diff --git a/test/test-integration-openssh.js b/test/test-integration-openssh.js
index <HASH>..<HASH> 100644
--- a/test/test-integration-openssh.js
+++ b/test/test-integration-openssh.js
@@ -25,6 +25,12 @@ const debug = false;
const opensshPath = 'ssh';
let opensshVer;
+// TODO: figure out why this test is failing on Windows
+if (process.platform === 'win32') {
+ console.log('Skipping OpenSSH integration tests on Windows');
+ process.exit(0);
+}
+
// Fix file modes to avoid OpenSSH client complaints about keys' permissions
for (const file of readdirSync(FIXTURES_DIR, { withFileTypes: true })) {
if (file.isFile())
|
test: skip OpenSSH integration tests on Windows
|
mscdex_ssh2
|
train
|
js
|
856f3c822d3053b57d2045da16a0d9d070e053d7
|
diff --git a/sources/values.js b/sources/values.js
index <HASH>..<HASH> 100644
--- a/sources/values.js
+++ b/sources/values.js
@@ -15,7 +15,9 @@ module.exports = function values (array, onAbort) {
return function (abort, cb) {
if(abort)
return abortCb(cb, abort, onAbort)
- cb(i >= array.length || null, array[i++])
+ if(i >= array.length)
+ cb(true)
+ else
+ cb(null, array[i++])
}
}
-
|
perf: don't access array out of bounds
|
pull-stream_pull-stream
|
train
|
js
|
79205f7db320a755224ed9e0fabc82261e1409b5
|
diff --git a/packages/netlify-cms-core/src/components/App/App.js b/packages/netlify-cms-core/src/components/App/App.js
index <HASH>..<HASH> 100644
--- a/packages/netlify-cms-core/src/components/App/App.js
+++ b/packages/netlify-cms-core/src/components/App/App.js
@@ -67,7 +67,7 @@ class App extends React.Component {
t: PropTypes.func.isRequired,
};
- static configError(config) {
+ configError(config) {
const t = this.props.t;
return (
<ErrorContainer>
@@ -145,7 +145,7 @@ class App extends React.Component {
}
if (config.get('error')) {
- return App.configError(config);
+ return this.configError(config);
}
if (config.get('isFetching')) {
|
fix: fix App configError method (#<I>)
|
netlify_netlify-cms
|
train
|
js
|
af5bdce5d69fe9086cb1df484b2acdb85c4974ae
|
diff --git a/samples/test/tables.test.js b/samples/test/tables.test.js
index <HASH>..<HASH> 100644
--- a/samples/test/tables.test.js
+++ b/samples/test/tables.test.js
@@ -57,6 +57,9 @@ describe('Tables', () => {
]);
});
+ // to avoid getting rate limited
+ beforeEach(done => setTimeout(done, 500));
+
after(async () => {
await bigquery
.dataset(srcDatasetId)
|
docs(samples): deflake sample tests (#<I>)
|
googleapis_nodejs-bigquery
|
train
|
js
|
f2548a166989322f583dbd8001b516f3b5dc018c
|
diff --git a/website/test/e2e/navigation_spec.js b/website/test/e2e/navigation_spec.js
index <HASH>..<HASH> 100644
--- a/website/test/e2e/navigation_spec.js
+++ b/website/test/e2e/navigation_spec.js
@@ -35,7 +35,7 @@ describe('Navigation', function() {
'Tutorial'
]);
});
-
+
it('should have items under Protractor Setup', function() {
expect(menu.dropdown('Protractor Setup').itemNames()).toEqual([
'Setting Up Protractor',
@@ -59,7 +59,7 @@ describe('Navigation', function() {
it('should have items under Reference', function() {
expect(menu.dropdown('Reference').itemNames()).toEqual([
- 'Configuration File Reference',
+ 'Configuration File',
'Protractor API',
'Style Guide',
'Protractor Syntax vs WebDriverJS Syntax',
@@ -81,7 +81,7 @@ describe('Navigation', function() {
expect($('h1').getText()).toBe('Setting Up Protractor');
});
-
+
it('should go to Setting Up the Selenium Server', function() {
menu.dropdown('Protractor Setup').item('Setting Up the Selenium Server');
|
chore(website): update e2e tests for navigation
|
angular_protractor
|
train
|
js
|
a4f6e1dc807fddb9d148ec1191ae3b5cd2f26e6c
|
diff --git a/packages/@vue/cli-service/ui.js b/packages/@vue/cli-service/ui.js
index <HASH>..<HASH> 100644
--- a/packages/@vue/cli-service/ui.js
+++ b/packages/@vue/cli-service/ui.js
@@ -1,3 +1,5 @@
+/* eslint-disable vue-libs/no-async-functions */
+
module.exports = api => {
const { setSharedData, getSharedData } = api.namespace('webpack-dashboard-')
|
fix(ui): eslint disaled rule
|
vuejs_vue-cli
|
train
|
js
|
e09de09277f29fd7a604c574ee9cc222d3676e32
|
diff --git a/views/cypress/tests/search-advanced.spec.js b/views/cypress/tests/search-advanced.spec.js
index <HASH>..<HASH> 100644
--- a/views/cypress/tests/search-advanced.spec.js
+++ b/views/cypress/tests/search-advanced.spec.js
@@ -122,4 +122,4 @@
cy.getSettled(selectorsTAO.search.modal.closeButton)
.click();
});
-});
\ No newline at end of file
+});
|
chore: add new line at eof
|
oat-sa_extension-tao-item
|
train
|
js
|
2ebf341eedcd6fe461a075bee71b12ca920d0bb1
|
diff --git a/test/k8sT/Services.go b/test/k8sT/Services.go
index <HASH>..<HASH> 100644
--- a/test/k8sT/Services.go
+++ b/test/k8sT/Services.go
@@ -1990,7 +1990,7 @@ Secondary Interface %s :: IPv4: (%s, %s), IPv6: (%s, %s)`, helpers.DualStackSupp
deploymentManager.DeleteCilium()
})
- It("with the host firewall and externalTrafficPolicy=Local", func() {
+ SkipItIf(func() bool { return helpers.SkipQuarantined() && helpers.SkipK8sVersions("1.14.x") }, "with the host firewall and externalTrafficPolicy=Local", func() {
options := map[string]string{
"hostFirewall": "true",
}
@@ -2005,7 +2005,7 @@ Secondary Interface %s :: IPv4: (%s, %s), IPv6: (%s, %s)`, helpers.DualStackSupp
testExternalTrafficPolicyLocal()
})
- It("with externalTrafficPolicy=Local", func() {
+ SkipItIf(func() bool { return helpers.SkipQuarantined() && helpers.SkipK8sVersions("1.14.x") }, "with externalTrafficPolicy=Local", func() {
DeployCiliumAndDNS(kubectl, ciliumFilename)
testExternalTrafficPolicyLocal()
})
|
test: quarantine failing NodePort tests on <I>
|
cilium_cilium
|
train
|
go
|
9da0ac2d904f257c84a3174a3b1cf6b67bf8eafd
|
diff --git a/src/server/queue/index.js b/src/server/queue/index.js
index <HASH>..<HASH> 100644
--- a/src/server/queue/index.js
+++ b/src/server/queue/index.js
@@ -94,7 +94,7 @@ class Queues {
];
if (data.name) args.unshift(data.name)
- return queue.add.apply(queue, data);
+ return queue.add.apply(queue, args);
}
}
}
|
fix: pass the expected arguments to BullQueue#add
|
bee-queue_arena
|
train
|
js
|
dd94bd33650271c65d20a566466d9e122612410e
|
diff --git a/lib/polyfill/patchedmediakeys_apple.js b/lib/polyfill/patchedmediakeys_apple.js
index <HASH>..<HASH> 100644
--- a/lib/polyfill/patchedmediakeys_apple.js
+++ b/lib/polyfill/patchedmediakeys_apple.js
@@ -15,7 +15,6 @@ goog.require('shaka.util.EventManager');
goog.require('shaka.util.FakeEvent');
goog.require('shaka.util.FakeEventTarget');
goog.require('shaka.util.MediaReadyState');
-goog.require('shaka.util.Platform');
goog.require('shaka.util.PublicPromise');
goog.require('shaka.util.StringUtils');
@@ -34,6 +33,9 @@ shaka.polyfill.PatchedMediaKeysApple = class {
return;
}
+ /* Unprefixed EME disabled. See:
+ https://github.com/google/shaka-player/pull/3021#issuecomment-766999811
+
// Only tested in Safari 14.
const safariVersion = shaka.util.Platform.safariVersion();
if (navigator.requestMediaKeySystemAccess &&
@@ -43,6 +45,7 @@ shaka.polyfill.PatchedMediaKeysApple = class {
// Unprefixed EME is preferable.
return;
}
+ */
shaka.log.info('Using Apple-prefixed EME');
|
fix: Disable unprefixed EME on Safari
@avelad reported that PR #<I> caused a regression. Rather than
revert the entire thing, we are disabling one part of that change to
make it easier to re-enable once the issue is fixed. We will also
reopen issue #<I> until this is resolved.
Change-Id: I<I>d<I>da<I>d<I>bb<I>e<I>eb<I>e8bb5c4
|
google_shaka-player
|
train
|
js
|
e301e62eb2c68525f8fde776718723e2ece636a4
|
diff --git a/src/Snackbar/Snackbar.js b/src/Snackbar/Snackbar.js
index <HASH>..<HASH> 100644
--- a/src/Snackbar/Snackbar.js
+++ b/src/Snackbar/Snackbar.js
@@ -25,6 +25,7 @@ const styles = theme => ({
lineHeight: 1.15,
color: theme.snackbar.colors.text,
fontSize: theme.snackbar.fontSize,
+ fontWeight: theme.snackbar.fontWeight,
opacity: 0,
transitionDuration: theme.snackbar.animationDuration,
transitionProperty: 'top, bottom, opacity',
diff --git a/src/theme/create-theme.js b/src/theme/create-theme.js
index <HASH>..<HASH> 100644
--- a/src/theme/create-theme.js
+++ b/src/theme/create-theme.js
@@ -1057,6 +1057,7 @@ export default function createTheme(config) {
}
},
fontSize: 13,
+ fontWeight: 400,
animationDuration: 200
},
spinner: {
|
feat: added font weight for snackbar
|
rambler-digital-solutions_rambler-ui
|
train
|
js,js
|
300af6e6acabbffbda34ef1763f4b7f7a670f6c4
|
diff --git a/docs/js/doc.js b/docs/js/doc.js
index <HASH>..<HASH> 100644
--- a/docs/js/doc.js
+++ b/docs/js/doc.js
@@ -150,9 +150,13 @@
function tocMenu(){
$('.toc-menu select').change(function(){
+ var $body = $('body');
var href = $(this).val();
+ var scroll0 = $body.scrollTop();
window.location.hash = href;
- $('html, body').animate({scrollTop: '-=100px'}, 800);
+ var scroll1 = $body.scrollTop();
+ var deltaScroll = scroll1 - scroll0;
+ $body.scrollTop($body.scrollTop() - (deltaScroll>0?200:0)).animate({scrollTop: (deltaScroll>0?'+':'-')+'=100px'}, 300)
});
}
|
docs(live-doc): in mobile view, makes menu moves consistent with pos
|
algolia_instantsearch.js
|
train
|
js
|
32ce3940a66199ee815b196faad6a7a135561aa0
|
diff --git a/source/rafcon/gui/mygaphas/utils/cache/image_cache.py b/source/rafcon/gui/mygaphas/utils/cache/image_cache.py
index <HASH>..<HASH> 100644
--- a/source/rafcon/gui/mygaphas/utils/cache/image_cache.py
+++ b/source/rafcon/gui/mygaphas/utils/cache/image_cache.py
@@ -155,7 +155,19 @@ class ImageCache(object):
# Changed drawing parameter
for key in parameters:
- if key not in self.__last_parameters or self.__last_parameters[key] != parameters[key]:
+ try:
+ if key not in self.__last_parameters or self.__last_parameters[key] != parameters[key]:
+ return False
+ except (AttributeError, ValueError):
+ # Some values cannot be compared and raise an exception on comparison (e.g. numpy.ndarray). In this
+ # case, just return False and do not cache.
+ try:
+ # Catch at least the ndarray-case, as this could occure relatively often
+ import numpy
+ if isinstance(self.__last_parameters[key], numpy.ndarray):
+ return numpy.array_equal(self.__last_parameters[key], parameters[key])
+ except ImportError:
+ return False
return False
return True
|
fix(image_cache): Support ndarray and handle other types gracefully
|
DLR-RM_RAFCON
|
train
|
py
|
af657f438e365950b7760eb24cedb0208bc4cd8e
|
diff --git a/src/Authentication/OAuth20Login.php b/src/Authentication/OAuth20Login.php
index <HASH>..<HASH> 100644
--- a/src/Authentication/OAuth20Login.php
+++ b/src/Authentication/OAuth20Login.php
@@ -44,6 +44,7 @@ class OAuth20Login extends Login
*/
public function __construct(array $configAttributes, array $authorization, array $authentication)
{
+ parent::__construct($configAttributes, $authentication);
if (empty($authorization['oauth_api']['credentials'])) {
throw new UserException("OAuth API credentials not supplied in config");
}
@@ -71,8 +72,6 @@ class OAuth20Login extends Login
'user' => $oAuthData,
'attr' => $this->configAttributes
];
-
- parent::__construct($configAttributes, $authentication);
}
/**
@@ -80,7 +79,6 @@ class OAuth20Login extends Login
*/
protected function getAuthRequest(array $config) : RestRequest
{
- parent::getAuthRequest($config);
if (!empty($config['params'])) {
$config['params'] = UserFunction::build($config['params'], $this->params);
}
|
fix: parent ctor call, parent ctor must not be called in getAuthRequest (produces invalid request)
|
keboola_generic-extractor
|
train
|
php
|
fb25160fec8d50a5b243cb3523551495816a6817
|
diff --git a/generator/index.js b/generator/index.js
index <HASH>..<HASH> 100644
--- a/generator/index.js
+++ b/generator/index.js
@@ -52,7 +52,7 @@ module.exports = (api, options = {}) => {
if (api.hasPlugin('router')) {
console.log('\n')
require('@vue/cli-shared-utils/lib/logger').warn(
- 'It is detected that you are using Vue Router. If you are using history mode, you must push the default route when the root component is loaded. Learn more at https://goo.gl/GM1xZG.'
+ 'It is detected that you are using Vue Router. If you are using history mode, you must push the default route when the root component is loaded. Learn more at https://goo.gl/GM1xZG .'
)
}
}
|
fix(generator): router warning url not clickable
|
nklayman_vue-cli-plugin-electron-builder
|
train
|
js
|
4ee2e7a067a98b160854d6bb743d9e8359f9b90a
|
diff --git a/index.js b/index.js
index <HASH>..<HASH> 100644
--- a/index.js
+++ b/index.js
@@ -29,7 +29,7 @@ module.exports = function(options, cb) {
options.db = options.db || {}
var watcher_options = {
- ignored: /[\/\\]\.|node_modules/,
+ ignored: /[\/\\]\.|node_modules|incomplete/,
persistent: false,
ignoreInitial: true,
usePolling: false,
@@ -75,7 +75,7 @@ module.exports = function(options, cb) {
setTimeout(function() {
process.exit(0)
- , 1000})
+ }, 1000)
})
process.on('uncaughtException', function(e) {
@@ -88,6 +88,6 @@ module.exports = function(options, cb) {
setTimeout(function() {
process.exit(1)
- , 1000})
+ }, 1000)
})
}
|
fix(watcher): Ignore incomplete directory, typo
|
ezseed_watcher
|
train
|
js
|
1d4631568decaf6a3db54cbdc63a91079bd780bc
|
diff --git a/src/components/select/select.js b/src/components/select/select.js
index <HASH>..<HASH> 100755
--- a/src/components/select/select.js
+++ b/src/components/select/select.js
@@ -66,6 +66,9 @@ angular.module('material.components.select', [
* **Note:** A value of `undefined` ***is considered a valid value*** (and does not auto-apply this
* attribute) since you may wish this to be your "Not Available" or "None" option.
*
+ * **Note:** Using the `value` attribute (as opposed to `ng-value`) always evaluates to a string, so
+ * `value="null"` will require the test `ng-if="myValue != 'null'"` rather than `ng-if="!myValue"`.
+ *
* @param {expression} ng-model The model!
* @param {boolean=} multiple Whether it's multiple.
* @param {expression=} md-on-close Expression to be evaluated when the select is closed.
|
docs(select): Add note about value/ng-value differences. (#<I>)
Some users expressed confusion about the fact that the `value`
attribute always evaluates to a string as opposed to the `ng-value`
attribute which allows any value.
Add a note to the docs to describe the differences and give an
example of how to properly use `ng-if` with the `value` attribute.
Fixes #<I>.
|
angular_material
|
train
|
js
|
77fb67d324f592a31e96a410535bc83f9a21c351
|
diff --git a/system/Common.php b/system/Common.php
index <HASH>..<HASH> 100644
--- a/system/Common.php
+++ b/system/Common.php
@@ -1014,10 +1014,13 @@ if (! function_exists('slash_item')) {
function slash_item(string $item): ?string
{
$config = config(App::class);
- $configItem = $config->{$item};
+
+ if (property_exists($config, $item)) {
+ $configItem = $config->{$item};
+ }
if (! isset($configItem) || empty(trim($configItem))) {
- return $configItem;
+ return null;
}
return rtrim($configItem, '/') . '/';
|
fix: object property which doesn't exist
|
codeigniter4_CodeIgniter4
|
train
|
php
|
b131f5d67076b97b3186c820760df839bf796ad5
|
diff --git a/src/main/launch.js b/src/main/launch.js
index <HASH>..<HASH> 100644
--- a/src/main/launch.js
+++ b/src/main/launch.js
@@ -18,7 +18,7 @@ export function deferURL(event, url) {
}
}
-const iconPath = path.join(__dirname, '../../static/icon.png');
+const iconPath = path.join(__dirname, '..', '..', 'static', 'icon.png');
export function launch(filename) {
let win = new BrowserWindow({
@@ -57,4 +57,3 @@ export function launchNewNotebook(kernelSpecName) {
});
return win;
}
-
|
fix(icon): load icon on windows by fixing path join
|
nteract_nteract
|
train
|
js
|
e67c819a2579abb0daf49436effd5633eda3554c
|
diff --git a/worker/task.go b/worker/task.go
index <HASH>..<HASH> 100644
--- a/worker/task.go
+++ b/worker/task.go
@@ -37,6 +37,9 @@ func NewTask(lifecycle Lifecycle, payload []byte) *Task {
// worked on.
func (t *Task) Bytes() []byte { return t.payload }
+// SetBytes sets the bytes that this task is holding.
+func (t *Task) SetBytes(bytes []byte) { t.payload = bytes }
+
// Succeed signals the lifecycle that work on this task has been completed,
// and removes the task from the worker queue.
func (t *Task) Succeed() error {
|
feat(lifecycle): added ability to alter payload of a task (#<I>)
|
mixer_redutil
|
train
|
go
|
c3ce525c6ce18556ed28625c4a8e9382badf3bb2
|
diff --git a/src/diagrams/sequence/sequenceDb.js b/src/diagrams/sequence/sequenceDb.js
index <HASH>..<HASH> 100644
--- a/src/diagrams/sequence/sequenceDb.js
+++ b/src/diagrams/sequence/sequenceDb.js
@@ -1,6 +1,5 @@
import mermaidAPI from '../../mermaidAPI';
import * as configApi from '../../config';
-import common from '../common/common';
import { logger } from '../../logger';
let prevActor = undefined;
@@ -138,9 +137,7 @@ export const parseMessage = function(str) {
const message = {
text: _str.replace(/^[:]?(?:no)?wrap:/, '').trim(),
wrap:
- _str.match(/^[:]?(?:no)?wrap:/) === null
- ? common.hasBreaks(_str) || undefined
- : _str.match(/^[:]?wrap:/) !== null
+ _str.match(/^[:]?wrap:/) !== null
? true
: _str.match(/^[:]?nowrap:/) !== null
? false
|
fix: exclude text with line breaks when parsing wrap setting
|
knsv_mermaid
|
train
|
js
|
e20eac812a332004ab534d2cc004680b1ceb4a5e
|
diff --git a/index.js b/index.js
index <HASH>..<HASH> 100644
--- a/index.js
+++ b/index.js
@@ -1,10 +1,17 @@
var _ = require('lodash');
var loaderUtils = require('loader-utils');
+function getOptions(context) {
+ if (context.options && context.options.ejsLoader) {
+ return context.options.ejsLoader;
+ }
+ return {};
+}
+
module.exports = function(source) {
this.cacheable && this.cacheable();
var query = loaderUtils.parseQuery(this.query);
- var options = this.options ? this.options.ejsLoader || {} : {};
+ var options = getOptions(this);
['escape', 'interpolate', 'evaluate'].forEach(function(templateSetting) {
var setting = query[templateSetting];
|
refactor: make code more readable and remove ternary
|
difelice_ejs-loader
|
train
|
js
|
31b53a7430ac99d30adbeba6e48c51bd2f38a296
|
diff --git a/src/components/Site/SiteHeader.react.js b/src/components/Site/SiteHeader.react.js
index <HASH>..<HASH> 100644
--- a/src/components/Site/SiteHeader.react.js
+++ b/src/components/Site/SiteHeader.react.js
@@ -8,7 +8,11 @@ import type { Props as AccountDropdownProps } from "../AccountDropdown/AccountDr
export type Props = {|
+children?: React.Node,
/**
- * href attributefor the logo
+ * href attribute for the logo
+ */
+ +align?: string,
+ /**
+ * header alignment
*/
+href?: string,
/**
@@ -34,6 +38,7 @@ export type Props = {|
const SiteHeader = ({
children,
href,
+ align,
imageURL,
alt,
notificationsTray: notificationsTrayFromProps,
@@ -50,7 +55,7 @@ const SiteHeader = ({
return (
<div className="header py-4">
- <Container>
+ <Container className={align}>
<div className="d-flex">
{children || (
<React.Fragment>
|
feat(SiteHeader): header optional alignment
Add an alignment tag for header component to put content on the center of the container
|
tabler_tabler-react
|
train
|
js
|
1353f833ea2a808a9646278247bcb79faaee55eb
|
diff --git a/source/library/pattern/pattern/apply-transforms.js b/source/library/pattern/pattern/apply-transforms.js
index <HASH>..<HASH> 100644
--- a/source/library/pattern/pattern/apply-transforms.js
+++ b/source/library/pattern/pattern/apply-transforms.js
@@ -1,3 +1,5 @@
+import path from 'path';
+
export default applyTransforms;
function applyTransforms(file, transformNames, options) {
@@ -41,14 +43,15 @@ async function applyTransform(fn, file, config) {
}
function augmentTransformError(error, file, transformName) {
- error.message = [
- `${error.pattern}:${error.file} [${error.transform}]`,
- error.message
- ].join('\n');
-
error.pattern = error.pattern || file.pattern.id;
error.file = error.file || error.fileName || file.path;
error.fileName = error.file;
error.transform = error.transform || transformName;
+
+ error.message = [
+ `${error.pattern}:${path.basename(error.file)} [${error.transform}]`,
+ error.message
+ ].join('\n');
+
return error;
}
|
fix: do not print confusing undefined for transform errors
|
patternplate-archive_patternplate-server
|
train
|
js
|
e96a47cdde95757a19efaec06093bf8d53b70627
|
diff --git a/webpack.config.js b/webpack.config.js
index <HASH>..<HASH> 100644
--- a/webpack.config.js
+++ b/webpack.config.js
@@ -23,6 +23,7 @@ if (args[0] === '-p') {
output = {
path: dirDist,
filename: 'all.min.js',
+ libraryTarget: 'umd',
};
plugins = [
new webpack.optimize.DedupePlugin(),
|
feat(lib): Export public API as UMD
|
jonathanweiss_sk-progress-circle
|
train
|
js
|
2d44017f40ed95c0653d440b16fc58e0f3558226
|
diff --git a/packages/express/lib/serve.js b/packages/express/lib/serve.js
index <HASH>..<HASH> 100644
--- a/packages/express/lib/serve.js
+++ b/packages/express/lib/serve.js
@@ -13,7 +13,7 @@ module.exports = (mode, { configureServer }) => {
{ phases }
);
const router = new Router();
- const app = configureServer(express().use(router), middlewares, mode);
+ const app = configureServer(express(), middlewares, mode).use(router);
debug(middlewares);
phases.forEach((phase) =>
middlewares[phase].forEach((middleware) =>
|
fix(express): reinstate previous behaviour, broken in #<I>
|
untool_untool
|
train
|
js
|
2374717c15fa402d689dd755ba0f933f9ee9b445
|
diff --git a/kv/service.go b/kv/service.go
index <HASH>..<HASH> 100644
--- a/kv/service.go
+++ b/kv/service.go
@@ -77,7 +77,9 @@ func NewService(log *zap.Logger, kv Store, configs ...ServiceConfig) *Service {
if len(configs) > 0 {
s.Config = configs[0]
- } else {
+ }
+
+ if s.Config.SessionLength == 0 {
s.Config.SessionLength = influxdb.DefaultSessionLength
}
|
refactor(kv): when no session length is set, use the default
In the past, the default was only being set if a service config wasn't
provided. But if a service config was provided and gave a zero value, it
would not fill in the default value. This changes the code so that it
will always set the default value if the session length is set to zero.
|
influxdata_influxdb
|
train
|
go
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.