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 |
|---|---|---|---|---|---|
d3ae2e030c33490407d528a48be7693a119a077b
|
diff --git a/lib/index.js b/lib/index.js
index <HASH>..<HASH> 100644
--- a/lib/index.js
+++ b/lib/index.js
@@ -21,6 +21,7 @@ var tunnelProxy = require('./tunnel');
var upgradeProxy = require('./upgrade');
var proc = require('./util/process');
var perf = require('./util/perf');
+const loadCert = require('./https/load-cert');
function handleClientError(err, socket) {
if (!socket.writable) {
@@ -117,7 +118,18 @@ function proxy(callback) {
createNormalServer(config.httpPort, http);
createNormalServer(config.httpsPort, https, {
SNICallback: function(servername, callback) {
- return httpsUtil.SNICallback(servername, callback);
+ var curUrl = 'https://' + servername;
+ loadCert({
+ isHttpsServer: true,
+ fullUrl: curUrl,
+ curUrl: curUrl,
+ useSNI: true,
+ headers: {},
+ servername: servername,
+ commonName: httpsUtil.getDomain(servername)
+ }, function() {
+ httpsUtil.SNICallback(servername, callback);
+ });
}
});
if (config.socksPort) {
|
feat: allow https server to load cert from plugin
|
avwo_whistle
|
train
|
js
|
6b825debb2467a2da88e94bb19d16bea9a895b67
|
diff --git a/packages/@vue/cli-service-global/lib/util.js b/packages/@vue/cli-service-global/lib/util.js
index <HASH>..<HASH> 100644
--- a/packages/@vue/cli-service-global/lib/util.js
+++ b/packages/@vue/cli-service-global/lib/util.js
@@ -6,15 +6,15 @@ exports.toPlugin = id => ({ id, apply: require(id) })
// Based on https://stackoverflow.com/questions/27367261/check-if-file-exists-case-sensitive
// Case checking is required, to avoid errors raised by case-sensitive-paths-webpack-plugin
function fileExistsWithCaseSync (filepath) {
- const dir = path.dirname(filepath)
+ const { base, dir, root } = path.parse(filepath)
- if (dir === '/' || dir === '.') {
+ if (dir === root || dir === '.') {
return true
}
try {
const filenames = fs.readdirSync(dir)
- if (!filenames.includes(path.basename(filepath))) {
+ if (!filenames.includes(base)) {
return false
}
} catch (e) {
|
fix: fix windows compatibility of fileExistsWithCaseSync
|
vuejs_vue-cli
|
train
|
js
|
c8ad1e2e530919f968f59a8ffef8b737c1d2a3ee
|
diff --git a/index.js b/index.js
index <HASH>..<HASH> 100644
--- a/index.js
+++ b/index.js
@@ -1,4 +1,4 @@
-var Through = require('Through2');
+var Through = require('through2');
var Revisioner = require('./revisioner');
var RevAll = (function () {
|
fix(tests): Fix through2 include
|
smysnk_gulp-rev-all
|
train
|
js
|
7905e37874685a79fa79eda92d3a79e55f72d59b
|
diff --git a/src/main/java/com/bugsnag/SessionTracker.java b/src/main/java/com/bugsnag/SessionTracker.java
index <HASH>..<HASH> 100644
--- a/src/main/java/com/bugsnag/SessionTracker.java
+++ b/src/main/java/com/bugsnag/SessionTracker.java
@@ -9,8 +9,6 @@ import java.util.UUID;
import java.util.concurrent.ConcurrentLinkedQueue;
import java.util.concurrent.Semaphore;
import java.util.concurrent.atomic.AtomicReference;
-import java.util.concurrent.atomic.AtomicStampedReference;
-import java.util.function.UnaryOperator;
class SessionTracker {
|
fix: remove unused import which breaks jdk 7
|
bugsnag_bugsnag-java
|
train
|
java
|
7fe4a31f640a4c253a1c7f74f83103cfc6ec142c
|
diff --git a/lib/apiary/command/styleguide.rb b/lib/apiary/command/styleguide.rb
index <HASH>..<HASH> 100644
--- a/lib/apiary/command/styleguide.rb
+++ b/lib/apiary/command/styleguide.rb
@@ -110,7 +110,7 @@ module Apiary::Command
method = :post unless method
begin
- response = RestClient::Request.execute(method: method, url: url, payload: data, headers: headers, verify_ssl: false)
+ response = RestClient::Request.execute(method: method, url: url, payload: data, headers: headers)
rescue RestClient::Exception => e
begin
err = JSON.parse e.response
diff --git a/lib/apiary/version.rb b/lib/apiary/version.rb
index <HASH>..<HASH> 100644
--- a/lib/apiary/version.rb
+++ b/lib/apiary/version.rb
@@ -1,3 +1,3 @@
module Apiary
- VERSION = '0.9.0'.freeze
+ VERSION = '0.9.1'.freeze
end
|
fix: verify ssl in styleguide command (leftover from development)
|
apiaryio_apiary-client
|
train
|
rb,rb
|
3085161a1ef0468179378513d5e79472a8cdd517
|
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
@@ -68,6 +68,8 @@ function bounce(func, { responder, timeout = 500 }) {
// we acted as a gateway, but there was an error with the network connection
status: 502,
});
+ } finally {
+ signal.clear();
}
})();
|
fix(bounce): prevent the process from hanging
|
adobe_helix-shared
|
train
|
js
|
627658b9490df1252afe8321a7594fed20136af1
|
diff --git a/test/BasicServerTest.php b/test/BasicServerTest.php
index <HASH>..<HASH> 100644
--- a/test/BasicServerTest.php
+++ b/test/BasicServerTest.php
@@ -2,6 +2,8 @@
namespace Wrench;
+use Psr\Log\NullLogger;
+
/**
* Tests the BasicServer class
*/
@@ -16,7 +18,7 @@ class BasicServerTest extends ServerTest
{
$server = $this->getInstance('ws://localhost:8000', [
'allowed_origins' => $allowed,
- 'logger' => [$this, 'log'],
+ 'logger' => new NullLogger(),
]);
$connection = $this->getMockBuilder(Connection::class)
@@ -43,7 +45,7 @@ class BasicServerTest extends ServerTest
{
$server = $this->getInstance('ws://localhost:8000', [
'allowed_origins' => $allowed,
- 'logger' => [$this, 'log'],
+ 'logger' => new NullLogger(),
]);
$connection = $this->getMockBuilder(Connection::class)
@@ -69,8 +71,7 @@ class BasicServerTest extends ServerTest
return array_merge(parent::getValidConstructorArguments(), [
[
'ws://localhost:8000',
- ['logger' => function () {
- }],
+ ['logger' => new NullLogger()],
],
]);
}
|
fix: tests failed on "new" logging monolog (not closure) logger
|
varspool_Wrench
|
train
|
php
|
6395c5c0c1a6a6da02eb0ce5ae73423467fbe8b2
|
diff --git a/packages/orbit-components/src/Icon/Icon.stories.js b/packages/orbit-components/src/Icon/Icon.stories.js
index <HASH>..<HASH> 100644
--- a/packages/orbit-components/src/Icon/Icon.stories.js
+++ b/packages/orbit-components/src/Icon/Icon.stories.js
@@ -8,6 +8,10 @@ import * as Icons from "../icons";
import { ICON_SIZES, ICON_COLORS } from "./consts";
import RenderInRtl from "../utils/rtl/RenderInRtl";
+export default {
+ title: "Icon",
+};
+
export const Default = () => {
const size = select("Size", [null, ...Object.values(ICON_SIZES)]);
const color = select("Color", [null, ...Object.values(ICON_COLORS)]);
|
fix: add default export for Icon stories (#<I>)
|
kiwicom_orbit-components
|
train
|
js
|
2b46535eba0b57dc50ef61810e685afbf4bba107
|
diff --git a/src/main/java/com/contentful/java/cma/ModuleWebhooks.java b/src/main/java/com/contentful/java/cma/ModuleWebhooks.java
index <HASH>..<HASH> 100644
--- a/src/main/java/com/contentful/java/cma/ModuleWebhooks.java
+++ b/src/main/java/com/contentful/java/cma/ModuleWebhooks.java
@@ -168,14 +168,9 @@ public class ModuleWebhooks extends AbsModule<ServiceWebhooks> {
public CMAWebhook update(CMAWebhook webhook) {
assertNotNull(webhook, "webhook");
- Integer version = webhook.getVersion();
- String spaceId = webhook.getSpaceId();
- String webhookId = webhook.getId();
-
- assertNotNull(version, "version");
- assertNotNull(spaceId, "spaceId");
- assertNotNull(webhookId, "webookId");
- assertNotNull(webhook, "webook");
+ final String webhookId = getResourceIdOrThrow(webhook, "webhook");
+ final String spaceId = getSpaceIdOrThrow(webhook, "webhook");
+ final Integer version = getVersionOrThrow(webhook, "webhook");
return service.update(version, spaceId, webhookId, webhook).toBlocking().first();
}
|
fix: summarise doubled assertions.
|
contentful_contentful-management.java
|
train
|
java
|
e45830be869a051dcbb6e65f2bc47005e31c2939
|
diff --git a/scripts/rollup-build.js b/scripts/rollup-build.js
index <HASH>..<HASH> 100644
--- a/scripts/rollup-build.js
+++ b/scripts/rollup-build.js
@@ -16,7 +16,7 @@ export default [
filesize(),
],
output: {
- format: 'es',
+ format: 'esm',
file: 'dist/vue-socket.io-ext.esm.js',
},
},
|
fix(build): replace `es` with `esm`
|
probil_vue-socket.io-extended
|
train
|
js
|
12a07d700458408debe457ac91bd30a10b61c3f4
|
diff --git a/store/mockstore/mockcopr/executor_test.go b/store/mockstore/mockcopr/executor_test.go
index <HASH>..<HASH> 100644
--- a/store/mockstore/mockcopr/executor_test.go
+++ b/store/mockstore/mockcopr/executor_test.go
@@ -28,7 +28,6 @@ import (
"github.com/pingcap/tidb/store/mockstore/mockstorage"
"github.com/pingcap/tidb/tablecodec"
"github.com/pingcap/tidb/util/testkit"
- "github.com/tikv/client-go/v2/mockstore/mocktikv"
"github.com/tikv/client-go/v2/oracle"
"github.com/tikv/client-go/v2/testutils"
"github.com/tikv/client-go/v2/tikv"
@@ -114,7 +113,7 @@ func (s *testExecutorSuite) TestResolvedLargeTxnLocks(c *C) {
// And check the large txn is still alive.
pairs = s.mvccStore.Scan([]byte("primary"), nil, 1, tso, kvrpcpb.IsolationLevel_SI, nil)
c.Assert(pairs, HasLen, 1)
- _, ok := errors.Cause(pairs[0].Err).(*mocktikv.ErrLocked)
+ _, ok := errors.Cause(pairs[0].Err).(*testutils.ErrLocked)
c.Assert(ok, IsTrue)
}
|
test: cleanup mocktikv usage (#<I>)
|
pingcap_tidb
|
train
|
go
|
48549f9a45474696595460e70ccfab36e2986092
|
diff --git a/release_util/__init__.py b/release_util/__init__.py
index <HASH>..<HASH> 100644
--- a/release_util/__init__.py
+++ b/release_util/__init__.py
@@ -2,4 +2,4 @@
a collection of Django management commands used for analyzing and manipulating migrations.
"""
-__version__ = '1.1.0' # pragma: no cover
+__version__ = '1.1.1' # pragma: no cover
|
chore: bump edx-django-release-util version
|
edx_edx-django-release-util
|
train
|
py
|
9b4d3ec17fe4cef05634bbd438347930513fd93c
|
diff --git a/test/test-utils-parse-params.js b/test/test-utils-parse-params.js
index <HASH>..<HASH> 100644
--- a/test/test-utils-parse-params.js
+++ b/test/test-utils-parse-params.js
@@ -7,6 +7,22 @@ var path = require('path'),
var group = path.basename(__filename, '.js') + '/';
[
+ { source: 'video/ogg',
+ expected: ['video/ogg'],
+ what: 'No parameters'
+ },
+ { source: 'video/ogg;',
+ expected: ['video/ogg'],
+ what: 'No parameters (with separator)'
+ },
+ { source: 'video/ogg; ',
+ expected: ['video/ogg'],
+ what: 'No parameters (with separator followed by whitespace)'
+ },
+ { source: ';video/ogg',
+ expected: ['', 'video/ogg'],
+ what: 'Empty parameter'
+ },
{ source: 'text/plain; encoding=utf8',
expected: ['text/plain', ['encoding', 'utf8']],
what: 'Unquoted'
|
test: add more parseParams tests
|
mscdex_busboy
|
train
|
js
|
8439143b7f9f22297a3c4d79bacfd7b7a0292b4a
|
diff --git a/ibis/backends/impala/tests/test_client.py b/ibis/backends/impala/tests/test_client.py
index <HASH>..<HASH> 100644
--- a/ibis/backends/impala/tests/test_client.py
+++ b/ibis/backends/impala/tests/test_client.py
@@ -211,10 +211,11 @@ def test_verbose_log_queries(con, test_data_db):
with config.option_context('verbose_log', queries.append):
con.table('tpch_orders', database=test_data_db)
- assert len(queries) == 1
- (query,) = queries
+ # we can't make assertions about the length of queries, since the Python GC
+ # could've collected a temporary pandas table any time between construction
+ # of `queries` and the assertion
expected = f'DESCRIBE {test_data_db}.`tpch_orders`'
- assert query == expected
+ assert expected in queries
def test_sql_query_limits(con, test_data_db):
|
test: fix incorrect assumption about GC in impala test (#<I>)
|
ibis-project_ibis
|
train
|
py
|
c5be50392355de784a23d3beefea0a1fab0be839
|
diff --git a/src/dna-create.js b/src/dna-create.js
index <HASH>..<HASH> 100644
--- a/src/dna-create.js
+++ b/src/dna-create.js
@@ -35,10 +35,19 @@ function extend(superScope, subScope) {
let _subScope = (typeof subScope !== 'function') ?
createFunctionClass(subScope) :
subScope;
- let Ctr = createFunctionClass({});
+ let Ctr = function() {};
inherit(Ctr, _superScope);
- define(Ctr, _subScope.prototype);
- _subScope.prototype = Ctr.prototype;
+ define(
+ Ctr,
+ _subScope.prototype,
+ Object.getOwnPropertyNames(_subScope)
+ .map((key) => {
+ let desc = Object.getOwnPropertyDescriptor(_subScope, key);
+ desc.key = key;
+ return desc;
+ })
+ );
+ return Ctr;
}
/**
@@ -68,7 +77,7 @@ See https://github.com/Chialab/dna/wiki/Deprecating-%60DNA.create%60.`
if (typeof scope === 'undefined') {
throw new Error('Missing prototype');
}
- extend(baseComponent, scope);
+ scope = extend(baseComponent, scope);
for (let k in scope.prototype) {
if (scope.prototype.hasOwnProperty(k)) {
let callbacks = [
|
fix: better es6-classes integration in deprecated `create` method
|
chialab_dna
|
train
|
js
|
5c366be02163ebc33f155b83d1d98e7d7d60ce7a
|
diff --git a/lib/isodoc/convert.rb b/lib/isodoc/convert.rb
index <HASH>..<HASH> 100644
--- a/lib/isodoc/convert.rb
+++ b/lib/isodoc/convert.rb
@@ -127,6 +127,7 @@ module IsoDoc
stylesheet.gsub!(/(\s|\{)mso-[^:]+:[^;]+;/m, "\\1") if stripwordcss
SassC.load_paths << File.join(Gem.loaded_specs['isodoc'].full_gem_path,
"lib", "isodoc")
+ SassC.load_paths << File.dirname(filename)
engine = SassC::Engine.new(fontheader + stylesheet, syntax: :scss)
outname = File.basename(filename, ".*") + ".css"
File.open(outname, "w:UTF-8") { |f| f.write(engine.render) }
|
feat: Allow flavor SCSS to importing sibling SCSS
#<I>
|
metanorma_isodoc
|
train
|
rb
|
23ae97e54b727cbb4680dbb66156b4eb5519e657
|
diff --git a/src/shapes/Shape.js b/src/shapes/Shape.js
index <HASH>..<HASH> 100644
--- a/src/shapes/Shape.js
+++ b/src/shapes/Shape.js
@@ -18,8 +18,7 @@
* }
*/
export class Shape {
- static name = 'Shape';
-
+ _name = 'Shape';
_text = '';
_width = 15;
_height = 5;
@@ -54,6 +53,15 @@ export class Shape {
}
/**
+ * Get name of the shape.
+ *
+ * @returns {String}
+ */
+ getName() {
+ return this._name;
+ }
+
+ /**
* Get text content from this shape.
*
* @returns {String}
@@ -194,7 +202,7 @@ export class Shape {
*/
toObject() {
return {
- name: Shape.name,
+ name: this.getName(),
options: {
text: this.getText(),
width: this.getWidth(),
@@ -235,7 +243,6 @@ export class Shape {
*/
static fromObject(obj) {
if (!obj.name || !obj.options) throw new Error('It looks like it is not an Object representation of the Shape');
- if (obj.name !== Shape.name) throw new Error('You are trying to create Shape from Object representation of another Shape');
return new this(obj.options);
}
|
fix(shape): Fixes issue with static property that is not supported
|
ghaiklor_kittik
|
train
|
js
|
18ef94db91d7a5370062161e4a8a5cfc9e05781a
|
diff --git a/icon-runtime-generator.js b/icon-runtime-generator.js
index <HASH>..<HASH> 100644
--- a/icon-runtime-generator.js
+++ b/icon-runtime-generator.js
@@ -15,7 +15,7 @@ module.exports = ({symbol, config, context}) => {
import sprite from ${spriteRequest};
import {iconHOC} from '@jetbrains/ring-ui/components/icon/icon';
- const symbol = new SpriteSymbol(${stringifySymbol(symbol)});
+ var symbol = new SpriteSymbol(${stringifySymbol(symbol)});
sprite.add(symbol);
export default iconHOC('${glyph}', '${displayName}');
|
fix: use `var` instead `const` because `const` does not work in Phantomjs
RING-UI-CR-<I> refers
|
JetBrains_ring-ui
|
train
|
js
|
65b473697644517bf961d90a3973d4ea2cdda78a
|
diff --git a/anyconfig/backend/bson.py b/anyconfig/backend/bson.py
index <HASH>..<HASH> 100644
--- a/anyconfig/backend/bson.py
+++ b/anyconfig/backend/bson.py
@@ -50,6 +50,7 @@ class Parser(anyconfig.backend.base.FromStringLoader,
_dump_opts = ["check_keys", "uuid_subtype"]
_open_flags = ('rb', 'wb')
_ordered = not bson.has_c()
+ _dict_options = ["as_class"]
dump_to_string = anyconfig.backend.base.to_method(bson.BSON.encode)
|
fix: [bson] add member _dict_options to the parser
|
ssato_python-anyconfig
|
train
|
py
|
7d189814cbf6d4c55e8a47b06234736cb1e03457
|
diff --git a/tree.go b/tree.go
index <HASH>..<HASH> 100644
--- a/tree.go
+++ b/tree.go
@@ -535,7 +535,7 @@ walk: // Outer loop for walking the tree
// No handle found. Check if a handle for this path + a
// trailing slash exists for TSR recommendation
n = n.children[0]
- value.tsr = n.path == "/" && n.handlers != nil
+ value.tsr = (n.path == "/" && n.handlers != nil) || (n.path == "" && n.indices == "/")
}
return
diff --git a/tree_test.go b/tree_test.go
index <HASH>..<HASH> 100644
--- a/tree_test.go
+++ b/tree_test.go
@@ -595,6 +595,7 @@ func TestTreeTrailingSlashRedirect(t *testing.T) {
"/blog/:p",
"/posts/:b/:c",
"/posts/b/:c/d/",
+ "/vendor/:x/*y",
}
for _, route := range routes {
recv := catchPanic(func() {
@@ -631,6 +632,7 @@ func TestTreeTrailingSlashRedirect(t *testing.T) {
"/api/world/abc/",
"/blog/pp/",
"/posts/b/c/d",
+ "/vendor/x",
}
for _, route := range tsrRoutes {
|
fix: wrong when wildcard follows named param (#<I>)
|
gin-gonic_gin
|
train
|
go,go
|
7c97318ce660e289a22ea9c111766374bc0ae075
|
diff --git a/code/forms/MemberProfileValidator.php b/code/forms/MemberProfileValidator.php
index <HASH>..<HASH> 100644
--- a/code/forms/MemberProfileValidator.php
+++ b/code/forms/MemberProfileValidator.php
@@ -67,7 +67,7 @@ class MemberProfileValidator extends RequiredFields {
}
// Create a dummy member as this is required for custom password validators
- if($data['Password'] !== "") {
+ if(isset($data['Password']) && $data['Password'] !== "") {
if(is_null($member)) $member = Member::create();
if($validator = $member::password_validator()) {
|
fix(MemberProfileValidator): Fix bug where Password still has validation, even though its set 'Hidden'
|
symbiote_silverstripe-memberprofiles
|
train
|
php
|
64e0ef3b73c0748177ee03c53ef9735b5a96b5a5
|
diff --git a/src/Leevel/Seccode/Seccode.php b/src/Leevel/Seccode/Seccode.php
index <HASH>..<HASH> 100644
--- a/src/Leevel/Seccode/Seccode.php
+++ b/src/Leevel/Seccode/Seccode.php
@@ -180,10 +180,8 @@ class Seccode
create_directory(dirname($outPath));
imagepng($resImage, $outPath, 9);
} else {
- // @codeCoverageIgnoreStart
- // set header `Content-type: image/png`
+ // Need set header `Content-type: image/png`
imagepng($resImage);
- // @codeCoverageIgnoreEnd
}
imagedestroy($resImage);
@@ -271,12 +269,6 @@ class Seccode
*/
protected function makeTtfFont(&$resImage): void
{
- if (!function_exists('imagettftext')) {
- // @codeCoverageIgnoreStart
- throw new InvalidArgumentException('Function imagettftext is not exits.');
- // @codeCoverageIgnoreEnd
- }
-
list($font, $code, $widthTotal) = $this->getFontOption();
$width = $this->normalizeWidth();
$height = $this->normalizeHeight();
|
refactor(seccode): remove @ codeCoverageIgnore
|
hunzhiwange_framework
|
train
|
php
|
ed3b712483696c73b8202ef51cc191b3c4493f35
|
diff --git a/src/index.js b/src/index.js
index <HASH>..<HASH> 100644
--- a/src/index.js
+++ b/src/index.js
@@ -183,12 +183,14 @@ function handleApp(appHost){
return loader.loadModule(configModuleId)
.then(m => {
aurelia = new Aurelia(loader);
+ aurelia.host = appHost;
return configureAurelia(aurelia).then(() => { return m.configure(aurelia); });
}).catch(e => {
setTimeout(function(){ throw e; }, 0);
});
}else{
aurelia = new Aurelia();
+ aurelia.host = appHost;
return configureAurelia(aurelia).then(() => {
if(runningLocally()){
@@ -197,7 +199,7 @@ function handleApp(appHost){
aurelia.use.standardConfiguration();
- return aurelia.start().then(a => { return a.setRoot(undefined, appHost); });
+ return aurelia.start().then(a => a.setRoot());
}).catch(e => {
setTimeout(function(){ throw e; }, 0);
});
|
fix(all): root should default to aurelia-app host when not specified
Fixes #5
|
aurelia_bootstrapper
|
train
|
js
|
b89a734c5d16328e21306bccb1fd454f257d9f7c
|
diff --git a/packages/ui-babel-preset/lib/index.js b/packages/ui-babel-preset/lib/index.js
index <HASH>..<HASH> 100644
--- a/packages/ui-babel-preset/lib/index.js
+++ b/packages/ui-babel-preset/lib/index.js
@@ -74,7 +74,6 @@ module.exports = function (
}
])
}
-
// Work around https://github.com/babel/babel/issues/10261, which causes
// Babel to not use the runtime helpers for things like _objectSpread.
// Remove this once that babel issue is fixed
@@ -107,8 +106,7 @@ module.exports = function (
}
],
require('@babel/plugin-syntax-dynamic-import').default,
- require('babel-plugin-transform-undefined-to-void'),
- require('babel-plugin-add-import-extension')
+ require('babel-plugin-transform-undefined-to-void')
])
if (process.env.NODE_ENV === 'production') {
|
chore(ui-babel-preset): remove babel-plugin-add-import-extension
Closes: INSTUI-<I>
Removed babel-plugin-add-import-extension becuase it interfered with webpack since we are using the
babel-loader to transpile ts files on the fly and this plugin injected .js extensions to the
imports.
|
instructure_instructure-ui
|
train
|
js
|
888d3c3876e92c761b59a808ff654c98fb0503fe
|
diff --git a/src/main/java/com/smartsheet/api/internal/SearchResourcesImpl.java b/src/main/java/com/smartsheet/api/internal/SearchResourcesImpl.java
index <HASH>..<HASH> 100644
--- a/src/main/java/com/smartsheet/api/internal/SearchResourcesImpl.java
+++ b/src/main/java/com/smartsheet/api/internal/SearchResourcesImpl.java
@@ -111,11 +111,7 @@ public class SearchResourcesImpl extends AbstractResources implements SearchReso
parameters.put("modifiedSince", isoDate);
}
parameters.put("scopes", QueryUtil.generateCommaSeparatedList(scopes));
- try {
- parameters.put("query", URLEncoder.encode(query, "utf-8"));
- } catch (UnsupportedEncodingException e) {
- throw new RuntimeException(e);
- }
+ parameters.put("query", query);
// Iterate through the map of parameters and generate the query string
path += QueryUtil.generateUrl(null, parameters);
|
fix: fix the double encoding of search terms
|
smartsheet-platform_smartsheet-java-sdk
|
train
|
java
|
ea499bc62a67acb654df6651e983128780344d69
|
diff --git a/test/xccdf/session_test.rb b/test/xccdf/session_test.rb
index <HASH>..<HASH> 100644
--- a/test/xccdf/session_test.rb
+++ b/test/xccdf/session_test.rb
@@ -30,11 +30,13 @@ class TestSession < Test::Unit::TestCase
s.evaluate
end
- def test_session_export
+ def test_session_export_rds
s = OpenSCAP::Xccdf::Session.new("../data/sds-complex.xml")
s.load
s.evaluate
s.export_results(rds_file="report.rds.xml")
+ assert Dir.glob("*").size == 1
+ assert Dir.glob("*").include?("report.rds.xml")
end
def setup
|
test: Make sure only the expected file got created
|
OpenSCAP_ruby-openscap
|
train
|
rb
|
4acd24d17b3adea6d4b5406260aee2569bc51d6c
|
diff --git a/packages/vuetify/src/mixins/menuable.js b/packages/vuetify/src/mixins/menuable.js
index <HASH>..<HASH> 100644
--- a/packages/vuetify/src/mixins/menuable.js
+++ b/packages/vuetify/src/mixins/menuable.js
@@ -200,7 +200,7 @@ export default Vue.extend({
if (left < 0) left = 12
- return left
+ return left + this.getOffsetLeft()
},
calcYOverflow (top) {
const documentHeight = this.getInnerHeight()
@@ -276,6 +276,12 @@ export default Vue.extend({
return window.innerWidth
},
+ getOffsetLeft () {
+ if (!this.hasWindow) return 0
+
+ return window.pageXOffset ||
+ document.documentElement.scrollLeft
+ },
getOffsetTop () {
if (!this.hasWindow) return 0
|
fix(v-menu): position problem with horizontal scrolling (#<I>)
* add scrollX for measuring rect
* add getOffsetLeft(), move the logic from measure() to calcXOverflow()
|
vuetifyjs_vuetify
|
train
|
js
|
6c6393d08d4aef77e4fa4332f3d654b79f87b428
|
diff --git a/src/config.js b/src/config.js
index <HASH>..<HASH> 100644
--- a/src/config.js
+++ b/src/config.js
@@ -43,11 +43,12 @@ class Config {
version,
language: 'JS'
}
- const defaultStorage =
- storage_type === 'cookies'
+
+ this.storage =
+ storage ||
+ (storage_type === 'cookies'
? new SecureCookiesStorageFactory()
- : new LocalStorageFactory()
- this.storage = storage || defaultStorage
+ : new LocalStorageFactory())
this.custom_authenticator = custom_authenticator
this.headers = headers || {}
this.disableCart = disableCart || false
|
fix: storage usage in config updated to omit useless creation (#<I>)
* fix: storage usage in config updated to omit useless creation
* fix: storage set condition updated
|
moltin_js-sdk
|
train
|
js
|
88a27d35b5e92269fc273bd81ec4ac53355ab71e
|
diff --git a/src/configure-store.js b/src/configure-store.js
index <HASH>..<HASH> 100644
--- a/src/configure-store.js
+++ b/src/configure-store.js
@@ -5,7 +5,7 @@ import {
ADD_NOTIFICATION,
REMOVE_NOTIFICATION,
} from '@commercetools-local/notifications';
-import { middleware as sdkMiddleware } from '@commercetools-local/sdk';
+import { createMiddleware as createSdkMiddleware } from '@commercetools-local/sdk';
import * as constants from '@commercetools-local/constants';
import addPluginToNotificationMiddleware from './middleware/add-plugin-to-notification';
import batchedUpdates from './middleware/batched-updates';
@@ -17,6 +17,12 @@ import sentryTrackingMiddleware from './middleware/sentry-tracking';
import { activePluginReducer } from './components/inject-reducer';
import { requestsInFlightReducer } from './components/requests-in-flight-loader';
import { notificationsReducer } from './components/notifications-connector';
+import { getCorrelationId, selectProjectKey } from './utils';
+
+const sdkMiddleware = createSdkMiddleware({
+ getCorrelationId,
+ projectKey: selectProjectKey(),
+});
const createReducer = (injectedReducers = {}) =>
combineReducers({
|
refactor(app-shell): configure-store to create sdk middleware
|
commercetools_merchant-center-application-kit
|
train
|
js
|
4cabf061b526374c1d18af952f45edc571d2e710
|
diff --git a/src/Lob/Resource.php b/src/Lob/Resource.php
index <HASH>..<HASH> 100644
--- a/src/Lob/Resource.php
+++ b/src/Lob/Resource.php
@@ -93,6 +93,10 @@ abstract class Resource implements ResourceInterface
throw new NetworkErrorException($e->getMessage());
// @codeCoverageIgnoreEnd
} catch (GuzzleException $e) {
+ if (!$e->hasResponse()) {
+ throw new UnexpectedErrorException('An Unexpected Error has occurred: ' . $e->getMessage());
+ }
+
$responseErrorBody = strval($e->getResponse()->getBody());
$errorMessage = $this->errorMessageFromJsonBody($responseErrorBody);
$statusCode = $e->getResponse()->getStatusCode();
|
fix(errors): check for response before trying to use it (#<I>)
|
lob_lob-php
|
train
|
php
|
7d3bdce7f2ecddd51f3a4cd2092f041a6868ec9c
|
diff --git a/src/utils/shadows.js b/src/utils/shadows.js
index <HASH>..<HASH> 100644
--- a/src/utils/shadows.js
+++ b/src/utils/shadows.js
@@ -1,2 +1,2 @@
-const values = [2, 3, 4, 5, 6, 8, 16];
+const values = [2, 3, 4, 6, 8, 16, 24];
export default values.map(v => `mdl-shadow--${v}dp`);
|
fix(Shadows): Fix incorrect shadow level
Remove an incorrect shdaow value and add the new value "<I>". This might slighly
affect a bit the UI since shadow 4 go from value 6 to 8, 5: 6-><I> and 6: <I>-><I>.
Fixes #<I>
|
tleunen_react-mdl
|
train
|
js
|
9f8763dca94ef06a5886f2ce5d684b582346e537
|
diff --git a/src/branch.js b/src/branch.js
index <HASH>..<HASH> 100644
--- a/src/branch.js
+++ b/src/branch.js
@@ -75,6 +75,11 @@ Branch.prototype.initSession = function (deepLinkDataListener) {
return execute('initSession')
}
+// deprecated for setRequestMetadata()
+Branch.prototype.setMixpanelToken = function (token) {
+ return this.setRequestMetadata('$mixpanel_distinct_id', token)
+}
+
Branch.prototype.setRequestMetadata = function (key, val) {
if (!key || typeof key !== 'string') {
return new Promise(function (resolve, reject) {
|
fix: added back backwards compatibility for setMixpanelToken()
|
BranchMetrics_cordova-ionic-phonegap-branch-deep-linking
|
train
|
js
|
ce72ff96d4f3a80ba3e27912e7b6000cefcc8e0d
|
diff --git a/auto-release.js b/auto-release.js
index <HASH>..<HASH> 100644
--- a/auto-release.js
+++ b/auto-release.js
@@ -48,8 +48,12 @@ async function init() {
if (isCanaryRelease) {
try {
const version = await shell
- .exec(`auto version --from v${currentVersion}`, { silent: true })
- .stdout.trim() || 'patch';
+ .exec('auto version', { silent: true })
+ .stdout.trim();
+
+ console.log('current version', currentVersion);
+ console.log('upcoming version type', version);
+ console.log('canary version', canaryVersion);
await shell.exec(
`npx lerna publish pre${version} --dist-tag canary --preid canary${canaryVersion} --no-git-reset --no-git-tag-version --exact --ignore-scripts --no-push --force-publish --yes -m "[skip travis] chore(release): pre-release %s"`,
|
test: re-test canary release test w/ added logs
|
bolt-design-system_bolt
|
train
|
js
|
d7a5819677bc8bad72a6d2c7669e7b191af19022
|
diff --git a/fleetctl/debug_info.go b/fleetctl/debug_info.go
index <HASH>..<HASH> 100644
--- a/fleetctl/debug_info.go
+++ b/fleetctl/debug_info.go
@@ -22,13 +22,13 @@ func debugInfoAction(c *cli.Context) {
info, err := registryCtl.GetDebugInfo()
if err != nil {
fmt.Fprintln(os.Stderr, "Get response from etcd error:", err)
- return
+ os.Exit(1)
}
fmt.Println("All fleet entries in etcd service:")
buf := new(bytes.Buffer)
if err = json.Indent(buf, []byte(info), "", "\t"); err != nil {
- return
+ os.Exit(1)
}
fmt.Println(buf.String())
}
|
fix(fleetctl): exit 1 on failures in debug-info
|
coreos_fleet
|
train
|
go
|
76bd2dbb9b215b64ffca626acc72e75f91043095
|
diff --git a/io/eolearn/io/local_io.py b/io/eolearn/io/local_io.py
index <HASH>..<HASH> 100644
--- a/io/eolearn/io/local_io.py
+++ b/io/eolearn/io/local_io.py
@@ -83,7 +83,7 @@ class BaseLocalIo(EOTask):
def _generate_paths(path_template, timestamps):
""" Uses a filename path template to create a list of actual filename paths
"""
- if not (path_template.endswith('.tif') or path_template.endswith('.tiff')):
+ if not (path_template.lower().endswith('.tif') or path_template.lower().endswith('.tiff')):
path_template = f'{path_template}.tif'
if not timestamps:
|
fix(local_io): ImportFromTiff task is now able to load tiff files with uppercase extension
|
sentinel-hub_eo-learn
|
train
|
py
|
8d0fdaf4aaea29310a1a7be706f0a6d4bb58b175
|
diff --git a/vaex/file/other.py b/vaex/file/other.py
index <HASH>..<HASH> 100644
--- a/vaex/file/other.py
+++ b/vaex/file/other.py
@@ -912,6 +912,7 @@ class DatasetAstropyTable(DatasetArrays):
#print vars(table)
#print dir(table)
DatasetArrays.__init__(self, table.meta.get("name", "unknown-astropy"))
+ self.description = table.meta.get("description")
self.table = table
#self.name
@@ -928,6 +929,8 @@ class DatasetAstropyTable(DatasetArrays):
masked_array = self.table[name].data
if "ucd" in column._meta:
self.ucds[clean_name] = column._meta["ucd"]
+ if column.unit:
+ self.units[clean_name] = column.unit
if column.description:
self.descriptions[clean_name] = column.description
if hasattr(masked_array, "mask"):
|
fix: better support for ucds, units and description for astropy tables
|
vaexio_vaex
|
train
|
py
|
8a3621b0fb5b640c7815363b681f83c0bd08abf9
|
diff --git a/blockstack/lib/operations/namespacepreorder.py b/blockstack/lib/operations/namespacepreorder.py
index <HASH>..<HASH> 100644
--- a/blockstack/lib/operations/namespacepreorder.py
+++ b/blockstack/lib/operations/namespacepreorder.py
@@ -251,7 +251,7 @@ def parse( bin_payload, block_height ):
0 2 3 23 39 47
|-----|---|--------------------------------------|----------------|--------------------------|
- magic op hash(ns_id,script_pubkey,reveal_addr) consensus hash token fee (little-endian)
+ magic op hash(ns_id,script_pubkey,reveal_addr) consensus hash token fee (big-endian)
Returns {
'opcode': ...
|
docs: big-endian token representation
|
blockstack_blockstack-core
|
train
|
py
|
b1f41d608f189c72c990eca542e02c0ef9f17652
|
diff --git a/index.js b/index.js
index <HASH>..<HASH> 100644
--- a/index.js
+++ b/index.js
@@ -11,10 +11,14 @@ module.exports = {
},
get: function (key) {
const ns = cls.getNamespace(nsid);
- return ns.get(key);
+ if (ns.active) {
+ return ns.get(key);
+ }
},
set: function (key, value) {
const ns = cls.getNamespace(nsid);
- return ns.set(key, value);
+ if (ns.active) {
+ return ns.set(key, value);
+ }
}
}
|
fix: don't error when outside of request
|
skonves_express-http-context
|
train
|
js
|
e46685be7c8016bdebfd887dd32cefe627de5955
|
diff --git a/packages/type/src/fluid.js b/packages/type/src/fluid.js
index <HASH>..<HASH> 100644
--- a/packages/type/src/fluid.js
+++ b/packages/type/src/fluid.js
@@ -82,5 +82,5 @@ function fluidTypeSize(defaultStyles, fluidBreakpointName, fluidBreakpoints) {
}
function subtract(a, b) {
- return parseFloat(a, 10) - parseFloat(b, 10);
+ return parseFloat(a) - parseFloat(b);
}
|
fix(type): parseFloat only has one parameter (#<I>)
It doesn't take a radix like parseInt does 🤷♂️
|
carbon-design-system_carbon-elements
|
train
|
js
|
3e40d3cc1014cfc153920bb8c489cfcbf0d3b3db
|
diff --git a/sendgrid/helpers/mail/file_content.py b/sendgrid/helpers/mail/file_content.py
index <HASH>..<HASH> 100644
--- a/sendgrid/helpers/mail/file_content.py
+++ b/sendgrid/helpers/mail/file_content.py
@@ -31,7 +31,7 @@ class FileContent(object):
def get(self):
"""
- Get a JSON-ready representation of this FileContente.
+ Get a JSON-ready representation of this FileContent.
:returns: This FileContent, ready for use in a request body.
:rtype: string
|
docs: fixed typo in sendgrid/helpers/mail/file_content.py (#<I>)
|
sendgrid_sendgrid-python
|
train
|
py
|
b29e7343e1edc18834e237be1eb29472510d0832
|
diff --git a/source/ingress_test.go b/source/ingress_test.go
index <HASH>..<HASH> 100644
--- a/source/ingress_test.go
+++ b/source/ingress_test.go
@@ -25,6 +25,9 @@ import (
"k8s.io/client-go/pkg/apis/extensions/v1beta1"
)
+// Validates that IngressSource is a Source
+var _ Source = &IngressSource{}
+
func TestIngress(t *testing.T) {
t.Run("endpointsFromIngress", testEndpointsFromIngress)
t.Run("Endpoints", testIngressEndpoints)
diff --git a/source/service_test.go b/source/service_test.go
index <HASH>..<HASH> 100644
--- a/source/service_test.go
+++ b/source/service_test.go
@@ -26,6 +26,9 @@ import (
"github.com/kubernetes-incubator/external-dns/endpoint"
)
+// Validates that ServiceSource is a Source
+var _ Source = &ServiceSource{}
+
func TestService(t *testing.T) {
t.Run("Endpoints", testServiceEndpoints)
}
|
fix(source): validate that sources adhere to the interface (#<I>)
|
kubernetes-incubator_external-dns
|
train
|
go,go
|
80b680e32a00b658fb63cd76cee4ad5ade0b2115
|
diff --git a/src/Tabs/TabsItem.js b/src/Tabs/TabsItem.js
index <HASH>..<HASH> 100644
--- a/src/Tabs/TabsItem.js
+++ b/src/Tabs/TabsItem.js
@@ -37,6 +37,9 @@ const styles = theme => {
'&&': setThemeForSelector(colors.default),
'&$isEnabled$isSelected': setThemeForSelector(colors.selected),
'&$isEnabled$isSelected:hover': setThemeForSelector(colors.selectedHover),
+ '&$isEnabled$isSelected:active': setThemeForSelector(
+ colors.selectedActive
+ ),
'&$isEnabled:hover': setThemeForSelector(colors.hover),
...focusSourceMixin(
'other',
diff --git a/src/theme/create-theme.js b/src/theme/create-theme.js
index <HASH>..<HASH> 100644
--- a/src/theme/create-theme.js
+++ b/src/theme/create-theme.js
@@ -1179,6 +1179,7 @@ export default function createTheme(config) {
selectedHover: {
text: colors.primary
},
+ selectedActive: {},
disabled: {
text: lighten(colors.controls.grey.outline, 0.5)
},
|
feat(Tabs): added selectedActive
|
rambler-digital-solutions_rambler-ui
|
train
|
js,js
|
cd481a71f691f5edb2f2720ea263872e1c41b6c7
|
diff --git a/components/src/instrument/PipetteSelect.js b/components/src/instrument/PipetteSelect.js
index <HASH>..<HASH> 100644
--- a/components/src/instrument/PipetteSelect.js
+++ b/components/src/instrument/PipetteSelect.js
@@ -119,7 +119,7 @@ const PipetteNameItem = (props: PipetteNameSpecs) => {
return (
<Flex
- data-id={dataIdFormat(
+ data-test={dataIdFormat(
'PipetteNameItem',
volumeClass,
channels,
diff --git a/protocol-designer/cypress/integration/newProtocolWithModules.spec.js b/protocol-designer/cypress/integration/newProtocolWithModules.spec.js
index <HASH>..<HASH> 100644
--- a/protocol-designer/cypress/integration/newProtocolWithModules.spec.js
+++ b/protocol-designer/cypress/integration/newProtocolWithModules.spec.js
@@ -44,7 +44,7 @@ describe('Protocols with Modules', () => {
.next()
.contains('None')
.click()
- cy.get('[data-id="PipetteNameItem_p300MultiChannelGen1"]').click()
+ cy.get('[data-test="PipetteNameItem_p300MultiChannelGen1"]').click()
cy.selectTipRacks(tipRack, tipRack)
// Add modules
|
refactor(protocol-designer): change pipette select to use data-test instead of data-id (#<I>)
|
Opentrons_opentrons
|
train
|
js,js
|
e760a2eccfb2dfa3fbd882810bda55292d22da0d
|
diff --git a/anyconfig/backend/configobj.py b/anyconfig/backend/configobj.py
index <HASH>..<HASH> 100644
--- a/anyconfig/backend/configobj.py
+++ b/anyconfig/backend/configobj.py
@@ -11,9 +11,10 @@
- Format to support: configobj, http://goo.gl/JbP2Kp (readthedocs.org)
- Requirements: configobj (https://pypi.python.org/pypi/configobj/)
-- Limitations: It seems that configobj.ConfigObj does not receive callble to
- make a dict objects from configurations. If it's true and then the order of
- configurations might be lost.
+- Limitations: AFAIK, configobj does not keep the order of configuration items
+ and not have options to change this behavior like configparser, so this
+ backend does not keep the order of configuration items even if the ac_ordered
+ option was used.
- Special options:
|
refactor: update the description of the limitation of configobj backend
|
ssato_python-anyconfig
|
train
|
py
|
080f1ec8d4efa775a3f86119c9f15baec9b138c7
|
diff --git a/packages/article/article-body/article-body.web.js b/packages/article/article-body/article-body.web.js
index <HASH>..<HASH> 100644
--- a/packages/article/article-body/article-body.web.js
+++ b/packages/article/article-body/article-body.web.js
@@ -4,12 +4,12 @@ import ArticleRow from "./article-body-row";
const ArticleBody = props => {
const { section, content: bodyContent, contextUrl } = props;
- const contentArray = bodyContent.map((data, index) => {
+ const contentArray = bodyContent.map((rowData, index) => {
const item = {
- data,
+ data: Object.assign({}, rowData),
index
};
- if (data.name === "ad") {
+ if (rowData.name === "ad") {
item.data.attributes = {
...item.data.attributes,
...{ section, contextUrl }
|
fix: use mutable object as apollo uses immutables (#<I>)
|
newsuk_times-components
|
train
|
js
|
1f6d1b2a340e523033f1a0170ee66f4f90758b8d
|
diff --git a/src/components/chips/js/chipsController.js b/src/components/chips/js/chipsController.js
index <HASH>..<HASH> 100644
--- a/src/components/chips/js/chipsController.js
+++ b/src/components/chips/js/chipsController.js
@@ -190,7 +190,8 @@ MdChipsCtrl.prototype.init = function() {
this.deRegister.push(
this.$attrs.$observe('mdChipAppendDelay', function(newValue) {
- ctrl.chipAppendDelay = parseInt(newValue) || DEFAULT_CHIP_APPEND_DELAY;
+ var numberValue = parseInt(newValue);
+ ctrl.chipAppendDelay = isNaN(numberValue) ? DEFAULT_CHIP_APPEND_DELAY : numberValue;
})
);
};
|
fix(chips): md-chip-append-delay of 0 does not get converted to <I> (#<I>)
Fixes #<I>
|
angular_material
|
train
|
js
|
d1627b92fc341cd9690296d1ec6935fb9dbae532
|
diff --git a/.adiorc.js b/.adiorc.js
index <HASH>..<HASH> 100644
--- a/.adiorc.js
+++ b/.adiorc.js
@@ -20,7 +20,7 @@ module.exports = {
}
},
ignore: {
- src: ["path", "os", "fs", "util", "events"],
+ src: ["path", "os", "fs", "util", "events", "crypto"],
dependencies: ["@babel/runtime"],
devDependencies: true
},
|
chore: ignore "crypto" requires, it's a Node.js built-in
|
Webiny_webiny-js
|
train
|
js
|
1447f1a89201d982375cc348bf8a0274d60e4f4c
|
diff --git a/test/kerberos_tests.js b/test/kerberos_tests.js
index <HASH>..<HASH> 100644
--- a/test/kerberos_tests.js
+++ b/test/kerberos_tests.js
@@ -7,8 +7,9 @@ const SegfaultHandler = require('segfault-handler');
SegfaultHandler.registerHandler();
chai.use(require('chai-string'));
+// environment variables
const username = process.env.KERBEROS_USERNAME || 'administrator';
-// const password = process.env.KERBEROS_PASSWORD || 'Password01';
+const password = process.env.KERBEROS_PASSWORD || 'Password01';
const realm = process.env.KERBEROS_REALM || 'example.com';
const hostname = process.env.KERBEROS_HOSTNAME || 'hostname.example.com';
const port = process.env.KERBEROS_PORT || '80';
@@ -23,6 +24,15 @@ describe('Kerberos', function() {
});
});
+ it('should check a given password against a kerberos server', function(done) {
+ const service = `HTTP/${hostname}`;
+ kerberos.checkPassword(username, password, service, realm.toUpperCase(), (err, result) => {
+ expect(err).to.not.exist;
+ expect(result).to.exist;
+ done();
+ });
+ });
+
it('should authenticate against a kerberos server using GSSAPI', function(done) {
const service = `HTTP@${hostname}`;
|
test(check-password): include test for the `checkPassword` api
|
mongodb-js_kerberos
|
train
|
js
|
9218c263ae421a7942af3990f17469959f78bae1
|
diff --git a/src/node/basic-node.js b/src/node/basic-node.js
index <HASH>..<HASH> 100644
--- a/src/node/basic-node.js
+++ b/src/node/basic-node.js
@@ -22,6 +22,10 @@ class Node {
* @return {Boolean} Whether there is a child node of given type
*/
contains(type) {
+ if (!Array.isArray(this.content)) {
+ return false;
+ }
+
return this.content.some(function(node) {
return node.type === type;
});
|
fix(node): add guard around node.contains
|
tonyganch_gonzales-pe
|
train
|
js
|
745cf96ed14fbc4dab9622eba20467108175f838
|
diff --git a/actor/base/src/main/java/org/getopentest/Main.java b/actor/base/src/main/java/org/getopentest/Main.java
index <HASH>..<HASH> 100644
--- a/actor/base/src/main/java/org/getopentest/Main.java
+++ b/actor/base/src/main/java/org/getopentest/Main.java
@@ -30,6 +30,7 @@ public class Main {
OptionParser parser = new OptionParser();
parser.acceptsAll(Arrays.asList(new String[]{"encrypt"})).withRequiredArg();
+ parser.acceptsAll(Arrays.asList(new String[]{"decrypt"})).withRequiredArg();
parser.acceptsAll(Arrays.asList(new String[]{"p", "password"})).withRequiredArg();
parser.acceptsAll(Arrays.asList(new String[]{"w", "workdir"})).withRequiredArg();
@@ -62,5 +63,19 @@ public class Main {
System.exit(0);
}
+
+ if (options.has("decrypt")) {
+ if (options.has("password")) {
+ String encryptedData = options.valueOf("decrypt").toString();
+ Encryptor encryptor = new Encryptor(options.valueOf("password").toString());
+ System.out.println(encryptor.decrypt(encryptedData));
+ } else {
+ System.out.println(
+ "To perform the decryption, we'll need a password. You can "
+ + "provide it using the --password argument.");
+ }
+
+ System.exit(0);
+ }
}
}
|
feat(actor): add "decrypt" command line option
|
mcdcorp_opentest
|
train
|
java
|
17fba07500aae1ffc237a913a6039f54a01275cb
|
diff --git a/mintapi/api.py b/mintapi/api.py
index <HASH>..<HASH> 100644
--- a/mintapi/api.py
+++ b/mintapi/api.py
@@ -1023,7 +1023,11 @@ class Mint(object):
for budget in budgets[direction]:
category = self.get_category_object_from_id(budget['cat'], categories)
budget['cat'] = category['name']
- budget['parent'] = category['parent']['name']
+ # Uncategorized budget's parent is a string: 'Uncategorized'
+ if isinstance(category['parent'], dict):
+ budget['parent'] = category['parent']['name']
+ else:
+ budget['parent'] = category['parent']
return budgets
|
fix: :bug: Fix for 'string indices must be integers'
The 'Uncategorized' budget's parent is a string not a dict.
Probably only affects those who put a specific limit on uncategorized.
Refs #<I>
|
mrooney_mintapi
|
train
|
py
|
0494cdf33cbd69e4153ad0207a18138df08915ee
|
diff --git a/components.go b/components.go
index <HASH>..<HASH> 100644
--- a/components.go
+++ b/components.go
@@ -51,6 +51,7 @@ func (umc *unmarshalableMessageComponent) UnmarshalJSON(src []byte) error {
return json.Unmarshal(src, umc.MessageComponent)
}
+// MessageComponentFromJSON is a helper function for unmarshaling message components
func MessageComponentFromJSON(b []byte) (MessageComponent, error) {
var u unmarshalableMessageComponent
err := u.UnmarshalJSON(b)
|
feat(components): added comment to MessageComponentFromJSON
|
bwmarrin_discordgo
|
train
|
go
|
b8f893e4b42063c14090cb221eb888c0671a644a
|
diff --git a/packages/numeric-input/src/NumericInput.js b/packages/numeric-input/src/NumericInput.js
index <HASH>..<HASH> 100644
--- a/packages/numeric-input/src/NumericInput.js
+++ b/packages/numeric-input/src/NumericInput.js
@@ -35,7 +35,11 @@ export default class NumericInput extends Component {
/**
* Fired when an element has received focus
*/
- onFocus: PropTypes.func
+ onFocus: PropTypes.func,
+ /**
+ * Initial value to display
+ */
+ defaultValue: PropTypes.number
};
static defaultProps = {
@@ -50,10 +54,11 @@ export default class NumericInput extends Component {
onChange,
onBlur,
onFocus,
+ defaultValue,
...otherProps
} = this.props;
- const { className, disabled, step, value, defaultValue } = otherProps;
+ const { className, disabled, step, value} = otherProps;
const inputClassName = createCustomClassNames(className, "input");
|
refactor: resolve react test failing
|
Autodesk_hig
|
train
|
js
|
dc49c773b4d48ab600ec095ed1d38f1833eeb5e0
|
diff --git a/src/Auditor.php b/src/Auditor.php
index <HASH>..<HASH> 100644
--- a/src/Auditor.php
+++ b/src/Auditor.php
@@ -30,7 +30,7 @@ class Auditor extends Manager implements Contracts\Auditor
*/
public function getDefaultDriver()
{
- return $this->app['config']['audit.driver'];
+ return 'database';
}
/**
|
fix(Auditor): hardcode the default driver
|
owen-it_laravel-auditing
|
train
|
php
|
7b6793a3735b4add8ddc71bb5c6f7001983d3c57
|
diff --git a/packages/blueprint-sequelize/app/services/sequelize.js b/packages/blueprint-sequelize/app/services/sequelize.js
index <HASH>..<HASH> 100644
--- a/packages/blueprint-sequelize/app/services/sequelize.js
+++ b/packages/blueprint-sequelize/app/services/sequelize.js
@@ -1,7 +1,8 @@
const { Service, computed } = require ('@onehilltech/blueprint');
const Sequelize = require ('sequelize');
-const { forOwn } = require ('lodash');
+const { forOwn, mapValues } = require ('lodash');
+const Bluebird = require ('bluebird');
/**
* @class sequelize
@@ -64,5 +65,9 @@ module.exports = Service.extend ({
model (name, o) {
+ },
+
+ start () {
+ return Bluebird.props (mapValues (this._connections, connection => connection.authenticate ()));
}
});
|
feat: open connection to database when service starts
|
onehilltech_blueprint
|
train
|
js
|
45afd98bb3dcfaff9a27cf6df10b73b01dd4bbcb
|
diff --git a/test/test.js b/test/test.js
index <HASH>..<HASH> 100644
--- a/test/test.js
+++ b/test/test.js
@@ -9,7 +9,7 @@ const assert = require('assert').strict;
const Vinyl = require('vinyl');
describe('gulp-unassert', () => {
- ['es2018', 'es2019'].forEach((name) => {
+ for (const name of ['es2018', 'es2019']) {
it(name + ' syntax', (done) => {
const stream = unassert();
const srcStream = new Vinyl({
@@ -40,7 +40,7 @@ describe('gulp-unassert', () => {
stream.write(srcStream);
stream.end();
});
- });
+ }
it('should produce expected file via buffer', (done) => {
const stream = unassert();
|
refactor: prefer for-of
|
unassert-js_gulp-unassert
|
train
|
js
|
04436b4895a03a2134bcad3ab12e951d7cd929da
|
diff --git a/src/apm-base.js b/src/apm-base.js
index <HASH>..<HASH> 100644
--- a/src/apm-base.js
+++ b/src/apm-base.js
@@ -55,11 +55,17 @@ class ApmBase {
config (config) {
this.configService.setConfig(config)
}
+
// Should call this method before 'load' event on window is fired
setInitialPageLoadName (name) {
var transactionService = this.serviceFactory.getService('TransactionService')
transactionService.initialPageLoadName = name
}
+
+ captureError (error) {
+ var errorLogging = this.serviceFactory.getService('ErrorLogging')
+ return errorLogging.logError(error)
+ }
}
// function inBrowser () {
diff --git a/test/specs/apm-base.spec.js b/test/specs/apm-base.spec.js
index <HASH>..<HASH> 100644
--- a/test/specs/apm-base.spec.js
+++ b/test/specs/apm-base.spec.js
@@ -12,11 +12,10 @@ describe('ApmBase', function () {
return Promise.resolve()
}
}
- var errorLogging = apmBase.serviceFactory.getService('ErrorLogging')
try {
throw new Error('ApmBase test error')
} catch(error) {
- var promise = errorLogging.logErrorEvent({error: error})
+ var promise = apmBase.captureError(error)
promise.then(function () {
done()
})
|
feat: add captureError to ApmBase
|
elastic_apm-agent-rum-js
|
train
|
js,js
|
f48d15bcac7ed379423a2dd9ef45885b9430401e
|
diff --git a/src/features/page.js b/src/features/page.js
index <HASH>..<HASH> 100644
--- a/src/features/page.js
+++ b/src/features/page.js
@@ -54,7 +54,7 @@ function getDataFromRouter (router, args) {
export default function page (...args) {
const value = args[0]
- if (value.constructor.name === 'VueRouter') {
+ if ('currentRoute' in value) {
ga('send', 'pageview', getDataFromRouter(value, args))
return
}
|
fix(page): VueRouter constructor name changes if uglyfied
the constructor name could change if functions name are mangled during minification
to avoid this, we simply check if the value has a currentRoute property
so that we know that we are talking about a VueRouter instance
close #<I>
|
MatteoGabriele_vue-analytics
|
train
|
js
|
094ced7d242906fd4c8e156671f9b2215a9dd692
|
diff --git a/niworkflows/utils/bids.py b/niworkflows/utils/bids.py
index <HASH>..<HASH> 100644
--- a/niworkflows/utils/bids.py
+++ b/niworkflows/utils/bids.py
@@ -69,7 +69,7 @@ def collect_participants(bids_dir, participant_label=None, strict=False,
... str(datadir / 'ds114'), participant_label=['02', '14'],
... strict=True, bids_validate=False) # doctest: +IGNORE_EXCEPTION_DETAIL
Traceback (most recent call last):
- fmriprep.utils.bids.BIDSError:
+ BIDSError:
...
"""
|
fix: remove leftover in migration from fMRIPrep [skip ci]
I'm skipping ci because I made sure tests pass locally.
|
poldracklab_niworkflows
|
train
|
py
|
dcf6905f098f2ff0b86900f2f5fdb75ed8150282
|
diff --git a/go/mysql/replication_position.go b/go/mysql/replication_position.go
index <HASH>..<HASH> 100644
--- a/go/mysql/replication_position.go
+++ b/go/mysql/replication_position.go
@@ -68,10 +68,17 @@ func (rp Position) Equal(other Position) bool {
// AtLeast returns true if this position is equal to or after another.
func (rp Position) AtLeast(other Position) bool {
+ // The underlying call to the Contains method of the GTIDSet interface
+ // does not guarantee handling the nil cases correctly.
+ // So, we have to do nil case handling here
if other.GTIDSet == nil {
+ // If the other GTIDSet is nil, then it is contained
+ // in all possible GTIDSets, even nil ones.
return true
}
if rp.GTIDSet == nil {
+ // Here rp GTIDSet is nil but the other GTIDSet isn't.
+ // So it is not contained in the rp GTIDSet.
return false
}
return rp.GTIDSet.Contains(other.GTIDSet)
|
docs: added comments explaining the functioning of the AtLeast function
|
vitessio_vitess
|
train
|
go
|
8340eab38da4d27a21b46bea4d1daa484179801f
|
diff --git a/src/resolvers/__tests__/updateById-test.js b/src/resolvers/__tests__/updateById-test.js
index <HASH>..<HASH> 100644
--- a/src/resolvers/__tests__/updateById-test.js
+++ b/src/resolvers/__tests__/updateById-test.js
@@ -238,6 +238,7 @@ describe('updateById() ->', () => {
it('should have all fields optional in record', () => {
const resolver = updateById(UserModel, UserTC);
+ expect(resolver.getArgITC('record').getFieldTypeName('_id')).toBe('MongoID!');
expect(resolver.getArgITC('record').getFieldTypeName('name')).toBe('String');
expect(resolver.getArgITC('record').getFieldTypeName('age')).toBe('Float');
});
|
test: add missing test case for updateById resolver
|
graphql-compose_graphql-compose-mongoose
|
train
|
js
|
0ecc6294513f9519f6752f86c75c2f31d9cd492b
|
diff --git a/test/peer-to-peer-load-balance.js b/test/peer-to-peer-load-balance.js
index <HASH>..<HASH> 100644
--- a/test/peer-to-peer-load-balance.js
+++ b/test/peer-to-peer-load-balance.js
@@ -161,8 +161,8 @@ allocCluster.test('p2p requests from 40 -> 40 with minConnections', {
mean: [45, 55],
max: 120,
p75: [55, 70],
- p95: 95,
- variance: 450
+ p95: 100,
+ variance: 500
});
cassert.report(assert, 'expected request distribution to be ok');
|
test: change numeric values to reduce flaps on travis
|
uber_tchannel-node
|
train
|
js
|
ea59817fcb1a1246d71fea2dda83783ac736b7b1
|
diff --git a/src/defaults/discard.js b/src/defaults/discard.js
index <HASH>..<HASH> 100644
--- a/src/defaults/discard.js
+++ b/src/defaults/discard.js
@@ -3,6 +3,7 @@
import type { OfflineAction } from '../types';
import { NetworkError } from './effect';
+// eslint-disable-next-line no-unused-vars
export default (error: NetworkError, action: OfflineAction, _retries: number = 0): boolean => {
// not a network error -> discard
if (!('status' in error)) {
diff --git a/src/defaults/effect.js b/src/defaults/effect.js
index <HASH>..<HASH> 100644
--- a/src/defaults/effect.js
+++ b/src/defaults/effect.js
@@ -32,6 +32,7 @@ const getResponseBody = (res: any): Promise<{} | string> => {
return res.text();
};
+// eslint-disable-next-line no-unused-vars
export default (effect: any, _action: OfflineAction): Promise<any> => {
const { url, ...options } = effect;
const headers = { 'content-type': 'application/json', ...options.headers };
|
fix: add eslint disable to discard and effect
|
redux-offline_redux-offline
|
train
|
js,js
|
924a43d090e9ef39f54e6ba7e3d9423554ddee5a
|
diff --git a/lib/manager/npm/post-update/index.js b/lib/manager/npm/post-update/index.js
index <HASH>..<HASH> 100644
--- a/lib/manager/npm/post-update/index.js
+++ b/lib/manager/npm/post-update/index.js
@@ -544,11 +544,13 @@ async function getAdditionalFiles(config, packageFiles) {
} else {
lockFile = config.yarnLock || 'yarn.lock';
}
+ const skipInstalls =
+ lockFile === 'npm-shrinkwrap.json' ? false : config.skipInstalls;
const res = await lerna.generateLockFiles(
lernaPackageFile.lernaClient,
upath.join(config.localDir, lernaDir),
env,
- config.skipInstalls,
+ skipInstalls,
config.binarySource
);
// istanbul ignore else
|
fix(npm): full install for npm shrinkwrap
|
renovatebot_renovate
|
train
|
js
|
3a72ce5f24272ba0a20dd8fbe1a5eb992e8bc79c
|
diff --git a/src/component/legend/LegendView.js b/src/component/legend/LegendView.js
index <HASH>..<HASH> 100644
--- a/src/component/legend/LegendView.js
+++ b/src/component/legend/LegendView.js
@@ -28,7 +28,6 @@ import * as layoutUtil from '../../util/layout';
var curry = zrUtil.curry;
var each = zrUtil.each;
var Group = graphic.Group;
-var isArray = zrUtil.isArray;
export default echarts.extendComponentView({
|
fix(legendView): remove function isArray(), which is not used
|
apache_incubator-echarts
|
train
|
js
|
0b51f6b587d529174c861aca5305c89a92c3cce0
|
diff --git a/parse/parse.js b/parse/parse.js
index <HASH>..<HASH> 100644
--- a/parse/parse.js
+++ b/parse/parse.js
@@ -246,7 +246,7 @@ function tagForToStr(comp, indexLoopName) {
var txtFor = '\n\t' + contextToAlias(array_each[1]) + '.forEach(function(' + sub_array_each[0] + ',' + index_array + '){';
comp.children.forEach(sub_comp => txtFor += '\t' + componentToStr(sub_comp, index_array, indexLoopName));
- txtFor += '\t});\n';
+ txtFor += `\t}.bind(${context_alias}));\n`;
return txtFor;
}
function formatTextToStr(text) {
@@ -983,4 +983,3 @@ module.exports = function (rawHtml, config) {
return finalBuffer;
}
-
|
feat: For and each scope setted to this
|
ferrugemjs_ferrugemjs-node
|
train
|
js
|
45f51f7c0e0d70c859c98043ab56fd3022aec24b
|
diff --git a/zone_test.go b/zone_test.go
index <HASH>..<HASH> 100644
--- a/zone_test.go
+++ b/zone_test.go
@@ -1469,29 +1469,11 @@ func TestListZonesFailingPages(t *testing.T) {
}
func TestListZonesContextManualPagination1(t *testing.T) {
- setup()
- defer teardown()
-
- handler := func(w http.ResponseWriter, r *http.Request) {
- assert.FailNow(t, "no requests should have been made")
- }
-
- mux.HandleFunc("/zones", handler)
-
_, err := client.ListZonesContext(context.Background(), WithPagination(PaginationOptions{Page: 2}))
assert.EqualError(t, err, errManualPagination)
}
func TestListZonesContextManualPagination2(t *testing.T) {
- setup()
- defer teardown()
-
- handler := func(w http.ResponseWriter, r *http.Request) {
- assert.FailNow(t, "no requests should have been made")
- }
-
- mux.HandleFunc("/zones", handler)
-
_, err := client.ListZonesContext(context.Background(), WithPagination(PaginationOptions{PerPage: 30}))
assert.EqualError(t, err, errManualPagination)
}
|
refactor: no need to start useless servers during testing
|
cloudflare_cloudflare-go
|
train
|
go
|
516238cf7207f346e092993173762eba2ea47941
|
diff --git a/src/directives/ripple.js b/src/directives/ripple.js
index <HASH>..<HASH> 100644
--- a/src/directives/ripple.js
+++ b/src/directives/ripple.js
@@ -43,8 +43,8 @@ function showRipple (evt, el, stopPropagation) {
function shouldAbort ({mat, ios}) {
return (
- (mat && __THEME__ === 'mat') ||
- (ios && __THEME__ === 'ios')
+ (mat && __THEME__ !== 'mat') ||
+ (ios && __THEME__ !== 'ios')
)
}
|
fix: Ripple shouldAbort
|
quasarframework_quasar
|
train
|
js
|
63614d2ab25da3eacbc6eb0c4e64b0ffec1fcc26
|
diff --git a/lems/model/component.py b/lems/model/component.py
index <HASH>..<HASH> 100644
--- a/lems/model/component.py
+++ b/lems/model/component.py
@@ -425,7 +425,7 @@ class Children(LEMSBase):
Exports this object into a LEMS XML object
"""
- return '<{2} name="{0}" type="{1}"/>'.format(self.name, self.type, 'Children' if self.multiple else 'Child')
+ return '<{3} name="{0}" type="{1}" description="{2}"/>'.format(self.name, self.type, self.description, 'Children' if self.multiple else 'Child')
class Text(LEMSBase):
"""
|
feat: include description in Child and Children XML export
|
LEMS_pylems
|
train
|
py
|
55c3288c09abeed2a5ba65837c7a8167fa9a1515
|
diff --git a/lib/manager/resolve.js b/lib/manager/resolve.js
index <HASH>..<HASH> 100644
--- a/lib/manager/resolve.js
+++ b/lib/manager/resolve.js
@@ -66,7 +66,7 @@ async function resolvePackageFiles(config) {
);
}
if (packageFile.npmrc) {
- logger.info('Found .npmrc');
+ logger.info({ packageFile: packageFile.packageFile }, 'Found .npmrc');
if (
packageFile.npmrc.match(/\${NPM_TOKEN}/) &&
!config.global.exposeEnv
@@ -87,7 +87,7 @@ async function resolvePackageFiles(config) {
upath.join(path.dirname(packageFile.packageFile), '.yarnrc')
);
if (packageFile.yarnrc) {
- logger.info('Found .yarnrc');
+ logger.info({ packageFile: packageFile.packageFile }, 'Found .yarnrc');
} else {
delete packageFile.yarnrc;
}
|
chore: log filename for .npmrc and .yarnrc
|
renovatebot_renovate
|
train
|
js
|
dcdfb263a30c012ed2be081a56418b612aa584dd
|
diff --git a/src/WorkerPool.js b/src/WorkerPool.js
index <HASH>..<HASH> 100644
--- a/src/WorkerPool.js
+++ b/src/WorkerPool.js
@@ -68,7 +68,6 @@ class WorkerPool {
info.runningWorkers++
this.fcn(worker, ...taskArgs).then(({ webWorker, ...result }) => {
- info.postponed = false
this.workerQueue.push(webWorker)
info.runningWorkers--
info.results[resultIndex] = result
@@ -100,7 +99,10 @@ class WorkerPool {
} else {
// Try again later.
info.postponed = true
- setTimeout(() => this.addTask(info.index, resultIndex, taskArgs), 50)
+ setTimeout(() => {
+ info.postponed = false
+ this.addTask(info.index, resultIndex, taskArgs)
+ }, 50)
}
}
}
|
fix(WorkerPool): info.postponed at timeout completion
This is a correct / robust follow-up to
<I>b<I>f0c<I>a<I>d<I>a<I>d4c<I>a<I>e<I>
|
InsightSoftwareConsortium_itk-js
|
train
|
js
|
08477a22d754751655f4108ae2cffb0a73031ac4
|
diff --git a/source/rafcon/gui/views/logging_console.py b/source/rafcon/gui/views/logging_console.py
index <HASH>..<HASH> 100644
--- a/source/rafcon/gui/views/logging_console.py
+++ b/source/rafcon/gui/views/logging_console.py
@@ -38,7 +38,10 @@ class LoggingConsoleView(View):
self.text_view.set_buffer(self.filtered_buffer)
- self.text_view.set_border_width(10)
+ self.text_view.set_border_window_size(Gtk.TextWindowType.LEFT, 10)
+ self.text_view.set_border_window_size(Gtk.TextWindowType.RIGHT, 10)
+ self.text_view.set_border_window_size(Gtk.TextWindowType.TOP, 10)
+ self.text_view.set_border_window_size(Gtk.TextWindowType.BOTTOM, 10)
self._enables = {}
self._auto_scroll_handler_id = None
|
fix(logging_console): Fix #<I> by changing border width settings
Use set_border_window_size instead of set_border_width to set the
padding for TextView.
|
DLR-RM_RAFCON
|
train
|
py
|
83709a432dd8272e0588d42433c60956f29fd5b1
|
diff --git a/lib/match.js b/lib/match.js
index <HASH>..<HASH> 100644
--- a/lib/match.js
+++ b/lib/match.js
@@ -4,13 +4,11 @@ var through = require('through2');
// object mode transform stream takes tokenized css and yields complete,
// parseable rules or at-rules as strings.
module.exports = function match() {
- var current = null, depth = 0;
+ var current = null; // buffer for the current incoming rule.
+ var depth = 0; // track depth to handle rules nested in at-rules.
function write(token, enc, next) {
var type = token[0], buf = token[1];
- if(depth === 0 && current) {
- this.push({content: Buffer.concat(current).toString()});
- current = null;
- }
+
if(('rule_start' === type || 'atrule_start' === type))
depth++;
if(depth > 0 && !current)
@@ -19,6 +17,11 @@ module.exports = function match() {
depth--;
if(current) current.push(buf);
+ if(depth === 0 && current) {
+ this.push({content: Buffer.concat(current).toString()});
+ current = null;
+ }
+
next();
}
|
refactor: rearrange for making sense
|
anandthakker_css-rule-stream
|
train
|
js
|
36b2817e1339db4b944b56fd38bb08bda1311384
|
diff --git a/lib/expression.js b/lib/expression.js
index <HASH>..<HASH> 100644
--- a/lib/expression.js
+++ b/lib/expression.js
@@ -524,7 +524,7 @@ CronExpression.prototype._findSchedule = function _findSchedule (reverse) {
}
// The first character represents the weekday
- var weekday = Number.parseInt(expression[0]);
+ var weekday = Number.parseInt(expression[0]) % 7;
if (Number.isNaN(weekday)) {
throw new Error('Invalid last weekday of the month expression: ' + expression);
diff --git a/test/parser_day_of_month.js b/test/parser_day_of_month.js
index <HASH>..<HASH> 100644
--- a/test/parser_day_of_month.js
+++ b/test/parser_day_of_month.js
@@ -85,7 +85,8 @@ test('parse cron with last weekday of the month', function(t) {
{ expression: '0 0 0 * * 4L', expectedDate: 30 },
{ expression: '0 0 0 * * 5L', expectedDate: 24 },
{ expression: '0 0 0 * * 6L', expectedDate: 25 },
- { expression: '0 0 0 * * 0L', expectedDate: 26 }
+ { expression: '0 0 0 * * 0L', expectedDate: 26 },
+ { expression: '0 0 0 * * 7L', expectedDate: 26 }
];
testCases.forEach(function({ expression, expectedDate }) {
|
fix(expression): handle 7L, correctly (#<I>)
|
harrisiirak_cron-parser
|
train
|
js,js
|
c7816b62e41fdf5db0932cfeeb7299ff81b17778
|
diff --git a/src/Common/CodeIgniter/Core/Hooks.php b/src/Common/CodeIgniter/Core/Hooks.php
index <HASH>..<HASH> 100644
--- a/src/Common/CodeIgniter/Core/Hooks.php
+++ b/src/Common/CodeIgniter/Core/Hooks.php
@@ -88,8 +88,10 @@ class Hooks extends CI_Hooks
foreach ($this->aCustomHooks[$sWhich] as $aCustomHook) {
$this->runCustomHook($aCustomHook);
}
+ return true;
} else {
$this->runCustomHook($this->aCustomHooks[$sWhich]);
+ return true;
}
return parent::call_hook($sWhich);
|
fix: Cusotm hooks should return true if something is found
|
nails_common
|
train
|
php
|
e205ca40f1476f8dce943693b85b4cce979fd78e
|
diff --git a/src/index.js b/src/index.js
index <HASH>..<HASH> 100644
--- a/src/index.js
+++ b/src/index.js
@@ -35,7 +35,7 @@ module.exports = {
if (err) { return callback(err) }
conn.getPeerInfo((err, peerInfo) => {
- encryptedConnection.setInnerConn(state.secure)
+ encryptedConnection.setInnerConn(new Connection(state.secure, conn))
if (err) { // no peerInfo yet, means I'm the receiver
encryptedConnection.setPeerInfo(new PeerInfo(state.id.remote))
|
fix: cascading connection from encrypted connection to parent connection
|
libp2p_js-libp2p-secio
|
train
|
js
|
dec7489f8a2ec7957a6703cadca4334deecf5071
|
diff --git a/packages/app-forms/src/components/Form/FormRender.js b/packages/app-forms/src/components/Form/FormRender.js
index <HASH>..<HASH> 100644
--- a/packages/app-forms/src/components/Form/FormRender.js
+++ b/packages/app-forms/src/components/Form/FormRender.js
@@ -137,6 +137,7 @@ const FormRender = (props: FormRenderComponentPropsType) => {
}
const formSubmission = await createFormSubmission({
+ client,
props,
data,
reCaptchaResponseToken: reCaptchaResponseToken.current
diff --git a/packages/app-forms/src/components/Form/functions/createFormSubmission.js b/packages/app-forms/src/components/Form/functions/createFormSubmission.js
index <HASH>..<HASH> 100644
--- a/packages/app-forms/src/components/Form/functions/createFormSubmission.js
+++ b/packages/app-forms/src/components/Form/functions/createFormSubmission.js
@@ -11,7 +11,8 @@ type Args = {
};
export default async ({
- props: { data: form, client, preview },
+ client,
+ props: { data: form, preview },
data: rawData,
reCaptchaResponseToken
}: Args): Promise<FormSubmitResponseType> => {
|
fix: send client into createFormSubmission function
|
Webiny_webiny-js
|
train
|
js,js
|
b3857bd69038f2cbb652858345d4dbd7618eb3eb
|
diff --git a/lib/Connection.js b/lib/Connection.js
index <HASH>..<HASH> 100644
--- a/lib/Connection.js
+++ b/lib/Connection.js
@@ -201,6 +201,7 @@ class Session extends EventEmitter {
}
async dispose() {
+ console.assert(!!this._connection, 'Protocol error: Connection closed. Most likely the page has been closed.');
await this._connection.send('Target.closeTarget', {targetId: this._targetId});
}
|
fix(page): page.close() assert that connection is not closed (#<I>)
|
GoogleChrome_puppeteer
|
train
|
js
|
7f5850982e78b46a0db4d23778698e1889e24d67
|
diff --git a/examples/hash-mode/app.js b/examples/hash-mode/app.js
index <HASH>..<HASH> 100644
--- a/examples/hash-mode/app.js
+++ b/examples/hash-mode/app.js
@@ -32,7 +32,7 @@ new Vue({
router,
template: `
<div id="app">
- <h1>Basic</h1>
+ <h1>Mode: 'hash'</h1>
<ul>
<li><router-link to="/">/</router-link></li>
<li><router-link to="/foo">/foo</router-link></li>
diff --git a/examples/lazy-loading/app.js b/examples/lazy-loading/app.js
index <HASH>..<HASH> 100644
--- a/examples/lazy-loading/app.js
+++ b/examples/lazy-loading/app.js
@@ -69,7 +69,7 @@ new Vue({
router,
template: `
<div id="app">
- <h1>Basic</h1>
+ <h1>Lazy Loading</h1>
<ul>
<li><router-link to="/">/</router-link></li>
<li><router-link to="/foo">/foo</router-link></li>
|
test: fix examples h1 text (#<I>)
|
vuejs_vue-router
|
train
|
js,js
|
13015d2e7ebef9d7b9b8b5acb84a35b8dfde5502
|
diff --git a/ts/blueprints/ember-cli-typescript/index.js b/ts/blueprints/ember-cli-typescript/index.js
index <HASH>..<HASH> 100644
--- a/ts/blueprints/ember-cli-typescript/index.js
+++ b/ts/blueprints/ember-cli-typescript/index.js
@@ -125,7 +125,7 @@ module.exports = {
}
let packages = [
- { name: 'ember-cli-typescript-blueprints', target: '^2.0.0-beta.1' },
+ { name: 'ember-cli-typescript-blueprints', target: 'latest' },
{ name: 'typescript', target: 'latest' },
{ name: '@types/ember', target: 'latest' },
{ name: '@types/rsvp', target: 'latest' },
|
chore: install the latest stable ember-cli-typescript-blueprints in our host
|
typed-ember_ember-cli-typescript
|
train
|
js
|
5e15b1edd654498c4a288c9581aa9382a5c2d9ab
|
diff --git a/rocketbelt/components/images/rocketbelt.images-lazyload.js b/rocketbelt/components/images/rocketbelt.images-lazyload.js
index <HASH>..<HASH> 100644
--- a/rocketbelt/components/images/rocketbelt.images-lazyload.js
+++ b/rocketbelt/components/images/rocketbelt.images-lazyload.js
@@ -4,7 +4,7 @@
$(document).ready(function () {
$('.lazyload-wrapper').each(function () {
var wrapper = this,
- small = wrapper.querySelector('.lazyload-small');
+ small = wrapper.querySelector('.lazyload-small');
var img = new Image();
img.src = small.src;
@@ -22,9 +22,11 @@
})
.on('enter', function () {
var wrapper = this.triggerElement().parentElement;
+ var alt = this.triggerElement().getAttribute('alt');
var imgLarge = new Image();
imgLarge.src = wrapper.dataset.srcLg;
+ imgLarge.alt = alt;
imgLarge.onload = function () {
imgLarge.classList.add('loaded');
};
|
feat(Lazyload): Append alt to large image from small image.
|
Pier1_rocketbelt
|
train
|
js
|
4773d65e7e3d012cb1f7350ad1bac6effd9d8832
|
diff --git a/packages/core/logger/src/Logger.js b/packages/core/logger/src/Logger.js
index <HASH>..<HASH> 100644
--- a/packages/core/logger/src/Logger.js
+++ b/packages/core/logger/src/Logger.js
@@ -75,10 +75,7 @@ class Logger {
if (this.logLevel > 4) {
if (!this.logFile) {
this.logFile = fs.createWriteStream(
- path.join(
- process.cwd(),
- `parcel-debug-${currDate.toLocaleDateString()}@${currDate.toLocaleTimeString()}.log`
- )
+ path.join(process.cwd(), `parcel-debug-${currDate.toISOString()}.log`)
);
}
this.logFile.write(stripAnsi(message) + '\n');
|
fix: remove Date.toLocaleString() in logfile names to prevent slashes (#<I>)
|
parcel-bundler_parcel
|
train
|
js
|
09e44aef4dd6fc3c06097b8a7c566b0ab40a7639
|
diff --git a/src/rez/pip.py b/src/rez/pip.py
index <HASH>..<HASH> 100644
--- a/src/rez/pip.py
+++ b/src/rez/pip.py
@@ -200,29 +200,17 @@ def pip_to_rez_package_name(distribution):
return name
-def run_pip_command(command_args, process_output=False, pip_version=None, python_version=None):
+def run_pip_command(command_args, pip_version=None, python_version=None):
"""Run a pip command.
-
Args:
command_args (list of str): Args to pip.
-
Returns:
`subprocess.Popen`: Pip process.
"""
pip_exe, context = find_pip(pip_version, python_version)
command = [pip_exe] + list(command_args)
- if process_output:
- try:
- subprocess.check_output(command, stderr=subprocess.STDOUT)
- except subprocess.CalledProcessError as e:
- regex = r"(?<=\(from versions:).*?(?=\))"
- pattern = re.compile(regex)
- match = pattern.search(e.output)
- output = match.group(0).split(",")
- return output
-
- elif context is None:
+ if context is None:
return popen(command)
else:
return context.execute_shell(command=command, block=False)
|
fix(rez-pip): revert to original run pip command function
|
nerdvegas_rez
|
train
|
py
|
f963b059943e5c3c33507e95c1a5116ad3ae71b5
|
diff --git a/azurerm/internal/services/privatedns/client.go b/azurerm/internal/services/privatedns/client.go
index <HASH>..<HASH> 100644
--- a/azurerm/internal/services/privatedns/client.go
+++ b/azurerm/internal/services/privatedns/client.go
@@ -8,7 +8,7 @@ import (
type Client struct {
RecordSetsClient *privatedns.RecordSetsClient
PrivateZonesClient *privatedns.PrivateZonesClient
- VirtualNetworkLinksClient privatedns.VirtualNetworkLinksClient
+ VirtualNetworkLinksClient *privatedns.VirtualNetworkLinksClient
}
func BuildClient(o *common.ClientOptions) *Client {
@@ -24,6 +24,6 @@ func BuildClient(o *common.ClientOptions) *Client {
return &Client{
RecordSetsClient: &RecordSetsClient,
PrivateZonesClient: &PrivateZonesClient,
- VirtualNetworkLinksClient: virtualNetworkLinksClient,
+ VirtualNetworkLinksClient: &virtualNetworkLinksClient,
}
}
|
refactor: making the virtual networks client a pointer
|
terraform-providers_terraform-provider-azurerm
|
train
|
go
|
59330f69ee69fe988f3e15f92fdd8045c3abc651
|
diff --git a/Skinny.class.php b/Skinny.class.php
index <HASH>..<HASH> 100644
--- a/Skinny.class.php
+++ b/Skinny.class.php
@@ -111,7 +111,7 @@ class Skinny{
if(empty($html))
return $html;
- if( preg_match_all('~<ins data-type="movetoskin" data-name="([\w:]+)">([\S\s]*?)<\/ins>~m', $html, $matches, PREG_SET_ORDER) ){
+ if( preg_match_all('~<ins data-type="movetoskin" data-name="([\w:-]+)">([\S\s]*?)<\/ins>~m', $html, $matches, PREG_SET_ORDER) ){
foreach($matches as $match){
if( !isset( self::$content[ $match[1] ] )){
self::$content[ $match[1] ] = array();
@@ -205,7 +205,7 @@ class Skinny{
$skinNames = \Skin::getSkinNames();
$skinName = $skinNames[$key];
-
+
$className = "\Skin{$skinName}";
if (class_exists($className)) {
$skin = new $className();
|
fix: hyphens should be allowed in zone names
|
tinymighty_skinny
|
train
|
php
|
cbb1e43241d423c9b49951e4ba138940ca4d9f51
|
diff --git a/src/commands/main.js b/src/commands/main.js
index <HASH>..<HASH> 100644
--- a/src/commands/main.js
+++ b/src/commands/main.js
@@ -143,7 +143,7 @@ const mainCommand = async function (options, command) {
}, SUGGESTION_TIMEOUT)
// eslint-disable-next-line promise/catch-or-return
- prompt.then((value) => resolve(value))
+ prompt.then((value) => resolve(value.suggestion))
})
// create new log line
log()
|
fix: no option in Suggestion prompt (#<I>) (#<I>)
|
netlify_cli
|
train
|
js
|
fd6ca3752e2baa251b1a04bb95b6383eb26ef676
|
diff --git a/test/testFromStyleguidist.js b/test/testFromStyleguidist.js
index <HASH>..<HASH> 100644
--- a/test/testFromStyleguidist.js
+++ b/test/testFromStyleguidist.js
@@ -68,8 +68,8 @@ const testFromStyleguidist = (
options
)
await sleep(delay) // some components (like the ActionMenu) are flaky due to external libs
- requestAnimationFrame(() => {
- root.update()
+ requestAnimationFrame(async () => {
+ await root.update()
rendered.push(pretty(removeTouchRipples(root.html())))
doneCounter++
if (doneCounter === codes.length) {
|
fix(test): Use async/await in testFromStyleguidist
|
cozy_cozy-ui
|
train
|
js
|
3c822367051a61f5d6d37e64597f1cbc92f91f69
|
diff --git a/memory-store/index.js b/memory-store/index.js
index <HASH>..<HASH> 100644
--- a/memory-store/index.js
+++ b/memory-store/index.js
@@ -86,7 +86,7 @@ class MemoryStore {
return entry
}
- async get (opts) {
+ async get (opts = {}) {
let entries
if (opts.order === 'created') {
entries = this.entries
|
fix(memory-store): `get` should works without `opts` argument (#<I>)
|
logux_core
|
train
|
js
|
0db42522a5115836a440743f7670d9689463fc9a
|
diff --git a/test/instrumentation/modules/mysql/mysql.js b/test/instrumentation/modules/mysql/mysql.js
index <HASH>..<HASH> 100644
--- a/test/instrumentation/modules/mysql/mysql.js
+++ b/test/instrumentation/modules/mysql/mysql.js
@@ -124,7 +124,7 @@ factories.forEach(function (f) {
setTimeout(function () {
trans.end()
agent.flush()
- }, 150)
+ }, 250)
})
})
})
|
test: reduce likelihood of flaky mysql test failing (#<I>)
Once in blue moon this test fails - yolo
|
elastic_apm-agent-nodejs
|
train
|
js
|
d31a5b360179f91f4f4f20255b2659c5a7038c28
|
diff --git a/repo/fsrepo/migrations/migrations.go b/repo/fsrepo/migrations/migrations.go
index <HASH>..<HASH> 100644
--- a/repo/fsrepo/migrations/migrations.go
+++ b/repo/fsrepo/migrations/migrations.go
@@ -15,7 +15,7 @@ import (
"strings"
)
-var DistPath = "https://ipfs.io/ipfs/QmUgfXycSjF9R8F4Tyauaz6LZ4bj5nbksg54G9GdF4fit6"
+var DistPath = "https://ipfs.io/ipfs/QmXuKUDChMXkcq36CbaggvY3UaAtgpi7yyoAiNy5VD9Dfr"
func init() {
if dist := os.Getenv("IPFS_DIST_PATH"); dist != "" {
|
fix: update dists url for OpenBSD support
|
ipfs_go-ipfs
|
train
|
go
|
80454bf588e3660222784b23043478f93951e5a4
|
diff --git a/lib/request/GetRequestV2.js b/lib/request/GetRequestV2.js
index <HASH>..<HASH> 100644
--- a/lib/request/GetRequestV2.js
+++ b/lib/request/GetRequestV2.js
@@ -262,8 +262,14 @@ function createDisposable(request, idx) {
// If there are no more requests, then dispose all of the request.
var count = --request._count;
+ var disposable = request._disposable;
if (count === 0) {
- request._disposable.dispose();
+ // looking for unsubscribe here to support more data sources (Rx)
+ if (disposable.unsubscribe) {
+ disposable.unsubscribe();
+ } else {
+ disposable.dispose();
+ }
request.requestQueue.removeRequest(request);
}
};
|
fix: support more kinds of data sources
specifically those that provide .unsubscribe() on their
disposables instead of .dispose()
|
Netflix_falcor
|
train
|
js
|
15bc0ee73e2890c65f2effd13923a78f6269a6e0
|
diff --git a/website/src/components/guides/gradients/GradientsExample.js b/website/src/components/guides/gradients/GradientsExample.js
index <HASH>..<HASH> 100644
--- a/website/src/components/guides/gradients/GradientsExample.js
+++ b/website/src/components/guides/gradients/GradientsExample.js
@@ -37,7 +37,7 @@ const MyChart = () => (
{ offset: 0, color: '#faf047' },
{ offset: 100, color: '#e4b400' },
],
- ,
+ },
]}
// 2. defining rules to apply those gradients
fill={[
|
fix(website): Add closed bracket in gradients example code (#<I>)
|
plouc_nivo
|
train
|
js
|
836379157b5164bd0c2d6b06d3e92ab69b62d83b
|
diff --git a/src/server/public/scripts/modules/FormCreate.js b/src/server/public/scripts/modules/FormCreate.js
index <HASH>..<HASH> 100755
--- a/src/server/public/scripts/modules/FormCreate.js
+++ b/src/server/public/scripts/modules/FormCreate.js
@@ -176,7 +176,7 @@ export default class FormCreate {
}.bind(this))
}
- var slugPaths = document.querySelectorAll('[data-slug-type=path]')
+ var slugPaths = this._form.querySelectorAll('[data-slug-type=path]')
Array.prototype.forEach.call(slugPaths, function(slugPath) {
var isStructureFolder = (slugPath.parentNode.getAttribute('data-shown') != null)
if (slugPath.value != null && slugPath.value != '' && (isStructureFolder && !slugPath.parentNode.classList.contains('hidden'))) {
|
fix: bug abejs form multiple precontrib was selected on queryselector for structure path url
|
abecms_abecms
|
train
|
js
|
fc9cb126e5ec434ad5e9536aa75d86eed845e676
|
diff --git a/cmd/helm/install.go b/cmd/helm/install.go
index <HASH>..<HASH> 100644
--- a/cmd/helm/install.go
+++ b/cmd/helm/install.go
@@ -346,7 +346,9 @@ func locateChartPath(name, version string, verify bool, keyring string) (string,
if err != nil {
return filename, err
}
- fmt.Printf("Fetched %s to %s\n", name, filename)
+ if flagDebug {
+ fmt.Printf("Fetched %s to %s\n", name, filename)
+ }
return lname, nil
} else if flagDebug {
return filename, err
|
fix(helm): suprress info message for 'helm inspect'
There was an informational message being printed that is unnecessary,
but prevented shell scripting the results of inspect calls.
Closes #<I>
|
helm_helm
|
train
|
go
|
98c1a6f37335a37760fe6850c2056552c082c547
|
diff --git a/updateengine/client.go b/updateengine/client.go
index <HASH>..<HASH> 100644
--- a/updateengine/client.go
+++ b/updateengine/client.go
@@ -72,7 +72,8 @@ func (c *Client) RebootNeededSignal(rcvr chan Status) {
}
func (c *Client) GetStatus() (result Status, err error) {
- call := c.object.Call(dbusInterface + ".GetStatus", 0)
+ call := c.object.Call(dbusInterface+".GetStatus", 0)
+ err = call.Err
if err != nil {
return
}
|
fix(updateengine): set error appropriately from dbus call
|
coreos_locksmith
|
train
|
go
|
0f0880d4527bb922430b71b79d8f738d84902920
|
diff --git a/components/switch/index.js b/components/switch/index.js
index <HASH>..<HASH> 100644
--- a/components/switch/index.js
+++ b/components/switch/index.js
@@ -98,10 +98,10 @@ export default class Switch extends Intact {
}
_onClick(e) {
- this.trigger('click', e);
if (!e._switchIgnore) {
this._toggle(e, false);
}
+ this.trigger('click', e);
}
_toggle(e, isKeypress) {
|
fix(Switch): should change value then trigger click event and should keep it consistent, close #<I>
|
ksc-fe_kpc
|
train
|
js
|
82b7d2cd1983e7240f97851b4a56f77b3044c156
|
diff --git a/tests/utils/misc/index.js b/tests/utils/misc/index.js
index <HASH>..<HASH> 100644
--- a/tests/utils/misc/index.js
+++ b/tests/utils/misc/index.js
@@ -83,13 +83,13 @@ function wait(ms) {
}
module.exports = {
- logger,
- region,
confirmCloudWatchLogs,
- testServiceIdentifier,
- serviceNameRegex,
getServiceName,
- replaceEnv,
+ logger,
persistentRequest,
+ region,
+ replaceEnv,
+ serviceNameRegex,
+ testServiceIdentifier,
wait,
};
|
test: Alphabetical order on exports
|
serverless_serverless
|
train
|
js
|
b83fc00f6188b06aeb134820eb0af85d76bb843b
|
diff --git a/app/src/components/FileInfo/index.js b/app/src/components/FileInfo/index.js
index <HASH>..<HASH> 100644
--- a/app/src/components/FileInfo/index.js
+++ b/app/src/components/FileInfo/index.js
@@ -23,9 +23,11 @@ type Props = {|
export default function FileInfo(props: Props) {
const { robot, sessionLoaded, sessionHasSteps } = props
- const uploadError = sessionHasSteps
- ? props.uploadError
- : { message: NO_STEPS_MESSAGE }
+ let uploadError = props.uploadError
+
+ if (sessionLoaded && !uploadError && !sessionHasSteps) {
+ uploadError = { message: NO_STEPS_MESSAGE }
+ }
return (
<div className={styles.file_info_container}>
@@ -33,9 +35,7 @@ export default function FileInfo(props: Props) {
<ProtocolPipettesCard robot={robot} />
<ProtocolModulesCard robot={robot} />
<ProtocolLabwareCard />
- {sessionLoaded && uploadError && (
- <UploadError uploadError={uploadError} />
- )}
+ {uploadError && <UploadError uploadError={uploadError} />}
{sessionLoaded && !uploadError && <Continue />}
</div>
)
|
refactor(app): fix no-steps-in-protocol warning clobbering upload errors (#<I>)
|
Opentrons_opentrons
|
train
|
js
|
f39f3b1668d3ad64fa4269807e0f609fbbde4c96
|
diff --git a/src/ServerlessOffline.js b/src/ServerlessOffline.js
index <HASH>..<HASH> 100644
--- a/src/ServerlessOffline.js
+++ b/src/ServerlessOffline.js
@@ -20,10 +20,16 @@ export default class ServerlessOffline {
#lambda = null
#serverless = null
- constructor(serverless, cliOptions) {
+ constructor(serverless, cliOptions, v3Utils) {
this.#cliOptions = cliOptions
this.#serverless = serverless
+ if (v3Utils) {
+ this.log = v3Utils.log
+ this.progress = v3Utils.progress
+ this.writeText = v3Utils.writeText
+ }
+
setLog((...args) => serverless.cli.log(...args))
this.commands = {
|
refactor: Adapt v3 log writing interfaces
|
dherault_serverless-offline
|
train
|
js
|
e284b26a2cb367f5fb00f1a7112a4bdf869eb187
|
diff --git a/lib/api-client/resources/tenant.js b/lib/api-client/resources/tenant.js
index <HASH>..<HASH> 100644
--- a/lib/api-client/resources/tenant.js
+++ b/lib/api-client/resources/tenant.js
@@ -194,4 +194,22 @@ Tenant.delete = function (options, done) {
});
};
+Tenant.options = function(options, done) {
+ var id;
+
+ if (arguments.length === 1) {
+ done = options;
+ id = "";
+
+ } else {
+ id = typeof options === 'string' ? options : options.id;
+ if( id === undefined ) {
+ id = "";
+ }
+ }
+
+ return this.http.options(this.path + '/' + id, {
+ done: done || noop
+ });
+}
module.exports = Tenant;
diff --git a/test/client/resources/tenantSpec.js b/test/client/resources/tenantSpec.js
index <HASH>..<HASH> 100644
--- a/test/client/resources/tenantSpec.js
+++ b/test/client/resources/tenantSpec.js
@@ -53,4 +53,8 @@ describe('The Tenant resource usage', function() {
it('has a `delete` method', function() {
expect(Tenant.delete).to.be.a('function');
});
+
+ it('has a `options` method', function() {
+ expect(Tenant.options).to.be.a('function');
+ });
});
|
feat(api-client): add options request to tenant resource
Related to: #CAM-<I>
|
camunda_camunda-bpm-sdk-js
|
train
|
js,js
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.