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 |
|---|---|---|---|---|---|
f20ffc30e24ffd37d06bb9fe26dda20fb3e1e5b2
|
diff --git a/src/Utils/Message.php b/src/Utils/Message.php
index <HASH>..<HASH> 100644
--- a/src/Utils/Message.php
+++ b/src/Utils/Message.php
@@ -59,6 +59,8 @@ class Message
$this->publicKey = $message->publickey;
} elseif (property_exists($message, 'publicKey')) {
$this->publicKey = $message->publicKey;
+ } elseif (property_exists($message, 'signatory')) {
+ $this->publicKey = $message->signatory;
} else {
throw new InvalidArgumentException('The given message did not contain a valid public key.');
}
|
fix: support signatory alias for message public key (#<I>)
|
ArkEcosystem_php-crypto
|
train
|
php
|
31c65621ff592dda0ad3bf854db906beb8a48e9a
|
diff --git a/gitlab/tests/test_gitlab.py b/gitlab/tests/test_gitlab.py
index <HASH>..<HASH> 100644
--- a/gitlab/tests/test_gitlab.py
+++ b/gitlab/tests/test_gitlab.py
@@ -836,7 +836,7 @@ class TestGitlab(unittest.TestCase):
return response(200, content, headers, None, 5, request)
with HTTMock(resp_get_project, resp_get_commit):
- project = self.gl.projects.get(1)
+ project = self.gl.projects.get(1, lazy=True)
commit = project.commits.get("6b2257ea")
self.assertEqual(commit.short_id, "6b2257ea")
self.assertEqual(commit.title, "Initial commit")
|
test: use lazy object in unit tests
|
python-gitlab_python-gitlab
|
train
|
py
|
caddd355f7f38420317cbb6b8824d3e0978304a6
|
diff --git a/packages/eslint-plugin-next/lib/index.js b/packages/eslint-plugin-next/lib/index.js
index <HASH>..<HASH> 100644
--- a/packages/eslint-plugin-next/lib/index.js
+++ b/packages/eslint-plugin-next/lib/index.js
@@ -6,6 +6,7 @@ module.exports = {
},
configs: {
recommended: {
+ plugins: ['@next/next'],
rules: {
'@next/next/no-css-tags': 1,
'@next/next/no-sync-scripts': 1,
|
fix: add plugin to recommended eslint-plugin-next config (#<I>)
allow extending the recommended eslint-plugin-next config, without having to specify the plugin name in the plugins array. eslint does not do this automatically, see the note [here](<URL>)
|
zeit_next.js
|
train
|
js
|
162ceea69903ceccd8f1b3753efcbc77fcc7fc5b
|
diff --git a/lib/rules/rules.js b/lib/rules/rules.js
index <HASH>..<HASH> 100644
--- a/lib/rules/rules.js
+++ b/lib/rules/rules.js
@@ -210,9 +210,9 @@ function _getRuleList(url, list, vals, index) {
var results = [];
var _url = url.replace(/[?#].*$/, '');
var _domainUrl = domainUrl.replace(/[?#].*$/, '');
- var matchedUrl, files, matcher, result, origMatcher, filePath;
+ var rule, matchedUrl, files, matcher, result, origMatcher, filePath;
- for (var i = 0, rule; rule = list[i]; i++) {
+ for (var i = 0; rule = list[i]; i++) {
var pattern = rule.isRegExp ? rule.pattern : setProtocol(rule.pattern, url);
if (rule.isRegExp) {
|
feat: Support path pattern: $~/xxx
|
avwo_whistle
|
train
|
js
|
924c0c557300d98a61defb40df8ed85889c02b29
|
diff --git a/actions/actions.js b/actions/actions.js
index <HASH>..<HASH> 100644
--- a/actions/actions.js
+++ b/actions/actions.js
@@ -2,6 +2,8 @@ export function get(payload) {
return { type: 'SDK', payload: { method: 'GET', ...payload } };
}
+// contrary to the other methods this does not bear the exact name of the HTTP-verb
+// because `delete` is a reserved keyword in ECMAScript
export function del(payload) {
return { type: 'SDK', payload: { method: 'DELETE', ...payload } };
}
|
docs: add clarification about function name
|
commercetools_merchant-center-application-kit
|
train
|
js
|
b85ab9103b1f3bbd81d8dc351426d78d98540a60
|
diff --git a/changelog.rb b/changelog.rb
index <HASH>..<HASH> 100755
--- a/changelog.rb
+++ b/changelog.rb
@@ -75,16 +75,18 @@ if args["--complete"] && repo.tags.count > 0
sorted_tags = repo.tags.sort { |t1, t2| t1.target.time <=> t2.target.time }
changeLogs = []
sorted_tags.each_with_index do |tag, index|
+ if tag == sorted_tags.last
+ # Last Interval: Generate from last Tag to HEAD
+ changes = searchGitLog(repo, repo.head.target, tag.target, logger)
+ logger.info("Tag #{tag.name} to HEAD: #{changes.count} changes")
+ changeLogs += [Changelog.new(changes, nil, tag, nil, nil)]
+ end
+
if index == 0
# First Interval: Generate from start of Repo to the first Tag
changes = searchGitLog(repo, tag.target, nil, logger)
logger.info("First Tag: #{tag.name}: #{changes.count} changes")
changeLogs += [Changelog.new(changes, tag, nil, nil, nil)]
- elsif tag == sorted_tags.last
- # Last Interval: Generate from last Tag to HEAD
- changes = searchGitLog(repo, repo.head.target, tag.target, logger)
- logger.info("Tag #{tag.name} to HEAD: #{changes.count} changes")
- changeLogs += [Changelog.new(changes, nil, tag, nil, nil)]
else
# Normal interval: Generate from one Tag to the next Tag
previousTag = sorted_tags[index-1]
|
fix(log): complete log should work correctly now
|
iv-mexx_git-releaselog
|
train
|
rb
|
f8e3e1670d8f826eb7cbedf70f26712f7b3f7e7c
|
diff --git a/ipyvolume/test_all.py b/ipyvolume/test_all.py
index <HASH>..<HASH> 100644
--- a/ipyvolume/test_all.py
+++ b/ipyvolume/test_all.py
@@ -116,7 +116,7 @@ def test_bokeh():
scatter = p3.scatter(x, y, z)
tools = "wheel_zoom,box_zoom,box_select,lasso_select,help,reset,"
- p = figure(title="E Lz space", tools=tools, webgl=True, width=500, height=500)
+ p = figure(title="E Lz space", tools=tools, width=500, height=500)
r = p.circle(x, y, color="navy", alpha=0.2)
ipyvolume.bokeh.link_data_source_selection_to_widget(r.data_source, scatter, 'selected')
|
test: fix: dont use the webgl backend, bokeh changed that api
|
maartenbreddels_ipyvolume
|
train
|
py
|
338ba7dc059a8a2ae12eb82e173591dc5edfdcbe
|
diff --git a/python/setup.py b/python/setup.py
index <HASH>..<HASH> 100755
--- a/python/setup.py
+++ b/python/setup.py
@@ -108,7 +108,7 @@ if platform.system() == 'Darwin':
setup(
name='neuroglancer',
- version='1.1.5',
+ version='1.1.6',
description='Python data backend for neuroglancer, a WebGL-based viewer for volumetric data',
author='Jeremy Maitin-Shepard, Jan Funke',
author_email='jbms@google.com, jfunke@iri.upc.edu',
|
chore(python): bump package version to <I>
|
google_neuroglancer
|
train
|
py
|
62347d49abcb2edeb4e649cfb7f2f9cdc403c40e
|
diff --git a/lib/anyway/rails/config.rb b/lib/anyway/rails/config.rb
index <HASH>..<HASH> 100644
--- a/lib/anyway/rails/config.rb
+++ b/lib/anyway/rails/config.rb
@@ -62,7 +62,7 @@ module Anyway
creds_config.deep_merge!(::Rails.application.credentials.public_send(name) || {})
- creds_config.deep_merge!(load_from_local_credentials(name: name)) if Anyway::Settings.use_local_files
+ creds_config.deep_merge!(load_from_local_credentials(name: name) || {}) if Anyway::Settings.use_local_files
creds_config
end
@@ -76,7 +76,7 @@ module Anyway
key_path: ::Rails.root.join("config/credentials/local.key")
)
- creds.public_send(name) || {}
+ creds.public_send(name)
end
def default_config_path(name)
|
fix: bug with missing local credentials
Fixes #<I>
|
palkan_anyway_config
|
train
|
rb
|
6c86eb9712a87f778ada2129d826c324790df6f8
|
diff --git a/java-profiler/synth.py b/java-profiler/synth.py
index <HASH>..<HASH> 100644
--- a/java-profiler/synth.py
+++ b/java-profiler/synth.py
@@ -28,6 +28,3 @@ for version in versions:
)
java.common_templates()
-
-# TODO: Remove this before publishing to the staging repository
-java.custom_templates(["java_library/README.md"])
\ No newline at end of file
|
chore: remove README gen from primary synth (#<I>)
|
googleapis_google-cloud-java
|
train
|
py
|
c55e7373051a489cda535e32c22888ebb82db66b
|
diff --git a/commitlint.config.js b/commitlint.config.js
index <HASH>..<HASH> 100644
--- a/commitlint.config.js
+++ b/commitlint.config.js
@@ -24,7 +24,8 @@ const applyCustomScope = () => {
'scripts',
'shared',
'packages',
- 'publish'
+ 'publish',
+ 'vscode'
)
return config
})
|
chore(other): add vscode commit scope
|
telus_tds-core
|
train
|
js
|
00c14cdf24037cc8c1ba3b5e43bdab8ee7461077
|
diff --git a/edx_rest_framework_extensions/auth/jwt/authentication.py b/edx_rest_framework_extensions/auth/jwt/authentication.py
index <HASH>..<HASH> 100644
--- a/edx_rest_framework_extensions/auth/jwt/authentication.py
+++ b/edx_rest_framework_extensions/auth/jwt/authentication.py
@@ -59,12 +59,6 @@ class JwtAuthentication(JSONWebTokenAuthentication):
return get_setting('JWT_PAYLOAD_MERGEABLE_USER_ATTRIBUTES')
def authenticate(self, request):
- # latest drf-jwt version throws error for any other value other than jwt. So returns None and pass it to other
- # Authentication class
- auth_header_value = request.environ.get('HTTP_AUTHORIZATION')
- if auth_header_value and not auth_header_value.lower().startswith('jwt'):
- return None
-
try:
user_and_auth = super().authenticate(request)
|
refactor: remove check for non-jwt tokens
At one point, drf-jwt had an issue introduced where it was raising an
error instead of returning None for non-jwt tokens, for example, bearer
tokens. A check was temporarily added to JwtAuthentication to ensure
that we continued to return None.
Since then, our team got a more permanent fix merged upstream in:
<URL>
|
edx_edx-drf-extensions
|
train
|
py
|
b37e23aa662389ca533313103ecde42f77fba235
|
diff --git a/api/src/opentrons/protocol_api/protocol_context.py b/api/src/opentrons/protocol_api/protocol_context.py
index <HASH>..<HASH> 100644
--- a/api/src/opentrons/protocol_api/protocol_context.py
+++ b/api/src/opentrons/protocol_api/protocol_context.py
@@ -669,7 +669,15 @@ class ProtocolContext(CommandPublisher):
is useful for determining if a slot in the deck is free. Rather than
filtering the objects in the deck map yourself, you can also use
:py:attr:`loaded_labwares` to see a dict of labwares and
- :py:attr:`loaded_modules` to see a dict of modules.
+ :py:attr:`loaded_modules` to see a dict of modules. For advanced
+ control you can delete an item of labware from the deck with
+ e.g. ``del protocol.deck['1']`` to free a slot for new labware.
+ (Note that for each slot only the last labware used in a command will
+ be available for calibration in the OpenTrons UI, and that the
+ tallest labware on the deck will be calculated using only currently
+ loaded labware, meaning that the labware loaded should always
+ reflect the labware physically on the deck (or be higher than the
+ labware on the deck).
"""
return self._deck_layout
|
fix(api): Document deck slot deletion (#<I>)
Document how to delete labware from a slot to load new labware mid-protocol. A somewhat popular request: #<I>.
|
Opentrons_opentrons
|
train
|
py
|
da6309715a1d1340f3782dc104ff9f4c5e3bc477
|
diff --git a/src/route-loading.js b/src/route-loading.js
index <HASH>..<HASH> 100644
--- a/src/route-loading.js
+++ b/src/route-loading.js
@@ -116,11 +116,9 @@ function resolveComponent(routeLoader, router, viewPortPlan) {
}
function getComponent(routerViewPort) {
- try {
- resolve(routerViewPort.getComponent(type, createChildRouter));
- } catch(error){
- reject(error);
- }
+ routerViewPort.getComponent(type, createChildRouter, viewPortPlan.config)
+ .then(resolve)
+ .catch(error);
}
if (possibleRouterViewPort) {
|
feat(route-loading): enable async view port component creation
Previously, the only part of loading that was asynchronous was done
through the route loader, which was expected to load the entire
component type. Now we make the getComponent call async as well,
allowing us to split instantiation into two parts. By doing this, we
can now support getViewStrategy for view model instances as well as
route configured views and view strategies. The details of that
implementation are in the templating-router library.
|
aurelia_router
|
train
|
js
|
ed981ae220fd93e6efdacc0151cc957e07eca6d1
|
diff --git a/src/consumer/index.js b/src/consumer/index.js
index <HASH>..<HASH> 100644
--- a/src/consumer/index.js
+++ b/src/consumer/index.js
@@ -141,7 +141,7 @@ module.exports = ({
/**
* @param {string | RegExp} topic
- * @param {string} [fromBeginning=false]
+ * @param {boolean} [fromBeginning=false]
* @return {Promise}
*/
const subscribe = async ({ topic, fromBeginning = false }) => {
|
fix: fromBeginning should be declared as boolean
|
tulios_kafkajs
|
train
|
js
|
2b025181b7df4179e4e7ef012b7b2abc9d12a702
|
diff --git a/packages/ringcentral-widgets/containers/CallCtrlPage/index.js b/packages/ringcentral-widgets/containers/CallCtrlPage/index.js
index <HASH>..<HASH> 100644
--- a/packages/ringcentral-widgets/containers/CallCtrlPage/index.js
+++ b/packages/ringcentral-widgets/containers/CallCtrlPage/index.js
@@ -168,7 +168,15 @@ function mapToFunctions(_, {
onMute: sessionId => webphone.mute(sessionId),
onUnmute: sessionId => webphone.unmute(sessionId),
onHold: sessionId => webphone.hold(sessionId),
- onUnhold: sessionId => webphone.unhold(sessionId),
+ onUnhold(sessionId) {
+ const mergingPair = conferenceCall && conferenceCall.mergingPair;
+ if (mergingPair && sessionId !== mergingPair.toSessionId) {
+ // close merging pair to close the merge call if resume a call
+ conferenceCall.closeMergingPair();
+ }
+
+ webphone.unhold(sessionId);
+ },
onRecord: sessionId => webphone.startRecord(sessionId),
onStopRecord: sessionId => webphone.stopRecord(sessionId),
sendDTMF: (value, sessionId) => webphone.sendDTMF(value, sessionId),
|
fix(CallCtrlPage): fix the mergingPair is not clear when unhold a call in CallCtrlPage (#<I>)
|
ringcentral_ringcentral-js-widgets
|
train
|
js
|
77c5700a72deafa71da2214ad0e8b5a4b84d0e67
|
diff --git a/src/useSprings.js b/src/useSprings.js
index <HASH>..<HASH> 100644
--- a/src/useSprings.js
+++ b/src/useSprings.js
@@ -87,6 +87,6 @@ export const useSprings = (length, propsArg, deps) => {
return () => state.springs.forEach(s => s.destroy())
}, [])
- const values = springs.map(s => s.animated)
+ const values = springs.map(s => ({ ...s.animated }))
return isFn ? [values, update, stop] : values
}
|
fix: make useSpring return a fresh object
Otherwise, users can accidentally mutate the internal Controller state.
|
react-spring_react-spring
|
train
|
js
|
73cc1cc4c93c476edd64072caec8d10d5e75cc8f
|
diff --git a/spec/interface_examples.js b/spec/interface_examples.js
index <HASH>..<HASH> 100644
--- a/spec/interface_examples.js
+++ b/spec/interface_examples.js
@@ -281,19 +281,19 @@ sharedExamplesFor('Lazy Vars Interface', function(getVar) {
return getVar('model').value;
});
- describe('suite which defines variable used in parent suite', () => {
+ describe('suite which defines variable used in parent suite', function() {
def('value', function() {
return { x: 5 };
});
subject(function() {
- return getVar('subject').x
+ return getVar('subject').x;
});
- it('returns 5', () => {
- expect(getVar('subject')).to.equal(5)
+ it('returns 5', function() {
+ expect(getVar('subject')).to.equal(5);
})
- })
- })
+ });
+ });
});
});
|
fix(test): replaces arrow function with regular one
|
stalniy_bdd-lazy-var
|
train
|
js
|
306335f98765adde142703143f445e694167d5e9
|
diff --git a/components/SimilarityGraph/index.js b/components/SimilarityGraph/index.js
index <HASH>..<HASH> 100644
--- a/components/SimilarityGraph/index.js
+++ b/components/SimilarityGraph/index.js
@@ -4,7 +4,7 @@ import d3 from 'd3';
import cola from 'webcola';
export default class SimilarityGraph extends VisComponent {
- constructor (el, {data, threshold = 0, linkDistance = 100, nodeRadius = 10}) {
+ constructor (el, {data, threshold = 0, linkDistance = 100, size = 10}) {
super(el);
this.data = data;
@@ -24,8 +24,8 @@ export default class SimilarityGraph extends VisComponent {
const nodes = this.nodes = this.data.map(d => ({
id: d.id,
color: d.color,
- width: 2 * nodeRadius,
- height: 2 * nodeRadius
+ width: 2 * size,
+ height: 2 * size
}));
// Construct an index map into the nodes list.
@@ -67,7 +67,7 @@ export default class SimilarityGraph extends VisComponent {
this.nodeSelection.enter()
.append('circle')
.classed('node', true)
- .attr('r', nodeRadius)
+ .attr('r', size)
.style('stroke', 'black')
.style('fill', d => colormap(d.color))
.style('cursor', 'crosshair')
|
refactor(SimilarityGraph): rename "nodeRadius" to "size"
|
Kitware_candela
|
train
|
js
|
739aa71ccec343ccd14aad9c09e0f43d28228452
|
diff --git a/src/index.js b/src/index.js
index <HASH>..<HASH> 100644
--- a/src/index.js
+++ b/src/index.js
@@ -105,9 +105,11 @@ module.exports.sync = function findBabelConfigSync(start, depth = INFINITY) {
}
}
- if (loopLeft-- === 0) {
+ if (loopLeft === 0) {
return nullConf;
}
+
+ loopLeft -= 1;
} while (dir !== (dir = path.dirname(dir)));
return nullConf;
|
refactor: Fix eslint errors
|
tleunen_find-babel-config
|
train
|
js
|
3290e3d8e2ea1c57c123b4e3318bef427784f191
|
diff --git a/packages/api-generator/src/maps/v-data-table.js b/packages/api-generator/src/maps/v-data-table.js
index <HASH>..<HASH> 100644
--- a/packages/api-generator/src/maps/v-data-table.js
+++ b/packages/api-generator/src/maps/v-data-table.js
@@ -1,6 +1,6 @@
const deepmerge = require('../helpers/merge')
const { DataDefaultScopedSlotProps, DataOptions } = require('./v-data')
-const { DataIteratorEvents, DataIteratorProps, DataIteratorItemScopedProps } = require('./v-data-iterator')
+const { DataIteratorEvents, DataIteratorProps, DataIteratorSlots, DataIteratorItemScopedProps } = require('./v-data-iterator')
const { DataFooterPageTextScopedProps } = require('./v-data-footer')
const TableHeader = {
@@ -99,7 +99,7 @@ module.exports = {
default: '(value: any, search: string | null, item: any) => boolean',
},
]),
- slots: DataTableSlots,
+ slots: deepmerge(DataTableSlots, DataIteratorSlots),
events: DataTableEvents,
},
TableHeader,
|
docs(VDataTable): readd missing slots
|
vuetifyjs_vuetify
|
train
|
js
|
e122686a1a7ac81ef52649a4596b6ecd6d213b2c
|
diff --git a/test/test-openssh.js b/test/test-openssh.js
index <HASH>..<HASH> 100644
--- a/test/test-openssh.js
+++ b/test/test-openssh.js
@@ -363,6 +363,11 @@ function setup(self, clientcfg, servercfg) {
'-o', 'IdentitiesOnly=yes',
'-o', 'BatchMode=yes',
'-o', 'VerifyHostKeyDNS=no',
+
+ // OpenSSH 7.0 disables DSS/DSA host and user key support by
+ // default, so we explicitly enable it here
+ '-o', 'HostKeyAlgorithms=+ssh-dss',
+
'-vvvvvv',
'-T',
'-o', 'KbdInteractiveAuthentication=no',
|
test: re-enable OpenSSH DSS/DSA key support
|
mscdex_ssh2
|
train
|
js
|
79e1744615529edfbab224ace71ae9af83228f3e
|
diff --git a/lib/core/request.js b/lib/core/request.js
index <HASH>..<HASH> 100644
--- a/lib/core/request.js
+++ b/lib/core/request.js
@@ -146,7 +146,7 @@ class Request {
onUpgrade (statusCode, headers, socket) {
assert(!this.aborted)
assert(this.upgrade)
- this[kHandler].onUpgrade(statusCode, headers, socket)
+ return this[kHandler].onUpgrade(statusCode, headers, socket)
}
onComplete (trailers) {
|
refactor: return onUpgrade
|
mcollina_undici
|
train
|
js
|
076a2145dba692dbc18e5341c0223de1996a4f09
|
diff --git a/tests/test_repro.py b/tests/test_repro.py
index <HASH>..<HASH> 100644
--- a/tests/test_repro.py
+++ b/tests/test_repro.py
@@ -272,6 +272,8 @@ class TestReproChangedDirData(TestDvc):
stages = self.dvc.reproduce(stage.path)
self.assertEqual(len(stages), 0)
+ sleep()
+
with open(self.DATA_SUB, 'a') as fd:
fd.write('add')
|
test: don't forget to sleep before modifying a file
|
iterative_dvc
|
train
|
py
|
1fc9a187535aa1ff1d0d4066c00927963150e1b8
|
diff --git a/lib/server/index.js b/lib/server/index.js
index <HASH>..<HASH> 100644
--- a/lib/server/index.js
+++ b/lib/server/index.js
@@ -130,6 +130,12 @@ module.exports.start = function () {
const assets = require('../assets');
app.use(assets);
+ // Catch and re-throw uncaught socket.io eceptions, so that things like Rollbar
+ // can catch and report them.
+ io.on('error', err => {
+ throw err;
+ });
+
io.on('connection', socket => {
log.trace('New socket connection: ID %s with IP %s', socket.id, socket.handshake.address);
|
fix(server): catch and re-throw otherwise uncaught socket.io errors
|
nodecg_nodecg
|
train
|
js
|
a93b3c0fe1ec4680fbb34fc29ac8714b9a8c7da4
|
diff --git a/googlemaps/client.py b/googlemaps/client.py
index <HASH>..<HASH> 100644
--- a/googlemaps/client.py
+++ b/googlemaps/client.py
@@ -54,6 +54,7 @@ class Client:
retry_timeout=60, requests_kwargs=None,
queries_per_second=50, channel=None,
retry_over_query_limit=True, experience_id=None,
+ requests_session=None,
base_url=_DEFAULT_BASE_URL):
"""
:param key: Maps API key. Required, unless "client_id" and
@@ -116,6 +117,9 @@ class Client:
implemented. See the official requests docs for more info:
http://docs.python-requests.org/en/latest/api/#main-interface
:type requests_kwargs: dict
+
+ :param requests_session: Reused persistent session for flexibility.
+ :type requests_session: requests.Session
:param base_url: The base URL for all requests. Defaults to the Maps API
server. Should not have a trailing slash.
@@ -136,7 +140,7 @@ class Client:
"and hyphen (-) characters are allowed. If used without "
"client_id, it must be 0-999.")
- self.session = requests.Session()
+ self.session = requests_session or requests.Session()
self.key = key
if timeout and (connect_timeout or read_timeout):
|
feat: allow passings requests session (#<I>)
|
googlemaps_google-maps-services-python
|
train
|
py
|
a15da6bbde069cf8e04270981dd87290eaf1cc76
|
diff --git a/js/src/files.js b/js/src/files.js
index <HASH>..<HASH> 100644
--- a/js/src/files.js
+++ b/js/src/files.js
@@ -1012,10 +1012,8 @@ module.exports = (common) => {
before((done) => ipfs.files.add(smallFile.data, done))
it('stat outside of mfs', function (done) {
- if (!withGo) {
- console.log('Not supported in js-ipfs yet')
- this.skip()
- }
+ console.log('Not supported in js-ipfs or go-ipfs yet')
+ this.skip()
ipfs.files.stat('/ipfs/' + smallFile.cid, (err, stat) => {
expect(err).to.not.exist()
|
test: files.stat is not supported by go-ipfs for non mfs files yet
|
ipfs_interface-js-ipfs-core
|
train
|
js
|
68fb0b4c7e420df4cfa6239d256fc4d0a9e32ff1
|
diff --git a/sentry_sdk/worker.py b/sentry_sdk/worker.py
index <HASH>..<HASH> 100644
--- a/sentry_sdk/worker.py
+++ b/sentry_sdk/worker.py
@@ -99,11 +99,14 @@ class BackgroundWorker(object):
# type: (float, Optional[Any]) -> None
initial_timeout = min(0.1, timeout)
if not self._timed_queue_join(initial_timeout):
- pending = self._queue.qsize()
+ pending = self._queue.qsize() + 1
logger.debug("%d event(s) pending on flush", pending)
if callback is not None:
callback(pending, timeout)
- self._timed_queue_join(timeout - initial_timeout)
+
+ if not self._timed_queue_join(timeout - initial_timeout):
+ pending = self._queue.qsize() + 1
+ logger.error("flush timed out, dropped %s events", pending)
def submit(self, callback):
# type: (Callable[[], None]) -> None
@@ -115,7 +118,7 @@ class BackgroundWorker(object):
def on_full_queue(self, callback):
# type: (Optional[Any]) -> None
- logger.debug("background worker queue full, dropping event")
+ logger.error("background worker queue full, dropping event")
def _target(self):
# type: () -> None
|
fix(worker): Log data-dropping events with error (#<I>)
|
getsentry_sentry-python
|
train
|
py
|
4c3de844a8fa76bbafd0571d0ebfdf7372721d3f
|
diff --git a/instructions.js b/instructions.js
index <HASH>..<HASH> 100644
--- a/instructions.js
+++ b/instructions.js
@@ -22,8 +22,9 @@ async function copyVowFile (cli, appRoot) {
async function copyExampleTestCase (cli, appRoot) {
try {
- await cli.copy(path.join(__dirname, 'templates/unitTest.js'), path.join(appRoot, 'test/unit/example.spec.js'))
- cli.command.completed('create', 'test/unit/example.spec.js')
+ const template = await cli.command.readFile(path.join(__dirname, 'templates/unitTest.mustache'), 'utf-8')
+ await cli.command.generateFile(path.join(appRoot, 'test/unit/Example.spec.js'), template, { name: 'Example' })
+ cli.command.completed('create', 'test/unit/Example.spec.js')
} catch (error) {
// ignore error
}
|
refactor(instructions): use unit test template to generate test file
|
adonisjs_adonis-vow
|
train
|
js
|
23213f46373282f6a089c5a65407b45e391da290
|
diff --git a/lib/util/index.js b/lib/util/index.js
index <HASH>..<HASH> 100644
--- a/lib/util/index.js
+++ b/lib/util/index.js
@@ -1415,17 +1415,6 @@ function join(root, dir) {
}
exports.join = join;
-function mergeRuleProps(origin, add) {
- if (origin) {
- origin.list = origin.list || [extend({}, origin)];
- }
- if (add) {
- add.list = add.list || [extend({}, add)];
- }
- if (origin && add) {
- origin.list = add.list.concat(origin.list);
- }
-}
function resolveProperties(list) {
var result = {};
@@ -1624,11 +1613,6 @@ function mergeRules(req, add, isResRules) {
var origin = req.rules;
var origAdd = add;
add = add || {};
- mergeRuleProps(add['delete'], origin['delete']);
- mergeRuleProps(add.filter, origin.filter);
- mergeRuleProps(add.disable, origin.disable);
- mergeRuleProps(add.ignore, origin.ignore);
- mergeRuleProps(add.enable, origin.enable);
var merge = function(protocol) {
var rule = mergeRule(origin[protocol], add[protocol]);
if (rule) {
|
refactor: mergeRuleProps -> mergeRule
|
avwo_whistle
|
train
|
js
|
5908ca96691f8e6b23bfa3806f708ec7d86faaec
|
diff --git a/lib/canonicalizer.js b/lib/canonicalizer.js
index <HASH>..<HASH> 100644
--- a/lib/canonicalizer.js
+++ b/lib/canonicalizer.js
@@ -15,6 +15,7 @@ class Canonicalizer {
canonicalizeQuery(query) {
const encodeComponent = component =>
encodeURIComponent(component)
+ .replace(/'/g, '%27')
.replace(/\(/g, '%28')
.replace(/\)/g, '%29');
|
fix(canonicalizer): encode single quote for compatibility reasons
|
emartech_escher-js
|
train
|
js
|
5818432a9c7fa694de4523d0320c56b5c7756f2f
|
diff --git a/src/utils/lng-from-req.js b/src/utils/lng-from-req.js
index <HASH>..<HASH> 100644
--- a/src/utils/lng-from-req.js
+++ b/src/utils/lng-from-req.js
@@ -1,5 +1,9 @@
export default (req) => {
+ if (!req.i18n) {
+ return null
+ }
+
const { allLanguages, defaultLanguage, fallbackLng } = req.i18n.options
const fallback = fallbackLng || defaultLanguage
|
fix: Protect against req.i<I>n being undefined in lng-from-req (#<I>)
|
isaachinman_next-i18next
|
train
|
js
|
66985ac293e89cf6d163570f95cb6caa9ad5553e
|
diff --git a/addon/server.js b/addon/server.js
index <HASH>..<HASH> 100644
--- a/addon/server.js
+++ b/addon/server.js
@@ -60,7 +60,8 @@ const defaultRouteOptions = {
};
const defaultPassthroughs = [
- 'http://localhost:0/chromecheckurl'
+ 'http://localhost:0/chromecheckurl', // mobile chrome
+ 'http://localhost:30820/socket.io' // electron
];
export { defaultPassthroughs };
|
refactor(server): add default passthrough for electron's localhost socket (#<I>)
|
samselikoff_ember-cli-mirage
|
train
|
js
|
7047c349299ea829b0d43efedd191782dad10219
|
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
@@ -59,7 +59,9 @@ module.exports = async (exception, options = {}) => {
? serverless.isInvokedByGlobalInstallation
: passedIsInvokedByGlobalInstallation;
- if (isInvokedByGlobalInstallation) {
+ // If provided serverless instance is a local fallback, and we're not in context of it
+ // Pass error handling to this local fallback implementation
+ if (isInvokedByGlobalInstallation && !(await resolveIsLocallyInstalled())) {
const localServerlessPath = await resolveLocalServerlessPath();
try {
|
fix(CLI): Fallback to local version only if we're not in its context
|
serverless_serverless
|
train
|
js
|
d3cee230606bcbb7b6427166f13cde586a9700e7
|
diff --git a/packages/components/bolt-carousel/src/carousel.js b/packages/components/bolt-carousel/src/carousel.js
index <HASH>..<HASH> 100644
--- a/packages/components/bolt-carousel/src/carousel.js
+++ b/packages/components/bolt-carousel/src/carousel.js
@@ -182,18 +182,6 @@ class BoltCarousel extends withLitHtml {
if (idealNumberOfSlides === 'auto' || idealNumberOfSlides === 1) {
slidesPerView = 1;
- } else if (
- this.props.loop &&
- idealNumberOfSlides &&
- this.numberOfChildren >= idealNumberOfSlides
- ) {
- slidesPerView = idealNumberOfSlides;
- } else if (
- this.props.loop &&
- idealNumberOfSlides &&
- this.numberOfChildren < idealNumberOfSlides
- ) {
- slidesPerView = this.numberOfChildren;
} else if (idealNumberOfSlides) {
slidesPerView = idealNumberOfSlides;
} else {
|
refactor: remove unused JS logic since loop support is currently deactivated
|
bolt-design-system_bolt
|
train
|
js
|
bcf34459c72460842f0fcaca6ccd585422475ac1
|
diff --git a/lib/seoshop-api/api/order.rb b/lib/seoshop-api/api/order.rb
index <HASH>..<HASH> 100644
--- a/lib/seoshop-api/api/order.rb
+++ b/lib/seoshop-api/api/order.rb
@@ -17,7 +17,7 @@ module Seoshop
def get_order_products(order_id)
response = get("#{@shop_language}/orders/#{order_id}/products.json")
- response.body ? response.body['order_products'] : false
+ response.body ? response.body['orderProducts'] : false
end
end
end
|
fix(orderProducts): now we are checking for the correct key
|
YotpoLtd_seoshop-api
|
train
|
rb
|
28ece9116a553914a679b8929f693b3a13a469f6
|
diff --git a/core/src/main/java/org/camunda/connect/Connectors.java b/core/src/main/java/org/camunda/connect/Connectors.java
index <HASH>..<HASH> 100644
--- a/core/src/main/java/org/camunda/connect/Connectors.java
+++ b/core/src/main/java/org/camunda/connect/Connectors.java
@@ -71,6 +71,13 @@ public class Connectors {
return (C) INSTANCE.getConnectorById(connectorId);
}
+ /**
+ * @return all register connectors
+ */
+ public static Set<Connector> getAvailableConnectors() {
+ return INSTANCE.getAllAvailableConnectors();
+ }
+
// instance //////////////////////////////////////////////////////////
protected Map<String, Connector> availableConnectors;
@@ -78,7 +85,7 @@ public class Connectors {
/**
* @return all register connectors
*/
- public Set<Connector> getAvailableConnectors() {
+ public Set<Connector> getAllAvailableConnectors() {
ensureConnectorProvidersInitialized();
return new HashSet<Connector>(availableConnectors.values());
}
|
chore(core): add static connectors method for easy use
related to #CAM-<I>
|
camunda_camunda-connect
|
train
|
java
|
0090a655294edcf4aad3a2edf0eb4e7694121828
|
diff --git a/spec/operators/publishReplay-spec.js b/spec/operators/publishReplay-spec.js
index <HASH>..<HASH> 100644
--- a/spec/operators/publishReplay-spec.js
+++ b/spec/operators/publishReplay-spec.js
@@ -115,7 +115,7 @@ describe('Observable.prototype.publishReplay()', function () {
});
describe('with refCount()', function () {
- it('should connect when first subscriber subscribes', function() {
+ it('should connect when first subscriber subscribes', function () {
var source = cold( '-1-2-3----4-|');
var sourceSubs = ' ^ !';
var replayed = source.publishReplay(1).refCount();
|
style(publishReplay-spec): fix lint
|
ReactiveX_rxjs
|
train
|
js
|
14272f2aa257cb38d385f2c801f9943650f54841
|
diff --git a/persistence/sql/migratest/migration_test.go b/persistence/sql/migratest/migration_test.go
index <HASH>..<HASH> 100644
--- a/persistence/sql/migratest/migration_test.go
+++ b/persistence/sql/migratest/migration_test.go
@@ -59,7 +59,12 @@ func TestMigrations(t *testing.T) {
url = "mysql://" + url
}
- d := driver.New(pflag.NewFlagSet("", pflag.ContinueOnError), driver.ForceConfigValue(config.KeyDSN, url))
+ d := driver.New(
+ pflag.NewFlagSet("", pflag.ContinueOnError),
+ driver.ForceConfigValue(config.KeyDSN, url),
+ driver.DisablePreloading(),
+ driver.DisableValidation(),
+ )
var dbx *sqlx.DB
require.NoError(t,
dbal.Connect(url, logrusx.New("", ""), func() error {
|
test: skip preloading in migration tests
|
ory_hydra
|
train
|
go
|
aea69d350403a9dae2fdf8fe3a8f79d2396f3f85
|
diff --git a/src/core/components/repo.js b/src/core/components/repo.js
index <HASH>..<HASH> 100644
--- a/src/core/components/repo.js
+++ b/src/core/components/repo.js
@@ -19,7 +19,15 @@ module.exports = function repo (self) {
version: promisify((callback) => {
self._repo._isInitialized(err => {
if (err) {
- if (/ENOENT|not yet initialized/.test(err.message)) {
+ // TODO: (dryajov) This is really hacky, there must be a better way
+ const match = [
+ /Key not found in database \[\/version\]/,
+ /ENOENT/,
+ /not yet initialized/
+ ].some((m) => {
+ return m.test(err.message)
+ })
+ if (match) {
// this repo has not been initialized
return callback(null, repoVersion)
}
|
fix: match error if repo doesnt exist (#<I>)
|
ipfs_js-ipfs
|
train
|
js
|
5715eb39eef8c6116f96ea199c09b17f48e1dedf
|
diff --git a/engine/watcher.go b/engine/watcher.go
index <HASH>..<HASH> 100644
--- a/engine/watcher.go
+++ b/engine/watcher.go
@@ -91,9 +91,18 @@ func (self *JobWatcher) AddJobWatch(watch *job.JobWatch) bool {
}
} else {
for i := 1; i <= watch.Count; i++ {
- m := pickRandomMachine(self.machines)
name := fmt.Sprintf("%d.%s", i, watch.Payload.Name)
j, _ := job.NewJob(name, nil, watch.Payload)
+
+ var m *machine.Machine
+ // Check if this job was schedule somewhere already
+ if state := self.registry.GetJobState(j); state != nil {
+ log.Printf("Found job already schedule to machine")
+ m = state.Machine
+ } else {
+ m = pickRandomMachine(self.machines)
+ }
+
log.Printf("EventJobWatchCreated(%s): adding to schedule job=%s machine=%s", watch.Payload.Name, name, m.BootId)
sched.Add(*j, *m)
}
|
fix(JobWatcher): find machines running jobs before attempting to reschedule
|
coreos_fleet
|
train
|
go
|
bfee71ad7ff52e96faaec4648732b4b4f63905bb
|
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, find_packages
requires = [
- 'flask ~> 0.12.3',
+ 'flask ~> 1.0.0',
'Flask-RESTful==0.3.2',
'Flask-Script==2.0.5',
'Flask-SQLAlchemy==2.0',
|
chore(setup): upgrade flask package version
mitigate CVE-<I>-<I>
|
cbrand_vpnchooser
|
train
|
py
|
ca01938b600db19360114bb4f395f708f43cae6f
|
diff --git a/dependencyManager.js b/dependencyManager.js
index <HASH>..<HASH> 100644
--- a/dependencyManager.js
+++ b/dependencyManager.js
@@ -58,7 +58,7 @@ function addDependency(deps, name, version, force) {
function getRequiredDeps(packageJson) {
const deps = {
- "webpack": "~4.8.3",
+ "webpack": "~4.6.0",
"webpack-cli": "~2.1.3",
"webpack-bundle-analyzer": "~2.13.0",
"webpack-sources": "~1.1.0",
|
chore: downgrade webpack version to <I> (#<I>)
Caused by: <URL>
|
NativeScript_nativescript-dev-webpack
|
train
|
js
|
f8bc636b0efd16211636ff6342925973c64919ec
|
diff --git a/test/fixtures/plugins/heartbeat-plugin/components/state-resources/heart-beat/index.js b/test/fixtures/plugins/heartbeat-plugin/components/state-resources/heart-beat/index.js
index <HASH>..<HASH> 100644
--- a/test/fixtures/plugins/heartbeat-plugin/components/state-resources/heart-beat/index.js
+++ b/test/fixtures/plugins/heartbeat-plugin/components/state-resources/heart-beat/index.js
@@ -1,15 +1,11 @@
class Heartbeat {
- async run (event, context, done) {
+ async run (event, context) {
const heartbeat = {
heart: 'ba-dum-dum'
}
- const executionDescription = await context.sendTaskHeartbeat(
- { heartbeat }
- )
-
- done(executionDescription)
+ context.sendTaskHeartbeat({ heartbeat })
} // run
} // Heartbeat
|
test: test: Remove done callback from Heartbeat.run
|
wmfs_tymly-rbac-plugin
|
train
|
js
|
ef05ea3612d74810deab0f4623b5a0647486ee76
|
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
@@ -95,7 +95,7 @@ function mdListItemDirective($mdAria, $mdConstant, $mdUtil, $timeout) {
tEl[0].setAttribute('role', 'listitem');
- if (tAttrs.ngIf || tAttrs.ngClick || tAttrs.ngHref || tAttrs.href || tAttrs.uiSref || tAttrs.ngAttrUiSref) {
+ if (tAttrs.ngClick || tAttrs.ngHref || tAttrs.href || tAttrs.uiSref || tAttrs.ngAttrUiSref) {
wrapIn('button');
} else {
for (var i = 0, type; type = proxiedTypes[i]; ++i) {
|
fix(list): don't turn list-items with ngIf into a button.
|
angular_material
|
train
|
js
|
fff69f32276c30280b7fd17d7457940514293c00
|
diff --git a/ibis/backends/clickhouse/registry.py b/ibis/backends/clickhouse/registry.py
index <HASH>..<HASH> 100644
--- a/ibis/backends/clickhouse/registry.py
+++ b/ibis/backends/clickhouse/registry.py
@@ -635,6 +635,11 @@ def _clip(translator, expr):
return arg
+def _struct_field(translator, expr):
+ op = expr.op()
+ return f"{translator.translate(op.arg)}.`{op.field}`"
+
+
# TODO: clickhouse uses different string functions
# for ascii and utf-8 encodings,
@@ -790,6 +795,7 @@ operation_registry = {
ops.Strftime: _fixed_arity("formatDateTime", 2),
ops.ArrayColumn: _array_column,
ops.Clip: _clip,
+ ops.StructField: _struct_field,
}
|
feat(clickhouse): implement struct field access
|
ibis-project_ibis
|
train
|
py
|
a750e7d0008ac99c960d642d0c8ed0dbfa0a918a
|
diff --git a/packages/wxa-cli/src/builder.js b/packages/wxa-cli/src/builder.js
index <HASH>..<HASH> 100644
--- a/packages/wxa-cli/src/builder.js
+++ b/packages/wxa-cli/src/builder.js
@@ -97,6 +97,7 @@ class Builder {
let md5 = crypto.createHash('md5').update(content).digest('hex');
mdl.content = content;
+ mdl.code = void(0);
isChange = mdl.hash !== md5;
debug('OLD HASH %s, NEW HASH %s', mdl.hash, md5);
}
|
fix(cli): must clean up code for watch mode.
|
wxajs_wxa
|
train
|
js
|
04723be4efdad6398a5c9f2af77ab3675918ba1d
|
diff --git a/packages/@vuepress/core/lib/prepare/loadConfig.js b/packages/@vuepress/core/lib/prepare/loadConfig.js
index <HASH>..<HASH> 100644
--- a/packages/@vuepress/core/lib/prepare/loadConfig.js
+++ b/packages/@vuepress/core/lib/prepare/loadConfig.js
@@ -14,12 +14,12 @@ module.exports = function loadConfig (vuepressDir, bustCache = true) {
// resolve siteConfig
let siteConfig = {}
- if (fs.existsSync(configYmlPath)) {
- siteConfig = parseConfig(configYmlPath)
+ if (fs.existsSync(configPath)) {
+ siteConfig = parseConfig(configPath)
} else if (fs.existsSync(configTomlPath)) {
siteConfig = parseConfig(configTomlPath)
- } else if (fs.existsSync(configPath)) {
- siteConfig = require(configPath)
+ } else if (fs.existsSync(configYmlPath)) {
+ siteConfig = require(configYmlPath)
}
return siteConfig
|
chore: change config load order (#<I>)
|
vuejs_vuepress
|
train
|
js
|
2a50c33242dead2d1c5d81f4cdd078d05d19e016
|
diff --git a/lib/runner.js b/lib/runner.js
index <HASH>..<HASH> 100644
--- a/lib/runner.js
+++ b/lib/runner.js
@@ -34,10 +34,7 @@ module.exports.generateOnly = function(args) {
var elmInstrument = path.join(__dirname, "..", "bin", "elm-instrument");
var coverageDir = path.join(".coverage", "instrumented");
-// elm-test 0.19.0-rev4 does not support absolute paths in
-// elm.json. Therefore we need to compute the new relative
-// paths from the coverage directory
-var fakeElmBinary = path.relative(coverageDir, path.resolve(path.join(__dirname, "..", "bin", "fake-elm")));
+var fakeElmBinary = path.resolve(path.join(__dirname, "..", "bin", "fake-elm"));
function createLogger(args) {
var isJsonOutput = args.report === "json";
|
fix: remove incorrect comment about absolute path support in elm-test
|
zwilias_elm-coverage
|
train
|
js
|
c700622b4fd1ec2fe8e6f153161960340d1f0235
|
diff --git a/lib/handlers/local/manifest.js b/lib/handlers/local/manifest.js
index <HASH>..<HASH> 100644
--- a/lib/handlers/local/manifest.js
+++ b/lib/handlers/local/manifest.js
@@ -3,5 +3,5 @@
module.exports = manifest
function manifest () {
// The tarball handler will take care of it!
- return null
+ return Promise.resolve(null)
}
|
fix(manifest): local manifest fn should return a promise
|
zkat_pacote
|
train
|
js
|
fac823f8811c500e75eff9785e97293866c07ada
|
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100755
--- a/setup.py
+++ b/setup.py
@@ -127,6 +127,7 @@ if __name__ == '__main__':
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
+ "Programming Language :: Python :: 3.9",
"Programming Language :: Python :: Implementation :: CPython",
"Development Status :: 5 - Production/Stable",
'Natural Language :: English',
|
fix(setup): Correct supported python versions.
|
vinci1it2000_schedula
|
train
|
py
|
07d2d56789a158c2a434e2748a5cc96f3a5e029f
|
diff --git a/ratelimit/bucketset.go b/ratelimit/bucketset.go
index <HASH>..<HASH> 100644
--- a/ratelimit/bucketset.go
+++ b/ratelimit/bucketset.go
@@ -89,11 +89,11 @@ func (tbs *TokenBucketSet) GetMaxPeriod() time.Duration {
// debugState returns string that reflects the current state of all buckets in
// this set. It is intended to be used for debugging and testing only.
func (tbs *TokenBucketSet) debugState() string {
- periods := sort.IntSlice(make([]int, 0, len(tbs.buckets)))
+ periods := make([]int64, 0, len(tbs.buckets))
for period := range tbs.buckets {
- periods = append(periods, int(period))
+ periods = append(periods, int64(period))
}
- sort.Sort(periods)
+ sort.Slice(periods, func(i, j int) bool { return periods[i] < periods[j] })
bucketRepr := make([]string, 0, len(tbs.buckets))
for _, period := range periods {
bucket := tbs.buckets[time.Duration(period)]
|
fix: tests on <I>bit arch (#<I>)
|
vulcand_oxy
|
train
|
go
|
73f3895fd15e76ee6f8532336f4e5e69e0e5b8ba
|
diff --git a/src/android/CDVNearITContentListener.java b/src/android/CDVNearITContentListener.java
index <HASH>..<HASH> 100644
--- a/src/android/CDVNearITContentListener.java
+++ b/src/android/CDVNearITContentListener.java
@@ -110,7 +110,7 @@ public class CDVNearITContentListener implements ContentsListener {
try {
Map<String, Object> bundledFeedback = NearITUtils.bundleFeedback(notification);
forwardEvent(
- CDVNearIT.CDVEventType.CDVNE_Event_CustomJSON,
+ CDVNearIT.CDVEventType.CDVNE_Event_Feedback,
bundledFeedback,
trackingInfo,
notification.notificationMessage
|
fix(android): correctly set event type for feedback
|
nearit_Cordova-SDK
|
train
|
java
|
5dc1865b7527e324d8cc142446441742c447ff8a
|
diff --git a/test/helpers/cilium.go b/test/helpers/cilium.go
index <HASH>..<HASH> 100644
--- a/test/helpers/cilium.go
+++ b/test/helpers/cilium.go
@@ -69,7 +69,7 @@ func (s *SSHMeta) EndpointGet(id string) *models.Endpoint {
return nil
}
var data []models.Endpoint
- endpointGetCmd := fmt.Sprintf("endpoint get %s", id)
+ endpointGetCmd := fmt.Sprintf("endpoint get %s -o json", id)
res := s.ExecCilium(endpointGetCmd)
err := res.Unmarshal(&data)
if err != nil {
@@ -337,7 +337,7 @@ func (s *SSHMeta) GetEndpointsIdentityIds() (map[string]string, error) {
func (s *SSHMeta) GetEndpointsNames() ([]string, error) {
data := s.ListEndpoints()
if data.WasSuccessful() == false {
- return nil, fmt.Errorf("`cilium endpoint get` was not successful")
+ return nil, fmt.Errorf("`cilium endpoint list` was not successful")
}
result, err := data.Filter("{ [?(@.status.labels.security-relevant[0]!='reserved:health')].status.external-identifiers.container-name }")
|
test: Always execute "cilium endpoint get" with -o json
|
cilium_cilium
|
train
|
go
|
5f01aef4117511cce70e6500689bf08a80a437ad
|
diff --git a/src/lib/webpack-config.js b/src/lib/webpack-config.js
index <HASH>..<HASH> 100644
--- a/src/lib/webpack-config.js
+++ b/src/lib/webpack-config.js
@@ -407,12 +407,10 @@ const production = config => addPlugins([
mangle: true,
sourceMap: true,
compress: {
- unsafe_comps: true,
properties: true,
keep_fargs: false,
pure_getters: true,
collapse_vars: true,
- unsafe: true,
warnings: false,
screw_ie8: true,
sequences: true,
|
fix(uglify): remove unsafe uglify options
Closes #<I>
|
developit_preact-cli
|
train
|
js
|
4544e73f077a6cd23a13a14d9364be6898330337
|
diff --git a/ipywebrtc/webrtc.py b/ipywebrtc/webrtc.py
index <HASH>..<HASH> 100644
--- a/ipywebrtc/webrtc.py
+++ b/ipywebrtc/webrtc.py
@@ -36,7 +36,8 @@ class MediaStream(DOMWidget):
A MediaStream can be used with:
* :class:`VideoRecorder`: To record a movie
- * :class:`MediaImageRecorder`: To create images/snapshots.
+ * :class:`ImageRecorder`: To create images/snapshots.
+ * :class:`AudioRecorder`: To record audio.
* :class:`WebRTCRoom` (or rather :class:`WebRTCRoomMqtt`): To stream a media stream to a (set of) peers.
"""
|
docs: mention Image and AudioRecorder
|
maartenbreddels_ipywebrtc
|
train
|
py
|
884d46ff7f95e33c40c86e10707d5435cefc08ee
|
diff --git a/lib/operations/rename.js b/lib/operations/rename.js
index <HASH>..<HASH> 100644
--- a/lib/operations/rename.js
+++ b/lib/operations/rename.js
@@ -45,7 +45,7 @@ class RenameOperation extends OperationBase {
new Collection(
coll.s.db,
coll.s.topology,
- coll.databaseName,
+ coll.s.namespace.db,
newName,
coll.s.pkFactory,
coll.s.options
|
fix: maintain internal database name on collection rename
|
mongodb_node-mongodb-native
|
train
|
js
|
6154d8ab3c88ad2b5bb98e33b1dbc01126ccdcd0
|
diff --git a/sample/src/project-status/controls.js b/sample/src/project-status/controls.js
index <HASH>..<HASH> 100644
--- a/sample/src/project-status/controls.js
+++ b/sample/src/project-status/controls.js
@@ -47,7 +47,7 @@ export class Controls {
{ title: 'Waves', link: '#/samples/waves', status: 'done' }
]
}, {
- title: 'Bonus',
+ title: 'Internal',
controls: [
{ title: 'Click counter', link: '#/samples/click-counter', status: 'done' },
{ title: 'Well', status: 'wip' },
|
refactor(project-status): changed category "bonus" to "internal"
|
aurelia-ui-toolkits_aurelia-materialize-bridge
|
train
|
js
|
bac4da9f5f61c9929ae5a36ca6512f27a34ac509
|
diff --git a/lib/tools/ts-inspector.js b/lib/tools/ts-inspector.js
index <HASH>..<HASH> 100644
--- a/lib/tools/ts-inspector.js
+++ b/lib/tools/ts-inspector.js
@@ -38,24 +38,22 @@ var parsePsi_ = function(bytes, pmt) {
switch (type) {
case 'pat':
- if (!pmt.pid) {
- pmt.pid = probe.ts.parsePat(packet);
- }
+ pmt.pid = probe.ts.parsePat(packet);
break;
case 'pmt':
- if (!pmt.table) {
- pmt.table = probe.ts.parsePmt(packet);
- }
+ var table = probe.ts.parsePmt(packet);
+
+ pmt.table = pmt.table || {};
+
+ Object.keys(table).forEach(function(key) {
+ pmt.table[key] = table[key];
+ });
+
break;
default:
break;
}
- // Found the pat and pmt, we can stop walking the segment
- if (pmt.pid && pmt.table) {
- return;
- }
-
startIndex += MP2T_PACKET_LENGTH;
endIndex += MP2T_PACKET_LENGTH;
continue;
|
fix: inspect all program map tables for stream types (#<I>)
We currently have issues with ts files that add stream types after the first program map table as we only look at the first one. So if audio were to be added in a subsequent program map table we wouldn't know to account for it.
|
videojs_mux.js
|
train
|
js
|
ed78b412d86148905eadf264f035bc038a9a2641
|
diff --git a/packages/experimental/micro-journeys/src/status-dialogue-bar.schema.js b/packages/experimental/micro-journeys/src/status-dialogue-bar.schema.js
index <HASH>..<HASH> 100644
--- a/packages/experimental/micro-journeys/src/status-dialogue-bar.schema.js
+++ b/packages/experimental/micro-journeys/src/status-dialogue-bar.schema.js
@@ -2,7 +2,7 @@ const iconSchema = require('@bolt/components-icon/icon.schema.json');
module.exports = {
$schema: 'http://json-schema.org/draft-04/schema#',
- title: 'Micro Journy Status Dialogue Bar',
+ title: 'Micro Journey Status Dialogue Bar',
type: 'object',
properties: {
attributes: {
|
chore(micro-journeys): spelling fix in schema
|
bolt-design-system_bolt
|
train
|
js
|
9630e3ad46d335d42521337faeaa287587ce219a
|
diff --git a/packages/eslint-config-udemy-react-addons/parts/react.js b/packages/eslint-config-udemy-react-addons/parts/react.js
index <HASH>..<HASH> 100644
--- a/packages/eslint-config-udemy-react-addons/parts/react.js
+++ b/packages/eslint-config-udemy-react-addons/parts/react.js
@@ -6,7 +6,7 @@ module.exports = {
// disallow <img> tags in JSX
'react/forbid-elements': ['error', {forbid: ['img']}],
// enforce boolean attributes notation in JSX
- 'react/jsx-boolean-value': ['error', 'never'],
+ 'react/jsx-boolean-value': ['error', 'always'],
// prevent usage of .bind() in JSX props
'react/jsx-no-bind': [
'error',
|
fix: react/jsx-boolean-value - put "always" option instead of "never".
BREAKING CHANGE: explicit true is now required for boolean prop values.
|
udemy_js-tooling
|
train
|
js
|
074d4bda7b253da8c46bf46e53c57bf3f844e61b
|
diff --git a/src/utils/get-scripts.js b/src/utils/get-scripts.js
index <HASH>..<HASH> 100644
--- a/src/utils/get-scripts.js
+++ b/src/utils/get-scripts.js
@@ -32,7 +32,7 @@ const travisCommands = [
'after_success',
'after_failure',
'before_deploy',
- 'deploy',
+ // 'deploy', // currently ignored
'after_deploy',
'after_script',
];
|
fix: ignore deploy in travis commands
|
depcheck_depcheck
|
train
|
js
|
3b2a64f0296e7d11d986b330a67e3067d0735af7
|
diff --git a/tests/test_watch.py b/tests/test_watch.py
index <HASH>..<HASH> 100644
--- a/tests/test_watch.py
+++ b/tests/test_watch.py
@@ -1,4 +1,5 @@
import dramatiq
+import os
import platform
import pytest
import time
@@ -20,6 +21,7 @@ def write_loaded_at(filename):
f.write(str(loaded_at))
+@pytest.mark.skipif(os.getenv("TRAVIS") == "1", reason="test skipped on Travis")
@pytest.mark.skipif(_current_platform == "PyPy", reason="Code reloading is not supported on PyPy.")
def test_cli_can_watch_for_source_code_changes(start_cli):
# Given that I have a shared file the processes can use to communicate with
@@ -49,7 +51,6 @@ def test_cli_can_watch_for_source_code_changes(start_cli):
# Then write another timestamp
write_loaded_at.send(filename)
broker.join(write_loaded_at.queue_name)
- time.sleep(1)
# I expect another timestamp to have been written to the file
with open(filename, "r") as f:
|
chore: skip watch test on travis
|
Bogdanp_dramatiq
|
train
|
py
|
124d32aaf2e031a6e7bfcdbcfa0d75dd5de4d898
|
diff --git a/agent/agent.go b/agent/agent.go
index <HASH>..<HASH> 100644
--- a/agent/agent.go
+++ b/agent/agent.go
@@ -100,6 +100,10 @@ func (a *Agent) Purge() {
// half of the provided ttl. Stop reporting when the provided
// channel is closed.
func (a *Agent) Heartbeat(ttl time.Duration, stop chan bool) {
+ // Explicitly heartbeat immediately to push state to the
+ // Registry as quickly as possible
+ a.registry.SetMachineState(a.machine, a.ttl)
+
interval := ttl / refreshInterval
for true {
select {
|
fix(agent): Push machine state immediately when machine starts
|
coreos_fleet
|
train
|
go
|
5c67a472e492d1742a578d0442afdb371230772a
|
diff --git a/scripts/artifact_tagging.js b/scripts/artifact_tagging.js
index <HASH>..<HASH> 100755
--- a/scripts/artifact_tagging.js
+++ b/scripts/artifact_tagging.js
@@ -24,6 +24,7 @@ if (isNarrow && readlineSync.keyInYN('Widen @uirouter/core dependency from ' + c
}
const YYYYMMDD = (function() {
+ var date = new Date();
var year = date.getFullYear();
var month = date.getMonth() + 1;
@@ -48,7 +49,7 @@ util.ensureCleanMaster('master');
_exec(`git checkout -b ${tagname}-prep`);
pkg.dependencies['@uirouter/core'] = widenedDep;
-pkg.version = tagname;
+// pkg.version = tagname;
fs.writeFileSync("package.json", JSON.stringify(pkg, undefined, 2));
_exec('git commit -m "Widening @uirouter/core dependency range to ' + widenedDep + '" package.json');
|
chore(artifacts): fix date logic
|
ui-router_angular
|
train
|
js
|
05229f14f02689a5af5287bd913a761c24497dde
|
diff --git a/sentry_sdk/scope.py b/sentry_sdk/scope.py
index <HASH>..<HASH> 100644
--- a/sentry_sdk/scope.py
+++ b/sentry_sdk/scope.py
@@ -241,7 +241,9 @@ class Scope(object):
if self._level is not None:
event["level"] = self._level
- event.setdefault("breadcrumbs", []).extend(self._breadcrumbs)
+ if event.get("type") != "transaction":
+ event.setdefault("breadcrumbs", []).extend(self._breadcrumbs)
+
if event.get("user") is None and self._user is not None:
event["user"] = self._user
|
fix: Remove breadcrumbs from transaction events (#<I>)
|
getsentry_sentry-python
|
train
|
py
|
c182a478b8423d9a92eeabd496bb205723f54c72
|
diff --git a/src/main/java/dtest/base/TestActor.java b/src/main/java/dtest/base/TestActor.java
index <HASH>..<HASH> 100644
--- a/src/main/java/dtest/base/TestActor.java
+++ b/src/main/java/dtest/base/TestActor.java
@@ -1592,7 +1592,7 @@ public class TestActor extends Observable implements ITestActor {
String actionArguments;
if (argsMap != null && argsMap.size() > 0) {
- Gson gson = Factory.getGson();
+ Gson gson = Factory.getGsonBuilder().serializeNulls().create();
actionArguments = String.format("with arguments %s",
gson.toJson(argsMap));
} else {
|
fix(TestActor): don't exclude properties with null values when logging action arguments
|
mcdcorp_opentest
|
train
|
java
|
f67295f89847da3d0a9c9b3d9e71d77a2e531d2a
|
diff --git a/app/lib/webpack/bex/plugin.bex-packager.js b/app/lib/webpack/bex/plugin.bex-packager.js
index <HASH>..<HASH> 100644
--- a/app/lib/webpack/bex/plugin.bex-packager.js
+++ b/app/lib/webpack/bex/plugin.bex-packager.js
@@ -35,7 +35,7 @@ class BexPackager {
}
findAndReplaceInSection(manifestData.background.scripts, 'www/bex-background.js', 'www/js/bex-background.js')
- findAndReplaceInSection(manifestData.content_scripts[0].js, 'www/bex-contentScript.js', 'www/js/bex-contentScript.js')
+ findAndReplaceInSection(manifestData.content_scripts[0].js, 'www/bex-content-script.js', 'www/js/bex-content-script.js')
const newValue = JSON.stringify(manifestData)
fse.writeFileSync(manifestFilePath, newValue, 'utf-8')
}
|
fix(bex): Fix paths on build #<I>
New file structure didn't alter the production build.
|
quasarframework_quasar
|
train
|
js
|
53a373dfeb6775c3a9d6b7de742f3bdead7673c1
|
diff --git a/lib/pact/consumer_contract/query.rb b/lib/pact/consumer_contract/query.rb
index <HASH>..<HASH> 100644
--- a/lib/pact/consumer_contract/query.rb
+++ b/lib/pact/consumer_contract/query.rb
@@ -99,7 +99,7 @@ module Pact
else
params[k] ||= {}
raise ParameterTypeError, "expected Hash (got #{params[k].class.name}) for param `#{k}'" unless params_hash_type?(params[k])
- params[k] = normalize_params(params[k], after, v, depth - 1)
+ params[k] = normalize_params(params[k], after, v)
end
params
diff --git a/spec/lib/pact/consumer_contract/query_spec.rb b/spec/lib/pact/consumer_contract/query_spec.rb
index <HASH>..<HASH> 100644
--- a/spec/lib/pact/consumer_contract/query_spec.rb
+++ b/spec/lib/pact/consumer_contract/query_spec.rb
@@ -27,6 +27,10 @@ module Pact
it "returns a nested map" do
expect(subject).to eq "foo" => "bar2", "baz" => ["thing1", "thing2"]
end
+
+ it "handles arrays and hashes" do
+ expect(Query.parse_string("a[]=1&a[]=2&b[c]=3")).to eq "a" => ["1","2"], "b" => { "c" => "3" }
+ end
end
end
end
|
fix: removed undefined depth from query
|
pact-foundation_pact-support
|
train
|
rb,rb
|
ab44967bbb72228cb5c92a0159d584e796192087
|
diff --git a/packages/cozy-client/src/CozyClient.spec.js b/packages/cozy-client/src/CozyClient.spec.js
index <HASH>..<HASH> 100644
--- a/packages/cozy-client/src/CozyClient.spec.js
+++ b/packages/cozy-client/src/CozyClient.spec.js
@@ -993,6 +993,16 @@ describe('CozyClient', () => {
)
})
+ it('should dispatch a INIT_QUERY action if no skip and no bookmark', async () => {
+ getQueryFromState.mockReturnValueOnce({
+ fetchStatus: 'loaded'
+ })
+ await client.query(query, { as: 'allTodos' })
+ expect(client.store.dispatch.mock.calls[0][0]).toEqual(
+ initQuery('allTodos', { doctype: 'io.cozy.todos' })
+ )
+ })
+
it('should dispatch a RECEIVE_QUERY_RESULT action if query has skip', async () => {
requestHandler.mockReturnValueOnce(Promise.resolve(fakeResponse))
getQueryFromState.mockReturnValueOnce({
|
test: Add test if no skip and no bookmark
|
cozy_cozy-client
|
train
|
js
|
0523ea5b909a5e3a456bb87a2c1214bb22bebfd0
|
diff --git a/src/foremast/securitygroup/create_securitygroup.py b/src/foremast/securitygroup/create_securitygroup.py
index <HASH>..<HASH> 100644
--- a/src/foremast/securitygroup/create_securitygroup.py
+++ b/src/foremast/securitygroup/create_securitygroup.py
@@ -295,8 +295,8 @@ class SpinnakerSecurityGroup(object):
"""
if isinstance(rule, dict):
# Advanced
- start_port = rule.get('start_port', 80)
- end_port = rule.get('end_port', 80)
+ start_port = rule.get('start_port')
+ end_port = rule.get('end_port')
protocol = rule.get('protocol', 'tcp')
requested_cross_account = rule.get('env', None)
|
fix: Remove default start/end port
We should fail if the ports are not specified.
|
foremast_foremast
|
train
|
py
|
e73457937a19373e78c0da7223cb8d7afe2c04f1
|
diff --git a/job/job.go b/job/job.go
index <HASH>..<HASH> 100644
--- a/job/job.go
+++ b/job/job.go
@@ -1,9 +1,9 @@
package job
type Job struct {
- Name string
- Payload JobPayload
- State *PayloadState
+ Name string
+ Payload JobPayload
+ PayloadState *PayloadState
}
func NewJob(name string, payload JobPayload) *Job {
|
refactor(job): Rename Job.State to Job.PayloadState
|
coreos_fleet
|
train
|
go
|
d683e9243c5cbb46613a1e57cceb565d3522305e
|
diff --git a/cid_test.go b/cid_test.go
index <HASH>..<HASH> 100644
--- a/cid_test.go
+++ b/cid_test.go
@@ -556,7 +556,7 @@ func BenchmarkStringV1(b *testing.B) {
func TestReadCidsFromBuffer(t *testing.T) {
cidstr := []string{
"bafkreie5qrjvaw64n4tjm6hbnm7fnqvcssfed4whsjqxzslbd3jwhsk3mm",
- "K2CWUECKQKIBUTVHKR4P2LN2PJCAXAAKPD9DB0E7J7AX1LXHHXY3EKPV",
+ "k2cwueckqkibutvhkr4p2ln2pjcaxaakpd9db0e7j7ax1lxhhxy3ekpv",
"Qmf5Qzp6nGBku7CEn2UQx4mgN8TW69YUok36DrGa6NN893",
"zb2rhZi1JR4eNc2jBGaRYJKYM8JEB4ovenym8L1CmFsRAytkz",
}
|
test: lowercase base<I>
Base<I> was introduced mainly for use in DNS, and various user agents
force lowercase, so tests should use that instead.
License: MIT
|
ipfs_go-cid
|
train
|
go
|
23fde7a2e3964f751a7cfeeccb338cb0a5d36a26
|
diff --git a/src/ClientBankExchange/Component.php b/src/ClientBankExchange/Component.php
index <HASH>..<HASH> 100644
--- a/src/ClientBankExchange/Component.php
+++ b/src/ClientBankExchange/Component.php
@@ -112,7 +112,7 @@ class Component implements \ArrayAccess
unset($this->$offset);
}
- public function offsetGet($offset)
+ public function offsetGet($offset): mixed
{
return $this->$offset;
}
diff --git a/src/ClientBankExchange/Parser.php b/src/ClientBankExchange/Parser.php
index <HASH>..<HASH> 100644
--- a/src/ClientBankExchange/Parser.php
+++ b/src/ClientBankExchange/Parser.php
@@ -146,7 +146,7 @@ class Parser implements \ArrayAccess
unset($this->result[$offset]);
}
- public function offsetGet($offset)
+ public function offsetGet($offset): mixed
{
return isset($this->result[$offset]) ? $this->result[$offset] : null;
}
|
fix(php8): now supports php8
|
kilylabs_client-bank-exchange-php
|
train
|
php,php
|
08577973c2630762b43f2ba0a513951f65786691
|
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -20,7 +20,6 @@ setup(
classifiers=[
"Development Status :: 5 - Production/Stable",
"License :: OSI Approved :: MIT License",
- "Programming Language :: Python :: 2.7",
"Programming Language :: Python :: 3",
"Intended Audience :: Developers",
],
|
feat: Remove Python <I> support from setup.py
|
HubbleHQ_heroku-kafka
|
train
|
py
|
96b4e8cf264c433753635bed3f39a9dbe635ea6d
|
diff --git a/src/data-type.js b/src/data-type.js
index <HASH>..<HASH> 100644
--- a/src/data-type.js
+++ b/src/data-type.js
@@ -1,3 +1,5 @@
+// @flow
+
const deprecate = require('depd')('tedious');
const Null = require('./data-types/null');
|
refactor: add flow comment marker to `src/data-type.js`
|
tediousjs_tedious
|
train
|
js
|
5cc14ac435669102da138cb7e73b7a883f9e96b5
|
diff --git a/test/index.js b/test/index.js
index <HASH>..<HASH> 100644
--- a/test/index.js
+++ b/test/index.js
@@ -116,6 +116,13 @@ describe('encoding int257', function() {
})
})
+describe('encoding uint[2] with [1,2,3]', function() {
+ it('should fail', function() {
+ assert.throws(function() {
+ abi.rawEncode('fail', [ 'uint[2]' ], [ [ 1, 2, 3 ] ])
+ }, Error)
+ })
+})
// Homebrew decoding tests
|
test: add case for encoding more items than defined in the array
|
ethereumjs_ethereumjs-abi
|
train
|
js
|
a3ee3994711fd8627f11d223ea32f397919d2397
|
diff --git a/src/resolvers.js b/src/resolvers.js
index <HASH>..<HASH> 100644
--- a/src/resolvers.js
+++ b/src/resolvers.js
@@ -281,7 +281,7 @@ export class NewInstance {
*/
get(container) {
let dynamicDependencies = this.dynamicDependencies.length > 0 ?
- this.dynamicDependencies.map(dependency => dependency["protocol:aurelia:resolver"] ?
+ this.dynamicDependencies.map(dependency => dependency['protocol:aurelia:resolver'] ?
dependency.get(container) : container.get(dependency)) : undefined;
const instance = container.invoke(this.key, dynamicDependencies);
container.registerInstance(this.asKey, instance);
|
style(resolvers): change string to single quote
|
aurelia_dependency-injection
|
train
|
js
|
7cba8aa696d01d6c9e7e35b894938375c2519de4
|
diff --git a/docs/lib/tags/usage.js b/docs/lib/tags/usage.js
index <HASH>..<HASH> 100644
--- a/docs/lib/tags/usage.js
+++ b/docs/lib/tags/usage.js
@@ -15,11 +15,14 @@ module.exports = function usageOptions (hexo, args) {
/* eslint-disable quotes */
const url = `{% url 'waiting for actionability' interacting-with-elements#Bypassing %}`
- return rawRender.call(this, hexo, `Forces the action, disables ${url}`)
+ return rawRender.call(this, hexo, `Forces the action, disables ${url}`)
}
const timeout = () => {
- return `Time to wait for <code>${type}()</code> to resolve before timing out`
+ /* eslint-disable quotes */
+ const url = `{% urlHash 'timing out' Timeout %}`
+
+ return rawRender.call(this, hexo, `Time to wait for <code>${type}()</code> to resolve before ${url}`)
}
const multiple = () => {
|
docs: in page hash ref for timeout usage option
|
cypress-io_cypress
|
train
|
js
|
5aad57194189bd7bc83f7b6c478f4002087f388f
|
diff --git a/benchmarks/server.js b/benchmarks/server.js
index <HASH>..<HASH> 100644
--- a/benchmarks/server.js
+++ b/benchmarks/server.js
@@ -23,9 +23,10 @@ if (cluster.isPrimary) {
cluster.fork()
}
} else {
+ const buf = Buffer.alloc(64 * 1024, '_')
const server = createServer((req, res) => {
setTimeout(function () {
- res.end('hello world')
+ res.end(buf)
}, timeout)
}).listen(port)
server.keepAliveTimeout = 600e3
diff --git a/lib/core/connect.js b/lib/core/connect.js
index <HASH>..<HASH> 100644
--- a/lib/core/connect.js
+++ b/lib/core/connect.js
@@ -29,6 +29,7 @@ function buildConnector ({ maxCachedSessions, socketPath, timeout, ...opts }) {
const session = sessionCache.get(servername) || null
socket = tls.connect({
+ highWaterMark: 16384, // TLS in node can't have bigger HWM anyway...
...options,
servername,
session,
@@ -61,6 +62,7 @@ function buildConnector ({ maxCachedSessions, socketPath, timeout, ...opts }) {
})
} else {
socket = net.connect({
+ highWaterMark: 64 * 1024, // Same as nodejs fs streams.
...options,
port: port || 80,
host: hostname
|
perf: use bigger HWM by default (#<I>)
* perf: use bigger HWM by default
* fixup
|
mcollina_undici
|
train
|
js,js
|
57c02b49158cd26a04de2690860c5d438f68fb8d
|
diff --git a/lib/array.js b/lib/array.js
index <HASH>..<HASH> 100644
--- a/lib/array.js
+++ b/lib/array.js
@@ -202,6 +202,50 @@ module.exports = function BlastArray(Blast, Collection) {
}, true);
/**
+ * Move an array element from one array position to another
+ *
+ * @author Jelle De Loecker <jelle@codedor.be>
+ * @since 0.1.4
+ * @version 0.1.4
+ *
+ * @param {Number} oldIndex
+ * @param {Number} newIndex
+ */
+ Blast.definePrototype('Array', 'move', function move(oldIndex, newIndex) {
+
+ var length = this.length,
+ k;
+
+ if (typeof oldIndex == 'number') {
+ while (oldIndex < 0) oldIndex += length;
+ } else {
+ oldIndex = this.indexOf(oldIndex);
+ }
+
+ if (typeof newIndex == 'number') {
+ while (newIndex < 0) newIndex += length;
+ } else {
+ newIndex = this.indexOf(newIndex);
+ }
+
+ // Move nothing if certain elements were not found
+ if (oldIndex == -1 || newIndex == -1) {
+ return this;
+ }
+
+ if (newIndex >= length) {
+ k = newIndex - length;
+ while ((k--) + 1) {
+ this.push(undefined);
+ }
+ }
+
+ this.splice(newIndex, 0, this.splice(oldIndex, 1)[0]);
+
+ return this;
+ });
+
+ /**
* Get the first value of an array,
* or the first nr of wanted values
*
|
feat: add Array#move, moving elements from one index to another
|
skerit_protoblast
|
train
|
js
|
691fde70794ae4c38e6ba21fefb8a9a87a8b0cf6
|
diff --git a/manager/api/jpa/src/main/java/io/apiman/manager/api/jpa/blobstore/BlobEntity.java b/manager/api/jpa/src/main/java/io/apiman/manager/api/jpa/blobstore/BlobEntity.java
index <HASH>..<HASH> 100644
--- a/manager/api/jpa/src/main/java/io/apiman/manager/api/jpa/blobstore/BlobEntity.java
+++ b/manager/api/jpa/src/main/java/io/apiman/manager/api/jpa/blobstore/BlobEntity.java
@@ -40,16 +40,12 @@ public class BlobEntity {
@NaturalId
private String mimeType;
- // @Temporal(TemporalType.TIMESTAMP)
@CreationTimestamp
- @Column(name = "created_on", nullable = false)
- //@NotNull
+ @Column(name = "created_on", updatable = false)
private OffsetDateTime createdOn;
- // @Temporal(TemporalType.TIMESTAMP)
@UpdateTimestamp
- @Column(name = "modified_on", nullable = false)
- //@NotNull
+ @Column(name = "modified_on")
private OffsetDateTime modifiedOn;
@Lob
|
fix(manager-api-jpa): make timestamp annotations work with current version of Hibernate
|
apiman_apiman
|
train
|
java
|
64bc26382be1e91dbfc2839a43fba173f03827c0
|
diff --git a/packages/openneuro-server/src/datalad/dataset.js b/packages/openneuro-server/src/datalad/dataset.js
index <HASH>..<HASH> 100644
--- a/packages/openneuro-server/src/datalad/dataset.js
+++ b/packages/openneuro-server/src/datalad/dataset.js
@@ -154,7 +154,7 @@ export const datasetsFilter = options => match => {
},
{
$match: {
- 'summaries.0.modalities.0': options.modality,
+ $in: [options.modality, 'summaries.0.modalities'],
},
},
],
|
fix(api): Include any modality match in public dataset count
|
OpenNeuroOrg_openneuro
|
train
|
js
|
765a34e619efde94ec930ad323834f3ecaf43f5c
|
diff --git a/tests/SnowflakeTest.php b/tests/SnowflakeTest.php
index <HASH>..<HASH> 100644
--- a/tests/SnowflakeTest.php
+++ b/tests/SnowflakeTest.php
@@ -151,9 +151,9 @@ class SnowflakeTest extends \PHPUnit_Framework_TestCase
$tableColumns = $this->connection->getTableColumns($this->destSchemaName, $tableName);
if ($importOptions['useTimestamp']) {
- $this->assertArrayHasKey('_timestamp',$tableColumns);
+ $this->assertContains('_timestamp', $tableColumns);
} else {
- $this->assertArrayNotHasKey('_timestamp',$tableColumns);
+ $this->assertNotContains('_timestamp', $tableColumns);
}
if (!in_array('_timestamp', $columns)) {
|
fix: assert array contains value, not key
|
keboola_php-db-import
|
train
|
php
|
06afdf9f6e1b965e61120a4ef51275a576090859
|
diff --git a/index.js b/index.js
index <HASH>..<HASH> 100644
--- a/index.js
+++ b/index.js
@@ -1,3 +1,3 @@
-require('.src/ui-layout');
+require('./src/ui-layout');
module.exports = 'ui.layout';
|
fix(require): fix directory path in require
The relative path to ui-layout.js was missing the forward slash to make it relative to the current directory. The Devils is in the details.
|
angular-ui_ui-layout
|
train
|
js
|
09d3bc9ff2efcbc4a387012dc68e3be368d2a13d
|
diff --git a/website/src/components/home/HomeTreeMap.js b/website/src/components/home/HomeTreeMap.js
index <HASH>..<HASH> 100644
--- a/website/src/components/home/HomeTreeMap.js
+++ b/website/src/components/home/HomeTreeMap.js
@@ -16,16 +16,16 @@ const HomeTreeMap = ({ colors, nivoTheme }) => {
<HomeItem to="/treemap">
<ResponsiveTreeMapCanvas
margin={{ top: 0, right: 0, bottom: 0, left: 0 }}
- root={generateLibTree()}
+ data={generateLibTree()}
identity="name"
value="loc"
+ valueFormat=".02s"
colors={colors}
leavesOnly={true}
+ borderWidth={0}
innerPadding={1}
animate={false}
isInteractive={false}
- label="loc"
- labelFormat=".0s"
enableLabel={true}
labelTextColor={colors[1]}
borderColor="none"
|
fix(website): fix TreeMap usage on homepage
|
plouc_nivo
|
train
|
js
|
eaa40adbd95e29592662a593121cb1fbe2564825
|
diff --git a/test/tests/functional/rs_mocks/read_preferences_tests.js b/test/tests/functional/rs_mocks/read_preferences_tests.js
index <HASH>..<HASH> 100644
--- a/test/tests/functional/rs_mocks/read_preferences_tests.js
+++ b/test/tests/functional/rs_mocks/read_preferences_tests.js
@@ -1379,7 +1379,7 @@ describe('ReplSet Read Preferences (mocks)', function() {
// Finished up
if (count === 0) {
// Should not contain the primary
- expect(portsSeen['32000']).to.not.exist;
+ expect(portsSeen).to.not.have.key('32000');
// Shut down mocks
primaryServer.destroy();
|
test(rs_mocks): fix expectation in read preferences test
|
mongodb-js_mongodb-core
|
train
|
js
|
f91cf37a525831413d082bd35a8218f9e9a0905d
|
diff --git a/lib/impulse-bin/index.js b/lib/impulse-bin/index.js
index <HASH>..<HASH> 100644
--- a/lib/impulse-bin/index.js
+++ b/lib/impulse-bin/index.js
@@ -75,14 +75,19 @@ ImpulseBin.prototype.run = function(provider, handler) {
var context = {
args: this.adapter.args(provider),
child_process: require('child_process'),
- clc: this.clc,
+ clc: require('cli-color'),
fs: require('fs'),
options: this.options,
provider: provider,
shelljs: require('outer-shelljs').create(),
- util: util
+ util: util,
+
+ createVerbose: bind(this, this.createVerbose),
+ exit: this.exit,
+ exitOnMissingOption: bind(this, this.exitOnMissingOption),
+ exitOnShelljsErr: bind(this, this.exitOnShelljsErr)
};
- handler.call(extend(context, this));
+ handler.call(context);
};
ImpulseBin.prototype.createVerbose = function(name) {
@@ -90,8 +95,7 @@ ImpulseBin.prototype.createVerbose = function(name) {
return this.console.create(this.get('verboseLogName'), console.log);
};
-ImpulseBin.prototype.exit = function(msg, code) {
- this.stderr(msg);
+ImpulseBin.prototype.exit = function(code) {
process.exit(typeof code === 'undefined' ? 1 : code);
};
|
fix(run): Add missing context props
|
codeactual_impulse-bin
|
train
|
js
|
7cb2b13cfd7a138e5e78f9b62c3b8bc2e3e0a750
|
diff --git a/libs/linkBankOperations.js b/libs/linkBankOperations.js
index <HASH>..<HASH> 100644
--- a/libs/linkBankOperations.js
+++ b/libs/linkBankOperations.js
@@ -94,7 +94,7 @@ class Linker {
const dateSelector = createDateSelector()
const limit = 100
- const getOptions = () => {
+ const getOptions = ids => {
const options = {
selector: {
date: dateSelector
@@ -110,8 +110,21 @@ class Linker {
return options
}
+ // cozy-stack limit to 100 elements
+ const fetchAll = (index, ids = []) => {
+ return this.cozyClient.data.query(index, getOptions(ids)).then(ops => {
+ operations = operations.concat(ops)
+ if (ops.length === limit) {
+ const newId = ops.map(op => op._id)
+ return fetchAll(index, ids.concat(newId))
+ } else {
+ return operations
+ }
+ })
+ }
+
return this.cozyClient.data.defineIndex(DOCTYPE, ['date', 'amount']).then(index => {
- return this.cozyClient.data.query(index, getOptions())
+ return fetchAll(index)
})
}
|
feat: Get all documents not only <I> firsts
|
konnectors_libs
|
train
|
js
|
50238741619c5635dc7030aafa10a26b460241bc
|
diff --git a/gulpfile.js b/gulpfile.js
index <HASH>..<HASH> 100755
--- a/gulpfile.js
+++ b/gulpfile.js
@@ -371,7 +371,7 @@ gulp.task('serve', ['jshint', 'prepare', 'browser-sync'], function() {
}
gulp.watch(watched, {
- debounceDelay: 100
+ debounceDelay: 2000
}, ['prepare', 'jshint']);
// for livereload
|
fix(gulpfile): Increased debounceDelay to prevent reloading more than once.
|
OnsenUI_OnsenUI
|
train
|
js
|
6f6887501dc6f40489f5f735ade56ea196cab94d
|
diff --git a/modules/builtin/src/content-types/carousel.js b/modules/builtin/src/content-types/carousel.js
index <HASH>..<HASH> 100644
--- a/modules/builtin/src/content-types/carousel.js
+++ b/modules/builtin/src/content-types/carousel.js
@@ -108,7 +108,6 @@ module.exports = {
...base.typingIndicators
}
},
-
- computePreviewText: formData => `Carousel: ${formData.length}`,
+ computePreviewText: formData => `Carousel: (${formData.items.length}) ${formData.items[0].title}`,
renderElement: renderElement
}
|
fix(core): fix undefined value in carousel name
|
botpress_botpress
|
train
|
js
|
2f7aee2f2eebf5dc22ae66a775764692c0f1a34a
|
diff --git a/cmd/influx/pkg.go b/cmd/influx/pkg.go
index <HASH>..<HASH> 100644
--- a/cmd/influx/pkg.go
+++ b/cmd/influx/pkg.go
@@ -115,10 +115,6 @@ func (b *cmdPkgBuilder) pkgApplyRunEFn(cmd *cobra.Command, args []string) error
return err
}
- if err := b.org.validOrgFlags(&flags); err != nil {
- return err
- }
-
influxOrgID, err := b.org.getID(orgSVC)
if err != nil {
return err
|
chore(influx): small cleanup of pkg command removing duplicate validation
|
influxdata_influxdb
|
train
|
go
|
451264c679106c1c4173e9190887004c610d1072
|
diff --git a/__tests__/integration/fixtures/extra-semi/.esplintrc.js b/__tests__/integration/fixtures/extra-semi/.esplintrc.js
index <HASH>..<HASH> 100644
--- a/__tests__/integration/fixtures/extra-semi/.esplintrc.js
+++ b/__tests__/integration/fixtures/extra-semi/.esplintrc.js
@@ -1,4 +1,7 @@
module.exports = {
surfaceArea: ["."],
- rules: ["no-console"]
+ rules: ["no-console"],
+ eslint: {
+ configFile: "./.eslintrc.js"
+ }
};
diff --git a/lib/engine.js b/lib/engine.js
index <HASH>..<HASH> 100644
--- a/lib/engine.js
+++ b/lib/engine.js
@@ -94,6 +94,7 @@ function suppress(ruleIds, files) {
const cli = createCLIEngine(
Object.assign({}, config.eslint, {
useEslintrc: false,
+ configFile: null,
rules
})
);
|
fix: Ignore configured configFile (#<I>)
Fixes #<I>
|
hjylewis_esplint
|
train
|
js,js
|
96dfd581b6917c34f9be058afad26e112aac52ef
|
diff --git a/packages/@vue/cli-service/lib/commands/serve.js b/packages/@vue/cli-service/lib/commands/serve.js
index <HASH>..<HASH> 100644
--- a/packages/@vue/cli-service/lib/commands/serve.js
+++ b/packages/@vue/cli-service/lib/commands/serve.js
@@ -127,9 +127,10 @@ module.exports = (api, options) => {
// inject dev & hot-reload middleware entries
if (!isProduction) {
+ const sockPath = projectDevServerOptions.sockPath || '/sockjs-node'
const sockjsUrl = publicUrl
// explicitly configured via devServer.public
- ? `?${publicUrl}/sockjs-node`
+ ? `?${publicUrl}&sockPath=${sockPath}`
: isInContainer
// can't infer public network url if inside a container...
// use client-side inference (note this would break with non-root publicPath)
@@ -138,9 +139,8 @@ module.exports = (api, options) => {
: `?` + url.format({
protocol,
port,
- hostname: urls.lanUrlForConfig || 'localhost',
- pathname: '/sockjs-node'
- })
+ hostname: urls.lanUrlForConfig || 'localhost'
+ }) + `&sockPath=${sockPath}`
const devClients = [
// dev server client
require.resolve(`webpack-dev-server/client`) + sockjsUrl,
|
fix(serve): pass devServer sockPath properly to client (#<I>)
closes #<I>
closes #<I>
|
vuejs_vue-cli
|
train
|
js
|
d34a0e5393c6dc6018026bdd060e73ece2c875ff
|
diff --git a/src/js/core/sticky.js b/src/js/core/sticky.js
index <HASH>..<HASH> 100644
--- a/src/js/core/sticky.js
+++ b/src/js/core/sticky.js
@@ -36,10 +36,10 @@ export default {
props: {
position: String,
- top: Boolean,
- bottom: Boolean,
- start: Boolean,
- end: Boolean,
+ top: null,
+ bottom: null,
+ start: null,
+ end: null,
offset: String,
animation: String,
clsActive: String,
@@ -79,8 +79,8 @@ export default {
},
connected() {
- this.start = this.start || this.top;
- this.end = this.end || this.bottom;
+ this.start = coerce(this.start || this.top);
+ this.end = coerce(this.end || this.bottom);
this.placeholder =
$('+ .uk-sticky-placeholder', this.$el) ||
@@ -400,3 +400,12 @@ function parseProp(value, el, propOffset, padding) {
);
}
}
+
+function coerce(value) {
+ if (value === 'true') {
+ return true;
+ } else if (value === 'false') {
+ return false;
+ }
+ return value;
+}
|
refactor: allow value '0' for start and end options
|
uikit_uikit
|
train
|
js
|
1d6c16175bde7b722772949868682a91e9045033
|
diff --git a/pkg/storage/driver/memory.go b/pkg/storage/driver/memory.go
index <HASH>..<HASH> 100644
--- a/pkg/storage/driver/memory.go
+++ b/pkg/storage/driver/memory.go
@@ -151,7 +151,6 @@ func (mem *Memory) Delete(key string) (*rspb.Release, error) {
default:
return nil, ErrInvalidKey
}
- return nil, ErrReleaseNotFound
}
func (mem *Memory) dump(w io.Writer) error {
|
feat(rollback-storage): remove unreachable code from memory
|
helm_helm
|
train
|
go
|
42cdc8bc49fe734c77694ad4e778b8763387b1d1
|
diff --git a/src/libraries/anahita/domain/query/helper.php b/src/libraries/anahita/domain/query/helper.php
index <HASH>..<HASH> 100644
--- a/src/libraries/anahita/domain/query/helper.php
+++ b/src/libraries/anahita/domain/query/helper.php
@@ -180,8 +180,10 @@ class AnDomainQueryHelper
if ( !$relationship->getParent() )
throw new AnDomainQueryException('Query Building Failed. Unkown Parent');
- elseif($relationship->isPolymorphic())
- $columns = array(array_shift(array_keys($columns)) => array_shift(array_values($columns)));
+ elseif($relationship->isPolymorphic()) {
+ reset($columns);
+ $columns = array(key($columns) => current($columns));
+ }
$parent = $relationship->getParentRepository();
$parent_query = $parent->getQuery();
|
fix: Strict Standards
Only variables should be passed by reference
|
anahitasocial_anahita
|
train
|
php
|
91285baea50b7a784ff9445ea08aa3a8430e2e79
|
diff --git a/public/app/plugins/datasource/cloudwatch/datasource.js b/public/app/plugins/datasource/cloudwatch/datasource.js
index <HASH>..<HASH> 100644
--- a/public/app/plugins/datasource/cloudwatch/datasource.js
+++ b/public/app/plugins/datasource/cloudwatch/datasource.js
@@ -254,7 +254,7 @@ function (angular, _) {
var result = [];
_.each(allResponse, function(response, index) {
- var metrics = transformMetricData(response.data, options.targets[index]);
+ var metrics = transformMetricData(response, options.targets[index]);
result = result.concat(metrics);
});
@@ -309,7 +309,7 @@ function (angular, _) {
}
return cloudwatch.listMetrics(params).then(function(result) {
- return _.chain(result.data.Metrics).map(function(metric) {
+ return _.chain(result.Metrics).map(function(metric) {
return metric.Dimensions;
}).reject(function(metric) {
return _.isEmpty(metric);
@@ -448,7 +448,9 @@ function (angular, _) {
data: data
};
- return $http(options);
+ return $http(options).then(function(result) {
+ return result.data;
+ });
};
};
|
feat(cloudwatch): fixed failing unit tests
|
grafana_grafana
|
train
|
js
|
5e75a9fa888eeb83221fabe85bf77e556106b9b5
|
diff --git a/lib/manager/dockerfile/extract.js b/lib/manager/dockerfile/extract.js
index <HASH>..<HASH> 100644
--- a/lib/manager/dockerfile/extract.js
+++ b/lib/manager/dockerfile/extract.js
@@ -5,7 +5,7 @@ module.exports = {
};
function splitImageParts(currentFrom) {
- if (currentFrom.includes('${')) {
+ if (currentFrom.includes('$')) {
return {
skipReason: 'contains-variable',
};
|
fix(docker): skip any FROM with $ sign
|
renovatebot_renovate
|
train
|
js
|
d75d021f3f56fa84e61dbca7c8fb7af3bc90c923
|
diff --git a/src/components/menu/js/menuController.js b/src/components/menu/js/menuController.js
index <HASH>..<HASH> 100644
--- a/src/components/menu/js/menuController.js
+++ b/src/components/menu/js/menuController.js
@@ -148,7 +148,7 @@ function MenuController($mdMenu, $attrs, $element, $scope, $mdUtil, $timeout) {
if (!skipFocus) {
var el = self.restoreFocusTo || $element.find('button')[0];
if (el instanceof angular.element) el = el[0];
- el.focus();
+ if (el) el.focus();
}
};
|
fix(menu): fixes JS focus error on close
|
angular_material
|
train
|
js
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.