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 |
|---|---|---|---|---|---|
06dcfdac886b8f2da078e997bf4f5d2f08a3d711
|
diff --git a/src/pandas_profiling/config.py b/src/pandas_profiling/config.py
index <HASH>..<HASH> 100644
--- a/src/pandas_profiling/config.py
+++ b/src/pandas_profiling/config.py
@@ -195,9 +195,9 @@ class Correlations(BaseModel):
class Interactions(BaseModel):
+ # Set to False to disable scatter plots
continuous: bool = True
- """Set to False to disable scatterplots"""
- # FIXME: validate with column names
+
targets: List[str] = []
|
refactor: config comment interactions
|
pandas-profiling_pandas-profiling
|
train
|
py
|
187d08a0294551b0aa594e88a4189b04bb9de6f9
|
diff --git a/actor-sdk/sdk-core-android/android-sdk/src/main/java/im/actor/sdk/controllers/pickers/file/items/BackItem.java b/actor-sdk/sdk-core-android/android-sdk/src/main/java/im/actor/sdk/controllers/pickers/file/items/BackItem.java
index <HASH>..<HASH> 100644
--- a/actor-sdk/sdk-core-android/android-sdk/src/main/java/im/actor/sdk/controllers/pickers/file/items/BackItem.java
+++ b/actor-sdk/sdk-core-android/android-sdk/src/main/java/im/actor/sdk/controllers/pickers/file/items/BackItem.java
@@ -12,12 +12,12 @@ import im.actor.sdk.R;
public class BackItem extends ExplorerItem {
public BackItem() {
- super(new File(""), false, "build/intermediates/exploded-aar/com.droidkit/progress/0.5", R.drawable.picker_folder, true);
+ super(new File(""), false, "..", R.drawable.picker_folder, true);
}
@Override
public String getTitle() {
- return "build/intermediates/exploded-aar/com.droidkit/progress/0.5";
+ return "..";
}
@Override
|
fix(android): set backItem title to ".."
|
actorapp_actor-platform
|
train
|
java
|
93ed29813ec6e6596b97024310ac781902eafcce
|
diff --git a/lib/runner/mocha-runner/mocha-adapter.js b/lib/runner/mocha-runner/mocha-adapter.js
index <HASH>..<HASH> 100644
--- a/lib/runner/mocha-runner/mocha-adapter.js
+++ b/lib/runner/mocha-runner/mocha-adapter.js
@@ -44,6 +44,9 @@ module.exports = class MochaAdapter extends EventEmitter {
this._mocha.fullTrace();
this.suite = this._mocha.suite;
+ this.suite.setMaxListeners(0);
+ this._addEventHandler('suite', (suite) => suite.setMaxListeners(0));
+
this.tests = [];
this._replaceTimeouts();
|
fix: ignore memory leaks warnings for mocha suites
|
gemini-testing_hermione
|
train
|
js
|
aca146f784a20785b7bb241d72fae472892d0c8e
|
diff --git a/includes/edu-text-functions.php b/includes/edu-text-functions.php
index <HASH>..<HASH> 100644
--- a/includes/edu-text-functions.php
+++ b/includes/edu-text-functions.php
@@ -112,9 +112,11 @@ function edu_get_percent_from_values( $current_value, $max_value ) {
function edu_output_event_venue( $parts, $prefix = null ) {
$empty = true;
+ $new_parts = [];
foreach ( $parts as $part ) {
if ( ! empty( $part ) ) {
$empty = false;
+ $new_parts[] = $part;
}
}
@@ -122,7 +124,7 @@ function edu_output_event_venue( $parts, $prefix = null ) {
return '';
}
- return $prefix . join( ', ', $parts );
+ return $prefix . join( ', ', $new_parts );
}
function edu_get_percent_class( $percent ) {
|
fix: Output only non-empty parts in the venue info.
|
MultinetInteractive_EduAdmin-WordPress
|
train
|
php
|
69b276922ae32ee1cdad799c539512c5990eae18
|
diff --git a/.github/workflows/tools/update-issues/issues.js b/.github/workflows/tools/update-issues/issues.js
index <HASH>..<HASH> 100644
--- a/.github/workflows/tools/update-issues/issues.js
+++ b/.github/workflows/tools/update-issues/issues.js
@@ -303,6 +303,8 @@ class Issue extends GitHubObject {
this.locked = obj.locked;
/** @type {Milestone} */
this.milestone = obj.milestone ? new Milestone(obj.milestone) : null;
+ /** @type {boolean} */
+ this.isPR = !!obj.pull_request;
}
/**
@@ -519,9 +521,11 @@ class Issue extends GitHubObject {
/** @return {!Promise<!Array<!Issue>>} */
static async getAll() {
- return GitHubObject.getAll(octokit.rest.issues.listForRepo, Issue, {
- state: 'all',
- });
+ const all = await GitHubObject.getAll(
+ octokit.rest.issues.listForRepo, Issue, {
+ state: 'all',
+ });
+ return all.filter(issue => !issue.isPR);
}
}
|
ci: Filter out PRs from update-issues tool (#<I>)
The tool isn't (yet) intended to maintain PR labels, and the workflow
doesn't have permissions to update PRs.
|
google_shaka-player
|
train
|
js
|
78618fda3bb9385108f2d85f8fd195499ce21622
|
diff --git a/src/components/configuration/configuration-consumer.js b/src/components/configuration/configuration-consumer.js
index <HASH>..<HASH> 100644
--- a/src/components/configuration/configuration-consumer.js
+++ b/src/components/configuration/configuration-consumer.js
@@ -6,13 +6,13 @@ import { ConfigurationContext } from './configuration-provider';
const ConfigurationConsumer = props => (
<ConfigurationContext.Consumer>
{configuration =>
- props.children(getIn(configuration, this.propspathToConfiguration))
+ props.children(getIn(configuration, props.pathToConfiguration))
}
</ConfigurationContext.Consumer>
);
ConfigurationConsumer.displayName = 'ConfigurationConsumer';
ConfigurationConsumer.propTypes = {
- pathToConfiguration: PropTypes.string,
+ pathToConfiguration: PropTypes.array.isRequired,
children: PropTypes.func.isRequired,
};
|
chore(app-shell): make prop-types more strict
|
commercetools_merchant-center-application-kit
|
train
|
js
|
583d0bc60dda4a0883c6ccec99b24952330ec3be
|
diff --git a/qa/integration-tests-engine/src/test/java/org/camunda/bpm/integrationtest/util/DeploymentHelper.java b/qa/integration-tests-engine/src/test/java/org/camunda/bpm/integrationtest/util/DeploymentHelper.java
index <HASH>..<HASH> 100644
--- a/qa/integration-tests-engine/src/test/java/org/camunda/bpm/integrationtest/util/DeploymentHelper.java
+++ b/qa/integration-tests-engine/src/test/java/org/camunda/bpm/integrationtest/util/DeploymentHelper.java
@@ -105,7 +105,8 @@ public class DeploymentHelper {
.use(MavenDependencyResolver.class)
.goOffline()
.loadMetadataFromPom("pom.xml")
- .artifacts("org.camunda.bpm:camunda-engine-spring", "org.springframework:spring-web")
+ .artifacts("org.camunda.bpm:camunda-engine-spring", "org.springframework:spring-web")
+ .exclusion("org.camunda.bpm:camunda-engine")
.resolveAs(JavaArchive.class);
if(resolvedArchives.size()==0) {
|
fix(engine-integration): remove engine from spring test deployment
|
camunda_camunda-bpm-platform
|
train
|
java
|
43b0417262578ac0578407c1b5e5880ba3351d45
|
diff --git a/src/template-registry-entry.js b/src/template-registry-entry.js
index <HASH>..<HASH> 100644
--- a/src/template-registry-entry.js
+++ b/src/template-registry-entry.js
@@ -26,22 +26,22 @@ export class TemplateRegistryEntry {
setTemplate(template){
var id = this.id,
- auImportElements, i, ii, current, src;
+ useResources, i, ii, current, src;
this.template = template;
- auImportElements = template.content.querySelectorAll('au-import');
- this.dependencies = new Array(auImportElements.length);
+ useResources = template.content.querySelectorAll('use');
+ this.dependencies = new Array(useResources.length);
- if(auImportElements.length === 0){
+ if(useResources.length === 0){
return;
}
- for(i = 0, ii = auImportElements.length; i < ii; ++i){
- current = auImportElements[i];
+ for(i = 0, ii = useResources.length; i < ii; ++i){
+ current = useResources[i];
src = current.getAttribute('from');
if(!src){
- throw new Error(`au-import element in ${this.id} has no "from" attribute.`);
+ throw new Error(`<use> element in ${this.id} has no "from" attribute.`);
}
this.dependencies[i] = new TemplateDependency(
|
feat(views): view imports are now done with <use>
This is a BREAKING CHANGE. The import tag is no longer used. We now use
the <use> tag for the same purpose.
|
aurelia_loader
|
train
|
js
|
946a1d3a6d025c856096b95bbfd2ade6af44ba3c
|
diff --git a/test/helpers.js b/test/helpers.js
index <HASH>..<HASH> 100644
--- a/test/helpers.js
+++ b/test/helpers.js
@@ -1,5 +1,6 @@
const path = require('path')
const requireAll = require('require-all')
+const tmp = require('tmp')
// require all source code
// so that the coverage report is accurate
@@ -10,3 +11,7 @@ requireAll(path.join(__dirname, '..', 'src'))
process.on('unhandledRejection', err => {
throw err
})
+
+// Automatically delete temporary files/folders
+// Created during the tests
+tmp.setGracefulCleanup()
|
chore(test): automatically cleanup temp files generated during tests
|
thumbsup_thumbsup
|
train
|
js
|
10f4d08efbba49b4085f0756b59c835f97783fa7
|
diff --git a/packages/babel-parser/src/plugins/flow/index.js b/packages/babel-parser/src/plugins/flow/index.js
index <HASH>..<HASH> 100644
--- a/packages/babel-parser/src/plugins/flow/index.js
+++ b/packages/babel-parser/src/plugins/flow/index.js
@@ -252,16 +252,11 @@ export default (superClass: Class<Parser>): Class<Parser> =>
flowParsePredicate(): N.FlowType {
const node = this.startNode();
- const moduloLoc = this.state.startLoc;
const moduloPos = this.state.start;
- this.expect(tt.modulo);
- const checksLoc = this.state.startLoc;
+ this.next(); // eat `%`
this.expectContextual("checks");
// Force '%' and 'checks' to be adjacent
- if (
- moduloLoc.line !== checksLoc.line ||
- moduloLoc.column !== checksLoc.column - 1
- ) {
+ if (this.state.lastTokStart > moduloPos + 1) {
this.raise(moduloPos, FlowErrors.UnexpectedSpaceBetweenModuloChecks);
}
if (this.eat(tt.parenL)) {
|
refactor: avoid parsing logic on locations (#<I>)
|
babel_babel
|
train
|
js
|
909e07742f7c8e87cf4684f7c62c20b7a7de3347
|
diff --git a/static.webpack.js b/static.webpack.js
index <HASH>..<HASH> 100644
--- a/static.webpack.js
+++ b/static.webpack.js
@@ -32,7 +32,7 @@ export default (webpackConfig, { stage }) => ({
test: /\.js$/,
include: [
// Heads up!
- // There modules should be manually transipiled because they are not compatible with IE11
+ // There modules should be manually transpiled because they are not compatible with IE11
path.resolve(__dirname, 'node_modules/ansi-styles'),
path.resolve(__dirname, 'node_modules/debug'),
|
style(configs): code comment fix (#<I>)
* Code comment fix
transpiled instead of transipiled
* Update static.webpack.js
* Update static.webpack.js
|
Semantic-Org_Semantic-UI-React
|
train
|
js
|
67abe37c3a1edf3fcd090d823fa6b82258969411
|
diff --git a/test/e2e/test.js b/test/e2e/test.js
index <HASH>..<HASH> 100644
--- a/test/e2e/test.js
+++ b/test/e2e/test.js
@@ -12,7 +12,7 @@ const projectRoot = process.cwd();
const controlApp = path.join(projectRoot, 'control-app');
const shrinkpackApp = path.join(projectRoot, 'shrinkpacked-app');
const nonShrinkpackApp = path.join(projectRoot, 'non-shrinkpacked-app');
-const testPackageJson = path.join(projectRoot, 'test-package.json');
+const testPackageJson = path.join(__dirname, 'test-package.json');
let startingNpmVersion;
|
chore(tests): resolve path to test-package.json
|
JamieMason_shrinkpack
|
train
|
js
|
5049850cdcac93e680727fe7d41329f399932c4f
|
diff --git a/http/dashboard_test.go b/http/dashboard_test.go
index <HASH>..<HASH> 100644
--- a/http/dashboard_test.go
+++ b/http/dashboard_test.go
@@ -457,6 +457,7 @@ func TestService_handleGetDashboard(t *testing.T) {
"colors": null,
"geom": "",
"legend": {},
+ "position": "",
"note": "",
"queries": null,
"shadeBelow": false,
|
fix: broken tests in dashboard http tests
|
influxdata_influxdb
|
train
|
go
|
33dfcffe2cc10cd39268d550ce8e1eb3ff739684
|
diff --git a/bin/semantic-release.js b/bin/semantic-release.js
index <HASH>..<HASH> 100755
--- a/bin/semantic-release.js
+++ b/bin/semantic-release.js
@@ -9,13 +9,11 @@ if (semver.lt(process.version, '8.0.0')) {
console.error(
`semantic-release: node version >= 8 is required. Found ${process.version}.
-If this error appears on a build job that is not your build leader, you can
-safely ignore it. On Travis CI the build leader is the first job in the build
-matrix.
+If there is another job running on node version >= 8, it will be picked as
+the build leader and you can safely ignore this message.
-Only a single job in your entire build-matrix needs to run on node 8. All others
-may safely fail with this message. If you don't have node 8 in your build
-matrix "npx" allows to restore compatibility with minimal overhead.
+If you don't have node 8 in your build matrix you can use "npx" to restore
+compatibility with minimal overhead:
$ npx -p node@8 npm run semantic-release
|
fix(bin): addapt build leader error to new leader detection algorithm
|
semantic-release_semantic-release
|
train
|
js
|
a23e9cc0cc07064f081f8ebf7af7e565dbcbeb5d
|
diff --git a/packages/oas-validator/index.js b/packages/oas-validator/index.js
index <HASH>..<HASH> 100644
--- a/packages/oas-validator/index.js
+++ b/packages/oas-validator/index.js
@@ -865,7 +865,7 @@ function checkPathItem(pathItem, path, openapi, options) {
let cbPi = callback[p];
options.isCallback = true;
checkPathItem(cbPi, p, openapi, options);
- options.isCallBack = false;
+ options.isCallback = false;
}
options.context.pop();
}
|
fix: validator, typo in isCallback
|
Mermade_oas-kit
|
train
|
js
|
54d393c56b8f8222d00e077088ece37e77d57c1a
|
diff --git a/packages/node_modules/@webex/internal-plugin-devices/src/devices.js b/packages/node_modules/@webex/internal-plugin-devices/src/devices.js
index <HASH>..<HASH> 100644
--- a/packages/node_modules/@webex/internal-plugin-devices/src/devices.js
+++ b/packages/node_modules/@webex/internal-plugin-devices/src/devices.js
@@ -597,8 +597,17 @@ const Devices = WebexPlugin.extend({
));
}
- return Promise.resolve()
- .then(() => services.convertUrlToPriorityHostUrl(this.webSocketUrl));
+ // Attempt to collect the priority-host-mapped web socket URL.
+ const wsUrl = services.convertUrlToPriorityHostUrl(this.webSocketUrl);
+
+ // Validate that the url was collected.
+ if (wsUrl) {
+ return Promise.resolve(wsUrl);
+ }
+
+ return Promise.reject(new Error(
+ 'devices: failed to get the current websocket url'
+ ));
},
/**
|
fix(internal-plugin-devices): improve websocket retrieval
Update the web socket method to validate if the service
was mappable to a priority host and reject if not.
|
webex_spark-js-sdk
|
train
|
js
|
6e248703a418759988c480c5cf9a0147f5208ed7
|
diff --git a/lib/static-eval.js b/lib/static-eval.js
index <HASH>..<HASH> 100644
--- a/lib/static-eval.js
+++ b/lib/static-eval.js
@@ -23,10 +23,11 @@ module.exports = evaluate;
function evaluate (opts, path, vars, modules, needsEval) {
opts = opts || {}
- // save replaced nodes for reverting nodes
- const replacedMap = new Map();
+ // save replaced path and nodes for store nodes
+ const replacedList = [];
const replaceWith = (path, node) => {
- replacedMap.set(path, {
+ replacedList.push({
+ path: path,
oldNode: path.node,
newNode: node,
});
@@ -120,10 +121,10 @@ function evaluate (opts, path, vars, modules, needsEval) {
return result.value;
}
} catch (error) {
- // revert to original nodes if evaluating error is happened
- for (const [path, nodes] of replacedMap.entries()) {
- path.replaceWith(nodes.oldNode);
- }
+ // restore to original nodes if evaluating error is happened
+ replacedList.reverse().forEach(({path, oldNode}) => {
+ path.replaceWith(oldNode);
+ });
return error;
}
}
|
refactor: use array instead of map
map does not support multiple same path
|
Jam3_babel-plugin-static-fs
|
train
|
js
|
f64ca5f7fb13d6d3f8fb60e61c02b5b35e2ccdc3
|
diff --git a/lib/database.js b/lib/database.js
index <HASH>..<HASH> 100644
--- a/lib/database.js
+++ b/lib/database.js
@@ -18,8 +18,8 @@ const unittestConfig = requireConfig('unittest');
const prodConfig = requireConfig('prod');
module.exports = {
- development: Object.assign(defaultConfig, localConfig),
- test: Object.assign(defaultConfig, unittestConfig),
- production: Object.assign(defaultConfig, prodConfig),
+ development: Object.assign({}, defaultConfig, localConfig),
+ test: Object.assign({}, defaultConfig, unittestConfig),
+ production: Object.assign({}, defaultConfig, prodConfig),
};
|
fix(migration): always use production config (#<I>)
|
eggjs_egg-sequelize
|
train
|
js
|
c83d488adbbb74a5d26902e747e5dcdfa64110ee
|
diff --git a/test/index.test.js b/test/index.test.js
index <HASH>..<HASH> 100644
--- a/test/index.test.js
+++ b/test/index.test.js
@@ -18,12 +18,12 @@ test('check invalid date parameter', (assert) => {
getResults(today)
.catch(error => {
- assert.equal(typeof error, 'object', 'error should be an object')
+ assert.equal(typeof error, 'object', 'error should be an object after an invalid date parameter')
assert.end()
})
})
-test('check 404 network error', (assert) => {
+test('check network error (404)', (assert) => {
let today = (new Date()).toISOString().substring(0, 10)
nock('http://www.dejugadas.com/quinielas/datospizarra.php')
@@ -32,7 +32,7 @@ test('check 404 network error', (assert) => {
getResults(today)
.catch(error => {
- assert.equal(typeof error, 'object', 'error should be an object')
+ assert.equal(typeof error, 'object', 'error should be an object after a network error (404)')
assert.end()
})
})
|
test(library): Fix scopes for tests
|
durancristhian_quiniela-results
|
train
|
js
|
3a9bb30a49cdee0ae126e773b651d48847c67c3f
|
diff --git a/gulpfile.js b/gulpfile.js
index <HASH>..<HASH> 100644
--- a/gulpfile.js
+++ b/gulpfile.js
@@ -19,12 +19,10 @@ gulp.task('lint', ['clean'], () => gulp.src([configFiles, srcFiles, testFiles])
.pipe(eslint())
.pipe(eslint.failOnError()))
-gulp.task('compile', ['lint'], () => gulp.src(srcFiles)
+gulp.task('build', ['lint'], () => gulp.src(srcFiles)
.pipe(babel())
.pipe(gulp.dest(destDir)))
-gulp.task('build', ['compile'])
-
gulp.task('test', ['build'], cb => {
gulp.src([`${destDir}*.js`])
.pipe(istanbul())
|
chore(gulpfile): remove useless compile task
Just name the compile task to build.
|
dustinspecker_convert-vinyl-to-vfile
|
train
|
js
|
db44692cc87d06f29f2625bd0cc20b8cdb3ec4b9
|
diff --git a/src/lambda/routes/invocations/invocationsRoute.js b/src/lambda/routes/invocations/invocationsRoute.js
index <HASH>..<HASH> 100644
--- a/src/lambda/routes/invocations/invocationsRoute.js
+++ b/src/lambda/routes/invocations/invocationsRoute.js
@@ -15,10 +15,9 @@ export default function invocationsRoute(lambda, options) {
payload,
} = request
- const _headers = new Headers(headers)
-
- const clientContextHeader = _headers.get('x-amz-client-context')
- const invocationType = _headers.get('x-amz-invocation-type')
+ const parsedHeaders = new Headers(headers)
+ const clientContextHeader = parsedHeaders.get('x-amz-client-context')
+ const invocationType = parsedHeaders.get('x-amz-invocation-type')
// default is undefined
let clientContext
|
chore: rename even more vars, remove underscore
|
dherault_serverless-offline
|
train
|
js
|
36edc392ba1ddc6b46d6694300b91327cb64b198
|
diff --git a/packages/mcs-lite-mobile-web/src/containers/DeviceList/DeviceList.js b/packages/mcs-lite-mobile-web/src/containers/DeviceList/DeviceList.js
index <HASH>..<HASH> 100644
--- a/packages/mcs-lite-mobile-web/src/containers/DeviceList/DeviceList.js
+++ b/packages/mcs-lite-mobile-web/src/containers/DeviceList/DeviceList.js
@@ -48,7 +48,7 @@ class DeviceList extends React.Component {
onClickOutside = (e) => {
if (e.target === findDOMNode(this.input)) return; // Hint: Omit clicking input.
- this.setState({ isFilterOpen: false });
+ this.setState({ isFilterOpen: false, filterValue: '' });
}
onRefresh = done => this.props.fetchDeviceList(done);
getInput = (node) => { this.input = node; }
|
fix(HeaderFilter): remove filter when closed
|
MCS-Lite_mcs-lite
|
train
|
js
|
2aa3bb6c00fa4a86680622e714f818b46962155d
|
diff --git a/superset/utils/network.py b/superset/utils/network.py
index <HASH>..<HASH> 100644
--- a/superset/utils/network.py
+++ b/superset/utils/network.py
@@ -44,7 +44,7 @@ def is_hostname_valid(host: str) -> bool:
Test if a given hostname can be resolved.
"""
try:
- socket.gethostbyname(host)
+ socket.getaddrinfo(host, None)
return True
except socket.gaierror:
return False
|
fix(utils): use getaddrinfo for hostname check to support ipv6 (#<I>)
|
apache_incubator-superset
|
train
|
py
|
f2adea0fa10bc5c44b0c3868c2701256f7d068fb
|
diff --git a/src/Dialog/index.js b/src/Dialog/index.js
index <HASH>..<HASH> 100644
--- a/src/Dialog/index.js
+++ b/src/Dialog/index.js
@@ -165,7 +165,7 @@ const Dialog = ({
<StyledDialogCenterWrapper>
<StyledDialogContent shown={shown} ref={ref} id={dialogID}>
{illustration && <IllustrationContainer>{illustration}</IllustrationContainer>}
- <Stack spacing="tight" spaceAfter="medium">
+ <Stack spacing="condensed" spaceAfter="medium">
{title && <Heading type="title3">{title}</Heading>}
{description && <Text type="secondary">{description}</Text>}
</Stack>
|
feat(Dialog): change spacing between title and description (#<I>)
|
kiwicom_orbit-components
|
train
|
js
|
eb61c1515849ed4d1ad05c724f05e18b585e0542
|
diff --git a/packages/components/bolt-image/__tests__/bolt-image.e2e.js b/packages/components/bolt-image/__tests__/bolt-image.e2e.js
index <HASH>..<HASH> 100644
--- a/packages/components/bolt-image/__tests__/bolt-image.e2e.js
+++ b/packages/components/bolt-image/__tests__/bolt-image.e2e.js
@@ -18,11 +18,10 @@ module.exports = {
bodyWidth = result.value.width;
})
.getElementSize('bolt-image', function(result) {
- const imageHeight = Math.round(bodyWidth / 1.3333333333);
+ const imageHeight = Math.round(bodyWidth / 1.3);
this.assert.equal(result.value.width, bodyWidth);
- this.assert.equal(result.value.height, imageHeight) ||
- this.assert.equal(result.value.height, imageHeight + 1); // try to account for rounding difference in Firefox
+ this.assert.equal(result.value.height, imageHeight);
})
.execute(
function(data) {
|
test: retest firefox rounding issue
|
bolt-design-system_bolt
|
train
|
js
|
29f7062adba6246856dcf47deb3b7af272ef86bc
|
diff --git a/lib/components/admin/draggable-window.js b/lib/components/admin/draggable-window.js
index <HASH>..<HASH> 100644
--- a/lib/components/admin/draggable-window.js
+++ b/lib/components/admin/draggable-window.js
@@ -28,7 +28,7 @@ export default class DraggableWindow extends Component {
width: '350px',
backgroundColor: 'white',
borderRadius: '5%',
- padding: '10px',
+ paddingBottom: '10px',
boxShadow: '2px 2px 8px',
border: GREY_BORDER,
...style
@@ -39,7 +39,7 @@ export default class DraggableWindow extends Component {
style={{
borderBottom: GREY_BORDER,
cursor: 'move',
- paddingBottom: '5px'
+ padding: '5px'
}}
>
<button
@@ -51,6 +51,7 @@ export default class DraggableWindow extends Component {
</div>
<div style={{
height: '275px',
+ margin: '0px 5px',
overflowY: 'scroll'
}}>
{children}
|
refactor(draggable-window): fix draggable handle margins
|
opentripplanner_otp-react-redux
|
train
|
js
|
8dc209341f163d45d779586493756d8971030d4b
|
diff --git a/actor/appium/src/main/java/org/getopentest/appium/core/AppiumHelper.java b/actor/appium/src/main/java/org/getopentest/appium/core/AppiumHelper.java
index <HASH>..<HASH> 100644
--- a/actor/appium/src/main/java/org/getopentest/appium/core/AppiumHelper.java
+++ b/actor/appium/src/main/java/org/getopentest/appium/core/AppiumHelper.java
@@ -135,6 +135,11 @@ public final class AppiumHelper {
ex.getClass().getName(),
String.valueOf(retriesLeft)));
discardDriver();
+
+ try {
+ Thread.sleep(5000);
+ } catch (InterruptedException ex1) {
+ }
} else {
throw ex;
}
|
feat(appium): add a delay during retries when creating the Appium driver
|
mcdcorp_opentest
|
train
|
java
|
8d5cab768e92b747883f7de252757c0460cae96c
|
diff --git a/src/prompts/questions.js b/src/prompts/questions.js
index <HASH>..<HASH> 100644
--- a/src/prompts/questions.js
+++ b/src/prompts/questions.js
@@ -40,7 +40,8 @@ export async function prompt({npmAccount, author}, ciServices, hosts, visibility
try {
maybeLoggedInNpmUsername = (await execa('npm', ['whoami'])).stdout;
} catch (failedExecutionResult) {
- warn('No logged in user found with `npm whoami`. Login with `npm login` to enable default project scoping.');
+ warn('No logged in user found with `npm whoami`. Login with `npm login` '
+ + 'to use your npm account name as the package scope default.');
}
const answers = await promptWithInquirer([
|
fix(questions): better output when whoami fails
|
travi_javascript-scaffolder
|
train
|
js
|
c94f0ee9ae62573cb1feceb42d6bc7e7bb421065
|
diff --git a/lib/features/keyboard/Keyboard.js b/lib/features/keyboard/Keyboard.js
index <HASH>..<HASH> 100644
--- a/lib/features/keyboard/Keyboard.js
+++ b/lib/features/keyboard/Keyboard.js
@@ -24,7 +24,7 @@ var domEvent = require('min-dom/lib/event'),
* @param {EventBus} eventBus
* @param {CommandStack} commandStack
*/
-function Keyboard(config, eventBus, editorActions) {
+function Keyboard(config, eventBus, editorActions, sheet) {
var self = this;
this._eventBus = eventBus;
@@ -45,6 +45,10 @@ function Keyboard(config, eventBus, editorActions) {
listeners = self._listeners,
code = event.keyCode || event.charCode || -1;
+ if (!document.body.contains(sheet.getContainer())) {
+ return;
+ }
+
if (domMatches(target, 'input, textarea')) {
return;
}
@@ -76,7 +80,7 @@ function Keyboard(config, eventBus, editorActions) {
this._init();
}
-Keyboard.$inject = [ 'config.keyboard', 'eventBus', 'editorActions' ];
+Keyboard.$inject = [ 'config.keyboard', 'eventBus', 'editorActions', 'sheet' ];
module.exports = Keyboard;
|
fix(keyboard): do not process keyboard events if container not attached
related to bpmn-io/dmn-js#<I>
|
bpmn-io_table-js
|
train
|
js
|
6096d784437cbc73e0a5d72915e70f2b9942f2f0
|
diff --git a/test/instrumentation/modules/pg/pg.js b/test/instrumentation/modules/pg/pg.js
index <HASH>..<HASH> 100644
--- a/test/instrumentation/modules/pg/pg.js
+++ b/test/instrumentation/modules/pg/pg.js
@@ -821,7 +821,6 @@ function teardown (cb) {
//
// For details see:
// https://github.com/brianc/node-postgres/issues/1414
- // pg.end()
connectionDone(true) // true: disconnect and destroy the client
connectionDone = undefined
} else {
|
test(pg): remove commented out code
|
opbeat_opbeat-node
|
train
|
js
|
8d4c07cc24b79898ea4062d4850b32fd6b7045ca
|
diff --git a/library/Benri/Rest/Controller.php b/library/Benri/Rest/Controller.php
index <HASH>..<HASH> 100644
--- a/library/Benri/Rest/Controller.php
+++ b/library/Benri/Rest/Controller.php
@@ -43,7 +43,7 @@ class Benri_Rest_Controller extends Benri_Controller_Abstract
->viewRenderer
->setNoRender(true);
- $this->_input = new StdClass();
+ $this->_input = new StdClass();
}
/**
@@ -55,11 +55,23 @@ class Benri_Rest_Controller extends Benri_Controller_Abstract
*/
public function postDispatch()
{
- $response = (object) array(
- 'data' => $this->_data,
- 'errors' => $this->_errors,
- 'messages' => $this->_messages,
- );
+ $respond = false;
+ $response = (object) [];
+
+ if ($this->_data) {
+ $respond = true;
+ $response->data = $this->_data;
+ }
+
+ if ($this->_errors) {
+ $respond = true;
+ $response->errors = $this->_errors;
+ }
+
+ if ($this->_messages) {
+ $respond = true;
+ $response->messages = $this->_messages;
+ }
$this->getResponse()
->setHeader('Content-Type', 'application/json; charset=utf-8', true)
|
refactor(postDispatch): populate the response only with valid objects
|
douggr_benri
|
train
|
php
|
6c57470b136b57908915c164a4d124c11eb98cb1
|
diff --git a/framework/core/src/Discussion/Discussion.php b/framework/core/src/Discussion/Discussion.php
index <HASH>..<HASH> 100644
--- a/framework/core/src/Discussion/Discussion.php
+++ b/framework/core/src/Discussion/Discussion.php
@@ -22,6 +22,7 @@ use Flarum\Locale\LocaleManager;
use Flarum\Notification\Notification;
use Flarum\Post\MergeableInterface;
use Flarum\Post\Post;
+use Flarum\Settings\SettingsRepositoryInterface;
use Flarum\User\User;
use Illuminate\Support\Str;
@@ -446,6 +447,10 @@ class Discussion extends AbstractModel
protected function setTitleAttribute($title)
{
$this->attributes['title'] = $title;
- $this->slug = Str::slug($title, '-', resolve(LocaleManager::class)->getLocale());
+ $this->slug = Str::slug(
+ $title,
+ '-',
+ resolve(SettingsRepositoryInterface::class)->get('default_locale', 'en')
+ );
}
}
|
fix: slug generation uses actor locale instead of forum default
|
flarum_core
|
train
|
php
|
ba67e20e7ff0f74df2c66e1f948d6bb529f39228
|
diff --git a/tests/test_pvl_translate.py b/tests/test_pvl_translate.py
index <HASH>..<HASH> 100644
--- a/tests/test_pvl_translate.py
+++ b/tests/test_pvl_translate.py
@@ -45,7 +45,8 @@ class TestMock(unittest.TestCase):
@patch("pvl.pvl_translate.PVLWriter")
@patch("pvl.pvl_translate.arg_parser")
@patch("pvl.load")
- def test_main(self, m_load, m_parser, m_PVLWriter, m_JSONWriter):
+ @patch("pvl.dump")
+ def test_main(self, m_dump, m_load, m_parser, m_PVLWriter, m_JSONWriter):
m_parser().parse_args().output_format = "PDS3"
self.assertIsNone(pvl_trans.main())
|
test(pvl_translate): Fixed mocking for test.
|
planetarypy_pvl
|
train
|
py
|
72f87012a9903d803563c1c217e925155115e43e
|
diff --git a/src/test/fs.js b/src/test/fs.js
index <HASH>..<HASH> 100644
--- a/src/test/fs.js
+++ b/src/test/fs.js
@@ -1,7 +1,7 @@
/*globals after, before, describe, it*/
const {assert} = require('chai');
const os = require('os');
-
+const path = require('path');
const underlyingFs = require('fs-extra');
const fs = require('../lib/core/fs');
@@ -59,7 +59,7 @@ describe('fs', () => {
it('should not throw exceptions on paths inside the temporary dir root', (done) => {
assert.doesNotThrow(async () => {
try {
- await fs[func](os.tmpdir() + '/foo');
+ await fs[func](path.join(os.tmpdir(), 'foo'));
} catch(e) {
if(e.message.indexOf('EPERM') === 0) throw e;
}
|
fix: windows path separator being wrong
|
embark-framework_embark
|
train
|
js
|
8e16e720793b6f3188e63e7f77bb44efd30cc4d9
|
diff --git a/test/test_cloudvolume.py b/test/test_cloudvolume.py
index <HASH>..<HASH> 100644
--- a/test/test_cloudvolume.py
+++ b/test/test_cloudvolume.py
@@ -76,16 +76,22 @@ def test_aligned_read():
def test_parallel_read():
- vol1 = CloudVolume('gs://seunglab-test/test_v0/image', parallel=1)
- vol2 = CloudVolume('gs://seunglab-test/test_v0/image', parallel=2)
+ paths = [
+ 'gs://seunglab-test/test_v0/image',
+ 's3://seunglab-test/test_v0/image',
+ ]
+
+ for cloudpath in paths:
+ vol1 = CloudVolume(cloudpath, parallel=1)
+ vol2 = CloudVolume(cloudpath, parallel=2)
- data1 = vol1[:512,:512,:50]
- assert np.all(data1 == vol2[:512,:512,:50])
+ data1 = vol1[:512,:512,:50]
+ assert np.all(data1 == vol2[:512,:512,:50])
- data2 = vol2.download_to_shared_memory(np.s_[:512,:512,:50])
- assert np.all(data1 == data2)
- data2.close()
- vol2.unlink_shared_memory()
+ data2 = vol2.download_to_shared_memory(np.s_[:512,:512,:50])
+ assert np.all(data1 == data2)
+ data2.close()
+ vol2.unlink_shared_memory()
def test_parallel_write():
delete_layer()
|
test: s3 parallel read
compliments gs parallel read
|
seung-lab_cloud-volume
|
train
|
py
|
d684e3e4eb31503729a152228ea12e010463a01c
|
diff --git a/tests/integrations/stdlib/test_httplib.py b/tests/integrations/stdlib/test_httplib.py
index <HASH>..<HASH> 100644
--- a/tests/integrations/stdlib/test_httplib.py
+++ b/tests/integrations/stdlib/test_httplib.py
@@ -1,4 +1,6 @@
+import platform
import sys
+
import pytest
try:
@@ -64,7 +66,8 @@ def test_crumb_capture_hint(sentry_init, capture_events):
"extra": "foo",
}
- assert sys.getrefcount(response) == 2
+ if platform.python_implementation() != "PyPy":
+ assert sys.getrefcount(response) == 2
def test_httplib_misuse(sentry_init, capture_events):
|
fix: Skip test on pypy
|
getsentry_sentry-python
|
train
|
py
|
cf0169a625988ee6414696b7f910af4f56b86ae5
|
diff --git a/contextMenu.js b/contextMenu.js
index <HASH>..<HASH> 100644
--- a/contextMenu.js
+++ b/contextMenu.js
@@ -46,11 +46,11 @@ angular.module('ui.bootstrap.contextMenu', [])
var $promise = $q.when(text);
$promises.push($promise);
$promise.then(function (text) {
- $a.text(text);
if (nestedMenu) {
$a.css("cursor", "default");
$a.append($('<strong style="font-family:monospace;font-weight:bold;float:right;">></strong>'));
}
+ $a.append(text);
});
return $a;
|
fix(context_menu): re-add merge request #<I> that fixes the nested menu icon in firefox
Closes #<I>
|
Templarian_ui.bootstrap.contextMenu
|
train
|
js
|
574cfeee2d02553035debae8e5498529bfdb8a7d
|
diff --git a/go/vt/orchestrator/logic/topology_recovery.go b/go/vt/orchestrator/logic/topology_recovery.go
index <HASH>..<HASH> 100644
--- a/go/vt/orchestrator/logic/topology_recovery.go
+++ b/go/vt/orchestrator/logic/topology_recovery.go
@@ -1684,6 +1684,13 @@ func GracefulPrimaryTakeover(clusterName string, designatedKey *inst.InstanceKey
AuditTopologyRecovery(topologyRecovery, "started PlannedReparentShard with automatic primary selection.")
}
+ // check for the constraint failure for cross cell promotion
+ if designatedTabletAlias != nil && designatedTabletAlias.Cell != primaryTablet.Alias.Cell && config.Config.PreventCrossDataCenterPrimaryFailover {
+ errorMessage := fmt.Sprintf("GracefulPrimaryTakeover: constraint failure - %s and %s are in different cells", topoproto.TabletAliasString(designatedTabletAlias), topoproto.TabletAliasString(primaryTablet.Alias))
+ AuditTopologyRecovery(topologyRecovery, errorMessage)
+ return topologyRecovery, fmt.Errorf(errorMessage)
+ }
+
ev, err := reparentutil.NewPlannedReparenter(ts, tmclient.NewTabletManagerClient(), logutil.NewCallbackLogger(func(event *logutilpb.Event) {
level := event.GetLevel()
value := event.GetValue()
|
feat: honour the constraint rules before calling planned reparent shard
|
vitessio_vitess
|
train
|
go
|
ee3d16f5fe77643a5ed3c29741c6219ad0e740eb
|
diff --git a/app/actions.js b/app/actions.js
index <HASH>..<HASH> 100644
--- a/app/actions.js
+++ b/app/actions.js
@@ -115,7 +115,9 @@ export const deselectAll = () => (dispatch, getState) => {
type: ActionType.EDITOR_DESELECT_ALL,
payload: {},
});
- dispatch(setMode(EDITOR_MODE.DEFAULT));
+ if (!Selectors.Editor.getModeChecks(state).isDefault) {
+ dispatch(setMode(EDITOR_MODE.DEFAULT));
+ }
};
export const selectNode = (id) => (dispatch, getState) => {
|
fix(action): prevent unnecessary calling setMode action (if mode is already is Default)
|
xodio_xod
|
train
|
js
|
c6b752d09791de1a4691c9e25eb4df16889bac56
|
diff --git a/test/component.spec.js b/test/component.spec.js
index <HASH>..<HASH> 100644
--- a/test/component.spec.js
+++ b/test/component.spec.js
@@ -84,6 +84,28 @@ describe('Component', function() {
expect(element).to.not.have.property('myCustomProp4');
});
+ it('should setup properties for extended elements', () => {
+ @DNA.customElement(getComponentName(), { extends: 'article' })
+ class TestElement extends DNA.extend(DNA.Component) {
+ static get properties() {
+ return {
+ myCustomProp1: {
+ attribute: 'custom-prop',
+ },
+ };
+ }
+
+ @DNA.property() myCustomProp2 = '';
+ @DNA.property() myCustomProp3 = '';
+ }
+
+ const element = new TestElement();
+ expect(element).to.have.property('myCustomProp1');
+ expect(element).to.have.property('myCustomProp2');
+ expect(element).to.have.property('myCustomProp3');
+ expect(element).to.not.have.property('myCustomProp4');
+ });
+
it('should initialize properties', () => {
@DNA.customElement(getComponentName())
class TestElement extends DNA.Component {
|
test: add test for decoreted extended class
|
chialab_dna
|
train
|
js
|
505df340354e5c52b9ac3d7d652365446e88dddd
|
diff --git a/core/dvan/lib/index.js b/core/dvan/lib/index.js
index <HASH>..<HASH> 100644
--- a/core/dvan/lib/index.js
+++ b/core/dvan/lib/index.js
@@ -39,7 +39,6 @@ module.exports = class DvanCore {
})
this.config = {}
-
if (this.args.has('no-config')) {
logger.debug('Config file was disabled')
} else {
diff --git a/core/dvan/lib/utils/loadConfig.js b/core/dvan/lib/utils/loadConfig.js
index <HASH>..<HASH> 100644
--- a/core/dvan/lib/utils/loadConfig.js
+++ b/core/dvan/lib/utils/loadConfig.js
@@ -29,7 +29,7 @@ module.exports = ({ files = [], matches = [], dir, packageKey }) => {
function resolveConfig(dir, fp, packageKey) {
if (/\.js(on)?$/.test(fp)) {
if (fp.endsWith('package.json')) {
- const configFromPkg = require(fp)[packageKey]
+ const configFromPkg = packageKey ? require(fp)[packageKey] : require(fp)
return Object.assign(
configFromPkg ? {} : { configPath: undefined },
configFromPkg
|
fix: cannot load package.json
|
evillt_dvan
|
train
|
js,js
|
e44f6ed8eee1a6cd6224b959ddd67130c6a5b274
|
diff --git a/src/main/java/com/conveyal/gtfs/loader/Table.java b/src/main/java/com/conveyal/gtfs/loader/Table.java
index <HASH>..<HASH> 100644
--- a/src/main/java/com/conveyal/gtfs/loader/Table.java
+++ b/src/main/java/com/conveyal/gtfs/loader/Table.java
@@ -286,12 +286,12 @@ public class Table {
// FIXME: Do we need an index on stop_id
new StringField("stop_id", REQUIRED).isReferenceTo(STOPS),
// .indexThisColumn(),
- // TODO verify that we have a special check for arrival and departure times first and last stop_time in a trip, which are reqiured
+ // TODO verify that we have a special check for arrival and departure times first and last stop_time in a trip, which are required
new TimeField("arrival_time", OPTIONAL),
new TimeField("departure_time", OPTIONAL),
new StringField("stop_headsign", OPTIONAL),
- new ShortField("pickup_type", OPTIONAL, 2),
- new ShortField("drop_off_type", OPTIONAL, 2),
+ new ShortField("pickup_type", OPTIONAL, 3),
+ new ShortField("drop_off_type", OPTIONAL, 3),
new DoubleField("shape_dist_traveled", OPTIONAL, 0, Double.POSITIVE_INFINITY, 2),
new ShortField("timepoint", OPTIONAL, 1),
new IntegerField("fare_units_traveled", EXTENSION) // OpenOV NL extension
|
fix(StopTimes): add dropoff/pick up type = 3 (coordinate with driver)
|
conveyal_gtfs-lib
|
train
|
java
|
70f9b4c4cdb8d9b3a3a17a6400c7ce7c02db3c26
|
diff --git a/lib/frames/disposition_frame.js b/lib/frames/disposition_frame.js
index <HASH>..<HASH> 100644
--- a/lib/frames/disposition_frame.js
+++ b/lib/frames/disposition_frame.js
@@ -89,8 +89,7 @@ var debug = require('debug')('amqp10:framing:disposition'),
* @constructor
*/
function DispositionFrame(options) {
- DispositionFrame.super_.call(this);
- this.channel = 0;
+ DispositionFrame.super_.call(this, options.channel);
if (options instanceof DescribedType) {
this.readPerformative(options);
return;
|
fix(DispositionFrame): use correct channel for disposition frame
|
noodlefrenzy_node-amqp10
|
train
|
js
|
8f08914a00cdf5d59cc42b483927f46a00f13e74
|
diff --git a/lib/nodefs-handler.js b/lib/nodefs-handler.js
index <HASH>..<HASH> 100644
--- a/lib/nodefs-handler.js
+++ b/lib/nodefs-handler.js
@@ -603,13 +603,14 @@ async _addToNodeFs(path, initialAdd, priorWh, depth, target) {
const follow = this.fsw.options.followSymlinks && !path.includes(STAR) && !path.includes(BRACE_START);
let closer;
if (stats.isDirectory()) {
+ const absPath = sysPath.resolve(path);
const targetPath = follow ? await fsrealpath(path) : path;
if (this.fsw.closed) return;
closer = await this._handleDir(wh.watchPath, stats, initialAdd, depth, target, wh, targetPath);
if (this.fsw.closed) return;
// preserve this symlink's target path
- if (path !== targetPath && targetPath !== undefined) {
- this.fsw._symlinkPaths.set(targetPath, true);
+ if (absPath !== targetPath && targetPath !== undefined) {
+ this.fsw._symlinkPaths.set(absPath, targetPath);
}
} else if (stats.isSymbolicLink()) {
const targetPath = follow ? await fsrealpath(path) : path;
|
fix: Fixed unprecised symlink recognision for folders (closes #<I>)
|
paulmillr_chokidar
|
train
|
js
|
d36739a2a78833e0f4f0973a1a09905b48725cbf
|
diff --git a/packages/zent/src/sortable/Sortable.js b/packages/zent/src/sortable/Sortable.js
index <HASH>..<HASH> 100644
--- a/packages/zent/src/sortable/Sortable.js
+++ b/packages/zent/src/sortable/Sortable.js
@@ -91,10 +91,16 @@ export default class Sortable extends (PureComponent || Component) {
},
onEnd: e => {
const { items } = this.props;
+
+ onEnd && onEnd(e);
+
+ if (!items) {
+ return;
+ }
+
const { oldIndex, newIndex } = e;
const newItems = reorder(items, oldIndex, newIndex);
- onEnd && onEnd(e);
onChange && onChange(newItems);
},
...rest,
|
fix(Sortable): fix without props items but with props onEnd (#<I>)
|
youzan_zent
|
train
|
js
|
f8c95845c0ebf1c992c3f112dfa7fad5dd7bc5b3
|
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100755
--- a/setup.py
+++ b/setup.py
@@ -71,12 +71,12 @@ if sys.version_info[0] < 3: # python2
test_requirements = ['pytest>=3.5,<5', 'pytest-timeout', 'pytest-mock>=1.9.0,<3', 'pytest-faulthandler~=1.6.0',
'importlib-metadata~=2.0.0', 'zipp~=1.0.0', 'pyparsing~=2.4.0', 'mock~=3.0.0',
'isort~=4.3.0',
- 'graphviz', 'pyuserinput']
+ 'graphviz', 'pyuserinput', 'pandas']
else: # python3
global_requirements = ['pylint>=1.6,<2', 'psutil', 'jsonconversion~=0.2.12', 'yaml_configuration~=0.1',
'python-gtkmvc3-dlr~=1.0.0', 'gaphas~=1.0.0', 'future>=0.16,<0.18.0']
test_requirements = ['pytest>=3.5,<5', 'pytest-timeout', 'pytest-mock>=1.9.0,<3', 'pytest-faulthandler~=1.6.0',
- 'graphviz', 'pyuserinput']
+ 'graphviz', 'pyuserinput', 'pandas']
test_requirements += global_requirements
|
test: add pandas to test requirements in order to include more tests
* test_execution_history_disabled.py
* test_execution_history_file_log.py
|
DLR-RM_RAFCON
|
train
|
py
|
60b1af9e02b93d9223d2ed1f23e0a618537a4c96
|
diff --git a/src/platforms/web/runtime/components/transition-group.js b/src/platforms/web/runtime/components/transition-group.js
index <HASH>..<HASH> 100644
--- a/src/platforms/web/runtime/components/transition-group.js
+++ b/src/platforms/web/runtime/components/transition-group.js
@@ -101,8 +101,9 @@ export default {
children.forEach(applyTranslation)
// force reflow to put everything in position
- const body: any = document.body
- const f: number = body.offsetHeight // eslint-disable-line
+ // assign to this to avoid being removed in tree-shaking
+ // $flow-disable-line
+ this._reflow = document.body.offsetHeight
children.forEach((c: VNode) => {
if (c.data.moved) {
|
fix(transition-group): work around rollup tree shaking (#<I>)
fix #<I>
|
kaola-fed_megalo
|
train
|
js
|
101e17710fc1a7df53c049d7971e3bfcc5ffa3f6
|
diff --git a/packages/components/bolt-image/src/image.js b/packages/components/bolt-image/src/image.js
index <HASH>..<HASH> 100644
--- a/packages/components/bolt-image/src/image.js
+++ b/packages/components/bolt-image/src/image.js
@@ -207,17 +207,12 @@ class BoltImage extends withLitHtml() {
this.style.backgroundColor = placeholderColor;
}
- let renderedImage = this.slot('default');
-
- if (
- !containsTagName(this.childNodes, 'img') &&
- !containsTagName(this.childNodes, 'bolt-ratio')
- ) {
- if (canUseAspectRatio) {
- renderedImage = ratioTemplate(imageTemplate);
- } else {
- renderedImage = imageTemplate;
- }
+ let renderedImage;
+
+ if (canUseRatio) {
+ renderedImage = ratioTemplate(imageTemplate);
+ } else {
+ renderedImage = imageTemplate;
}
return html`
|
feat: render image template every time, do not keep initial HTML
|
bolt-design-system_bolt
|
train
|
js
|
c2c9ee93fba54900be347a6c2b4025d969e81bdd
|
diff --git a/lib/actions/call-taker.js b/lib/actions/call-taker.js
index <HASH>..<HASH> 100644
--- a/lib/actions/call-taker.js
+++ b/lib/actions/call-taker.js
@@ -156,7 +156,7 @@ export function fetchCalls () {
if (sessionIsInvalid(callTaker.session)) return
const {datastoreUrl} = otp.config
const {sessionId} = callTaker.session
- const limit = 30
+ const limit = 1000
fetch(`${datastoreUrl}/calltaker/call?${qs.stringify({limit, sessionId})}`)
.then(res => res.json())
.then(calls => dispatch(receivedCalls({calls})))
|
refactor(call-taker): increase call history limit
|
opentripplanner_otp-react-redux
|
train
|
js
|
e25cd50da0aaac6c6fd4aecd63f705fc375a418b
|
diff --git a/wsdiscovery/threaded.py b/wsdiscovery/threaded.py
index <HASH>..<HASH> 100644
--- a/wsdiscovery/threaded.py
+++ b/wsdiscovery/threaded.py
@@ -8,6 +8,7 @@ import socket
import struct
import threading
import selectors
+import platform
from .udp import UDPMessage
from .actions import *
@@ -106,6 +107,9 @@ class NetworkingThread(_StoppableDaemonThread):
sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM, socket.IPPROTO_UDP)
sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
+ if platform.system() in ["Darwin", "FreeBSD"]:
+ sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEPORT, 1)
+
sock.bind(('', MULTICAST_PORT))
sock.setblocking(0)
|
fix: set REUSEPORT on BSD systems
|
andreikop_python-ws-discovery
|
train
|
py
|
4f5936b2139d91203b06f3ceca801dd944dd2a73
|
diff --git a/source/rafcon/gui/controllers/graphical_editor_gaphas.py b/source/rafcon/gui/controllers/graphical_editor_gaphas.py
index <HASH>..<HASH> 100644
--- a/source/rafcon/gui/controllers/graphical_editor_gaphas.py
+++ b/source/rafcon/gui/controllers/graphical_editor_gaphas.py
@@ -90,6 +90,7 @@ class GraphicalEditorController(ExtendedController):
super(GraphicalEditorController, self).destroy()
# TODO D-find out why this destroys half of left over core objects, this should already be empty at the end
self.canvas._core_view_map.clear()
+ self.canvas._model_view_map.clear()
def register_view(self, view):
"""Called when the View was registered"""
|
fix(gaphas): brake canvas._model_view_map references in destroy
Same as for the _core_view_map.
|
DLR-RM_RAFCON
|
train
|
py
|
b06ca1b3c739acc8475b39dbfd0a2c16f4175ec8
|
diff --git a/src/index.js b/src/index.js
index <HASH>..<HASH> 100644
--- a/src/index.js
+++ b/src/index.js
@@ -345,7 +345,7 @@ class Node extends EventEmitter {
let t
if (typeof Transport === 'function') {
- t = new Transport()
+ t = new Transport({ libp2p: this })
} else {
t = Transport
}
|
feat: pass libp2p as option to transport creation (#<I>)
|
libp2p_js-libp2p
|
train
|
js
|
0fbc80cd11371e9a99113ea1d33cae3e80b4addc
|
diff --git a/packages/oui-select-picker/src/select-picker.controller.js b/packages/oui-select-picker/src/select-picker.controller.js
index <HASH>..<HASH> 100644
--- a/packages/oui-select-picker/src/select-picker.controller.js
+++ b/packages/oui-select-picker/src/select-picker.controller.js
@@ -27,7 +27,7 @@ export default class SelectPickerController {
}
if (this.picture) {
- this.isImgPath = /^data:/.test(this.picture) || /\.(gif|png|jpg)$/.test(this.picture);
+ this.isImgPath = /^data:/.test(this.picture) || /\.(gif|png|jpg|svg)$/.test(this.picture);
}
if (this.values) {
|
fix(oui-select-picker): fix svg support for picture attribute (#<I>)
|
ovh-ux_ovh-ui-angular
|
train
|
js
|
725eefaeb0e8b34ac218b57cc30ea37137f763af
|
diff --git a/core/commands/filestore.go b/core/commands/filestore.go
index <HASH>..<HASH> 100644
--- a/core/commands/filestore.go
+++ b/core/commands/filestore.go
@@ -218,11 +218,18 @@ var dupsFileStore = &oldCmds.Command{
for cid := range ch {
have, err := fs.MainBlockstore().Has(cid)
if err != nil {
- out <- &RefWrapper{Err: err.Error()}
+ select {
+ case out <- &RefWrapper{Err: err.Error()}:
+ case <-req.Context().Done():
+ }
return
}
if have {
- out <- &RefWrapper{Ref: cid.String()}
+ select {
+ case out <- &RefWrapper{Ref: cid.String()}:
+ case <-req.Context().Done():
+ return
+ }
}
}
}()
|
fix(commands): fix filestore.go goroutine leak
License: MIT
|
ipfs_go-ipfs
|
train
|
go
|
2fe4ecb238c68b2eb90bd94d52b2366bf1175c57
|
diff --git a/gulpfile.babel.js b/gulpfile.babel.js
index <HASH>..<HASH> 100644
--- a/gulpfile.babel.js
+++ b/gulpfile.babel.js
@@ -3,9 +3,7 @@ import path from 'path';
import fs from 'fs-extra';
gulp.task('clean', (done) => {
- fs.remove(path.join(__dirname, 'poshtml.js'), () => {
- fs.remove(path.join(__dirname, 'build'), done);
- });
+ fs.remove(path.join(__dirname, 'build'), done);
});
// Build
|
feat(gulp): refactor config
|
posthtml_posthtml
|
train
|
js
|
a6bc0b839b7a4ddd73485b26dbddee1964349fd2
|
diff --git a/test/helpers/utils.go b/test/helpers/utils.go
index <HASH>..<HASH> 100644
--- a/test/helpers/utils.go
+++ b/test/helpers/utils.go
@@ -226,6 +226,8 @@ func HoldEnvironment(description ...string) {
fmt.Fprintf(os.Stdout, "\n\nPausing test for debug, use vagrant to access test setup.")
fmt.Fprintf(os.Stdout, "\nRun \"kill -SIGCONT %d\" to continue.\n", pid)
unix.Kill(pid, unix.SIGSTOP)
+ time.Sleep(time.Millisecond)
+ fmt.Fprintf(os.Stdout, "Test resumed.\n")
}
// Fail is a Ginkgo failure handler which raises a SIGSTOP for the test process
|
test: Print message when tests resume
When tests are put on hold after a failure, the user can restart them
with a SIGCONT signal. However, it's often takes a while before any new
output is displayed. This long silence can be disturbing for new users
who may think the SIGCONT signal failed.
This commit prints a simple message to clarify that tests were resumed.
The short sleep before the message display ensures the process is
stopped before the message is displayed.
|
cilium_cilium
|
train
|
go
|
2365adff3171b7e6538de7923fc2a0d3e135a494
|
diff --git a/packages/cozy-konnector-libs/src/libs/linker/billsToOperation/helpers.js b/packages/cozy-konnector-libs/src/libs/linker/billsToOperation/helpers.js
index <HASH>..<HASH> 100644
--- a/packages/cozy-konnector-libs/src/libs/linker/billsToOperation/helpers.js
+++ b/packages/cozy-konnector-libs/src/libs/linker/billsToOperation/helpers.js
@@ -12,7 +12,8 @@ const getOperationAmountFromBill = (bill, options) => {
const getOperationDateFromBill = (bill, options) => {
const isCredit = options && options.credit
- return new Date(isCredit ? bill.date : bill.originalDate || bill.date)
+ const date = isCredit ? bill.date : bill.originalDate || bill.date
+ return date ? new Date(date) : new Date()
}
const getIdentifiers = options => options.identifiers
|
fix: Defensive programming against bill without date
|
konnectors_libs
|
train
|
js
|
b0c61954ce2566a270da8c0499796a634389aee4
|
diff --git a/src/convert.js b/src/convert.js
index <HASH>..<HASH> 100644
--- a/src/convert.js
+++ b/src/convert.js
@@ -78,6 +78,7 @@ const defaultOptions = {
* @property {Spectrum[]} spectra
* @property {Ntuples} ntuples
* @property {object} meta
+ * @property {object} info
* @property {object} tmp
* @property {string} [title]
* @property {string} [dataType]
|
fix: add info property in typescript definition
|
cheminfo-js_jcampconverter
|
train
|
js
|
e6e01f9f989138290ca50023817b0363a2896c49
|
diff --git a/src/foremast/exceptions.py b/src/foremast/exceptions.py
index <HASH>..<HASH> 100644
--- a/src/foremast/exceptions.py
+++ b/src/foremast/exceptions.py
@@ -75,10 +75,13 @@ class SpinnakerTaskError(SpinnakerError):
def __init__(self, task_state):
errors = []
+
+ skip_statuses = GOOD_STATUSES.union(SKIP_STATUSES)
+
for stage in task_state['execution']['stages']:
LOG.debug('Stage:\n%s', pprint.pformat(stage))
- if stage['status'] in GOOD_STATUSES.union(SKIP_STATUSES):
+ if stage['status'] in skip_statuses:
continue
context = stage['context']
|
refactor: Avoid extra union in loop
|
foremast_foremast
|
train
|
py
|
dcb6f0070e71c26367c689c95470a259d346168b
|
diff --git a/test/cluster/cluster.go b/test/cluster/cluster.go
index <HASH>..<HASH> 100644
--- a/test/cluster/cluster.go
+++ b/test/cluster/cluster.go
@@ -446,6 +446,7 @@ if [[ -f test/scripts/debug-info.sh ]]; then
fi
sudo cp host/bin/flynn-* /usr/local/bin
+sudo cp bootstrap/bin/manifest.json /etc/flynn-bootstrap.json
`[1:]))
type buildData struct {
@@ -499,8 +500,7 @@ sudo start-stop-daemon \
flynn-host \
daemon \
--id {{ .ID }} \
- --manifest /etc/flynn-host.json \
- --external {{ .IP }} \
+ --external-ip {{ .IP }} \
--force \
--backend libvirt-lxc \
--peer-ips {{ .Peers }} \
|
test: Fix booting Flynn in CI
|
flynn_flynn
|
train
|
go
|
3c6fc33683831d7135f60ed6c0e4f7437e29cea1
|
diff --git a/api.js b/api.js
index <HASH>..<HASH> 100644
--- a/api.js
+++ b/api.js
@@ -42,7 +42,7 @@ function dbmigrate (plugins, isModule, options, callback) {
});
/* $lab:coverage:off$ */
- if (options && !options.throwUncatched) load('helper/register-events')();
+ if (!options || !options.throwUncatched) load('helper/register-events')();
/* $lab:coverage:on$ */
if (typeof options === 'object') {
|
fix(exitCode): wrong check for existence fixed
A wrong check for existence resulted in events not
being loaded on version sized like <I>. This resulted
in non zero error codes when actually running into errors.
|
db-migrate_node-db-migrate
|
train
|
js
|
881f27fe6fd43c96eff0039d75c2a6c9dad11182
|
diff --git a/flux/functions/inputs/from.go b/flux/functions/inputs/from.go
index <HASH>..<HASH> 100644
--- a/flux/functions/inputs/from.go
+++ b/flux/functions/inputs/from.go
@@ -75,7 +75,7 @@ func createFromSource(prSpec plan.ProcedureSpec, dsid execute.DatasetID, a execu
SeriesOffset: spec.SeriesOffset,
Descending: spec.Descending,
OrderByTime: spec.OrderByTime,
- GroupMode: storage.GroupMode(spec.GroupMode),
+ GroupMode: storage.ToGroupMode(spec.GroupMode),
GroupKeys: spec.GroupKeys,
AggregateMethod: spec.AggregateMethod,
},
|
fix(flux): Call storage API to correctly map group mode
This fix ensures group(mode:"by") is correctly pushed down to the
storage layer.
|
influxdata_influxdb
|
train
|
go
|
0d9bab632e8fe5d177a44f699c5bfe82905d59fb
|
diff --git a/src/index.js b/src/index.js
index <HASH>..<HASH> 100644
--- a/src/index.js
+++ b/src/index.js
@@ -23,8 +23,8 @@ var positionalNotation = curryN(2, pipe(positionalNotationRaw(toDecimal), Number
positionalNotation.raw = positionalNotationRaw;
-positionalNotation.mapper = curry3(function(f, val, index) {
- return f([index, val]);
+positionalNotation.mapper = curryN(4, function(d, base, val, index) {
+ return positionalNotationRaw(d, base, [index, val]);
});
positionalNotation.unfolder = curry3(function(d, base, cur) {
diff --git a/test/spec.js b/test/spec.js
index <HASH>..<HASH> 100644
--- a/test/spec.js
+++ b/test/spec.js
@@ -63,7 +63,7 @@ describe('use case: base any to any', function() {
R.split(''),
R.reverse,
R.map(R.indexOf(R.__, symbols)),
- R.addIndex(R.map)(fn.mapper(fn.raw(d, base))),
+ R.addIndex(R.map)(fn.mapper(d, base)),
R.reduce(R.invoker(1, 'plus'), d(0))
);
};
|
refactor: change mapper api
|
javiercejudo_positional-notation
|
train
|
js,js
|
b41320c6a81e92ed72fad11b12f695ecedc8a212
|
diff --git a/connection/pool.js b/connection/pool.js
index <HASH>..<HASH> 100644
--- a/connection/pool.js
+++ b/connection/pool.js
@@ -1570,6 +1570,11 @@ function _execute(self) {
writeSuccessful = connection.write(buffer);
}
+ // if the command is designated noResponse, call the callback immeditely
+ if (workItem.noResponse) {
+ workItem.cb(null, { result: { ok: 1 } });
+ }
+
if (writeSuccessful && workItem.immediateRelease && self.authenticating) {
removeConnection(self, connection);
self.nonAuthenticatedConnections.push(connection);
|
refactor(pool): ensure noResponse commands are immediately resolved
Commands that are designated noResponse currently will have dangling
callbacks. They are now resolved immediately after writing the
command to the wire.
NODE-<I>
|
mongodb_node-mongodb-native
|
train
|
js
|
4651bc594bbccf75121a77a906b94f4e52d92858
|
diff --git a/test/treasure.tracking.spec.js b/test/treasure.tracking.spec.js
index <HASH>..<HASH> 100644
--- a/test/treasure.tracking.spec.js
+++ b/test/treasure.tracking.spec.js
@@ -1,7 +1,17 @@
'use strict';
describe('Treasure Tracking', function () {
- var treasure, server, postUrl, respondWith;
+ var treasure, server, postUrl, respondWith, _log;
+
+ // Disables logging temporarily
+ before(function () {
+ _log = Treasure.log;
+ Treasure.log = function () {};
+ });
+
+ after(function () {
+ Treasure.log = _log;
+ });
describe('#addEvent', function () {
|
test(tracking): disable logging
|
treasure-data_td-js-sdk
|
train
|
js
|
5751946c1669aa285af0a11586c514a57abd5dc2
|
diff --git a/lib/backchannel.js b/lib/backchannel.js
index <HASH>..<HASH> 100644
--- a/lib/backchannel.js
+++ b/lib/backchannel.js
@@ -264,7 +264,7 @@ BackChannel.prototype = {
const waiting = this.waiting[name];
if (Array.isArray(waiting)) {
waiting.forEach((item) => {
- this.send.apply(this, [name].concat(item));
+ this.send(...[name].concat(item));
});
}
delete this.waiting[name];
|
fix: lint spread instead of apply
|
Strider-CD_strider
|
train
|
js
|
3161c9035ede0e980ecd4a8175e11007bbb42adf
|
diff --git a/src/test/java/org/w3c/epubcheck/test/RunCucumberTest.java b/src/test/java/org/w3c/epubcheck/test/RunCucumberTest.java
index <HASH>..<HASH> 100644
--- a/src/test/java/org/w3c/epubcheck/test/RunCucumberTest.java
+++ b/src/test/java/org/w3c/epubcheck/test/RunCucumberTest.java
@@ -6,11 +6,7 @@ import io.cucumber.junit.Cucumber;
import io.cucumber.junit.CucumberOptions;
@RunWith(Cucumber.class)
-@CucumberOptions(
- features = "classpath:",
- strict = true,
- monochrome = true,
- plugin = { "pretty" })
+@CucumberOptions(features = "classpath:", strict = true)
public class RunCucumberTest
{
|
test: disable pretty printing of cucumber tests by default
|
w3c_epubcheck
|
train
|
java
|
ccf0a68f9e8873108512d224a552c174c8b13ab8
|
diff --git a/src/index.js b/src/index.js
index <HASH>..<HASH> 100644
--- a/src/index.js
+++ b/src/index.js
@@ -186,7 +186,9 @@ class CacheableRequest {
}
};
- this.cache.on('error', error => ee.emit('error', new CacheableRequest.CacheError(error)));
+ const errorHandler = error => ee.emit('error', new CacheableRequest.CacheError(error));
+ this.cache.once('error', errorHandler);
+ ee.on('response', _ => this.cache.removeListener('error', errorHandler));
try {
await get(opts);
|
fix: Clean up store error event listener to prevent memory leak
|
lukechilds_cacheable-request
|
train
|
js
|
d5f63a74e468a3e6af3b63251d270936e8cdf3fa
|
diff --git a/superset/migrations/versions/6d20ba9ecb33_add_last_saved_at_to_slice_model.py b/superset/migrations/versions/6d20ba9ecb33_add_last_saved_at_to_slice_model.py
index <HASH>..<HASH> 100644
--- a/superset/migrations/versions/6d20ba9ecb33_add_last_saved_at_to_slice_model.py
+++ b/superset/migrations/versions/6d20ba9ecb33_add_last_saved_at_to_slice_model.py
@@ -17,14 +17,14 @@
"""add_last_saved_at_to_slice_model
Revision ID: 6d20ba9ecb33
-Revises: ('ae1ed299413b', 'f6196627326f')
+Revises: 'f6196627326f'
Create Date: 2021-08-02 21:14:58.200438
"""
# revision identifiers, used by Alembic.
revision = "6d20ba9ecb33"
-down_revision = ("ae1ed299413b", "f6196627326f")
+down_revision = "f6196627326f"
import sqlalchemy as sa
from alembic import op
|
fix: remove mergepoint from past migration (#<I>)
|
apache_incubator-superset
|
train
|
py
|
e9eb775c051ddbf5f018f7dafc1ad18ba1a5db0e
|
diff --git a/packages/core/src/useTransition.js b/packages/core/src/useTransition.js
index <HASH>..<HASH> 100644
--- a/packages/core/src/useTransition.js
+++ b/packages/core/src/useTransition.js
@@ -213,7 +213,7 @@ function diffItems({ first, current, deleted, prevProps, ...state }, props) {
props: {
delay: (delay += trail),
config: callProp(config, item, phase),
- from: callProp(from, item),
+ from: callProp(from, item, i),
to: enterProps,
...(is.obj(enterProps) && interpolateTo(enterProps)),
},
|
fix: pass item index to "from" function prop in useTransition
|
react-spring_react-spring
|
train
|
js
|
64c73d7eba443b84d974a4485818b826dacc6ca7
|
diff --git a/internal/client/gitea.go b/internal/client/gitea.go
index <HASH>..<HASH> 100644
--- a/internal/client/gitea.go
+++ b/internal/client/gitea.go
@@ -213,6 +213,9 @@ func (c *giteaClient) CreateRelease(ctx *context.Context, body string) (string,
}
if release != nil {
+ if release.Note != "" {
+ body = release.Note
+ }
release, err = c.updateRelease(ctx, title, body, release.ID)
if err != nil {
return "", err
|
fix(gitea): do not overwrite existing release notes
|
goreleaser_goreleaser
|
train
|
go
|
efd965b9b694077333614d01acf0b889f4287a8c
|
diff --git a/packages/pagination/src/Pagination.js b/packages/pagination/src/Pagination.js
index <HASH>..<HASH> 100644
--- a/packages/pagination/src/Pagination.js
+++ b/packages/pagination/src/Pagination.js
@@ -8,6 +8,17 @@ export const PaginationContext = React.createContext();
export const usePagination = () => useContext(PaginationContext);
+const getItemLocalStorage = (key) => {
+ const value = window.localStorage.getItem(key);
+ let output;
+ try {
+ output = JSON.parse(value);
+ } catch {
+ output = value;
+ }
+ return output;
+};
+
// todos
// Add another `useEffect` for only updating the items without calling the function if the `itemsPerPage` prop changes
@@ -77,7 +88,9 @@ const Pagination = ({
const pageCount = Math.ceil((totalCount || items.length) / itemsPerPage);
- if (!isEqual(JSON.parse(window.localStorage.getItem('current-page')), currentPage)) {
+ const localStorageItem = getItemLocalStorage('current-page');
+
+ if (!isEqual(localStorageItem, currentPage)) {
return;
}
|
feat(pagination): adding try catch around json parse for localstorage get
|
Availity_availity-react
|
train
|
js
|
ff8bf5709b223da7542f7265187e8723489e4b22
|
diff --git a/lib/node/NodeTargetPlugin.js b/lib/node/NodeTargetPlugin.js
index <HASH>..<HASH> 100644
--- a/lib/node/NodeTargetPlugin.js
+++ b/lib/node/NodeTargetPlugin.js
@@ -2,11 +2,14 @@
MIT License http://www.opensource.org/licenses/mit-license.php
Author Tobias Koppers @sokra
*/
-var ExternalsPlugin = require("../ExternalsPlugin");
+"use strict";
-function NodeTargetPlugin() {}
+const ExternalsPlugin = require("../ExternalsPlugin");
+
+class NodeTargetPlugin {
+ apply(compiler) {
+ new ExternalsPlugin("commonjs", Object.keys(process.binding("natives"))).apply(compiler);
+ }
+}
module.exports = NodeTargetPlugin;
-NodeTargetPlugin.prototype.apply = function(compiler) {
- new ExternalsPlugin("commonjs", Object.keys(process.binding("natives"))).apply(compiler);
-};
|
refactor(NodeTargetPlugin): upgrade to ES6
|
webpack_webpack
|
train
|
js
|
c87ad48cf2746f828e271a8c0ce3aa585e8fe05d
|
diff --git a/src/Elasticsearch/Aggregation/ElasticaAggregation.php b/src/Elasticsearch/Aggregation/ElasticaAggregation.php
index <HASH>..<HASH> 100644
--- a/src/Elasticsearch/Aggregation/ElasticaAggregation.php
+++ b/src/Elasticsearch/Aggregation/ElasticaAggregation.php
@@ -23,11 +23,14 @@ class ElasticaAggregation extends AbstractSimpleAggregation
$this->setParams($param);
}
- public function _getBaseName(): string
+
+ // phpcs:disable
+ protected function _getBaseName(): string
{
if ($this->basename === null) {
throw new \RuntimeException('Unexpected null aggregation');
}
return $this->basename;
}
+ // phpcs:enable
}
|
fix: solve phpcs issue for an inherited method from Elastica (now way to rename the function as requested)
|
ems-project_EMSCommonBundle
|
train
|
php
|
2d2f4b406d9cc69cf8de9f039d3face8cb7902d0
|
diff --git a/packages/site/next.config.js b/packages/site/next.config.js
index <HASH>..<HASH> 100644
--- a/packages/site/next.config.js
+++ b/packages/site/next.config.js
@@ -16,6 +16,7 @@ module.exports = {
'/components/row': { page: '/components/row' },
'/components/tab': { page: '/components/tab' },
'/components/text': { page: '/components/text' },
+ '/components/theme': { page: '/components/theme' },
'/core/build': { page: '/core/build' },
'/core/usage': { page: '/core/usage' },
'/core/color': { page: '/core/color' },
|
fix(site): add theme to static gen map
|
pluralsight_design-system
|
train
|
js
|
42216c947dcd37ddf795fb6913b8bf7f73f3019e
|
diff --git a/test/specs/elements/Icon/Icon-test.js b/test/specs/elements/Icon/Icon-test.js
index <HASH>..<HASH> 100644
--- a/test/specs/elements/Icon/Icon-test.js
+++ b/test/specs/elements/Icon/Icon-test.js
@@ -1,7 +1,11 @@
import React from 'react'
-import { Icon } from 'stardust'
+
+import Icon from 'src/elements/Icon/Icon'
+import * as common from 'test/specs/commonTests'
describe('Icon', () => {
+ common.isConformant(Icon)
+
it('renders an <i /> element', () => {
deprecatedRender(<Icon />)
.findTag('i')
|
test(Icon): add common
|
Semantic-Org_Semantic-UI-React
|
train
|
js
|
40a4e1de7d329eb797c2607af0a77d0ca1f46397
|
diff --git a/client/service_manager.go b/client/service_manager.go
index <HASH>..<HASH> 100644
--- a/client/service_manager.go
+++ b/client/service_manager.go
@@ -101,7 +101,10 @@ func (s *ServiceManager) List() map[int]*exec.Cmd {
// Command executes the command
func (s *ServiceManager) Command() *exec.Cmd {
cmd := exec.Command(s.Cmd, s.Args...)
- cmd.Env = s.Env
+ env := os.Environ()
+ env = append(env, s.Env...)
+ cmd.Env = env
+
return cmd
}
@@ -109,7 +112,9 @@ func (s *ServiceManager) Command() *exec.Cmd {
func (s *ServiceManager) Start() *exec.Cmd {
log.Println("[DEBUG] starting service")
cmd := exec.Command(s.Cmd, s.Args...)
- cmd.Env = s.Env
+ env := os.Environ()
+ env = append(env, s.Env...)
+ cmd.Env = env
cmdReader, err := cmd.StdoutPipe()
if err != nil {
|
feat(utf8): ensure env vars are passed through to all commands
|
pact-foundation_pact-go
|
train
|
go
|
e4e10d5b7c451a950808d605a2db99cd275d20eb
|
diff --git a/packages/rum-core/src/error-logging/error-logging.js b/packages/rum-core/src/error-logging/error-logging.js
index <HASH>..<HASH> 100644
--- a/packages/rum-core/src/error-logging/error-logging.js
+++ b/packages/rum-core/src/error-logging/error-logging.js
@@ -172,7 +172,10 @@ class ErrorLogging {
logPromiseEvent(promiseRejectionEvent) {
const prefix = 'Unhandled promise rejection: '
- let { reason = '<no reason specified>' } = promiseRejectionEvent
+ let { reason } = promiseRejectionEvent
+ if (reason == null) {
+ reason = '<no reason specified>'
+ }
let errorEvent
if (typeof reason.message === 'string') {
diff --git a/packages/rum-core/test/error-logging/error-logging.spec.js b/packages/rum-core/test/error-logging/error-logging.spec.js
index <HASH>..<HASH> 100644
--- a/packages/rum-core/test/error-logging/error-logging.spec.js
+++ b/packages/rum-core/test/error-logging/error-logging.spec.js
@@ -401,6 +401,13 @@ describe('ErrorLogging', function() {
'Unhandled promise rejection: <function>'
)
+ errorLogging.logPromiseEvent({
+ reason: null
+ })
+ expect(getEvents()[9][ERRORS].exception.message).toBe(
+ 'Unhandled promise rejection: <no reason specified>'
+ )
+
const events = getEvents()
clearQueue()
|
fix(rum-core): handle null in promise rejection event
* fix: null is not an object (evaluating 'reason.message')
* test: add test for null reason
|
elastic_apm-agent-rum-js
|
train
|
js,js
|
b9a568c812e36287ef11093230e5c9f1ef296630
|
diff --git a/src/View.js b/src/View.js
index <HASH>..<HASH> 100644
--- a/src/View.js
+++ b/src/View.js
@@ -1055,7 +1055,7 @@ var View = createClass(
{
if(modelArgs[k].charAt(0) === '@')
{
- modelArgs[k] = modelArgs[k].slice(1).split('.');
+ modelArgs[k] = modelArgs[k].slice(1).replace(leadingPeriodRegex, '*.').replace(trailingPeriodRegex, '.*').split('.');
}
}
}
|
fix(View): relative keyPath in "model" arguments of bindings should not require to have leading or trailing asterisk characters
|
karfcz_kff
|
train
|
js
|
b2457268891948f7005ccf539a70c000f0695bde
|
diff --git a/src/highlight.js b/src/highlight.js
index <HASH>..<HASH> 100644
--- a/src/highlight.js
+++ b/src/highlight.js
@@ -401,7 +401,12 @@ export default function(defaultAstGenerator, defaultStyle) {
}
// determine largest line number so that we can force minWidth on all linenumber elements
- const largestLineNumber = codeTree.value.length + startingLineNumber;
+ let lineCount = codeTree.value.length;
+ if (lineCount === 1 && codeTree.value[0].type === 'text') {
+ // Since codeTree for an unparsable text (e.g. 'a\na\na') is [{ type: 'text', value: 'a\na\na' }]
+ lineCount = codeTree.value[0].value.split('\n').length;
+ }
+ const largestLineNumber = lineCount + startingLineNumber;
const rows = processLines(
codeTree,
|
fix: largestLineNumber for unparsable texts (#<I>)
|
conorhastings_react-syntax-highlighter
|
train
|
js
|
5608dde39f96400a2ef390e334a4ae0007975911
|
diff --git a/test/unit/is-enabled.js b/test/unit/is-enabled.js
index <HASH>..<HASH> 100644
--- a/test/unit/is-enabled.js
+++ b/test/unit/is-enabled.js
@@ -10,7 +10,6 @@ describe('Log Enable', () => {
context('with an * pattern', () => {
it('enables all logs', () => {
assert.ok(isEnabled(faker.random.words(), '*'));
- assert.ok(isEnabled(faker.random.words(), '*'));
});
context('and an exclude pattern', () => {
|
chore: Deleting duplicated line
|
natura-cosmeticos_clio-nodejs-logger
|
train
|
js
|
b192e059403f1655d8e968a406c6da2e8f6a4e7e
|
diff --git a/src/helpers.js b/src/helpers.js
index <HASH>..<HASH> 100644
--- a/src/helpers.js
+++ b/src/helpers.js
@@ -87,7 +87,13 @@ export function getQueryString (queryMap) {
const queryString = Object.keys(queryMap)
.reduce((string, key, index, keys) => {
const isLastKey = index === (keys.length - 1)
- string += `${key}=${queryMap[key]}${isLastKey ? '' : '&'}`
+ const value = queryMap[key]
+
+ if (value == null) {
+ return string
+ }
+
+ string += `${key}=${value}${isLastKey ? '' : '&'}`
return string
}, '')
|
fix(helpers): querystring registers undefined or null
closes #<I>
|
MatteoGabriele_vue-analytics
|
train
|
js
|
6161c66a42c0b8e187dfeac3b7530fe6e91dec0d
|
diff --git a/lib/middleware/response-body.js b/lib/middleware/response-body.js
index <HASH>..<HASH> 100644
--- a/lib/middleware/response-body.js
+++ b/lib/middleware/response-body.js
@@ -77,6 +77,8 @@ module.exports = function transformResponseBody(middleware, filter) {
function finisher(cb) {
return function (err, body, encoding) {
+ if (closed) return cb && cb()
+
if (err) {
res.statusCode = +err.status || 500
return res.end(err.message || err)
|
refactor(responseBody): handle client close event
|
h2non_rocky
|
train
|
js
|
6843faff6ee3483b52df0a66d7f4baf27e66c020
|
diff --git a/packages/utiljs-node-http/lib/Urls.js b/packages/utiljs-node-http/lib/Urls.js
index <HASH>..<HASH> 100644
--- a/packages/utiljs-node-http/lib/Urls.js
+++ b/packages/utiljs-node-http/lib/Urls.js
@@ -28,7 +28,7 @@ class Urls {
})
.on("error", (error) => {
files().unlink(destination, (unlinkError) => {
- cb(unlinkError ? unlinkError : error);
+ cb(unlinkError || error);
});
});
const timeout = determineTimeout(callbackOrOptions);
|
refactor: simplify a ternary expression
|
creemama_utiljs
|
train
|
js
|
00f75af55c6b910dbb9d4f99fd013877489454fb
|
diff --git a/lib/Bundle.js b/lib/Bundle.js
index <HASH>..<HASH> 100644
--- a/lib/Bundle.js
+++ b/lib/Bundle.js
@@ -10,7 +10,7 @@ function Bundle(dir, option) {
this.dir = dir;
this.type = option.type || 'unkonw';
this.list = glob.sync(path.join(dir, '**/*'), {
- dot: true
+ dot: !!option.dot
});
this.ignore = typeof option.ignore === 'function' ? option.ignore : noop;
this.categories = null;
|
fix(Bundle): support dot file
|
xgfe_freepack
|
train
|
js
|
1cee89421dc093d5016a7b1ab4f5a1fab4aebb68
|
diff --git a/tests/system/Database/Live/OCI8/LastInsertIDTest.php b/tests/system/Database/Live/OCI8/LastInsertIDTest.php
index <HASH>..<HASH> 100644
--- a/tests/system/Database/Live/OCI8/LastInsertIDTest.php
+++ b/tests/system/Database/Live/OCI8/LastInsertIDTest.php
@@ -27,6 +27,14 @@ final class LastInsertIDTest extends CIUnitTestCase
protected $refresh = true;
protected $seed = 'Tests\Support\Database\Seeds\CITestSeeder';
+ public function setUp(){
+ parent::setUp();
+
+ if ($this->db->DBDriver !== 'OCI8') {
+ $this->markTestSkipped('Only OCI8 has its own implementation.');
+ }
+ }
+
public function testGetInsertIDWithInsert()
{
$jobData = [
|
test: add setUp for skipTest when using OCI8 driver
|
codeigniter4_CodeIgniter4
|
train
|
php
|
3c140679495a9f6ed02b2597e3f5e11b3e7bdb05
|
diff --git a/test/unit/lib/plugins/package/lib/packageService.test.js b/test/unit/lib/plugins/package/lib/packageService.test.js
index <HASH>..<HASH> 100644
--- a/test/unit/lib/plugins/package/lib/packageService.test.js
+++ b/test/unit/lib/plugins/package/lib/packageService.test.js
@@ -504,16 +504,6 @@ describe('lib/plugins/package/lib/packageService.test.js', () => {
}
);
- (process.platfrom === 'win32' ? it : it.skip)(
- 'TODO: should normalize go runtime handler path on windows',
- () => {
- // Confirm that configured lambda handler has normalized path
- //
- // Replace
- // https://github.com/serverless/serverless/blob/b12d565ea0ad588445fb120e049db157afc7bf37/test/unit/lib/plugins/package/lib/packageService.test.js#L378-L402
- }
- );
-
it.skip('TODO: should package layer', () => {
// Confirm that layer is packaged and content is as expected
//
|
test(Packaging): Cleanup
|
serverless_serverless
|
train
|
js
|
9c12d2818adbbccce917e2fb32e7da9302f4e2bf
|
diff --git a/hardware/tests/firmware_integration/test_move_groups.py b/hardware/tests/firmware_integration/test_move_groups.py
index <HASH>..<HASH> 100644
--- a/hardware/tests/firmware_integration/test_move_groups.py
+++ b/hardware/tests/firmware_integration/test_move_groups.py
@@ -183,7 +183,9 @@ async def test_move_integration(
# 10e-3 mm
# All of this lines up to mean you have to give some wiggle room for positions.
# Also mypy doesn't like pytest.approx so we have to type ignore it
- assert position == { # type: ignore[comparison-overlap]
+
+ # We now store the position as a tuple of assumed position + encoder value.
+ assert {k: v[0] for k, v in position.items()} == { # type: ignore[comparison-overlap]
motor_node: pytest.approx(
motor_node.value, abs=all_motor_node_step_sizes[motor_node] * 3
)
|
fix(ot3): separate out position and encoder position in integration test (#<I>)
|
Opentrons_opentrons
|
train
|
py
|
2c2400a4b802de8a387d9b81724bb3161fa349e7
|
diff --git a/src/Leevel/Kernel/Testing/Helper.php b/src/Leevel/Kernel/Testing/Helper.php
index <HASH>..<HASH> 100644
--- a/src/Leevel/Kernel/Testing/Helper.php
+++ b/src/Leevel/Kernel/Testing/Helper.php
@@ -133,7 +133,12 @@ trait Helper
*/
protected function varJson(array $data, ?int $id = null): string
{
- $method = debug_backtrace()[1]['function'].$id;
+ $backtrace = debug_backtrace();
+ if ('varJson' === ($method = $backtrace[1]['function'])) {
+ $method = $backtrace[2]['function'];
+ }
+ $method .= $id;
+
list($traceDir, $className) = $this->makeLogsDir();
file_put_contents(
$traceDir.'/'.sprintf('%s::%s.log', $className, $method),
|
fix(any): varJson support overload
|
hunzhiwange_framework
|
train
|
php
|
9950335bb2478eb3dc22561284641cd172738381
|
diff --git a/models/FuncAcl.php b/models/FuncAcl.php
index <HASH>..<HASH> 100755
--- a/models/FuncAcl.php
+++ b/models/FuncAcl.php
@@ -52,7 +52,7 @@ class FuncAcl extends ConfigurableService implements FuncAccessControl, AccessCo
$accessAllowed = !empty(array_intersect($userRoles, $allowedRoles));
- if ($accessAllowed === false) {
+ if (!$accessAllowed) {
$this->getAdvancedLogger()->info(
'Access denied.',
[
|
refactor: use short comparisson
|
oat-sa_extension-tao-funcacl
|
train
|
php
|
2e9e88d08ce54151c7e3adabcf8c45158372b743
|
diff --git a/packages/theme-data/src/baseTheme/components/component.js b/packages/theme-data/src/baseTheme/components/component.js
index <HASH>..<HASH> 100644
--- a/packages/theme-data/src/baseTheme/components/component.js
+++ b/packages/theme-data/src/baseTheme/components/component.js
@@ -3,6 +3,6 @@ import { OPACITY } from "../../consts/types";
export default {
"component.disabled.opacity": {
type: OPACITY,
- value: "0.5"
+ value: "0.4"
}
};
|
feat: new disabled opacity
|
Autodesk_hig
|
train
|
js
|
35f8a55d0ca92658817dae90d809636e86a0dbbf
|
diff --git a/tests/test_fiobank.py b/tests/test_fiobank.py
index <HASH>..<HASH> 100644
--- a/tests/test_fiobank.py
+++ b/tests/test_fiobank.py
@@ -208,7 +208,7 @@ def test_transaction_schema_is_complete():
columns_in_xsd = set()
element_re = re.compile(r'<\w+:element[^>]+name="column_(\d+)')
- for match in element_re.finditer(response.content):
+ for match in element_re.finditer(response.text):
column_name = 'column{}'.format(match.group(1))
columns_in_xsd.add(column_name)
|
test: Fix bytes/str confusion in Python 3
|
honzajavorek_fiobank
|
train
|
py
|
ba9a93b0bf4c3611cfc069de29800626e3f682aa
|
diff --git a/src/client/websocket/packets/handlers/PresenceUpdate.js b/src/client/websocket/packets/handlers/PresenceUpdate.js
index <HASH>..<HASH> 100644
--- a/src/client/websocket/packets/handlers/PresenceUpdate.js
+++ b/src/client/websocket/packets/handlers/PresenceUpdate.js
@@ -52,7 +52,7 @@ class PresenceUpdateHandler extends AbstractHandler {
}
/**
- * Emitted whenever a guild member's presence (e.g. status, activity) are changed.
+ * Emitted whenever a guild member's presence (e.g. status, activity) is changed.
* @event Client#presenceUpdate
* @param {GuildMember} oldMember The member before the presence update
* @param {GuildMember} newMember The member after the presence update
|
docs: last english fix for now
|
discordjs_discord.js
|
train
|
js
|
e1afd38d94a36fe33799f5e74e2fcf0539cd7613
|
diff --git a/lib/frames.js b/lib/frames.js
index <HASH>..<HASH> 100644
--- a/lib/frames.js
+++ b/lib/frames.js
@@ -26,7 +26,8 @@ frames.read_header = function(buffer) {
var header = {};
var name = buffer.toString('ascii', 0, offset);
if (name !== 'AMQP') {
- throw new errors.ProtocolError('Invalid protocol header for AMQP ' + name);
+ // output name in hex (null-bytes can be tough to deal with in ascii)
+ throw new errors.ProtocolError('Invalid protocol header for AMQP: ' + buffer.toString('hex', 0, offset));
}
header.protocol_id = buffer.readUInt8(offset++);
header.major = buffer.readUInt8(offset++);
|
fix: safely represent buffers in error messages
|
amqp_rhea
|
train
|
js
|
1d14ea6b4537a791450937774fcfe88c4433d0d9
|
diff --git a/framework/core/src/Frontend/Assets.php b/framework/core/src/Frontend/Assets.php
index <HASH>..<HASH> 100644
--- a/framework/core/src/Frontend/Assets.php
+++ b/framework/core/src/Frontend/Assets.php
@@ -156,12 +156,18 @@ class Assets
protected function makeJsCompiler(string $filename)
{
- return new JsCompiler($this->assetsDir, $filename);
+ return resolve(JsCompiler::class, [
+ 'assetsDir' => $this->assetsDir,
+ 'filename' => $filename
+ ]);
}
protected function makeLessCompiler(string $filename): LessCompiler
{
- $compiler = new LessCompiler($this->assetsDir, $filename);
+ $compiler = resolve(LessCompiler::class, [
+ 'assetsDir' => $this->assetsDir,
+ 'filename' => $filename
+ ]);
if ($this->cacheDir) {
$compiler->setCacheDir($this->cacheDir.'/less');
|
fix(compilation): versioner not inject into compilers (#<I>)
|
flarum_core
|
train
|
php
|
86a6e5eb7fc317891841c5d0a55e6a87ca9fd668
|
diff --git a/src/api/web/index.js b/src/api/web/index.js
index <HASH>..<HASH> 100644
--- a/src/api/web/index.js
+++ b/src/api/web/index.js
@@ -44,8 +44,10 @@ module.exports = function(config, auth, storage) {
const template = fs.readFileSync(indexTemplate).toString();
// Static
- router.get('/-/static/:filename', function(req, res, next) {
- const file = `${themePath}/${req.params.filename}`;
+ router.get('/-/static/*', function(req, res, next) {
+ const filename = req.params[0];
+
+ const file = `${themePath}/${filename}`;
res.sendFile(file, function(err) {
if (!err) {
return;
|
fix: all static files are captured by the router
|
verdaccio_verdaccio
|
train
|
js
|
2d3fa98db1d1430558979af092fd033315551406
|
diff --git a/lib/connection/pool.js b/lib/connection/pool.js
index <HASH>..<HASH> 100644
--- a/lib/connection/pool.js
+++ b/lib/connection/pool.js
@@ -364,7 +364,7 @@ function attemptReconnect(self) {
// Count down the number of reconnects
self.retriesLeft = self.retriesLeft - 1;
// How many retries are left
- if (self.retriesLeft === 0) {
+ if (self.retriesLeft <= 0) {
// Destroy the instance
self.destroy();
// Emit close event
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
@@ -1077,4 +1077,27 @@ describe('Server tests', function() {
}
});
});
+
+ it('Should not try to reconnect forever if reconnectTries = 0', {
+ metadata: { requires: { topology: 'single' } },
+
+ test: function(done) {
+ // Attempt to connect
+ let server = new Server({
+ host: 'doesntexist',
+ bson: new Bson(),
+ reconnectTries: 0
+ });
+
+ // Add event listeners
+ server.on('error', function() {});
+
+ // Start connection
+ server.connect();
+
+ server.s.pool.on('reconnectFailed', function() {
+ done();
+ });
+ }
+ });
});
|
fix(connection): make pool not try to reconnect forever when reconnectTries = 0 (#<I>)
* fix(connection): make pool not try to reconnect forever when reconnectTries = 0
* test(server): add test coverage for #<I>
Re: Automattic/mongoose#<I>
|
mongodb-js_mongodb-core
|
train
|
js,js
|
ff84be61a054145d28ecc73b7a8bc83bf4e0a451
|
diff --git a/squad/ci/backend/lava.py b/squad/ci/backend/lava.py
index <HASH>..<HASH> 100644
--- a/squad/ci/backend/lava.py
+++ b/squad/ci/backend/lava.py
@@ -220,8 +220,9 @@ class Backend(BaseBackend):
except xmlrpc.client.ProtocolError as error:
raise TemporarySubmissionIssue(self.url_remove_token(str(error)))
except xmlrpc.client.Fault as fault:
- if fault.faultCode // 100 == 5:
+ if fault.faultCode // 100 == 5 or fault.faultCode == 408:
# assume HTTP errors 5xx are temporary issues
+ # consider 408 as TemporarySubmissionIssue, as it's considered as timeout
raise TemporarySubmissionIssue(self.url_remove_token(str(fault)))
else:
raise SubmissionIssue(self.url_remove_token(str(fault)))
|
ci: backend: lava: handle HTTP <I> as TemporarySubmissionIssue
For some reason, requests library doesn't raise <I> Timeout as
exception, which causes submit to return empty list of ids and
causing IndexError.
This patch explicitly checks if requests returns <I> and handle that
as TemporarySubmissionIssue
|
Linaro_squad
|
train
|
py
|
296978fd97fb3354850d224382c06186ad804587
|
diff --git a/okdownload/src/main/java/com/liulishuo/okdownload/SpeedCalculator.java b/okdownload/src/main/java/com/liulishuo/okdownload/SpeedCalculator.java
index <HASH>..<HASH> 100644
--- a/okdownload/src/main/java/com/liulishuo/okdownload/SpeedCalculator.java
+++ b/okdownload/src/main/java/com/liulishuo/okdownload/SpeedCalculator.java
@@ -145,6 +145,10 @@ public class SpeedCalculator {
return humanReadableSpeed(getInstantBytesPerSecondAndFlush(), true);
}
+ public String averageSpeed() {
+ return speedFromBegin();
+ }
+
public String speedFromBegin() {
return humanReadableSpeed(getBytesPerSecondFromBegin(), true);
}
|
feat: add average-speed method on speed-calculator to let speed-from-beginning more readable
|
lingochamp_okdownload
|
train
|
java
|
4beab1bea6bfc7f4d7d1cd55627bfa1874e91f02
|
diff --git a/lib/util/itinerary.js b/lib/util/itinerary.js
index <HASH>..<HASH> 100644
--- a/lib/util/itinerary.js
+++ b/lib/util/itinerary.js
@@ -298,17 +298,20 @@ const routeTypeComparatorValue = {
// Note: JSDoc format not used to avoid bug in documentationjs.
// ttps://github.com/documentationjs/documentation/issues/372
function getRouteTypeComparatorValue (route) {
+ // Default the comparator value to a large number (placing the route at the
+ // end of the list).
+ let comparatorValue = 9999
// For some strange reason, the short route response in OTP returns the
// string-based modes, but the long route response returns the
// integer route type. This attempts to account for both of those cases.
if (typeof route.mode !== 'undefined') {
- return modeComparatorValue[route.mode]
+ comparatorValue = modeComparatorValue[route.mode]
} else if (typeof route.type !== 'undefined') {
- return routeTypeComparatorValue[route.type]
+ comparatorValue = routeTypeComparatorValue[route.type]
} else {
console.warn('no mode/route type found for route', route)
- return 9999
}
+ return comparatorValue
}
/**
|
refactor(RouteViewer): default route type sort to <I>
|
opentripplanner_otp-react-redux
|
train
|
js
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.