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 |
|---|---|---|---|---|---|
18c7fb3143a8f4da2d767702abe52a0b4b2b1055
|
diff --git a/bindings/angular2/gulpfile.babel.js b/bindings/angular2/gulpfile.babel.js
index <HASH>..<HASH> 100644
--- a/bindings/angular2/gulpfile.babel.js
+++ b/bindings/angular2/gulpfile.babel.js
@@ -8,10 +8,6 @@ import StaticServer from 'static-server';
const FLAGS = `--inline --colors --progress --display-error-details --display-cached`;
-gulp.task('build', shell.task(`
- webpack ${FLAGS}
-`));
-
gulp.task('serve', done => {
createDevServer().listen('3030', '0.0.0.0', () => {
open('http://0.0.0.0:3030/bindings/angular2/examples/button.html');
|
refactor(angular2-binding): Removed unneeded "gulp build" task.
|
OnsenUI_OnsenUI
|
train
|
js
|
81bcf7fd15fd76f054814b34d8a877168fc6225c
|
diff --git a/src/core/services/gesture/gesture.js b/src/core/services/gesture/gesture.js
index <HASH>..<HASH> 100644
--- a/src/core/services/gesture/gesture.js
+++ b/src/core/services/gesture/gesture.js
@@ -24,7 +24,7 @@ if (shouldHijackClicks) {
document.addEventListener('click', function(ev) {
// Space/enter on a button, and submit events, can send clicks
var isKeyClick = ev.clientX === 0 && ev.clientY === 0;
- if (window.jQuery || isKeyClick || ev.$material) return;
+ if (isKeyClick || ev.$material) return;
// Prevent clicks unless they're sent by material
ev.preventDefault();
|
fix(gesture): don't stop hijacking clicks on ios & android when jquery is loaded
Remove window.jQuery from check for hijacking clicks on mobile devices.
Touch clicks were emitted twice when jQuery was loaded which made checkboxes and buttons unusable on mobile devices.
Addressing Issue <URL>
|
angular_material
|
train
|
js
|
504d35d55554ece44884c5f658e00cadcf867c50
|
diff --git a/src/ui-layout.js b/src/ui-layout.js
index <HASH>..<HASH> 100644
--- a/src/ui-layout.js
+++ b/src/ui-layout.js
@@ -778,6 +778,7 @@ angular.module('ui.layout', [])
element.css(ctrl.sizeProperties.flowProperty, newValue + 'px');
});
+ //TODO: add ability to disable auto-adding a splitbar after the container
var parent = element.parent();
var children = parent.children();
var index = ctrl.indexOfElement(element);
|
chore: add TODO back after #<I>
|
angular-ui_ui-layout
|
train
|
js
|
f1c83a5dbdae3df415b93b0aa439674c69791b97
|
diff --git a/src/main/java/net/emaze/dysfunctional/windows/PreciseWindowIterator.java b/src/main/java/net/emaze/dysfunctional/windows/PreciseWindowIterator.java
index <HASH>..<HASH> 100644
--- a/src/main/java/net/emaze/dysfunctional/windows/PreciseWindowIterator.java
+++ b/src/main/java/net/emaze/dysfunctional/windows/PreciseWindowIterator.java
@@ -27,7 +27,7 @@ public class PreciseWindowIterator<T> implements Iterator<Queue<T>> {
@Override
public boolean hasNext() {
if (window.size() == windowSize) {
- return iter.hasNext();
+ return true;
}
tryFillWindow();
return window.size() == windowSize;
|
fix: hasNext bug on Precise window
|
cybazeitalia_emaze-dysfunctional
|
train
|
java
|
d325e353d4d7a700ed620f94ab0b9df46be58c6f
|
diff --git a/engine-rest/engine-rest-openapi-generator/src/main/java/org/camunda/bpm/engine/rest/openapi/generator/impl/TemplateParser.java b/engine-rest/engine-rest-openapi-generator/src/main/java/org/camunda/bpm/engine/rest/openapi/generator/impl/TemplateParser.java
index <HASH>..<HASH> 100644
--- a/engine-rest/engine-rest-openapi-generator/src/main/java/org/camunda/bpm/engine/rest/openapi/generator/impl/TemplateParser.java
+++ b/engine-rest/engine-rest-openapi-generator/src/main/java/org/camunda/bpm/engine/rest/openapi/generator/impl/TemplateParser.java
@@ -126,6 +126,8 @@ public class TemplateParser {
if (version.contains("SNAPSHOT")) {
templateData.put("docsVersion", "develop");
+ } else if (version.contains("alpha")) {
+ templateData.put("docsVersion", "latest");
} else {
// docsVersion = 7.X
templateData.put("docsVersion", version.substring(0, version.lastIndexOf(".")));
|
fix(rest-openapi): fix docsVersion for alpha releases
7.X(<I>-alphaY) version doesn't exist in the manual docs during
development of a new version =>
the docs links are built with `latest` version
Related to CAM-<I>
|
camunda_camunda-bpm-platform
|
train
|
java
|
288f5746b90087bdb544e9e46beeaf73e6c1ab9f
|
diff --git a/index.js b/index.js
index <HASH>..<HASH> 100644
--- a/index.js
+++ b/index.js
@@ -6,14 +6,14 @@ module.exports = function (pluginConfig, config, cb) {
if (env.WERCKER !== "true") {
return cb(new SRError(
- "semantic-release didn’t run on wercker and therefore a new version won’t be published.",
+ "ENOWERCKER: semantic-release didn’t run on wercker and therefore a new version won’t be published.",
"ENOWERCKER"
));
}
if (env.WERCKER_GIT_BRANCH !== options.branch) {
return cb(new SRError(
- "This test run was triggered on the branch " + env.WERCKER_GIT_BRANCH +
+ "EBRANCHMISMATCH: This test run was triggered on the branch " + env.WERCKER_GIT_BRANCH +
", while semantic-release is configured to only publish from " + options.branch + ".",
"EBRANCHMISMATCH"
));
@@ -22,7 +22,7 @@ module.exports = function (pluginConfig, config, cb) {
// WERCKER_RESULT is set only for after-steps
if (env.hasOwnProperty("WERCKER_RESULT") && env.WERCKER_RESULT !== "passed") {
return cb(new SRError(
- "This test run was not passed and therefore a new version won’t be published.",
+ "EFAILED: This test run was not passed and therefore a new version won’t be published.",
"EFAILED"
));
}
|
fix: Put error code into message
semantic-release currently does not put error code to log message so the
io-monad/semantic-release step cannot get error code from messages.
|
io-monad_sr-condition-wercker
|
train
|
js
|
2e67310515030d88c6166f0d9da240b4d268eb6b
|
diff --git a/test/functional/runner/index.js b/test/functional/runner/index.js
index <HASH>..<HASH> 100644
--- a/test/functional/runner/index.js
+++ b/test/functional/runner/index.js
@@ -419,13 +419,11 @@ function resolveOperationArgs(operationName, operationArgs, context) {
}
// TODO: migrate all operations here
- if (operationName !== 'distinct') {
- return;
- }
-
if (operationName === 'distinct') {
pluck(operationArgs, result, ['fieldName', 'filter']);
if (result.length === 1) result.push({});
+ } else {
+ return;
}
// compile the options
|
refactor(unified-runner): make it clearer which ops are supported
|
mongodb_node-mongodb-native
|
train
|
js
|
014e3ed6643c54b44dd3ac54540ab1cc9a68380d
|
diff --git a/lib/https/ca.js b/lib/https/ca.js
index <HASH>..<HASH> 100644
--- a/lib/https/ca.js
+++ b/lib/https/ca.js
@@ -37,6 +37,9 @@ if (!useNewKey && requiredVersion && !checkCertificate()) {
function checkCertificate() {
try {
var crt = pki.certificateFromPem(fs.readFileSync(ROOT_CRT_FILE));
+ if (crt.publicKey.n.toString(2).length < 2048) {
+ return false;
+ }
return /^whistle\.\d+$/.test(getCommonName(crt));
} catch(e) {}
return true;
|
feat: Auto generate the required root certificate
|
avwo_whistle
|
train
|
js
|
9ffa922bc0917f068126f2fd9b0a9cb46ca094e5
|
diff --git a/app/lib/dev-server.js b/app/lib/dev-server.js
index <HASH>..<HASH> 100644
--- a/app/lib/dev-server.js
+++ b/app/lib/dev-server.js
@@ -207,8 +207,7 @@ module.exports = class DevServer {
SsrExtension.getModule().extendApp({
app,
ssr: {
- // TODO vue3
- renderToString () {},
+ renderToString: renderSSR,
settings: Object.assign(
{},
JSON.parse(cfg.ssr.__templateOpts),
|
fix(app): dev - supply correct renderToString() method
|
quasarframework_quasar
|
train
|
js
|
bd44e2971f61395844c7463f9c20439f963df842
|
diff --git a/indexing-hadoop/src/main/java/org/apache/druid/indexer/JobHelper.java b/indexing-hadoop/src/main/java/org/apache/druid/indexer/JobHelper.java
index <HASH>..<HASH> 100644
--- a/indexing-hadoop/src/main/java/org/apache/druid/indexer/JobHelper.java
+++ b/indexing-hadoop/src/main/java/org/apache/druid/indexer/JobHelper.java
@@ -490,7 +490,6 @@ public class JobHelper
progressable
)) {
HadoopDruidIndexerConfig.JSON_MAPPER.writeValue(descriptorOut, segment);
- descriptorOut.flush();
}
}
catch (RuntimeException | IOException ex) {
|
fix(indexer): don't flush closed stream (#<I>)
|
apache_incubator-druid
|
train
|
java
|
3a65d43d939daecb961b1344cf30ce6c26a8b2c5
|
diff --git a/samples/system-test/redact.test.js b/samples/system-test/redact.test.js
index <HASH>..<HASH> 100644
--- a/samples/system-test/redact.test.js
+++ b/samples/system-test/redact.test.js
@@ -87,7 +87,7 @@ describe('redact', () => {
`${testName}.actual.png`,
`${testResourcePath}/${testName}.expected.png`
);
- assert.isBelow(difference, 0.03);
+ assert.isBelow(difference, 0.1);
});
it('should redact multiple sensitive data types from an image', async () => {
@@ -100,7 +100,7 @@ describe('redact', () => {
`${testName}.actual.png`,
`${testResourcePath}/${testName}.expected.png`
);
- assert.isBelow(difference, 0.03);
+ assert.isBelow(difference, 0.1);
});
it('should report info type errors', () => {
|
test: make redact image comparison less strict (#<I>)
In redact sample test, the original and the redacted images are compared and the comparison threshold is set to <I>. Something has changed in the server side, let's make the threshold <I> without changing much in the test logic.
|
googleapis_nodejs-dlp
|
train
|
js
|
9eb05a7ee739a33066ad6f385a1edb780a45f552
|
diff --git a/views/cypress/utils/propertiesInfo.js b/views/cypress/utils/propertiesInfo.js
index <HASH>..<HASH> 100644
--- a/views/cypress/utils/propertiesInfo.js
+++ b/views/cypress/utils/propertiesInfo.js
@@ -58,4 +58,4 @@ export default {
name: 'File',
type: 'file'
},
-}
\ No newline at end of file
+}
|
chore: add break line at EOF
|
oat-sa_extension-tao-item
|
train
|
js
|
343f79c8f233ed47cd2406780d8b68ee0a1a259e
|
diff --git a/DbalProducer.php b/DbalProducer.php
index <HASH>..<HASH> 100644
--- a/DbalProducer.php
+++ b/DbalProducer.php
@@ -139,7 +139,7 @@ class DbalProducer implements Producer
'redeliver_after' => Type::BIGINT,
]);
} catch (\Exception $e) {
- throw new Exception('The transport fails to send the message due to some internal error.', null, $e);
+ throw new Exception('The transport fails to send the message due to some internal error.', 0, $e);
}
}
|
fix: Wrong parameters for Exception
int must be passed when strict_types is on
|
php-enqueue_dbal
|
train
|
php
|
1b77dcf8caa533eeb24c2a10a7d0ffad2896dd79
|
diff --git a/tests/conftest.py b/tests/conftest.py
index <HASH>..<HASH> 100644
--- a/tests/conftest.py
+++ b/tests/conftest.py
@@ -235,6 +235,21 @@ def environ() -> Iterator[None]:
@pytest.fixture(autouse=True)
+def isolate_environ() -> Iterator[None]:
+ """Ensure the environment is isolated from user configuration."""
+ original_environ = dict(os.environ)
+
+ for var in os.environ:
+ if var.startswith("POETRY_"):
+ del os.environ[var]
+
+ yield
+
+ os.environ.clear()
+ os.environ.update(original_environ)
+
+
+@pytest.fixture(autouse=True)
def git_mock(mocker: MockerFixture) -> None:
# Patch git module to not actually clone projects
mocker.patch("poetry.core.vcs.git.Git.clone", new=mock_clone)
|
test: isolate environment from user config
|
sdispater_poetry
|
train
|
py
|
f7972d075ed62dc23321beebd17fd21515debe94
|
diff --git a/pkg/chartutil/create.go b/pkg/chartutil/create.go
index <HASH>..<HASH> 100644
--- a/pkg/chartutil/create.go
+++ b/pkg/chartutil/create.go
@@ -97,6 +97,8 @@ replicaCount: 1
image:
repository: nginx
pullPolicy: IfNotPresent
+ # Overrides the image tag whose default is the chart version.
+ tag: ""
imagePullSecrets: []
nameOverride: ""
@@ -262,7 +264,7 @@ spec:
- name: {{ .Chart.Name }}
securityContext:
{{- toYaml .Values.securityContext | nindent 12 }}
- image: "{{ .Values.image.repository }}:{{ .Chart.AppVersion }}"
+ image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
ports:
- name: http
|
feat: allow image tag override
While using the chart version as image tag is the sanest default, it is not uncommon to want to override this if using a custom image, or using helm to manage an in-house app running different tags across different environments.
|
helm_helm
|
train
|
go
|
9136116eb10d7307392df5fcf6b3fa3133a4a6f8
|
diff --git a/lib/client-pipeline.js b/lib/client-pipeline.js
index <HASH>..<HASH> 100644
--- a/lib/client-pipeline.js
+++ b/lib/client-pipeline.js
@@ -176,13 +176,11 @@ class PipelineHandler extends AsyncResource {
_onData (chunk) {
const { res } = this
- if (res.push(chunk)) {
- return true
- } else if (!res._readableState.destroyed) {
- return false
- } else {
- return null
+ if (res._readableState.destroyed) {
+ return
}
+
+ return res.push(chunk)
}
_onComplete (trailers) {
|
refactor: cleanup onData handler
|
mcollina_undici
|
train
|
js
|
3093b3d787bd61465a73ed22f52d7e21953c4391
|
diff --git a/lib/manager/npm/package.js b/lib/manager/npm/package.js
index <HASH>..<HASH> 100644
--- a/lib/manager/npm/package.js
+++ b/lib/manager/npm/package.js
@@ -40,7 +40,7 @@ async function getPackageUpdates(config) {
'. This will block *all* dependencies from being updated due to presence of lock file.';
}
results = [result];
- logger.info(result.message);
+ logger.info({ dependency: config.depName }, result.message);
}
for (const result of results) {
result.repositoryUrl =
|
refactor: log dependency name when lookups are blocking
|
renovatebot_renovate
|
train
|
js
|
f35f58aec907c5614aea45ac4f58e3c6589e4408
|
diff --git a/test/integration/require.js b/test/integration/require.js
index <HASH>..<HASH> 100644
--- a/test/integration/require.js
+++ b/test/integration/require.js
@@ -8,6 +8,7 @@ describe('Requireability', function () {
admin_port: 5020,
admin_password: '12345'
};
+ this.timeout(5000);
hoodie_server.start(config, function() {
// verify this function get called
expect(true).to.be(true);
|
test(integration): increase timeout for requireability integration test
|
hoodiehq_hoodie-server
|
train
|
js
|
7a8e2b34631aa8ae7037059deb5c2108a2ca2cb4
|
diff --git a/pkg/apis/workflow/v1alpha1/workflow_types.go b/pkg/apis/workflow/v1alpha1/workflow_types.go
index <HASH>..<HASH> 100644
--- a/pkg/apis/workflow/v1alpha1/workflow_types.go
+++ b/pkg/apis/workflow/v1alpha1/workflow_types.go
@@ -35,13 +35,20 @@ type NodePhase string
// Workflow and node statuses
const (
- NodePending NodePhase = "Pending"
- NodeRunning NodePhase = "Running"
+ // Node is waiting to run
+ NodePending NodePhase = "Pending"
+ // Node is running
+ NodeRunning NodePhase = "Running"
+ // Node finished with no errors
NodeSucceeded NodePhase = "Succeeded"
- NodeSkipped NodePhase = "Skipped"
- NodeFailed NodePhase = "Failed"
- NodeError NodePhase = "Error"
- NodeOmitted NodePhase = "Omitted"
+ // Node was skipped
+ NodeSkipped NodePhase = "Skipped"
+ // Node or child of node exited with non-0 code
+ NodeFailed NodePhase = "Failed"
+ // Node had an error other than a non 0 exit code
+ NodeError NodePhase = "Error"
+ // Node was omitted because its `depends` condition was not met (only relevant in DAGs)
+ NodeOmitted NodePhase = "Omitted"
)
// NodeType is the type of a node
|
docs: Add comments to NodePhase definition. Closes #<I>. (#<I>)
|
argoproj_argo
|
train
|
go
|
d2f52c581007cf91ef7d88c630f5a3edff1faba0
|
diff --git a/fleetctl/start.go b/fleetctl/start.go
index <HASH>..<HASH> 100644
--- a/fleetctl/start.go
+++ b/fleetctl/start.go
@@ -28,7 +28,7 @@ You may filter suitable hosts based on metadata provided by the machine.
Machine metadata is located in the fleet configuration file.
Start a unit on any "us-east" machine:
-fleetctl start --require region,us-east foo.service`,
+fleetctl start --require region=us-east foo.service`,
Flags: []cli.Flag{
cli.StringFlag{"require", "", "Filter suitable hosts with a set of requirements. Format is comma-delimited list of <key>=<value> pairs."},
},
|
fix(docs): Typo in fleetctl start docs
|
coreos_fleet
|
train
|
go
|
ffe3ec5a82ba6576c6b891215fa856cf9128ebeb
|
diff --git a/packages/d3fc-annotation/src/band.js b/packages/d3fc-annotation/src/band.js
index <HASH>..<HASH> 100644
--- a/packages/d3fc-annotation/src/band.js
+++ b/packages/d3fc-annotation/src/band.js
@@ -44,6 +44,8 @@ export default () => {
.append('path')
.classed('band', true);
+ g.classed(orient, true);
+
g.select('path')
// the path generator is being used to render a single path, hence
// an explicit index is provided
|
fix: add orient value to classes
|
d3fc_d3fc
|
train
|
js
|
e0e83ccffa5efc63df5e523d864250f377ccfc3d
|
diff --git a/packages/vaex-core/vaex/remote.py b/packages/vaex-core/vaex/remote.py
index <HASH>..<HASH> 100644
--- a/packages/vaex-core/vaex/remote.py
+++ b/packages/vaex-core/vaex/remote.py
@@ -530,6 +530,11 @@ class DatasetRest(DatasetRemote):
ds.state_set(state, use_active_range=True)
return ds
+ def trim(self, inplace=False):
+ df = self if inplace else self.copy()
+ # can we get away with not trimming?
+ return df
+
def count(self, expression=None, binby=[], limits=None, shape=default_shape, selection=False, delay=False, edges=False, progress=None):
return self._delay(delay, self.server._call_dataset("count", self, delay=True, progress=progress, expression=expression, binby=binby, limits=limits, shape=shape, selection=selection, edges=edges))
|
feat(remote): WORKAROUND/FIXME trim support for remote dataframe is a no-op
|
vaexio_vaex
|
train
|
py
|
e6a39db7f329a0bf9ffd5bf98a86302786b3902c
|
diff --git a/functional/rs_mocks/primary_loses_network_tests.js b/functional/rs_mocks/primary_loses_network_tests.js
index <HASH>..<HASH> 100644
--- a/functional/rs_mocks/primary_loses_network_tests.js
+++ b/functional/rs_mocks/primary_loses_network_tests.js
@@ -144,11 +144,17 @@ describe('ReplSet Primary Loses Network (mocks)', function() {
}
);
+ let cleaningUp = false;
server.on('error', done);
server.on('left', function(_type) {
if (_type === 'primary') {
server.on('joined', function(__type, __server) {
if (__type === 'primary' && __server.name === 'localhost:32002') {
+ if (cleaningUp) {
+ return;
+ }
+
+ cleaningUp = true;
mock.cleanup(
[server, primaryServer, firstSecondaryServer, secondSecondaryServer],
spy,
|
test(rs-mocks): ensure cleanup only occurs one time
NODE-<I>
|
mongodb_node-mongodb-native
|
train
|
js
|
51c617957671d09fe3cd47aab976af4902c5136c
|
diff --git a/src/Client.php b/src/Client.php
index <HASH>..<HASH> 100644
--- a/src/Client.php
+++ b/src/Client.php
@@ -34,6 +34,7 @@ use GuzzleHttp\ClientInterface;
use GuzzleHttp\Ring\Client\StreamHandler;
use Psr\Cache\CacheItemPoolInterface;
use Psr\Http\Message\RequestInterface;
+use Psr\Http\Message\ResponseInterface;
use Psr\Log\LoggerInterface;
use Monolog\Logger;
use Monolog\Handler\StreamHandler as MonologStreamHandler;
|
chore: fix class reference in docblock (#<I>)
|
googleapis_google-api-php-client
|
train
|
php
|
b5194b79e9414a758e4863721ad3746993cd85bf
|
diff --git a/webapps/src/main/java/org/camunda/bpm/webapp/impl/security/filter/CsrfPreventionFilter.java b/webapps/src/main/java/org/camunda/bpm/webapp/impl/security/filter/CsrfPreventionFilter.java
index <HASH>..<HASH> 100644
--- a/webapps/src/main/java/org/camunda/bpm/webapp/impl/security/filter/CsrfPreventionFilter.java
+++ b/webapps/src/main/java/org/camunda/bpm/webapp/impl/security/filter/CsrfPreventionFilter.java
@@ -255,7 +255,12 @@ public class CsrfPreventionFilter implements Filter {
Cookie csrfCookie = getCSRFCookie(request);
csrfCookie.setValue(token);
- csrfCookie.setPath(request.getContextPath());
+
+ String contextPath = "/";
+ if (!request.getContextPath().isEmpty()) {
+ contextPath = request.getContextPath();
+ }
+ csrfCookie.setPath(contextPath);
session.setAttribute(CsrfConstants.CSRF_TOKEN_SESSION_ATTR_NAME, token);
response.addCookie(csrfCookie);
|
fix(csrf): define default cookie path
* Set the root context path as the cookie path if no context path is defined. This is needed in order to avoid the user agent using the request uri path component as the default value since it will make the CSRF token unavailable to other requests.
Related to CAM-<I>
|
camunda_camunda-bpm-platform
|
train
|
java
|
f217f17ad1648a214b57d1598f0fa74409df5e5d
|
diff --git a/test/integration/sanity/url-sanity-before-request.test.js b/test/integration/sanity/url-sanity-before-request.test.js
index <HASH>..<HASH> 100644
--- a/test/integration/sanity/url-sanity-before-request.test.js
+++ b/test/integration/sanity/url-sanity-before-request.test.js
@@ -188,7 +188,7 @@ describe('url', function () {
});
it('should have called request event once', function () {
- var emptyUrlErrorMessage = 'runtime:extenstions~request: request url is empty';
+ var emptyUrlErrorMessage = 'runtime:extensions~request: request url is empty';
expect(testrun).to.nested.include({
'request.callCount': 1
|
fix: typo extenstions for extensions
|
postmanlabs_postman-runtime
|
train
|
js
|
22f72fb0a49ea809baa4e41ca1f903daaed9001d
|
diff --git a/test/src/index.spec.js b/test/src/index.spec.js
index <HASH>..<HASH> 100644
--- a/test/src/index.spec.js
+++ b/test/src/index.spec.js
@@ -194,7 +194,7 @@ describe('vue-howler mixin', function () {
expect(p.playing).to.be.true
p.stop()
})
- .then(Vue.nextTick())
+ .then(waitForEvent(p, 'stop', 3000))
.then(() => {
console.log('done!')
})
|
test: wait for stop event instead of Vue.nextTick
|
mickdekkers_vue-howler
|
train
|
js
|
969723f32f505d2b9c0da445f3ce0d174ed990b8
|
diff --git a/src/constants/blockchains.js b/src/constants/blockchains.js
index <HASH>..<HASH> 100644
--- a/src/constants/blockchains.js
+++ b/src/constants/blockchains.js
@@ -23,7 +23,7 @@ export const BLOCKCHAINS = {
},
ethropst: {
code: 'ethropst',
- name: 'Ethereum',
+ name: 'Ethereum Testnet',
signatureValue: 'ethereumRopsten',
transactionTemplates: {
full: `https://ropsten.etherscan.io/tx/${TRANSACTION_TEMPLATE_ID_PLACEHOLDER}`,
@@ -52,7 +52,7 @@ export const BLOCKCHAINS = {
},
testnet: {
code: 'testnet',
- name: 'Mocknet',
+ name: 'Bitcoin Testnet',
signatureValue: 'bitcoinTestnet',
transactionTemplates: {
full: `https://testnet.blockchain.info/tx/${TRANSACTION_TEMPLATE_ID_PLACEHOLDER}`,
|
fix(Blockchains): improve testnet chains name
|
blockchain-certificates_cert-verifier-js
|
train
|
js
|
7804c337be6c4197383aaa4525577087d9339c0e
|
diff --git a/src/index.js b/src/index.js
index <HASH>..<HASH> 100644
--- a/src/index.js
+++ b/src/index.js
@@ -1,3 +1,5 @@
+import './style/index.less';
+
import Table from './components/table.vue';
import TableColumn from './components/table-column.vue';
|
refactor: Add index.less imported
|
dwqs_v2-table
|
train
|
js
|
a977a7f01899c92bd08127ac23f0188089fda136
|
diff --git a/src/renderHtml.js b/src/renderHtml.js
index <HASH>..<HASH> 100644
--- a/src/renderHtml.js
+++ b/src/renderHtml.js
@@ -35,15 +35,22 @@ module.exports = async function renderHtml({
}
function ensureDirectory(dir) {
- return new Promise(resolve =>
- clientCompiler.outputFileSystem.mkdirp(dir, () => {
+ return new Promise((resolve, reject) =>
+ clientCompiler.outputFileSystem.mkdirp(dir, error => {
+ if (error) {
+ reject(error);
+ }
resolve();
})
);
}
function writeFile(dir, content) {
- return new Promise(resolve =>
- clientCompiler.outputFileSystem.writeFile(dir, content, () => {
+ return new Promise((resolve, reject) =>
+ clientCompiler.outputFileSystem.writeFile(dir, content, error => {
+ if (error) {
+ reject(error);
+ }
+
resolve();
})
);
@@ -94,8 +101,8 @@ module.exports = async function renderHtml({
);
}
- ensureDirectory(newFileDir);
- writeFile(newFilePath, renderResult);
+ await ensureDirectory(newFileDir);
+ await writeFile(newFilePath, renderResult);
}
- routes.forEach(render);
+ return Promise.all(routes.map(render));
};
|
fix: Await all async operations (#3)
|
jahredhope_html-render-webpack-plugin
|
train
|
js
|
ff1a75b42dd302a42ff842550c66307e5bafa0a8
|
diff --git a/lib/workers/branch/yarn.js b/lib/workers/branch/yarn.js
index <HASH>..<HASH> 100644
--- a/lib/workers/branch/yarn.js
+++ b/lib/workers/branch/yarn.js
@@ -84,6 +84,9 @@ async function generateLockFile(tmpDir, env) {
},
'yarn install error'
);
+ if (err.stderr && err.stderr.includes('ENOSPC: no space left on device')) {
+ throw new Error('Out of disk space when generating yarn.lock');
+ }
return { error: true, stderr: err.stderr };
}
return { lockFile };
|
fix: throw error if yarn out of disk space
Closes #<I>
|
renovatebot_renovate
|
train
|
js
|
ce7352d840071951350e7916e12852c12756dda7
|
diff --git a/commitlint.config.js b/commitlint.config.js
index <HASH>..<HASH> 100644
--- a/commitlint.config.js
+++ b/commitlint.config.js
@@ -1,3 +1,8 @@
module.exports = {
extends: ["@commitlint/config-conventional"],
+ rules: {
+ "header-max-length": [0],
+ "body-max-line-length": [0],
+ "footer-max-line-length": [0],
+ },
};
|
chore: disable length related `commitlint` rules (#<I>)
|
webpack_webpack-cli
|
train
|
js
|
163e98ab26216a3f4451e7c141db6de71012e697
|
diff --git a/auto_changelog/repository.py b/auto_changelog/repository.py
index <HASH>..<HASH> 100644
--- a/auto_changelog/repository.py
+++ b/auto_changelog/repository.py
@@ -89,6 +89,10 @@ class GitRepository(RepositoryInterface):
for release_index in reversed(range(len(changelog.releases) - 1)):
releases[release_index].set_compare_url(diff_url, releases[release_index + 1].title)
+ # Close the link to the repository
+ # If we are not closing it, some references are not cleaned on windows
+ self.repository.close()
+
return changelog
def _issue_from_git_remote_url(self, remote: str) -> Optional[str]:
|
fix(git): clean references after process
|
Michael-F-Bryan_auto-changelog
|
train
|
py
|
77c87470d59a8d028bb24cd52c76f66ae6af4c90
|
diff --git a/front_end/ndb/NdbMain.js b/front_end/ndb/NdbMain.js
index <HASH>..<HASH> 100644
--- a/front_end/ndb/NdbMain.js
+++ b/front_end/ndb/NdbMain.js
@@ -87,7 +87,7 @@ Ndb.NdbMain = class extends Common.Object {
static _calculateBlackboxState() {
const blackboxInternalScripts = Common.moduleSetting('blackboxInternalScripts').get();
- const PATTERN = '^internal[\\/].*';
+ const PATTERN = '^internal[\\/].*|bin/npm-cli\.js$|bin/yarn\.js$';
const regexPatterns = Common.moduleSetting('skipStackFramesPattern').getAsArray()
.filter(({pattern}) => pattern !== PATTERN && pattern !== '^internal/.*');
if (blackboxInternalScripts)
@@ -231,7 +231,7 @@ Ndb.NodeProcessManager = class extends Common.Object {
const scriptURL = Common.ParsedURL.platformPathToURL(info.scriptName);
const uiSourceCode = Workspace.workspace.uiSourceCodeForURL(scriptURL);
const isBlackboxed = Bindings.blackboxManager.isBlackboxedURL(scriptURL, false);
- if ((isBlackboxed || !uiSourceCode)) {
+ if (isBlackboxed) {
await target.runtimeAgent().runIfWaitingForDebugger();
return this._service.disconnect(target.id());
}
|
fix(frontend): do not connect iff main is blackboxed
In <I> more radical behavior was introduced - do not connect
to all process with blackboxed main or with main outside cwd.
Fixes <URL>
|
GoogleChromeLabs_ndb
|
train
|
js
|
742de1bed88c20dffda595de9e51bcda343798dc
|
diff --git a/engine-rest/engine-rest/src/main/java/org/camunda/bpm/engine/rest/dto/history/UserOperationLogEntryDto.java b/engine-rest/engine-rest/src/main/java/org/camunda/bpm/engine/rest/dto/history/UserOperationLogEntryDto.java
index <HASH>..<HASH> 100644
--- a/engine-rest/engine-rest/src/main/java/org/camunda/bpm/engine/rest/dto/history/UserOperationLogEntryDto.java
+++ b/engine-rest/engine-rest/src/main/java/org/camunda/bpm/engine/rest/dto/history/UserOperationLogEntryDto.java
@@ -44,6 +44,7 @@ public class UserOperationLogEntryDto {
protected String property;
protected String orgValue;
protected String newValue;
+ protected Date removalTime;
public static UserOperationLogEntryDto map(UserOperationLogEntry entry) {
UserOperationLogEntryDto dto = new UserOperationLogEntryDto();
@@ -69,6 +70,7 @@ public class UserOperationLogEntryDto {
dto.property = entry.getProperty();
dto.orgValue = entry.getOrgValue();
dto.newValue = entry.getNewValue();
+ dto.removalTime = entry.getRemovalTime();
return dto;
}
@@ -164,4 +166,8 @@ public class UserOperationLogEntryDto {
public String getNewValue() {
return newValue;
}
+
+ public Date getRemovalTime() {
+ return removalTime;
+ }
}
|
feat(rest): expose removal time to user operation log
Related to CAM-<I>
|
camunda_camunda-bpm-platform
|
train
|
java
|
ceadc0c18cbdacae2a9e5937f01201a08e360fae
|
diff --git a/packages/micro-journeys/src/interactive-pathways.js b/packages/micro-journeys/src/interactive-pathways.js
index <HASH>..<HASH> 100644
--- a/packages/micro-journeys/src/interactive-pathways.js
+++ b/packages/micro-journeys/src/interactive-pathways.js
@@ -117,10 +117,27 @@ class BoltInteractivePathways extends withLitHtml() {
@click=${() => {
this.showPathway(i);
setTimeout(() => {
- this.renderRoot
- .querySelector('bolt-micro-journeys-dropdown')
- .renderRoot.querySelector('button')
- .click();
+ try {
+ let boltMicroJourneyDropdown;
+ let boltMicroJourneyDropdownButton;
+ boltMicroJourneyDropdown = this.renderRoot
+ ? this.renderRoot.querySelector(
+ 'bolt-micro-journeys-dropdown',
+ )
+ : null;
+ if (boltMicroJourneyDropdown) {
+ boltMicroJourneyDropdownButton = boltMicroJourneyDropdown.renderRoot
+ ? boltMicroJourneyDropdown.renderRoot.querySelector(
+ 'button',
+ )
+ : null;
+ }
+ if (boltMicroJourneyDropdownButton) {
+ boltMicroJourneyDropdownButton.click();
+ }
+ } catch {
+ console.error('Autoclose of micro-journey dropdown failed');
+ }
});
}}
style=${menuItemTextColor}
|
feat: pathways dropdown closes with a new pathway is selected
|
bolt-design-system_bolt
|
train
|
js
|
8e68105d7f99bad3d8cfa09b7c0f9a75b270491c
|
diff --git a/lib/cli.js b/lib/cli.js
index <HASH>..<HASH> 100755
--- a/lib/cli.js
+++ b/lib/cli.js
@@ -72,10 +72,11 @@ ${commandHelp()}
}
const cmd = cli.commands[command];
+ let result;
if (cmd) {
try {
- cmd.run(cli);
+ result = cmd.run(cli);
} catch (e) {
if (e instanceof WebpackWoofError) {
log.error(
@@ -87,10 +88,17 @@ ${commandHelp()}
}
}
- // if a command hasn't exited already, and nothing threw, we need to bail
- // here so that the rest of the validation, flag application, and webpack
- // api are NOT run
- process.exit(0);
+ // NOTE: theres probably a better way to write this
+ if (result instanceof Promise) {
+ result.then(() => {
+ process.exit(0);
+ });
+ } else {
+ // if a command hasn't exited already, and nothing threw, we need to bail
+ // here so that the rest of the validation, flag application, and webpack
+ // api are NOT run
+ process.exit(0);
+ }
} else if (cli.input.length) {
const problems = [];
const isDir = (path) => stat(path).isDirectory();
|
refactor: wait for command return before exit
|
webpack-contrib_webpack-command
|
train
|
js
|
e6a4d6a3dd25986e59f44e11e8250d59986c942f
|
diff --git a/query.go b/query.go
index <HASH>..<HASH> 100644
--- a/query.go
+++ b/query.go
@@ -125,6 +125,10 @@ func newQueryRunner(q *dhtQuery) *dhtQueryRunner {
}
func (r *dhtQueryRunner) Run(ctx context.Context, peers []peer.ID) (*dhtQueryResult, error) {
+ // Make sure to clean everything up when we return from this function.
+ ctx, cancel := context.WithCancel(ctx)
+ defer cancel()
+
r.log = logger
r.runCtx = ctx
|
fix(query): cancel the context when the query finishes
|
libp2p_go-libp2p-kad-dht
|
train
|
go
|
86ad4485766e24bcbbcbf3d1db9a2818836fc0e2
|
diff --git a/fleetctl/verify.go b/fleetctl/verify.go
index <HASH>..<HASH> 100644
--- a/fleetctl/verify.go
+++ b/fleetctl/verify.go
@@ -39,14 +39,14 @@ func verifyUnitAction(c *cli.Context) {
sv, err := sign.NewSignatureVerifierFromSSHAgent()
if err != nil {
fmt.Println("Fail to create SignatureVerifier:", err)
- return
+ os.Exit(1)
}
s := r.GetSignatureSetOfPayload(name)
ok, err := sv.VerifyPayload(payload, s)
if !ok || err != nil {
fmt.Printf("Check of payload %s failed: %v\n", payload.Name, err)
- return
+ os.Exit(1)
}
fmt.Printf("Succeed to verify job(%s).\n", payload.Name)
|
fix(fleetctl): exit 1 in verify on failure
|
coreos_fleet
|
train
|
go
|
ef2faf4ec19a9504c77a01f6640252e707b02305
|
diff --git a/lib/venus-mqtt.js b/lib/venus-mqtt.js
index <HASH>..<HASH> 100644
--- a/lib/venus-mqtt.js
+++ b/lib/venus-mqtt.js
@@ -15,6 +15,10 @@ function MQTTStream (options) {
require('util').inherits(MQTTStream, Transform)
+MQTTStream.prototype.discoveryAvailable = function() {
+ return moduleAvailable('md' + 'ns');
+};
+
function mysleep(millis) {
return new Promise(resolve => setTimeout(resolve, millis));
}
@@ -75,7 +79,14 @@ MQTTStream.prototype.pipe = function (pipeTo) {
MQTTStream.prototype.startDiscovery = function() {
var that = this;
return new Promise(function(resolve, reject) {
- var mdns = require('dnssd');
+ if (!that.discoveryAvailable()) {
+ console.log(
+ "Discovery requires mdns or specify hostname and port"
+ );
+ reject('Discovery requires mdns');
+ }
+
+ var mdns = require('md' + 'ns');
function doStart(serviceName) {
let browser = mdns.createBrowser(mdns.tcp(serviceName), {
|
refactor: user dnssd for venus mqtt discovery (#<I>)
|
canboat_canboatjs
|
train
|
js
|
4de04da27a0d3d0176af91d96eeff9d5b4d0fdc4
|
diff --git a/script/lint.js b/script/lint.js
index <HASH>..<HASH> 100755
--- a/script/lint.js
+++ b/script/lint.js
@@ -137,7 +137,7 @@ const LINTERS = [ {
key: 'patches',
roots: ['patches'],
test: () => true,
- run: () => {
+ run: (opts, filenames) => {
const patchesDir = path.resolve(__dirname, '../patches')
for (const patchTarget of fs.readdirSync(patchesDir)) {
const targetDir = path.resolve(patchesDir, patchTarget)
@@ -180,6 +180,18 @@ const LINTERS = [ {
}
}
}
+
+ let ok = true
+ filenames.filter(f => f.endsWith('.patch')).forEach(f => {
+ const patchText = fs.readFileSync(f, 'utf8')
+ if (/^Subject: .*$\s+^diff/.test(patchText)) {
+ console.warn(`Patch file '${f}' has no description. Every patch must contain a justification for why the patch exists and the plan for its removal.`)
+ ok = false
+ }
+ })
+ if (!ok) {
+ process.exit(1)
+ }
}
}]
|
chore: lint patch descriptions (#<I>)
|
electron_electron
|
train
|
js
|
34ccbe38a3acaca03712f3e1eaa3787cd48e7388
|
diff --git a/lib/workers/pr/index.js b/lib/workers/pr/index.js
index <HASH>..<HASH> 100644
--- a/lib/workers/pr/index.js
+++ b/lib/workers/pr/index.js
@@ -148,6 +148,19 @@ async function ensurePr(prConfig) {
config.hasReleaseNotes = config.upgrades.some(upg => upg.hasReleaseNotes);
config.hasCommits = config.upgrades.some(upg => upg.hasCommits);
+ const releaseNoteRepos = [];
+ for (const upgrade of config.upgrades) {
+ if (releaseNoteRepos.includes(upgrade.repositoryUrl)) {
+ logger.debug(
+ { depName: upgrade.depName },
+ 'Removing duplicate release notes'
+ );
+ upgrade.hasReleaseNotes = false;
+ } else {
+ releaseNoteRepos.push(upgrade.repositoryUrl);
+ }
+ }
+
const prTitle = handlebars.compile(config.prTitle)(config);
let prBody = handlebars.compile(config.prBody)(config);
if (config.isGitHub && !config.privateRepo) {
|
fix: de-dupe release notes in each PR
|
renovatebot_renovate
|
train
|
js
|
db6ac39ba99bcdf7bc3d1e6b94902b758f82746c
|
diff --git a/cobra/test/test_io/test_sbml.py b/cobra/test/test_io/test_sbml.py
index <HASH>..<HASH> 100644
--- a/cobra/test/test_io/test_sbml.py
+++ b/cobra/test/test_io/test_sbml.py
@@ -4,6 +4,7 @@
from __future__ import absolute_import
+from io import BytesIO
from os.path import getsize, join
import pytest
@@ -39,6 +40,15 @@ def test_read_sbml_model(data_directory, mini_fbc1_model, mini_cobra_model):
assert compare_models(mini_cobra_model, mini_cobra) is None
+@pytest.mark.skipif(libsbml is None, reason="libsbml unavailable.")
+def test_read_file_handle(data_directory, mini_model):
+ """Test the reading of a model passed as a file handle."""
+ with open(join(data_directory, "mini_cobra.xml"), "rb") as file_:
+ model_stream = BytesIO(file_.read())
+ read_model = io.read_sbml_model(model_stream)
+ assert compare_models(mini_model, read_model) is None
+
+
# TODO: parametrize the arguments after pytest.fixture_request()
# is approved
@pytest.mark.skipif(libsbml is None, reason="libsbml unavailable.")
|
test: passing file-like object to `read_sbml_model`
|
opencobra_cobrapy
|
train
|
py
|
6e6489a40847de16eceed718152427d3239d135b
|
diff --git a/browser-providers.conf.js b/browser-providers.conf.js
index <HASH>..<HASH> 100644
--- a/browser-providers.conf.js
+++ b/browser-providers.conf.js
@@ -46,7 +46,7 @@ var customLaunchers = {
'SL_CHROME': {base: 'SauceLabs', browserName: 'chrome', version: '67'},
'SL_CHROMEBETA': {base: 'SauceLabs', browserName: 'chrome', version: 'beta'},
'SL_CHROMEDEV': {base: 'SauceLabs', browserName: 'chrome', version: 'dev'},
- 'SL_FIREFOX': {base: 'SauceLabs', browserName: 'firefox', version: '54'},
+ 'SL_FIREFOX': {base: 'SauceLabs', browserName: 'firefox', version: '61'},
'SL_FIREFOXBETA':
{base: 'SauceLabs', platform: 'Windows 10', browserName: 'firefox', version: 'beta'},
'SL_FIREFOXDEV':
|
ci: update firefox version to <I> (#<I>)
PR Close #<I>
|
angular_angular
|
train
|
js
|
e6ff0850cfe17cbdb529e843c0fe64dc8a84a82e
|
diff --git a/test/tools/runner/filters/client_encryption_filter.js b/test/tools/runner/filters/client_encryption_filter.js
index <HASH>..<HASH> 100644
--- a/test/tools/runner/filters/client_encryption_filter.js
+++ b/test/tools/runner/filters/client_encryption_filter.js
@@ -1,6 +1,8 @@
'use strict';
const mongodb = require('../../../../index');
+const semver = require('semver');
+
/**
* Filter for whether or not a test needs / doesn't need Client Side Encryption
*
@@ -40,8 +42,11 @@ class ClientSideEncryptionFilter {
const clientSideEncryption =
test.metadata && test.metadata.requires && test.metadata.requires.clientSideEncryption;
+ // CSFLE is only supported on LTS versions of node
+ const nodeSupportsCSFLE = semver.satisfies(process.version, '>4');
+
const ret = typeof clientSideEncryption !== 'boolean' || clientSideEncryption === this.enabled;
- return ret;
+ return ret && nodeSupportsCSFLE;
}
}
|
test: only test CSFLE on LTS versions of node
|
mongodb_node-mongodb-native
|
train
|
js
|
9249b78761106632f0402c82d6a5b1d9f1451d38
|
diff --git a/builder/image/get-app-values.go b/builder/image/get-app-values.go
index <HASH>..<HASH> 100644
--- a/builder/image/get-app-values.go
+++ b/builder/image/get-app-values.go
@@ -35,6 +35,6 @@ func main() {
values := release["values"].(map[string]interface{})
for k, v := range values {
- fmt.Print(" -e " + k + "=\"" + v.(string) + "\"")
+ fmt.Printf(" -e %s=\"%v\"", k, v)
}
}
|
fix(builder): avoid issues with non-string release values
|
deis_deis
|
train
|
go
|
a7be844ada17437a119f2cd8d972559d89d4037a
|
diff --git a/packages/pob/lib/generators/common/format-lint/updateEslintConfig.js b/packages/pob/lib/generators/common/format-lint/updateEslintConfig.js
index <HASH>..<HASH> 100644
--- a/packages/pob/lib/generators/common/format-lint/updateEslintConfig.js
+++ b/packages/pob/lib/generators/common/format-lint/updateEslintConfig.js
@@ -85,7 +85,7 @@ function updateSettings(config, settings) {
}
});
- if (Object.keys(config.settings) === 0) {
+ if (config.settings && Object.keys(config.settings) === 0) {
delete config.settings;
}
|
fix: when settings not defined in eslint config
|
christophehurpeau_pob-lerna
|
train
|
js
|
319dd81414947718c392201a24ce5554679b16e7
|
diff --git a/lib/wrapped-fs.js b/lib/wrapped-fs.js
index <HASH>..<HASH> 100644
--- a/lib/wrapped-fs.js
+++ b/lib/wrapped-fs.js
@@ -5,18 +5,24 @@ const { promisify } = require('util')
const fs = process.versions.electron ? require('original-fs') : require('fs')
const mkdirp = require('mkdirp')
-const methods = [
+const promisifiedMethods = [
'lstat',
'readFile',
'stat',
'writeFile'
]
-for (const method of methods) {
- fs[method] = promisify(fs[method])
+const promisified = {}
+
+for (const method of Object.keys(fs)) {
+ if (promisifiedMethods.includes(method)) {
+ promisified[method] = promisify(fs[method])
+ } else {
+ promisified[method] = fs[method]
+ }
}
// To make it more like fs-extra
-fs.mkdirp = promisify(mkdirp)
-fs.mkdirpSync = mkdirp.sync
+promisified.mkdirp = promisify(mkdirp)
+promisified.mkdirpSync = mkdirp.sync
-module.exports = fs
+module.exports = promisified
|
fix: don't monkeypatch fs with promisified versions (#<I>)
|
electron_asar
|
train
|
js
|
c0feceb73c6c7a38cddc40898cdfbcb0ae83a35e
|
diff --git a/src/index.js b/src/index.js
index <HASH>..<HASH> 100644
--- a/src/index.js
+++ b/src/index.js
@@ -26,7 +26,7 @@ class ErrorOverlayPlugin {
const originalBefore = options.devServer.before
options.devServer.before = (app, server) => {
if (originalBefore) {
- originalBefore(app, server)
+ originalBefore(app, server, compiler)
}
app.use(errorOverlayMiddleware())
}
|
fix: pass in compiler to devServer before() (#<I>)
The [`devServer.before()`](<URL>) API accepts three arguments: `app`, `server`, and `compiler`. When overriding this function, though, `error-overlay-webpack-plugin` only passes in the first two arguments, which can lead to exceptions when other `before` functions try to access `compiler`. This fixes that.
|
smooth-code_error-overlay-webpack-plugin
|
train
|
js
|
490cf569ef2383151dfc29fc3c8875e187bd3a7c
|
diff --git a/master/buildbot/test/unit/test_util_kubeclientservice.py b/master/buildbot/test/unit/test_util_kubeclientservice.py
index <HASH>..<HASH> 100644
--- a/master/buildbot/test/unit/test_util_kubeclientservice.py
+++ b/master/buildbot/test/unit/test_util_kubeclientservice.py
@@ -59,7 +59,7 @@ class MockFileBase:
class KubeClientServiceTestClusterConfig(
- MockFileBase, config.ConfigErrorsMixin, unittest.SynchronousTestCase):
+ MockFileBase, config.ConfigErrorsMixin, unittest.TestCase):
file_mock_config = {
'token': 'BASE64_TOKEN',
@@ -79,10 +79,11 @@ class KubeClientServiceTestClusterConfig(
with self.assertRaisesConfigError('kube_dir not found:'):
kubeclientservice.KubeInClusterConfigLoader()
+ @defer.inlineCallbacks
def test_basic(self):
self.patchExist(True)
config = kubeclientservice.KubeInClusterConfigLoader()
- self.successResultOf(config.startService())
+ yield config.startService()
self.assertEqual(
config.getConfig(), {
'headers': {
|
test: Use @defer.inlineCallbacks in kubeclientservice tests
|
buildbot_buildbot
|
train
|
py
|
d5619a2ad7846c1715f7f328faabb004126bfb6c
|
diff --git a/packages/create-webiny-project/utils/createProject.js b/packages/create-webiny-project/utils/createProject.js
index <HASH>..<HASH> 100644
--- a/packages/create-webiny-project/utils/createProject.js
+++ b/packages/create-webiny-project/utils/createProject.js
@@ -121,7 +121,7 @@ module.exports = async function createProject({
// Setup yarn
title: "Setup yarn",
task: async () => {
- await execa("yarn", ["set", "version", "stable"], { cwd: projectRoot });
+ await execa("yarn", ["set", "version", "berry"], { cwd: projectRoot });
const yamlPath = path.join(projectRoot, ".yarnrc.yml");
const parsedYaml = yaml.load(fs.readFileSync(yamlPath, "utf-8"));
|
fix: revert "stable" version
|
Webiny_webiny-js
|
train
|
js
|
13b8347fdd65df8754cad18c0ec0734471a29c70
|
diff --git a/src/utils/user.js b/src/utils/user.js
index <HASH>..<HASH> 100644
--- a/src/utils/user.js
+++ b/src/utils/user.js
@@ -8,10 +8,9 @@ export const GRAVATAR_DEFAULT =
* Generate gravatar url from email address
*/
export function generateGravatarUrl(email: string = ''): string {
- let emailCopy = email;
if (_.isString(email) && _.size(email) > 0) {
- emailCopy = email.trim().toLocaleLowerCase();
- const emailMD5 = stringToMD5(emailCopy);
+ email = email.trim().toLocaleLowerCase();
+ const emailMD5 = stringToMD5(email);
return `https://www.gravatar.com/avatar/${emailMD5}`;
}
return GRAVATAR_DEFAULT;
|
fix: remove useless assignment to local variable emailCopy (#<I>)
|
verdaccio_verdaccio
|
train
|
js
|
4a3910278a057850d758db976c032eec4de03fa7
|
diff --git a/src/bootstrap-table.js b/src/bootstrap-table.js
index <HASH>..<HASH> 100644
--- a/src/bootstrap-table.js
+++ b/src/bootstrap-table.js
@@ -1546,6 +1546,10 @@
return;
}
+ if (that.options.cardView && (!column.cardVisible)) {
+ return;
+ }
+
style = sprintf('style="%s"', csses.concat(that.header.styles[j]).join('; '));
value = calculateObjectValue(column,
|
fix(js): fix cardVisible doesn't work bug
fixes #<I>
|
wenzhixin_bootstrap-table
|
train
|
js
|
4aeb418f6052f11ccefd771a237ba3df050964e6
|
diff --git a/httprunner/ext/har2case/core.py b/httprunner/ext/har2case/core.py
index <HASH>..<HASH> 100644
--- a/httprunner/ext/har2case/core.py
+++ b/httprunner/ext/har2case/core.py
@@ -109,6 +109,9 @@ class HarParser(object):
"""
teststep_headers = {}
for header in entry_json["request"].get("headers", []):
+ if header["name"] == "cookie":
+ continue
+
teststep_headers[header["name"]] = header["value"]
if teststep_headers:
|
fix: remove cookie in request headers
|
HttpRunner_HttpRunner
|
train
|
py
|
db0ec00b9f7f86eeda43fb7c129a7a449c4496e1
|
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -11,7 +11,7 @@ SETUPTOOLS_VER = "30.5.0" # Minimum version that supports pyproject.toml
try:
require("setuptools>=" + SETUPTOOLS_VER)
except VersionConflict:
- sys.exit(f"Error: version of setuptools is too old (<{SETUPTOOLS_VER})!")
+ sys.exit("Error: version of setuptools is too old (<{})!".format(SETUPTOOLS_VER))
__author__ = "Parag Baxi <parag.baxi@gmail.com>"
__copyright__ = "Copyright 2011-2018, Parag Baxi"
|
fix: compatibility with python<I>
|
paragbaxi_qualysapi
|
train
|
py
|
b397f20271d1276a1dd060b3fb82179ef9d0c8d5
|
diff --git a/src/tools/base/BaseBrushTool.js b/src/tools/base/BaseBrushTool.js
index <HASH>..<HASH> 100644
--- a/src/tools/base/BaseBrushTool.js
+++ b/src/tools/base/BaseBrushTool.js
@@ -189,13 +189,34 @@ class BaseBrushTool extends BaseTool {
* @returns {void}
*/
_drawingMouseUpCallback(evt) {
- const eventData = evt.detail;
- const element = eventData.element;
+ const element = evt.detail.element;
+ const imageId = evt.detail.image.imageId;
this._drawing = false;
this._mouseUpRender = true;
- triggerEvent(evt.detail.element, EVENTS.MEASUREMENT_COMPLETED, evt.detail);
+ let measurementData;
+ const toolState = getToolState(element, this.name);
+
+ console.log(toolState);
+
+ if (
+ toolState[imageId] &&
+ toolState[imageId].brush &&
+ toolState[imageId].brush.data[0].pixelData
+ ) {
+ console.log(toolState[imageId].brush);
+ measurementData = toolState;
+ }
+
+ const eventData = {
+ toolType: this.name,
+ element,
+ measurementData,
+ evtDetail: evt.detail,
+ };
+
+ triggerEvent(element, EVENTS.MEASUREMENT_COMPLETED, eventData);
this._stopListeningForMouseUp(element);
}
|
feat: expose better data with brush MEASUREMENT_COMPLETED event
|
cornerstonejs_cornerstoneTools
|
train
|
js
|
56c3b03c01631a81da14569443441d01a04ce3c0
|
diff --git a/pkg/backend/snapshot.go b/pkg/backend/snapshot.go
index <HASH>..<HASH> 100644
--- a/pkg/backend/snapshot.go
+++ b/pkg/backend/snapshot.go
@@ -603,9 +603,11 @@ func (sm *SnapshotManager) snap() *deploy.Snapshot {
// Track pending create operations from the base snapshot
// and propagate them to the new snapshot: we don't want to clear pending CREATE operations
// because these must require user intervention to be cleared or resolved.
- for _, pendingOperation := range sm.baseSnapshot.PendingOperations {
- if pendingOperation.Type == resource.OperationTypeCreating {
- operations = append(operations, pendingOperation)
+ if base := sm.baseSnapshot; base != nil {
+ for _, pendingOperation := range base.PendingOperations {
+ if pendingOperation.Type == resource.OperationTypeCreating {
+ operations = append(operations, pendingOperation)
+ }
}
}
|
fix: do nil check before iterating over subfield (#<I>)
|
pulumi_pulumi
|
train
|
go
|
9fe294675a7abe92384eb8a685ab7e91f2c72852
|
diff --git a/docs/processors/markdown.js b/docs/processors/markdown.js
index <HASH>..<HASH> 100644
--- a/docs/processors/markdown.js
+++ b/docs/processors/markdown.js
@@ -114,8 +114,9 @@ function graphvizualize(data, cb) {
cp.stdout.on('data', function (data) {
buf += data;
});
- cp.stdout.on('end', function () {
- cb(null, buf);
+ cp.on('error', function () {});
+ cp.on('close', function (code) {
+ cb(null, code > 0 ? '' : buf);
});
// set dot to stdin
|
chore(djeni): handle cases where graphviz is not installed
[build-docs]
|
angular_router
|
train
|
js
|
169046e026121a95ef935c3441e3b5fc28609fad
|
diff --git a/test/socket.io.js b/test/socket.io.js
index <HASH>..<HASH> 100644
--- a/test/socket.io.js
+++ b/test/socket.io.js
@@ -172,6 +172,34 @@ describe('socket.io', function(){
});
});
});
+
+ it('should disconnect upon transport disconnection', function(done){
+ var srv = http();
+ var sio = io(srv);
+ srv.listen(function(){
+ var chat = client(srv, '/chat');
+ var news = client(srv, '/news');
+ var total = 2;
+ var totald = 2;
+ var s;
+ sio.of('/news', function(socket){
+ socket.on('disconnect', function(reason){
+ --totald || done();
+ });
+ --total || close();
+ });
+ sio.of('/chat', function(socket){
+ s = socket;
+ socket.on('disconnect', function(reason){
+ --totald || done();
+ });
+ --total || close();
+ });
+ function close(){
+ s.disconnect(true);
+ }
+ });
+ });
});
});
});
|
test: added `disconncet(true)` test
|
socketio_socket.io
|
train
|
js
|
5d20933a34cee8c3ef6b22ebf5afc937d2d096f6
|
diff --git a/actor/base/src/main/java/org/getopentest/base/TestActor.java b/actor/base/src/main/java/org/getopentest/base/TestActor.java
index <HASH>..<HASH> 100644
--- a/actor/base/src/main/java/org/getopentest/base/TestActor.java
+++ b/actor/base/src/main/java/org/getopentest/base/TestActor.java
@@ -1722,7 +1722,9 @@ public class TestActor extends Observable implements ITestActor {
} catch (Exception ex) {
localActionInfo.result = "failed";
- if (this.currentAction != null) {
+ // We don't take screenshots for macros, since the screenshot was
+ // already taken for the action that failed within the macro
+ if (this.currentAction != null && !(localActionInfo.action.equals(MacroAction.class.getName()) )) {
File screenshotFile = this.takeScreenShot(this.currentAction, this.currentSegmentNo, this.currentActionNo, "error");
if (screenshotFile != null) {
localActionInfo.screenshot = screenshotFile.getName();
|
feat(actor): skip screenshot capture for macros
|
mcdcorp_opentest
|
train
|
java
|
7ed9d9a02494f42d06db7cfb211ef6b24c90828b
|
diff --git a/src/aria/utils/overlay/LoadingOverlay.js b/src/aria/utils/overlay/LoadingOverlay.js
index <HASH>..<HASH> 100644
--- a/src/aria/utils/overlay/LoadingOverlay.js
+++ b/src/aria/utils/overlay/LoadingOverlay.js
@@ -163,7 +163,7 @@ module.exports = Aria.classDefinition({
_readText : function () {
ariaUtilsAccessibility.readText(this.__text, {
- parent: this.element
+ parent: this.overlay
});
},
|
fix: Jaws <I> not reading text of loading overlay with Edge
|
ariatemplates_ariatemplates
|
train
|
js
|
80885623c1df75160a7b1c3a6e7283708da0a96a
|
diff --git a/command/agent/fs_endpoint_test.go b/command/agent/fs_endpoint_test.go
index <HASH>..<HASH> 100644
--- a/command/agent/fs_endpoint_test.go
+++ b/command/agent/fs_endpoint_test.go
@@ -437,11 +437,10 @@ func TestHTTP_FS_Logs_Follow(t *testing.T) {
req, err := http.NewRequest("GET", path, p)
require.Nil(err)
respW := httptest.NewRecorder()
- doneCh := make(chan struct{})
+ errCh := make(chan error)
go func() {
- _, err = s.Server.Logs(respW, req)
- require.Nil(err)
- close(doneCh)
+ _, err := s.Server.Logs(respW, req)
+ errCh <- err
}()
out := ""
@@ -458,8 +457,8 @@ func TestHTTP_FS_Logs_Follow(t *testing.T) {
})
select {
- case <-doneCh:
- t.Fatal("shouldn't close")
+ case err := <-errCh:
+ t.Fatalf("shouldn't exit: %v", err)
case <-time.After(1 * time.Second):
}
|
test: don't call t.Fatal from within a goroutine
|
hashicorp_nomad
|
train
|
go
|
96a065560990a5fd06e7bdf38c62502dcba71b9a
|
diff --git a/src/client/WebhookClient.js b/src/client/WebhookClient.js
index <HASH>..<HASH> 100644
--- a/src/client/WebhookClient.js
+++ b/src/client/WebhookClient.js
@@ -20,7 +20,7 @@ class WebhookClient extends BaseClient {
super(options);
Object.defineProperty(this, 'client', { value: this });
this.id = id;
- this.token = token;
+ Object.defineProperty(this, 'token', { value: token, writable: true, configurable: true });
}
}
|
refactor(WebhookClient): make token property non-enumerable (#<I>)
* make WebhookClient#token non-enumerable
parity with Client to add the barest protection against accidental exposure
* requested change
|
discordjs_discord.js
|
train
|
js
|
f126ab1dd60d7e362b112a9fdee4f4355fb0fddb
|
diff --git a/views/js/qtiCreator/helper/xincludeRenderer.js b/views/js/qtiCreator/helper/xincludeRenderer.js
index <HASH>..<HASH> 100644
--- a/views/js/qtiCreator/helper/xincludeRenderer.js
+++ b/views/js/qtiCreator/helper/xincludeRenderer.js
@@ -21,9 +21,8 @@ define([
'lodash',
'taoQtiItem/qtiCreator/helper/commonRenderer',
'taoQtiItem/qtiItem/helper/xincludeLoader',
- 'core/moduleLoader',
- 'taoMediaManager/qtiCreator/editor/styleEditor/styleEditor',
-], function (module, context, _, commonRenderer, xincludeLoader, moduleLoader, styleEditor) {
+ 'core/moduleLoader'
+], function (module, context, _, commonRenderer, xincludeLoader, moduleLoader) {
'use strict';
const moduleConfig = module.config();
@@ -60,8 +59,6 @@ define([
let className = '';
if (hasClass && hasClass.groups && hasClass.groups.className) {
className = hasClass.groups.className;
- } else {
- className = styleEditor.generateHashClass();
}
//loading success :
|
fix: refactor preview on Item when passage without mainClass
|
oat-sa_extension-tao-itemqti
|
train
|
js
|
76e6e5106a356bb0c08075c36acaaa0fdefaa0dd
|
diff --git a/test/instrumentation/native-promises.js b/test/instrumentation/native-promises.js
index <HASH>..<HASH> 100644
--- a/test/instrumentation/native-promises.js
+++ b/test/instrumentation/native-promises.js
@@ -257,7 +257,7 @@ test('Promise.defer -> resolve', function (t) {
setImmediate(function () {
var trans = ins.startTransaction()
var deferred = Promise.defer()
- setTimeout(deferred.resolve, 10, 'foo')
+ setTimeout(deferred.resolve.bind(deferred), 10, 'foo')
deferred.promise.then(function (data) {
t.equal(data, 'foo')
t.equal(ins.currentTransaction._uuid, trans._uuid)
@@ -277,7 +277,7 @@ test('Promise.defer -> reject', function (t) {
setImmediate(function () {
var trans = ins.startTransaction()
var deferred = Promise.defer()
- setTimeout(deferred.reject, 10, 'foo')
+ setTimeout(deferred.reject.bind(deferred), 10, 'foo')
deferred.promise.then(function (data) {
t.fail('should not resolve')
}, function (reason) {
|
test: make non-standard Promises/A+ tests work with Bluebird
|
opbeat_opbeat-node
|
train
|
js
|
4c600178ac26604f5d543028ac846a061e0729f9
|
diff --git a/src/runScript.js b/src/runScript.js
index <HASH>..<HASH> 100644
--- a/src/runScript.js
+++ b/src/runScript.js
@@ -30,7 +30,7 @@ module.exports = function runScript(commands, pathsToLint, packageJson, options)
// Only use gitDir as CWD if we are using the git binary
// e.g `npm` should run tasks in the actual CWD
const execaOptions =
- res.bin.endsWith('git') && options && options.gitDir
+ /git(\.exe)?$/i.test(res.bin) && options && options.gitDir
? { cwd: options.gitDir } : {}
const errors = []
|
fix(gitDir): Fix for checking if task contains `git.exe` on Windows (#<I>)
git detection didn't take file extension into consideration which caused an error when using git task on windows
|
okonet_lint-staged
|
train
|
js
|
7861c275573829a37bbc68bc6085ebc11677376b
|
diff --git a/public/app/core/directives/dash_class.js b/public/app/core/directives/dash_class.js
index <HASH>..<HASH> 100644
--- a/public/app/core/directives/dash_class.js
+++ b/public/app/core/directives/dash_class.js
@@ -32,7 +32,7 @@ function (_, $, coreModule) {
});
$scope.$watch('playlistSrv.isPlaying', function(newValue) {
- elem.toggleClass('playlist-active', newValue);
+ elem.toggleClass('playlist-active', newValue === true);
});
}
};
|
fix: another fix for playlist view state, #<I>
|
grafana_grafana
|
train
|
js
|
a2a82a96a6ab51ed42597dbb9479c4fedeaad927
|
diff --git a/src/js/plyr.js b/src/js/plyr.js
index <HASH>..<HASH> 100644
--- a/src/js/plyr.js
+++ b/src/js/plyr.js
@@ -680,6 +680,8 @@ class Plyr {
set quality(input) {
const config = this.config.quality;
const options = this.options.quality;
+ const duration = this.duration;
+ const isPlaying = this.playing;
if (!options.length) {
return;
@@ -703,6 +705,14 @@ class Plyr {
// Set quality
this.media.quality = quality;
+
+ // seek to duration before changing quality
+ this.seek = duration;
+
+ // continue
+ if (isPlaying) {
+ this.play();
+ }
}
/**
|
fix: continue with the current duration after changing video quality
|
sampotts_plyr
|
train
|
js
|
56cf0151174c807cc05703df87e6cbc53134164b
|
diff --git a/command/agent/agent_test.go b/command/agent/agent_test.go
index <HASH>..<HASH> 100644
--- a/command/agent/agent_test.go
+++ b/command/agent/agent_test.go
@@ -44,6 +44,17 @@ func externalIP() (string, error) {
return "", fmt.Errorf("Unable to find a non-loopback interface")
}
+func TestAgent_MultiStartStop(t *testing.T) {
+ for i := 0; i < 100; i++ {
+ t.Run("", func(t *testing.T) {
+ t.Parallel()
+ a := NewTestAgent(t.Name(), nil)
+ time.Sleep(250 * time.Millisecond)
+ a.Shutdown()
+ })
+ }
+}
+
func TestAgent_StartStop(t *testing.T) {
t.Parallel()
a := NewTestAgent(t.Name(), nil)
|
test: add test for starting/stopping lots of agents
|
hashicorp_consul
|
train
|
go
|
4bf86aab27dd776abbbdf0aa4dee7f1b77a687be
|
diff --git a/lnd_test.go b/lnd_test.go
index <HASH>..<HASH> 100644
--- a/lnd_test.go
+++ b/lnd_test.go
@@ -547,6 +547,10 @@ func testUpdateChannelPolicy(net *lntest.NetworkHarness, t *harnessTest) {
chanAmt, pushAmt)
ctxt, _ = context.WithTimeout(ctxb, time.Second*15)
+ err = net.Alice.WaitForNetworkChannelOpen(ctxt, chanPoint2)
+ if err != nil {
+ t.Fatalf("alice didn't report channel: %v", err)
+ }
err = net.Bob.WaitForNetworkChannelOpen(ctxt, chanPoint2)
if err != nil {
t.Fatalf("bob didn't report channel: %v", err)
|
test: in testUpdateChannelPolicy wait for Alice to learn of all channels
In this commit, we fix an existing flake in the integration tests. If it
was the case that Alice didn't yet know of all the channels, then the
payment attempt below would fail at times, depending on other timing
factors in the test. We fix this flake by waiting for Alice to learn of
all channels before we proceed to the actual testing logic.
|
lightningnetwork_lnd
|
train
|
go
|
778fa85124cda66329e25cffe05d0811abc3cbb0
|
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
@@ -589,6 +589,7 @@ def _setup_travis_ci(gh_repo_name, auth_token, repo_access_token):
# Synchronize a User's projects between GitHub and Travis
LOGGER.info("Synchronizing user projects between GitHub and Travis.")
synced = False
+ count = 0
while not synced:
response = requests.post(
"https://api.travis-ci.org/user/{}/sync".format(t_user["id"]),
@@ -597,8 +598,15 @@ def _setup_travis_ci(gh_repo_name, auth_token, repo_access_token):
if response.status_code == 200:
synced = True
LOGGER.info("Success!")
+ elif count > 600:
+ LOGGER.critical(
+ "Synchronizing user projects failed because the operation "
+ "exceeded the execution time! "
+ "Is either Github or Travis down?")
+ sys.exit(1)
else:
sleep(0.1)
+ count += 1
# Make sure GitHub repo can be found on Travis CI.#
url_safe_repo_name = quote_plus(gh_repo_name)
|
refactor: set timeout for infinite while loop
|
opencobra_memote
|
train
|
py
|
8ab1107c4b04de32bf7b26794009f5434e255548
|
diff --git a/index.js b/index.js
index <HASH>..<HASH> 100644
--- a/index.js
+++ b/index.js
@@ -53,8 +53,10 @@ class CrawlKit {
return this._url;
}
- crawl(finderFn, runners) {
+ crawl(finderFn, runnerMap) {
+ const runners = (typeof runnerMap === 'object') ? runnerMap : {};
const finder = (typeof finderFn === 'function') ? finderFn : noneFinder;
+
const self = this;
const pool = poolModule.Pool({ // eslint-disable-line
name: 'phantomjs',
@@ -139,7 +141,7 @@ class CrawlKit {
}, self.timeout);
},
function run(scope, done) {
- const runnerIds = Object.keys(runners || {});
+ const runnerIds = Object.keys(runners);
if (runnerIds.length) {
const results = task.result.runners = {};
const nextRunner = () => {
|
style: move runner fallback up
|
crawlkit_crawlkit
|
train
|
js
|
d03dae14e7be2246dfbd4daf07baaddb4582a786
|
diff --git a/test/tests/functional/rs_mocks/primary_loses_network_tests.js b/test/tests/functional/rs_mocks/primary_loses_network_tests.js
index <HASH>..<HASH> 100644
--- a/test/tests/functional/rs_mocks/primary_loses_network_tests.js
+++ b/test/tests/functional/rs_mocks/primary_loses_network_tests.js
@@ -144,11 +144,17 @@ describe('ReplSet Primary Loses Network (mocks)', function() {
}
);
+ let cleaningUp = false;
server.on('error', done);
server.on('left', function(_type) {
if (_type === 'primary') {
server.on('joined', function(__type, __server) {
if (__type === 'primary' && __server.name === 'localhost:32002') {
+ if (cleaningUp) {
+ return;
+ }
+
+ cleaningUp = true;
mock.cleanup(
[server, primaryServer, firstSecondaryServer, secondSecondaryServer],
spy,
|
test(rs-mocks): ensure cleanup only occurs one time
NODE-<I>
|
mongodb-js_mongodb-core
|
train
|
js
|
ec7de7f0c03057692eb84b25e9b6f45bed3c5bde
|
diff --git a/packages/plugin-bibjson/src/json.js b/packages/plugin-bibjson/src/json.js
index <HASH>..<HASH> 100644
--- a/packages/plugin-bibjson/src/json.js
+++ b/packages/plugin-bibjson/src/json.js
@@ -78,7 +78,7 @@ function quickscrapeSpecificProps () {
function generalProps (input) {
const output = {
- type: typeMap[input.type] || 'book'
+ type: typeMap[input.type] || 'document'
}
if (input.title) { output.title = input.title }
|
fix(plugin-bibjson): set correct generic type
|
citation-js_citation-js
|
train
|
js
|
5b230a96832f598bbf9ce479e0d50a05218bb5cb
|
diff --git a/sdk/src/core/cc.js b/sdk/src/core/cc.js
index <HASH>..<HASH> 100644
--- a/sdk/src/core/cc.js
+++ b/sdk/src/core/cc.js
@@ -1,5 +1,5 @@
/**
- * @module Web App SDK
+ * @module sofa
*
* @description
* The web app SDK module contains all SDK components you need to build your
|
docs(cc): going sofa!
|
sofa_sofa-couch-service
|
train
|
js
|
827cf4ed8584141cf0c88a37e06f5f9d64aabe06
|
diff --git a/packages/helix-shared-bounce/src/bounce.js b/packages/helix-shared-bounce/src/bounce.js
index <HASH>..<HASH> 100644
--- a/packages/helix-shared-bounce/src/bounce.js
+++ b/packages/helix-shared-bounce/src/bounce.js
@@ -56,7 +56,7 @@ function bounce(func, { responder, timeout = 500 }) {
}
context.log.warn(`error while bouncing: ${e.message}`);
return new Response(e.message, {
- // we acted as a gateway, but the upstream response was bad
+ // we acted as a gateway, but there was an error with the network connection
status: 502,
});
}
|
refactor(bounce): improve comment
|
adobe_helix-shared
|
train
|
js
|
f18538edb9f813a31bdbd9c5399209acbdabc0c8
|
diff --git a/src/AuditableObserver.php b/src/AuditableObserver.php
index <HASH>..<HASH> 100644
--- a/src/AuditableObserver.php
+++ b/src/AuditableObserver.php
@@ -16,7 +16,7 @@ class AuditableObserver
*/
public function created(Auditable $model)
{
- Auditor::audit($model->setAuditEvent('created'));
+ Auditor::execute($model->setAuditEvent('created'));
}
/**
@@ -28,7 +28,7 @@ class AuditableObserver
*/
public function updated(Auditable $model)
{
- Auditor::audit($model->setAuditEvent('updated'));
+ Auditor::execute($model->setAuditEvent('updated'));
}
/**
@@ -40,7 +40,7 @@ class AuditableObserver
*/
public function deleted(Auditable $model)
{
- Auditor::audit($model->setAuditEvent('deleted'));
+ Auditor::execute($model->setAuditEvent('deleted'));
}
/**
@@ -52,6 +52,6 @@ class AuditableObserver
*/
public function restored(Auditable $model)
{
- Auditor::audit($model->setAuditEvent('restored'));
+ Auditor::execute($model->setAuditEvent('restored'));
}
}
|
chore(Observer): updated to reflect changes to the Auditor class
|
owen-it_laravel-auditing
|
train
|
php
|
c9e47e375a49701594e8ce2284b9a4e6e5e05fe5
|
diff --git a/lib/stripe/handlers/invoice.created.js b/lib/stripe/handlers/invoice.created.js
index <HASH>..<HASH> 100644
--- a/lib/stripe/handlers/invoice.created.js
+++ b/lib/stripe/handlers/invoice.created.js
@@ -32,7 +32,7 @@ module.exports = function (stripe) {
return stripe.invoiceItems.create({
customer: customerId,
invoice: invoiceId,
- amount: Math.round(parseInt(data.amount, 10) * VAT),
+ amount: Math.round(parseInt(data.total, 10) * VAT),
currency: 'gbp',
description: 'VAT @ ' + (VAT * 100 | 0) + '%',
});
|
fix: stripe webhooks failing
|
jsbin_jsbin
|
train
|
js
|
75d96051e7cfcb0264a35864cefa64a3ac066855
|
diff --git a/src/Ufo/Core/App.php b/src/Ufo/Core/App.php
index <HASH>..<HASH> 100644
--- a/src/Ufo/Core/App.php
+++ b/src/Ufo/Core/App.php
@@ -208,26 +208,24 @@ class App
}
if ($this->config->routeStorageType == $this->config::STORAGE_TYPE_DB) {
- $section = new Section(
- array_merge(
- ['path' => $path],
- $result->entry->data,
- ['module' => new Module(array_merge(
+ $section = new Section(array_merge(
+ ['path' => $path],
+ $result->entry->data,
+ [
+ 'module' => new Module(array_merge(
$this->getModuleData($result->entry->data['module']),
['callback' => '', 'dbless' => false] //to prevent hack by SQL injection
- ))],
- ['params' => $result->params]
- )
- );
+ ))
+ ],
+ ['params' => $result->params]
+ ));
} else {
- $section = new Section(
- array_merge(
+ $section = new Section(array_merge(
['path' => $path],
$result->entry->data,
['params' => $result->params]
- )
- );
+ ));
}
$this->debugTrace();
|
chore: change code struct to cover by tests
|
enikeishik_ufoframework
|
train
|
php
|
097608843b4e494d0651349d13497c86c58b5da0
|
diff --git a/src/test/browser-config.js b/src/test/browser-config.js
index <HASH>..<HASH> 100644
--- a/src/test/browser-config.js
+++ b/src/test/browser-config.js
@@ -68,7 +68,7 @@ function getConfig (isWebworker, ctx) {
mochaOwnReporter: {
reporter: 'spec'
},
- browserNoActivityTimeout: ctx.timeout
+ browserNoActivityTimeout: 50 * 1000
})
}
|
fix(test): higher disconnect timeout for karma
|
ipfs_aegir
|
train
|
js
|
faeb75c67a1cc6563efd89bb4290700be9479bad
|
diff --git a/build/gulp/doc.js b/build/gulp/doc.js
index <HASH>..<HASH> 100644
--- a/build/gulp/doc.js
+++ b/build/gulp/doc.js
@@ -51,7 +51,7 @@ gulp.task('doc:dev', gulp.series(
gulp.task('doc:clean:dist', () => {
return Promise.all([
exec(`rm -rf ./site/dist; REPO=\`git config remote.origin.url\`; echo $REPO;
- git clone --reference ./ -b gh-pages --single-branch $REPO ./site/dist --depth=1 &&
+ git clone -b gh-pages --single-branch $REPO ./site/dist --depth=1 &&
cd ./site/dist &&
rm -rf ./* && cd ../../`
),
@@ -102,7 +102,7 @@ gulp.task('doc:build', gulp.series(
gulp.task('doc:upload', upload);
gulp.task('doc:push', () => {
- return exec(`cd ./site/dist &&
+ return exec(`cd ./site/dist &&
git add -A;
TIME=\`date +"%Y-%m-%d %H:%M:%S"\`;
git commit -m "build: \${TIME}";
|
chore: reference ./ maybe be a shallow repo
|
ksc-fe_kpc
|
train
|
js
|
ec998e02324761f62158092956443617f39f7e5b
|
diff --git a/lib/seed.plugin.js b/lib/seed.plugin.js
index <HASH>..<HASH> 100644
--- a/lib/seed.plugin.js
+++ b/lib/seed.plugin.js
@@ -41,8 +41,9 @@ const seedModel = function (data, done) {
if (_.isPlainObject(data)) {
filter = data.filter || filter;
transform = data.transform || transform;
- const seed = mergeObjects(data.data || _.omit(data, 'filter', 'transform'));
- seeds = [].concat(seed);
+ seeds = data.data || _.omit(data, 'filter', 'transform');
+ seeds = _.isArray(seeds) ? seeds : mergeObjects(seeds);
+ seeds = [].concat(seeds);
seeds = _.filter(seeds, (seed) => !_.isEmpty(seed));
}
if (_.isFunction(done)) {
|
fix(seed): transform seed to array
|
lykmapipo_mongoose-common
|
train
|
js
|
2deb641efd1af421d4afd28f2ae75a4b10b0870f
|
diff --git a/pkg/storage/storage.go b/pkg/storage/storage.go
index <HASH>..<HASH> 100644
--- a/pkg/storage/storage.go
+++ b/pkg/storage/storage.go
@@ -55,8 +55,8 @@ func (s *Storage) Get(name string, version int) (*rspb.Release, error) {
}
// Create creates a new storage entry holding the release. An
-// error is returned if the storage driver failed to store the
-// release, or a release with identical an key already exists.
+// error is returned if the storage driver fails to store the
+// release, or a release with an identical key already exists.
func (s *Storage) Create(rls *rspb.Release) error {
s.Log("creating release %q", makeKey(rls.Name, rls.Version))
if s.MaxHistory > 0 {
|
fix(typo): fix typo of storage doc
|
helm_helm
|
train
|
go
|
47bde468d69b06cc586ec82e4ad1db71ac8445f6
|
diff --git a/lib/index.js b/lib/index.js
index <HASH>..<HASH> 100644
--- a/lib/index.js
+++ b/lib/index.js
@@ -33,18 +33,15 @@ class Polka extends Router {
res.end(body || http.STATUS_CODES[code]);
}
- handler(req, res, info) {
- let uri = req.url;
- info = info || this.parse(req);
-
+ handler(req, res, next) {
// Only do work if route is found~!
- // console.log(`${ req.method } on ${ uri }`);
- let obj = this.find(req.method, uri);
+ let obj = this.find(req.method, req.url);
if (!obj) return this.send(res, 501);
// Provide `req.params`
req.params = obj.params;
// Grab addl values from `info`
+ let info = this.parse(req);
req.pathname = info.pathname;
req.search = info.search;
req.query = info.query;
@@ -60,7 +57,7 @@ class Polka extends Router {
}
// Run route's callback
- return obj.handler(req, res);
+ return obj.handler(req, res, next);
}
}
|
fix: `handler()` takes & passes `next` as 3rd arg
|
lukeed_polka
|
train
|
js
|
500d0463f4018edacaa2441ae0450bc617179186
|
diff --git a/test/testEditionRevision.js b/test/testEditionRevision.js
index <HASH>..<HASH> 100644
--- a/test/testEditionRevision.js
+++ b/test/testEditionRevision.js
@@ -147,7 +147,7 @@ describe('EditionRevision model', () => {
.then((revision) => revision.toJSON());
return expect(revisionPromise).to.eventually.have.all.keys([
- 'id', 'revision', 'entity', 'data', 'bbid', 'dataId'
+ 'id', 'revision', 'entity', 'data', 'bbid', 'dataId', 'isMerge'
]);
});
});
diff --git a/test/testRevision.js b/test/testRevision.js
index <HASH>..<HASH> 100644
--- a/test/testRevision.js
+++ b/test/testRevision.js
@@ -81,7 +81,7 @@ describe('Revision model', () => {
.then((revision) => revision.toJSON());
return expect(revisionPromise).to.eventually.have.all.keys([
- 'id', 'author', 'authorId', 'createdAt', 'parents', 'children'
+ 'id', 'author', 'authorId', 'createdAt', 'parents', 'children', 'isMerge'
]);
});
});
|
test: Fix revision tests for merge schema
|
bookbrainz_bookbrainz-data-js
|
train
|
js,js
|
41fa5f7fbf9a7009456b7abc0ee403e4ff7fe209
|
diff --git a/lib/helpers.js b/lib/helpers.js
index <HASH>..<HASH> 100644
--- a/lib/helpers.js
+++ b/lib/helpers.js
@@ -61,7 +61,7 @@ module.exports.createHelpers = function createHelpers(app) {
if (full) {
root = app.set('url full');
} else {
- root = app.set('url prefix') || '/';
+ root = app.set('url prefix');
}
// Remove preceding slash if one exists.
|
fix: revert the default slash change
|
jsbin_jsbin
|
train
|
js
|
90765302385ff303b8c3605d667fd8f2ab38d273
|
diff --git a/babel.config.js b/babel.config.js
index <HASH>..<HASH> 100644
--- a/babel.config.js
+++ b/babel.config.js
@@ -103,6 +103,13 @@ const plugins = () => {
return [
...defaultPlugins,
[
+ 'emotion',
+ {
+ sourceMap: false,
+ autoLabel: false,
+ },
+ ],
+ [
'inline-react-svg',
{
svgo: {
diff --git a/scripts/webpack.js b/scripts/webpack.js
index <HASH>..<HASH> 100644
--- a/scripts/webpack.js
+++ b/scripts/webpack.js
@@ -5,6 +5,7 @@ const { toGlobalName, externals } = require('./externals');
const pkg = require(path.join(process.cwd(), 'package.json'));
const isProduction = process.env.NODE_ENV === 'production';
+const isTest = process.env.NODE_ENV === 'test';
const rules = () => ({
js: () => ({
@@ -111,7 +112,7 @@ const baseConfig = ({ target = isProduction ? 'umd' : 'umddir' } = {}) => ({
rules: Object.values(rules()).map(rule => rule()),
},
plugins: Object.values(plugins()).map(plugin => plugin()),
- devtool: 'source-map',
+ devtool: isTest ? '' : 'source-map',
target: 'web',
/**
|
chore: fix node out of memory issues (#<I>)
|
netlify_netlify-cms
|
train
|
js,js
|
9b4997e7168ed37691be2fcf85ccfd11211f8a8d
|
diff --git a/src/util.js b/src/util.js
index <HASH>..<HASH> 100644
--- a/src/util.js
+++ b/src/util.js
@@ -109,7 +109,11 @@ export const menuAllProps = [
'expandIcon',
];
-export const getWidth = (elem) => (elem && elem.getBoundingClientRect().width) || 0;
+export const getWidth = (elem) => (
+ elem &&
+ typeof elem.getBoundingClientRect === 'function' &&
+ elem.getBoundingClientRect().width
+) || 0;
export const setWidth = (elem, width) => {
if (elem && typeof elem.style === 'object') {
|
fix: add more check before invoking dom operations
|
react-component_menu
|
train
|
js
|
67d2726b90cbfb2595b4fad3060876b155ef8104
|
diff --git a/packages/auth/index.js b/packages/auth/index.js
index <HASH>..<HASH> 100644
--- a/packages/auth/index.js
+++ b/packages/auth/index.js
@@ -57,7 +57,7 @@ class Auth {
/**
* Generates API user without rate limits for use within cubic. This is
- * particularily important for cubic-ui
+ * particularily important for cubic-ui.
*/
async createSystemUser (api) {
const mongo = await mongodb.connect(cubic.config.auth.api.mongoUrl,
|
fix(auth): Trigger build
|
cubic-js_cubic
|
train
|
js
|
d542514edb6c05b6fbc6a9039de5dce9d4f84ca8
|
diff --git a/system/CodeIgniter.php b/system/CodeIgniter.php
index <HASH>..<HASH> 100644
--- a/system/CodeIgniter.php
+++ b/system/CodeIgniter.php
@@ -249,7 +249,7 @@ class CodeIgniter
*/
$config = config('Config\Kint');
- Kint::$max_depth = $config->maxDepth;
+ Kint::$depth_limit = $config->maxDepth;
Kint::$display_called_from = $config->displayCalledFrom;
Kint::$expanded = $config->expanded;
@@ -261,7 +261,7 @@ class CodeIgniter
RichRenderer::$folder = $config->richFolder;
RichRenderer::$sort = $config->richSort;
if (! empty($config->richObjectPlugins) && is_array($config->richObjectPlugins)) {
- RichRenderer::$object_plugins = $config->richObjectPlugins;
+ RichRenderer::$value_plugins = $config->richObjectPlugins;
}
if (! empty($config->richTabPlugins) && is_array($config->richTabPlugins)) {
RichRenderer::$tab_plugins = $config->richTabPlugins;
|
chore: rename changed property names in Kint
|
codeigniter4_CodeIgniter4
|
train
|
php
|
f9989bdf5dd003113719269b6ad587042494f0cc
|
diff --git a/example/screens/tabset/TabsScreen.js b/example/screens/tabset/TabsScreen.js
index <HASH>..<HASH> 100644
--- a/example/screens/tabset/TabsScreen.js
+++ b/example/screens/tabset/TabsScreen.js
@@ -56,7 +56,8 @@ export class TabsScreen extends React.Component {
return (
<View style={styles.container}>
<RkText>
- {'TabView is a component which allows you to split your content into sub-contents'}
+ {'TabSet is a component which allows you to split your content into sub-contents.' +
+ ' We have lovely prepared some examples below to let you see what it can <3'}
</RkText>
<View style={styles.descriptionSeparator} />
<FlatList
|
fix(tab-set): example screen component description
|
akveo_react-native-ui-kitten
|
train
|
js
|
ba99fd5ba109c96662b1d3e335f6982a0bb7b79b
|
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
@@ -467,7 +467,7 @@ class Storage {
const getPackage = function(i) {
self.localStorage.getPackageMetadata(locals[i], function(err, info) {
- if (_.isNil(err) === false) {
+ if (_.isNil(err)) {
const latest = info['dist-tags'].latest;
if (latest && info.versions[latest]) {
|
refactor: restore previous package check logic
|
verdaccio_verdaccio
|
train
|
js
|
1238f19200a988ac65ab2fb320dc128e2d18b4bc
|
diff --git a/scripts/compileGrammars.js b/scripts/compileGrammars.js
index <HASH>..<HASH> 100644
--- a/scripts/compileGrammars.js
+++ b/scripts/compileGrammars.js
@@ -4,6 +4,10 @@ const path = require('path');
const { promisify } = require('util');
const exec = promisify(child_process.exec);
+/**
+ * compiles nearley grammars so they can be used in js
+ */
+
const grammar_dir = path.join(__dirname, '../src/grammars');
const grammar_ext = '.ne';
diff --git a/scripts/generateDatLocaleData.js b/scripts/generateDatLocaleData.js
index <HASH>..<HASH> 100644
--- a/scripts/generateDatLocaleData.js
+++ b/scripts/generateDatLocaleData.js
@@ -2,6 +2,13 @@ const fs = require('fs');
const path = require('path');
const { Grammar, Parser } = require('nearley');
+/**
+ * Generates locale data in a lookup map where the key is determined by
+ * {getKey()} and the values are determined by {fields}
+ *
+ * For usage see docs/patch.md
+ */
+
const inflection_grammar = Grammar.fromCompiled(
require('../src/grammars/generated/inflection.js')
);
|
docs: Added summaries to script usage
|
eps1lon_poe-i18n
|
train
|
js,js
|
fdda0d81790b217112788a795e2931479dbe3c82
|
diff --git a/packages/bonde-styleguide/src/components/content/Button/Button.js b/packages/bonde-styleguide/src/components/content/Button/Button.js
index <HASH>..<HASH> 100644
--- a/packages/bonde-styleguide/src/components/content/Button/Button.js
+++ b/packages/bonde-styleguide/src/components/content/Button/Button.js
@@ -57,7 +57,7 @@ const Button = styled.button`
color: #fff;
border-color: #fff;
- path {
+ path, g {
fill: #fff;
}
@@ -65,7 +65,7 @@ const Button = styled.button`
border-color: #bebebe;
color: #bebebe;
- path {
+ path, g {
fill: #ee0099!important;
}
}
@@ -77,7 +77,7 @@ const Button = styled.button`
${props => props.active && css`
color: #ee0099!important;
- path {
+ path, g {
fill: #ee0099!important;
}
`}
@@ -103,7 +103,7 @@ const Button = styled.button`
background-color: transparent;
color: #424242;
- path {
+ path, g {
fill: #424242;
}
}
|
fix(styleguide): add g to fill on Button children
|
nossas_bonde-client
|
train
|
js
|
adfdef49a912edcc824fa19a41968a212d6f3553
|
diff --git a/cmd/helm/deploy.go b/cmd/helm/deploy.go
index <HASH>..<HASH> 100644
--- a/cmd/helm/deploy.go
+++ b/cmd/helm/deploy.go
@@ -42,7 +42,7 @@ func deployCmd() cli.Command {
Usage: "The configuration YAML file for this deployment.",
},
cli.StringFlag{
- Name: "name",
+ Name: "name,n",
Usage: "Name of deployment, used for deploy and update commands (defaults to template name)",
},
// TODO: I think there is a Generic flag type that we can implement parsing with.
diff --git a/cmd/helm/helm.go b/cmd/helm/helm.go
index <HASH>..<HASH> 100644
--- a/cmd/helm/helm.go
+++ b/cmd/helm/helm.go
@@ -39,7 +39,7 @@ const desc = `Helm: the package and deployment manager for Kubernetes
Once the in-cluster portion is running, you can use 'helm deploy' to
deploy a new application:
- $ helm deploy CHARTNAME
+ $ helm deploy -n NAME CHART
For more information on Helm commands, you can use the following tools:
|
fix(cli): Add -n alias for --name
On 'helm deploy', add '-n' as an alias for '--name', and also
update docs to make it neutral about whether '-n'/'--name' is required.
|
helm_helm
|
train
|
go,go
|
35ab5de1069203dc6f5c45df4324f896ade13588
|
diff --git a/packages/core/botpress/src/content/service.js b/packages/core/botpress/src/content/service.js
index <HASH>..<HASH> 100644
--- a/packages/core/botpress/src/content/service.js
+++ b/packages/core/botpress/src/content/service.js
@@ -529,7 +529,6 @@ module.exports = async ({ botfile, projectLocation, logger, ghostManager }) => {
const readDataForFile = async fileName => {
const json = await ghostManager.readFile(contentDataDir, fileName)
if (!json) {
- logger.warn(`Form content file ${fileName} not found`)
return []
}
|
fix(core): content manager doesn't yell when missing elements file
|
botpress_botpress
|
train
|
js
|
7382b7e286eeb712ad6582d0ae70c04bfa02f8f3
|
diff --git a/packages/bonde-styleguide/src/cards/DataListCard/DataListCard.js b/packages/bonde-styleguide/src/cards/DataListCard/DataListCard.js
index <HASH>..<HASH> 100644
--- a/packages/bonde-styleguide/src/cards/DataListCard/DataListCard.js
+++ b/packages/bonde-styleguide/src/cards/DataListCard/DataListCard.js
@@ -19,7 +19,7 @@ const CustomCol = ({ render, field, row, ...colProps }) => (
const DataListCard = ({
sectionTitle,
- minHeight,
+ height,
border,
fields,
items,
@@ -32,7 +32,7 @@ const DataListCard = ({
return (
<Card
title={sectionTitle}
- minHeight={minHeight}
+ height={height}
Footer={Footer}
footerProps={footerProps}
>
@@ -60,7 +60,7 @@ const { oneOfType, oneOf, string, number, bool, object, array, node, func, shape
DataListCard.propTypes = {
sectionTitle: string,
- minHeight: number,
+ height: number,
border: bool,
fields: object,
items: array,
@@ -73,7 +73,7 @@ DataListCard.propTypes = {
}
DataListCard.defaultProps = {
- minHeight: 274,
+ height: 274,
border: true,
fields: {},
items: []
|
fix(styleguide): change prop to resize height card on DataListCard
|
nossas_bonde-client
|
train
|
js
|
2d566fcf0ca4d2ff2663b515e5cf036249698587
|
diff --git a/packages/babel-preset-taro/rn/index.js b/packages/babel-preset-taro/rn/index.js
index <HASH>..<HASH> 100644
--- a/packages/babel-preset-taro/rn/index.js
+++ b/packages/babel-preset-taro/rn/index.js
@@ -118,7 +118,6 @@ const nativeApis = require('./nativeApis')
module.exports = (_, options = {}) => {
const {
- loose = false,
decoratorsBeforeExport,
decoratorsLegacy
} = options
@@ -165,13 +164,12 @@ module.exports = (_, options = {}) => {
}]
)
- // 添加两个默认 plugin, 与小程序/h5保持一致. todo: 3.1后采用拓展的方式
+ // 添加一个默认 plugin, 与小程序/h5保持一致. todo: 3.1后采用拓展的方式
plugins.push(
[require('@babel/plugin-proposal-decorators'), {
decoratorsBeforeExport,
legacy: decoratorsLegacy !== false
- }],
- [require('@babel/plugin-proposal-class-properties'), { loose }]
+ }]
)
return {
presets,
|
fix(babel-preset-taro): rm useless proposal-class-properties from rn preset
|
NervJS_taro
|
train
|
js
|
5f2af2d2848e474c5114dda671410eb422c7d16b
|
diff --git a/tests/integrations/quart/test_quart.py b/tests/integrations/quart/test_quart.py
index <HASH>..<HASH> 100644
--- a/tests/integrations/quart/test_quart.py
+++ b/tests/integrations/quart/test_quart.py
@@ -38,7 +38,7 @@ async def app():
return app
-@pytest.fixture(params=("manual"))
+@pytest.fixture(params=("manual",))
def integration_enabled_params(request):
if request.param == "manual":
return {"integrations": [quart_sentry.QuartIntegration()]}
|
fix(tests): Fix quart test (#<I>)
|
getsentry_sentry-python
|
train
|
py
|
f0c33aaea84511a276dd946dd48bfe2cb20d1e73
|
diff --git a/src/ocLazyLoad.core.js b/src/ocLazyLoad.core.js
index <HASH>..<HASH> 100644
--- a/src/ocLazyLoad.core.js
+++ b/src/ocLazyLoad.core.js
@@ -71,7 +71,7 @@
names[name] = true;
append(document.getElementById(name));
name = name.replace(':', '\\:');
- if(element[0].querySelectorAll) {
+ if(typeof(element[0]) !== 'undefined' && element[0].querySelectorAll) {
angular.forEach(element[0].querySelectorAll(`.${ name }`), append);
angular.forEach(element[0].querySelectorAll(`.${ name }\\:`), append);
angular.forEach(element[0].querySelectorAll(`[${ name }]`), append);
|
fix: add extra condition to improve karma testing
|
ocombe_ocLazyLoad
|
train
|
js
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.