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 |
|---|---|---|---|---|---|
9319efe60dda74bea5b43b8929d394acf74b853e
|
diff --git a/src/WebWorkers/ImageIOWorker.js b/src/WebWorkers/ImageIOWorker.js
index <HASH>..<HASH> 100644
--- a/src/WebWorkers/ImageIOWorker.js
+++ b/src/WebWorkers/ImageIOWorker.js
@@ -59,7 +59,7 @@ const readImage = (input, withTransferList) => {
}
}
if (io === null) {
- return new Error('Could not find IO for: ' + input.name)
+ return Promise.reject(new Error('Could not find IO for: ' + input.name))
}
let ioModule = null
@@ -109,7 +109,7 @@ const writeImage = (input, withTransferList) => {
}
}
if (io === null) {
- return new Error('Could not find IO for: ' + input.name)
+ return Promise.reject(new Error('Could not find IO for: ' + input.name))
}
let ioModule = null
|
fix(ImageIOWorker): Wrap the returned errors in a Promise
This improves how the error is handled downstream and improves the message.
|
InsightSoftwareConsortium_itk-js
|
train
|
js
|
5f0ec9128fba517087d069ab7475fc3043d2fc6b
|
diff --git a/scripts/getBuildData.js b/scripts/getBuildData.js
index <HASH>..<HASH> 100644
--- a/scripts/getBuildData.js
+++ b/scripts/getBuildData.js
@@ -4,7 +4,7 @@ module.exports = (isCompiled = false) => {
let buildData = '';
if (git.branch() !== 'master') {
- buildData += '\n';
+ buildData += '';
if (isCompiled) {
buildData += `
@@ -22,5 +22,5 @@ module.exports = (isCompiled = false) => {
}
}
- return buildData.replace(/\n/, '').replace(/^ +/gm, ' ');
+ return buildData.replace(/^ +/gm, ' ');
};
|
refactor: Remove superfluous newline
|
nostalgic-css_NES.css
|
train
|
js
|
5886a9ad10e360a0c582c8883e282436d9077b27
|
diff --git a/ibis/backends/pandas/client.py b/ibis/backends/pandas/client.py
index <HASH>..<HASH> 100644
--- a/ibis/backends/pandas/client.py
+++ b/ibis/backends/pandas/client.py
@@ -1,10 +1,13 @@
"""The pandas client implementation."""
+from collections.abc import Mapping, Sequence
+
import numpy as np
import pandas as pd
import toolz
from pandas.api.types import CategoricalDtype, DatetimeTZDtype
+import ibis.common.exceptions as com
import ibis.expr.datatypes as dt
import ibis.expr.operations as ops
import ibis.expr.schema as sch
@@ -139,9 +142,16 @@ def _infer_pandas_series_contents(s: pd.Series) -> dt.DataType:
if inferred_dtype == 'mixed':
# We need to inspect an element to determine the Ibis dtype
value = s.iloc[0]
- if isinstance(value, (np.ndarray, list, pd.Series)):
+ if isinstance(value, (np.ndarray, pd.Series, Sequence)):
# Defer to individual `infer` functions for these
return dt.infer(value)
+ elif isinstance(value, Mapping):
+ try:
+ return dt.infer(value)
+ except com.IbisTypeError:
+ return dt.Struct.from_tuples(
+ (k, dt.infer(v)) for k, v in value.items()
+ )
else:
return dt.dtype('binary')
else:
|
fix(pandas): fix struct inference from dict in the pandas backend
|
ibis-project_ibis
|
train
|
py
|
3892ecd7673d5bdedf7f95461dea9cece4f8837e
|
diff --git a/Filter/Type/AjaxRelationFilterType.php b/Filter/Type/AjaxRelationFilterType.php
index <HASH>..<HASH> 100644
--- a/Filter/Type/AjaxRelationFilterType.php
+++ b/Filter/Type/AjaxRelationFilterType.php
@@ -135,11 +135,13 @@ class AjaxRelationFilterType extends FilterType
}
}
+ $property = sprintf('%s.%s', $this->getColumn(), $this->propToCheckAgainstId);
+
switch ($operator) {
case static::CRITERIA_EQUAL:
- return $queryBuilder->expr()->eq(sprintf('%s.%s', $this->getColumn(), $this->propToCheckAgainstId), (int) $value);
+ return $queryBuilder->expr()->eq($property, (int) $value);
case static::CRITERIA_NOT_EQUAL:
- return $queryBuilder->expr()->neq(sprintf('%s.%s', $this->getColumn(), $this->propToCheckAgainstId), (int) $value);
+ return $queryBuilder->expr()->neq($property, (int) $value);
}
return false;
|
refactor: extract duplicated code
|
whatwedo_TableBundle
|
train
|
php
|
9aa226595d5bb97d36070b00f22915772361e468
|
diff --git a/tests/test_srcset.py b/tests/test_srcset.py
index <HASH>..<HASH> 100644
--- a/tests/test_srcset.py
+++ b/tests/test_srcset.py
@@ -70,7 +70,7 @@ def test_variable_output_quality_default():
# Accumulate the values of the `DPR_QUALITIES` dictionary
# as a `dpr_qualities` list.
- dpr_qualities = [q for q in DPR_QUALITIES.values()]
+ dpr_qualities = sorted([q for q in DPR_QUALITIES.values()], reverse=True)
# Zip the `srclist` and `dpr_qualities` into the pairs
# we expect them to occur in.
|
refactor: reverse sort values in test
|
imgix_imgix-python
|
train
|
py
|
3a8808e2f5a21a408c5be17a319d86d9f8ee9733
|
diff --git a/src/lib/modules/blockchain_connector/index.js b/src/lib/modules/blockchain_connector/index.js
index <HASH>..<HASH> 100644
--- a/src/lib/modules/blockchain_connector/index.js
+++ b/src/lib/modules/blockchain_connector/index.js
@@ -454,7 +454,7 @@ class BlockchainConnector {
(req, res) => {
const signer = req.body.address;
const message = req.body.message;
- this.web3.eth.personal.sign(message, signer).then(signature => {
+ this.web3.eth.sign(message, signer).then(signature => {
res.send({signer, signature, message});
}).catch(e => res.send({ error: e.message }));
}
|
fix: allow message signing with wallet address
|
embark-framework_embark
|
train
|
js
|
3e2a0a0205e9eb69c64d8d89cc1f2241fa16da4e
|
diff --git a/src/commands/functions/invoke.js b/src/commands/functions/invoke.js
index <HASH>..<HASH> 100644
--- a/src/commands/functions/invoke.js
+++ b/src/commands/functions/invoke.js
@@ -63,10 +63,18 @@ class FunctionsInvokeCommand extends Command {
// https://www.netlify.com/docs/functions/#identity-event-functions
body.event = parts[1]
body.user = {
+ id: '1111a1a1-a11a-1111-aa11-aaa11111a11a',
+ aud: '',
+ role: '',
email: 'foo@trust-this-company.com',
+ app_metadata: {
+ provider: 'email',
+ },
user_metadata: {
- TODO: 'mock our netlify identity user data better',
+ full_name: 'Test Person',
},
+ created_at: new Date(Date.now()).toISOString(),
+ update_at: new Date(Date.now()).toISOString(),
}
} else {
// non identity functions seem to have a different shape
|
feat(functions): mock identity response with properly-shaped data (#<I>)
|
netlify_cli
|
train
|
js
|
a87591b8d5cffc5041fedcb654be2fadfb6dd78f
|
diff --git a/src/index.js b/src/index.js
index <HASH>..<HASH> 100644
--- a/src/index.js
+++ b/src/index.js
@@ -31,6 +31,7 @@ const REGEX_VERSION = /(\d+\.)?(\d+\.)?(\*|\d+)/;
exports.collection = Interface.collection;
exports.ensureAuthenticated = Interface.ensureAuthenticated;
+exports.errorHandler = () => Interface.errorHandler({ logger: Interface.logger });
exports.StatSerializer = Interface.StatSerializer;
exports.ResourceSerializer = Interface.ResourceSerializer;
exports.ResourceDeserializer = Interface.ResourceDeserializer;
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
@@ -9,6 +9,13 @@ describe('index', () => {
expect(forestExpressSequelize.collection).toBeInstanceOf(Function);
});
+ it('should export an errorHandler middleware', () => {
+ expect.assertions(2);
+
+ expect(forestExpressSequelize.errorHandler).toBeDefined();
+ expect(forestExpressSequelize.errorHandler).toBeInstanceOf(Function);
+ });
+
it('should export an ensureAuthenticated middleware', () => {
expect.assertions(2);
|
fix: export error handler middleware (#<I>)
|
ForestAdmin_forest-express-sequelize
|
train
|
js,js
|
3addf51f1e6c4d78003fbd954b6bc9fad64254a6
|
diff --git a/packages/node_modules/@webex/internal-plugin-presence/src/presence.js b/packages/node_modules/@webex/internal-plugin-presence/src/presence.js
index <HASH>..<HASH> 100644
--- a/packages/node_modules/@webex/internal-plugin-presence/src/presence.js
+++ b/packages/node_modules/@webex/internal-plugin-presence/src/presence.js
@@ -34,11 +34,15 @@ const Presence = WebexPlugin.extend({
},
/**
- * Initialize and listen to the presence worker for incoming presence updates.
+ * Initialize the presence worker for client
* @returns {undefined}
*/
- listen() {
- this.worker.initialize(this.webex);
+ initialize() {
+ this.webex.once('ready', () => {
+ if (this.config.initializeWorker) {
+ this.worker.initialize(this.webex);
+ }
+ });
},
/**
|
feat(presence): initialize worker off config setting
|
webex_spark-js-sdk
|
train
|
js
|
6e205e9e8381f0e0effe0f177f690be072a60577
|
diff --git a/modules/create-router.js b/modules/create-router.js
index <HASH>..<HASH> 100644
--- a/modules/create-router.js
+++ b/modules/create-router.js
@@ -123,15 +123,17 @@ function createRouter(routes, opts = {}, deps={}) {
setProp('name', name);
setProp('params', params);
setProp('path', path);
- stateId += 1;
- setProp('id', stateId);
+
if (metaParams || source) {
const meta = { params: metaParams };
if (source) meta.source = source;
setProp('meta', meta);
+ stateId += 1;
+ setProp('id', stateId);
}
+
return state;
}
|
refactor: assign id to state objects only if meta provided
|
router5_router5
|
train
|
js
|
cf5bf8e5be4cf42754cb61d36ee5dee8530e9f35
|
diff --git a/packages/starrating/src/react/__specs__/storyshots.spec.js b/packages/starrating/src/react/__specs__/storyshots.spec.js
index <HASH>..<HASH> 100644
--- a/packages/starrating/src/react/__specs__/storyshots.spec.js
+++ b/packages/starrating/src/react/__specs__/storyshots.spec.js
@@ -1,13 +1,3 @@
import initStoryshots from '@storybook/addon-storyshots'
-jest.mock('react-dom', () => {
- return {
- render: () => null,
- unmountComponentAtNode: () => null,
- findDOMNode: () => {
- return {}
- }
- }
-})
-
initStoryshots()
|
test(starrating): simplify test setup
|
pluralsight_design-system
|
train
|
js
|
55d0371b92e3de9d636e63b47ca25eb6978d71ee
|
diff --git a/superset/db_engine_specs/gsheets.py b/superset/db_engine_specs/gsheets.py
index <HASH>..<HASH> 100644
--- a/superset/db_engine_specs/gsheets.py
+++ b/superset/db_engine_specs/gsheets.py
@@ -32,7 +32,7 @@ class GSheetsEngineSpec(SqliteEngineSpec):
engine = "gsheets"
engine_name = "Google Sheets"
- allows_joins = False
+ allows_joins = True
allows_subqueries = True
custom_errors: Dict[Pattern[str], Tuple[str, SupersetErrorType, Dict[str, Any]]] = {
|
fix: GSheets supports JOINs (#<I>)
|
apache_incubator-superset
|
train
|
py
|
e9feebfb650a59bdd70fbb1d1b7e12ffe36025fd
|
diff --git a/test/normalize-options.test.js b/test/normalize-options.test.js
index <HASH>..<HASH> 100644
--- a/test/normalize-options.test.js
+++ b/test/normalize-options.test.js
@@ -570,7 +570,6 @@ describe("normalize options", () => {
webpackConfig = require("./fixtures/multi-compiler-one-configuration/webpack.config");
if (Array.isArray(item.webpackConfig)) {
- // eslint-disable-next-line no-shadow
webpackConfig = item.webpackConfig.map((config, index) => {
return { ...webpackConfig[index], ...config };
});
|
chore: fix lint warning (#<I>)
|
webpack_webpack-dev-server
|
train
|
js
|
b336ff651c1d92bf6f796dfb98fcbe46a1a29e37
|
diff --git a/memote/suite/cli/runner.py b/memote/suite/cli/runner.py
index <HASH>..<HASH> 100644
--- a/memote/suite/cli/runner.py
+++ b/memote/suite/cli/runner.py
@@ -258,7 +258,12 @@ def history(model, solver, location, pytest_args, commits, skip,
history.build_branch_structure()
for commit in history.iter_commits():
repo.git.checkout(commit)
- # TODO: Skip this commit if model was not touched.
+ modified = {blob[0] for blob in repo.index.entries}
+ if model not in modified:
+ LOGGER.info(
+ "The model was not modified in commit '{}'. Skipping.".format(
+ commit))
+ continue
LOGGER.info(
"Running the test suite for commit '{}'.".format(commit))
proc = Process(
|
feat: skip commits in history
Commits in git history in which the model was not modified are
uninteresting and will be skipped.
|
opencobra_memote
|
train
|
py
|
b16721ebdce9c008d6b733b6cd73722d16f70106
|
diff --git a/biz/index.js b/biz/index.js
index <HASH>..<HASH> 100644
--- a/biz/index.js
+++ b/biz/index.js
@@ -4,6 +4,7 @@ var util = require('../lib/util');
var HTTP_PROXY_RE = /^(?:proxy|http-proxy|http2https-proxy|https2http-proxy|internal-proxy):\/\//;
var INTERNAL_APP;
+var WEBUI_PATH;
var PLUGIN_RE;
function convertToLocalUIHost(req, isInternal) {
@@ -14,7 +15,7 @@ function convertToLocalUIHost(req, isInternal) {
module.exports = function(req, res, next) {
var config = this.config;
var pluginMgr = this.pluginMgr;
- var WEBUI_PATH = config.WEBUI_PATH;
+ WEBUI_PATH = config.WEBUI_PATH;
if (!INTERNAL_APP) {
var webuiPathRe = util.escapeRegExp(WEBUI_PATH);
INTERNAL_APP = new RegExp('^' + webuiPathRe + '(log|weinre)\\.(\\d{1,5})/');
|
refactor: the webui url
|
avwo_whistle
|
train
|
js
|
e43c809c1db5bf5be560bd607150befb65668b43
|
diff --git a/vyper/context/types/meta/interface.py b/vyper/context/types/meta/interface.py
index <HASH>..<HASH> 100644
--- a/vyper/context/types/meta/interface.py
+++ b/vyper/context/types/meta/interface.py
@@ -37,6 +37,9 @@ class InterfaceDefinition(MemberTypeDefinition):
for key, type_ in members.items():
self.add_member(key, type_)
+ def get_signature(self):
+ return (), AddressDefinition()
+
class InterfacePrimitive:
|
fix: return address in interface `get_signature`
|
ethereum_vyper
|
train
|
py
|
52f049179c322e379d342f3fc195f1a8c978236f
|
diff --git a/source/index.js b/source/index.js
index <HASH>..<HASH> 100644
--- a/source/index.js
+++ b/source/index.js
@@ -60,17 +60,6 @@ function DotCfg(namespace, scope, strategy) {
}
/**
- * Static methods
- */
-DotCfg.strategy = dotStrategyDefault;
-DotCfg.assign = assignStrategy;
-DotCfg.normalize = normalize;
-DotCfg.resolver = resolver;
-DotCfg.resolve = resolve;
-DotCfg.write = write;
-DotCfg.read = read;
-
-/**
* Public methods and properties.
*/
DotCfg.prototype = {
@@ -138,4 +127,15 @@ DotCfg.prototype = {
},
};
+/**
+ * Static methods
+ */
+DotCfg.strategy = dotStrategyDefault;
+DotCfg.assign = assignStrategy;
+DotCfg.normalize = normalize;
+DotCfg.resolver = resolver;
+DotCfg.resolve = resolve;
+DotCfg.write = write;
+DotCfg.read = read;
+
export default DotCfg;
|
chore: recursive option to normalize
|
adriancmiranda_dotcfg
|
train
|
js
|
5b6ad39bef5c4cceb9f0f32ed2eb76ebc09c1876
|
diff --git a/tests/integrations/flask/test_flask.py b/tests/integrations/flask/test_flask.py
index <HASH>..<HASH> 100644
--- a/tests/integrations/flask/test_flask.py
+++ b/tests/integrations/flask/test_flask.py
@@ -26,6 +26,7 @@ def app():
app.logger.setLevel(logging.DEBUG)
handler = SentryHandler()
handler.setLevel(logging.DEBUG)
+ app.logger.handlers = []
app.logger.addHandler(handler)
login_manager.init_app(app)
|
chore: fix flask tests again
|
getsentry_sentry-python
|
train
|
py
|
b4967e683663c66e5a18fbba680278254174167a
|
diff --git a/pippo-core/src/main/java/ro/pippo/core/Request.java b/pippo-core/src/main/java/ro/pippo/core/Request.java
index <HASH>..<HASH> 100644
--- a/pippo-core/src/main/java/ro/pippo/core/Request.java
+++ b/pippo-core/src/main/java/ro/pippo/core/Request.java
@@ -434,6 +434,14 @@ public final class Request {
return httpServletRequest.getHeaders(name);
}
+ /**
+ * Wrapper function to get all request header names
+ * @return the enumerator for request headers
+ */
+ public Enumeration<String> getHeaderNames() {
+ return httpServletRequest.getHeaderNames();
+ }
+
public boolean isSecure() {
return httpServletRequest.isSecure();
}
|
feat: add wrapper method to get header names (#<I>)
|
pippo-java_pippo
|
train
|
java
|
aae994402b1b16a2bca4a486dad4bb452770eb26
|
diff --git a/tests/pipeline/test_provider_healthcheck.py b/tests/pipeline/test_provider_healthcheck.py
index <HASH>..<HASH> 100644
--- a/tests/pipeline/test_provider_healthcheck.py
+++ b/tests/pipeline/test_provider_healthcheck.py
@@ -6,6 +6,6 @@ TEST_SETTINGS = {'app': {'eureka_enabled': False}, 'asg': {'provider_healthcheck
def test_provider_healthcheck():
"""Make sure default Provider Health Check works."""
- provider_healthcheck, has_provider_healthcheck = check_provider_healthcheck(settings=TEST_SETTINGS)
- assert provider_healthcheck == []
- assert has_provider_healthcheck == False
+ health_checks = check_provider_healthcheck(settings=TEST_SETTINGS)
+ assert health_checks.providers == []
+ assert health_checks.has_healthcheck == False
|
test: Update Provider Health Check sanity
See also: PSOBAT-<I>
|
foremast_foremast
|
train
|
py
|
5d65fc8da0fa8e01c318113ed51d2007581fcaf6
|
diff --git a/smoketests/helpers.js b/smoketests/helpers.js
index <HASH>..<HASH> 100644
--- a/smoketests/helpers.js
+++ b/smoketests/helpers.js
@@ -98,7 +98,7 @@ const runTestStdout = ({ packageName, cliArgs, logMessage, isSubPackage } = {})
const timeout = setTimeout(() => {
console.log(" timeout: killing process");
proc.kill();
- }, 30000);
+ }, 60000);
let hasPassed = false;
|
test: increase timeout (#<I>)
|
webpack_webpack-cli
|
train
|
js
|
0c5e1c138d41ee96e5e52951536f428c35e93e23
|
diff --git a/src/api/index.js b/src/api/index.js
index <HASH>..<HASH> 100644
--- a/src/api/index.js
+++ b/src/api/index.js
@@ -114,6 +114,11 @@ export function update(links, id, value, name, config) {
export function submit(href) {
const data = state.get().drafts[href]
- requestResource({ data, href, method: 'post', resourceKey: 'current' })
- state.get().drafts.remove(href)
+ requestResource({
+ data,
+ href,
+ method: 'post',
+ resourceKey: 'current',
+ onDone: () => state.get().drafts.remove(href),
+ })
}
|
fix: Clear submit draft after successful request
|
cignium_hypermedia-client
|
train
|
js
|
dc65cd7a7a360b1d6a61cb05386b8e7f0c749e6b
|
diff --git a/src/processor/intents/invader-core/stronghold/stronghold.js b/src/processor/intents/invader-core/stronghold/stronghold.js
index <HASH>..<HASH> 100644
--- a/src/processor/intents/invader-core/stronghold/stronghold.js
+++ b/src/processor/intents/invader-core/stronghold/stronghold.js
@@ -77,6 +77,7 @@ const deployStronghold = function deployStronghold(context) {
nextDecayTime: decayTime
};
+ let createdStructureCounter = 1;
_.forEach(template.structures, i => {
const x = 0+core.x+i.dx, y = 0+core.y+i.dy;
const objectsToRemove =_.filter(roomObjects, o => !o.strongholdId && o.x == x && o.y == y);
@@ -113,6 +114,8 @@ const deployStronghold = function deployStronghold(context) {
}
bulk.insert(s);
+ roomObjects['deployedStructure'+createdStructureCounter] = s;
+ createdStructureCounter++;
});
}
};
|
fix(processor): stronghold deploying move fix
DEV-<I>
|
screeps_engine
|
train
|
js
|
a2f7f132f241936057b890907be6d69695e0bb0a
|
diff --git a/packages/graphiql/src/utility/commonKeys.js b/packages/graphiql/src/utility/commonKeys.js
index <HASH>..<HASH> 100644
--- a/packages/graphiql/src/utility/commonKeys.js
+++ b/packages/graphiql/src/utility/commonKeys.js
@@ -1,4 +1,8 @@
-const isMacOs = window.navigator.platform === 'MacIntel';
+let isMacOs = false
+
+if (typeof window === Object) {
+ isMacOs = window.navigator.platform === 'MacIntel';
+}
const commonKeys = {
// Persistent search box in Query Editor
|
fix:(graphiql) - for SSR, regression from extraKeys bugfix, fixes #<I>
- dont expect window to be present for extraKeys MacOs detection logic
- use existing graphiql convention for detecting the presence of window
|
graphql_graphiql
|
train
|
js
|
72b7324ebda9f1feab02751ac04bb5bc6a780606
|
diff --git a/src/components/VStepper/VStepper.js b/src/components/VStepper/VStepper.js
index <HASH>..<HASH> 100644
--- a/src/components/VStepper/VStepper.js
+++ b/src/components/VStepper/VStepper.js
@@ -75,10 +75,9 @@ export default {
this.content = []
for (let index = 0; index < this.$children.length; index++) {
const child = this.$children[index]
- // TODO: use the component name instead of tag
- if (child.$options._componentTag === 'v-stepper-step') {
+ if (child.$options.name === 'v-stepper-step') {
this.steps.push(child)
- } else if (child.$options._componentTag === 'v-stepper-content') {
+ } else if (child.$options.name === 'v-stepper-content') {
child.isVertical = this.vertical
this.content.push(child)
}
|
fix(VStepper): Use name instead of tag name (#<I>)
|
vuetifyjs_vuetify
|
train
|
js
|
7a95f8f8399579673d23c91c57fb637292324cfe
|
diff --git a/tests/reports/commands_tests.py b/tests/reports/commands_tests.py
index <HASH>..<HASH> 100644
--- a/tests/reports/commands_tests.py
+++ b/tests/reports/commands_tests.py
@@ -806,9 +806,9 @@ def test_report_schedule_working_timeout(create_report_slack_chart_working):
logs = db.session.query(ReportExecutionLog).all()
# Two logs, first is created by fixture
assert len(logs) == 2
- assert logs[1].error_message == ReportScheduleWorkingTimeoutError.message
- assert logs[1].state == ReportState.ERROR
-
+ assert ReportScheduleWorkingTimeoutError.message in [
+ log.error_message for log in logs
+ ]
assert create_report_slack_chart_working.last_state == ReportState.ERROR
|
fix: flaky test on reports (#<I>)
|
apache_incubator-superset
|
train
|
py
|
81985a78a33c71d15bdadee1c691593747bc454c
|
diff --git a/components/typography/mdc-typography.js b/components/typography/mdc-typography.js
index <HASH>..<HASH> 100644
--- a/components/typography/mdc-typography.js
+++ b/components/typography/mdc-typography.js
@@ -82,7 +82,7 @@ export const mdcText = {
export const mdcDisplay = {
name: 'mdc-display',
mixins: [
- mdcTypoMixin('mdc-headline'),
+ mdcTypoMixin('mdc-display'),
mdcTypoPropMixin('h1', 'headline4', [
'headline4',
'headline3',
|
fix(typography): fix mdc-display class name
|
stasson_vue-mdc-adapter
|
train
|
js
|
b8e1fb97b7d66f412dcbd5ead151c80bd3370d8a
|
diff --git a/src/index.js b/src/index.js
index <HASH>..<HASH> 100644
--- a/src/index.js
+++ b/src/index.js
@@ -72,6 +72,8 @@ export class DefaultLoader extends Loader {
}
}
+PLATFORM.Loader = DefaultLoader;
+
if (!PLATFORM.global.System || !PLATFORM.global.System.import) {
if (PLATFORM.global.requirejs && requirejs.s && requirejs.s.contexts && requirejs.s.contexts._ && requirejs.s.contexts._.defined) {
let defined = requirejs.s.contexts._.defined;
|
feat(index): ensure that DefaultLoader is set as the platfrom loader
|
aurelia_loader-default
|
train
|
js
|
85861ef7fa7850aff0a99e28b8bf39e4e6823958
|
diff --git a/packages/xod-client/src/project/actions.js b/packages/xod-client/src/project/actions.js
index <HASH>..<HASH> 100644
--- a/packages/xod-client/src/project/actions.js
+++ b/packages/xod-client/src/project/actions.js
@@ -8,7 +8,7 @@ export const createProject = (projectName) => ({
type: ActionType.PROJECT_CREATE,
payload: {
name: projectName,
- mainPatchId: core.generateId(),
+ mainPatchId: `@/${core.generateId()}`,
},
});
|
fix(xod-client): fix id of mainPatch on creating new project
|
xodio_xod
|
train
|
js
|
277be842bf30848e7292a931169bd4c8ff726dee
|
diff --git a/lib/git/cmd.py b/lib/git/cmd.py
index <HASH>..<HASH> 100644
--- a/lib/git/cmd.py
+++ b/lib/git/cmd.py
@@ -51,11 +51,11 @@ class Git(MethodMissingMixin):
return self.git_dir
def execute(self, command,
- istream = None,
- with_status = False,
- with_stderr = False,
- with_exceptions = False,
- with_raw_output = False,
+ istream=None,
+ with_status=False,
+ with_stderr=False,
+ with_exceptions=False,
+ with_raw_output=False,
):
"""
Handles executing the command on the shell and consumes and returns
@@ -96,10 +96,10 @@ class Git(MethodMissingMixin):
# Start the process
proc = subprocess.Popen(command,
- cwd = self.git_dir,
- stdin = istream,
- stderr = stderr,
- stdout = subprocess.PIPE
+ cwd=self.git_dir,
+ stdin=istream,
+ stderr=stderr,
+ stdout=subprocess.PIPE
)
# Wait for the process to return
|
style: follow PEP 8 in git/cmd.py
Keyword args shouldn't use spaces around the equals sign
per PEP 8.
|
gitpython-developers_GitPython
|
train
|
py
|
2ba0a4369af0860975250b5fd3d81c563822a6a1
|
diff --git a/workflow/controller/workflowpod.go b/workflow/controller/workflowpod.go
index <HASH>..<HASH> 100644
--- a/workflow/controller/workflowpod.go
+++ b/workflow/controller/workflowpod.go
@@ -535,6 +535,14 @@ func (woc *wfOperationCtx) createEnvVars() []apiv1.EnvVar {
Name: common.EnvVarContainerRuntimeExecutor,
Value: woc.getContainerRuntimeExecutor(),
},
+ // This flag was introduced in Go 15 and will be removed in Go 16.
+ // x509: cannot validate certificate for ... because it doesn't contain any IP SANs
+ // https://github.com/argoproj/argo-workflows/issues/5563 - Upgrade to Go 16
+ // https://github.com/golang/go/issues/39568
+ {
+ Name: "GODEBUG",
+ Value: "x509ignoreCN=0",
+ },
}
if woc.controller.Config.Executor != nil {
execEnvVars = append(execEnvVars, woc.controller.Config.Executor.Env...)
|
fix(executor): GODEBUG=x<I>ignoreCN=0 (#<I>)
|
argoproj_argo
|
train
|
go
|
3a95492c488adca5bb509392978947d2e2c52905
|
diff --git a/test/helpers/kubectl.go b/test/helpers/kubectl.go
index <HASH>..<HASH> 100644
--- a/test/helpers/kubectl.go
+++ b/test/helpers/kubectl.go
@@ -3089,6 +3089,10 @@ func (kub *Kubectl) ValidateNoErrorsInLogs(duration time.Duration) {
// ValidateListOfErrorsInLogs is similar to ValidateNoErrorsInLogs, but
// takes a blacklist of bad log messages instead of using the default list.
func (kub *Kubectl) ValidateListOfErrorsInLogs(duration time.Duration, blacklist map[string][]string) {
+ if kub == nil {
+ // if `kub` is nil, this is run after the test failed while setting up `kub` and we are unable to gather logs
+ return
+ }
ctx, cancel := context.WithTimeout(context.Background(), 1*time.Minute)
defer cancel()
|
test: don't check logs if kubectl is nil
Added a nil check in log check function since it can be run after test
failed due to kubectl failing to set up, resulting in a panic.
|
cilium_cilium
|
train
|
go
|
537b1af187d18334236e890c018da03dd9a9c4ad
|
diff --git a/ibis/backends/impala/tests/test_connection_pool.py b/ibis/backends/impala/tests/test_connection_pool.py
index <HASH>..<HASH> 100644
--- a/ibis/backends/impala/tests/test_connection_pool.py
+++ b/ibis/backends/impala/tests/test_connection_pool.py
@@ -8,7 +8,10 @@ def test_connection_pool_size(hdfs, env, test_data_db):
host=env.impala_host,
database=test_data_db,
)
- assert len(client.con.connection_pool) == 1
+
+ # the client cursor may or may not be GC'd, so the connection
+ # pool will contain either zero or one cursor
+ assert len(client.con.connection_pool) in (0, 1)
def test_connection_pool_size_after_close(hdfs, env, test_data_db):
|
test: fix incorrect connection pool test (#<I>)
|
ibis-project_ibis
|
train
|
py
|
d81c2c442948b94e9dab30dfe336ca4f2351c79e
|
diff --git a/packages/cerebral-forms/src/factories/validateField.js b/packages/cerebral-forms/src/factories/validateField.js
index <HASH>..<HASH> 100644
--- a/packages/cerebral-forms/src/factories/validateField.js
+++ b/packages/cerebral-forms/src/factories/validateField.js
@@ -9,8 +9,6 @@ export default function validateFieldFactory (pathTemplate) {
const form = context.state.get(formPath)
const validationResult = runValidation(field, form)
- context.state.merge(fieldPath, validationResult)
-
let dependentFields = []
if (Array.isArray(field.dependsOn)) {
dependentFields = field.dependsOn
|
refactor(forms): remove unnecessary merge from validateField (#<I>)
|
cerebral_cerebral
|
train
|
js
|
104f9efd6040a7755f0253c801862dcffc6aa377
|
diff --git a/src/Views.php b/src/Views.php
index <HASH>..<HASH> 100644
--- a/src/Views.php
+++ b/src/Views.php
@@ -343,7 +343,7 @@ class Views
public function remember($lifetime = null)
{
$this->shouldCache = true;
- $this->cacheLifetiem = $lifetime;
+ $this->cacheLifetime = $lifetime;
return $this;
}
|
fix(remember): update property assignment (typo)
`$this->cacheLifetiem` --> `$this->cacheLifetime`
|
cyrildewit_eloquent-viewable
|
train
|
php
|
2cb8405736ca2a88954b0575a9df627fff72a1cc
|
diff --git a/src/wait-for.js b/src/wait-for.js
index <HASH>..<HASH> 100644
--- a/src/wait-for.js
+++ b/src/wait-for.js
@@ -94,7 +94,7 @@ function waitFor(
if (!usingFakeTimers) {
clearInterval(intervalId)
- setImmediate(() => observer.disconnect())
+ observer.disconnect()
}
if (error) {
|
fix: Disconnect MutationObserver synchronously in wait-for (#<I>)
* Disconnect MutationObserver synchronously in wait-for
* Revert the pre-commit change to be able to commit
* Remove legacy disconnect
|
testing-library_dom-testing-library
|
train
|
js
|
3f42562de766a90f35ffa9a9efd1234814ad390c
|
diff --git a/dist/vue.js b/dist/vue.js
index <HASH>..<HASH> 100644
--- a/dist/vue.js
+++ b/dist/vue.js
@@ -83,7 +83,7 @@ function toString (val) {
}
/**
- * Convert a input value to a number for persistence.
+ * Convert an input value to a number for persistence.
* If the conversion fails, return original string.
*/
function toNumber (val) {
|
chore: fix comment typo (#<I>)
correct "a input" to "an input"
|
kaola-fed_megalo
|
train
|
js
|
601915cede0b0e64aaf55458047e2031b16d2505
|
diff --git a/wireprotocol/3_2_support.js b/wireprotocol/3_2_support.js
index <HASH>..<HASH> 100644
--- a/wireprotocol/3_2_support.js
+++ b/wireprotocol/3_2_support.js
@@ -329,6 +329,11 @@ WireProtocol.prototype.getMore = function(
queryOptions.session = cursorState.session;
}
+ // We need to increment the statement id if we're in a transaction
+ if (options.session && options.session.inTransaction()) {
+ incrementStatementId(options.session);
+ }
+
// Write out the getMore command
connection.write(query, queryOptions, queryCallback);
};
|
refactor(wire-protocol): ensure stmtId is incremented on getMore
|
mongodb_node-mongodb-native
|
train
|
js
|
74161992e1010fbf687d57cc285c2c3dd7ffa752
|
diff --git a/test/fixture/nuxt.config.js b/test/fixture/nuxt.config.js
index <HASH>..<HASH> 100644
--- a/test/fixture/nuxt.config.js
+++ b/test/fixture/nuxt.config.js
@@ -54,7 +54,5 @@ module.exports = {
method: 'GET'
}
]
- },
-
-
+ }
}
|
chore: fix lint issues
|
nuxt-community_pwa-module
|
train
|
js
|
88732b694068704cb151e0c4256a8e8d1adaff38
|
diff --git a/git/cmd.py b/git/cmd.py
index <HASH>..<HASH> 100644
--- a/git/cmd.py
+++ b/git/cmd.py
@@ -254,14 +254,15 @@ class Git(LazyMixin):
proc.terminate()
proc.wait() # ensure process goes away
except OSError as ex:
- log.info("Ignored error after process has dies: %r", ex)
+ log.info("Ignored error after process had died: %r", ex)
pass # ignore error when process already died
except AttributeError:
# try windows
# for some reason, providing None for stdout/stderr still prints something. This is why
# we simply use the shell and redirect to nul. Its slower than CreateProcess, question
# is whether we really want to see all these messages. Its annoying no matter what.
- call(("TASKKILL /F /T /PID %s 2>nul 1>nul" % str(proc.pid)), shell=True)
+ if is_win:
+ call(("TASKKILL /F /T /PID %s 2>nul 1>nul" % str(proc.pid)), shell=True)
# END exception handling
def __getattr__(self, attr):
|
fix(cmd): don't try to use TASKKILL on linux
Fixes #<I>
|
gitpython-developers_GitPython
|
train
|
py
|
4915c84765d904f610c4f7ee3d8b112d2e4b72cd
|
diff --git a/views/js/qtiCreator/widgets/interactions/hottextInteraction/states/Question.js b/views/js/qtiCreator/widgets/interactions/hottextInteraction/states/Question.js
index <HASH>..<HASH> 100755
--- a/views/js/qtiCreator/widgets/interactions/hottextInteraction/states/Question.js
+++ b/views/js/qtiCreator/widgets/interactions/hottextInteraction/states/Question.js
@@ -95,7 +95,8 @@ define([
data: {
container: container,
widget: _widget
- }
+ },
+ qtiInclude: false
});
}
};
|
fix: Remove shared stimulus toolbar icon in hottext interaction
|
oat-sa_extension-tao-itemqti
|
train
|
js
|
877c0fc973680e6dcfcd64f8d67d832eaceebd55
|
diff --git a/karma-ng.conf.js b/karma-ng.conf.js
index <HASH>..<HASH> 100644
--- a/karma-ng.conf.js
+++ b/karma-ng.conf.js
@@ -199,10 +199,6 @@ function makeConfig(packageName, argv) {
'*.ciscospark.com'
],
tunnelDomains: [
- 'whistler-prod.onint.ciscospark.com',
- 'whistler.onint.ciscospark.com',
- 'internal-testing-services.wbx2.com',
- 'calendar-whistler.onint.ciscospark.com',
'127.0.0.1',
'localhost'
],
diff --git a/wdio.conf.js b/wdio.conf.js
index <HASH>..<HASH> 100644
--- a/wdio.conf.js
+++ b/wdio.conf.js
@@ -513,10 +513,6 @@ exports.config = {
'*.ciscospark.com'
],
tunnelDomains: [
- 'whistler-prod.onint.ciscospark.com',
- 'whistler.onint.ciscospark.com',
- 'internal-testing-services.wbx2.com',
- 'calendar-whistler.onint.ciscospark.com',
'127.0.0.1',
'localhost'
],
|
chore(saucelabs): tunnelDomain fixup [skip ci]
|
webex_spark-js-sdk
|
train
|
js,js
|
61f824798c65b00721bda812228c5357e83bbcd7
|
diff --git a/karma.conf.js b/karma.conf.js
index <HASH>..<HASH> 100644
--- a/karma.conf.js
+++ b/karma.conf.js
@@ -34,7 +34,7 @@ colors = true;
// level of logging
// possible values: LOG_DISABLE || LOG_ERROR || LOG_WARN || LOG_INFO || LOG_DEBUG
-logLevel = LOG_DEBUG;
+logLevel = LOG_INFO;
// enable / disable watching file and executing tests whenever any file changes
autoWatch = true;
|
test: Use log level of INFO for karma
|
jtrussell_angular-snap.js
|
train
|
js
|
ecaa8355f76d9bd9ea12392b557254b743548600
|
diff --git a/packages/manifest/index.js b/packages/manifest/index.js
index <HASH>..<HASH> 100755
--- a/packages/manifest/index.js
+++ b/packages/manifest/index.js
@@ -1,10 +1,18 @@
const hash = require('hash-sum')
+const debug = require('debug')('nuxt:pwa:manifest')
const fixUrl = url => url.replace(/\/\//g, '/').replace(':/', '://')
const isUrl = url => url.indexOf('http') === 0 || url.indexOf('//') === 0
const find = (arr, key, val) => arr.find(obj => val ? obj[key] === val : obj[key])
module.exports = function nuxtManifest (options) {
+ this.nuxt.plugin('build', builder => {
+ debug('Adding manifest')
+ addManifest.call(this, options)
+ })
+}
+
+function addManifest (options) {
// routerBase and publicPath
const routerBase = this.options.router.base
let publicPath = fixUrl(`${routerBase}/${this.options.build.publicPath}`)
|
fix(manifest): run only on build
|
nuxt-community_pwa-module
|
train
|
js
|
dcc9e27a5c419edaecab09ce334e6c5432c4cb7c
|
diff --git a/runtime/browser-sprite.js b/runtime/browser-sprite.js
index <HASH>..<HASH> 100644
--- a/runtime/browser-sprite.js
+++ b/runtime/browser-sprite.js
@@ -3,10 +3,27 @@ import domready from 'domready';
const sprite = new BrowserSprite();
+const loadSprite = () => {
+ const svg = sprite.mount(document.body, true);
+
+ // :WORKAROUND:
+ // IE doesn't evaluate <style> tags in SVGs that are dynamically added to the page.
+ // This trick will trigger IE to read and use any existing SVG <style> tags.
+ //
+ // Reference: https://github.com/iconic/SVGInjector/issues/23
+ const ua = window.navigator.userAgent || '';
+ if (ua.indexOf('Trident') > 0 || ua.indexOf('Edge/') > 0) {
+ const styles = svg.querySelectorAll('style');
+ for (let i = 0, l = styles.length; i < l; i += 1) {
+ styles[i].textContent += '';
+ }
+ }
+};
+
if (document.body) {
- sprite.mount(document.body, true);
+ loadSprite();
} else {
- domready(() => sprite.mount(document.body, true));
+ domready(loadSprite);
}
export default sprite;
|
fix(runtime): fix IE/Edge rendering with SVG containing 'style' elements
ISSUES CLOSED: #<I>
|
kisenka_svg-sprite-loader
|
train
|
js
|
818985feafcb0ce2b90dccaa41f6443c27bc1090
|
diff --git a/django_enumfield/tests/test_validators.py b/django_enumfield/tests/test_validators.py
index <HASH>..<HASH> 100644
--- a/django_enumfield/tests/test_validators.py
+++ b/django_enumfield/tests/test_validators.py
@@ -9,7 +9,7 @@ from django_enumfield.validators import validate_available_choice
class ValidatorTest(unittest.TestCase):
def test_validate_available_choice_1(self):
- """Test passing a value non convertable to an int raises an
+ """Test passing a value non convertible to an int raises an
InvalidStatusOperationError
"""
self.assertRaises(
|
docs: Fix simple typo, convertable -> convertible
There is a small typo in django_enumfield/tests/test_validators.py.
Should read `convertible` rather than `convertable`.
|
5monkeys_django-enumfield
|
train
|
py
|
ea70a464319d3b9d9452ad790490bf32d7aa95c5
|
diff --git a/master/buildbot/test/__init__.py b/master/buildbot/test/__init__.py
index <HASH>..<HASH> 100644
--- a/master/buildbot/test/__init__.py
+++ b/master/buildbot/test/__init__.py
@@ -114,6 +114,11 @@ warnings.filterwarnings('ignore', ".*the imp module is deprecated in favour of i
# sqlalchemy-migrate uses deprecated api from sqlalchemy https://review.openstack.org/#/c/648072/
warnings.filterwarnings('ignore', ".*Engine.contextual_connect.*", DeprecationWarning)
+warnings.filterwarnings('ignore', r'.*The Table.exists\(\) method is deprecated.*',
+ DeprecationWarning)
+warnings.filterwarnings('ignore', '.*is already present in table.*',
+ DeprecationWarning)
+
# ignore an attrs API warning for APIs used in dependencies
warnings.filterwarnings('ignore', ".*The usage of `cmp` is deprecated and will be removed "
"on or after.*", DeprecationWarning)
|
test: Ignore deprecation warnings of API used by sqlalchemy-migrate
|
buildbot_buildbot
|
train
|
py
|
58d8a092363e3a219b3fe15a61a57226d84c0eb9
|
diff --git a/packages/docs/themes/cerebral-website/page/__edit/page__edit.bemhtml.js b/packages/docs/themes/cerebral-website/page/__edit/page__edit.bemhtml.js
index <HASH>..<HASH> 100644
--- a/packages/docs/themes/cerebral-website/page/__edit/page__edit.bemhtml.js
+++ b/packages/docs/themes/cerebral-website/page/__edit/page__edit.bemhtml.js
@@ -1,6 +1,6 @@
block('page').elem('edit')(
content()(function () {
- var url = 'https://github.com/cerebral/cerebral/tree/master/packages/docs/content'
+ var url = 'https://github.com/cerebral/cerebral/tree/master/packages/docs/content/'
if (this._layout !== 'root') {
url += this._layout + '/'
|
fix(docs): edit on github link fix (#<I>)
|
cerebral_cerebral
|
train
|
js
|
cd3bb944a0c4eefbd61f2e3d9963e09fb82f7540
|
diff --git a/nfc/dev/transport.py b/nfc/dev/transport.py
index <HASH>..<HASH> 100644
--- a/nfc/dev/transport.py
+++ b/nfc/dev/transport.py
@@ -227,7 +227,8 @@ class USB(object):
self.usb_dev.claimInterface(0)
except self.usb.USBError:
raise IOError("unusable device")
- self.usb_dev.reset()
+ if (dev.idVendor, dev.idProduct) in [(0x54c, 0x193), (0x4cc, 0x531)]:
+ self.usb_dev.reset() # needed for PN531 only
interface = dev.configurations[0].interfaces[0]
endpoints = interface[0].endpoints
bulk_inp = lambda ep: (\
|
fix: usb device reset when using pyusb 0.x is only needed for the PN<I> chip (makes trouble with PN<I>)
|
nfcpy_nfcpy
|
train
|
py
|
d742814686fc2c8dfbdcb582541155cb8df170ac
|
diff --git a/src/util/Util.js b/src/util/Util.js
index <HASH>..<HASH> 100644
--- a/src/util/Util.js
+++ b/src/util/Util.js
@@ -8,7 +8,7 @@ const has = (o, k) => Object.prototype.hasOwnProperty.call(o, k);
const isObject = d => typeof d === 'object' && d !== null;
/**
- * Contains various general-purpose utility methods. These functions are also available on the base `Discord` object.
+ * Contains various general-purpose utility methods.
*/
class Util {
constructor() {
|
docs(Util): methods removed on the base object (#<I>)
|
discordjs_discord.js
|
train
|
js
|
f2cd3fcb2a9b4b108f5ce34a9f121ec13ac1cc16
|
diff --git a/debug.go b/debug.go
index <HASH>..<HASH> 100644
--- a/debug.go
+++ b/debug.go
@@ -16,6 +16,7 @@ func IsDebugging() bool {
return ginMode == debugCode
}
+// DebugPrintRouteFunc indicates debug log output format.
var DebugPrintRouteFunc func(httpMethod, absolutePath, handlerName string, nuHandlers int)
func debugPrintRoute(httpMethod, absolutePath string, handlers HandlersChain) {
diff --git a/routergroup.go b/routergroup.go
index <HASH>..<HASH> 100644
--- a/routergroup.go
+++ b/routergroup.go
@@ -17,7 +17,7 @@ type IRouter interface {
Group(string, ...HandlerFunc) *RouterGroup
}
-// Iroutes defins all router handle interface.
+// IRoutes defines all router handle interface.
type IRoutes interface {
Use(...HandlerFunc) IRoutes
|
chore: fix typo and add a little anotation (#<I>)
|
gin-gonic_gin
|
train
|
go,go
|
13e8e1a2ff85c158a5a94bd33accafdb45cdeb40
|
diff --git a/lib/manager/travis/package.js b/lib/manager/travis/package.js
index <HASH>..<HASH> 100644
--- a/lib/manager/travis/package.js
+++ b/lib/manager/travis/package.js
@@ -41,7 +41,9 @@ async function getPackageUpdates(config) {
config.rangeStrategy === 'pin' ||
isPinnedVersion(config.currentVersion[0])
) {
- const releases = Object.keys((await getDependency('nodejs/node')).versions);
+ const releases = Object.keys(
+ (await getDependency('nodejs/node', { clean: 'true' })).versions
+ );
newVersion = newVersion.map(version =>
maxSatisfyingVersion(releases, version)
);
|
fix: travis get clean versions
|
renovatebot_renovate
|
train
|
js
|
1acc380d035728a73df6ca99fc97bc7251ae8b22
|
diff --git a/src/Testing/Response.php b/src/Testing/Response.php
index <HASH>..<HASH> 100644
--- a/src/Testing/Response.php
+++ b/src/Testing/Response.php
@@ -260,9 +260,10 @@ class Response
* __call
*
* @param string $method
+ * @param array $params
* @return mixed
*/
- public function __call(string $method)
+ public function __call(string $method, array $params = [])
{
if (method_exists($this->parser, $method)) {
return call_user_func([$this->parser, $method]);
|
fix: __call() must take exactly 2 arguments
|
bowphp_framework
|
train
|
php
|
3b26036d67c54d54e183fac7a943b112d972873b
|
diff --git a/lib/types/keywords.js b/lib/types/keywords.js
index <HASH>..<HASH> 100644
--- a/lib/types/keywords.js
+++ b/lib/types/keywords.js
@@ -95,8 +95,7 @@ keywords.coerceTo = {
const inlineTermValidator = (it, keyword, schema) => {
return `
- let $data = data${it.dataLevel || ''};
- if (typeof $data === 'function' && $data.hasOwnProperty('_query')) {
+ if (typeof data${it.dataLevel || ''} === 'function' && data${it.dataLevel || ''}.hasOwnProperty('_query')) {
vErrors = [];
errors = 0;
return true;
|
fix(acceptsTerm): prevent issue with duplicate defined local values
|
mbroadst_thinkagain
|
train
|
js
|
57c3a4a703baaa05e181ff4c85cee14ede4c9f76
|
diff --git a/imgix/urlbuilder.py b/imgix/urlbuilder.py
index <HASH>..<HASH> 100644
--- a/imgix/urlbuilder.py
+++ b/imgix/urlbuilder.py
@@ -208,8 +208,6 @@ class UrlBuilder(object):
srcset_params['dpr'] = dpr
# If variable quality output is _not disabled_, then...
if not disable_variable_quality:
- # Other implementations will use the 'q' or quality value,
- # so will this one, but let's validate the input (if any).
quality = params.get('q', DPR_QUALITIES[dpr])
# Mutate the copy of params; associate the quality value
|
refactor: remove dead comment
This PR removes a dead comment. Prior to this PR, the comment indicated
that there was validation, but validation was suggested to be, and was,
removed from this function. This change updates the comment to describe
the current behavior.
|
imgix_imgix-python
|
train
|
py
|
4968e3ff6d6efcc1031058f1935f9f1bc2a962bf
|
diff --git a/core/src/ons/internal/lazy-repeat.js b/core/src/ons/internal/lazy-repeat.js
index <HASH>..<HASH> 100644
--- a/core/src/ons/internal/lazy-repeat.js
+++ b/core/src/ons/internal/lazy-repeat.js
@@ -121,7 +121,7 @@ export class LazyRepeatProvider {
* @param {LazyRepeatDelegate} delegate
*/
constructor(wrapperElement, delegate) {
- this._wrapperElement = util.validated('wrapperElement', wrapperElement, Element);
+ this._wrapperElement = wrapperElement;
this._delegate = util.validated('delegate', delegate, LazyRepeatDelegate);
if (wrapperElement.tagName.toLowerCase() === 'ons-list') {
|
fix(ons-lazy-repeat): fix Safari issue
|
OnsenUI_OnsenUI
|
train
|
js
|
0e2ec3ef248d1892acbb114faf3ceb7dcd32457e
|
diff --git a/test/core/targets/simple.js b/test/core/targets/simple.js
index <HASH>..<HASH> 100644
--- a/test/core/targets/simple.js
+++ b/test/core/targets/simple.js
@@ -21,7 +21,7 @@ let COOKIES = {};
const users = {
leo: {
name: 'leo',
- password: '$2a$10$iqJSHD.BGr0E2IxQwYgJmeP3NvhPrXAeLSaGCj6IR/XU5QtjVu5Tm', // 'secret'
+ password: 'secret',
id: '1'
}
};
|
fix(tests): Remove bcrypt-encoded password
|
artilleryio_artillery
|
train
|
js
|
8718efdc5d3e47c6bedd2aaf282ebdb078e71337
|
diff --git a/plugins/highlight/trumbowyg.highlight.js b/plugins/highlight/trumbowyg.highlight.js
index <HASH>..<HASH> 100644
--- a/plugins/highlight/trumbowyg.highlight.js
+++ b/plugins/highlight/trumbowyg.highlight.js
@@ -64,7 +64,10 @@
},
pt_br: {
highlight: 'Realçar sintaxe de código'
- }
+ },
+ ko: {
+ highlight: '코드 문법 하이라이트'
+ },
},
// Add our plugin to Trumbowyg registred plugins
plugins: {
|
feat: add korean translation to highlight plugin
|
Alex-D_Trumbowyg
|
train
|
js
|
280c9a9612af59ee652713a62ea5885deba32626
|
diff --git a/bids/layout/writing.py b/bids/layout/writing.py
index <HASH>..<HASH> 100644
--- a/bids/layout/writing.py
+++ b/bids/layout/writing.py
@@ -137,7 +137,8 @@ def build_path(entities, path_patterns, strict=False):
for v in values.split('|'):
valid_values += _expand_options(v)
- if entities[name] not in valid_values:
+ ent_set = entities.get(name)
+ if ent_set is not None and ent_set not in valid_values:
continue
# Expanding options here preempts picking them again later
|
fix: allow for entities not to be defined
|
bids-standard_pybids
|
train
|
py
|
680fe6997e4bf5239c44ea2b2c80b1fed6082bf0
|
diff --git a/packages/site/src/ui/side-nav.js b/packages/site/src/ui/side-nav.js
index <HASH>..<HASH> 100644
--- a/packages/site/src/ui/side-nav.js
+++ b/packages/site/src/ui/side-nav.js
@@ -371,7 +371,6 @@ export default withHeadings(props => (
overflow-x: hidden;
overflow-y: auto;
transition: transform ${core.motion.speedXFast} ease-in-out;
- z-index: 10; /* TODO: arbitrary; above code mirror; come back when ready to systemize */
}
.sidenavOpen {
transform: translateX(0);
|
refactor(site): put iconography dialog on top of sidenav
remove sidenav z-index to keep them in the same stacking context
|
pluralsight_design-system
|
train
|
js
|
fa91e319a165df2a4a9d28eb83a92958574e3a32
|
diff --git a/test/manager.js b/test/manager.js
index <HASH>..<HASH> 100644
--- a/test/manager.js
+++ b/test/manager.js
@@ -30,12 +30,10 @@ describe('service manager', function () {
};
describe('creation', function (done) {
- it('promise should be fullfilled', function () {
- const promise = kronos.manager({
+ it('promise should be fulfilled', function () {
+ kronos.manager({
flows: flowDecl
- }).then(function(manager) {
- manager.shutdown().then(function() { done(); });
- });
+ }).should.be.fulfilled.notify(done);
});
});
});
|
test: chai-as-promised the right way with notify(done)
|
Kronos-Integration_kronos-service-consul
|
train
|
js
|
5a90cb5051996fc370ae00102d9b0d34da2ee53c
|
diff --git a/mount/mount.go b/mount/mount.go
index <HASH>..<HASH> 100644
--- a/mount/mount.go
+++ b/mount/mount.go
@@ -224,7 +224,6 @@ func (d *Datastore) Delete(key ds.Key) error {
func (d *Datastore) Query(master query.Query) (query.Results, error) {
childQuery := query.Query{
Prefix: master.Prefix,
- Limit: master.Limit,
Orders: master.Orders,
KeysOnly: master.KeysOnly,
ReturnExpirations: master.ReturnExpirations,
@@ -254,7 +253,7 @@ func (d *Datastore) Query(master query.Query) (query.Results, error) {
queries.addResults(mount, results)
}
- qr := query.ResultsFromIterator(childQuery, query.Iterator{
+ qr := query.ResultsFromIterator(master, query.Iterator{
Next: queries.next,
Close: queries.close,
})
@@ -269,8 +268,8 @@ func (d *Datastore) Query(master query.Query) (query.Results, error) {
qr = query.NaiveOffset(qr, master.Offset)
}
- if childQuery.Limit > 0 {
- qr = query.NaiveLimit(qr, childQuery.Limit)
+ if master.Limit > 0 {
+ qr = query.NaiveLimit(qr, master.Limit)
}
return qr, nil
|
fix(mount): fix mount query based on new tests
|
ipfs_go-datastore
|
train
|
go
|
f20fefaf8732b1dbad81b106faba6da42279ead7
|
diff --git a/src/lib/storage.js b/src/lib/storage.js
index <HASH>..<HASH> 100644
--- a/src/lib/storage.js
+++ b/src/lib/storage.js
@@ -324,17 +324,20 @@ class Storage implements IStorageHandler {
lstream.pipe(stream, {end: false});
lstream.on('error', function(err) {
self.logger.error({err: err}, 'uplink error: @{err.message}');
- cb(), cb = function() {};
+ cb();
+ cb = function() {};
});
lstream.on('end', function() {
- cb(), cb = function() {};
+ cb();
+ cb = function() {};
});
stream.abort = function() {
if (lstream.abort) {
lstream.abort();
}
- cb(), cb = function() {};
+ cb();
+ cb = function() {};
};
},
// executed after all series
|
fix: remove use of comma separator (#<I>)
|
verdaccio_verdaccio
|
train
|
js
|
eecad85377283eb937e93f4026b65e55a0b98236
|
diff --git a/lib/productions/callback.js b/lib/productions/callback.js
index <HASH>..<HASH> 100644
--- a/lib/productions/callback.js
+++ b/lib/productions/callback.js
@@ -1,5 +1,5 @@
-import { Base } from "./base";
-import { return_type, argument_list, unescape } from "./helpers";
+import { Base } from "./base.js";
+import { return_type, argument_list, unescape } from "./helpers.js";
export class CallbackFunction extends Base {
/**
|
fix: add missing file extensions (#<I>)
Brave Browser was being picky and giving <I>s because there was no file extension.
|
w3c_webidl2.js
|
train
|
js
|
1461e95c39d0ec4b7b5b0d08f51b2d2cb5110349
|
diff --git a/src/lib/modules/whisper/index.js b/src/lib/modules/whisper/index.js
index <HASH>..<HASH> 100644
--- a/src/lib/modules/whisper/index.js
+++ b/src/lib/modules/whisper/index.js
@@ -30,12 +30,21 @@ class Whisper {
this.connectToProvider();
this.events.request('processes:register', 'whisper', (cb) => {
- this.setServiceCheck();
- this.addWhisperToEmbarkJS();
- this.addSetProvider();
- this.waitForWeb3Ready(() => {
- this.registerAPICalls();
- cb();
+ this.web3.shh.getInfo((err) => {
+ if (err) {
+ const message = err.message || err;
+ if (message.indexOf('not supported') > -1) {
+ this.logger.error('Whisper is not supported on your node. Are you using the simulator?');
+ return this.logger.trace(message);
+ }
+ }
+ this.setServiceCheck();
+ this.addWhisperToEmbarkJS();
+ this.addSetProvider();
+ this.waitForWeb3Ready(() => {
+ this.registerAPICalls();
+ cb();
+ });
});
});
|
fix(whisper): fix crash on using whisper with the simualtor
|
embark-framework_embark
|
train
|
js
|
18fae5312435ffe79f36af8428f0acdb5552b237
|
diff --git a/controllers/request.js b/controllers/request.js
index <HASH>..<HASH> 100644
--- a/controllers/request.js
+++ b/controllers/request.js
@@ -51,7 +51,8 @@ class RequestController {
let sockets = []
let request = {
id: process.hrtime().join('').toString(),
- url: req.url
+ url: req.url,
+ method: req.method
}
// Send check to root nsp
|
fix: Add RESTful method to initial file check
|
cubic-js_cubic
|
train
|
js
|
72310b71c349418e70abf71ab93fc9dbdec51a70
|
diff --git a/packages/workflow/settings/index.js b/packages/workflow/settings/index.js
index <HASH>..<HASH> 100644
--- a/packages/workflow/settings/index.js
+++ b/packages/workflow/settings/index.js
@@ -68,7 +68,7 @@ const settings = {
},
css() {
- return '[name]-[contenthash:8].chunk.css';
+ return this.isProduction() ? '[name]-[contenthash:8].chunk.css' : '[name].chunk.css';
},
// Returns the JSON object from contents or the JSON object from
@@ -85,11 +85,11 @@ const settings = {
// If the contents of a file don't change, the file should be cached in the browser.
// https://webpack.js.org/guides/caching/#output-filenames
fileName() {
- return '[name]-[contenthash:8].chunk.js';
+ return this.isProduction() ? '[name]-[contenthash:8].chunk.js' : '[name].js';
},
chunkFileName() {
- return '[name]-[contenthash:8].chunk.js';
+ return this.isProduction() ? '[name]-[contenthash:8].chunk.js' : '[name].chunk.js';
},
output() {
|
refactor(workflow): only uses contenthash in production
<URL>
|
Availity_availity-workflow
|
train
|
js
|
c0cac3de2fa4409f8cf16233707febe17ba5e336
|
diff --git a/index.js b/index.js
index <HASH>..<HASH> 100644
--- a/index.js
+++ b/index.js
@@ -38,7 +38,7 @@ module.exports = ({ directoryUrl, publicUrl, cookieName, cookieDomain, privateDi
else res.send(req.user)
})
router.post('/logout', logout)
- router.post('/keepalive', _auth(privateDirectoryUrl, publicUrl, jwksClient, cookieName, cookieDomain, true), (req, res) => res.status(204).send())
+ router.post('/keepalive', _auth(privateDirectoryUrl, publicUrl, jwksClient, cookieName, cookieDomain, true), (req, res) => res.status(204).send(req.user))
return { auth, requiredAuth, decode, loginCallback, login, logout, cors, router }
}
|
feat: return req.user after keepalive
|
koumoul-dev_sd-express
|
train
|
js
|
45e4f360f8918f6f16cf00fc176152341c3e9883
|
diff --git a/packages/dva/src/dynamic.js b/packages/dva/src/dynamic.js
index <HASH>..<HASH> 100644
--- a/packages/dva/src/dynamic.js
+++ b/packages/dva/src/dynamic.js
@@ -29,6 +29,10 @@ function asyncComponent(config) {
this.mounted = true;
}
+ componentWillUnmount() {
+ this.mounted = false;
+ }
+
load() {
resolve().then((m) => {
const AsyncComponent = m.default || m;
|
fix: dva/dynamic report setState warning when component is unmount before load is complete, Close #<I>
|
dvajs_dva
|
train
|
js
|
c52efb4a123c21ad1a25705d4969f2b4d04c42b3
|
diff --git a/lib/config.js b/lib/config.js
index <HASH>..<HASH> 100644
--- a/lib/config.js
+++ b/lib/config.js
@@ -591,7 +591,7 @@ exports.extend = function(newConf) {
maxSockets: config.sockets,
keepAlive: config.keepAlive,
keepAliveMsecs: config.keepAliveMsecs,
- maxFreeSockets: 8
+ maxFreeSockets: 60
};
config.httpAgent = config.debug ? false : createAgent(agentConfig);
config.httpsAgent = config.debug ? false : createAgent(agentConfig, true);
|
refactor: auto clean free sockets
|
avwo_whistle
|
train
|
js
|
57052d520fe9c5db226a9c2259a74fd141b225d1
|
diff --git a/test/e2e/general-usecase/app.js b/test/e2e/general-usecase/app.js
index <HASH>..<HASH> 100644
--- a/test/e2e/general-usecase/app.js
+++ b/test/e2e/general-usecase/app.js
@@ -1,7 +1,11 @@
var initElasticApm = require('../../..').init
// import init as initElasticApm from '../../..'
var createApmBase = require('../e2e')
+
+var active = Math.random() < 1
+
var elasticApm = createApmBase({
+ active: active,
debug: true,
serviceName: 'apm-agent-js-base-test-e2e-general-usecase',
serviceVersion: '0.0.1'
|
chore: add active to general use-case
|
elastic_apm-agent-rum-js
|
train
|
js
|
e836a7942f7e156b8ca00884a31356bf1598f851
|
diff --git a/engine/src/main/java/org/camunda/bpm/engine/impl/dmn/configuration/DmnEngineConfigurationBuilder.java b/engine/src/main/java/org/camunda/bpm/engine/impl/dmn/configuration/DmnEngineConfigurationBuilder.java
index <HASH>..<HASH> 100644
--- a/engine/src/main/java/org/camunda/bpm/engine/impl/dmn/configuration/DmnEngineConfigurationBuilder.java
+++ b/engine/src/main/java/org/camunda/bpm/engine/impl/dmn/configuration/DmnEngineConfigurationBuilder.java
@@ -111,7 +111,7 @@ public class DmnEngineConfigurationBuilder {
protected List<DmnDecisionTableEvaluationListener> createCustomPostDecisionTableEvaluationListeners() {
ensureNotNull("dmnHistoryEventProducer", dmnHistoryEventProducer);
- ensureNotNull("historyLevel", historyLevel);
+ // note that the history level may be null - see CAM-5165
HistoryDecisionTableListener historyDecisionTableListener = new HistoryDecisionTableListener(dmnHistoryEventProducer, historyLevel);
|
fix(engine): fix failed tests when history level is auto
related to #<I>,CAM-<I>
|
camunda_camunda-bpm-platform
|
train
|
java
|
87c6fa379c917c9182732b4629ad6456750e2cd7
|
diff --git a/src/bots/actions.js b/src/bots/actions.js
index <HASH>..<HASH> 100644
--- a/src/bots/actions.js
+++ b/src/bots/actions.js
@@ -3,12 +3,12 @@ var template = require('./helpers/template.js');
var timeoutDuration = 10000;
var actions = {
- assert: require('./actions/assert.js').bind(casper),
- capture: require('./actions/capture.js').bind(casper),
- dom: require('./actions/dom.js').bind(casper),
- get: require('./actions/get.js').bind(casper),
- request: require('./actions/request.js').bind(casper),
- wait: require('./actions/wait.js').bind(casper)
+ assert: require('./actions/assert.js'),
+ capture: require('./actions/capture.js'),
+ dom: require('./actions/dom.js'),
+ get: require('./actions/get.js'),
+ request: require('./actions/request.js'),
+ wait: require('./actions/wait.js')
};
var config = function (casper, cwd) {
|
fix(actions): remove binding casper since casper is global
|
damonjs_damon
|
train
|
js
|
2202b6103293f44554b96955e7f1d360baae4b6b
|
diff --git a/kv/service.go b/kv/service.go
index <HASH>..<HASH> 100644
--- a/kv/service.go
+++ b/kv/service.go
@@ -7,6 +7,7 @@ import (
"go.uber.org/zap"
"github.com/influxdata/influxdb"
+ "github.com/influxdata/influxdb/kit/check"
"github.com/influxdata/influxdb/rand"
"github.com/influxdata/influxdb/snowflake"
)
@@ -135,3 +136,13 @@ func (s *Service) Initialize(ctx context.Context) error {
func (s *Service) WithStore(store Store) {
s.kv = store
}
+
+// Check calls the check function on the kv store if it implements the
+// check interface, otherwise returns pass
+func (s *Service) Check(ctx context.Context) check.Response {
+ if check, ok := s.kv.(check.Checker); ok {
+ return check.Check(ctx)
+ }
+
+ return check.Pass()
+}
|
feat(tasks): add health check to kv service (#<I>)
|
influxdata_influxdb
|
train
|
go
|
e81a5f630b1fa3b869673d093edf8ead1e090b0b
|
diff --git a/packages/pob/lib/generators/core/yarn/CoreYarnGenerator.js b/packages/pob/lib/generators/core/yarn/CoreYarnGenerator.js
index <HASH>..<HASH> 100644
--- a/packages/pob/lib/generators/core/yarn/CoreYarnGenerator.js
+++ b/packages/pob/lib/generators/core/yarn/CoreYarnGenerator.js
@@ -70,6 +70,8 @@ export default class CoreYarnGenerator extends Generator {
this.spawnCommandSync('yarn', ['set', 'version', 'latest']);
if (this.options.yarnNodeLinker === 'pnp') {
this.spawnCommandSync('yarn', ['dlx', '@yarnpkg/sdks', 'vscode']);
+ } else {
+ this.fs.delete('.yarn/sdks');
}
this.spawnCommandSync('yarn', ['prettier', '--write', '.vscode']);
this.spawnCommandSync('yarn', ['install']);
|
fix(pob): delete .yarn/sdks when pnp is disabled
|
christophehurpeau_pob-lerna
|
train
|
js
|
8467f0418c0e97b464e908ddc500671eb7bc699e
|
diff --git a/framework/directives/gestureDetector.js b/framework/directives/gestureDetector.js
index <HASH>..<HASH> 100755
--- a/framework/directives/gestureDetector.js
+++ b/framework/directives/gestureDetector.js
@@ -56,8 +56,12 @@
}
};
- var gestureDetector = element[0]._gestureDetector;
- gestureDetector.on(EVENTS.join(' '), handler);
+ var gestureDetector;
+
+ setImmediate(function() {
+ gestureDetector = element[0]._gestureDetector;
+ gestureDetector.on(EVENTS.join(' '), handler);
+ });
$onsen.cleaner.onDestroy(scope, function() {
gestureDetector.off(EVENTS.join(' '), handler);
|
fix(ons-gesture-detector): Fixed Custom Elements timing.
|
OnsenUI_OnsenUI
|
train
|
js
|
9f585d70171b3f137bfb674c8c33ec7f5a023e55
|
diff --git a/src/public-path.js b/src/public-path.js
index <HASH>..<HASH> 100644
--- a/src/public-path.js
+++ b/src/public-path.js
@@ -2,5 +2,5 @@
// Dynamically inject webpack `publicPath`, for resolving assets locations.
// https://webpack.js.org/guides/public-path/#on-the-fly
// https://webpack.js.org/configuration/output/#output-publicpath
-if (process.env.NODE_ENV !== 'test')
+if (process.env.NODE_ENV === 'production')
__webpack_public_path__ = window.app.cdnUrl;
|
chore: use html-webpack plugin
|
commercetools_merchant-center-application-kit
|
train
|
js
|
9c7c75180ab32d71de6bbed7ff468344556ef240
|
diff --git a/libs/babel/babel.js b/libs/babel/babel.js
index <HASH>..<HASH> 100644
--- a/libs/babel/babel.js
+++ b/libs/babel/babel.js
@@ -28,9 +28,9 @@ function culturize (context, culture) {
// don't botch arrays into objects
if (Array.isArray(context)) {
- context.forEach((array_item) => {
- culturize(array_item)
- })
+ for (var i = 0, l = context.length; i < l; i++) {
+ context[i] = culturize(context[i], culture)
+ }
return context
}
|
fix(babel): don't loose culture while translating arrays and objects
- - -
Closes #<I>
|
Gottwik_Enduro
|
train
|
js
|
80240e9aa3ce63081365f2fe581dacd0423feedc
|
diff --git a/lib/plugin/components/state-resources/send-task-heartbeat/index.js b/lib/plugin/components/state-resources/send-task-heartbeat/index.js
index <HASH>..<HASH> 100644
--- a/lib/plugin/components/state-resources/send-task-heartbeat/index.js
+++ b/lib/plugin/components/state-resources/send-task-heartbeat/index.js
@@ -21,11 +21,11 @@ class SendTaskHeartbeat {
return this.notRunning(event, context)
}
- if (this.lastDescribedTimeFrame && execution.lastDescribed) {
+ if (this.lastDescribedTimeFrame) {
const expected = moment().subtract(this.lastDescribedTimeFrame, 'seconds')
- const lastDescribed = moment(execution.lastDescribed)
+ const lastDescribed = execution.lastDescribed ? moment(execution.lastDescribed) : null
- if (lastDescribed.isBefore(expected)) {
+ if (lastDescribed === null || lastDescribed.isBefore(expected)) {
await this.statebox.stopExecution(
'Execution stopped interally',
'STOPPED',
|
fix: send task heartbeat to check if last described execution is null
|
wmfs_tymly-core
|
train
|
js
|
f9406d71581805a8174eafe0b7986e5ece78caed
|
diff --git a/src/Router/HandlerMapping.php b/src/Router/HandlerMapping.php
index <HASH>..<HASH> 100644
--- a/src/Router/HandlerMapping.php
+++ b/src/Router/HandlerMapping.php
@@ -164,7 +164,7 @@ class HandlerMapping extends AbstractRouter implements HandlerMappingInterface
protected function collectParamRoute(string $route, array $methods, array $conf)
{
$conf['original'] = $route;
- $params = $this->getAvailableParams($opts['params'] ?? []);
+ $params = $this->getAvailableParams($conf['option']['params'] ?? []);
list($first, $conf) = $this->parseParamRoute($route, $params, $conf);
// route string have regular
@@ -366,7 +366,10 @@ class HandlerMapping extends AbstractRouter implements HandlerMappingInterface
}
}
- return [self::NOT_FOUND, \explode(',', \trim($allowedMethods, ','))];
+ return [
+ self::NOT_FOUND,
+ $allowedMethods ? \explode(',', \rtrim($allowedMethods, ',')) : []
+ ];
}
/**
|
fix: cannot setting params. Sometimes 'notFound' would be considered 'notAllowed'
|
swoft-cloud_swoft-http-server
|
train
|
php
|
6be86e33f0d429984f915565788fafd2c12a3809
|
diff --git a/tests/scaffold_test.py b/tests/scaffold_test.py
index <HASH>..<HASH> 100644
--- a/tests/scaffold_test.py
+++ b/tests/scaffold_test.py
@@ -18,7 +18,7 @@ class TestScaffold(unittest.TestCase):
# run demo testcases
try:
- subprocess.check_call(["hrun", project_name])
+ subprocess.check_call(["hrun", project_name], shell=True)
except subprocess.SubprocessError:
raise
finally:
|
fix: Resolve the FileNotFoundError while using subprocess on Windows
|
HttpRunner_HttpRunner
|
train
|
py
|
e19228266ab3057ac0d9a32d7cb541edd963f980
|
diff --git a/lib/https/index.js b/lib/https/index.js
index <HASH>..<HASH> 100644
--- a/lib/https/index.js
+++ b/lib/https/index.js
@@ -34,7 +34,7 @@ var proxy, server;
function handleWebsocket(socket, clientIp, clientPort, wss) {
var headers = socket.headers;
- if (!wss && headers[config.HTTPS_FIELD]) {
+ if (headers[config.HTTPS_FIELD]) {
delete headers[config.HTTPS_FIELD];
wss = true;
}
@@ -563,9 +563,9 @@ function resolveWebsocket(socket, wss) {
function addReqInfo(req) {
var clientPort = req.socket.remotePort;
var remoteData = tunnelTmplData.get(clientPort);
+ req.headers[config.HTTPS_FIELD] = 1;
if (remoteData) {
tunnelTmplData.del(clientPort);
- req.headers[config.HTTPS_FIELD] = 1;
req.headers[config.CLIENT_IP_HEAD] = remoteData.clientIp || LOCALHOST;
req.headers[config.CLIENT_PORT_HEAD] = remoteData.clientPort;
}
|
refactor: addReqInfo
|
avwo_whistle
|
train
|
js
|
9fb9efe10e2b61156943b306bafba0a70beb5485
|
diff --git a/packages/eslint-config-cozy-app/index.js b/packages/eslint-config-cozy-app/index.js
index <HASH>..<HASH> 100644
--- a/packages/eslint-config-cozy-app/index.js
+++ b/packages/eslint-config-cozy-app/index.js
@@ -20,6 +20,7 @@ module.exports = {
'prettier/prettier': ['error', {
singleQuote: true,
semi: false
- }]
+ }],
+ 'react/prop-types': 0
}
}
|
chore: disable proptypes checking in eslint config :wrench:
|
CPatchane_create-cozy-app
|
train
|
js
|
79c788c0df1f7e3755187334fb08ddc73f9d4747
|
diff --git a/index.js b/index.js
index <HASH>..<HASH> 100644
--- a/index.js
+++ b/index.js
@@ -67,7 +67,7 @@ function matchTerm(pattern) {
type = ARR;
}
- if (type) return {type: type, name: possible.substring(6)};
+ if (type) return {type: type, name: possible.slice(6)};
}
/**
|
chore: replace substring with slice (faster on v8)
|
dumberjs_ast-matcher
|
train
|
js
|
c284100fcb3dd5f7d27f937b49f9a75893f9de3c
|
diff --git a/lib/sg_postcode/converters/long_lat_converter.rb b/lib/sg_postcode/converters/long_lat_converter.rb
index <HASH>..<HASH> 100644
--- a/lib/sg_postcode/converters/long_lat_converter.rb
+++ b/lib/sg_postcode/converters/long_lat_converter.rb
@@ -18,6 +18,12 @@ module SgPostcode
postcodes.map { |postcode| place_info(postcode) }
end
+ # Request info from host for a postcode
+ #
+ # @return hash of info, check
+ # response/config.rb to see the info fields
+ #
+ # @params: postcode number [String]
def self.place_info(postcode)
send_geo_request(postcode, host: :Google).data
end
|
docs: add document for place_info method
|
ManagedApplicationServices_sg_postcode
|
train
|
rb
|
2801fd91efede88f9e94719d18cc2ca54a34775b
|
diff --git a/lib/index.js b/lib/index.js
index <HASH>..<HASH> 100644
--- a/lib/index.js
+++ b/lib/index.js
@@ -58,9 +58,16 @@ function proxy(callback) {
rulesUtil.addValues(config.values, config.replaceExistValue);
rulesUtil.addRules(config.rules, config.replaceExistRule);
config.debug && rules.disableDnsCache();
+ var count = 2;
+ var execCallback = function() {
+ if (--count === 0 &&typeof callback === 'function') {
+ callback.call(server, proxyEvents);
+ }
+ };
+ server.listen(config.port, execCallback);
require('../biz/init')(proxyEvents, function(){
server.on('request', app);
- server.listen(config.port, callback);
+ execCallback();
});
return proxyEvents;
}
|
feat: Support for getting random port of ui server
|
avwo_whistle
|
train
|
js
|
fed08244c173342066dd454a6127d4758b5fd53a
|
diff --git a/src/mixin.js b/src/mixin.js
index <HASH>..<HASH> 100644
--- a/src/mixin.js
+++ b/src/mixin.js
@@ -178,6 +178,20 @@ function _clone(dest, src, ctor, filter) {
}
}
+function cloneCtor(dest, src, ctor, filter) {
+ var filterFn = function (name, value) {
+ for (var n of [ 'length', 'name', 'arguments', 'caller', 'prototype' ]) {
+ if (n === name) {
+ value = void 0;
+ break;
+ }
+ if (value !== void 0) value = filter(name, value);
+ }
+ return value;
+ }
+ _clone(dest, src, ctor, filterFn);
+}
+
//clone src(superCtor) to dest(MixinCtor)
function clonePrototype(dest, src, ctor, filter) {
// filter = _getFilterFunc(filter);
@@ -292,6 +306,7 @@ function mixin(ctor, superCtor, options) {
}
mixinCtors.push(superCtor);//quickly check in isMixinedFrom.
var filterFn = _getFilterFunc(options && options.filter);
+ cloneCtor(mixinCtor, superCtor, ctor, filterFn);
clonePrototype(mixinCtor, superCtor, ctor, filterFn);
inheritsDirectly(ctor, mixinCtor);
result = true;
|
feat(mixin): clone the static properties and methods to the class
|
snowyu_inherits-ex.js
|
train
|
js
|
30d3949e07ade1a588ea4b494f90aa3c9b80271f
|
diff --git a/src/components/Header/index.js b/src/components/Header/index.js
index <HASH>..<HASH> 100755
--- a/src/components/Header/index.js
+++ b/src/components/Header/index.js
@@ -39,11 +39,11 @@ const Header = ({
);
Header.propTypes = {
- brandImage: PropTypes.oneOf([
+ brandImage: PropTypes.oneOfType([
PropTypes.number,
PropTypes.string
]),
- rightImage: PropTypes.oneOf([
+ rightImage: PropTypes.oneOfType([
PropTypes.number,
PropTypes.string
]),
|
fix(header): fix propTypes for images on header (#<I>)
fix(header): fix propTypes for images on header
|
indec-it_react-native-commons
|
train
|
js
|
249d096810207b8aeaa05d01d43837dea30f1b10
|
diff --git a/engine-rest/engine-rest/src/test/java/org/camunda/bpm/engine/rest/ProcessDefinitionRestServiceInteractionTest.java b/engine-rest/engine-rest/src/test/java/org/camunda/bpm/engine/rest/ProcessDefinitionRestServiceInteractionTest.java
index <HASH>..<HASH> 100644
--- a/engine-rest/engine-rest/src/test/java/org/camunda/bpm/engine/rest/ProcessDefinitionRestServiceInteractionTest.java
+++ b/engine-rest/engine-rest/src/test/java/org/camunda/bpm/engine/rest/ProcessDefinitionRestServiceInteractionTest.java
@@ -3163,19 +3163,6 @@ public class ProcessDefinitionRestServiceInteractionTest extends AbstractRestSer
}
@Test
- public void testUpdateHistoryTimeToLiveAbsentValue() {
- given()
- .pathParam("id", MockProvider.EXAMPLE_PROCESS_DEFINITION_ID)
- .contentType(ContentType.JSON)
- .then().expect()
- .statusCode(Status.NO_CONTENT.getStatusCode())
- .when()
- .put(SINGLE_PROCESS_DEFINITION_HISTORY_TIMETOLIVE_URL);
-
- verify(repositoryServiceMock).updateProcessDefinitionHistoryTimeToLive(MockProvider.EXAMPLE_PROCESS_DEFINITION_ID, null);
- }
-
- @Test
public void testUpdateHistoryTimeToLiveNullValue() {
given()
.pathParam("id", MockProvider.EXAMPLE_PROCESS_DEFINITION_ID)
|
fix(engine): remove the test
* test is not not needed after CAM-<I>
Related with #CAM-<I>
|
camunda_camunda-bpm-platform
|
train
|
java
|
aca5c18c2a52dce0f2f3c2f6058ad4564bcf0481
|
diff --git a/src/screens.web.js b/src/screens.web.js
index <HASH>..<HASH> 100644
--- a/src/screens.web.js
+++ b/src/screens.web.js
@@ -12,10 +12,6 @@ export function screensEnabled() {
}
export class NativeScreen extends React.Component {
- static defaultProps = {
- active: true,
- };
-
render() {
const { active, style, ...rest } = this.props;
|
feat: remove default active prop on web (#<I>)
Remove the `defaultProps` since it is not necessary. Should fix #<I>.
|
kmagiera_react-native-screens
|
train
|
js
|
6693617df3835de9e324661ca9491805e56327d8
|
diff --git a/src/contrib/aliased.php b/src/contrib/aliased.php
index <HASH>..<HASH> 100644
--- a/src/contrib/aliased.php
+++ b/src/contrib/aliased.php
@@ -38,7 +38,7 @@ if(!file_exists($path)) {
}
// Prepare GeSHi instance
-$geshi =& new GeSHi();
+$geshi = new GeSHi();
$geshi->set_language('text');
$geshi->load_from_file($path);
$geshi->set_header_type(GESHI_HEADER_PRE);
|
fix: SF#<I>: Assign by Reference deprecated
|
GeSHi_geshi-1.0
|
train
|
php
|
fe88e2d4caadeb585b22b1b69a3a42a270e02094
|
diff --git a/templates/route/name.controller.js b/templates/route/name.controller.js
index <HASH>..<HASH> 100644
--- a/templates/route/name.controller.js
+++ b/templates/route/name.controller.js
@@ -15,7 +15,7 @@ angular.module('<%= scriptAppName %>')
.component('<%= cameledName %>', {
templateUrl: '<%= htmlUrl %>',
controller: <%= classedName %>Component,
- controllerAs: <%= classedName %>
+ controllerAs: '<%= cameledName %>Ctrl'
});
})();
|
fix(route): controllerAs should be a string
|
DaftMonk_generator-ng-component
|
train
|
js
|
39b62a1b6694951d74f1019221b29d95b79157dd
|
diff --git a/eval.js b/eval.js
index <HASH>..<HASH> 100644
--- a/eval.js
+++ b/eval.js
@@ -13,9 +13,8 @@ function merge (a, b) {
return a
}
-var vmGlobals = new vm.Script('vmGlobals = Object.getOwnPropertyNames(globalThis)')
+var vmGlobals = new vm.Script('Object.getOwnPropertyNames(globalThis)')
.runInNewContext()
- .vmGlobals
// Return the exports/module.exports variable set in the content
// content (String|VmScript): required
|
fix: fix VM globals not properly acquired
|
pierrec_node-eval
|
train
|
js
|
83bd56c49d4db82ee9d1fc11325c94a210e050ab
|
diff --git a/packages/rest/src/index.js b/packages/rest/src/index.js
index <HASH>..<HASH> 100644
--- a/packages/rest/src/index.js
+++ b/packages/rest/src/index.js
@@ -1,8 +1,9 @@
import axios, { CancelToken } from 'axios';
import { CANCEL } from 'redux-saga'
-import * as girder from './girder'
-import * as jupyterhub from './jupyterhub'
-
+import * as girder from './girder';
+import * as jupyterhub from './jupyterhub';
+export * from './girder'
+export * from './jupyterhub'
var _girderClient = axios.create({
baseURL: `${window.location.origin}/api/v1`
|
fix(rest): Export all the needed parts
|
OpenChemistry_oc-web-components
|
train
|
js
|
49daee2a86cad07f558700a38d10b0b74ea551c0
|
diff --git a/controller/registry/private.py b/controller/registry/private.py
index <HASH>..<HASH> 100644
--- a/controller/registry/private.py
+++ b/controller/registry/private.py
@@ -53,7 +53,7 @@ def publish_release(source, config, target):
# construct the new image
image['parent'] = image['id']
image['id'] = _new_id()
- image['config']['Env'] = _construct_env(image['config']['Env'], config)
+ image['config']['Env'] = _construct_env(image['config']['Env'], config, target_image, target_tag)
# update and tag the new image
_commit(target_image, image, _empty_tar_archive(), target_tag)
@@ -157,9 +157,11 @@ def _put_tag(image_id, repository_path, tag):
# utility functions
-def _construct_env(env, config):
+def _construct_env(env, config, target_image, target_tag):
"Update current environment with latest config"
new_env = []
+ new_env.append("{}={}".format('DEIS_APP', target_image))
+ new_env.append("{}={}".format('DEIS_RELEASE', target_tag))
# see if we need to update existing ENV vars
for e in env:
k, v = e.split('=', 1)
|
feat(controller): inject tag version value in environment.
|
deis_deis
|
train
|
py
|
0d599a1a7680fc4a35b5f44ba0c3b9aeccccbfaf
|
diff --git a/src/structures/User.js b/src/structures/User.js
index <HASH>..<HASH> 100644
--- a/src/structures/User.js
+++ b/src/structures/User.js
@@ -324,7 +324,7 @@ class User extends Base {
);
json.avatarURL = this.avatarURL();
json.displayAvatarURL = this.displayAvatarURL();
- json.bannerURL = this.bannerURL();
+ json.bannerURL = this.banner ? this.bannerURL() : this.banner;
return json;
}
|
fix(User): don't generate the banner URL when not cached (#<I>)
|
discordjs_discord.js
|
train
|
js
|
c9b4f2185111ff6873f4d03f2af5f423ccc0ab71
|
diff --git a/test/fixtures/index.js b/test/fixtures/index.js
index <HASH>..<HASH> 100644
--- a/test/fixtures/index.js
+++ b/test/fixtures/index.js
@@ -35,11 +35,10 @@ function fixtures(basename) {
// fixtures with the API Elements JSON missing (should blow up and the
// scripts/pretest.js should be ran to mitigate the issue)
.filter(fixture => fs.existsSync(fixture.apiDescriptionPath))
- .map(fixture => ({
+ .map(fixture => Object.assign({
apiDescription: fs.readFileSync(fixture.apiDescriptionPath, { encoding: 'utf8' }),
apiElements: readAPIelements(fixture.apiElementsPath),
- ...fixture,
- }));
+ }, fixture));
// prevent invalid fixture names
if (array.length < 1) {
|
test: don't use the splat syntax (Node 6 doesn't have it)
|
apiaryio_dredd-transactions
|
train
|
js
|
2526827b6d2700b094f6760202bb7063a5bc3043
|
diff --git a/lnd_test.go b/lnd_test.go
index <HASH>..<HASH> 100644
--- a/lnd_test.go
+++ b/lnd_test.go
@@ -2129,15 +2129,16 @@ func testSphinxReplayPersistence(net *lntest.NetworkHarness, t *harnessTest) {
t.Fatalf("received payment error: %v", resp.PaymentError)
}
- // Since the payment failed, the balance should still be left unaltered.
+ // Since the payment failed, the balance should still be left
+ // unaltered.
assertAmountSent(0)
ctxt, _ = context.WithTimeout(ctxb, timeout)
- closeChannelAndAssert(ctxt, t, net, carol, chanPoint, false)
+ closeChannelAndAssert(ctxt, t, net, carol, chanPoint, true)
- // Finally, shutdown the nodes we created for the duration of the tests,
- // only leaving the two seed nodes (Alice and Bob) within our test
- // network.
+ // Finally, shutdown the nodes we created for the duration of the
+ // tests, only leaving the two seed nodes (Alice and Bob) within our
+ // test network.
if err := net.ShutdownNode(carol); err != nil {
t.Fatalf("unable to shutdown carol: %v", err)
}
|
test: modify sphinx replay test to force close the final channel
In this commit, we modify the sphinx replay test to actually force close
that final channel. We do this, as otherwise, we'll now reject the co-op
close attempt as the channel still has active HTLCs.
|
lightningnetwork_lnd
|
train
|
go
|
5ecbbb95f8a2f6b9491942b2013ff013b52f4615
|
diff --git a/src/Application/Config/Parser/Xml/Mail.php b/src/Application/Config/Parser/Xml/Mail.php
index <HASH>..<HASH> 100644
--- a/src/Application/Config/Parser/Xml/Mail.php
+++ b/src/Application/Config/Parser/Xml/Mail.php
@@ -35,8 +35,11 @@ class Mail implements XmlParserInterface
if($childNode->nodeType !== XML_ELEMENT_NODE) {
continue;
}
+ $mail->mailer->{$childNode->nodeName} = trim($childNode->nodeValue);
+ }
- $mail->mailer->{$node->nodeName} = trim($node->nodeValue);
+ if(!isset($mail->mailer->host)) {
+ throw new ConfigException('Mailer requires a configured host.');
}
}
|
fix: parsing of mailer settings; added a check for mailer host as minimal requirement
|
Vectrex_vxPHP
|
train
|
php
|
a1a35f43175187091f028474db2ebef5bfc77bc0
|
diff --git a/semantic_release/pypi.py b/semantic_release/pypi.py
index <HASH>..<HASH> 100644
--- a/semantic_release/pypi.py
+++ b/semantic_release/pypi.py
@@ -2,7 +2,7 @@ from invoke import run
from twine.commands import upload as twine_upload
-def upload_to_pypi(dists='bdist_wheel'):
+def upload_to_pypi(dists='sdist bdist_wheel'):
"""
Creates the wheel and uploads to pypi with twine.
diff --git a/tests/test_pypi.py b/tests/test_pypi.py
index <HASH>..<HASH> 100644
--- a/tests/test_pypi.py
+++ b/tests/test_pypi.py
@@ -12,7 +12,7 @@ class PypiTests(TestCase):
upload_to_pypi()
self.assertEqual(
mock_run.call_args_list,
- [mock.call('python setup.py bdist_wheel'), mock.call('rm -rf build dist')]
+ [mock.call('python setup.py sdist bdist_wheel'), mock.call('rm -rf build dist')]
)
mock_upload.assert_called_once_with(
dists=['dist/*'],
|
fix(pypi): Add sdist as default in addition to bdist_wheel
There are a lot of outdated pip installations around which leads to
confusions if a package have had an sdist release at some point and
then suddenly is only available as wheel packages, because old pip
clients will then download the latest sdist package available.
|
relekang_python-semantic-release
|
train
|
py,py
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.