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 |
|---|---|---|---|---|---|
6062d2f9e9524035a0def33198569eb9fb907120
|
diff --git a/test/renderer/epics/execute-spec.js b/test/renderer/epics/execute-spec.js
index <HASH>..<HASH> 100644
--- a/test/renderer/epics/execute-spec.js
+++ b/test/renderer/epics/execute-spec.js
@@ -119,9 +119,3 @@ describe('executeCellObservable', () => {
})
});
-
-describe('executeCellEpic', () => {
- it.only('throws an error if not given an id', () => {
- const store = dummyStore();
- });
-});
|
test(executeSpec): Remove it.only
|
nteract_nteract
|
train
|
js
|
5fc9211f445e79e709b5406f03b545fd61ed8fe0
|
diff --git a/src/org/nutz/ioc/loader/annotation/AnnotationIocLoader.java b/src/org/nutz/ioc/loader/annotation/AnnotationIocLoader.java
index <HASH>..<HASH> 100644
--- a/src/org/nutz/ioc/loader/annotation/AnnotationIocLoader.java
+++ b/src/org/nutz/ioc/loader/annotation/AnnotationIocLoader.java
@@ -145,9 +145,13 @@ public class AnnotationIocLoader implements IocLoader {
}
catch (Exception e) {
// 如果获取失败,就忽略之
- log.info("Fail to call getMethods(), miss class or Security Limit, ignore it", e);
+ log.infof("Fail to call getMethods() in Class=%s, miss class or Security Limit, ignore it", classZ, e);
methods = new Method[0];
}
+ catch (NoClassDefFoundError e) {
+ log.infof("Fail to call getMethods() in Class=%s, miss class or Security Limit, ignore it", classZ, e);
+ methods = new Method[0];
+ }
for (Method method : methods) {
Inject inject = method.getAnnotation(Inject.class);
if (inject == null)
|
fix: if some class method ref unknow class, AnnotationIocLoader will throw error
|
nutzam_nutz
|
train
|
java
|
fdb4a7a0e51f9092508b268b1511396c4a5acae4
|
diff --git a/src/connectors/configure/connectConfigure.js b/src/connectors/configure/connectConfigure.js
index <HASH>..<HASH> 100644
--- a/src/connectors/configure/connectConfigure.js
+++ b/src/connectors/configure/connectConfigure.js
@@ -71,9 +71,12 @@ export default function connectConfigure(renderFn, unmountFn) {
return searchParameters => {
// merge new `searchParameters` with the ones set from other widgets
const actualState = this.removeSearchParameters(helper.getState());
- const nextSearchParameters = enhanceConfiguration({})(actualState, {
- getConfiguration: () => searchParameters,
- });
+ const nextSearchParameters = enhanceConfiguration({})(
+ { ...actualState },
+ {
+ getConfiguration: () => searchParameters,
+ }
+ );
// trigger a search with the new merged searchParameters
helper.setState(nextSearchParameters).search();
|
fix(connectConfigure): ensure we do not extend `SearchParameters` (#<I>)
This was firing requests to Algolia with all the functions from the SearchParameters base class.
|
algolia_instantsearch.js
|
train
|
js
|
03e46ab110d10c595de7f9a167dea9b4599f8718
|
diff --git a/lib/run.js b/lib/run.js
index <HASH>..<HASH> 100644
--- a/lib/run.js
+++ b/lib/run.js
@@ -52,7 +52,7 @@ module.exports = (_argv, stream=process.stdin, doExit) => {
function *createIssue() {
- if (opts.dry) return console.log('not ok (creating...):', rule);
+ if (opts.dry) return console.log('not ok (creating...):', rule, repo);
const newIssue = yield github.issue.create(repo, {
title: `[${rule}] ${issue.title}`,
|
feat: log repo when "creating" issue in "dry" mode
|
MailOnline_tap-github-issues
|
train
|
js
|
e13eac3a2d7bf4c24c3af924718e506825b42c78
|
diff --git a/Storage/src/StreamWrapper.php b/Storage/src/StreamWrapper.php
index <HASH>..<HASH> 100644
--- a/Storage/src/StreamWrapper.php
+++ b/Storage/src/StreamWrapper.php
@@ -120,6 +120,16 @@ class StreamWrapper
}
/**
+ * Starting PHP 7.4, this is called when include/require is used on a stream.
+ * Absence of this method presents a warning.
+ * https://www.php.net/manual/en/migration74.incompatible.php
+ */
+ public function stream_set_option()
+ {
+ return false;
+ }
+
+ /**
* Register a StreamWrapper for reading and writing to Google Storage
*
* @param StorageClient $client The StorageClient configuration to use.
|
fix(storage): Added stream_set_option in StreamWrapper (#<I>)
|
googleapis_google-cloud-php
|
train
|
php
|
f47f0df464101b40a293d1ef7fd79711872470cc
|
diff --git a/scripts/postinstall.js b/scripts/postinstall.js
index <HASH>..<HASH> 100644
--- a/scripts/postinstall.js
+++ b/scripts/postinstall.js
@@ -1,2 +1,2 @@
const url = 'https://m.do.co/c/ce5e44c0fedf';
-console.log('\x1b[32m', `Thanks for using do-wrapper.\n Please support further development: ${url}`);
+console.log('\x1b[32m', `Thanks for using do-wrapper.\n Please support further development: ${url}`, '\x1b[0m');
|
fix: reset color in postinstall script
|
matt-major_do-wrapper
|
train
|
js
|
988b3f3611af07bd444eab31d992636e4d1586f3
|
diff --git a/packages/node_modules/@webex/plugin-meetings/test/integration/spec/journey.js b/packages/node_modules/@webex/plugin-meetings/test/integration/spec/journey.js
index <HASH>..<HASH> 100644
--- a/packages/node_modules/@webex/plugin-meetings/test/integration/spec/journey.js
+++ b/packages/node_modules/@webex/plugin-meetings/test/integration/spec/journey.js
@@ -386,7 +386,7 @@ skipInNode(describe)('plugin-meetings', () => {
});
it('alice update video', () => {
- const oldAudioTrackId = alice.meeting.mediaProperties.videoTrack.id;
+ const oldAudioTrackId = alice.meeting.mediaProperties.audioTrack.id;
return alice.meeting.getMediaStreams({sendVideo: true})
.then((response) => Promise.all([
|
fix: typo in the update video test
|
webex_spark-js-sdk
|
train
|
js
|
25d820d448f82ea05c1c848f2ba4df5ae73ce7a2
|
diff --git a/src/cli/commands/key/gen.js b/src/cli/commands/key/gen.js
index <HASH>..<HASH> 100644
--- a/src/cli/commands/key/gen.js
+++ b/src/cli/commands/key/gen.js
@@ -16,7 +16,8 @@ module.exports = {
size: {
alias: 's',
describe: 'size of the key to generate.',
- default: '2048'
+ default: 2048,
+ type: 'number'
}
},
diff --git a/src/http/api/resources/key.js b/src/http/api/resources/key.js
index <HASH>..<HASH> 100644
--- a/src/http/api/resources/key.js
+++ b/src/http/api/resources/key.js
@@ -64,7 +64,7 @@ exports.gen = (request, reply) => {
const ipfs = request.server.app.ipfs
const name = request.query.arg
const type = request.query.type
- const size = request.query.size
+ const size = parseInt(request.query.size)
ipfs._keychain.createKey(name, type, size, (err, key) => {
if (err) {
return applyError(reply, err)
|
fix: coerce key gen size to number (#<I>)
Keychain params are now validated properly and has caused these test to fail <URL>
|
ipfs_js-ipfs
|
train
|
js,js
|
558d4fb5963badcf9e42de7811545ca0d9be6fc8
|
diff --git a/test/runner/filters/mongodb_topology_filter.js b/test/runner/filters/mongodb_topology_filter.js
index <HASH>..<HASH> 100755
--- a/test/runner/filters/mongodb_topology_filter.js
+++ b/test/runner/filters/mongodb_topology_filter.js
@@ -27,11 +27,15 @@ class MongoDBTopologyFilter {
if (!test.metadata.requires) return true;
if (!test.metadata.requires.topology) return true;
- let topologies = null;
- if (typeof test.metadata.requires.topology === 'string') {
- topologies = [test.metadata.requires.topology];
- } else if (Array.isArray(test.metadata.requires.topology)) {
- topologies = test.metadata.requires.topology;
+ const requiredTopology =
+ test.metadata && test.metadata.requires && test.metadata.requires.topology;
+ if (!requiredTopology) return true;
+
+ let topologies;
+ if (typeof requiredTopology === 'string') {
+ topologies = [requiredTopology];
+ } else if (Array.isArray(requiredTopology)) {
+ topologies = requiredTopology;
} else {
throw new TypeError(
'MongoDBTopologyFilter only supports single string topology or an array of string topologies'
|
test: simply access to required topology directive
|
mongodb_node-mongodb-native
|
train
|
js
|
e776ec1bc29c6e1fd72aeb59e6fd0a16f02a0e4c
|
diff --git a/deisctl/cmd/cmd.go b/deisctl/cmd/cmd.go
index <HASH>..<HASH> 100644
--- a/deisctl/cmd/cmd.go
+++ b/deisctl/cmd/cmd.go
@@ -580,6 +580,8 @@ Options:
"deis-store-metadata.service",
"deis-store-monitor.service",
"deis-store-volume.service",
+ "deis-swarm-manager.service",
+ "deis-swarm-node.service",
}
for _, unit := range units {
src := rootURL + tag + "/deisctl/units/" + unit
|
fix(deisctl): include swarm in refresh-units command
|
deis_deis
|
train
|
go
|
46aed84203fcc365b9f8d1615d05e9a5edcd79e2
|
diff --git a/Treant.js b/Treant.js
index <HASH>..<HASH> 100644
--- a/Treant.js
+++ b/Treant.js
@@ -99,10 +99,10 @@
// todo: getElementsByTagName()
// todo: getElementsByTagNameNS()
- if ( selector.substring( 1 ) == '#' ) {
+ if ( selector.charAt( 0 ) == '#' ) {
return parentEl.getElementById( selector.substring( 1 ) );
}
- else if ( selector.substring( 1 ) == '.' ) {
+ else if ( selector.charAt( 0 ) == '.' ) {
return parentEl.getElementsByClassName( selector.substring( 1 ) );
}
|
fix: in findEl() - selector.charAt(0)
|
fperucic_treant-js
|
train
|
js
|
2fa36aabb76221fa7de48dbd86486871cf760c57
|
diff --git a/packages/bonde-admin-canary/src/components/Forms/GenericMutationForm.js b/packages/bonde-admin-canary/src/components/Forms/GenericMutationForm.js
index <HASH>..<HASH> 100644
--- a/packages/bonde-admin-canary/src/components/Forms/GenericMutationForm.js
+++ b/packages/bonde-admin-canary/src/components/Forms/GenericMutationForm.js
@@ -2,6 +2,7 @@ import React from 'react'
import PropTypes from 'prop-types'
import { Mutation } from 'react-apollo'
import { SubmissionError } from 'redux-form'
+import { toast } from 'react-toastify'
import GenericReduxForm from './GenericReduxForm'
const GenericMutationForm = ({
@@ -67,7 +68,10 @@ GenericMutationForm.propTypes = {
}
GenericMutationForm.defaultProps = {
- variables: {}
+ variables: {},
+ onSuccess: () => {
+ toast('Salvo com sucesso!', { type: toast.TYPE.SUCCESS })
+ }
}
export default GenericMutationForm
|
chore(canary): add default onSuccess notify in components/Forms
|
nossas_bonde-client
|
train
|
js
|
2bbf0b55025b7f1275a27c936373ef20d318a3b8
|
diff --git a/chess/__init__.py b/chess/__init__.py
index <HASH>..<HASH> 100644
--- a/chess/__init__.py
+++ b/chess/__init__.py
@@ -2045,7 +2045,7 @@ class Board(BaseBoard):
Checks if the player to move can claim a draw by threefold repetition.
Draw by threefold repetition can be claimed if the position on the
- board occured for the third time or if such a repetition is reached
+ board occurred for the third time or if such a repetition is reached
with one of the possible legal moves.
Note that checking this can be slow: In the worst case
@@ -2070,7 +2070,7 @@ class Board(BaseBoard):
while switchyard:
self.push(switchyard.pop())
- # Threefold repetition occured.
+ # Threefold repetition occurred.
if transpositions[transposition_key] >= 3:
return True
diff --git a/chess/syzygy.py b/chess/syzygy.py
index <HASH>..<HASH> 100644
--- a/chess/syzygy.py
+++ b/chess/syzygy.py
@@ -1495,7 +1495,7 @@ class Tablebase:
If *max_fds* is not ``None``, will at most use *max_fds* open file
descriptors at any given time. The least recently used tables are closed,
- if nescessary.
+ if necessary.
"""
def __init__(self, *, max_fds: Optional[int] = 128, VariantBoard: Type[chess.Board] = chess.Board) -> None:
self.variant = VariantBoard
|
docs: Fix a few typos
There are small typos in:
- chess/__init__.py
- chess/syzygy.py
Fixes:
- Should read `necessary` rather than `nescessary`.
- Should read `occurred` rather than `occured`.
|
niklasf_python-chess
|
train
|
py,py
|
cc17aa878f5eb86aab27bb098ea7a524bd9b43cf
|
diff --git a/frigg_worker/fetcher.py b/frigg_worker/fetcher.py
index <HASH>..<HASH> 100644
--- a/frigg_worker/fetcher.py
+++ b/frigg_worker/fetcher.py
@@ -5,9 +5,15 @@ import random
import socket
import time
+import docker
+import frigg_coverage
+import frigg_settings
+import frigg_test_discovery
import requests
from docker.manager import Docker
+import frigg_worker
+
from .builds import Build
from .deployments import Deployment
@@ -77,7 +83,12 @@ def fetch_task(dispatcher_url, dispatcher_token):
response = requests.get(
dispatcher_url,
headers={
- 'x-frigg-worker-token': dispatcher_token
+ 'x-frigg-worker-token': dispatcher_token,
+ 'x-frigg-worker-version': getattr(frigg_worker, '__version__', ''),
+ 'x-frigg-settings-version': getattr(frigg_settings, '__version__', ''),
+ 'x-frigg-coverage-version': getattr(frigg_coverage, '__version__', ''),
+ 'x-frigg-test-discovery-version': getattr(frigg_test_discovery, '__version__', ''),
+ 'x-docker-wrapper-version': getattr(docker, '__version__', ''),
}
)
|
feat(fetcher): Add version header to requests
|
frigg_frigg-worker
|
train
|
py
|
25db385695444d3b52145c5b755eb525f0d2329b
|
diff --git a/js-given/src/generateJGivenReport.js b/js-given/src/generateJGivenReport.js
index <HASH>..<HASH> 100644
--- a/js-given/src/generateJGivenReport.js
+++ b/js-given/src/generateJGivenReport.js
@@ -17,6 +17,10 @@ export async function generateJGivenReport(fail: boolean): Promise<void> {
console.log(
'No jsGiven reports found, skipping jgiven report generation'
);
+
+ if (fail) {
+ process.exit(1);
+ }
return;
}
|
fix(cli): Take --fail parameter into account when there is no report generated
|
jsGiven_jsGiven
|
train
|
js
|
b4eae5751967a1f85b9b0c6e0064086e50f13e56
|
diff --git a/packages/select/src/Select.js b/packages/select/src/Select.js
index <HASH>..<HASH> 100644
--- a/packages/select/src/Select.js
+++ b/packages/select/src/Select.js
@@ -24,7 +24,8 @@ const components = {
),
ClearIndicator: (props) => (
<ClearIndicator {...props}>
- <CrossIcon tabIndex="0" role="button" aria-label="Clear all selections"/>
+ <CrossIcon />
+ <span className="sr-only">Clear all selections</span>
</ClearIndicator>
),
Option: (props) => {
diff --git a/packages/select/tests/Select.test.js b/packages/select/tests/Select.test.js
index <HASH>..<HASH> 100644
--- a/packages/select/tests/Select.test.js
+++ b/packages/select/tests/Select.test.js
@@ -173,7 +173,6 @@ describe('Select', () => {
}),
expect.anything()
);
- expect(container.querySelector('[role="button"].av__multi-value__remove')).toBeDefined();
});
});
|
fix(select): remove role and attributes from clear indicator
|
Availity_availity-react
|
train
|
js,js
|
3ed981d0be70ae4b4f2921fea9464d23d69811fb
|
diff --git a/demo/src/App.js b/demo/src/App.js
index <HASH>..<HASH> 100644
--- a/demo/src/App.js
+++ b/demo/src/App.js
@@ -1,6 +1,5 @@
import React, { Component } from 'react';
import clone from 'clone';
-import { debugData, individualShapesData } from './mockData';
import Tree from 'react-d3-tree';
import { version } from 'react-d3-tree/package.json';
import Switch from './components/Switch';
@@ -9,6 +8,7 @@ import PureSvgNodeElement from './components/PureSvgNodeElement';
import './App.css';
// Data examples
+import { debugData } from './mockData';
import orgChartJson from './examples/org-chart.json';
import flareJson from './examples/d3-hierarchy-flare.json';
import reactTree from './examples/react-tree';
@@ -54,8 +54,7 @@ class App extends Component {
this.addedNodesCount = 0;
this.state = {
- data: individualShapesData,
- // pathFunc: (d, orientation) => orientation && `M${d.source.y},${d.source.x}V${d.target.x}H${d.target.y}`,
+ data: orgChartJson,
orientation: 'horizontal',
translateX: 200,
translateY: 300,
|
fix(demo): remove outdated example
|
bkrem_react-d3-tree
|
train
|
js
|
27c68c7dc3a335298ce2a2e94b6abaed61d7f77b
|
diff --git a/index.js b/index.js
index <HASH>..<HASH> 100644
--- a/index.js
+++ b/index.js
@@ -29,7 +29,7 @@ Mount individual resumes onto the module object for convenience.
empty: require('./src/jrs/empty.json'),
johndoe: require('./src/jrs/john-doe.json'),
richard: require('./src/jrs/richard-hendriks'),
- jane: require('./src/jrs/jane-fullstacker')
+ jane: require('./src/jrs/jane-fullstacker'),
janeinc: require('./src/jrs/jane-incomplete')
}
|
fix: correct index.js mounting glitch
|
fresh-standard_fresh-test-resumes
|
train
|
js
|
f034e010156a85cf1826b95eb7f41f50ef5a1791
|
diff --git a/lib/protractor.js b/lib/protractor.js
index <HASH>..<HASH> 100644
--- a/lib/protractor.js
+++ b/lib/protractor.js
@@ -320,7 +320,9 @@ Protractor.prototype.waitForAngular = function(opt_description) {
var description = opt_description ? ' - ' + opt_description : '';
var self = this;
if (this.ignoreSynchronization) {
- return webdriver.promise.fulfilled();
+ return self.driver.controlFlow().execute(function() {
+ return true;
+ }, 'Ignore Synchronization Protractor.waitForAngular()');
}
return this.executeAsyncScript_(
|
fix(synchronizing): use the same control flow when ignoring sync
Previously, the order of frames and tasks on the control flow was
different depending on `browser.ignoreSynchronization`. This fixes
the inconsistency by creating an empty task when ignoreSynchronization
is true.
Practically, this fixes the polling spec failing after the update
to selenium-webdriver@<I>.
|
angular_protractor
|
train
|
js
|
8bb3395f3649f6fb091775838c51f370cedd9c30
|
diff --git a/test/browser/es5-shim.js b/test/browser/es5-shim.js
index <HASH>..<HASH> 100644
--- a/test/browser/es5-shim.js
+++ b/test/browser/es5-shim.js
@@ -1214,7 +1214,7 @@ if (
// ECMA-262, 3rd B.2.3
-// Note an ECMAScript standart, although ECMAScript 3rd Edition has a
+// Note an ECMAScript standard, although ECMAScript 3rd Edition has a
// non-normative section suggesting uniform semantics and it should be
// normalized across all browsers
// [bugfix, IE lt 9] IE < 9 substr() with negative value not working in IE
@@ -1317,4 +1317,4 @@ var toObject = function (o) {
return Object(o);
};
-});
\ No newline at end of file
+});
|
docs: Fix simple typo, standart -> standard (#<I>)
There is a small typo in test/browser/es5-shim.js.
Should read `standard` rather than `standart`.
|
petkaantonov_bluebird
|
train
|
js
|
d597f697e092b25f9b8f2525d11547f1bacc5055
|
diff --git a/examples/gh-pages/src/containers/Application.js b/examples/gh-pages/src/containers/Application.js
index <HASH>..<HASH> 100644
--- a/examples/gh-pages/src/containers/Application.js
+++ b/examples/gh-pages/src/containers/Application.js
@@ -103,7 +103,7 @@ export default class Application extends Component {
</Nav>
<Navbar.Collapse style={{ marginRight: 100 }}>
<Nav pullRight>
- <NavItem href="/async">Async example</NavItem>
+ <NavItem href="./async">Async example</NavItem>
<NavItem href="#geojson">Geojson</NavItem>
</Nav>
</Navbar.Collapse>
|
docs(gh-pages): fix Async example location
|
tomchentw_react-google-maps
|
train
|
js
|
eedc1b8278733c4247ecc4d3e77bcd8218aaff15
|
diff --git a/src/Keboola/Syrup/Service/StorageApi/StorageApiService.php b/src/Keboola/Syrup/Service/StorageApi/StorageApiService.php
index <HASH>..<HASH> 100644
--- a/src/Keboola/Syrup/Service/StorageApi/StorageApiService.php
+++ b/src/Keboola/Syrup/Service/StorageApi/StorageApiService.php
@@ -8,6 +8,7 @@
namespace Keboola\Syrup\Service\StorageApi;
use Keboola\StorageApi\Client;
+use Keboola\StorageApi\ClientException;
use Symfony\Component\HttpFoundation\Request;
use Keboola\Syrup\Exception\NoRequestException;
use Keboola\Syrup\Exception\UserException;
@@ -58,7 +59,11 @@ class StorageApiService
'userAgent' => explode('/', $this->request->getPathInfo())[1],
]);
- $this->client->verifyToken();
+ try {
+ $this->client->verifyToken();
+ } catch (ClientException $e) {
+ throw new UserException("Invalid Access Token", $e);
+ }
if ($this->request->headers->has('X-KBC-RunId')) {
$kbcRunId = $this->client->generateRunId($this->request->headers->get('X-KBC-RunId'));
|
fix: sapi token verification now throws UserException
|
keboola_syrup
|
train
|
php
|
b3f991d34ffaa07c9b451615159d2f811572dc6c
|
diff --git a/ui/src/components/badge/QBadge.js b/ui/src/components/badge/QBadge.js
index <HASH>..<HASH> 100644
--- a/ui/src/components/badge/QBadge.js
+++ b/ui/src/components/badge/QBadge.js
@@ -55,6 +55,6 @@ export default createComponent({
style: style.value,
role: 'alert',
'aria-label': props.label
- }, hMergeSlot(slots.default, props.label !== void 0 ? [ props.label ] : [])))
+ }, hMergeSlot(slots.default, props.label !== void 0 ? [ props.label ] : []))
}
})
|
fix(QBadge): doesn't render slot if has label (#<I>)
|
quasarframework_quasar
|
train
|
js
|
52d91c4d919f103e4b59bec43bfdd155de1fd711
|
diff --git a/test/unit/xmlSpec.js b/test/unit/xmlSpec.js
index <HASH>..<HASH> 100644
--- a/test/unit/xmlSpec.js
+++ b/test/unit/xmlSpec.js
@@ -6,15 +6,12 @@ describe('xml', function () {
beforeEach(module('xml'));
describe('x2js', function () {
-
it('will be an instance of X2JS', inject(function (x2js) {
expect(x2js instanceof X2JS).toBe(true);
}));
-
});
describe('x2jsProvider', function () {
-
var X2JS, config;
beforeEach(module(function ($provide, x2jsProvider) {
@@ -28,11 +25,9 @@ describe('xml', function () {
expect(x2js).not.toBeUndefined();
expect(X2JS).toHaveBeenCalledWith(config);
}));
-
});
describe('httpInterceptor', function () {
-
var responseHeaders, x2js, $xmlHttpInterceptor;
beforeEach(module(function ($provide) {
@@ -106,7 +101,5 @@ describe('xml', function () {
respondWithError();
expect(x2js.xml_str2json).toHaveBeenCalled();
});
-
});
-
});
|
refactor: remove extra line breaks
|
johngeorgewright_angular-xml
|
train
|
js
|
c7da042f897675a65f86f7839922fee4218d7fef
|
diff --git a/go/test/endtoend/recovery/unshardedrecovery/recovery.go b/go/test/endtoend/recovery/unshardedrecovery/recovery.go
index <HASH>..<HASH> 100644
--- a/go/test/endtoend/recovery/unshardedrecovery/recovery.go
+++ b/go/test/endtoend/recovery/unshardedrecovery/recovery.go
@@ -157,7 +157,7 @@ SET GLOBAL old_alter_table = ON;
}
}
- if err := localCluster.VtctlclientProcess.InitShardPrimary(keyspaceName, shard.Name, cell, primary.TabletUID); err != nil {
+ if err := localCluster.VtctlclientProcess.InitializeShard(keyspaceName, shard.Name, cell, primary.TabletUID); err != nil {
return 1, err
}
return m.Run(), nil
|
test: use PRS in unshardedrecovery
|
vitessio_vitess
|
train
|
go
|
dacb3285e523d9a741b08f8cc0c68c2065dcd2ae
|
diff --git a/docs/assets/js/main.js b/docs/assets/js/main.js
index <HASH>..<HASH> 100755
--- a/docs/assets/js/main.js
+++ b/docs/assets/js/main.js
@@ -13,6 +13,13 @@ const docSearch = {
const header = new alg.communityHeader(docSearch);
+function removeDocSearch() {
+ const container = document.querySelector('.algc-search__input--docsearch');
+ container.parentNode.removeChild(container);
+}
+
+removeDocSearch();
+
const container = document.querySelector('.documentation-container');
const codeSamples = document.querySelectorAll('.code-sample');
|
docs(search): remove docsearch
unfortunately it's not possible to index URLs containing -- for now :(
|
algolia_vue-instantsearch
|
train
|
js
|
00ab236f22f8d1eb28c5ee9cbbbe1d7e1f05000b
|
diff --git a/packages/mdc-slider/addon/components/mdc-slider.js b/packages/mdc-slider/addon/components/mdc-slider.js
index <HASH>..<HASH> 100644
--- a/packages/mdc-slider/addon/components/mdc-slider.js
+++ b/packages/mdc-slider/addon/components/mdc-slider.js
@@ -67,7 +67,7 @@ export default Component.extend({
didUpdateAttrs () {
this._super (...arguments);
- let {min, max, value, step} = this.getProperties (['min', 'max', 'value', 'step']);
+ let {min, max, value, step, disabled} = this.getProperties (['min', 'max', 'value', 'step', 'disabled']);
if (min !== this._slider.min) {
this._slider.min = min;
|
fix: Disabled was not defined
|
onehilltech_ember-cli-mdc
|
train
|
js
|
4184f279b32b3860631f0d8a7aac3e4294e4c433
|
diff --git a/planner/core/point_get_plan_test.go b/planner/core/point_get_plan_test.go
index <HASH>..<HASH> 100644
--- a/planner/core/point_get_plan_test.go
+++ b/planner/core/point_get_plan_test.go
@@ -478,12 +478,10 @@ func (s *testPointGetSuite) TestSelectInMultiColumns(c *C) {
}
func (s *testPointGetSuite) TestUpdateWithTableReadLockWillFail(c *C) {
- gcfg := config.GetGlobalConfig()
- etl := gcfg.EnableTableLock
- gcfg.EnableTableLock = true
- defer func() {
- gcfg.EnableTableLock = etl
- }()
+ defer config.RestoreFunc()()
+ config.UpdateGlobal(func(conf *config.Config) {
+ conf.EnableTableLock = true
+ })
tk := testkit.NewTestKit(c, s.store)
tk.MustExec("use test")
tk.MustExec("create table tbllock(id int, c int);")
|
test: make test TestUpdateWithTableReadLockWillFail stable (#<I>)
|
pingcap_tidb
|
train
|
go
|
b4cf28f02c53a89ebe5dadc5d7d220adef582b3d
|
diff --git a/discovery/src/test/java/com/ibm/watson/discovery/v1/DiscoveryServiceIT.java b/discovery/src/test/java/com/ibm/watson/discovery/v1/DiscoveryServiceIT.java
index <HASH>..<HASH> 100644
--- a/discovery/src/test/java/com/ibm/watson/discovery/v1/DiscoveryServiceIT.java
+++ b/discovery/src/test/java/com/ibm/watson/discovery/v1/DiscoveryServiceIT.java
@@ -154,7 +154,6 @@ public class DiscoveryServiceIT extends WatsonServiceTest {
}
/** Cleanup. */
- @After
public void cleanup() {
for (String collectionId : collectionIds) {
DeleteCollectionOptions deleteOptions =
@@ -200,6 +199,7 @@ public class DiscoveryServiceIT extends WatsonServiceTest {
}
}
}
+ collectionId = null;
}
/**
|
test(discovery-v1): fix cleanup method to be called after the tests are done
cleanup was called after each test
|
watson-developer-cloud_java-sdk
|
train
|
java
|
11de938e357bee47580998605ed31b53a1bb6e8e
|
diff --git a/samples/subscriptions.js b/samples/subscriptions.js
index <HASH>..<HASH> 100755
--- a/samples/subscriptions.js
+++ b/samples/subscriptions.js
@@ -312,9 +312,6 @@ async function synchronousPull(projectName, subscriptionName) {
// Send the message to the worker function.
worker(message);
- // setInterval() checks the worker process every 5 sec.
- // If the pre-set ack deadline is n sec, it is best to
- // set the interval to be every (n/2) sec.
let waiting = true;
while (waiting) {
await new Promise(r => setTimeout(r, 10000));
|
docs: remove outdated comments (#<I>)
docs: remove outdated comments
|
googleapis_nodejs-pubsub
|
train
|
js
|
4e029636f04c35c67bd445f3073a448c4f1ef838
|
diff --git a/src/components/inputs/date-time-input/date-time-input.js b/src/components/inputs/date-time-input/date-time-input.js
index <HASH>..<HASH> 100644
--- a/src/components/inputs/date-time-input/date-time-input.js
+++ b/src/components/inputs/date-time-input/date-time-input.js
@@ -13,7 +13,6 @@ import Constraints from '../../constraints';
import messages from './messages';
import filterDataAttributes from '../../../utils/filter-data-attributes';
import {
- getDaysInMonth,
changeTime,
formatTime,
getDateInMonth,
@@ -99,7 +98,7 @@ class DateTimeInput extends React.Component {
calendarDate: today,
highlightedIndex:
prevState.suggestedItems.length +
- getDaysInMonth(today, this.props.timeZone) -
+ getDateInMonth(today, this.props.timeZone) -
1,
}),
() => this.inputRef.current.focus()
|
fix(date-time-input): today button not highlighting todays date (#<I>)
|
commercetools_ui-kit
|
train
|
js
|
b73bc4f1fab4d0ed1f04daee3f23e03c274587bd
|
diff --git a/node-tests/unit/commands/build-test.js b/node-tests/unit/commands/build-test.js
index <HASH>..<HASH> 100644
--- a/node-tests/unit/commands/build-test.js
+++ b/node-tests/unit/commands/build-test.js
@@ -12,9 +12,9 @@ var CdvBuildTask = require('../../../lib/tasks/cordova-build');
var HookTask = require('../../../lib/tasks/run-hook');
var PlatformTask = require('../../../lib/tasks/validate/platform');
-const mockProject = require('../../fixtures/ember-cordova-mock/project');
-const mockAnalytics = require('../../fixtures/ember-cordova-mock/analytics');
-const parsePlatformOpts = require('../../../lib/utils/parse-platform-opts');
+var mockProject = require('../../fixtures/ember-cordova-mock/project');
+var mockAnalytics = require('../../fixtures/ember-cordova-mock/analytics');
+var parsePlatformOpts = require('../../../lib/utils/parse-platform-opts');
describe('Build Command', function() {
var build;
|
fix(build-test): remove use of constant in strict mode
|
isleofcode_ember-cordova
|
train
|
js
|
60e8fa55a9ec79fc13a27a51cfc5f1605b5b7c10
|
diff --git a/src/foremast/__main__.py b/src/foremast/__main__.py
index <HASH>..<HASH> 100644
--- a/src/foremast/__main__.py
+++ b/src/foremast/__main__.py
@@ -8,6 +8,12 @@ from .consts import LOGGING_FORMAT
LOG = logging.getLogger(__name__)
+def add_infra(subparsers):
+ """Infrastructure subcommands."""
+ infra_parser = subparsers.add_parser('infra', help=add_infra.__doc__)
+ infra_parser.set_defaults(func=infra_parser.print_help)
+
+
def main(manual_args=None):
"""Foremast, your ship's support."""
logging.basicConfig(format=LOGGING_FORMAT)
@@ -16,6 +22,10 @@ def main(manual_args=None):
parser.set_defaults(func=parser.print_help)
add_debug(parser)
+ subparsers = parser.add_subparsers(title='Commands', description='Available activies')
+
+ add_infra(subparsers)
+
args, args_list = parser.parse_known_args(args=manual_args)
package, *_ = __package__.split('.')
|
feat: Add infra subcommand
|
foremast_foremast
|
train
|
py
|
00f9a3f819f5338fa7053f7716ef47faf9bd4c72
|
diff --git a/packages/site/pages/components/drawer.js b/packages/site/pages/components/drawer.js
index <HASH>..<HASH> 100644
--- a/packages/site/pages/components/drawer.js
+++ b/packages/site/pages/components/drawer.js
@@ -203,24 +203,6 @@ export default withServerProps(_ => (
</Drawer>`
]}
/>
-
- <SectionHeading>Light Theme</SectionHeading>
- <P>
- To specify the light theme, wrap your components in a <code>Theme</code>{' '}
- component.
- </P>
- <Example.React
- includes={{ Drawer, Theme }}
- themeName={Theme.names.light}
- orient="vertical"
- codes={[
- `<Theme name={Theme.names.light}>
- <Drawer startOpen base={<div style={{ height: 100 }} />}>
- <div style={{ height: 128 }} />
- </Drawer>
-</Theme>`
- ]}
- />
</Content>
</Chrome>
))
|
refactor(site): rm light theme section from drawer pg
|
pluralsight_design-system
|
train
|
js
|
a94ff10d4b393b96b127a8986fc2449819906f1f
|
diff --git a/src/IO/WebSocket/BinaryImageStream/index.js b/src/IO/WebSocket/BinaryImageStream/index.js
index <HASH>..<HASH> 100644
--- a/src/IO/WebSocket/BinaryImageStream/index.js
+++ b/src/IO/WebSocket/BinaryImageStream/index.js
@@ -43,6 +43,13 @@ export default class BinaryImageStream {
}));
}
+ invalidateCache() {
+ this.ws.send(JSON.stringify({
+ view_id: this.view_id,
+ invalidate_cache: true,
+ }));
+ }
+
updateQuality(stillQuality = 100, interactiveQuality = 50) {
this.stillQuality = stillQuality;
this.interactiveQuality = interactiveQuality;
|
fix(BinaryImageStream): Add method for invalidating image cache
|
Kitware_paraviewweb
|
train
|
js
|
770964640c241f5d60f0eb731f290f9f3d6fb2d1
|
diff --git a/lib/client-base.js b/lib/client-base.js
index <HASH>..<HASH> 100644
--- a/lib/client-base.js
+++ b/lib/client-base.js
@@ -178,15 +178,16 @@ class ClientBase extends EventEmitter {
try {
this[kQueue].push(new Request(opts, callback))
-
- if (!this[kSocket] && !this[kRetryTimeout]) {
- connect(this)
- }
-
- resume(this)
} catch (err) {
process.nextTick(callback, err, null)
+ return
}
+
+ if (!this[kSocket] && !this[kRetryTimeout]) {
+ connect(this)
+ }
+
+ resume(this)
}
close (callback) {
|
fix: move unfailable outside of try/catch
|
mcollina_undici
|
train
|
js
|
f1e5dafc7139b5c5bb653fe88126a6a671804de2
|
diff --git a/builder/osc/chroot/step_create_volume.go b/builder/osc/chroot/step_create_volume.go
index <HASH>..<HASH> 100644
--- a/builder/osc/chroot/step_create_volume.go
+++ b/builder/osc/chroot/step_create_volume.go
@@ -79,7 +79,7 @@ func (s *StepCreateVolume) Run(ctx context.Context, state multistep.StateBag) mu
var rootDevice *oapi.BlockDeviceMappingImage
for _, device := range image.BlockDeviceMappings {
if device.DeviceName == image.RootDeviceName {
- *rootDevice = device
+ rootDevice = &device
break
}
}
@@ -143,9 +143,12 @@ func (s *StepCreateVolume) buildCreateVolumeInput(suregionName string, rootDevic
if rootDevice == nil {
return nil, fmt.Errorf("Couldn't find root device!")
}
+
+ //FIX: Temporary fix
+ gibSize := rootDevice.Bsu.VolumeSize / (1024 * 1024 * 1024)
createVolumeInput := &oapi.CreateVolumeRequest{
SubregionName: suregionName,
- Size: rootDevice.Bsu.VolumeSize,
+ Size: gibSize,
SnapshotId: rootDevice.Bsu.SnapshotId,
VolumeType: rootDevice.Bsu.VolumeType,
Iops: rootDevice.Bsu.Iops,
|
fix: convert volume size to Gib before volume creation
|
hashicorp_packer
|
train
|
go
|
c25e9e7c5f69ad62c1a3f91f426a467f8d61533e
|
diff --git a/modules/benchmarks/src/tree/tree_benchmark.js b/modules/benchmarks/src/tree/tree_benchmark.js
index <HASH>..<HASH> 100644
--- a/modules/benchmarks/src/tree/tree_benchmark.js
+++ b/modules/benchmarks/src/tree/tree_benchmark.js
@@ -44,8 +44,8 @@ function setup() {
directives: [TreeComponent, NgIf],
inline: `
<span> {{data.value}}
- <span template='ng-if data.left != null'><tree [data]='data.left'></span>
- <span template='ng-if data.right != null'><tree [data]='data.right'></span>
+ <span template='ng-if data.left != null'><tree [data]='data.left'></tree></span>
+ <span template='ng-if data.right != null'><tree [data]='data.right'></tree></span>
</span>`
})
})]
|
fix: properly close the <tree> tag in benchmark
|
angular_angular
|
train
|
js
|
99787162c3b9e22886486bccce55459f30f8f046
|
diff --git a/cpenv/module.py b/cpenv/module.py
index <HASH>..<HASH> 100644
--- a/cpenv/module.py
+++ b/cpenv/module.py
@@ -225,15 +225,11 @@ class Module(object):
@property
def environment(self):
- if self._environ is None:
- env = self.config.get('environment', {})
- additional = {
- 'CPENV_ACTIVE_MODULES': [self.real_name],
- }
- env = mappings.join_dicts(additional, env)
- self._environ = mappings.preprocess_dict(env)
-
- return self._environ
+ if self._env is None:
+ self._env = self.config.get('environment', {})
+ self._env['CPENV_ACTIVE_MODULES'] = {'append': self.real_name}
+
+ return self._env
def read_raw_config(module_file):
|
fix: Module.environment no longer requires preprocessing
|
cpenv_cpenv
|
train
|
py
|
0a770f24c048458bcc44fdf88774423e52951af4
|
diff --git a/lib/Broker.js b/lib/Broker.js
index <HASH>..<HASH> 100644
--- a/lib/Broker.js
+++ b/lib/Broker.js
@@ -583,7 +583,7 @@ Broker.prototype.servicesUpdate = function() {
return semver.satisfies(version, range);
});
- service.aux = _.pluck(satisfying, 'name');
+ service.aux = _.map(satisfying, 'name');
}
});
|
fix: Use _.map instead of _.pluck (DEPRECATED / REMOVED)
`_.pluck` has been removed in favor of `_.map` in LoDash
|
prdn_pigato
|
train
|
js
|
89ded2d79c995404207c6a06a058b2a6a0780078
|
diff --git a/src/pre.js b/src/pre.js
index <HASH>..<HASH> 100644
--- a/src/pre.js
+++ b/src/pre.js
@@ -10,13 +10,13 @@ module.exports = function (config, cb) {
auto({
lastRelease: plugins.getLastRelease.bind(null, config),
- commits: ['lastRelease', function (cb, results) {
+ commits: ['lastRelease', function (results, cb) {
getCommits(_.assign({
lastRelease: results.lastRelease
}, config),
cb)
}],
- type: ['commits', 'lastRelease', function (cb, results) {
+ type: ['commits', 'lastRelease', function (results, cb) {
getType(_.assign({
commits: results.commits,
lastRelease: results.lastRelease
|
refactor(pre): adapt to new run-auto api
|
semantic-release_semantic-release
|
train
|
js
|
c7a7bbcfde04ab78409442390138a8ec4e7ed334
|
diff --git a/engine/src/main/java/org/camunda/bpm/engine/impl/identity/PasswordPolicySpecialCharacterRuleImpl.java b/engine/src/main/java/org/camunda/bpm/engine/impl/identity/PasswordPolicySpecialCharacterRuleImpl.java
index <HASH>..<HASH> 100644
--- a/engine/src/main/java/org/camunda/bpm/engine/impl/identity/PasswordPolicySpecialCharacterRuleImpl.java
+++ b/engine/src/main/java/org/camunda/bpm/engine/impl/identity/PasswordPolicySpecialCharacterRuleImpl.java
@@ -50,7 +50,7 @@ public class PasswordPolicySpecialCharacterRuleImpl implements PasswordPolicyRul
public boolean execute(String password) {
int specialCount = 0;
for (Character c : password.toCharArray()) {
- if (specialCharacters.indexOf(c) != -1) {
+ if (SPECIALCHARACTERS.indexOf(c) != -1) {
specialCount++;
}
if (specialCount >= this.minSpecial) {
|
chore(engine): convert static final field to upper case
Related to CAM-<I>
|
camunda_camunda-bpm-platform
|
train
|
java
|
c2b544b8844326067612baee620ebc7960fc6aca
|
diff --git a/test/tests/functional/server_tests.js b/test/tests/functional/server_tests.js
index <HASH>..<HASH> 100644
--- a/test/tests/functional/server_tests.js
+++ b/test/tests/functional/server_tests.js
@@ -292,8 +292,6 @@ describe('Server tests', function() {
// The actual test we wish to run
test: function(done) {
- this.timeout(0);
-
var self = this;
var testDone = false;
|
chore(package): upgrade mongodb-test-runner
NODE-<I>
|
mongodb-js_mongodb-core
|
train
|
js
|
0d1a0b488d0ee1ffdd00231a6ae3e6a60c1339fb
|
diff --git a/src/primitives/ButtonPrimitive/index.js b/src/primitives/ButtonPrimitive/index.js
index <HASH>..<HASH> 100644
--- a/src/primitives/ButtonPrimitive/index.js
+++ b/src/primitives/ButtonPrimitive/index.js
@@ -121,13 +121,16 @@ export const StyledButtonPrimitive = styled(
}
&:hover {
- background: ${backgroundHover};
- color: ${foregroundHover};
- box-shadow: ${boxShadowHover};
+ ${!disabled &&
+ css`
+ background: ${backgroundHover};
+ color: ${foregroundHover};
+ box-shadow: ${boxShadowHover};
- ${StyledButtonPrimitiveIconContainer} {
- color: ${icons && icons.foregroundHover};
- }
+ ${StyledButtonPrimitiveIconContainer} {
+ color: ${icons && icons.foregroundHover};
+ }
+ `};
}
&:active {
|
fix(ButtonPrimitive): interactive states when disabled (#<I>)
|
kiwicom_orbit-components
|
train
|
js
|
bfd7960450de4134a6b6021eba6723e99351867f
|
diff --git a/gulpfile.js b/gulpfile.js
index <HASH>..<HASH> 100644
--- a/gulpfile.js
+++ b/gulpfile.js
@@ -65,15 +65,7 @@ async function previewChangelog(done) {
function publishPackages() {
return spawn(
"yarn",
- [
- "lerna",
- "publish",
- "--ignore",
- "@kiwicom/orbit.kiwi",
- "--conventional-commits",
- "--create-release",
- "github",
- ],
+ ["lerna", "publish", "--conventional-commits", "--create-release", "github"],
{ stdio: "inherit" },
);
}
|
chore: remove unused option
These option doesn't seem to have effect.
|
kiwicom_orbit-components
|
train
|
js
|
6b9686fd9787473be6ba6273a9e5a72d99dbcc34
|
diff --git a/src/conversation.js b/src/conversation.js
index <HASH>..<HASH> 100644
--- a/src/conversation.js
+++ b/src/conversation.js
@@ -3,13 +3,13 @@ const { _request } = require('./request');
const AV = require('./av');
const serializeMessage = message => {
- if (typeof message.toJSON === 'function') {
- return message.toJSON();
+ if (typeof message === 'string') {
+ return message;
}
- if (typeof message !== 'string') {
- return JSON.stringify(message);
+ if (typeof message.getPayload === 'function') {
+ return JSON.stringify(message.getPayload());
}
- return message;
+ return JSON.stringify(message);
};
/**
|
fix(conversation): make compatible w/ Message from leancloud-realtime@4
|
leancloud_javascript-sdk
|
train
|
js
|
d088a94575d7268b5cd52f6aa5c8594af76091cb
|
diff --git a/webapps/camunda-webapp/webapp/src/main/webapp/app/common/directives/main.js b/webapps/camunda-webapp/webapp/src/main/webapp/app/common/directives/main.js
index <HASH>..<HASH> 100644
--- a/webapps/camunda-webapp/webapp/src/main/webapp/app/common/directives/main.js
+++ b/webapps/camunda-webapp/webapp/src/main/webapp/app/common/directives/main.js
@@ -2,7 +2,7 @@
define([
'./email',
'./engineSelect',
- './help',
+ //'./help',
'./inPlaceTextField',
// './paginator',
'./password',
|
chore(webapp): do not use "help" directive
related to CAM-<I>
|
camunda_camunda-bpm-platform
|
train
|
js
|
a088e6f175ca817f59d5eea99549e45ab5861ce0
|
diff --git a/index.js b/index.js
index <HASH>..<HASH> 100644
--- a/index.js
+++ b/index.js
@@ -272,7 +272,9 @@ OnTimeoutReporter.prototype.reportSpecResults = function(spec) {
if (result.getItems()[i].passed_ === false) {
failureItem = result.getItems()[i];
- if (failureItem.toString().match(/timeout/)) {
+ var jasmineTimeoutRegexp =
+ /timed out after \d+ msec waiting for spec to complete/;
+ if (failureItem.toString().match(jasmineTimeoutRegexp)) {
this.callback();
}
}
|
fix(timeouts): should call special timeout handlers only for a jasmine timeout
Previously, it used to call the resets if anything matched 'timeout'. This was too
vague, since many error messages contain that string.
Closes #8
|
angular_jasminewd
|
train
|
js
|
43474a150f8eefaf561aaff46d735f7062d213b6
|
diff --git a/docs/app/js/app.js b/docs/app/js/app.js
index <HASH>..<HASH> 100644
--- a/docs/app/js/app.js
+++ b/docs/app/js/app.js
@@ -135,7 +135,7 @@ function(SERVICES, COMPONENTS, DEMOS, PAGES,
}])
.config(['AngularyticsProvider', function(AngularyticsProvider) {
- AngularyticsProvider.setEventHandlers(['Console', 'GoogleUniversal']);
+ AngularyticsProvider.setEventHandlers(['GoogleUniversal']);
}])
.run(['Angularytics', function(Angularytics) {
|
docs(angularytics): disable console logging (#<I>)
|
angular_material
|
train
|
js
|
9532a7fa7590b408f515ea56f9128b6a4410a66d
|
diff --git a/src/sdk-impl.js b/src/sdk-impl.js
index <HASH>..<HASH> 100644
--- a/src/sdk-impl.js
+++ b/src/sdk-impl.js
@@ -218,7 +218,7 @@ SdkImpl.prototype.requestAds = function() {
this.controller.getPlayerWidth();
adsRequest.nonLinearAdSlotHeight =
this.controller.getSettings().nonLinearHeight ||
- (this.controller.getPlayerHeight() / 3);
+ this.controller.getPlayerHeight();
adsRequest.setAdWillAutoPlay(this.controller.getSettings().adWillAutoPlay);
const adWillPlayMuted =
|
feat: Add support for full slot ads by changing the default non-linear ad slot height from 1/3 player height to <I>% player height. (#<I>)
|
googleads_videojs-ima
|
train
|
js
|
22638cacd3a4e3d938c6e43ed6281809e1110400
|
diff --git a/webapps/client/scripts/filter/modals/cam-tasklist-filter-form.js b/webapps/client/scripts/filter/modals/cam-tasklist-filter-form.js
index <HASH>..<HASH> 100644
--- a/webapps/client/scripts/filter/modals/cam-tasklist-filter-form.js
+++ b/webapps/client/scripts/filter/modals/cam-tasklist-filter-form.js
@@ -31,7 +31,6 @@ define([
each(arr, function(obj, i) {
if (expressionsExp.test(obj.value)) {
if(obj.key.indexOf('Expression') === -1) {
- // arr[i].key = 'task'+ obj.key[0].toUpperCase() + obj.key.slice(1) +'Expression';
arr[i].key = obj.key +'Expression';
}
} else {
|
chore(code): clean up code
|
camunda_camunda-bpm-platform
|
train
|
js
|
9fdfbab291addd91d2de738da3d5bf9002a8d311
|
diff --git a/src/index.js b/src/index.js
index <HASH>..<HASH> 100644
--- a/src/index.js
+++ b/src/index.js
@@ -1,6 +1,7 @@
// @flow
// Helpers
import stripUnit from './helpers/stripUnit'
+import em from './helpers/em'
// Mixins
import clearFix from './mixins/clearFix'
@@ -10,7 +11,8 @@ const polished = {
clearFix,
ellipsis,
stripUnit,
+ em,
}
export default polished
-export { clearFix, ellipsis, stripUnit }
+export { clearFix, ellipsis, stripUnit, em }
|
chore(exports): export em helper
|
styled-components_polished
|
train
|
js
|
b59a65c365dcefd42e135579e9b7ce9c9c006489
|
diff --git a/jira.go b/jira.go
index <HASH>..<HASH> 100644
--- a/jira.go
+++ b/jira.go
@@ -15,15 +15,21 @@ import (
"github.com/pkg/errors"
)
+// httpClient defines an interface for an http.Client implementation so that alternative
+// http Clients can be passed in for making requests
+type httpClient interface {
+ Do(request *http.Request) (response *http.Response, err error)
+}
+
// A Client manages communication with the JIRA API.
type Client struct {
// HTTP client used to communicate with the API.
- client *http.Client
+ client httpClient
// Base URL for API requests.
baseURL *url.URL
- // Session storage if the user authentificate with a Session cookie
+ // Session storage if the user authenticates with a Session cookie
session *Session
// Services used for talking to different parts of the JIRA API.
@@ -52,7 +58,7 @@ type Client struct {
// As an alternative you can use Session Cookie based authentication provided by this package as well.
// See https://docs.atlassian.com/jira/REST/latest/#authentication
// baseURL is the HTTP endpoint of your JIRA instance and should always be specified with a trailing slash.
-func NewClient(httpClient *http.Client, baseURL string) (*Client, error) {
+func NewClient(httpClient httpClient, baseURL string) (*Client, error) {
if httpClient == nil {
httpClient = http.DefaultClient
}
|
feat: Replace http.Client with interface for extensibility
Setting up the NewClient method to accept an interface that gives access
to the Do method of the http.Client rather than using a hard http.Client
so that an interface can be passed for mocking and other non-standard
clients can be used with go-jira.
|
andygrunwald_go-jira
|
train
|
go
|
a22929b54c7641b5138091c21aebf6d017ddfbdd
|
diff --git a/eth_account/hdaccount/mnemonic.py b/eth_account/hdaccount/mnemonic.py
index <HASH>..<HASH> 100644
--- a/eth_account/hdaccount/mnemonic.py
+++ b/eth_account/hdaccount/mnemonic.py
@@ -67,7 +67,7 @@ def normalize_string(txt):
return unicodedata.normalize("NFKD", utxt)
-class Mnemonic(object):
+class Mnemonic:
def __init__(self, language):
if language not in Mnemonic.list_languages():
raise ValidationError(
|
refactor: unnecessarily inheriting object
|
ethereum_eth-account
|
train
|
py
|
06923e88a0ee56a4ead859e030fd5e2ab3303d45
|
diff --git a/lib/codecs/h264.js b/lib/codecs/h264.js
index <HASH>..<HASH> 100644
--- a/lib/codecs/h264.js
+++ b/lib/codecs/h264.js
@@ -40,6 +40,7 @@ NalByteStream = function() {
swapBuffer.set(data.data, buffer.byteLength);
buffer = swapBuffer;
}
+ var len = buffer.byteLength;
// Rec. ITU-T H.264, Annex B
// scan for NAL unit boundaries
@@ -52,7 +53,7 @@ NalByteStream = function() {
// ^ sync point ^ i
// advance the sync point to a NAL start, if necessary
- for (; syncPoint < buffer.byteLength - 3; syncPoint++) {
+ for (; syncPoint < len - 3; syncPoint++) {
if (buffer[syncPoint + 2] === 1) {
// the sync point is properly aligned
i = syncPoint + 5;
@@ -60,7 +61,7 @@ NalByteStream = function() {
}
}
- while (i < buffer.byteLength) {
+ while (i < len) {
// look at the current byte to determine if we've hit the end of
// a NAL unit boundary
switch (buffer[i]) {
@@ -82,7 +83,7 @@ NalByteStream = function() {
// drop trailing zeroes
do {
i++;
- } while (buffer[i] !== 1 && i < buffer.length);
+ } while (buffer[i] !== 1 && i < len);
syncPoint = i - 2;
i += 3;
break;
|
perf: Cache buffer.byteLength in NalByteStream.push (#<I>)
Significant speedup in (pre-Chromium) Edge, especially for high
bitrates such as uncompressed or lightly-compressed frames.
Previously, buffer.byteLength and buffer.length got looked up
multiple times per byte processed in Edge, leading to higher
CPU usage.
|
videojs_mux.js
|
train
|
js
|
8ea4e3aa6e517c409706faa65b13ceb7fb7078ce
|
diff --git a/ibis/backends/conftest.py b/ibis/backends/conftest.py
index <HASH>..<HASH> 100644
--- a/ibis/backends/conftest.py
+++ b/ibis/backends/conftest.py
@@ -452,14 +452,9 @@ def backend(
)
-@pytest.fixture(scope='session')
+@pytest.fixture(scope="session")
def con(backend):
- """
- Instance of Client, already connected to the db (if applies).
- """
- # See #3021
- # TODO Rename this to `backend` when the existing `backend` is renamed to
- # `backend_test`, and when `connect` returns `Backend` and not `Client`
+ """Instance of a backend client."""
return backend.connection
|
test: clean up `con` fixture
|
ibis-project_ibis
|
train
|
py
|
cc6286ab001a90a8d3212f50415bd089bea5a4b5
|
diff --git a/packages/source-contentful/index.js b/packages/source-contentful/index.js
index <HASH>..<HASH> 100644
--- a/packages/source-contentful/index.js
+++ b/packages/source-contentful/index.js
@@ -35,7 +35,7 @@ class ContentfulSource {
for (const contentType of contentTypes) {
addContentType({
typeName: makeTypeName(contentType.name),
- route: routes[contentType.name] || `${slugify(contentType.name)}/:slug`,
+ route: routes[contentType.name] || `/${slugify(contentType.name)}/:slug`,
refs: contentType.fields.reduce((refs, { id, items }) => {
if (items && items.type === 'Link' && items.linkType === 'Entry') {
refs[id] = {
|
fix(router): prefix default routes with slash
|
gridsome_gridsome
|
train
|
js
|
85b4dc33e8e81f8715cf3feb982d6afae33cf9c4
|
diff --git a/util/db/gpgkeys.go b/util/db/gpgkeys.go
index <HASH>..<HASH> 100644
--- a/util/db/gpgkeys.go
+++ b/util/db/gpgkeys.go
@@ -24,7 +24,12 @@ func validatePGPKey(keyData string) (*appsv1.GnuPGPublicKey, error) {
if err != nil {
return nil, err
}
- defer f.Close()
+ defer func() {
+ err = f.Close()
+ if err != nil {
+ log.Errorf("error closing file %q: %v", f.Name(), err)
+ }
+ }()
parsed, err := gpg.ValidatePGPKeys(f.Name())
if err != nil {
|
fix: Add logic to handle for f.Close() for util/db (#<I>) (#<I>)
|
argoproj_argo-cd
|
train
|
go
|
e5c1e7341cead89fd87594874d3e121c4b1fa6e4
|
diff --git a/templates/report.php b/templates/report.php
index <HASH>..<HASH> 100644
--- a/templates/report.php
+++ b/templates/report.php
@@ -1,6 +1,11 @@
<?php
-$base = explode('staticbuilder', thisUrl())[0] . 'staticbuilder';
+function getBaseUrl() {
+ $url = thisUrl();
+ $pos = strrpos($url, 'staticbuilder');
+ return substr($url, 0, $pos) . 'staticbuilder';
+}
+$base = getBaseUrl();
// Sort data
$pages = [ 'main' => [], 'ignore' => []];
|
fix: report base URL broken if domain contains 'staticbuilder'
|
fvsch_kirby-staticbuilder
|
train
|
php
|
b63c32ba401e7ad3526ae0a01252ccce322e7f91
|
diff --git a/packages/filter-popover/src/FilterPopover.js b/packages/filter-popover/src/FilterPopover.js
index <HASH>..<HASH> 100644
--- a/packages/filter-popover/src/FilterPopover.js
+++ b/packages/filter-popover/src/FilterPopover.js
@@ -17,7 +17,13 @@ const FilterPopover = props => {
<Button
className="trigger"
rightIcon={<SmChevronDown />}
- css="box-shadow: none; button::-moz-focus-inner { border: 10px dotted red; }"
+ css={`
+ box-shadow: none;
+ span {
+ display: flex;
+ align-items: center;
+ }
+ `}
small
active={isVisible || props.hasValue}
>
|
fix(FilterPopover): set a flex container for button contents
affects: @crave/farmblocks-filter-popover
|
CraveFood_farmblocks
|
train
|
js
|
6c7c6eb9c9ad134c5dec3ed81df5567a4dfa8016
|
diff --git a/lib/vehicle.js b/lib/vehicle.js
index <HASH>..<HASH> 100644
--- a/lib/vehicle.js
+++ b/lib/vehicle.js
@@ -487,7 +487,7 @@ Vehicle.prototype.unlock = function() {
/**
* POST Vehicle.batch
*
- * @params {string[]} paths - A list of paths of endpoints to send requests to.
+ * @param {string[]} paths - A list of paths of endpoints to send requests to.
*
* @return {Promise.<Batch>} response on successful request
* @example
|
docs: fix typo in jsdoc (#<I>)
|
smartcar_node-sdk
|
train
|
js
|
a8dbad121f0169eb608f3ba0ce8032d812efd31b
|
diff --git a/components/input/Input.js b/components/input/Input.js
index <HASH>..<HASH> 100644
--- a/components/input/Input.js
+++ b/components/input/Input.js
@@ -83,7 +83,15 @@ const factory = (FontIcon) => {
}
handleChange = (event) => {
- if (this.props.onChange) this.props.onChange(event.target.value, event);
+ const { onChange, multiline, maxLength } = this.props;
+ const valueFromEvent = event.target.value;
+
+ // trim value to maxLength if that exists (only on multiline inputs)
+ const haveToTrim = (multiline && maxLength && event.target.value.length > maxLength);
+ const value = haveToTrim ? valueFromEvent.substr(0, maxLength) : valueFromEvent;
+
+ // propagate to to store and therefore to the input
+ if (onChange) onChange(value, event);
};
handleAutoresize = () => {
@@ -136,8 +144,7 @@ const factory = (FontIcon) => {
disabled,
required,
type,
- value,
- maxLength
+ value
});
return (
|
feat(input): implement maxLength in js rather then using the maxlength prop of the input field
This is explained in #<I>. Fixes #<I> therefore.
|
react-toolbox_react-toolbox
|
train
|
js
|
58561d1c7801d1d6842793b22b2eda9caf2e5a12
|
diff --git a/src/EloGank/Replay/Output/OutputInterface.php b/src/EloGank/Replay/Output/OutputInterface.php
index <HASH>..<HASH> 100644
--- a/src/EloGank/Replay/Output/OutputInterface.php
+++ b/src/EloGank/Replay/Output/OutputInterface.php
@@ -40,4 +40,20 @@ interface OutputInterface
* @throws \InvalidArgumentException When unknown output type is given
*/
public function writeln($messages, $type = self::OUTPUT_TYPE_NORMAL);
+
+ /**
+ * Gets the current verbosity of the output.
+ *
+ * @return int
+ */
+ public function getVerbosity();
+
+ /**
+ * Sets the verbosity of the output.
+ *
+ * @param int $level
+ *
+ * @return void
+ */
+ public function setVerbosity($level);
}
\ No newline at end of file
|
fix: add verbosity to the OutputInterface.
|
EloGank_lol-replay
|
train
|
php
|
aad7eb69f3e6adc518ea521f45b8edc532687a0d
|
diff --git a/src/index.js b/src/index.js
index <HASH>..<HASH> 100644
--- a/src/index.js
+++ b/src/index.js
@@ -1,10 +1,23 @@
import Dacho from './Dacho';
/**
+ * @typedef {Function} Reaction
+ * @param {string[]|Object} keys object keys
+ * @param {string} [prefix=''] prefix of value (Optional)
+ * @return {Object}
+ * @example
+ * reaction({ACTION1: null, ACTION2: null}, 'FOO/');
+ * // {ACTION1: 'FOO/ACTION1', ACTION2: 'FOO/ACTION2'};
+ *
+ * reaction(['ACTION1', 'ACTION2'], 'BAR/');
+ * // {ACTION1: 'BAR/ACTION1', ACTION2: 'BAR/ACTION2'};
+ */
+
+/**
* createReaction
*
- * @param {string} [globalPrefix] prefix for every key
- * @return {Function}
+ * @param {string} [globalPrefix=''] prefix for every key
+ * @return {Reaction}
*/
function createReaction(globalPrefix = '') {
const dacho = new Dacho(globalPrefix);
@@ -13,6 +26,11 @@ function createReaction(globalPrefix = '') {
};
}
+/**
+ * reaction
+ *
+ * @type {Reaction}
+ */
const reaction = createReaction();
export {Dacho, createReaction, reaction};
|
docs(ESDoc): Fix Doc comments
|
moqada_dacho
|
train
|
js
|
49b840dc22f9ff9f093333d8d623f25c9ecfa69d
|
diff --git a/lib/android/app/src/main/java/com/reactnativenavigation/parse/TopTabsOptions.java b/lib/android/app/src/main/java/com/reactnativenavigation/parse/TopTabsOptions.java
index <HASH>..<HASH> 100644
--- a/lib/android/app/src/main/java/com/reactnativenavigation/parse/TopTabsOptions.java
+++ b/lib/android/app/src/main/java/com/reactnativenavigation/parse/TopTabsOptions.java
@@ -25,7 +25,7 @@ public class TopTabsOptions {
public static TopTabsOptions parse(@Nullable JSONObject json) {
TopTabsOptions result = new TopTabsOptions();
if (json == null) return result;
- result.selectedTabColor = ColorParser.parse(json, "selectedColor");
+ result.selectedTabColor = ColorParser.parse(json, "selectedTabColor");
result.unselectedTabColor = ColorParser.parse(json, "unselectedTabColor");
result.fontSize = NumberParser.parse(json, "fontSize");
result.visible = BoolParser.parse(json, "visible");
|
fix(TopTabOptions): fixed attribute naming for parser (#<I>)
|
wix_react-native-navigation
|
train
|
java
|
014be7eb0a82a5d8a79123b85d4d5f8968cacc33
|
diff --git a/test/test_ci.rb b/test/test_ci.rb
index <HASH>..<HASH> 100644
--- a/test/test_ci.rb
+++ b/test/test_ci.rb
@@ -25,6 +25,7 @@ module EnvPullRequest
end
end
+ # NOTE: add test ENV['TRAVIS_PULL_REQUEST'] = false
sub_test_case 'travis-ci' do
pull_id = 800
setup do
|
chore(travis): add note
|
packsaddle_ruby-env_pull_request
|
train
|
rb
|
9c484733a9019cc1d4fb49da396ba40cde05ec70
|
diff --git a/src/includes/classes/Core/Utils/Headers.php b/src/includes/classes/Core/Utils/Headers.php
index <HASH>..<HASH> 100644
--- a/src/includes/classes/Core/Utils/Headers.php
+++ b/src/includes/classes/Core/Utils/Headers.php
@@ -81,7 +81,7 @@ class Headers extends Classes\Core\Base\Core implements Interfaces\HttpStatusCon
*/
public function getStatusSlug(int $status): string
{
- return c::nameToSlug($this->getStatusMessage($status));
+ return $this->c::nameToSlug($this->getStatusMessage($status));
}
/**
|
fix: Undefined `c::` in new header utility.
|
wpsharks_core
|
train
|
php
|
237b01637848ea93875fa0453232b408c1633060
|
diff --git a/src/server/lib/oauth/client.js b/src/server/lib/oauth/client.js
index <HASH>..<HASH> 100644
--- a/src/server/lib/oauth/client.js
+++ b/src/server/lib/oauth/client.js
@@ -167,9 +167,17 @@ async function getOAuth2AccessToken (code, provider, codeVerifier) {
raw = querystring.parse(data)
}
- const accessToken = provider.id === 'slack'
- ? raw.authed_user.access_token
- : raw.access_token
+ let accessToken
+ if (provider.id === 'slack') {
+ const { ok, error } = raw
+ if (!ok) {
+ return reject(error)
+ }
+
+ accessToken = raw.authed_user.access_token
+ } else {
+ accessToken = raw.access_token
+ }
resolve({
accessToken,
|
fix(provider): reject access token if slack login flow was canceled (#<I>)
* fix: reject access token if slack login flow was canceled
* style: fix lint errors in oauth client
|
iaincollins_next-auth
|
train
|
js
|
1f1bb9363d4edc763164e5f22be22f42321fc106
|
diff --git a/test/Asset/CustomRootClassFixture.php b/test/Asset/CustomRootClassFixture.php
index <HASH>..<HASH> 100644
--- a/test/Asset/CustomRootClassFixture.php
+++ b/test/Asset/CustomRootClassFixture.php
@@ -19,7 +19,17 @@
namespace oat\tao\test\Asset;
-class CustomRootClassFixture
+use core_kernel_classes_Class;
+
+class CustomRootClassFixture extends core_kernel_classes_Class
{
+ public function __construct()
+ {
+ parent::__construct('test://mock');
+ }
-}
\ No newline at end of file
+ public function isClass()
+ {
+ return true;
+ }
+}
|
test: Add custom core_kernel_classes_Class fixture used for unit tests
|
oat-sa_tao-core
|
train
|
php
|
80a5f06b942d70161829a6cc0d535f198abc8d19
|
diff --git a/src/filters.js b/src/filters.js
index <HASH>..<HASH> 100644
--- a/src/filters.js
+++ b/src/filters.js
@@ -38,6 +38,7 @@ angular.module('angular.filter', [
'a8m.fuzzy',
'a8m.omit',
'a8m.pick',
+ 'a8m.every',
'a8m.math',
'a8m.math.max',
|
fix(filter): register every filter
|
a8m_angular-filter
|
train
|
js
|
5bc8d20ea8da8fab4aea6b8335bbcc5f1a27b22d
|
diff --git a/test/test.wpcom.me.settings.js b/test/test.wpcom.me.settings.js
index <HASH>..<HASH> 100644
--- a/test/test.wpcom.me.settings.js
+++ b/test/test.wpcom.me.settings.js
@@ -1,7 +1,7 @@
/**
* Module dependencies
*/
-var ProfileLinks = require( '../lib/me.settings.profile-links' );
+var ProfileLinks = require( 'wpcom/dist/lib/me.settings.profile-links' );
var util = require( './util' );
var assert = require( 'assert' );
|
test: tweak profile-links test
|
Automattic_wpcom-unpublished
|
train
|
js
|
7feb85bfc96ec7cabc72396b4787938e5ed8a473
|
diff --git a/docs/app/Components/ComponentDoc/ComponentExample/ComponentExample.js b/docs/app/Components/ComponentDoc/ComponentExample/ComponentExample.js
index <HASH>..<HASH> 100644
--- a/docs/app/Components/ComponentDoc/ComponentExample/ComponentExample.js
+++ b/docs/app/Components/ComponentDoc/ComponentExample/ComponentExample.js
@@ -109,9 +109,8 @@ class ComponentExample extends Component {
}
handleDirectLinkClick = () => {
- const { location } = this.props
this.setHashAndScroll()
- copyToClipboard(location.href)
+ copyToClipboard(window.location.href)
}
handleMouseMove = _.throttle(
|
fix(ComponentExample): fix href in copy link button (#<I>)
|
Semantic-Org_Semantic-UI-React
|
train
|
js
|
94128903d535752bc64260d7735bb22cdf888799
|
diff --git a/src/components/transitions/expand-transition.js b/src/components/transitions/expand-transition.js
index <HASH>..<HASH> 100644
--- a/src/components/transitions/expand-transition.js
+++ b/src/components/transitions/expand-transition.js
@@ -4,7 +4,8 @@ export default function (expandedParentClass = '') {
return {
enter (el, done) {
el._parent = el.parentNode
- el._height = el.style.height
+ el._height = el._height != null ? el._height : el.style.height
+
addOnceEventListener(el, 'transitionend', done)
// Get height that is to be scrolled
|
fix(v-expand-transition): fix replaced height
|
vuetifyjs_vuetify
|
train
|
js
|
535b6614f67f395659803ffc66c90354ba8103cd
|
diff --git a/detox/local-cli/cli.js b/detox/local-cli/cli.js
index <HASH>..<HASH> 100755
--- a/detox/local-cli/cli.js
+++ b/detox/local-cli/cli.js
@@ -19,10 +19,14 @@ yargs
.recommendCommands()
.help()
.wrap(yargs.terminalWidth() * 0.9)
- .fail((_msg, err) => {
- const lines = (err ? err.toString() : msg).split('\n');
- for (const line of lines) {
- logger.error(line);
+ .fail(function(msg, err, program) {
+ if (msg || !err) {
+ program.showHelp();
+ } else {
+ const lines = err.toString().split("\n");
+ for (const line of lines) {
+ logger.error(line);
+ }
}
})
.parse();
|
fix: show help on trivial errors in user input
|
wix_Detox
|
train
|
js
|
b6479dfc1b804815ff69c11fba6eff6558c75b4c
|
diff --git a/mapillary_tools/gpx_from_gopro.py b/mapillary_tools/gpx_from_gopro.py
index <HASH>..<HASH> 100644
--- a/mapillary_tools/gpx_from_gopro.py
+++ b/mapillary_tools/gpx_from_gopro.py
@@ -72,6 +72,6 @@ def gpx_from_gopro(gopro_video):
basename, extension = os.path.splitext(gopro_video)
gpx_path = basename + '.gpx'
- write_gpx(gpx_path, gopro_data)
+ write_gpx(gpx_path, sorted(gopro_data))
return gpx_path
|
fix: sort extracted gps data from gopro by time
|
mapillary_mapillary_tools
|
train
|
py
|
54fb892d4ad1928f2d3d3179ad25afacc09485d1
|
diff --git a/src/js/base/editing/Typing.js b/src/js/base/editing/Typing.js
index <HASH>..<HASH> 100644
--- a/src/js/base/editing/Typing.js
+++ b/src/js/base/editing/Typing.js
@@ -59,7 +59,7 @@ export default class Typing {
if (splitRoot) {
// if it is an empty line with li
if (dom.isLi(splitRoot) && (dom.isEmpty(splitRoot) || dom.deepestChildIsEmpty(splitRoot))) {
- // toogle UL/OL and escape
+ // toggle UL/OL and escape
this.bullet.toggleList(splitRoot.parentNode.nodeName);
return;
} else {
|
docs: Fix simple typo, toogle -> toggle (#<I>)
* docs: Fix simple typo, toogle -> toggle
There is a small typo in dist/summernote-bs4.js, dist/summernote-lite.js, dist/summernote.js, src/js/base/editing/Typing.js.
Should read `toggle` rather than `toogle`.
|
summernote_summernote
|
train
|
js
|
4ddd2f5e5f18371a29ccb13c9173e4e283fa4cb7
|
diff --git a/lib/registry/manifest.js b/lib/registry/manifest.js
index <HASH>..<HASH> 100644
--- a/lib/registry/manifest.js
+++ b/lib/registry/manifest.js
@@ -18,6 +18,10 @@ function manifest (spec, opts) {
'registry.manifest',
'looking up registry-based metadata for ', spec
)
+ // NOTE: the opts.digest option is intended to only be
+ // for *tarballs*. So make sure it's null for metadata.
+ const tarDigest = opts.digest
+ opts.digest = null
return request(uri, registry, opts).then(metadata => {
opts.log.silly('registry.manifest', 'got metadata for', spec.name)
return pickManifest(metadata, spec, {
@@ -25,6 +29,9 @@ function manifest (spec, opts) {
defaultTag: opts.defaultTag
})
}).then(manifest => {
+ // ...and we set the digest again
+ opts.digest = tarDigest
+
// Done here instead of ./finalize-manifest because these fields
// have to be filled in differently depending on type.
manifest._shasum = (
|
fix(manifest): stop using digest for manifests
|
zkat_pacote
|
train
|
js
|
c17ed111a0a54ee1bac15dce0d919066434bf05d
|
diff --git a/lib/frames.js b/lib/frames.js
index <HASH>..<HASH> 100644
--- a/lib/frames.js
+++ b/lib/frames.js
@@ -115,6 +115,7 @@ frames.readFrame = function(buffer) {
frame.channel = channel;
}
+ debug('received frame: ', frame, ': ' + payloadBuffer.toString('hex'));
return frame;
};
diff --git a/lib/session.js b/lib/session.js
index <HASH>..<HASH> 100644
--- a/lib/session.js
+++ b/lib/session.js
@@ -287,7 +287,6 @@ Session.prototype._nextHandle = function() {
Session.prototype._processFrame = function(frame) {
if (frame instanceof frames.BeginFrame && (frame.remoteChannel === this.channel)) {
- debug('processing frame: ', frame);
this.sessionSM.beginReceived();
this._beginReceived(frame);
return;
@@ -298,7 +297,6 @@ Session.prototype._processFrame = function(frame) {
return;
}
- debug('processing frame: ', frame);
if (frame instanceof frames.EndFrame) return this._processEndFrame(frame);
else if (frame instanceof frames.AttachFrame) return this._processAttachFrame(frame);
else if (frame instanceof frames.DetachFrame) return this._processDetachFrame(frame);
|
refactor(debug): output all received frames
Previously we were logging a selection of received frames via the
_processFrame handler(s) in session.js, but this ignores (e.g.,) a
received OpenFrame (which is handled in connection.js). It seems more
consistent to be logging received frames within the framing debug where
we currently log all sent frames.
|
noodlefrenzy_node-amqp10
|
train
|
js,js
|
e855c4cd1d5f87ae2a12c0e2620c0b747101c2bc
|
diff --git a/context.go b/context.go
index <HASH>..<HASH> 100644
--- a/context.go
+++ b/context.go
@@ -151,6 +151,9 @@ func (ctx *Context) lookupFlag(name string) Flag {
func (ctx *Context) lookupFlagSet(name string) *flag.FlagSet {
for _, c := range ctx.Lineage() {
+ if c.flagSet == nil {
+ continue
+ }
if f := c.flagSet.Lookup(name); f != nil {
return c.flagSet
}
diff --git a/context_test.go b/context_test.go
index <HASH>..<HASH> 100644
--- a/context_test.go
+++ b/context_test.go
@@ -112,6 +112,8 @@ func TestContext_String(t *testing.T) {
c := NewContext(nil, set, parentCtx)
expect(t, c.String("myflag"), "hello world")
expect(t, c.String("top-flag"), "hai veld")
+ c = NewContext(nil, nil, parentCtx)
+ expect(t, c.String("top-flag"), "hai veld")
}
func TestContext_Path(t *testing.T) {
|
fix: Nil pointer when getting context's flagSet(#<I>) (#<I>)
* fix: Nil pointer when getting context's flagSet in UsageError function(#<I>)
* test: add unit test for nil flagset in Context
|
urfave_cli
|
train
|
go,go
|
0b76a77a36e5ee5fb2f9872d835137cffc7e4b2d
|
diff --git a/src/cli/cms/media/image.js b/src/cli/cms/media/image.js
index <HASH>..<HASH> 100644
--- a/src/cli/cms/media/image.js
+++ b/src/cli/cms/media/image.js
@@ -131,7 +131,7 @@ export function saveFile(req) {
var thumbPromise = generateThumbnail(filePath)
thumbPromise.then(function (thumbResp) {
resp.thumbnail = thumbResp.thumb
- if(req.query.input.indexOf('data-size') > -1){
+ if(req && req.query && req.query.input && ( req.query.input.indexOf('data-size') > -1 )){
var thumbsSizes = cmsData.regex.getAttr(req.query.input, 'data-size').split(',')
cropAndSaveFiles(thumbsSizes, filePath, resp).then(function (resp) {
resolve(resp)
|
fix: allow image upload without req.query.input
|
abecms_abecms
|
train
|
js
|
d86b5e5211f0b703bf5248d948bc4a80e76b0b53
|
diff --git a/test/workers-spec.js b/test/workers-spec.js
index <HASH>..<HASH> 100644
--- a/test/workers-spec.js
+++ b/test/workers-spec.js
@@ -239,20 +239,24 @@ describe('workers', function() {
});
- it('should remove worker', function() {
+ describe('worker removal', function() {
- // given
- workers = createWorkers();
+ it('should remove worker', function() {
- // when
- var workerDefinition = workers.registerWorker('worker:Stuff', [ 'a', 'b' ], noop);
+ // given
+ workers = createWorkers();
+
+ // when
+ var workerDefinition = workers.registerWorker('worker:Stuff', [ 'a', 'b' ], noop);
- // then
- expect(workerDefinition.remove).to.exist;
+ // then
+ expect(workerDefinition.remove).to.exist;
+
+ expect(function() {
+ workerDefinition.remove();
+ }).not.to.throw;
+ });
- expect(function() {
- workerDefinition.remove();
- }).not.to.throw;
});
|
test(workers): minor restructuring
|
nikku_camunda-worker-node
|
train
|
js
|
0989faf4bd57ed91fd5c0f62a8a69e7647f72c04
|
diff --git a/pkg/apis/application/v1alpha1/types.go b/pkg/apis/application/v1alpha1/types.go
index <HASH>..<HASH> 100644
--- a/pkg/apis/application/v1alpha1/types.go
+++ b/pkg/apis/application/v1alpha1/types.go
@@ -8,6 +8,7 @@ import (
"path/filepath"
"reflect"
"regexp"
+ "sort"
"strconv"
"strings"
"time"
@@ -1935,6 +1936,11 @@ func (status *ApplicationStatus) SetConditions(conditions []ApplicationCondition
appConditions = append(appConditions, condition)
}
}
+ sort.Slice(appConditions, func(i, j int) bool {
+ left := appConditions[i]
+ right := appConditions[j]
+ return fmt.Sprintf("%s/%s/%v", left.Type, left.Message, left.LastTransitionTime) < fmt.Sprintf("%s/%s/%v", right.Type, right.Message, right.LastTransitionTime)
+ })
status.Conditions = appConditions
}
|
fix: sort conditions to avoid reconciliation loop (#<I>)
|
argoproj_argo-cd
|
train
|
go
|
27a884e590568192592091ec78ed02949a8c41e1
|
diff --git a/lib/_http_agent.js b/lib/_http_agent.js
index <HASH>..<HASH> 100644
--- a/lib/_http_agent.js
+++ b/lib/_http_agent.js
@@ -120,7 +120,9 @@ function Agent(options) {
// Add a default error handler to avoid Unhandled 'error' event throw on idle socket
// https://github.com/node-modules/agentkeepalive/issues/25
// https://github.com/nodejs/node/pull/4482 (fixed in >= 4.4.0 and >= 5.4.0)
- socket.once('error', freeSocketErrorListener);
+ if (socket.listeners('error').length === 0) {
+ socket.once('error', freeSocketErrorListener);
+ }
// set free keepalive timer
socket.setTimeout(self.keepAliveTimeout);
|
refactor: make sure only one error listener
|
node-modules_agentkeepalive
|
train
|
js
|
ede5dd6dca08356811b7db73bafca16b664fd13e
|
diff --git a/src/lock.js b/src/lock.js
index <HASH>..<HASH> 100644
--- a/src/lock.js
+++ b/src/lock.js
@@ -5,10 +5,20 @@ const debug = require('debug')
const { lock } = require('proper-lockfile')
const log = debug('repo:lock')
-
const lockFile = 'repo.lock'
/**
+ * Duration in milliseconds in which the lock is considered stale
+ * @see https://github.com/moxystudio/node-proper-lockfile#lockfile-options
+ * The default value of 10000 was too low for ipfs and sometimes `proper-lockfile`
+ * would throw an exception because it couldn't update the lock file mtime within
+ * the 10s threshold. @see https://github.com/ipfs/js-ipfs-repo/pull/182
+ * Increasing to 20s is a temporary fix a permanent fix should be implemented in
+ * the future.
+ */
+const STALE_TIME = 20000
+
+/**
* Lock the repo in the given dir.
*
* @param {string} dir
@@ -19,7 +29,7 @@ exports.lock = (dir, callback) => {
const file = path.join(dir, lockFile)
log('locking %s', file)
- lock(dir, {lockfilePath: file})
+ lock(dir, {lockfilePath: file, stale: STALE_TIME})
.then(release => {
callback(null, {close: (cb) => {
release()
|
fix: fix staleness check (#<I>)
* fix: fix staleness check
* fix: extract stale value to const
|
ipfs_js-ipfs-repo
|
train
|
js
|
4d7576d26b93a1e8692ffe70317957618946ad9f
|
diff --git a/jest.config.js b/jest.config.js
index <HASH>..<HASH> 100644
--- a/jest.config.js
+++ b/jest.config.js
@@ -4,6 +4,8 @@ module.exports = {
collectCoverageFrom: ['src/*/**/*.{ts,tsx}'],
coveragePathIgnorePatterns: [
'\\.d\\.ts$',
+ '\\.e2e\\.tsx?$',
'src/types',
+ 'src/testing',
],
}
diff --git a/jest.unit.config.js b/jest.unit.config.js
index <HASH>..<HASH> 100644
--- a/jest.unit.config.js
+++ b/jest.unit.config.js
@@ -5,6 +5,8 @@ module.exports = {
collectCoverageFrom: ['src/*/**/*.{ts,tsx}'],
coveragePathIgnorePatterns: [
'\\.d\\.ts$',
+ '\\.e2e\\.tsx?$',
'src/types',
+ 'src/testing',
],
-}
+};
|
test: Ignore test utils in coverage
|
VKCOM_VKUI
|
train
|
js,js
|
07ec960d63a513fa1836c70b48624559735b9a40
|
diff --git a/src/lambda/handler-runner/go-runner/GoRunner.js b/src/lambda/handler-runner/go-runner/GoRunner.js
index <HASH>..<HASH> 100644
--- a/src/lambda/handler-runner/go-runner/GoRunner.js
+++ b/src/lambda/handler-runner/go-runner/GoRunner.js
@@ -7,9 +7,9 @@ import { execa } from 'execa'
const { parse, stringify } = JSON
-const PAYLOAD_IDENTIFIER = 'offline_payload'
-
export default class GoRunner {
+ static #payloadIdentifier = 'offline_payload'
+
#codeDir = null
#env = null
@@ -51,10 +51,10 @@ export default class GoRunner {
let payload
for (const item of value.split(EOL)) {
- if (item.includes(PAYLOAD_IDENTIFIER)) {
+ if (item.includes(GoRunner.#payloadIdentifier)) {
try {
const {
- [PAYLOAD_IDENTIFIER]: { error, success },
+ [GoRunner.#payloadIdentifier]: { error, success },
} = parse(item)
if (success) {
|
refactor: make more payload identifier private static
|
dherault_serverless-offline
|
train
|
js
|
08f2ca68fac27996e382a3fe97569b517be9a020
|
diff --git a/register.js b/register.js
index <HASH>..<HASH> 100644
--- a/register.js
+++ b/register.js
@@ -25,8 +25,7 @@ function deregisterExtension(extension) {
function registerExtension(extension) {
require.extensions[extension] = function(module, filename) {
- const name = path.basename(filename)
- .slice(0, -path.extname(filename).length)
+ const name = path.parse(filename).name
.replace(/^\d/, '_$&')
.replace(/[^a-zA-Z0-9_$]/g, '');
@@ -46,4 +45,4 @@ function registerExtension(extension) {
registerExtension('.svelte');
registerExtension('.html');
-module.exports = register;
\ No newline at end of file
+module.exports = register;
|
refactor: better parsing name of file
|
sveltejs_svelte
|
train
|
js
|
c36cb9a81a08672dae4c8d75425988c40ef8f20c
|
diff --git a/actor/base/src/main/java/org/getopentest/actions/HttpRequest.java b/actor/base/src/main/java/org/getopentest/actions/HttpRequest.java
index <HASH>..<HASH> 100644
--- a/actor/base/src/main/java/org/getopentest/actions/HttpRequest.java
+++ b/actor/base/src/main/java/org/getopentest/actions/HttpRequest.java
@@ -83,9 +83,9 @@ public class HttpRequest extends TestAction {
if (ignoreCert) {
Logger.warning(
"The SSL certificate is being ignored. The hostname verification and certificate "
- + "signature verification will be skipped, which can be a serious security "
- + "risk. If your call is made over a network outside of your control, the data "
- + "exchanged with the HTTP server may be accessed by a malicios third party.");
+ + "signature verification will be skipped. If the request is made over a network "
+ + "outside of your control, the data exchanged with the HTTP server may be "
+ + "accessible to a malicious third party.");
}
org.getopentest.http.HttpRequest httpRequest = new org.getopentest.http.HttpRequest(options);
|
chore(actor): fix spelling mistake
|
mcdcorp_opentest
|
train
|
java
|
707d9231ac57046861695556d3d856d4b26672ab
|
diff --git a/cloudvolume/datasource/precomputed/skeleton/unsharded.py b/cloudvolume/datasource/precomputed/skeleton/unsharded.py
index <HASH>..<HASH> 100644
--- a/cloudvolume/datasource/precomputed/skeleton/unsharded.py
+++ b/cloudvolume/datasource/precomputed/skeleton/unsharded.py
@@ -27,7 +27,7 @@ class UnshardedPrecomputedSkeletonSource(object):
def path(self):
return self.meta.path
- def get(self, segids):
+ def get(self, segids, allow_missing=False):
"""
Retrieve one or more skeletons from the data layer.
@@ -39,6 +39,9 @@ class UnshardedPrecomputedSkeletonSource(object):
Required:
segids: list of integers or integer
+ Optional:
+ allow_missing: skip over non-existent files otherwise
+ raise cloudvolume.exceptions.SkeletonDecodeError
Returns:
if segids is a list, returns list of Skeletons
@@ -58,8 +61,9 @@ class UnshardedPrecomputedSkeletonSource(object):
compress=compress
)
missing = [ filename for filename, content in results.items() if content is None ]
+ results = { filename: content for filename, content in results.items() if content is not None }
- if len(missing):
+ if not allow_missing and len(missing):
raise SkeletonDecodeError("File(s) do not exist: {}".format(", ".join(missing)))
skeletons = []
|
feat: allow for skipping non-existent skeleton files
|
seung-lab_cloud-volume
|
train
|
py
|
368f4436de3742a1674dc3abe0e6bba958117fff
|
diff --git a/compiler.go b/compiler.go
index <HASH>..<HASH> 100644
--- a/compiler.go
+++ b/compiler.go
@@ -703,9 +703,12 @@ func checkLoop(stack []schemaRef, sref schemaRef) error {
}
func keywordLocation(stack []schemaRef, path string) string {
- var loc = stack[0].ptr
- for _, ref := range stack[1:] {
- loc += "/" + ref.ptr
+ var loc string
+ if len(stack) > 0 {
+ var loc = stack[0].ptr
+ for _, ref := range stack[1:] {
+ loc += "/" + ref.ptr
+ }
}
if path != "" {
loc += "/" + path
@@ -713,5 +716,8 @@ func keywordLocation(stack []schemaRef, path string) string {
if loc == "" {
return "/"
}
+ if loc[0] != '/' {
+ loc = "/" + loc
+ }
return loc
}
|
fix: panic in keywordLocation func
length was zero, when "if" keyword leaves scope
|
santhosh-tekuri_jsonschema
|
train
|
go
|
befe966899781d3c54710e75b901ebf0ebaa8d34
|
diff --git a/src/resolvers.js b/src/resolvers.js
index <HASH>..<HASH> 100644
--- a/src/resolvers.js
+++ b/src/resolvers.js
@@ -3,7 +3,7 @@ import {protocol} from 'aurelia-metadata';
/**
* Decorator: Indicates that the decorated class/object is a custom resolver.
*/
-export const resolver: Function = protocol.create('aureia:resolver', function(target) {
+export const resolver: Function = protocol.create('aurelia:resolver', function(target) {
if (!(typeof target.get === 'function')) {
return 'Resolvers must implement: get(container: Container, key: any): any';
}
|
fix(resolvers): typo in resolver protocol name
|
aurelia_dependency-injection
|
train
|
js
|
0aa92ecfe237e5629e9390b0e9bda9401e64bf12
|
diff --git a/test/test.js b/test/test.js
index <HASH>..<HASH> 100644
--- a/test/test.js
+++ b/test/test.js
@@ -81,6 +81,8 @@ describe('convert', () => {
it('generates git commits converting the files', async function() {
await runWithTemplateDir('simple-success', async function() {
await exec('git init');
+ await exec('git config user.name "Sample User"');
+ await exec('git config user.email "sample@example.com"');
await exec('git add -A');
await exec('git commit -m "Initial commit"');
let decaffeinateStdout = await runCli('convert');
|
test: fix git tests on CI (#1)
Looks like we need to initialize the user name and email for commit to work.
|
decaffeinate_bulk-decaffeinate
|
train
|
js
|
45d69b3a5a136c9bb54df8f98469af8b24ed0501
|
diff --git a/test/e2e/windows/memory_limits.go b/test/e2e/windows/memory_limits.go
index <HASH>..<HASH> 100644
--- a/test/e2e/windows/memory_limits.go
+++ b/test/e2e/windows/memory_limits.go
@@ -53,7 +53,7 @@ var _ = SIGDescribe("[Feature:Windows] Memory Limits [Serial] [Slow]", func() {
ginkgo.Context("attempt to deploy past allocatable memory limits", func() {
ginkgo.It("should fail deployments of pods once there isn't enough memory", func() {
- overrideAllocatableMemoryTest(f, 4)
+ overrideAllocatableMemoryTest(f, framework.TestContext.CloudConfig.NumNodes)
})
})
|
test: don't use hardcoded pod count for memory limit test
|
kubernetes_kubernetes
|
train
|
go
|
fd15d55f11d649d1fe10ae99e9baa1e66400c11f
|
diff --git a/src/widgets/search-box/search-box.js b/src/widgets/search-box/search-box.js
index <HASH>..<HASH> 100644
--- a/src/widgets/search-box/search-box.js
+++ b/src/widgets/search-box/search-box.js
@@ -214,7 +214,7 @@ searchBox({
/**
* @typedef {Object} SearchBoxWidgetOptions
- * @property {string|HTMLElement} container CSS Selector or HTMLElement to insert the widget.
+ * @property {string|HTMLElement} container CSS Selector or HTMLElement to insert the widget. If the CSS selector or the HTMLElement is an existing input, the widget will use it.
* @property {string} [placeholder] Input's placeholder.
* @property {boolean|SearchBoxPoweredByOption} [poweredBy=false] Define if a "powered by Algolia" link should be added near the input.
* @property {boolean|SearchBoxResetOption} [reset=true] Define if a reset button should be added in the input when there is a query.
|
chore(doc): Update description of container (#<I>)
To let the user know that they can use an input and it will reused.
|
algolia_instantsearch.js
|
train
|
js
|
b9120e02f26f96166ec8a09dfa1c2dcbfe8cede0
|
diff --git a/packages/link/src/Link.js b/packages/link/src/Link.js
index <HASH>..<HASH> 100644
--- a/packages/link/src/Link.js
+++ b/packages/link/src/Link.js
@@ -69,7 +69,7 @@ export default class Link extends React.Component {
static propTypes = {
children: PropTypes.node.isRequired,
- href: PropTypes.string.isRequired,
+ href: PropTypes.string,
type: PropTypes.oneOf(Object.values(linkTypes)),
tooltipAlign: PropTypes.oneOf(["left", "right"]),
onClick: PropTypes.func,
|
fix(link): remove href value as required
affects: @crave/farmblocks-link
|
CraveFood_farmblocks
|
train
|
js
|
0678f27a9fa52b5d9d4eae0624c66aa86d2fec14
|
diff --git a/src/components/navbar/config.js b/src/components/navbar/config.js
index <HASH>..<HASH> 100644
--- a/src/components/navbar/config.js
+++ b/src/components/navbar/config.js
@@ -373,8 +373,8 @@ export const defaultNavigationItems = [
itemsDashboard,
itemsProducts,
itemsCategories,
- itemsOrders,
itemsCustomers,
+ itemsOrders,
itemsDiscounts,
itemsProjectSettings,
];
|
fix(navbar): order of items
|
commercetools_merchant-center-application-kit
|
train
|
js
|
6addd8daedc102efd692a2335e89011234687510
|
diff --git a/src/index.js b/src/index.js
index <HASH>..<HASH> 100644
--- a/src/index.js
+++ b/src/index.js
@@ -21,7 +21,7 @@ function split(str) {
}
function isMatch(str, obj) {
- return (obj.val === str && obj.type === STYPE) || obj.type !== (str === SEP ? PTYPE : STYPE);
+ return (obj.val === str && obj.type === STYPE) || (str === SEP ? obj.type > PTYPE : obj.type !== STYPE);
}
export function match(str, all) {
|
fix: better match logic for non-STYPE clause;
- Closes #7
|
lukeed_matchit
|
train
|
js
|
080d945153d1ddc6df27d2deb32d53b56e01b817
|
diff --git a/lib/datasource/npm.js b/lib/datasource/npm.js
index <HASH>..<HASH> 100644
--- a/lib/datasource/npm.js
+++ b/lib/datasource/npm.js
@@ -161,7 +161,7 @@ async function getDependency(name, retries = 5) {
'renovate-config': latestVersion['renovate-config'],
};
Object.keys(dep.versions).forEach(version => {
- if (dep.versions[version].deprecated) {
+ if (dep.versions[version].deprecated === 'this') {
delete dep.versions[version];
} else {
// We don't use any of the version payload currently
|
fix(npm): deprecate only if deprecated === ‘this’
|
renovatebot_renovate
|
train
|
js
|
4eb6f999a63e1bd3647b17fe5ab08264f614e2a8
|
diff --git a/cmd/admin-policy-set.go b/cmd/admin-policy-set.go
index <HASH>..<HASH> 100644
--- a/cmd/admin-policy-set.go
+++ b/cmd/admin-policy-set.go
@@ -67,7 +67,7 @@ func checkAdminPolicySetSyntax(ctx *cli.Context) {
func parseEntityArg(arg string) (userOrGroup string, isGroup bool, err error) {
parts := strings.SplitN(arg, "=", 2)
switch {
- case parts[1] == "":
+ case len(parts) != 2 || parts[1] == "":
err = errBadUserGroupArg
case strings.ToLower(parts[0]) == "user":
userOrGroup = parts[1]
|
fix: crash on invalid input to policy set (#<I>)
|
minio_mc
|
train
|
go
|
13c7ab3c321d7696ebc6afd8e2072be1a1f8882d
|
diff --git a/src/label/base.js b/src/label/base.js
index <HASH>..<HASH> 100644
--- a/src/label/base.js
+++ b/src/label/base.js
@@ -375,13 +375,19 @@ class Label extends Component {
x: cfg.x,
y: cfg.y,
textAlign: cfg.textAlign,
- text: cfg.text,
- rotate: cfg.rotate
+ text: cfg.text
}, cfg.textStyle);
}
labelShape = group.addShape('text', {
attrs: cfg
});
+ if (cfg.rotate) {
+ labelShape.transform([
+ [ 't', -cfg.x, -cfg.y ],
+ [ 'r', cfg.rotate ],
+ [ 't', cfg.x, cfg.y ]
+ ]);
+ }
labelShape.setSilent('origin', origin || cfg);
labelShape.name = 'label'; // 用于事件标注
this.get('appendInfo') && labelShape.setSilent('appendInfo', this.get('appendInfo'));
|
fix(label-base): when label has attr rotate, use transform instead
|
antvis_component
|
train
|
js
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.