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 |
|---|---|---|---|---|---|
0ab1b75dbc70efc9efd5bec58a1fd4422132d8ef
|
diff --git a/lib/base.js b/lib/base.js
index <HASH>..<HASH> 100644
--- a/lib/base.js
+++ b/lib/base.js
@@ -584,9 +584,11 @@ class WebpackBaseBuilder {
this.config.proxy = proxy;
}
- setDevMode(port, proxy = false) {
+ setDevMode(port, proxy) {
this.config.port = port || 9000;
- this.config.proxy = proxy;
+ if (proxy !== undefined) {
+ this.config.proxy = proxy;
+ }
const host = utils.getHost(this.config.port);
this.setPublicPath(utils.joinPath(host, this.publicPath.replace(host, '')));
const testFile = path.join(this.config.baseDir, '.webpack.js');
|
fix: server side render, egg local dev mode , proxy static resource proxy to <I> address
|
easy-team_easywebpack
|
train
|
js
|
8634745a9794022c3dcf6d0cfdaa8d1310a27041
|
diff --git a/lib/boot/parse/order-boot-sequence.js b/lib/boot/parse/order-boot-sequence.js
index <HASH>..<HASH> 100644
--- a/lib/boot/parse/order-boot-sequence.js
+++ b/lib/boot/parse/order-boot-sequence.js
@@ -19,7 +19,7 @@ class Sequencer {
this.orderedServiceNames = _.uniq(this.orderedServiceNames)
} // constructor
- get orderedServiceComponents() {
+ get orderedServiceComponents () {
if (this.hasErrors) return
const orderedServiceComponents = []
|
style: lint fix - added a space :o
|
wmfs_tymly-core
|
train
|
js
|
ec8d16b3e86e799ff88e0763b54b6671d8164f82
|
diff --git a/anytemplate/__init__.py b/anytemplate/__init__.py
index <HASH>..<HASH> 100644
--- a/anytemplate/__init__.py
+++ b/anytemplate/__init__.py
@@ -81,8 +81,10 @@ see its help; see the output of 'help(anytemplate.render)', etc.
"""
from __future__ import absolute_import
from .globals import AUTHOR, VERSION, LOGGER
-from .api import find_engine, renders, render, render_to, \\
- TemplateEngineNotFound, TemplateNotFound
+from .api import (
+ find_engine, renders, render, render_to, TemplateEngineNotFound,
+ TemplateNotFound
+)
from .engine import list_engines_by_priority as list_engines
__author__ = AUTHOR
|
refactor: enclose imported objects instead of breaking lines with '\'
|
ssato_python-anytemplate
|
train
|
py
|
3589dbd0d40f1a9a48fa2aa3d706b28c7875f616
|
diff --git a/src/component/association-select.js b/src/component/association-select.js
index <HASH>..<HASH> 100644
--- a/src/component/association-select.js
+++ b/src/component/association-select.js
@@ -1,11 +1,8 @@
import getProp from 'get-prop';
-import {logger} from '../aurelia-orm';
import {inject} from 'aurelia-dependency-injection';
import {bindingMode, BindingEngine} from 'aurelia-binding';
import {bindable, customElement} from 'aurelia-templating';
-import {EntityManager} from '../entity-manager';
-import {Entity} from '../entity';
-import {OrmMetadata} from '../orm-metadata';
+import {EntityManager, Entity, OrmMetadata, logger} from '../aurelia-orm';
import extend from 'extend';
@customElement('association-select')
|
refactor(association-select): need to import from the later concated aurelia-orm
|
SpoonX_aurelia-orm
|
train
|
js
|
d54347391f196134394169059f63bb28bc773773
|
diff --git a/connection/pool.js b/connection/pool.js
index <HASH>..<HASH> 100644
--- a/connection/pool.js
+++ b/connection/pool.js
@@ -951,7 +951,7 @@ Pool.prototype.destroy = function(force) {
while (self.queue.length > 0) {
var workItem = self.queue.shift();
if (typeof workItem.cb === 'function') {
- workItem.cb(null, new Error('force flushing work queue'));
+ workItem.cb(new MongoError('Pool was force destroyed'));
}
}
|
fix(pool): ensure that errors are propagated on force destroy
NODE-<I>
|
mongodb_node-mongodb-native
|
train
|
js
|
c9bf5abe089a790195e04ac689a15e237f885077
|
diff --git a/packages/blueprint-gatekeeper/app/services/session.js b/packages/blueprint-gatekeeper/app/services/session.js
index <HASH>..<HASH> 100644
--- a/packages/blueprint-gatekeeper/app/services/session.js
+++ b/packages/blueprint-gatekeeper/app/services/session.js
@@ -75,7 +75,7 @@ module.exports = Service.extend ({
// If the client has an black and white list, then we need to make sure the
// account is not in the black list and is in the white list.
- const { origin, refreshable = true, temporary = false } = opts;
+ const { origin, refreshable = true, tags } = opts;
if (account.enabled !== true)
return Promise.reject (new BadRequestError ('account_disabled', 'The account is disabled.'));
@@ -116,10 +116,10 @@ module.exports = Service.extend ({
if (!!origin)
doc.origin = origin;
- const UserToken = this.UserToken;
- const token = new UserToken (doc);
+ if (tags)
+ doc.tags = tags;
- return temporary ? token : token.save ();
+ return this.UserToken.create (doc);
});
},
|
feat: Added tags attribute to access token
|
onehilltech_blueprint
|
train
|
js
|
b883b051c2f19601cd33a0f4cae3c3a0c1de3b26
|
diff --git a/lib/index.js b/lib/index.js
index <HASH>..<HASH> 100644
--- a/lib/index.js
+++ b/lib/index.js
@@ -108,7 +108,7 @@ module.exports = class Bundler {
return this._fileReader(packageConfig).then(fileReader => {
const reader = new PackageReader(fileReader);
this._readersMap[packageConfig.name] = reader;
- return reader.ensureMainPath();
+ return reader;
});
}
|
fix: lazily resolve package main
When dumber-gist introduces initial lazy package configs, some package readers may not be needed at runtime. This can happen when a npm package has dependencies in package.json, but some deps are not required (based on code tracing) at runtime. This fix avoids some unnecessary remote fetches in dumber-gist.
|
dumberjs_dumber
|
train
|
js
|
6af436f0c216cc0d2077e8ffd3b91d34fc71e3d2
|
diff --git a/src/View.js b/src/View.js
index <HASH>..<HASH> 100644
--- a/src/View.js
+++ b/src/View.js
@@ -306,7 +306,7 @@ var View = createClass(
set: actionSet
}, options.actions);
}
- else if(this.parentView == null || this._isolated)
+ else if((this.parentView == null || this._isolated )&& !options._clone)
{
this.actions = {
set: actionSet
@@ -1041,6 +1041,7 @@ var View = createClass(
options.parentView = null;
options.env = this.env;
+ options._clone = true;
var clonedView = new this.constructor(options);
|
fix(View): do not add default set action to cloned views
|
karfcz_kff
|
train
|
js
|
bf087f17fece87032b90bd4eaa5e72ed613385aa
|
diff --git a/lib/config.js b/lib/config.js
index <HASH>..<HASH> 100644
--- a/lib/config.js
+++ b/lib/config.js
@@ -527,17 +527,8 @@ function parseString(str) {
if (!str) {
return '';
}
- var data = readFileText(str);
- if (data) {
- return data;
- }
- try {
- data = JSON.parse(str);
- if (typeof data === 'string') {
- return data;
- }
- } catch (err) {}
- if (!/\s/.test(str)) {
+ str = readFileText(str) || str;
+ if (!/\s/.test(str) && str.indexOf('%') !== -1) {
try {
str = decodeURIComponent(str);
} catch (e) {}
|
refactor: refine shadowRules
|
avwo_whistle
|
train
|
js
|
2a5b20021243160755449bd1905f0f47b5521a26
|
diff --git a/test/client.test.js b/test/client.test.js
index <HASH>..<HASH> 100644
--- a/test/client.test.js
+++ b/test/client.test.js
@@ -177,11 +177,19 @@ test('GH-388 GET json, but really HTML', function (t) {
test('GH-115 GET path with spaces', function (t) {
- JSON_CLIENT.get('/json/foo bar', function (err, req, res, obj) {
+ // As of node v0.11, this throws, since it's never valid HTTP
+ try {
+ JSON_CLIENT.get('/json/foo bar', function (err, req, res, obj) {
+ t.ok(err);
+ t.equal(err.code, 'ECONNRESET');
+ t.end();
+ });
+ } catch (err) {
t.ok(err);
- t.equal(err.code, 'ECONNRESET');
+ t.equal(err.constructor, TypeError);
+ t.equal(err.message, 'Request path contains unescaped characters.');
t.end();
- });
+ }
});
|
test: update client malformed test for node <I>
The 'spaces in path' error is now caught early in the client,
since it's never valid HTTP. Update the test to handle this.
|
restify_plugins
|
train
|
js
|
9c7293827ffc05da59cc8b0c1a7b78f4df1b96cb
|
diff --git a/algoliasearch/types_index.go b/algoliasearch/types_index.go
index <HASH>..<HASH> 100644
--- a/algoliasearch/types_index.go
+++ b/algoliasearch/types_index.go
@@ -1,15 +1,15 @@
package algoliasearch
type IndexRes struct {
- CreatedAt string `json:"createdAt"`
- DataSize int `json:"dataSize"`
- Entries int `json:"entries"`
- FileSize int `json:"fileSize"`
- LastBuildTimeS int `json:"lastBuildTimeS"`
- Name string `json:"name"`
- NumberOfPendingTask int `json:"numberOfPendingTask"`
- PendingTask bool `json:"pendingTask"`
- UpdatedAt string `json:"updatedAt"`
+ CreatedAt string `json:"createdAt"`
+ DataSize int `json:"dataSize"`
+ Entries int `json:"entries"`
+ FileSize int `json:"fileSize"`
+ LastBuildTimeS int `json:"lastBuildTimeS"`
+ Name string `json:"name"`
+ NumberOfPendingTasks int `json:"numberOfPendingTasks"`
+ PendingTask bool `json:"pendingTask"`
+ UpdatedAt string `json:"updatedAt"`
}
type listIndexesRes struct {
|
fix: Add missing trailing S to IndexRes' NumberOfPendingTasks (closes #<I>)
|
algolia_algoliasearch-client-go
|
train
|
go
|
a2c1acf97c8c7b8a00cdd26fc35de25d6844fe4a
|
diff --git a/lib/topology_lib_ip/library.py b/lib/topology_lib_ip/library.py
index <HASH>..<HASH> 100644
--- a/lib/topology_lib_ip/library.py
+++ b/lib/topology_lib_ip/library.py
@@ -160,5 +160,6 @@ def ping(enode, count, destination):
__all__ = [
'interface',
'add_route',
+ 'add_6_route',
'ping'
]
|
fix: dev: Forgot to add to public interface.
|
HPENetworking_topology_lib_ip
|
train
|
py
|
d63a77d8b1607d299d836b126c8e8bf81bcc2c68
|
diff --git a/build.go b/build.go
index <HASH>..<HASH> 100644
--- a/build.go
+++ b/build.go
@@ -210,7 +210,7 @@ func createPackage(options linuxPackageOptions) {
// copy sample ini file to /etc/grafana
runPrint("cp", "conf/sample.ini", filepath.Join(packageRoot, options.configFilePath))
// copy sample ldap toml config file to /etc/grafana/ldap.toml
- runPrint("cp", "conf/sample.ini", filepath.Join(packageRoot, options.ldapFilePath))
+ runPrint("cp", "conf/ldap.toml", filepath.Join(packageRoot, options.ldapFilePath))
args := []string{
"-s", "dir",
|
fix(build): fixed ldap config file sample issue and build script
|
grafana_grafana
|
train
|
go
|
73b71844bdbe17659c7baaec5fd41a7eeadb0da6
|
diff --git a/tabula/file_util.py b/tabula/file_util.py
index <HASH>..<HASH> 100644
--- a/tabula/file_util.py
+++ b/tabula/file_util.py
@@ -1,5 +1,6 @@
import os
import shutil
+import uuid
from urllib.parse import quote, urlparse, uses_netloc, uses_params, uses_relative
from urllib.request import Request, urlopen
@@ -51,8 +52,7 @@ def localize_file(path_or_buffer, user_agent=None, suffix=".pdf"):
return filename, True
elif is_file_like(path_or_buffer):
- pid = os.getpid()
- filename = "{}{}".format(pid, suffix)
+ filename = "{}{}".format(uuid.uuid4(), suffix)
with open(filename, "wb") as f:
shutil.copyfileobj(path_or_buffer, f)
|
fix: create unique file name for temporaly file
Since creating pid based file name causes multi thread issue, i.e.,
temporary file will be removed with concurrent task. Use uuid instead of
pid to prevent unintended removal with io.BytesIO.
close #<I>
|
chezou_tabula-py
|
train
|
py
|
001a8ead021f7454db999609b1fd4981008efaa9
|
diff --git a/src/Select.js b/src/Select.js
index <HASH>..<HASH> 100644
--- a/src/Select.js
+++ b/src/Select.js
@@ -830,6 +830,7 @@ class Select extends React.Component {
onRemove={this.removeValue}
placeholder={this.props.placeholder}
value={value}
+ values={valueArray}
>
{renderLabel(value, i)}
<span className="Select-aria-only"> </span>
|
feat: add `values` to `ValueComponent` in multi-select (#<I>)
|
JedWatson_react-select
|
train
|
js
|
e5a89cce196f84bcacf98ec22d35b48002915766
|
diff --git a/lib/decorate.js b/lib/decorate.js
index <HASH>..<HASH> 100644
--- a/lib/decorate.js
+++ b/lib/decorate.js
@@ -9,7 +9,8 @@ function decorate (callSpec, decorator) {
return function decoratedAssert () {
var context, message, hasMessage = false;
- // https://github.com/petkaantonov/bluebird/wiki/Optimization-killers#32-leaking-arguments
+ // see: https://github.com/twada/empower-core/pull/8#issue-127859465
+ // see: https://github.com/petkaantonov/bluebird/wiki/Optimization-killers#32-leaking-arguments
var args = new Array(arguments.length);
for(var i = 0; i < args.length; ++i) {
args[i] = arguments[i];
diff --git a/lib/decorator.js b/lib/decorator.js
index <HASH>..<HASH> 100644
--- a/lib/decorator.js
+++ b/lib/decorator.js
@@ -103,6 +103,7 @@ Decorator.prototype.concreteAssert = function (callSpec, invocation, context) {
return this._callFunc(func, thisObj, args, data);
};
+// see: https://github.com/twada/empower-core/pull/8#issuecomment-173480982
Decorator.prototype._callFunc = function (func, thisObj, args, data) {
var ret;
try {
|
chore(empower-core): leave comments on optimization points
|
twada_empower-core
|
train
|
js,js
|
184e5302cf006f13b5863720183c1cd8c78b0f6c
|
diff --git a/packages/VSTouchable/index.js b/packages/VSTouchable/index.js
index <HASH>..<HASH> 100644
--- a/packages/VSTouchable/index.js
+++ b/packages/VSTouchable/index.js
@@ -33,19 +33,19 @@ export default class VSTouchable extends React.Component {
render() {
if (TouchableComponent === TouchableNativeFeedback) {
- let { children, style, touchableTestID, ...props } = this.props;
+ let { children, style, ...props } = this.props;
return (
- <TouchableComponent {...props} testID={ touchableTestID }>
+ <TouchableComponent {...props}>
<View style={style}>{children}</View>
</TouchableComponent>
);
} else {
- let { children, fallback, style, touchableTestID, ...props } = this.props;
+ let { children, fallback, style, ...props } = this.props;
let TouchableFallback = fallback || TouchableComponent;
return (
- <TouchableFallback {...props} activeOpacity={0.6} testID={ touchableTestID }>
+ <TouchableFallback {...props} activeOpacity={0.6}>
<View style={style}>{children}</View>
</TouchableFallback>
);
|
fix: pass down testID & other stuff with other props
|
vivintsolar-oss_react-native-components
|
train
|
js
|
38cb5ec2d037626fab93aca2d6400eb950a2bec6
|
diff --git a/config/webpack.loaders.js b/config/webpack.loaders.js
index <HASH>..<HASH> 100644
--- a/config/webpack.loaders.js
+++ b/config/webpack.loaders.js
@@ -15,7 +15,6 @@ module.exports = [
loader: 'url-loader?limit=8192',
},{
test: /\.css$/,
- include: /node_modules/,
loader: 'style!css!postcss',
},{
test: /\.mcss$/,
|
fix(Loaders): Make css loader rule work on *all* css files.
|
Kitware_paraviewweb
|
train
|
js
|
2c5349a448217ad5fe74573ae92840d0e9177518
|
diff --git a/src/Leevel/Log/Console/Clear.php b/src/Leevel/Log/Console/Clear.php
index <HASH>..<HASH> 100644
--- a/src/Leevel/Log/Console/Clear.php
+++ b/src/Leevel/Log/Console/Clear.php
@@ -27,8 +27,6 @@ use Leevel\Kernel\IApp;
/**
* log 文件缓存清理.
- *
- * @codeCoverageIgnore
*/
class Clear extends Command
{
@@ -52,12 +50,12 @@ class Clear extends Command
public function handle(IApp $app): int
{
$this->line('Start to clear cache log.');
- delete_directory($cachePath = $app->runtimePath('log'));
- $this->info(sprintf('Log cache files in path %s clear successed.', $cachePath));
+ delete_directory($cacheDir = $app->runtimePath('log'));
+ $this->info(sprintf('Log cache files in path %s clear successed.', $cacheDir));
return 0;
}
}
// import fn.
-class_exists(delete_directory::class); // @codeCoverageIgnore
+class_exists(delete_directory::class);
|
refactor(log): remove @codeCoverageIgnore and rename $cachePath to $cacheDir
|
hunzhiwange_framework
|
train
|
php
|
49c5e4fa9ba1ba586eb3b218e67437250d0ef9ad
|
diff --git a/scripts/webpack/cssBundler.js b/scripts/webpack/cssBundler.js
index <HASH>..<HASH> 100644
--- a/scripts/webpack/cssBundler.js
+++ b/scripts/webpack/cssBundler.js
@@ -82,11 +82,11 @@ function cssBundler() {
devtool: 'source-map',
module: {
rules: [
+ ...rules,
{
- test: /\.scss$/,
+ test: /\.(css|scss)$/,
use: createCssLoader(),
- },
- ...rules
+ }
],
},
plugins: [
@@ -106,6 +106,7 @@ function cssBundler() {
httpDirAbsolutePath,
},
plugins = [],
+ rules = []
}) {
return createCustomCss({
bundleName: 'main-css-combined',
@@ -120,7 +121,8 @@ function cssBundler() {
plugins: [
pluginCopyrightBanner(),
...plugins
- ]
+ ],
+ rules
});
}
@@ -129,7 +131,7 @@ function cssBundler() {
fsDirAbsolutePath,
httpDirAbsolutePath
},
- plugins = [],
+ plugins = []
}) {
return createCustomCss({
bundleName: 'individual-css-bundles',
|
chore(scripts): cssBundler
Add new property to options object to add additonal rules to bundler.
|
trend-community_trend-components
|
train
|
js
|
46642b2748312f8c8924408b031c82c79eb18a3c
|
diff --git a/views/js/layout/search.js b/views/js/layout/search.js
index <HASH>..<HASH> 100644
--- a/views/js/layout/search.js
+++ b/views/js/layout/search.js
@@ -49,7 +49,8 @@ define(['jquery', 'layout/actions', 'ui/searchModal', 'core/store', 'context', '
};
/**
- * Sets events to init searchModal instance on search and results icons click, and enter keypress
+ * Sets events to init searchModal instance on search and results icons click, enter keypress
+ * and ctrl + k shortcut
*/
function initializeEvents() {
searchComponent.container = $('.action-bar .search-area');
@@ -73,6 +74,17 @@ define(['jquery', 'layout/actions', 'ui/searchModal', 'core/store', 'context', '
actionManager.trigger('error', e);
});
});
+
+ $(window).keydown(function (event) {
+ if (
+ $('.action-bar .search-area').closest('.content-panel').css('display') === 'flex' &&
+ event.ctrlKey &&
+ event.keyCode == 75
+ ) {
+ event.preventDefault();
+ createSearchModalInstance();
+ }
+ });
}
/**
|
chore(keyboard-navigation): implemented opening search modal by ctrl + k shortcut
|
oat-sa_tao-core
|
train
|
js
|
f6421b0bb9cb4b588285574097db9f2d58719db8
|
diff --git a/lib/config/file.js b/lib/config/file.js
index <HASH>..<HASH> 100644
--- a/lib/config/file.js
+++ b/lib/config/file.js
@@ -1,13 +1,13 @@
const logger = require('winston');
+const path = require('path');
module.exports = {
getConfig,
- isPathAbsolute,
};
function getConfig(env) {
let configFile = env.RENOVATE_CONFIG_FILE || 'config';
- if (!isPathAbsolute(configFile)) {
+ if (!path.isAbsolute(configFile)) {
configFile = `../../${configFile}`;
}
let config = {};
@@ -20,7 +20,3 @@ function getConfig(env) {
}
return config;
}
-
-function isPathAbsolute(path) {
- return /^(?:\/|[a-z]+:\/\/)/.test(path);
-}
|
fix(file): use path.isAbsolute for Windows compatibility (#<I>)
Use Node's built-in `path.isAbsolute` for compatibility with
Window's file paths.
|
renovatebot_renovate
|
train
|
js
|
eed047b83b4181310b7a72b13aaec970e8ab2895
|
diff --git a/builder/osc/common/access_config.go b/builder/osc/common/access_config.go
index <HASH>..<HASH> 100644
--- a/builder/osc/common/access_config.go
+++ b/builder/osc/common/access_config.go
@@ -103,7 +103,8 @@ func (c *AccessConfig) GetRegion() string {
func (c *AccessConfig) NewOSCClientByRegion(region string) *osc.APIClient {
skipClient := &http.Client{
Transport: &http.Transport{
- TLSClientConfig: &tls.Config{InsecureSkipVerify: true},
+ TLSClientConfig: &tls.Config{InsecureSkipVerify: c.InsecureSkipTLSVerify},
+ Proxy: http.ProxyFromEnvironment,
},
}
|
feat: add proxy support to osc builder
|
hashicorp_packer
|
train
|
go
|
8fb5946eda7d9609b2aff27dcdeac04960665983
|
diff --git a/flow_control.js b/flow_control.js
index <HASH>..<HASH> 100644
--- a/flow_control.js
+++ b/flow_control.js
@@ -48,7 +48,7 @@ const flowControlStep = Object.assign({}, require('kronos-step').Step, {
case 'start':
flow.start().then(f => {
step.info(`${flow} started`);
- })
+ });
break;
case 'stop':
|
style(semicolon): Added a missing semicolon
|
Kronos-Integration_kronos-flow-control-step
|
train
|
js
|
da1360ad601618ea8f8b45da6769a935d4de73cf
|
diff --git a/pyethereum/processblock.py b/pyethereum/processblock.py
index <HASH>..<HASH> 100644
--- a/pyethereum/processblock.py
+++ b/pyethereum/processblock.py
@@ -128,7 +128,7 @@ class Log(object):
def bloomables(self):
return [self.address.decode('hex')] + \
- [utils.encode_int(x) for x in self.topics]
+ [utils.zpad(utils.encode_int(x), 32) for x in self.topics]
def bloom(self):
b = bloom.bloom_from_list(self.bloomables())
|
fix: zpad topics for bloom
|
ethereum_pyethereum
|
train
|
py
|
83994354e687ff6ffc95762ca3972ea81f577ddd
|
diff --git a/packages/node_modules/cerebral/src/View.js b/packages/node_modules/cerebral/src/View.js
index <HASH>..<HASH> 100644
--- a/packages/node_modules/cerebral/src/View.js
+++ b/packages/node_modules/cerebral/src/View.js
@@ -246,9 +246,13 @@ class View extends Watch {
Creates a reaction
*/
createReaction(reactionName, dependencies, cb) {
- return Reaction(dependencies, cb)
+ const reaction = Reaction(dependencies, cb)
.create(this.controller, this.modulePath, `${this.name}.${reactionName}`)
.initialize()
+
+ this.reactions.push(reaction)
+
+ return reaction
}
/*
@@ -286,9 +290,7 @@ class View extends Watch {
this.controller.devtools.bigComponentsWarning
) {
console.warn(
- `Component named ${
- this._displayName
- } has a lot of dependencies, consider refactoring or adjust this option in devtools`
+ `Component named ${this._displayName} has a lot of dependencies, consider refactoring or adjust this option in devtools`
)
this._hasWarnedBigComponent = true
}
|
fix(cerebral): correctly remove reactions on unmount
|
cerebral_cerebral
|
train
|
js
|
76f2d3bb0c92ef7b9107ed27d0403282f54469f8
|
diff --git a/src/Leevel/Log/Manager.php b/src/Leevel/Log/Manager.php
index <HASH>..<HASH> 100644
--- a/src/Leevel/Log/Manager.php
+++ b/src/Leevel/Log/Manager.php
@@ -58,10 +58,10 @@ class Manager extends Managers
*
* @return \Leevel\Log\File
*/
- protected function makeConnectFile(array $options = []): File
+ protected function makeConnectFile(): File
{
return new File(
- $this->normalizeConnectOption('file', $options),
+ $this->normalizeConnectOption('file'),
$this->container->make('event')
);
}
@@ -71,10 +71,10 @@ class Manager extends Managers
*
* @return \Leevel\Log\Syslog
*/
- protected function makeConnectSyslog(array $options = []): Syslog
+ protected function makeConnectSyslog(): Syslog
{
return new Syslog(
- $this->normalizeConnectOption('syslog', $options),
+ $this->normalizeConnectOption('syslog'),
$this->container->make('event')
);
}
|
refactor(log): manager connect only support string
|
hunzhiwange_framework
|
train
|
php
|
8cb720717d659b165e5ff95b80bf58dc5bf39abb
|
diff --git a/src/index.js b/src/index.js
index <HASH>..<HASH> 100644
--- a/src/index.js
+++ b/src/index.js
@@ -16,6 +16,9 @@ module.exports = function (options, pkg, argv, env, cb) {
if (env.BUILD_LEADER === 'YES') {
if (env.BUILD_AGGREGATE_STATUS !== 'others_succeeded') return cb(new SRError('Not publishing when other jobs in the build matrix fail.', 'EOTHERSFAILED'))
+
+ try { unlinkSync('./travis_after_all.py') } catch (e) {}
+ try { unlinkSync('./.to_export_back') } catch (e) {}
}
cb(null)
|
feat(condition-travis): tries to delete travis_after_all artifacts
|
semantic-release_condition-travis
|
train
|
js
|
27dbf2a096f109939f59472f24c92991db6d2f82
|
diff --git a/test/build/streams.js b/test/build/streams.js
index <HASH>..<HASH> 100644
--- a/test/build/streams.js
+++ b/test/build/streams.js
@@ -26,7 +26,7 @@ describe( 'yielding streams', function() {
var res = yield (0, _fs.createReadStream)( 'index.js' );
(0, _assert2.default)( Buffer.isBuffer( res ) );
- (0, _assert2.default)( ~res.indexOf( 'exports' ) );
+ (0, _assert2.default)( ~res.toString( 'utf-8' ).indexOf( 'exports' ) );
} );
return test1();
diff --git a/test/src/streams.js b/test/src/streams.js
index <HASH>..<HASH> 100644
--- a/test/src/streams.js
+++ b/test/src/streams.js
@@ -14,7 +14,7 @@ describe( 'yielding streams', function() {
let res = await createReadStream( 'index.js' );
assert( Buffer.isBuffer( res ) );
- assert( ~res.indexOf( 'exports' ) );
+ assert( ~res.toString( 'utf-8' ).indexOf( 'exports' ) );
};
return test1();
|
test: Fix streams test for old node builds
|
novacrazy_bluebird-co
|
train
|
js,js
|
e6afce17a96f269a5b8a1ec65fdba9fea0bef31a
|
diff --git a/engine/src/main/java/org/camunda/bpm/application/impl/event/ProcessApplicationEventListenerDelegate.java b/engine/src/main/java/org/camunda/bpm/application/impl/event/ProcessApplicationEventListenerDelegate.java
index <HASH>..<HASH> 100644
--- a/engine/src/main/java/org/camunda/bpm/application/impl/event/ProcessApplicationEventListenerDelegate.java
+++ b/engine/src/main/java/org/camunda/bpm/application/impl/event/ProcessApplicationEventListenerDelegate.java
@@ -13,6 +13,8 @@
package org.camunda.bpm.application.impl.event;
import java.util.concurrent.Callable;
+
+import org.camunda.bpm.application.InvocationContext;
import org.camunda.bpm.application.ProcessApplicationInterface;
import org.camunda.bpm.application.ProcessApplicationReference;
import org.camunda.bpm.application.ProcessApplicationUnavailableException;
@@ -86,7 +88,7 @@ public class ProcessApplicationEventListenerDelegate implements ExecutionListene
} else {
if (ProcessApplicationContextUtil.requiresContextSwitch(processApp)) {
// this should not be necessary since context switch is already performed by OperationContext and / or DelegateInterceptor
- Context.executeWithinProcessApplication(notification, processApp);
+ Context.executeWithinProcessApplication(notification, processApp, new InvocationContext(execution));
} else {
// context switch already performed
|
chore(engine): add InvocationContext to ProcessApplicationEventListenerDelegate
related to #CAM-<I>
|
camunda_camunda-bpm-platform
|
train
|
java
|
fdc8ecbc0c1d8a4b76ec653602c5ab06a9659c98
|
diff --git a/git/remote.py b/git/remote.py
index <HASH>..<HASH> 100644
--- a/git/remote.py
+++ b/git/remote.py
@@ -706,8 +706,8 @@ class Remote(LazyMixin, Iterable):
if config.get_value('fetch', default=unset) is unset:
msg = "Remote '%s' has no refspec set.\n"
msg += "You can set it as follows:"
- msg += " 'git config --add \"remote.%s.fetch +refs/heads/*:refs/heads/*\"'." % (self.name, self.name)
- raise AssertionError(msg)
+ msg += " 'git config --add \"remote.%s.fetch +refs/heads/*:refs/heads/*\"'."
+ raise AssertionError(msg % (self.name, self.name))
finally:
config.release()
|
fix(remote): assemble exception message completely
... before trying to substitute values in.
Fixes #<I>
|
gitpython-developers_GitPython
|
train
|
py
|
f830571fc32f4f21f87c128f40b9e382ece15ba8
|
diff --git a/target/target.go b/target/target.go
index <HASH>..<HASH> 100644
--- a/target/target.go
+++ b/target/target.go
@@ -47,9 +47,8 @@ func (t *Target) GetJobs() map[string]job.Job {
jobs := make(map[string]job.Job, len(names))
for _, name := range names {
- payload := job.NewJobPayload(readUnit(name))
state := t.GetJobState(name)
- jobs[name] = *job.NewJob(name, state, payload)
+ jobs[name] = *job.NewJob(name, state, nil)
}
return jobs
|
refactor(target): Drop init of JobPayload in Target.GetJobs
The JobPayload objects are not used by anything that calls
Target.GetJobs, so we can just stop populating it.
|
coreos_fleet
|
train
|
go
|
95b77d10af83925489f260c167bb1503e3ca0131
|
diff --git a/invenio_config/__init__.py b/invenio_config/__init__.py
index <HASH>..<HASH> 100644
--- a/invenio_config/__init__.py
+++ b/invenio_config/__init__.py
@@ -48,13 +48,12 @@ a temporary directory.
>>> import tempfile
>>> tmppath = tempfile.mkdtemp()
-In order to make sure that there are no files left in case of exception,
-lets register a clean up function that removes the temporary directory.
+.. testcode::
+ :hide:
->>> import atexit
->>> import shutil
->>> atexit.register(lambda: shutil.rmtree(tmppath))
-<function ...>
+ import atexit
+ import shutil
+ atexit.register(lambda: shutil.rmtree(tmppath))
Now we can create a Flask application:
|
docs: usage example fix
* Hides part of documentation specific to doctest environment.
|
inveniosoftware_invenio-config
|
train
|
py
|
27b805f3483e27e2e829d2e44f8684e7bdb6200b
|
diff --git a/wikitextparser/_wikitext.py b/wikitextparser/_wikitext.py
index <HASH>..<HASH> 100644
--- a/wikitextparser/_wikitext.py
+++ b/wikitextparser/_wikitext.py
@@ -62,7 +62,7 @@ TABLES_FINDITER = regex_compile(
rb'^([ :]*+){\|'
# Table contents
# Any character, as long as it is not indicating another table-start
- rb'(?>(?R)|.)*?'
+ rb'(*PRUNE)(?>(?R)|.)*?'
# table end
rb'\n\s*+(?>\|}|\Z)'
rb')',
|
fix(TABLES_FINDITER): (*PRUNE) before recursion
TBH I'm cannot fully grasp why this works. I'm just hoping that it won't
cause any unexpected failures.
Maybe I'll rewrite the whole pattern later or revert back to use the old
table-matching algorithm.
closes #<I>
|
5j9_wikitextparser
|
train
|
py
|
309807c676262b55df53c8b03914580d5ac98064
|
diff --git a/index.js b/index.js
index <HASH>..<HASH> 100644
--- a/index.js
+++ b/index.js
@@ -31,7 +31,7 @@ function Account (options) {
update: require('./lib/update').bind(null, state),
profile: {
get: require('./lib/profile-get').bind(null, state),
- fetch: require('./lib/profile-fetch').bind(null, state, 'account.profile'),
+ fetch: require('./lib/profile-fetch').bind(null, state),
update: require('./lib/profile-update').bind(null, state)
},
request: require('./lib/request').bind(null, state),
|
fix: account.profile.fetch() resolves with profile properties
|
hoodiehq_hoodie-account-client
|
train
|
js
|
face07e900a73f4f8bf833a9bd6434e28052ccf5
|
diff --git a/packages/example-phone/test/automation/spec/call.js b/packages/example-phone/test/automation/spec/call.js
index <HASH>..<HASH> 100644
--- a/packages/example-phone/test/automation/spec/call.js
+++ b/packages/example-phone/test/automation/spec/call.js
@@ -106,7 +106,8 @@ describe(`example-phone`, () => {
// .should.eventually.equal(`sendrecv`))
);
- it(`toggles sending its video`, () => browser
+ // FIXME disabled for pipeline transition work
+ it.skip(`toggles sending its video`, () => browser
.clickOnTitle(`Stop sending video`)
.assertLocalVideoDirection(`recvonly`)
// FIXME reenable the next block once locus fixes #3939
|
chore(example-phone): disable test to continue pipeline work
|
webex_spark-js-sdk
|
train
|
js
|
acd04cbc77c914af56db8b83734d187cc926f4e4
|
diff --git a/packages/pob/lib/generators/common/babel/CommonBabelGenerator.js b/packages/pob/lib/generators/common/babel/CommonBabelGenerator.js
index <HASH>..<HASH> 100644
--- a/packages/pob/lib/generators/common/babel/CommonBabelGenerator.js
+++ b/packages/pob/lib/generators/common/babel/CommonBabelGenerator.js
@@ -319,10 +319,12 @@ export default class CommonBabelGenerator extends Generator {
/* dependencies */
- packageUtils.addOrRemoveDevDependencies(pkg, useBabel, [
- '@babel/core',
- 'pob-babel',
- ]);
+ packageUtils.addOrRemoveDevDependencies(
+ pkg,
+ useBabel || (pkg.peerDependencies && pkg.peerDependencies['@babel/core']),
+ ['@babel/core'],
+ );
+ packageUtils.addOrRemoveDevDependencies(pkg, useBabel, ['pob-babel']);
if (pkg.dependencies && pkg.dependencies['pob-babel']) {
// update pob-babel in alp-dev
|
fix(pob): add @babel/core when pkg has peer dependency
|
christophehurpeau_pob-lerna
|
train
|
js
|
efe8425e621a52465f6a8b01a352a3e2a80bced2
|
diff --git a/packages/components/bolt-animate/animate.schema.js b/packages/components/bolt-animate/animate.schema.js
index <HASH>..<HASH> 100644
--- a/packages/components/bolt-animate/animate.schema.js
+++ b/packages/components/bolt-animate/animate.schema.js
@@ -69,7 +69,7 @@ module.exports = {
type: 'number',
title: 'Build Out Duration',
description: 'Set in milliseconds',
- default: 500,
+ default: 350,
},
outDelay: {
type: 'number',
|
feat: speed up default exit animation to create a smoother experience
|
bolt-design-system_bolt
|
train
|
js
|
f0d2b8aafd8eb13ecb52e688bf34f846d51a2dab
|
diff --git a/shinken/daemons/arbiterdaemon.py b/shinken/daemons/arbiterdaemon.py
index <HASH>..<HASH> 100644
--- a/shinken/daemons/arbiterdaemon.py
+++ b/shinken/daemons/arbiterdaemon.py
@@ -398,9 +398,9 @@ class Arbiter(Daemon):
for arb in self.conf.arbiterlinks:
if (arb.address, arb.port) == (self.host, self.port):
self.me = arb
- arb.is_me = lambda s: True # we now definitively know who we are, just keep it.
+ arb.is_me = lambda: True # we now definitively know who we are, just keep it.
else:
- arb.is_me = lambda s: False # and we know who we are not, just keep it.
+ arb.is_me = lambda: False # and we know who we are not, just keep it.
def do_loop_turn(self):
# If I am a spare, I wait for the master arbiter to send me
diff --git a/shinken/dispatcher.py b/shinken/dispatcher.py
index <HASH>..<HASH> 100644
--- a/shinken/dispatcher.py
+++ b/shinken/dispatcher.py
@@ -86,6 +86,9 @@ class Dispatcher:
for r in self.realms:
r.prepare_for_satellites_conf()
+ # Reset need_conf for all schedulers.
+ for s in self.schedulers:
+ s.need_conf = True
#checks alive elements
def check_alive(self):
|
fix: bad lambda for is_me + previous commit was missing a bit.
|
Alignak-monitoring_alignak
|
train
|
py,py
|
d556cf2751498c86460202cc8928764404c62269
|
diff --git a/packages/xod-project/src/index.js b/packages/xod-project/src/index.js
index <HASH>..<HASH> 100644
--- a/packages/xod-project/src/index.js
+++ b/packages/xod-project/src/index.js
@@ -30,6 +30,7 @@ export {
canBindToOutputs,
renumberNodes,
getTopology,
+ assocInitialPinValues,
} from './patch';
export * from './node';
export {
@@ -44,6 +45,7 @@ export {
isOutputPin,
isTerminalPin,
normalizePinLabels,
+ isPinBindable,
} from './pin';
export * from './link';
export * from './constants';
|
fix(xod-project): add missing exports
|
xodio_xod
|
train
|
js
|
330b8c0ad7cafba49f4f6d5f3b6c55ea95a13e60
|
diff --git a/packages/lingui-cli/src/api/formats/lingui.js b/packages/lingui-cli/src/api/formats/lingui.js
index <HASH>..<HASH> 100644
--- a/packages/lingui-cli/src/api/formats/lingui.js
+++ b/packages/lingui-cli/src/api/formats/lingui.js
@@ -8,8 +8,8 @@ import R from 'ramda'
import type { LinguiConfig, CatalogFormat } from './types'
import * as locales from './utils/locales'
-const sourceFilename = path.join('{locale}', 'messages.json')
-const compiledFilename = path.join('{locale}', 'messages.js')
+const sourceFilename = '{locale}/messages.json'
+const compiledFilename = '{locale}/messages.js'
export default (config: LinguiConfig): CatalogFormat => ({
formatFilename (pattern, locale) {
|
fix: Fix lingui extract command on Windows
|
lingui_js-lingui
|
train
|
js
|
8229e216836a5033653341abbefea01e45618693
|
diff --git a/lib/utils.js b/lib/utils.js
index <HASH>..<HASH> 100644
--- a/lib/utils.js
+++ b/lib/utils.js
@@ -207,7 +207,7 @@ export function isIOS() {
'iPod',
].includes(navigator.platform)
// iPad on iOS 13 detection
- || (navigator.userAgent.includes('Mac') && 'ontouchend' in document);
+ || (navigator.userAgent.includes('Mac') && typeof document !== 'undefined' && 'ontouchend' in document);
return isIOS.cachedResult;
}
|
fix: main thread is blocked on Mac device
fix #<I>
|
Donaldcwl_browser-image-compression
|
train
|
js
|
b001e194f117ca8cfc9bcc9eb62dd7aab07988f7
|
diff --git a/src/structures/MessageReaction.js b/src/structures/MessageReaction.js
index <HASH>..<HASH> 100644
--- a/src/structures/MessageReaction.js
+++ b/src/structures/MessageReaction.js
@@ -34,7 +34,7 @@ class MessageReaction {
* A manager of the users that have given this reaction
* @type {ReactionUserManager}
*/
- this.users = new ReactionUserManager(this);
+ this.users = new ReactionUserManager(this, this.me ? [client.user] : []);
this._emoji = new ReactionEmoji(this, data.emoji);
|
fix(MessageReaction): Cache myself when `MessageReaction#me` is `true`. (#<I>)
|
discordjs_discord.js
|
train
|
js
|
55620ade4739308cc95b4193d4c429694b220957
|
diff --git a/static/autofill.js b/static/autofill.js
index <HASH>..<HASH> 100644
--- a/static/autofill.js
+++ b/static/autofill.js
@@ -19,7 +19,7 @@ $(document).ready(function() {
search: function (term, callback) {
var usernames;
if (!term) {
- usernames = localUserList.concat(groupList).filter(function(value, index, array) {
+ usernames = localUserList.filter(function(value, index, array) {
// Remove duplicates and calling user's username
return array.indexOf(value) === index && value !== app.user.username;
}).sort(function(a, b) {
@@ -48,7 +48,14 @@ $(document).ready(function() {
usernames.splice(usernames.indexOf(app.user.username), 1);
}
- callback(usernames);
+ // Add groups that start with the search term
+ usernames = usernames.concat(groupList.filter(function (groupName) {
+ return groupName.toLocaleLowerCase().startsWith(term.toLocaleLowerCase());
+ }));
+
+ callback(usernames.sort(function(a, b) {
+ return a.toLocaleLowerCase() > b.toLocaleLowerCase();
+ }));
});
});
},
|
feat: update autofill logic
- Only local topic users will show up if there is no search term
- Group matches now show up in the search results (whereas before
they only showed up in the list with no search term). They will
only show up in seach results, and not when there is just the
naked "@" sign.
- Results are now alphabetically sorted (when there is a search
term)
|
julianlam_nodebb-plugin-mentions
|
train
|
js
|
4435e53901df4d64992a540694fbd3d5489c2220
|
diff --git a/superset/migrations/versions/a9422eeaae74_new_dataset_models_take_2.py b/superset/migrations/versions/a9422eeaae74_new_dataset_models_take_2.py
index <HASH>..<HASH> 100644
--- a/superset/migrations/versions/a9422eeaae74_new_dataset_models_take_2.py
+++ b/superset/migrations/versions/a9422eeaae74_new_dataset_models_take_2.py
@@ -597,7 +597,7 @@ def postprocess_datasets(session: Session) -> None:
)
updated = True
- if not is_physical and expression:
+ if not is_physical and drivername and expression:
table_refrences = extract_table_references(
expression, get_dialect_name(drivername), show_warning=False
)
|
fix(dataset): handle missing sqla uri in migration (#<I>)
|
apache_incubator-superset
|
train
|
py
|
f61d28cd684912ec034d50750897459b76932f77
|
diff --git a/httprunner/cli.py b/httprunner/cli.py
index <HASH>..<HASH> 100644
--- a/httprunner/cli.py
+++ b/httprunner/cli.py
@@ -44,7 +44,7 @@ def main_run(extra_args):
sys.exit(1)
extra_args_new.extend(testcase_path_list)
- pytest.main(extra_args_new)
+ sys.exit(pytest.main(extra_args_new))
def main():
|
fix: missing exit code from pytest
|
HttpRunner_HttpRunner
|
train
|
py
|
618fb8416a1445c067fbaff7a0310c6db15e3913
|
diff --git a/tests/FrontControllerTest.php b/tests/FrontControllerTest.php
index <HASH>..<HASH> 100644
--- a/tests/FrontControllerTest.php
+++ b/tests/FrontControllerTest.php
@@ -429,7 +429,7 @@ class FrontControllerTest extends TestCase
$this->config->stream = true;
$this->assertRequestIsOk(
'redirect',
- ['url' => 'http://www.canalc2.tv/video/12163', 'format' => 'rtmp'],
+ ['url' => 'http://www.rtvnh.nl/video/131946', 'format' => 'rtmp-264'],
$this->config
);
}
diff --git a/tests/VideoDownloadTest.php b/tests/VideoDownloadTest.php
index <HASH>..<HASH> 100644
--- a/tests/VideoDownloadTest.php
+++ b/tests/VideoDownloadTest.php
@@ -249,10 +249,10 @@ class VideoDownloadTest extends TestCase
{
return [
[
- 'http://www.canalc2.tv/video/12163', 'rtmp',
- 'Terrasses_du_Numerique-12163',
+ 'http://www.rtvnh.nl/video/131946', 'rtmp-264',
+ 'Ketting_van_strandgasten-131946',
'flv',
- 'vod-flash.u-strasbg.fr',
+ 'lb-nh-vod.cdn.streamgate.nl',
],
];
}
|
fix: Use a different RTMP provider
canalc2.tv does not use RTMP anymore
Fixes #<I>
|
Rudloff_alltube
|
train
|
php,php
|
859debe4416abbaacb551c9b19887fdf23d47048
|
diff --git a/tests/test_derived_spatial_point.py b/tests/test_derived_spatial_point.py
index <HASH>..<HASH> 100644
--- a/tests/test_derived_spatial_point.py
+++ b/tests/test_derived_spatial_point.py
@@ -60,7 +60,7 @@ def test_derived_tag():
assert result["valid"] == True
-def test_derived_tag():
+def test_derived_numeric():
schema = DerivedNumeric()
result = schema.load(derived_numeric_data)
assert result["pt"]["position"] == [31, 31, 0]
|
fix(test): fix name of derived numeric test
|
seung-lab_EMAnnotationSchemas
|
train
|
py
|
d0a9591c25631d3f47ffcdb3ab5f280ae447a15b
|
diff --git a/index.js b/index.js
index <HASH>..<HASH> 100644
--- a/index.js
+++ b/index.js
@@ -37,9 +37,11 @@ function getCredentialsByURI (uri, config) {
// Handle the old-style _auth=<base64> style for the default
// registry, if set.
- const authDef = config['_auth']
- const userDef = config['username']
- const passDef = config['_password']
+ const {
+ _auth: authDef,
+ username: userDef,
+ _password: passDef
+ } = config
if (authDef && !(userDef && passDef)) {
authDef = Buffer.from(authDef, 'base64').toString()
authDef = authDef.split(':')
|
refactor: use destructuring
|
pnpm_credentials-by-uri
|
train
|
js
|
8a9b64e735f85c38f0776f9b4abd8dfde16fc96f
|
diff --git a/test/test_weather.py b/test/test_weather.py
index <HASH>..<HASH> 100644
--- a/test/test_weather.py
+++ b/test/test_weather.py
@@ -6,8 +6,8 @@ import os
import pytest
from hypothesis import given, strategies as st, example
-from emiz import Miz, set_weather_from_icao
-from emiz.weather import build_metar_from_mission
+from emiz import Miz
+from emiz.weather import build_metar_from_mission, set_weather_from_icao
from emiz.weather.mission_weather import MissionWeather
from metar.Metar import Metar
from emiz.weather.utils import set_weather_from_metar_str
|
fix: dev: fix weather tests
|
etcher-be_emiz
|
train
|
py
|
64b8724c53829f20c38a5c780eb0759ae50ab09f
|
diff --git a/packages/elements/src/index.js b/packages/elements/src/index.js
index <HASH>..<HASH> 100644
--- a/packages/elements/src/index.js
+++ b/packages/elements/src/index.js
@@ -162,4 +162,13 @@ export {
spacing,
} from '@carbon/layout';
export * from '@carbon/themes';
-export * from '@carbon/motion';
+export {
+ fast01,
+ fast02,
+ moderate01,
+ moderate02,
+ slow01,
+ slow02,
+ easings,
+ motion,
+} from '@carbon/motion';
|
fix(elements): use explicit exports from motion to prevent duplicates (#<I>)
|
carbon-design-system_carbon-components
|
train
|
js
|
ea8537f8cdd5fc4d4bd2246c7f0f149dd6ee5f95
|
diff --git a/src/index.js b/src/index.js
index <HASH>..<HASH> 100644
--- a/src/index.js
+++ b/src/index.js
@@ -130,5 +130,5 @@ module.exports = {
path: (path) => (isIpfs(path, pathPattern) || isIpns(path, pathPattern)),
pathPattern: pathPattern,
urlOrPath: (x) => (isIpfs(x, urlPattern) || isIpns(x, urlPattern) || isIpfs(x, pathPattern) || isIpns(x, pathPattern)),
- cidPath: path => isString(path) && path.includes('/') && isCID(path.split('/')[0])
+ cidPath: path => isString(path) && !isCID(path) && isIpfs(`/ipfs/${path}`, pathPattern)
}
|
refactor: use isIpfs to reuse path validation
License: MIT
|
ipfs_is-ipfs
|
train
|
js
|
79bbab7a97480a3952b52c62ca2160cebf14053b
|
diff --git a/gulpfile.js b/gulpfile.js
index <HASH>..<HASH> 100644
--- a/gulpfile.js
+++ b/gulpfile.js
@@ -202,8 +202,18 @@ function umdWebpack() {
},
externals: [
{
- 'react': 'React',
- 'react-dom': 'ReactDOM',
+ react: {
+ commonjs: 'react',
+ commonjs2: 'react',
+ amd: 'react',
+ root: 'React',
+ },
+ 'react-dom': {
+ commonjs: 'react-dom',
+ commonjs2: 'react-dom',
+ amd: 'react-dom',
+ root: 'ReactDOM',
+ },
},
],
},
|
fix: adjust umd external config for stackblitz (#<I>)
|
ant-design_ant-design-mobile
|
train
|
js
|
c4ce40e57c672113757a8ef1fe5a2e8eae8bcf13
|
diff --git a/vyper/ast/pre_parser.py b/vyper/ast/pre_parser.py
index <HASH>..<HASH> 100644
--- a/vyper/ast/pre_parser.py
+++ b/vyper/ast/pre_parser.py
@@ -104,9 +104,10 @@ def pre_parse(code: str) -> Tuple[ModificationOffsets, str]:
try:
code_bytes = code.encode("utf-8")
- token_generator = tokenize(io.BytesIO(code_bytes).readline)
+ token_list = list(tokenize(io.BytesIO(code_bytes).readline))
- for token in token_generator:
+ for i in range(len(token_list)):
+ token = token_list[i]
toks = [token]
typ = token.type
@@ -130,6 +131,13 @@ def pre_parse(code: str) -> Tuple[ModificationOffsets, str]:
start[0],
start[1],
)
+ if typ == NAME and string == "log" and token_list[i + 1].string == ".":
+ raise SyntaxException(
+ "`log` is no longer an object, please use it as a statement instead",
+ code,
+ start[0],
+ start[1],
+ )
if typ == NAME:
if string in VYPER_CLASS_TYPES and start[1] == 0:
|
feat: give more expressive error on old use of `log`
|
ethereum_vyper
|
train
|
py
|
2e346fff7bddcb5c093a5a54bb764b344da4692c
|
diff --git a/test.js b/test.js
index <HASH>..<HASH> 100644
--- a/test.js
+++ b/test.js
@@ -1,15 +1,9 @@
#!/usr/bin/env node
var spawn = require('cross-spawn-async')
-var findNearestFile = require('find-nearest-file')
-var path = require('path')
-var userHome = require('user-home')
-var pathExists = require('path-exists')
-// .zuulrc logic from https://github.com/defunctzombie/zuul/blob/a0de46a5906c84b19f655c487f7c8debe938984d/bin/zuul#L384
-var zuulrcPath = findNearestFile('.zuulrc') || path.join(userHome, '.zuulrc')
-var hasSauceLabEnvVars = process.env.SAUCE_USERNAME && process.env.SAUCE_ACCESS_KEY
-var runSauceLabs = hasSauceLabEnvVars || pathExists.sync(zuulrcPath)
+var runSauceLabs = !process.env.CI ||
+ (process.env.SAUCE_USERNAME && process.env.SAUCE_ACCESS_KEY)
npmRun('test-node', function () {
npmRun('test-browser-headless', function () {
|
test: always run saucelabs test locally (#<I>)
I think this is a simpler approach for #<I>. Always run the sauce labs
tests locally. If users lack the right sauce labs credentials, they’ll
get an error and hopefully set up zuul correctly before sending a PR.
|
webtorrent_webtorrent-cli
|
train
|
js
|
ddb74721fe3df89d84fd79f6603aafd8bc488090
|
diff --git a/webpack.config.dev.js b/webpack.config.dev.js
index <HASH>..<HASH> 100644
--- a/webpack.config.dev.js
+++ b/webpack.config.dev.js
@@ -13,24 +13,23 @@ config.plugins = [
new HtmlWebpackPlugin({
template: 'src/index.html'
}),
- new webpack.HotModuleReplacementPlugin(),
- new webpack.NoErrorsPlugin()
+ new webpack.HotModuleReplacementPlugin()
];
config.entry.app = [];
-config.module.loaders = config.module.loaders.concat([
+config.module.rules = config.module.rules.concat([
{
test: /\.css$/,
loader: ExtractTextPlugin.extract('style-loader', 'css-loader')
},
{
test: /\.html$/,
- loader: 'html'
+ loader: 'html-loader'
},
{
test: /\.(png|jpg)$/,
- loader: 'url'
+ loader: 'url-loader'
}
]);
|
fix: update to get webpack 2 to work
|
loryjs_lory
|
train
|
js
|
efcc32e8159fe1d120a70b17afded00552b37aa0
|
diff --git a/wdio.conf.js b/wdio.conf.js
index <HASH>..<HASH> 100644
--- a/wdio.conf.js
+++ b/wdio.conf.js
@@ -75,7 +75,7 @@ exports.config = {
//
// If CI && Safari run Safari + Edge
// If just Safari run Safari + Chrome
- // If not Safari run Firefox + Chrome
+ // IF not Safari run Firefox + Chrome
capabilities: process.env.SAFARI ? {
browserFirefox: {
desiredCapabilities: {
|
chore(samples): test against Safari
|
webex_spark-js-sdk
|
train
|
js
|
cfa28ebe01b77877b3089a17e8ab533b5f62e0f1
|
diff --git a/packages/bonde-admin-canary/src/scenes/Logged/scenes/Home/components/MobilizationsGadget/query.graphql.js b/packages/bonde-admin-canary/src/scenes/Logged/scenes/Home/components/MobilizationsGadget/query.graphql.js
index <HASH>..<HASH> 100644
--- a/packages/bonde-admin-canary/src/scenes/Logged/scenes/Home/components/MobilizationsGadget/query.graphql.js
+++ b/packages/bonde-admin-canary/src/scenes/Logged/scenes/Home/components/MobilizationsGadget/query.graphql.js
@@ -15,8 +15,13 @@ query MobilizationsGadget ($offset: Int, $limit: Int, $orderBy: [UserMobilizatio
image
createdAt
updatedAt
+ mailchimpApiKey
+ mailchimpListId
+ mailchimpGroupId
fbLink
twitterLink
+ facebookAppId
+ emailTemplateFrom
}
score
image: facebookShareImage
|
chore(admin-canary): add attrs on community query
|
nossas_bonde-client
|
train
|
js
|
dc054a2be95490b0b8c0008b3f5909a1e7d1a831
|
diff --git a/src/geshi/php.php b/src/geshi/php.php
index <HASH>..<HASH> 100644
--- a/src/geshi/php.php
+++ b/src/geshi/php.php
@@ -1114,4 +1114,4 @@ $language_data = array(
'TAB_WIDTH' => 4
);
-?>
\ No newline at end of file
+?>
|
fix: Improve highlighting of single-line comments in PHP
|
GeSHi_geshi-1.0
|
train
|
php
|
7b75f001ba453f134e4bc649e85f697608c08697
|
diff --git a/src/index.js b/src/index.js
index <HASH>..<HASH> 100644
--- a/src/index.js
+++ b/src/index.js
@@ -306,12 +306,16 @@ interface Dom {
* The singleton instance of the Dom API.
*/
export const DOM: Dom = {};
-
+export let isInitialized = false;
/**
* Enables initializing a specific implementation of the Platform Abstraction Layer (PAL).
* @param callback Allows providing a callback which configures the three PAL singletons with their platform-specific implementations.
*/
export function initializePAL(callback: (platform: Platform, feature: Feature, dom: Dom) => void): void {
+ if (isInitialized) {
+ return;
+ }
+ isInitialized = true;
if (typeof Object.getPropertyDescriptor !== 'function') {
Object.getPropertyDescriptor = function(subject, name) {
let pd = Object.getOwnPropertyDescriptor(subject, name);
@@ -326,3 +330,6 @@ export function initializePAL(callback: (platform: Platform, feature: Feature, d
callback(PLATFORM, FEATURE, DOM);
}
+export function reset() {
+ isInitialized = false;
+}
|
feat(index): move isInitialized to aurelia-pal
|
aurelia_pal
|
train
|
js
|
1a37c31720cd78ba06a1602c2e7eb274402c9df9
|
diff --git a/libtmux/test.py b/libtmux/test.py
index <HASH>..<HASH> 100644
--- a/libtmux/test.py
+++ b/libtmux/test.py
@@ -4,6 +4,7 @@ import logging
import os
import tempfile
import time
+from typing import Optional
from .exc import WaitTimeout
@@ -19,13 +20,13 @@ example_dir = os.path.abspath(os.path.join(current_dir, "..", "examples"))
fixtures_dir = os.path.realpath(os.path.join(current_dir, "fixtures"))
-def retry(seconds=RETRY_TIMEOUT_SECONDS):
+def retry(seconds: Optional[float] = RETRY_TIMEOUT_SECONDS) -> bool:
"""
Retry a block of code until a time limit or ``break``.
Parameters
----------
- seconds : int
+ seconds : float
Seconds to retry, defaults to ``RETRY_TIMEOUT_SECONDS``, which is
configurable via environmental variables.
|
chore(retry): Type annotation
|
tmux-python_libtmux
|
train
|
py
|
f2f2bd6475a034b3febbfac5f9a35c0acc43051f
|
diff --git a/tests/spec/header-submenu_spec.js b/tests/spec/header-submenu_spec.js
index <HASH>..<HASH> 100644
--- a/tests/spec/header-submenu_spec.js
+++ b/tests/spec/header-submenu_spec.js
@@ -345,10 +345,12 @@ describe('Header Submenu', function() {
headerSubmenu = new HeaderSubmenu(element);
document.body.appendChild(element);
unknownEvent = new CustomEvent('unknown', { bubbles: true });
+ Object.defineProperty(unknownEvent, 'target', { value: {}, writable: true });
+ Object.defineProperty(unknownEvent, 'currentTarget', { value: {}, writable: true });
});
beforeEach(function() {
- triggerNode.dispatchEvent(unknownEvent);
+ triggerNode.setAttribute('aria-expanded', 'false');
});
it('should gracefully ignore unknown events', function() {
|
test(header-submenu): reset submenu attributes before each test (#<I>)
define custom mock event properties
|
carbon-design-system_carbon-components
|
train
|
js
|
ddd82297f4f7b345a01baf8e010b29854b45f585
|
diff --git a/api/models.py b/api/models.py
index <HASH>..<HASH> 100644
--- a/api/models.py
+++ b/api/models.py
@@ -406,7 +406,7 @@ class Container(UuidAuditedModel):
return ''
try:
# ensure they cannot break out and run commands on the host
- return "bash -c '{}'".format(self.release.build.procfile[self.type])
+ return "env '{}'".format(self.release.build.procfile[self.type])
# if the key is not present or if a parent attribute is None
except (KeyError, TypeError):
return 'start {}'.format(self.type)
diff --git a/api/tests/test_container.py b/api/tests/test_container.py
index <HASH>..<HASH> 100644
--- a/api/tests/test_container.py
+++ b/api/tests/test_container.py
@@ -461,9 +461,9 @@ class ContainerTest(TransactionTestCase):
release=release,
type='web',
num=1)
- self.assertEqual(c._command, "bash -c 'node server.js'")
+ self.assertEqual(c._command, "env 'node server.js'")
c.type = 'worker'
- self.assertEqual(c._command, "bash -c 'node worker.js'")
+ self.assertEqual(c._command, "env 'node worker.js'")
c.release.build.procfile = None
self.assertEqual(c._command, 'start worker')
c.type = 'cmd'
|
fix(scheduler): send environment to the process
|
deis_controller-sdk-go
|
train
|
py,py
|
db136dd40739e9e2f54e0a18e18a077b826dfb31
|
diff --git a/packages/core/renderers/renderer-hyperhtml.js b/packages/core/renderers/renderer-hyperhtml.js
index <HASH>..<HASH> 100644
--- a/packages/core/renderers/renderer-hyperhtml.js
+++ b/packages/core/renderers/renderer-hyperhtml.js
@@ -88,7 +88,7 @@ export function BoltComponent(Base = HTMLElement) {
// Loop through nodelist
this.childNodes.forEach(function (child, index, nodelist) {
- const slotName = child.getAttribute ? child.getAttribute("slot") : null;
+ const slotName = child.getAttribute ? child.getAttribute('slot') : null;
if (!slotName) {
elem.slots.default.push(child);
|
fix: fixing double quotes lint error
|
bolt-design-system_bolt
|
train
|
js
|
b61287523db92d5cc79c47ee0f8c4a6e9129a205
|
diff --git a/classes/streams/YoutubeChunkStream.php b/classes/streams/YoutubeChunkStream.php
index <HASH>..<HASH> 100644
--- a/classes/streams/YoutubeChunkStream.php
+++ b/classes/streams/YoutubeChunkStream.php
@@ -60,11 +60,11 @@ class YoutubeChunkStream implements StreamInterface
/**
* Closes the stream and any underlying resources.
*
- * @return mixed
+ * @return void
*/
public function close()
{
- return $this->response->getBody()->close();
+ $this->response->getBody()->close();
}
/**
|
refactor: StreamInterface::close() should not return anything
|
Rudloff_alltube
|
train
|
php
|
fdb31b7b44728b11593c4d5c489a172f98209fce
|
diff --git a/src/Transactions/Builder/DelegateRegistration.php b/src/Transactions/Builder/DelegateRegistration.php
index <HASH>..<HASH> 100644
--- a/src/Transactions/Builder/DelegateRegistration.php
+++ b/src/Transactions/Builder/DelegateRegistration.php
@@ -13,7 +13,7 @@ declare(strict_types=1);
namespace ArkEcosystem\Crypto\Transactions\Builder;
-use ArkEcosystem\Crypto\Identities\PrivateKey;
+use ArkEcosystem\Crypto\Identities\PublicKey;
/**
* This is the delegate registration transaction class.
@@ -55,11 +55,10 @@ class DelegateRegistration extends AbstractTransaction
*/
public function sign(string $passphrase): AbstractTransaction
{
- $keys = PrivateKey::fromPassphrase($passphrase);
- $this->transaction->senderPublicKey = $keys->getPublicKey()->getHex();
- $this->transaction->asset['delegate']['publicKey'] = $this->transaction->senderPublicKey;
+ $publicKey = PublicKey::fromPassphrase($passphrase);
+ $this->transaction->asset['delegate']['publicKey'] = $publicKey->getHex();
- $this->transaction = $this->transaction->sign($keys);
+ parent::sign($passphrase);
return $this;
}
|
fix: missing ID from delegate registration
|
ArkEcosystem_php-crypto
|
train
|
php
|
0263e97a490c916915ee1db91c45346d6590068e
|
diff --git a/src/playbacks/no_op/no_op.js b/src/playbacks/no_op/no_op.js
index <HASH>..<HASH> 100644
--- a/src/playbacks/no_op/no_op.js
+++ b/src/playbacks/no_op/no_op.js
@@ -15,7 +15,6 @@ export default class NoOp extends Playback {
constructor(...args) {
super(...args)
this._noiseFrameNum = -1
- this._started = false
}
render() {
@@ -24,19 +23,11 @@ export default class NoOp extends Playback {
this.trigger(Events.PLAYBACK_READY, this.name)
const showForNoOp = !!(this.options.poster && this.options.poster.showForNoOp)
if (this.options.autoPlay || !showForNoOp)
- this.play()
+ this._animate()
return this
}
- play() {
- if (!this._started) {
- this._started = true
- this.trigger(Events.PLAYBACK_PLAY)
- this._animate()
- }
- }
-
_noise() {
this._noiseFrameNum = (this._noiseFrameNum+1)%5
if (this._noiseFrameNum) {
|
fix(no_op): avoid using play to start animation
The NoOp playback shouldn’t trigger the ‘play’ event when shown. It leaves it in an inconsistent state.
|
clappr_clappr
|
train
|
js
|
fb4fa9e29cdf14060b97e532abde5bbbb3c62f3c
|
diff --git a/packages/dna-idom/src/lib/idom.js b/packages/dna-idom/src/lib/idom.js
index <HASH>..<HASH> 100644
--- a/packages/dna-idom/src/lib/idom.js
+++ b/packages/dna-idom/src/lib/idom.js
@@ -36,14 +36,16 @@ function interpolate(template, data) {
export function h(element, props, ...children) {
return () => {
- elementOpenStart(element);
-
if (!isObject(props)) {
if (props) {
children.unshift(props);
}
props = {};
}
+ let key = props.key;
+ delete props.key;
+
+ elementOpenStart(element, key);
for (let k in props) {
if (!isFalsy(props[k])) {
|
feat: handle keys in dna idom
|
chialab_dna
|
train
|
js
|
1277e2414f5d2082777e7fe9b3549d4c6f4b68d9
|
diff --git a/src/components/Slider/Slider.js b/src/components/Slider/Slider.js
index <HASH>..<HASH> 100644
--- a/src/components/Slider/Slider.js
+++ b/src/components/Slider/Slider.js
@@ -152,9 +152,12 @@ export default class Slider extends PureComponent {
requestAnimationFrame(() => {
this.setState((prevState, props) => {
+ // Note: In FF, `evt.target` of `mousemove` event can be `HTMLDocument` which doesn't have `classList`.
+ // One example is dragging out of browser viewport.
const fromInput =
evt &&
evt.target &&
+ evt.target.classList &&
evt.target.classList.contains('bx-slider-text-input');
const { left, newValue: newSliderValue } = this.calcValue(
evt,
|
fix(Slider): fix JS error by dragging out of browser viewport (#<I>)
Fixes #<I>.
|
carbon-design-system_carbon-components-react
|
train
|
js
|
119f1b3cd213c0c7e2d403b66539a9b92f2497b0
|
diff --git a/test/helpers/kubectl.go b/test/helpers/kubectl.go
index <HASH>..<HASH> 100644
--- a/test/helpers/kubectl.go
+++ b/test/helpers/kubectl.go
@@ -137,6 +137,7 @@ var (
}
microk8sHelmOverrides = map[string]string{
+ "global.ipv6.enabled": "false",
"global.cni.confPath": "/var/snap/microk8s/current/args/cni-network",
"global.cni.binPath": "/var/snap/microk8s/current/opt/cni/bin",
"global.cni.customConf": "true",
|
test: Disable ipv6 for microk8s integration
Commit ced4ad0bcaa8 ("ipam: Add "kubernetes" IPAM mode") autoenabled
--k8s-require-ipv6-pod-cidr if --enable-ipv6 is enabled, which causes a
Cilium to get stuck waiting for the IPv6 pod CIDR to be populated in the
node. Fix it by disabling ipv6 for microk8s CI.
|
cilium_cilium
|
train
|
go
|
d74752fccd88d9ea30c46d0afcfd1b23a557341b
|
diff --git a/watson_developer_cloud/__init__.py b/watson_developer_cloud/__init__.py
index <HASH>..<HASH> 100755
--- a/watson_developer_cloud/__init__.py
+++ b/watson_developer_cloud/__init__.py
@@ -27,9 +27,9 @@ from .natural_language_classifier_v1 import NaturalLanguageClassifierV1
from .natural_language_understanding_v1 import NaturalLanguageUnderstandingV1
from .personality_insights_v2 import PersonalityInsightsV2
from .personality_insights_v3 import PersonalityInsightsV3
-from .speech_to_text_v1_adapter import SpeechToTextV1Adapter as SpeechToTextV1
from .text_to_speech_v1 import TextToSpeechV1
from .tone_analyzer_v3 import ToneAnalyzerV3
-from .visual_recognition_v3_adapter import VisualRecognitionV3Adapter as VisualRecognitionV3
from .discovery_v1 import DiscoveryV1
from .version import __version__
+from .speech_to_text_v1_adapter import SpeechToTextV1Adapter as SpeechToTextV1
+from .visual_recognition_v3_adapter import VisualRecognitionV3Adapter as VisualRecognitionV3
|
refactor(adapters): Move all adapters to the bottom of the init file
|
watson-developer-cloud_python-sdk
|
train
|
py
|
7d44c002d52a705db80e3b4f69c0ed6c06184a09
|
diff --git a/lib/tinker.js b/lib/tinker.js
index <HASH>..<HASH> 100644
--- a/lib/tinker.js
+++ b/lib/tinker.js
@@ -11,6 +11,7 @@ const eslint = './node_modules/.bin/eslint --fix';
module.exports = function tinker(filePath, eslintrc) {
let file = fs.readFileSync(filePath).toString();
+ let updatedFlag = false;
const codes = [];
const ast = remark.parse(file);
@@ -31,10 +32,15 @@ module.exports = function tinker(filePath, eslintrc) {
const fixedCode = fs.readFileSync(tmpFile).toString();
- file = file.replace(code, fixedCode);
+ if (fixedCode !== code) {
+ file = file.replace(code, fixedCode);
+ updatedFlag = true;
+ }
shjs.rm(tmpFile);
});
- fs.writeFileSync(filePath, file);
- console.log('Errors in ' + filePath + ' had been fixed! XD');
+ if (updatedFlag) {
+ fs.writeFileSync(filePath, file);
+ console.log('Errors in ' + filePath + ' had been fixed! XD');
+ }
};
|
feat: only rewrite file when it has Errors
|
benjycui_eslint-tinker
|
train
|
js
|
7ca10fb770934f78f3df1cc3f47a6613c4c62c13
|
diff --git a/superset/utils/cache_manager.py b/superset/utils/cache_manager.py
index <HASH>..<HASH> 100644
--- a/superset/utils/cache_manager.py
+++ b/superset/utils/cache_manager.py
@@ -41,7 +41,7 @@ class CacheManager:
cache_config = app.config[cache_config_key]
cache_type = cache_config.get("CACHE_TYPE")
if required and cache_type in (None, "SupersetMetastoreCache"):
- if cache_type is None:
+ if cache_type is None and not app.debug:
logger.warning(
"Falling back to the built-in cache, that stores data in the "
"metadata database, for the followinng cache: `%s`. "
|
fix(cache): only warn about fallback cache for non-debug mode (#<I>)
|
apache_incubator-superset
|
train
|
py
|
3d5bd874ea19c34d33a7aa45f1409bddfafc248b
|
diff --git a/spec/suitesConf.js b/spec/suitesConf.js
index <HASH>..<HASH> 100644
--- a/spec/suitesConf.js
+++ b/spec/suitesConf.js
@@ -7,7 +7,7 @@ exports.config = {
okspec: 'suites/ok_spec.js',
okmany: ['suites/ok_spec.js', 'suites/ok_2_spec.js'],
failingtest: 'suites/always_fail_spec.js'
- }
+ },
// Exclude patterns are relative to this directory.
exclude: [
|
chore(tests): fix missing comma in suite tests
|
angular_protractor
|
train
|
js
|
188b61bf1bd68c7e2504334d38c335370cd961f7
|
diff --git a/cypress/integration/datatable_spec.js b/cypress/integration/datatable_spec.js
index <HASH>..<HASH> 100644
--- a/cypress/integration/datatable_spec.js
+++ b/cypress/integration/datatable_spec.js
@@ -222,4 +222,20 @@ describe('DataTable', function () {
cy.get('.dt-row[data-row-index=1]').should('not.be.visible');
});
});
+
+ describe('Inline filters with sorting', function () {
+ before(function () {
+ cy.visit('/');
+ });
+
+ it('filters with sorting', function () {
+ cy.clickDropdown(7);
+ cy.clickDropdownItem(7, 'Sort Descending');
+ cy.get('.dt-filter[data-col-index=5]').as('filterInput5');
+ cy.getCell(5, 24).click().type('{ctrl}f');
+ cy.get('@filterInput5').type('>3000');
+
+ cy.get('.dt-body .dt-row').first().should('have.class', 'dt-row-24');
+ });
+ });
});
|
test: 💍 Add test for filters with sorting
|
frappe_datatable
|
train
|
js
|
79109829edc62ef7132b983de75832e71f57e17c
|
diff --git a/test/reducers/projectSpec.js b/test/reducers/projectSpec.js
index <HASH>..<HASH> 100644
--- a/test/reducers/projectSpec.js
+++ b/test/reducers/projectSpec.js
@@ -9,6 +9,9 @@ import Selectors from '../../app/selectors';
import * as PIN_DIRECTION from '../../app/constants/pinDirection';
const mockStore = (state) => createStore(generateReducers([1]), state, applyMiddleware(thunk));
+function pin(nodeId, pinKey) {
+ return { nodeId, pinKey };
+}
describe('Project reducer: ', () => {
const projectShape = {
@@ -149,7 +152,7 @@ describe('Project reducer: ', () => {
{
1: {
id: 1,
- pins: [2, 3],
+ pins: [pin(1, 'out'), pin(3, 'in')],
},
}
),
|
fix(test): fix deleting node with links
|
xodio_xod
|
train
|
js
|
6e64a46fd369c75a7c6e386aa587689d75bff0b5
|
diff --git a/packages/build/css/postcss-compile.js b/packages/build/css/postcss-compile.js
index <HASH>..<HASH> 100644
--- a/packages/build/css/postcss-compile.js
+++ b/packages/build/css/postcss-compile.js
@@ -4,7 +4,7 @@ const path = require('path')
const { mkdir } = require('../fs')
module.exports = async function postcssCompile(inputPath, outputPaths) {
- await ensureDistDirStructure()
+ await ensureDirectoryStructure(outputPaths)
const firstOutputPath = outputPaths[0]
exec(`postcss ${inputPath} -o ${firstOutputPath}`)
@@ -17,7 +17,8 @@ function exec(cmd) {
execSync(cmd, { stdio: 'inherit', cwd: process.cwd() })
}
-async function ensureDistDirStructure() {
- await mkdir(path.join('dist', 'cjs', 'css'))
- await mkdir(path.join('dist', 'esm', 'css'))
+async function ensureDirectoryStructure(outputPaths) {
+ for (const dirname of outputPaths.map(fullPath => path.dirname(fullPath))) {
+ await mkdir(dirname)
+ }
}
|
refactor(build): dynamic dir setup for postcss compile
|
pluralsight_design-system
|
train
|
js
|
22d546012c877773595c9d3c88c0be766f02fbbe
|
diff --git a/flask_appbuilder/tests/test_api.py b/flask_appbuilder/tests/test_api.py
index <HASH>..<HASH> 100644
--- a/flask_appbuilder/tests/test_api.py
+++ b/flask_appbuilder/tests/test_api.py
@@ -2537,7 +2537,7 @@ class APITestCase(FABTestCase):
"""
client = self.app.test_client()
self.browser_login(client, USERNAME_ADMIN, PASSWORD_ADMIN)
- uri = "swaggerview/v1"
+ uri = "swagger/v1"
rv = client.get(uri)
self.assertEqual(rv.status_code, 200)
|
fix: swagger test (#<I>)
|
dpgaspar_Flask-AppBuilder
|
train
|
py
|
e68631cacc73b0b54da7b64730c168d95055516f
|
diff --git a/Gruntfile.js b/Gruntfile.js
index <HASH>..<HASH> 100644
--- a/Gruntfile.js
+++ b/Gruntfile.js
@@ -63,10 +63,10 @@ module.exports = function( grunt ) {
},
exec: {
ormRebase: {
- cmd: "NODE_PATH=" + [ './lib/', './modules/' ].join( isWin ? ';' : ':' ) + "; node modules/clever-orm/bin/rebase.js " + dbTarget
+ cmd: "node modules/clever-orm/bin/rebase.js " + dbTarget
},
ormSeed: {
- cmd: "NODE_PATH=" + [ './lib/', './modules/' ].join( isWin ? ';' : ':' ) + "; node modules/clever-orm/bin/seedModels.js " + dbTarget
+ cmd: "node modules/clever-orm/bin/seedModels.js " + dbTarget
}
}
}, function( grunt ) {
|
fix(grunt): No longer need NODE_PATH set when running db commands
|
CleverStack_clever-orm
|
train
|
js
|
8b6b060409360abef9806e4028167494374e8ae6
|
diff --git a/packages/app-admin/src/components/SplitView/SplitView.js b/packages/app-admin/src/components/SplitView/SplitView.js
index <HASH>..<HASH> 100644
--- a/packages/app-admin/src/components/SplitView/SplitView.js
+++ b/packages/app-admin/src/components/SplitView/SplitView.js
@@ -64,7 +64,7 @@ const RightPanel = (props: Props) => {
const { children, ...rest } = props;
return (
<Cell span={props.span ? props.span : 7} {...rest}>
- <RightPanelWrapper id={"webiny-secondary-view-right-panel"}>
+ <RightPanelWrapper id={"webiny-split-view-right-panel"}>
{children}
</RightPanelWrapper>
</Cell>
|
fix: update element ID naming.
|
Webiny_webiny-js
|
train
|
js
|
b95088b17b6855bb65098bba70b818f1edb865ef
|
diff --git a/webapps/ui/cockpit/plugin.js b/webapps/ui/cockpit/plugin.js
index <HASH>..<HASH> 100644
--- a/webapps/ui/cockpit/plugin.js
+++ b/webapps/ui/cockpit/plugin.js
@@ -14,3 +14,5 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
+
+export default [];
|
chore(ce-build): export empty plugin
related to CAM-<I>
|
camunda_camunda-bpm-platform
|
train
|
js
|
c72b71cce977eee461ddc0cfd0c096ec6aea7cf2
|
diff --git a/src/Console/Console.js b/src/Console/Console.js
index <HASH>..<HASH> 100644
--- a/src/Console/Console.js
+++ b/src/Console/Console.js
@@ -9,7 +9,8 @@ import {
trim,
upperFirst,
isHidden,
- lowerCase
+ lowerCase,
+ isNull
} from '../lib/util'
import evalCss from '../lib/evalCss'
import emitter from '../lib/emitter'
@@ -191,7 +192,7 @@ export default class Console extends Tool {
})
.on('click', '.eruda-search', () => {
const filter = prompt('Filter')
- if (!filter) return
+ if (isNull(filter)) return
$searchKeyword.text(filter)
if (trim(filter) === '') {
logger.filter('all')
|
fix(console): unable to clear filter
|
liriliri_eruda
|
train
|
js
|
679ac77ec69cb7fc756449c7a27fb9c03d4bff19
|
diff --git a/lib/utils/couch.js b/lib/utils/couch.js
index <HASH>..<HASH> 100644
--- a/lib/utils/couch.js
+++ b/lib/utils/couch.js
@@ -11,10 +11,9 @@ var util = require('./index')
*/
exports.isAdminParty = function (env_config, callback) {
- request({
- url: env_config.couch.url + '/_users/_all_docs',
- method: 'HEAD'
- }, function (err, res) {
+ request.get(
+ env_config.couch.url + '/_users/_all_docs',
+ function (err, res) {
if (err) {
return callback(err)
}
@@ -85,7 +84,7 @@ exports.checkCouchCredentials = function (env_config, callback) {
request({
url: env_config.couch.url + '/_users/_all_docs',
- method: 'HEAD',
+ method: 'GET',
auth: {
user: username,
pass: password
|
fix(utils): change method to GET to support more couchdb vendors (e.g. pouchdb-server)
* * *
This commit was sponsored by The Hoodie Firm.
You can hire The Hoodie Firm:
<URL>
|
hoodiehq_hoodie-server
|
train
|
js
|
6c0fcf04954af9ce2c0d10b421c6aabffcf9aba0
|
diff --git a/go/vt/vttablet/tabletmanager/rpc_replication.go b/go/vt/vttablet/tabletmanager/rpc_replication.go
index <HASH>..<HASH> 100644
--- a/go/vt/vttablet/tabletmanager/rpc_replication.go
+++ b/go/vt/vttablet/tabletmanager/rpc_replication.go
@@ -250,7 +250,7 @@ func (tm *TabletManager) InitPrimary(ctx context.Context) (string, error) {
defer tm.unlock()
// Initializing as primary implies undoing any previous "do not replicate".
- tm.replManager.setReplicationStopped(false)
+ tm.replManager.reset()
// we need to insert something in the binlogs, so we can get the
// current position. Let's just use the mysqlctl.CreateReparentJournal commands.
|
feat: initPrimary should be using the reset functionality instead of setting the replication to stopped
|
vitessio_vitess
|
train
|
go
|
1555a55406264fbadb79ac97760501907e88e91b
|
diff --git a/tests/iam/test_iam_construct.py b/tests/iam/test_iam_construct.py
index <HASH>..<HASH> 100644
--- a/tests/iam/test_iam_construct.py
+++ b/tests/iam/test_iam_construct.py
@@ -44,10 +44,12 @@ def test_iam_construct_policy(requests_get):
@mock.patch('foremast.utils.credentials.API_URL', 'http://test.com')
@mock.patch('foremast.utils.credentials.requests.get')
-def test_construct_lambda(requests_get):
+def test_construct_cloudwatchlogs(requests_get):
"""Check Lambda Policy."""
+ pipeline_settings = {'services': {'cloudwatchlogs': True}, 'type': 'lambda'}
+
policy_json = construct_policy(
- app='unicornforrest', env='dev', group='forrest', pipeline_settings={'type': 'lambda'})
+ app='unicornforrest', env='dev', group='forrest', pipeline_settings=pipeline_settings)
policy = json.loads(policy_json)
statements = list(statement for statement in policy['Statement'] if statement['Sid'] == 'LambdaCloudWatchLogs')
|
test: Check cloudwatchlogs specifically
See also: #<I>
|
foremast_foremast
|
train
|
py
|
f0b11ad22ee0a3f98436f816de88a20c631d7c75
|
diff --git a/test/test.js b/test/test.js
index <HASH>..<HASH> 100644
--- a/test/test.js
+++ b/test/test.js
@@ -389,6 +389,9 @@ describe('Page', function() {
const result = await page.evaluate((a, b) => Object.is(a, undefined) && Object.is(b, 'foo'), undefined, 'foo');
expect(result).toBe(true);
});
+ it('should properly serialize null fields', async({page}) => {
+ expect(await page.evaluate(() => ({a: undefined}))).toEqual({});
+ });
it('should fail for window object', async({page, server}) => {
const result = await page.evaluate(() => window);
expect(result).toBe(undefined);
|
test: verify serialization of "undefined" fields (#<I>)
Fixes #<I>.
|
GoogleChrome_puppeteer
|
train
|
js
|
519ba54162a366e13c59a5fc3ee5b7fca105e142
|
diff --git a/packages/xod-client/src/project/reducer.js b/packages/xod-client/src/project/reducer.js
index <HASH>..<HASH> 100644
--- a/packages/xod-client/src/project/reducer.js
+++ b/packages/xod-client/src/project/reducer.js
@@ -21,7 +21,7 @@ import {
import { NODE_PROPERTY_KIND, NODE_PROPERTY_KEY } from './constants';
-// TODO: rewrite the whole prop updating thing when xod-core is completely ditched
+// TODO: rewrite this?
const selectNodePropertyUpdater = ({ kind, key, value }) => {
if (kind === NODE_PROPERTY_KIND.PIN) {
return XP.setPinCurriedValue(key, value);
|
chore(xod-client): remove mentions of xod-core
|
xodio_xod
|
train
|
js
|
4d7f2ecb6e819dcfbb853ceddccfaaf7fb2c1950
|
diff --git a/packages/ui-scripts/lib/utils/git.js b/packages/ui-scripts/lib/utils/git.js
index <HASH>..<HASH> 100644
--- a/packages/ui-scripts/lib/utils/git.js
+++ b/packages/ui-scripts/lib/utils/git.js
@@ -41,7 +41,10 @@ exports.isReleaseCommit = (version) => {
info(formattedResult)
- return !!formattedResult?.startsWith(`chore(release): ${version}`)
+ return (
+ formattedResult &&
+ formattedResult.startsWith(`chore(release): ${version}`)
+ )
} catch (e) {
error(e)
process.exit(1)
|
chore(ui-scripts): fix review issues
|
instructure_instructure-ui
|
train
|
js
|
a19ebffa8d93af3ef92a7500815e80a2494cedfa
|
diff --git a/src/lib/util/assertString.js b/src/lib/util/assertString.js
index <HASH>..<HASH> 100644
--- a/src/lib/util/assertString.js
+++ b/src/lib/util/assertString.js
@@ -1,18 +1,11 @@
export default function assertString(input) {
- const isString = (typeof input === 'string' || input instanceof String);
+ const isString = typeof input === 'string' || input instanceof String;
if (!isString) {
- let invalidType;
- if (input === null) {
- invalidType = 'null';
- } else {
- invalidType = typeof input;
- if (invalidType === 'object' && input.constructor && input.constructor.hasOwnProperty('name')) {
- invalidType = input.constructor.name;
- } else {
- invalidType = `a ${invalidType}`;
- }
- }
- throw new TypeError(`Expected string but received ${invalidType}.`);
+ let invalidType = typeof input;
+ if (input === null) invalidType = 'null';
+ else if (invalidType === 'object') invalidType = input.constructor.name;
+
+ throw new TypeError(`Expected a string but received a ${invalidType}`);
}
}
|
refactor: refactor assertString fn (#<I>)
|
chriso_validator.js
|
train
|
js
|
efb09264ef10ab2343fdf2e735b85162bfa3edcb
|
diff --git a/packages/file-collections/src/node/getFileDownloadHandler/getFileDownloadHandler.js b/packages/file-collections/src/node/getFileDownloadHandler/getFileDownloadHandler.js
index <HASH>..<HASH> 100644
--- a/packages/file-collections/src/node/getFileDownloadHandler/getFileDownloadHandler.js
+++ b/packages/file-collections/src/node/getFileDownloadHandler/getFileDownloadHandler.js
@@ -1,5 +1,5 @@
import contentDisposition from "content-disposition";
-import Path from "path-parser";
+import { Path } from "path-parser";
import debug from "../debug";
import requestRange from "./requestRange";
import writeHeadersToResponse from "./writeHeadersToResponse";
|
fix: path parser
Breaking change introduced: Path is a named export rather than the default export.
|
reactioncommerce_reaction-file-collections
|
train
|
js
|
47fdb2a8f8fc6142e9879869402401a65b04cb0a
|
diff --git a/src/network.js b/src/network.js
index <HASH>..<HASH> 100644
--- a/src/network.js
+++ b/src/network.js
@@ -240,7 +240,7 @@ class Network {
/**
* Connects to another peer
*
- * @param {PeerId|Multiaddr|Provider} peer
+ * @param {PeerId|Multiaddr} peer
* @param {Object} [options]
* @param {AbortSignal} [options.signal]
* @returns {Promise<Connection>}
@@ -250,8 +250,6 @@ class Network {
throw new Error('network isn\'t running')
}
- // TODO: Figure out inconsistency here.
- // @ts-expect-error - dial does not expects Provider
return this._libp2p.dial(peer, options)
}
|
fix: fix wrong type signature (#<I>)
|
ipfs_js-ipfs-bitswap
|
train
|
js
|
6809cfc75a7cf9fc76a99e6ddb951c7f4afe7f1f
|
diff --git a/alot/command.py b/alot/command.py
index <HASH>..<HASH> 100644
--- a/alot/command.py
+++ b/alot/command.py
@@ -699,10 +699,10 @@ class OpenAttachmentCommand(Command):
def apply(self, ui):
logging.info('open attachment')
- path = self.attachment.save(tempfile.gettempdir())
mimetype = self.attachment.get_content_type()
handler = settings.get_mime_handler(mimetype)
if handler:
+ path = self.attachment.save(tempfile.gettempdir())
if '%s' in handler:
cmd = handler % path.replace(' ', '\ ')
else:
diff --git a/alot/message.py b/alot/message.py
index <HASH>..<HASH> 100644
--- a/alot/message.py
+++ b/alot/message.py
@@ -276,9 +276,11 @@ class Attachment:
def save(self, path):
"""save the attachment to disk. Uses self.get_filename
in case path is a directory"""
- if os.path.isdir(path):
+ if self.get_filename() and os.path.isdir(path):
path = os.path.join(path, self.get_filename())
- FILE = open(path, "w")
+ FILE = open(path, "w")
+ else:
+ FILE = tempfile.NamedTemporaryFile(delete=False)
FILE.write(self.part.get_payload(decode=True))
FILE.close()
- return path
+ return FILE.name
|
fix: don't save files if not opened anyway
|
pazz_alot
|
train
|
py,py
|
0f958edbe31c36ab22b8edc123f8dc19c8ec2966
|
diff --git a/memote/suite/tests/test_basic.py b/memote/suite/tests/test_basic.py
index <HASH>..<HASH> 100644
--- a/memote/suite/tests/test_basic.py
+++ b/memote/suite/tests/test_basic.py
@@ -340,7 +340,7 @@ def test_find_pure_metabolic_reactions(model):
biomass reactions are removed and the remainder assumed to be pure
metabolic reactions. Boundary reactions are identified using the attribute
cobra.Model.boundary. Please read the description of "Transport Reactions"
- and "Biomass Reactions" to learn how they are identified.
+ and "Biomass Reaction Identified" to learn how they are identified.
"""
ann = test_find_pure_metabolic_reactions.annotation
|
docs: correct reference to Biomass Reactions Identified
|
opencobra_memote
|
train
|
py
|
44bd77588b5f62ce31330ac7844065c598001ab9
|
diff --git a/function/liftA.js b/function/liftA.js
index <HASH>..<HASH> 100644
--- a/function/liftA.js
+++ b/function/liftA.js
@@ -1,4 +1,5 @@
-const { map, ap } = require('..')
+const ap = require('../list/ap')
+const map = require('../list/map')
const liftA = arity => {
if (arity < 1) throw new Error('arity must be >= 1')
|
fix: 🐛 remove circular reference in function/liftA.js
|
joelnet_MojiScript
|
train
|
js
|
c3ae67c5fe2b0ad3fe045e94d83ee5450e81924c
|
diff --git a/packages/taro-cli/src/weapp.js b/packages/taro-cli/src/weapp.js
index <HASH>..<HASH> 100644
--- a/packages/taro-cli/src/weapp.js
+++ b/packages/taro-cli/src/weapp.js
@@ -911,8 +911,8 @@ function copyFilesFromSrcToOutput (files) {
}
async function compileScriptFile (filePath, content) {
- const babelConfig = Object.assign({}, pluginsConfig.babel, defaultBabelConfig)
- const tsConfig = Object.assign({}, pluginsConfig.typescript, defaultTSConfig)
+ const babelConfig = Object.assign({}, defaultBabelConfig, pluginsConfig.babel)
+ const tsConfig = Object.assign({}, defaultTSConfig, pluginsConfig.typescript)
if (Util.REG_TYPESCRIPT.test(filePath)) {
const compileTSRes = await npmProcess.callPlugin('typescript', content, entryFilePath, tsConfig)
if (compileTSRes && compileTSRes.outputText) {
|
fix(cli): fix the order of merge external babel config before compile script
|
NervJS_taro
|
train
|
js
|
02da7d6804489a985d65b2d6281ecca01e9f08ee
|
diff --git a/test/timestamp.spec.js b/test/timestamp.spec.js
index <HASH>..<HASH> 100644
--- a/test/timestamp.spec.js
+++ b/test/timestamp.spec.js
@@ -30,7 +30,7 @@ describe('timestamp support', function() {
describe(method, function() {
it('inserts data with timestamp', function() {
var now = new Date().getTime();
- return client[method](table, data, {timestamp: now, ttl: 1});
+ return client[method](table, data, {timestamp: now, ttl: 2});
});
it('retrieves all the data when immediately querying', function() {
@@ -53,7 +53,7 @@ describe('timestamp support', function() {
it('waits for a few seconds', function() {
this.timeout(5000);
- return Promise.delay(2000);
+ return Promise.delay(4000);
});
it('queries again and should get no data', function() {
|
test: increase the timeouts in the timestamp / ttl tests
|
demmer_node-cassandra-native-driver
|
train
|
js
|
6de4687a6b002238248c56e499af7eaf1edbea02
|
diff --git a/src/anyconfig/backend/base/dumpers.py b/src/anyconfig/backend/base/dumpers.py
index <HASH>..<HASH> 100644
--- a/src/anyconfig/backend/base/dumpers.py
+++ b/src/anyconfig/backend/base/dumpers.py
@@ -7,7 +7,6 @@ r"""Abstract and basic dumpes.
import io
from ... import utils
-from .mixins import TextFilesMixin
from .utils import (
ensure_outdir_exists, not_implemented
)
|
fix: remove an import of .mixins.TextFilesMixin not used
|
ssato_python-anyconfig
|
train
|
py
|
123b6aa30eb32261b4be8c819c7aac3a0c88d085
|
diff --git a/modules/utils.js b/modules/utils.js
index <HASH>..<HASH> 100755
--- a/modules/utils.js
+++ b/modules/utils.js
@@ -129,15 +129,15 @@ export function getCleanedHistory(
if (
history.action === 'REPLACE' &&
tabsEntries[currentTabIndex] &&
- (arr.length - 1) === index && // This is last item
- acc.length < tabsEntries[currentTabIndex].length // Entries are missing
+ arr.length === index && // This is last item
+ (acc.length + 1) < tabsEntries[currentTabIndex].length // Entries are missing
) {
const missingEntries = tabsEntries[currentTabIndex]
.slice(
firstEntryIndex,
tabsEntries[currentTabIndex].findIndex((tabEntry) => {
return matchPattern(tabEntry.key, entry)
- })
+ }),
)
return [
...acc,
|
fix(getCleanedHistory): update missingEntries condition
|
winoteam_react-router-navigation
|
train
|
js
|
8b6fbbe42991f4a92fea3543d394d6365299b162
|
diff --git a/packages/d3fc-webgl/src/series/area.js b/packages/d3fc-webgl/src/series/area.js
index <HASH>..<HASH> 100644
--- a/packages/d3fc-webgl/src/series/area.js
+++ b/packages/d3fc-webgl/src/series/area.js
@@ -4,7 +4,6 @@ import drawModes from '../program/drawModes';
import areaShader from '../shaders/area/shader';
import { rebind } from '@d3fc/d3fc-rebind';
import attribute from '../buffer/attribute';
-import elementIndices from '../buffer/elementIndices';
import types from '../buffer/types';
import rebindCurry from '../rebindCurry';
@@ -29,10 +28,7 @@ export default () => {
[1, 1, 0]
]);
- program
- .buffers()
- .elementIndices(elementIndices([0, 1, 2, 3, 4, 5]))
- .attribute('aCorner', cornerAttribute);
+ program.buffers().attribute('aCorner', cornerAttribute);
const draw = numElements => {
const shaderBuilder = areaShader();
|
refactor: use array-based rendering for area
|
d3fc_d3fc
|
train
|
js
|
27e9e39861f13e141f37bb9db5601921b4e40ee2
|
diff --git a/service.js b/service.js
index <HASH>..<HASH> 100755
--- a/service.js
+++ b/service.js
@@ -176,7 +176,7 @@ class ServiceConsul extends service.Service {
name: name,
id: u.href,
address: u.hostname,
- port: u.port,
+ port: parseInt(u.port, 10),
tags: options.tags
};
|
fix: use parseInt for port from url
|
Kronos-Integration_kronos-service-consul
|
train
|
js
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.