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 |
|---|---|---|---|---|---|
f5d666f20441f961577b94a55a6dace7f36d8378
|
diff --git a/packages/react/src/components/Tag/Tag.js b/packages/react/src/components/Tag/Tag.js
index <HASH>..<HASH> 100644
--- a/packages/react/src/components/Tag/Tag.js
+++ b/packages/react/src/components/Tag/Tag.js
@@ -67,6 +67,7 @@ const Tag = ({
{children !== null && children !== undefined ? children : TYPES[type]}
</span>
<button
+ type="button"
className={`${prefix}--tag__close-icon`}
onClick={handleClose}
disabled={disabled}
|
fix(Tag): set button type to avoid form submissions (#<I>)
|
carbon-design-system_carbon-components
|
train
|
js
|
c3badd5b06880ec0ff06cccf574e4f02b836b84c
|
diff --git a/models/AccountModel.js b/models/AccountModel.js
index <HASH>..<HASH> 100644
--- a/models/AccountModel.js
+++ b/models/AccountModel.js
@@ -1,9 +1,17 @@
-module.exports = function(Model, config) {
+module.exports = function(Model, config, utils, UserModel) {
return Model.extend('Account',
{
type : config['clever-accounts'].driver || 'ORM',
- softDeletable : true,
- timeStampable : true
+ timeStampable : true,
+ softDeleteable : false,
+
+ 'UserModel beforeAllFindersOptions': function(findOptions, queryOptions, callback) {
+ utils
+ .helpers
+ .includeModel(findOptions, this, 'Account');
+
+ callback(null);
+ }
},
{
id: {
|
feat(model): Include Account in the query for Users
|
CleverStack_clever-accounts
|
train
|
js
|
656d71a0235453b951b0ce27c78076c79cf06d89
|
diff --git a/src/bootstrap.js b/src/bootstrap.js
index <HASH>..<HASH> 100644
--- a/src/bootstrap.js
+++ b/src/bootstrap.js
@@ -1,5 +1,5 @@
import { loadScript, onAnalyticsReady, hasGoogleScript } from './helpers'
-import config, { update } from './config'
+import config from './config'
import createTrackers from './create-trackers'
import collectors from './collectors'
import untracked from 'lib/untracked'
@@ -38,21 +38,12 @@ export default function bootstrap () {
return onAnalyticsReady()
})
.then(() => {
- let newId = id
-
- if (typeof newId === 'function') {
- newId = newId()
- }
-
- if (typeof newId.then === 'function') {
- return newId.then(response => {
- config.id = response
- })
- }
-
- return newId
+ // see https://github.com/MatteoGabriele/vue-analytics/issues/78
+ return typeof id === 'function' ? id() : id
})
- .then(response => {
+ .then(id => {
+ // Update the ID with the new value
+ config.id = id
// Create analytics trackers first
createTrackers()
// Add all collectors
|
fix(bootstrap): config.id not updated when id is a function
|
MatteoGabriele_vue-analytics
|
train
|
js
|
7112d008d0c1ebae37fd6a76ebfa8b0fb1092e7b
|
diff --git a/shims_for_IE.js b/shims_for_IE.js
index <HASH>..<HASH> 100644
--- a/shims_for_IE.js
+++ b/shims_for_IE.js
@@ -3,7 +3,7 @@
if (!Object.hasOwnProperty('name')) {
Object.defineProperty(Function.prototype, 'name', {
get: function() {
- var matches = this.toString().match(/^\s*function\s*(\S*)\s*\(/);
+ var matches = this.toString().match(/^\s*function\s*((?![0-9])[a-zA-Z0-9_$]*)\s*\(/);
var name = matches && matches.length > 1 ? matches[1] : "";
// For better performance only parse once, and then cache the
// result through a new accessor for repeated access.
|
fix(IE): make shim work with instrumented code
Closes #<I>
|
angular_angular
|
train
|
js
|
788dc03dbae9495179af90f9a399b90ab3c8f809
|
diff --git a/__tests__/base.js b/__tests__/base.js
index <HASH>..<HASH> 100644
--- a/__tests__/base.js
+++ b/__tests__/base.js
@@ -1389,6 +1389,21 @@ function runBaseTest(name, useProxies, autoFreeze, useListener) {
expect(next.y).toBe(externalData)
})
+ it("does not create new state unnecessary, #491", () => {
+ const a = {highlight: true}
+ const next1 = produce(a, draft => {
+ draft.highlight = false
+ draft.highlight = true
+ })
+ // See explanation in issue
+ expect(next1).not.toBe(a)
+
+ const next2 = produce(a, draft => {
+ draft.highlight = true
+ })
+ expect(next2).toBe(a)
+ })
+
autoFreeze &&
test("issue #469, state not frozen", () => {
const project = produce(
|
chore: added test for #<I>
|
immerjs_immer
|
train
|
js
|
feafea812a95db05e9b52beaced0def611bba5c8
|
diff --git a/src/utils.js b/src/utils.js
index <HASH>..<HASH> 100644
--- a/src/utils.js
+++ b/src/utils.js
@@ -29,7 +29,10 @@ function stringifyRequest(loaderContext, request) {
typeof loaderContext.utils.contextify === "function"
) {
return JSON.stringify(
- loaderContext.utils.contextify(loaderContext.context, request)
+ loaderContext.utils.contextify(
+ loaderContext.context || loaderContext.rootContext,
+ request
+ )
);
}
|
fix: runtime path generation (#<I>)
|
webpack-contrib_css-loader
|
train
|
js
|
6a1285a0eb8d9ba7d121e986403033de1d492b9c
|
diff --git a/models/classes/featureFlag/FeatureFlagChecker.php b/models/classes/featureFlag/FeatureFlagChecker.php
index <HASH>..<HASH> 100644
--- a/models/classes/featureFlag/FeatureFlagChecker.php
+++ b/models/classes/featureFlag/FeatureFlagChecker.php
@@ -51,10 +51,12 @@ class FeatureFlagChecker extends ConfigurableService implements FeatureFlagCheck
/** @var core_kernel_classes_Triple $triple */
foreach ($resource->getRdfTriples() as $triple) {
- $predicate = $triple->predicate;
+ if ($triple->predicate === 'http://www.tao.lu/Ontologies/TAO.rdf#UpdatedAt') {
+ continue;
+ }
- if ($cache->has($predicate)) {
- $cache->delete($predicate);
+ if ($cache->has($triple->predicate)) {
+ $cache->delete($triple->predicate);
$count++;
}
}
|
fix: only delete cache for feature flag
|
oat-sa_tao-core
|
train
|
php
|
f64e58af28dd05e145807e867fec300b130943e8
|
diff --git a/test/spec/client/persist.js b/test/spec/client/persist.js
index <HASH>..<HASH> 100644
--- a/test/spec/client/persist.js
+++ b/test/spec/client/persist.js
@@ -30,7 +30,8 @@ describe('persist', function () {
var client2 = null,
found = false,
- task = tasks.doc();
+ task = tasks.doc(),
+ dbLoaded = utils.once(db, 'load');
var nowStr = (new Date().toUTCString());
@@ -39,7 +40,7 @@ describe('persist', function () {
priority: 'high'
}).then(function () {
// Wait until all the data has been loaded from the store
- return utils.once(db, 'load');
+ return dbLoaded;
}).then(function () {
// Fake update of since
return db._props.set({
|
test(persist): prevent race condition
|
delta-db_deltadb-server
|
train
|
js
|
b306f4b67eb4e61d1c65b6d462c83ed5673defae
|
diff --git a/python/lib/sequence.py b/python/lib/sequence.py
index <HASH>..<HASH> 100644
--- a/python/lib/sequence.py
+++ b/python/lib/sequence.py
@@ -238,7 +238,7 @@ class Sequence(object):
updated_time = t + s
time_dict[t]["pointer"] += 1
timestamps.append(updated_time)
- return timestamps
+ return timestamps, file_list
def remove_duplicates(self, min_distance=1e-5, min_angle=5):
diff --git a/python/upload_with_preprocessing.py b/python/upload_with_preprocessing.py
index <HASH>..<HASH> 100755
--- a/python/upload_with_preprocessing.py
+++ b/python/upload_with_preprocessing.py
@@ -212,7 +212,8 @@ if __name__ == '__main__':
# interpolate timestamps if there exist identical timestamps in consecutive photos
print("\n=== Interpolating timestamps per sequence ...")
- timestamps = s.interpolate_timestamp()
+ timestamps, sort_file_list = s.interpolate_timestamp()
+ s.file_list = sort_file_list
# Add a sequence uuid per sub-folder
if len(s.file_list) > 0:
|
fix(sequence): Fix ordering of timestamps
|
mapillary_mapillary_tools
|
train
|
py,py
|
ff73ac333b046936eb74273f07736514197cb5b3
|
diff --git a/packages/uikit-workshop/src/scripts/components/base-component.js b/packages/uikit-workshop/src/scripts/components/base-component.js
index <HASH>..<HASH> 100755
--- a/packages/uikit-workshop/src/scripts/components/base-component.js
+++ b/packages/uikit-workshop/src/scripts/components/base-component.js
@@ -15,7 +15,7 @@ export class BaseComponent extends withComponent(withPreact()) {
}
disconnectedCallback() {
- this.__storeUnsubscribe();
+ this.__storeUnsubscribe && this.__storeUnsubscribe();
if (super.disconnectedCallback) {
super.disconnectedCallback();
@@ -46,10 +46,7 @@ export class BaseComponent extends withComponent(withPreact()) {
* updated
*/
setState(state, callback) {
-
this.state = Object.assign({}, this.state, state);
-
-
}
_renderStyles(stylesheets) {
|
refactor: make sure the base component's unsubscribe method exists before trying to run it
|
bolt-design-system_bolt
|
train
|
js
|
7943b1bd30aa5688699c9db1d7a10b15c4d10079
|
diff --git a/src/dev.js b/src/dev.js
index <HASH>..<HASH> 100644
--- a/src/dev.js
+++ b/src/dev.js
@@ -76,8 +76,14 @@ module.exports = {
}).forEach(function(value){
mkdir(value[0]);
exec("git clone " + value[1] + " " + value[0]);
- exec("(cd " + value[0] + " && exec npm install)");
- exec("(cd " + value[0] + " && exec gulp build)");
+
+ var normalizedPath = path.normalize(value[0]);
+ exec("npm install", {
+ cwd: normalizedPath
+ });
+ exec("gulp build", {
+ cwd: normalizedPath
+ });
});
var sys = require('sys');
|
fix(dev): use normalized cwd when executing build commands
fixes #7
|
aurelia_tools
|
train
|
js
|
3043d261be90980b78d6c1e54b0a003353e279f4
|
diff --git a/lib/cli/src/detect.js b/lib/cli/src/detect.js
index <HASH>..<HASH> 100644
--- a/lib/cli/src/detect.js
+++ b/lib/cli/src/detect.js
@@ -71,10 +71,6 @@ export function isStorybookInstalled(dependencies, force) {
}
export function detect(options = {}) {
- if (options.html) {
- return types.HTML;
- }
-
const packageJson = getPackageJson();
const bowerJson = getBowerJson();
@@ -87,5 +83,9 @@ export function detect(options = {}) {
return storyBookInstalled;
}
+ if (options.html) {
+ return types.HTML;
+ }
+
return detectFramework(packageJson || bowerJson);
}
|
fix(cli): move html check down in detection
- this way it first checks if storybook is installed
|
storybooks_storybook
|
train
|
js
|
0a1b905b0e6cdb5a392bd6c071b8689056118735
|
diff --git a/lib/platform/github/index.js b/lib/platform/github/index.js
index <HASH>..<HASH> 100644
--- a/lib/platform/github/index.js
+++ b/lib/platform/github/index.js
@@ -693,7 +693,7 @@ async function getPr(prNo) {
// Check if only one author of all commits
logger.debug('Checking all commits');
const prCommits = (await get(
- `repos/${config.repoName}/pulls/${prNo}/commits`
+ `repos/${config.parentRepo || config.repoName}/pulls/${prNo}/commits`
)).body;
const authors = prCommits.reduce((arr, commit) => {
logger.trace({ commit }, `Checking commit`);
|
fix: forking mode should check commits on parent repo
|
renovatebot_renovate
|
train
|
js
|
af6fac9fdff843393831dd4a0bc7d7c14d2c53ca
|
diff --git a/cmd/influx/main.go b/cmd/influx/main.go
index <HASH>..<HASH> 100644
--- a/cmd/influx/main.go
+++ b/cmd/influx/main.go
@@ -64,6 +64,7 @@ type genericCLIOpts struct {
func (o genericCLIOpts) newCmd(use string, runE func(*cobra.Command, []string) error) *cobra.Command {
cmd := &cobra.Command{
+ Args: cobra.NoArgs,
Use: use,
RunE: runE,
}
|
chore(pkg): remove ambiguity in wrong cmd calls within influx pkg cmd
there was an issue where you could call, `influx pkg summarize`
and the influx cli would actually prescribe that to `influx pkg` cmd
and pass summarize as an arg. This removes that ambiguity
|
influxdata_influxdb
|
train
|
go
|
12a43ef46535db286cf244ca46c860083ee52ac9
|
diff --git a/test/scripts/filters/backtick_code_block.js b/test/scripts/filters/backtick_code_block.js
index <HASH>..<HASH> 100644
--- a/test/scripts/filters/backtick_code_block.js
+++ b/test/scripts/filters/backtick_code_block.js
@@ -1,7 +1,6 @@
'use strict';
const util = require('hexo-util');
-const cloneDeep = require('lodash/cloneDeep');
const defaultConfig = require('../../../lib/hexo/default_config');
describe('Backtick code block', () => {
@@ -23,7 +22,7 @@ describe('Backtick code block', () => {
beforeEach(() => {
// Reset config
- hexo.config.highlight = cloneDeep(defaultConfig.highlight);
+ hexo.config.highlight = Object.assign({}, defaultConfig.highlight);
});
it('disabled', () => {
|
refactor(backtick_code): replace cloneDeep with Object.assign()
|
hexojs_hexo
|
train
|
js
|
d1790d5547f82efffa1c7f1699b9ec23c8efb579
|
diff --git a/src/foremast/app/__main__.py b/src/foremast/app/__main__.py
index <HASH>..<HASH> 100644
--- a/src/foremast/app/__main__.py
+++ b/src/foremast/app/__main__.py
@@ -23,7 +23,7 @@ import pathlib
import gogoutils
-from ..args import add_app, add_debug, add_properties
+from ..args import add_app, add_debug, add_properties, add_provider
from ..consts import APP_FORMATS, LOGGING_FORMAT
from ..plugin_manager import PluginManager
from ..utils import get_properties
@@ -36,6 +36,7 @@ def main():
add_debug(parser)
add_app(parser)
add_properties(parser)
+ add_provider(parser)
parser.add_argument(
'--email', help='Email address to associate with application', default='PS-DevOpsTooling@example.com')
parser.add_argument('--project', help='Git project to associate with application', default='None')
@@ -57,7 +58,7 @@ def main():
repo = args.repo
path = pathlib.Path(__file__)
- manager = PluginManager(str(path.parent), 'aws')
+ manager = PluginManager(str(path.parent), args.provider)
plugin = manager.load()
app_properties = get_properties(args.properties, 'pipeline')
|
refactor: Use provider argument when creating app
|
foremast_foremast
|
train
|
py
|
be92f06798072c9b2f9cc1969048e99444f28443
|
diff --git a/src/cli.test.js b/src/cli.test.js
index <HASH>..<HASH> 100644
--- a/src/cli.test.js
+++ b/src/cli.test.js
@@ -45,7 +45,7 @@ test("errors when more than one package is provided", t => {
// We should be able to do t.equal(code, 1), but earlier Node versions
// handle uncaught exceptions differently so we can't (0.10 returns 8,
// 0.12 returns 9).
- t.notEqual(code, 0);
+ t.notEqual(code, 0, `errored, exit code was ${code}`);
t.end();
});
});
@@ -53,7 +53,7 @@ test("errors when more than one package is provided", t => {
test("errors when no arguments are provided", t => {
const cli = spawnCli();
cli.on("exit", code => {
- t.notEqual(code, 0);
+ t.notEqual(code, 0, `errored, exit code was ${code}`);
t.end();
});
});
@@ -61,7 +61,7 @@ test("errors when no arguments are provided", t => {
test("errors when the package name argument is formatted incorrectly", t => {
const cli = spawnCli("heyhe#@&*()");
cli.on("exit", code => {
- t.notEqual(code, 0);
+ t.notEqual(code, 0, `errored, exit code was ${code}`);
t.end();
});
});
|
test: add custom test message to show exit code in cli.test.js
|
nathanhleung_install-peerdeps
|
train
|
js
|
8eb2fd78769d0d61adb5ad0f078539e7d7fdb425
|
diff --git a/test/spec/bindings/bindings_parser_spec.js b/test/spec/bindings/bindings_parser_spec.js
index <HASH>..<HASH> 100644
--- a/test/spec/bindings/bindings_parser_spec.js
+++ b/test/spec/bindings/bindings_parser_spec.js
@@ -27,7 +27,7 @@ describe('Bindings parser', () => {
it('should parse inner content and keep node empty if property value is not given', () => {
const node = parse('<span>{{x}}</span>');
const obj = {};
-
+
parseBindings(obj, node, noDebounceFlag);
expect(node.textContent).toEqual('');
});
|
chore: Fix linting errors
|
matreshkajs_matreshka
|
train
|
js
|
bfc62c5f91433c5252a0a2d580f19d2b9d534756
|
diff --git a/aws/resource_aws_macie2_custom_data_identifier.go b/aws/resource_aws_macie2_custom_data_identifier.go
index <HASH>..<HASH> 100644
--- a/aws/resource_aws_macie2_custom_data_identifier.go
+++ b/aws/resource_aws_macie2_custom_data_identifier.go
@@ -192,7 +192,8 @@ func resourceMacie2CustomDataIdentifierDelete(ctx context.Context, d *schema.Res
_, err := conn.DeleteCustomDataIdentifierWithContext(ctx, input)
if err != nil {
- if tfawserr.ErrCodeEquals(err, macie2.ErrorCodeInternalError) {
+ if tfawserr.ErrCodeEquals(err, macie2.ErrCodeResourceNotFoundException) ||
+ tfawserr.ErrMessageContains(err, macie2.ErrCodeAccessDeniedException, "Macie is not enabled") {
return nil
}
return diag.FromErr(fmt.Errorf("error deleting Macie CustomDataIdentifier (%s): %w", d.Id(), err))
|
refactor: changed the validation in delete function
|
terraform-providers_terraform-provider-aws
|
train
|
go
|
654379cc9dc283cf347695fdf326c9b0e8b3f175
|
diff --git a/lib/evalhook/tree_processor.rb b/lib/evalhook/tree_processor.rb
index <HASH>..<HASH> 100644
--- a/lib/evalhook/tree_processor.rb
+++ b/lib/evalhook/tree_processor.rb
@@ -45,7 +45,15 @@ module EvalHook
end
def hook_handler_reference
- s(:call, s(:const, :ObjectSpace), :_id2ref, s(:arglist, s(:lit, @hook_handler.object_id)))
+ # create a global_variable name
+ unless @hh_ref_tree
+ global_variable_name = "$hook_handler_" + rand(10000000000).to_s
+ eval("#{global_variable_name} = @hook_handler")
+
+ @hh_ref_tree = s(:gvar, global_variable_name.to_sym)
+ end
+
+ @hh_ref_tree
end
def process_gasgn(tree)
|
refactor: using global variable for "harcoded" hook_handler reference instead of _id2ref
|
tario_evalhook
|
train
|
rb
|
ac5df7061ee11232346b3d0eb3aa5b43eebc847d
|
diff --git a/smmap/__init__.py b/smmap/__init__.py
index <HASH>..<HASH> 100644
--- a/smmap/__init__.py
+++ b/smmap/__init__.py
@@ -3,7 +3,7 @@
__author__ = "Sebastian Thiel"
__contact__ = "byronimo@gmail.com"
__homepage__ = "https://github.com/Byron/smmap"
-version_info = (0, 9, 0)
+version_info = (2, 0, 0)
__version__ = '.'.join(str(i) for i in version_info)
# make everything available in root package for convenience
|
chore(version): set version to <I>
Just to match the name a bit better.
[skip ci]
|
gitpython-developers_smmap
|
train
|
py
|
103f5590745280c2144ab2633bfb7b50a56feb19
|
diff --git a/src/components/alert/QAlert.js b/src/components/alert/QAlert.js
index <HASH>..<HASH> 100644
--- a/src/components/alert/QAlert.js
+++ b/src/components/alert/QAlert.js
@@ -54,7 +54,7 @@ export default {
'class': this.classes
}, [
side.length
- ? h('div', { staticClass: 'q-alert-side row col-auto flex-center' }, side)
+ ? h('div', { staticClass: 'q-alert-side col-auto row flex-center' }, side)
: null,
h('div', {
staticClass: 'q-alert-content col self-center'
@@ -64,7 +64,7 @@ export default {
]),
this.actions && this.actions.length
? h('div', {
- staticClass: 'q-alert-actions col-auto gutter-xs'
+ staticClass: 'q-alert-actions col-auto gutter-xs column flex-center'
},
this.actions.map(action =>
h('div', [
|
chore: Updates for QAlert
|
quasarframework_quasar
|
train
|
js
|
960eb64dd5878d4cf2316f0d86e3d63a42ea6336
|
diff --git a/components/AppContainer.js b/components/AppContainer.js
index <HASH>..<HASH> 100644
--- a/components/AppContainer.js
+++ b/components/AppContainer.js
@@ -1,7 +1,7 @@
import {hot} from 'react-hot-loader/root';
import React from 'react';
import App from "./App";
-import configs from 'data/configs/app';
+import configs from 'storage/configs/app';
import theme from '@miaoxing/style/theme-preset';
const AppContainer = () => {
|
refactor: data => storage,兼容 laravel 的目录结构
|
miaoxing_app
|
train
|
js
|
e7fffd8bc60e8101d2a2c209be9bc26f3531ee6f
|
diff --git a/packages/node_modules/@ciscospark/plugin-phone/test/integration/spec/events-model.js b/packages/node_modules/@ciscospark/plugin-phone/test/integration/spec/events-model.js
index <HASH>..<HASH> 100644
--- a/packages/node_modules/@ciscospark/plugin-phone/test/integration/spec/events-model.js
+++ b/packages/node_modules/@ciscospark/plugin-phone/test/integration/spec/events-model.js
@@ -673,17 +673,7 @@ browserOnly(describe)('plugin-phone', function () {
rs7: null,
rs8: null,
rs9: null,
- rs10: null,
- rs11: null,
- rs12: null,
- rs13: null,
- rs14: null,
- rs15: null,
- rs16: null,
- rs17: null,
- rs18: null,
- rs19: null,
- rs20: null
+ rs10: null
};
setup(users, (r) => {
|
test(plugin-phone): reduce the # of test users
Integration environment removes notifications for spaces bigger than <I>.
|
webex_spark-js-sdk
|
train
|
js
|
0467fa7d24391157ab28d6ba61a14b1a61095c72
|
diff --git a/lib/core/public/cleanup-plugins.js b/lib/core/public/cleanup-plugins.js
index <HASH>..<HASH> 100644
--- a/lib/core/public/cleanup-plugins.js
+++ b/lib/core/public/cleanup-plugins.js
@@ -23,7 +23,7 @@ function cleanupPlugins(resolve, reject) {
});
});
- var flattenedTree = axe.utils.getFlattenedTree(document.body)
+ var flattenedTree = axe.utils.getFlattenedTree(document.body);
axe.utils.querySelectorAll(flattenedTree, 'iframe, frame').forEach(function (node) {
q.defer(function (res, rej) {
|
chore: Fix lint problem in cleanup-plugin
|
dequelabs_axe-core
|
train
|
js
|
b14419701b8b8d837a6846662943bb3f6686d9cc
|
diff --git a/framework/views/lazyRepeat.js b/framework/views/lazyRepeat.js
index <HASH>..<HASH> 100644
--- a/framework/views/lazyRepeat.js
+++ b/framework/views/lazyRepeat.js
@@ -53,7 +53,6 @@ limitations under the License.
if (typeof oldReload === 'function') {
userDelegate.reload = function() {
- console.log("HI");
oldReload();
provider._onChange();
}.bind(this);
|
fix(ons-lazy-repeat): Remove debug print.
|
OnsenUI_OnsenUI
|
train
|
js
|
d3a014766d55d71406069a257066274b1c1f18c8
|
diff --git a/src/Cursor.js b/src/Cursor.js
index <HASH>..<HASH> 100644
--- a/src/Cursor.js
+++ b/src/Cursor.js
@@ -1,6 +1,5 @@
var createClass = require('./functions/createClass');
-var evalObjectPath = require('./functions/evalObjectPath');
var compareArrays = require('./functions/compareArrays');
var arrayConcat = require('./functions/arrayConcat');
var imset = require('./functions/imset');
@@ -23,7 +22,6 @@ var Cursor = createClass(
get: function()
{
- // return evalObjectPath(this.keyPath, this.root);
return this.getInPath(this.keyPath);
},
|
chore(Cursor): remove commented code
|
karfcz_kff
|
train
|
js
|
f1e99dcc70026ab6e52391078588ef28cf484ca8
|
diff --git a/packages/cozy-client/src/CozyClient.js b/packages/cozy-client/src/CozyClient.js
index <HASH>..<HASH> 100644
--- a/packages/cozy-client/src/CozyClient.js
+++ b/packages/cozy-client/src/CozyClient.js
@@ -18,6 +18,19 @@ import {
import { chain } from './CozyLink'
import ObservableQuery from './ObservableQuery'
+const associationsFromModel = model => {
+ const relationships = model.relationships
+ return !relationships
+ ? []
+ : Object.keys(relationships).map(name => {
+ const { type, doctype } = relationships[name]
+ return {
+ name,
+ type,
+ doctype
+ }
+ })
+}
const findModelByDoctype = (schema, doctype) => {
return Object.values(schema).find(m => m.doctype === doctype)
@@ -376,16 +389,7 @@ export default class CozyClient {
if (!model) {
throw new Error(`No schema found for '${doctype}' doctype`)
}
- const associations = !model.relationships
- ? []
- : Object.keys(model.relationships).map(name => {
- const { type, doctype } = model.relationships[name]
- return {
- name,
- type,
- doctype
- }
- })
+ const associations = associationsFromModel(model)
return {
...model,
associations
|
refactor(associations): extract associationsFromModel
|
cozy_cozy-client
|
train
|
js
|
84381fed0152af6feec3c42c791c7d46c83408ba
|
diff --git a/Jakefile.js b/Jakefile.js
index <HASH>..<HASH> 100644
--- a/Jakefile.js
+++ b/Jakefile.js
@@ -159,7 +159,7 @@ task('html-docs', ['build-rimu-min'], {async: true}, function() {
desc(`Validate HTML documents.`)
task('validate-html', {async: true}, function() {
- let commands = HTML.map(file => 'nu-html-checker --formatter json ' + file)
+ let commands = HTML.map(file => 'nu-html-checker --formatter stylish ' + file)
exec(commands, complete)
})
|
chore: Jakefile: nu-html-checker formatter back to `stylish` as is now working again.
|
srackham_rimu
|
train
|
js
|
5449044919b8440c1129d9cbf1ec650f4f5a993d
|
diff --git a/packages/ipfs/src/cli/commands/key.js b/packages/ipfs/src/cli/commands/key.js
index <HASH>..<HASH> 100644
--- a/packages/ipfs/src/cli/commands/key.js
+++ b/packages/ipfs/src/cli/commands/key.js
@@ -1,7 +1,7 @@
'use strict'
module.exports = {
- command: 'key',
+ command: 'key <command>',
description: 'Manage your keys',
diff --git a/packages/ipfs/src/cli/commands/pin.js b/packages/ipfs/src/cli/commands/pin.js
index <HASH>..<HASH> 100644
--- a/packages/ipfs/src/cli/commands/pin.js
+++ b/packages/ipfs/src/cli/commands/pin.js
@@ -1,7 +1,7 @@
'use strict'
module.exports = {
- command: 'pin',
+ command: 'pin <command>',
description: 'Pin and unpin objects to local storage.',
|
fix: require command for key and pin subcommands (#<I>)
Without specifying that we require a sub-sub command, these commands
exit with a non-zero code and no output when you just run the subcommand
E.g:
```console
$ jsipfs key
$ echo $?
0
```
Now becomes
```console
$ jsipfs key
....help text appears here
$ echo $?
1
```
|
ipfs_js-ipfs
|
train
|
js,js
|
5b12a74a539c54210b89009a75a5bee432dfb3ba
|
diff --git a/index.js b/index.js
index <HASH>..<HASH> 100644
--- a/index.js
+++ b/index.js
@@ -92,8 +92,9 @@ class kmsSecretsPlugin {
.then((inited) => {
myModule.serverless.environment = inited.environment;
const vars = new myModule.serverless.classes.Variables(myModule.serverless);
- vars.populateService(this.options);
-
+ return vars.populateService(this.options).then(() => inited);
+ })
+ .then((inited) => {
const moduleConfig = inited.custom['serverless-kms-secrets'] || {};
const region = this.options.region || inited.provider.region;
@@ -153,8 +154,9 @@ class kmsSecretsPlugin {
.then((inited) => {
myModule.serverless.environment = inited.environment;
const vars = new myModule.serverless.classes.Variables(myModule.serverless);
- vars.populateService(this.options);
-
+ return vars.populateService(this.options).then(() => inited);
+ })
+ .then((inited) => {
const moduleConfig = inited.custom['serverless-kms-secrets'] || {};
const stage = this.options.stage || inited.provider.stage;
|
fix: Waiting for populateService to finish before continuing operation
|
nordcloud_serverless-kms-secrets
|
train
|
js
|
9089cc4773db69f71b284d24f75d5db12eac1be2
|
diff --git a/src/cdumay_error/__init__.py b/src/cdumay_error/__init__.py
index <HASH>..<HASH> 100644
--- a/src/cdumay_error/__init__.py
+++ b/src/cdumay_error/__init__.py
@@ -19,6 +19,7 @@ class Error(Exception):
"""Mother class for all errors"""
MSGID = "Err-00000"
CODE = 1
+ MESSAGE = None
def __init__(self,
message: Optional[str] = None,
@@ -28,7 +29,7 @@ class Error(Exception):
name: Optional[str] = None,
code: Optional[int] = None,
**kwargs):
- self.message = message if message else self.__doc__
+ self.message = message or self.MESSAGE or self.__doc__
Exception.__init__(self, code, self.message)
self.code = code or self.CODE
self.extra = extra or kwargs
|
feat: added Error.MESSAGE to allow to overwrite class docstring (useful for translation)
|
cdumay_cdumay-error
|
train
|
py
|
16059adf98f46c7f62f24d78aa68b62a1d34815d
|
diff --git a/src/react/params-list.js b/src/react/params-list.js
index <HASH>..<HASH> 100644
--- a/src/react/params-list.js
+++ b/src/react/params-list.js
@@ -96,7 +96,7 @@ const paramsList = [
// modules
'a11y',
- 'autoplay',
+ '_autoplay',
'_controller',
'coverflowEffect',
'cubeEffect',
|
fix(react): add autoplay to watched modules (#<I>)
|
nolimits4web_swiper
|
train
|
js
|
64b1c534b6507c11e35574dc1224d76986110f62
|
diff --git a/packages/d3fc-data-join/src/dataJoin.js b/packages/d3fc-data-join/src/dataJoin.js
index <HASH>..<HASH> 100644
--- a/packages/d3fc-data-join/src/dataJoin.js
+++ b/packages/d3fc-data-join/src/dataJoin.js
@@ -23,7 +23,10 @@ export default (element, className) => {
const dataJoin = function(container, data) {
data = data || ((d) => d);
- const selected = container.selectAll((d, i, nodes) => nodes[i].childNodes)
+ const selected = container.selectAll((d, i, nodes) =>
+ Array.from(nodes[i].childNodes)
+ .filter(node => node.nodeType === 1)
+ )
.filter(className == null ? element : `${element}.${className}`);
let update = selected.data(data, key);
|
fix: post-filter childNodes to prevent inevitable bug (#<I>)
|
d3fc_d3fc
|
train
|
js
|
ac78c24806e030ddd3551859a8b74929e88449ca
|
diff --git a/website/gatsby-config.js b/website/gatsby-config.js
index <HASH>..<HASH> 100644
--- a/website/gatsby-config.js
+++ b/website/gatsby-config.js
@@ -10,6 +10,7 @@ module.exports = {
description: 'Transforms SVG into React Components.',
siteUrl: 'https://react-svgr.com',
githubRepositoryURL: 'https://github.com/gregberge/svgr',
+ githubDefaultBranch: 'main',
baseDirectory: path.resolve(__dirname, '..'),
navItems: [
{ title: 'Playground', url: '/playground/' },
|
docs: fix edit in GitHub links (#<I>)
Fix #<I>
|
smooth-code_svgr
|
train
|
js
|
a477f69f3c2abaf4646680bdc3a65d5172a6566e
|
diff --git a/benchmark_test.go b/benchmark_test.go
index <HASH>..<HASH> 100644
--- a/benchmark_test.go
+++ b/benchmark_test.go
@@ -314,7 +314,7 @@ func BenchmarkExecContext(b *testing.B) {
defer db.Close()
for _, p := range []int{1, 2, 3, 4} {
b.Run(fmt.Sprintf("%d", p), func(b *testing.B) {
- benchmarkQueryContext(b, db, p)
+ benchmarkExecContext(b, db, p)
})
}
}
|
fix: benchmarkExecContext is unused (#<I>)
|
go-sql-driver_mysql
|
train
|
go
|
8533fbbb8a9e7cf906a68b902f81da95b1bba9cb
|
diff --git a/test/integration/features/step_definitions/npm-steps.js b/test/integration/features/step_definitions/npm-steps.js
index <HASH>..<HASH> 100644
--- a/test/integration/features/step_definitions/npm-steps.js
+++ b/test/integration/features/step_definitions/npm-steps.js
@@ -49,7 +49,7 @@ export async function assertThatPackageDetailsAreConfiguredCorrectlyFor({
}
if ('cli' === projectType) {
- assert.equal(packageDetails.name, 'Private' === visibility ? `@${npmAccount}/${projectName}` : projectName);
+ assert.equal(packageDetails.name, `@${npmAccount}/${projectName}`);
assert.equal(packageDetails.version, '0.0.0-semantically-released');
assert.deepEqual(packageDetails.bin, {});
assert.deepEqual(packageDetails.files, ['bin/']);
|
test(package-name): fixed the test for cli projects
|
travi_javascript-scaffolder
|
train
|
js
|
f81c79d676989d772a8cb15916969d6eb029a332
|
diff --git a/charm/repo_test.go b/charm/repo_test.go
index <HASH>..<HASH> 100644
--- a/charm/repo_test.go
+++ b/charm/repo_test.go
@@ -28,6 +28,8 @@ var _ = gc.Suite(&StoreSuite{})
func (s *StoreSuite) SetUpSuite(c *gc.C) {
s.LoggingSuite.SetUpSuite(c)
+ s.PatchEnvironment("http-proxy", "")
+ s.PatchEnvironment("http-proxys", "")
s.server = charmtesting.NewMockStore(c, map[string]int{
"cs:series/good": 23,
"cs:series/unwise": 23,
|
fix: charm: gccgo test failure
When network is down, http-proxy returns an
error in html format, hence the leading '<'.
Isolate test by patching the http proxy
environment variables.
|
juju_juju
|
train
|
go
|
bce30a77c273d3dc2d4c5ed424da890fe7c67d87
|
diff --git a/src/index.js b/src/index.js
index <HASH>..<HASH> 100644
--- a/src/index.js
+++ b/src/index.js
@@ -37,9 +37,10 @@ export default function parse(buffer, callback = () => {}) {
}
function exec(mediaPath, callback = () => {}) {
- childProcess.exec(`mediainfo --Full --Output=XML "${mediaPath}"`, (stderr, stdout) => {
- parse(stdout, callback);
- });
+ const mediainfo = childProcess.spawn('mediainfo', ['--Full', '--Output=XML', mediaPath]);
+ let output = '';
+ mediainfo.stdout.on('data', (data) => { output += data.toString('utf8'); });
+ mediainfo.on('close', () => parse(output, callback));
}
export {parse, exec};
|
fix(exec): move to spawn to support bigger xml input
|
mgcrea_node-mediainfo-parser
|
train
|
js
|
d83f6e3d807261e278d138cd02324541049b4396
|
diff --git a/config/app_queue.php b/config/app_queue.php
index <HASH>..<HASH> 100644
--- a/config/app_queue.php
+++ b/config/app_queue.php
@@ -14,10 +14,8 @@
*/
$connection = 'default';
-$exitwhennothingtodo = true;
if (php_sapi_name() == 'cli' && $_SERVER['argv'][0] && preg_match('/phpunit/', $_SERVER['argv'][0])) {
$connection = 'test';
- $exitwhennothingtodo = true;
}
return [
@@ -26,8 +24,10 @@ return [
'defaultworkerretries' => 2,
'workermaxruntime' => 180,
'sleeptime' => 20,
+ 'cleanuptimeout' => 2592000, // 30 days
+ 'gcprob' => 100,
'connection' => $connection,
- 'exitwhennothingtodo' => $exitwhennothingtodo,
+ 'exitwhennothingtodo' => true,
],
];
|
chore: queues are now deleted if older than <I> days
|
foodcoopshop_foodcoopshop
|
train
|
php
|
b6b6d83d65fa84fc7db7cd2d84e1246960a6cc27
|
diff --git a/lib/cli.js b/lib/cli.js
index <HASH>..<HASH> 100644
--- a/lib/cli.js
+++ b/lib/cli.js
@@ -70,13 +70,17 @@ var Pane = require('./ui/Pane');
module.exports = function (options) {
opts = _.merge(opts, options);
return Slap.getUserDir().catch(Promise.resolve()).then(function (userDir) {
- var loggerOpts = _.merge(userDir ? {file: path.resolve(userDir, package.name+'.log')} : {}, opts.logger);
- opts = _.merge(opts, {logger: loggerOpts, editor: {logger: loggerOpts}});
+ if (userDir) opts = _.merge({logger: {file: path.resolve(userDir, package.name+'.log')}}, opts);
+ opts = _.merge({
+ editor: {logger: opts.logger},
+ screenOpts: {logger: opts.logger}
+ }, opts);
util.logger(opts.logger);
util.logger.info("loading...");
util.logger.verbose("configuration:", opts);
- var slap = new Slap(_.merge(opts, {screen: new blessed.Screen()}));
+ opts.screen = new blessed.Screen(opts.screenOpts);
+ var slap = new Slap(opts);
Promise.all(opts._.map(function (path, i) {
return slap.open(path.toString(), !i);
|
fix(logging): pass screen opts
|
slap-editor_slap
|
train
|
js
|
3179434000a6dca5ac864a0f43636abb79c7c020
|
diff --git a/packages/midway-init/bin/midway-init.js b/packages/midway-init/bin/midway-init.js
index <HASH>..<HASH> 100755
--- a/packages/midway-init/bin/midway-init.js
+++ b/packages/midway-init/bin/midway-init.js
@@ -40,7 +40,10 @@ co(function* () {
// 判断是否处于内网环境
function isInternal() {
try {
- const { stdout } = childProcess.spawnSync('tnpm', [ 'view', '@ali/midway-init', '--json' ]);
+ const { stdout } = childProcess.spawnSync('tnpm', [ 'view', '@ali/midway-init', '--json'], {
+ timeout: 3000
+ });
+
const npmData = JSON.parse(stdout.toString(), null, 2);
if (npmData.name === '@ali/midway-init') {
|
fix(midway-init): Internal employees can not use the external network midway
|
midwayjs_midway
|
train
|
js
|
3dbde654cd4fefdfd3660f6043b4bbf345801db9
|
diff --git a/packages/server/test/e2e/5_screenshots_spec.js b/packages/server/test/e2e/5_screenshots_spec.js
index <HASH>..<HASH> 100644
--- a/packages/server/test/e2e/5_screenshots_spec.js
+++ b/packages/server/test/e2e/5_screenshots_spec.js
@@ -99,8 +99,8 @@ describe('e2e screenshots', () => {
// make sure all of the values are unique
expect(sizes).to.deep.eq(_.uniq(sizes))
- // png1 should not be within 5k of png2
- expect(sizes[0]).not.to.be.closeTo(sizes[1], 5000)
+ // png1 should not be within 3k of png2
+ expect(sizes[0]).not.to.be.closeTo(sizes[1], 3000)
}).then(() => {
return Promise.all([
sizeOf(screenshot1),
|
chore(tests): [internal] fix flake e2e screenshot spec (firefox) (#<I>)
|
cypress-io_cypress
|
train
|
js
|
8b9d1603acecea1d654ac121c04772401906fc33
|
diff --git a/consul/server_test.go b/consul/server_test.go
index <HASH>..<HASH> 100644
--- a/consul/server_test.go
+++ b/consul/server_test.go
@@ -2,10 +2,10 @@ package consul
import (
"fmt"
+ "math/rand"
"net"
"os"
"strings"
- "sync/atomic"
"testing"
"time"
@@ -17,10 +17,8 @@ import (
"github.com/hashicorp/go-uuid"
)
-var nextPort int32 = 15000
-
func getPort() int {
- return int(atomic.AddInt32(&nextPort, 1))
+ return 1030 + int(rand.Int31n(64400))
}
func configureTLS(config *Config) {
|
test: use random ports for consul tests
|
hashicorp_consul
|
train
|
go
|
9a066fedb548dc5e4f1d408ccca0c6dcd200a793
|
diff --git a/core/src/elements/ons-switch.js b/core/src/elements/ons-switch.js
index <HASH>..<HASH> 100755
--- a/core/src/elements/ons-switch.js
+++ b/core/src/elements/ons-switch.js
@@ -113,6 +113,7 @@ export default class SwitchElement extends BaseCheckboxElement {
_onChange(event) {
if (event && event.stopPropagation) {
event.stopPropagation();
+ event.gesture.stopPropagation();
}
this._emitChangeEvent();
@@ -137,7 +138,7 @@ export default class SwitchElement extends BaseCheckboxElement {
return;
}
- e.stopPropagation();
+ e.consumed = true;
ModifierUtil.addModifier(this, 'active');
this._startX = this._locations[this.checked ? 1 : 0];// - e.gesture.deltaX;
@@ -147,7 +148,9 @@ export default class SwitchElement extends BaseCheckboxElement {
}
_onDrag(e) {
- e.gesture.srcEvent.preventDefault();
+ e.stopPropagation();
+ e.gesture.preventDefault();
+ event.gesture.stopPropagation();
this._handle.style.left = this._getPosition(e) + 'px';
}
|
fix(ons-switch): Implement consume-gesture API.
|
OnsenUI_OnsenUI
|
train
|
js
|
9dde5ab2ef5b978126688e3ae5ff4bb4088fbabb
|
diff --git a/src/foremast/utils/tasks.py b/src/foremast/utils/tasks.py
index <HASH>..<HASH> 100644
--- a/src/foremast/utils/tasks.py
+++ b/src/foremast/utils/tasks.py
@@ -13,6 +13,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
"""POST a new task or check status of running task."""
+import copy
import json
import logging
from functools import partial
@@ -75,8 +76,11 @@ def _check_task(taskid):
LOG.info('Checking taskid %s', taskid)
+ headers = copy.copy(HEADERS)
+ headers.pop('content-type')
+
url = '{}/tasks/{}'.format(API_URL, taskid)
- task_response = requests.get(url, headers=HEADERS, verify=GATE_CA_BUNDLE, cert=GATE_CLIENT_CERT)
+ task_response = requests.get(url, headers=headers, verify=GATE_CA_BUNDLE, cert=GATE_CLIENT_CERT)
LOG.debug(task_response.json())
|
fix: Error when getting task status
Sending the content-type header seems to cause a <I> bad request.
Removing this should not cause a problem as we are doing a GET request.
|
foremast_foremast
|
train
|
py
|
42b9da77f8278deee71b3cb32742ec08e5dedb28
|
diff --git a/root_numpy/tmva/_factory.py b/root_numpy/tmva/_factory.py
index <HASH>..<HASH> 100644
--- a/root_numpy/tmva/_factory.py
+++ b/root_numpy/tmva/_factory.py
@@ -37,8 +37,19 @@ def add_classification_events(factory, events, labels, signal_label=None,
Notes
-----
- A TMVA::Factory requires you to add both training and test events even if
- you don't intend to call ``TestAllMethods()``.
+ * A TMVA::Factory requires you to add both training and test events even if
+ you don't intend to call ``TestAllMethods()``.
+
+ * When using MethodCuts, the first event added must be a signal event,
+ otherwise TMVA will fail with ``<FATAL> Interval : maximum lower than
+ minimum``. To place a signal event first::
+
+ # Get index of first signal event
+ first_signal = np.nonzero(labels == signal_label)[0][0]
+ # Swap this with first event
+ events[0], events[first_signal] = events[first_signal].copy(), events[0].copy()
+ labels[0], labels[first_signal] = labels[first_signal], labels[0]
+ weights[0], weights[first_signal] = weights[first_signal], weights[0]
"""
if not isinstance(factory, TMVA.Factory):
|
docs: note about MethodCuts requiring signal to be added first
|
scikit-hep_root_numpy
|
train
|
py
|
6348f9736521cc67e93d0e9aaa927103afa366e1
|
diff --git a/src/utils/buildTaggedTemplate.js b/src/utils/buildTaggedTemplate.js
index <HASH>..<HASH> 100644
--- a/src/utils/buildTaggedTemplate.js
+++ b/src/utils/buildTaggedTemplate.js
@@ -14,7 +14,7 @@ const rUnit = new RegExp(`^(${cssUnits.join('|')})(;|,|\n| |\\))`);
function defaultResolveDependency({ request }, localStyle) {
const source = resolve.sync(request, {
- baseDir: dirname(localStyle.absoluteFilePath),
+ basedir: dirname(localStyle.absoluteFilePath),
});
return { source };
|
fix: pass correct object to resolve (#<I>)
|
4Catalyzer_astroturf
|
train
|
js
|
15b5a11ecd7cf4b83442ca0df161d74c9bdbc8e2
|
diff --git a/lib/classes/PluginManager.js b/lib/classes/PluginManager.js
index <HASH>..<HASH> 100644
--- a/lib/classes/PluginManager.js
+++ b/lib/classes/PluginManager.js
@@ -510,7 +510,7 @@ class PluginManager {
return _.flatMap([].concat(events), (event) => this.hooks[event] || []);
}
- invoke(commandsArray, allowEntryPoints) {
+ async invoke(commandsArray, allowEntryPoints) {
const command = this.getCommand(commandsArray, allowEntryPoints);
this.convertShortcutsIntoOptions(command);
@@ -529,15 +529,19 @@ class PluginManager {
}
}
- return BbPromise.reduce(hooks, (__, hook) => hook.hook(), null).catch(
- TerminateHookChain,
- () => {
- if (process.env.SLS_DEBUG) {
- this.serverless.cli.log(`Terminate ${commandsArray.join(':')}`);
+ for (const hook of hooks) {
+ try {
+ await hook.hook();
+ } catch (error) {
+ if (error instanceof TerminateHookChain) {
+ if (process.env.SLS_DEBUG) {
+ this.serverless.cli.log(`Terminate ${commandsArray.join(':')}`);
+ }
+ return;
}
- return BbPromise.resolve();
+ throw error;
}
- );
+ }
}
/**
|
refactor: Refactor `pluginManager.invoke` to async/await
|
serverless_serverless
|
train
|
js
|
98d5dde9b2c8414fae5498ff9657bae82df2aede
|
diff --git a/lnd_test.go b/lnd_test.go
index <HASH>..<HASH> 100644
--- a/lnd_test.go
+++ b/lnd_test.go
@@ -353,7 +353,7 @@ func testChannelFundingPersistence(net *networkHarness, t *harnessTest) {
// The following block ensures that after both nodes have restarted,
// they have reconnected before the execution of the next test.
- peersTimeout := time.After(5 * time.Second)
+ peersTimeout := time.After(15 * time.Second)
checkPeersTick := time.NewTicker(100 * time.Millisecond)
defer checkPeersTick.Stop()
peersPoll:
|
test: expand timeout for peer restart+reconnect in persistent funding test
|
lightningnetwork_lnd
|
train
|
go
|
fa6b1ff613221f98f134773cbc5152092a51e285
|
diff --git a/src/clappr-dash-shaka-playback.js b/src/clappr-dash-shaka-playback.js
index <HASH>..<HASH> 100644
--- a/src/clappr-dash-shaka-playback.js
+++ b/src/clappr-dash-shaka-playback.js
@@ -59,8 +59,6 @@ class DashShakaPlayback extends HTML5Video {
this._levels = []
this._pendingAdaptationEvent = false
this._isShakaReadyState = false
-
- this.options.autoPlay && this.play()
}
play () {
@@ -78,8 +76,8 @@ class DashShakaPlayback extends HTML5Video {
super.play()
}
- // skipping setup `setupSrc` on tag video
- setupSrc () {}
+ // skipping HTML5Video `_setupSrc` (on tag video)
+ _setupSrc () {}
// skipping ready event on video tag in favor of ready on shaka
_ready () {
|
fix: rename setupSrc to _setupSrc and remove duplicated autoplay handling code
|
clappr_dash-shaka-playback
|
train
|
js
|
de6254a314a5dc2fbeba5ab6e9913a76b6562518
|
diff --git a/packages/xod-client-electron/src/arduinoDependencies/messages.js b/packages/xod-client-electron/src/arduinoDependencies/messages.js
index <HASH>..<HASH> 100644
--- a/packages/xod-client-electron/src/arduinoDependencies/messages.js
+++ b/packages/xod-client-electron/src/arduinoDependencies/messages.js
@@ -3,14 +3,18 @@ const librariesMissing = libraryNames =>
? `You have to install these libraries first: ${libraryNames}`
: null;
const librariesInstalled = libraryNames =>
- libraryNames.length ? `Libraries ${libraryNames} installed` : null;
+ libraryNames.length
+ ? `Libraries ${libraryNames} installed successfully`
+ : null;
const packagesMissing = packageNames =>
packageNames.length
? `You have to install these packages first: ${packageNames}`
: null;
const packagesInstalled = packageNames =>
- packageNames.length ? `Packages ${packageNames} installed` : null;
+ packageNames.length
+ ? `Package "${packageNames}" installed successfully`
+ : null;
export default {
ARDUINO_DEPENDENCIES_MISSING: ({
@@ -31,6 +35,7 @@ export default {
note: [librariesInstalled(libraryNames), packagesInstalled(packageNames)]
.filter(a => !!a)
.join('\r\n'),
+ solution: 'Now you are able to upload the program',
persistent: true,
}),
};
|
chore(xod-client-electron): change messages about successful installation of arduino dependencies
|
xodio_xod
|
train
|
js
|
b5c083e492b37063170f74a43df7ee6550f45764
|
diff --git a/test/k8sT/DatapathConfiguration.go b/test/k8sT/DatapathConfiguration.go
index <HASH>..<HASH> 100644
--- a/test/k8sT/DatapathConfiguration.go
+++ b/test/k8sT/DatapathConfiguration.go
@@ -281,6 +281,7 @@ var _ = Describe("K8sDatapathConfig", func() {
deployCilium(append(directRoutingOptions,
"--set global.endpointRoutes.enabled=true",
+ "--set global.ipv6.enabled=false",
))
Expect(testPodConnectivityAcrossNodes(kubectl)).Should(BeTrue(), "Connectivity test between nodes failed")
})
|
test: Disable IPv6 for per endpoint routes
It seems that per endpoint routes does not work for IPv6, and kube-proxy
was hiding that fact.
|
cilium_cilium
|
train
|
go
|
deea284237ba46d9490b0407519b2479c71a0161
|
diff --git a/src/FieldArray.js b/src/FieldArray.js
index <HASH>..<HASH> 100644
--- a/src/FieldArray.js
+++ b/src/FieldArray.js
@@ -44,12 +44,12 @@ function filter(errors, baseName) {
* <Form.FieldArray name="friends" events="blur">
* {({ value, arrayHelpers }) => (
* <ul>
- * {value.map((value, idx) => (
+ * {value.map((item, idx) => (
* <li key={idx} >
* <div style={{ display: 'flex', alignItems: 'flex-start' }}>
* <Form.Field name={`friends[${idx}].name`} />
- * <button type="button" onClick={() => arrayHelpers.remove(value)}>-</button>
- * <button type="button" onClick={() => arrayHelpers.insert({ name: undefined }, idx)}>+</button>
+ * <button type="button" onClick={() => arrayHelpers.remove(item)}>-</button>
+ * <button type="button" onClick={() => arrayHelpers.add({ name: undefined }, idx)}>+</button>
* </div>
* <Form.Message for={`friends[${idx}].name`} />
* </li>
|
docs: don't shadow variable and exemplify arrayHelpers.add (#<I>)
`.add` is more intuitive in the UI example and probably
more common.
|
jquense_react-formal
|
train
|
js
|
07ad80fa2cb78cb44b888ad7140c98e6768fc124
|
diff --git a/scripts/chromatic.js b/scripts/chromatic.js
index <HASH>..<HASH> 100644
--- a/scripts/chromatic.js
+++ b/scripts/chromatic.js
@@ -1,6 +1,6 @@
const ci = require('env-ci')();
const chalk = require('chalk');
-const runBin = require('../lib/runBin');
+const { runBin } = require('../lib/runBin');
const { storybookPort } = require('../context');
const skuPath = require.resolve('../bin/sku');
|
fix(chromatic): Fix Chromatic script (#<I>)
|
seek-oss_sku
|
train
|
js
|
e5622f4501c26badb8ec49a18992e855ca63baa3
|
diff --git a/src/request-handlers/dashboard-handler.js b/src/request-handlers/dashboard-handler.js
index <HASH>..<HASH> 100644
--- a/src/request-handlers/dashboard-handler.js
+++ b/src/request-handlers/dashboard-handler.js
@@ -19,8 +19,7 @@
'use strict';
-var psUtil = require('../misc/pagespace-util'),
- consts = require('../app-constants');
+var psUtil = require('../misc/pagespace-util');
/**
*
@@ -58,12 +57,9 @@ DashboardHandler.prototype.init = function(support) {
*/
DashboardHandler.prototype.doRequest = function(req, res, next) {
- var logger = psUtil.getRequestLogger(this.logger, req, 'templates', ++this.reqCount);
+ var logger = psUtil.getRequestLogger(this.logger, req, 'dashboard', ++this.reqCount);
- var reqInfo = consts.requests.DASHBOARD.regex.exec(req.url);
- var reqType = reqInfo[1];
-
- if(!reqType && req.method === 'GET') {
+ if(req.method === 'GET') {
logger.info('New dashboard request');
return this.doDashboard(req, res, next, logger);
} else {
|
refactor: tidy up dashboard handler
|
pagespace_pagespace
|
train
|
js
|
c73275bad688e6156c1013878fab7ec8740521a4
|
diff --git a/src/dav.js b/src/dav.js
index <HASH>..<HASH> 100644
--- a/src/dav.js
+++ b/src/dav.js
@@ -69,6 +69,11 @@ davJS.prototype.needs = function () {
let dav = this;
return {
forType: (needType, region) => {
+ if (!region.global){
+ if (!region.latitude) throw new Error('region latitude is not set');
+ if (!region.longitude) throw new Error('region longitude is not set');
+ if (!region.radius) throw new Error('region radius is not set');
+ }
axios.post(`${dav.missionControlURL}/captains/${dav.davId}`, { need_type: needType, region })
.catch((err) => {
console.error(err);
|
chore: throws error when region isn't global and region params aren't set
|
DAVFoundation_dav-js
|
train
|
js
|
b8b1922b9ba8a6cf4d99d456560d2e4f589f6d75
|
diff --git a/command/agent/job_endpoint_test.go b/command/agent/job_endpoint_test.go
index <HASH>..<HASH> 100644
--- a/command/agent/job_endpoint_test.go
+++ b/command/agent/job_endpoint_test.go
@@ -942,8 +942,7 @@ func TestHTTP_JobDispatch(t *testing.T) {
t.Parallel()
httpTest(t, nil, func(s *TestAgent) {
// Create the parameterized job
- job := mock.Job()
- job.Type = "batch"
+ job := mock.BatchJob()
job.ParameterizedJob = &structs.ParameterizedJobConfig{}
args := structs.JobRegisterRequest{
|
test: fix by using mock.BatchJob
|
hashicorp_nomad
|
train
|
go
|
828c15c966448cbefaf8f5bb6c2316ca29206192
|
diff --git a/test/unit/parser.spec.js b/test/unit/parser.spec.js
index <HASH>..<HASH> 100644
--- a/test/unit/parser.spec.js
+++ b/test/unit/parser.spec.js
@@ -305,7 +305,7 @@ describe('Unit: parser.js', function () {
const stream = { _columnsPositions: [19, 25, 38, 51, 52] }
const r = matchBodyList(stream, '2018-09-29 09:06:15 ....A 9 24 DirHex/42550418a4ef9')
expect(r).to.be.deep.equal({
- datetime: new Date('2018-09-29T07:06:15.000Z'),
+ datetime: new Date(Date.parse('2018-09-29T07:06:15.000Z')),
attributes: '....A',
size: 9,
sizeCompressed: 24,
|
test: Fix failing test due to date construction
|
quentinrossetti_node-7z
|
train
|
js
|
31d1b3d568c05440c881ea3e268918079da839f2
|
diff --git a/source/rafcon/gui/helpers/installation.py b/source/rafcon/gui/helpers/installation.py
index <HASH>..<HASH> 100644
--- a/source/rafcon/gui/helpers/installation.py
+++ b/source/rafcon/gui/helpers/installation.py
@@ -98,7 +98,7 @@ def install_gtk_source_view_styles(logger=None):
user_data_folder = GLib.get_user_data_dir()
else:
user_data_folder = os.path.join(os.path.expanduser('~'), '.local', 'share')
- user_source_view_style_path = os.path.join(user_data_folder, 'gtksourceview-2.0', 'styles')
+ user_source_view_style_path = os.path.join(user_data_folder, 'gtksourceview-3.0', 'styles')
try:
if not os.path.exists(user_source_view_style_path):
|
fix(installation): Copy sourceview style into correct GTK 3 folder
|
DLR-RM_RAFCON
|
train
|
py
|
ab15b2da4495068998850868fe72a324ea8d4433
|
diff --git a/lib/validator.js b/lib/validator.js
index <HASH>..<HASH> 100644
--- a/lib/validator.js
+++ b/lib/validator.js
@@ -251,7 +251,7 @@ function postCast(value, parameterDefinition, validationResult) {
if (validationResult &&
validationResult.errors.length === 0 &&
parameterDefinition.type === 'string' &&
- (parameterDefinition.format === 'date' || parameterDefinition.format === 'datetime')
+ (parameterDefinition.format === 'date' || parameterDefinition.format === 'date-time')
) {
return new Date(value);
} else {
diff --git a/tests/express-date-test-harness.js b/tests/express-date-test-harness.js
index <HASH>..<HASH> 100644
--- a/tests/express-date-test-harness.js
+++ b/tests/express-date-test-harness.js
@@ -34,7 +34,7 @@ describe('date and datetime tests', function () {
in: 'query',
description: 'name',
type: 'string',
- format: 'datetime',
+ format: 'date-time',
required: false
}
],
|
fix: use correct date-time type format
|
DriveTimeInc_gangplank
|
train
|
js,js
|
9e5b7acaf377902e4dc1fa9954414cd38d70f119
|
diff --git a/.toys/batch-review.rb b/.toys/batch-review.rb
index <HASH>..<HASH> 100644
--- a/.toys/batch-review.rb
+++ b/.toys/batch-review.rb
@@ -60,6 +60,7 @@ CONFIGS = {
}
REPO = "googleapis/google-cloud-ruby"
+BOT_USERS = ["yoshi-code-bot", "yoshi-automation"]
desc "Interactive mass code review"
@@ -120,7 +121,8 @@ def find_prs
paged_api("repos/#{REPO}/pulls")
.find_all do |pr_resource|
title_regexp =~ pr_resource["title"] &&
- pr_resource["labels"].all? { |label| label["name"] != "do not merge" }
+ pr_resource["labels"].all? { |label| label["name"] != "do not merge" } &&
+ BOT_USERS.include?(pr_resource["user"]["login"])
end
.map { |pr_resource| PrData.new self, pr_resource }
end
|
chore: Apply batch-review only to bot-opened PRs (#<I>)
|
googleapis_google-cloud-ruby
|
train
|
rb
|
5bec3fb6044892d6511c1b444cd4afac4a290a2a
|
diff --git a/ui/src/components/popup-edit/QPopupEdit.js b/ui/src/components/popup-edit/QPopupEdit.js
index <HASH>..<HASH> 100644
--- a/ui/src/components/popup-edit/QPopupEdit.js
+++ b/ui/src/components/popup-edit/QPopupEdit.js
@@ -149,12 +149,14 @@ export default Vue.extend({
contentClass: this.classes
},
on: {
- show: () => {
- this.$emit('show')
+ 'before-show': () => {
this.validated = false
this.initialValue = clone(this.value)
this.watcher = this.$watch('value', this.__reposition)
},
+ show: () => {
+ this.$emit('show')
+ },
'before-hide': () => {
this.watcher()
|
fix(QPopupEdit): quick edit after open sticks even when cancelled #<I>
|
quasarframework_quasar
|
train
|
js
|
aabd716b42ebac8b75135db8575725ee66867850
|
diff --git a/packages/oas-resolver/index.js b/packages/oas-resolver/index.js
index <HASH>..<HASH> 100644
--- a/packages/oas-resolver/index.js
+++ b/packages/oas-resolver/index.js
@@ -97,7 +97,6 @@ function resolveAllFragment(obj, context, src, parentPath, base, options) {
recurse(obj,{},function(obj,key,state){
if (isRef(obj, key)) {
if (typeof obj.$fixed !== 'undefined') delete obj.$fixed;
- if (!options.preserveMiro) delete obj['x-miro'];
}
});
@@ -426,6 +425,11 @@ function loopReferences(options, res, rej) {
options.openapi = deRef(options.openapi,options.original,{verbose:options.verbose-1});
if (options.verbose>1) console.warn(common.colour.yellow+'Finished internal resolution!',common.colour.normal);
}
+ recurse(options.openapi,{},function(obj,key,state){
+ if (isRef(obj, key)) {
+ if (!options.preserveMiro) delete obj['x-miro'];
+ }
+ });
res(options);
}
}
|
fix: defer optional removal of x-miro to end of resolution steps, refs #<I>
|
Mermade_oas-kit
|
train
|
js
|
1848287e8e8f49e6d4afc6c281d965e612a7ea34
|
diff --git a/test/components/AccountLoginForm.spec.js b/test/components/AccountLoginForm.spec.js
index <HASH>..<HASH> 100644
--- a/test/components/AccountLoginForm.spec.js
+++ b/test/components/AccountLoginForm.spec.js
@@ -13,7 +13,13 @@ describe('AccountLoginForm component', () => {
it('should enable connection button for valid OAuth account', () => {
const component = shallow(
- <AccountLoginForm t={tMock} submit={jest.fn()} isOAuth />
+ <AccountLoginForm
+ t={tMock}
+ submit={jest.fn()}
+ isOAuth
+ isValid
+ allRequiredFieldsAreFilled
+ />
).node
expect(component).toMatchSnapshot()
})
|
test: update tests :green_heart:
|
cozy_cozy-home
|
train
|
js
|
a0418eee6dea14e9d6112a84f8afb0c6c5528931
|
diff --git a/index.js b/index.js
index <HASH>..<HASH> 100755
--- a/index.js
+++ b/index.js
@@ -50,12 +50,12 @@ export default {
}
Vue.directive('preview', {
- bind: function (el) {
+ bind: function (el, binding) {
var previewItem = {
- title: '',
+ title: el.alt || '',
el: el,
index: 0,
- src: ''
+ src: binding.value
}
LOGIC_EVENT_BUS.LOGIC_PREVIEW.list.push(previewItem)
updateIndex(LOGIC_EVENT_BUS.LOGIC_PREVIEW.list)
|
fix: set correct src & title in bind hook
|
xLogic92_vue-picture-preview
|
train
|
js
|
c6fa96d688ccd8f1dea68361cf45543ff4eb4dce
|
diff --git a/samples/createHttpTask.js b/samples/createHttpTask.js
index <HASH>..<HASH> 100644
--- a/samples/createHttpTask.js
+++ b/samples/createHttpTask.js
@@ -66,18 +66,12 @@ async function createHttpTask(
};
}
- const request = {
- parent: parent,
- task: task,
- };
-
+ // Send create task request.
console.log('Sending task:');
console.log(task);
- // Send create task request.
+ const request = {parent, task};
const [response] = await client.createTask(request);
- const name = response.name;
- console.log(`Created task ${name}`);
-
+ console.log(`Created task ${response.name}`);
// [END cloud_tasks_create_http_task]
}
|
feat: simplify Node sample (#<I>)
|
googleapis_nodejs-tasks
|
train
|
js
|
303cc4613b488186fd221a72d38b32b825102080
|
diff --git a/server/server.go b/server/server.go
index <HASH>..<HASH> 100644
--- a/server/server.go
+++ b/server/server.go
@@ -772,7 +772,7 @@ func (a *ArgoCDServer) newHTTPServer(ctx context.Context, port int, grpcWebHandl
// registerDexHandlers will register dex HTTP handlers, creating the the OAuth client app
func (a *ArgoCDServer) registerDexHandlers(mux *http.ServeMux) {
- if !a.settings.IsSSOConfigured() {
+ if !a.settings.IsDexConfigured() {
return
}
// Run dex OpenID Connect Identity Provider behind a reverse proxy (served at /api/dex)
|
chore: Run dex reverse proxy only when dex is configured (#<I>)
|
argoproj_argo-cd
|
train
|
go
|
e13dbd1c9dd1da73dd87ad7e7b31a3acef58bf6c
|
diff --git a/index.js b/index.js
index <HASH>..<HASH> 100644
--- a/index.js
+++ b/index.js
@@ -640,10 +640,7 @@
* @param {boolean?} options.force 是否强制刷新
*/
Router.prototype.push = function (url, options) {
- url = stringifyURL(url);
- if (url) {
- this.locator.redirect(url, options);
- }
+ this.locator.redirect(stringifyURL(url), options);
};
/**
|
fix: router.push, when no path and empty query object, querystring has not been removed from location
|
baidu_san-router
|
train
|
js
|
d19ac8b666a5d09fb802de125a9e3596c7444904
|
diff --git a/lib/platform/github/gh-got-wrapper.js b/lib/platform/github/gh-got-wrapper.js
index <HASH>..<HASH> 100644
--- a/lib/platform/github/gh-got-wrapper.js
+++ b/lib/platform/github/gh-got-wrapper.js
@@ -108,7 +108,7 @@ async function get(path, options, retries = 5) {
err.message &&
err.message.includes('rate limit exceeded')
) {
- logger.info({ err }, 'Rate limit exceeded');
+ logger.info({ err, headers: err.headers }, 'Rate limit exceeded');
throw new Error('rate-limit-exceeded');
} else if (
err.statusCode === 403 &&
|
refactor: log err.headers when rate limit exceeded
|
renovatebot_renovate
|
train
|
js
|
5f43da0e5dae3db8df51bd3179cb0896b1d0ce4f
|
diff --git a/src/render/index.js b/src/render/index.js
index <HASH>..<HASH> 100644
--- a/src/render/index.js
+++ b/src/render/index.js
@@ -99,14 +99,11 @@ export function renderToProgram(
}
}
- expression = expr`
- React.createElement(DocumentContext, {context: {metadata, model}},
- ${expression})
- `;
-
let statements = stmt`
- export default function Document() {
- return ${expression};
+ export default function Document({className, style}) {
+ return React.createElement(DocumentContext,
+ {context: {metadata, model}},
+ React.cloneElement(${expression}, {className, style}));
}
export let metadata = ${buildJSON(build, metadata)};
export let model = ${buildJSON(build, model)};
|
feat(render): pass style and className to Root element
Fixes #<I>
|
andreypopp_reactdown
|
train
|
js
|
22d231cfc9d4415fa692fdf2ed41ebef246216e8
|
diff --git a/src/reorderable-repeat.js b/src/reorderable-repeat.js
index <HASH>..<HASH> 100644
--- a/src/reorderable-repeat.js
+++ b/src/reorderable-repeat.js
@@ -224,7 +224,7 @@ export class ReorderableRepeat extends AbstractRepeater {
this._subsribers.forEach(s => s.dispose());
this._subsribers = [];
- this.removeAllViews(true, !this.viewsRequireLifecycle);
+ this.removeAllViews(true, true);
this.scope = null;
this.items = null;
this.matcherBinding = null;
|
chore: following original repeat, skip view animation in unbind
|
buttonwoodcx_bcx-aurelia-reorderable-repeat
|
train
|
js
|
889af3791c4e718e3c301a94b2b2a67d62e70752
|
diff --git a/web/src/main/webapp/my-app/layout/services.js b/web/src/main/webapp/my-app/layout/services.js
index <HASH>..<HASH> 100644
--- a/web/src/main/webapp/my-app/layout/services.js
+++ b/web/src/main/webapp/my-app/layout/services.js
@@ -42,7 +42,7 @@ define(['angular', 'jquery'], function(angular, $) {
************************/
if (APP_FLAGS.useNewLayout) {
- console.log("using new layout");
+ $log.log('using new layout');
var getLayout = function() {
return checkLayoutCache().then(function(data) {
@@ -121,7 +121,7 @@ define(['angular', 'jquery'], function(angular, $) {
return $http({
method: 'POST',
url: SERVICE_LOC.newLayout,
- data: {"layout" : newLayout, "new" : false},
+ data: {'layout': newLayout, 'new': false},
dataType: 'json'
});
})
|
style: delimit strings with single quote rather than double quote
|
uPortal-Project_uportal-home
|
train
|
js
|
c95467ce33e70abad128b9e0d98879b997360e0e
|
diff --git a/packages/flyout/src/Flyout.js b/packages/flyout/src/Flyout.js
index <HASH>..<HASH> 100644
--- a/packages/flyout/src/Flyout.js
+++ b/packages/flyout/src/Flyout.js
@@ -36,7 +36,7 @@ class Flyout extends Component {
/** Manipulate flyout coordinates before rendering */
alterCoordinates: PropTypes.func,
/** Where the flyout will be anchored relative to target */
- anchorPoint: PropTypes.oneOf(AVAILABLE_ANCHOR_POINTS).isRequired,
+ anchorPoint: PropTypes.oneOf(AVAILABLE_ANCHOR_POINTS),
/** Target component to open the flyout. Can be either a node or a render function */
children: PropTypes.oneOfType([PropTypes.node, PropTypes.func]),
/** Content for the flyout. Can be either a node or a render function */
|
refactor: remove unnecessary prop-type requirement
|
Autodesk_hig
|
train
|
js
|
c6a8e2d5001f993711f8ecb105daddc423e5fcaa
|
diff --git a/src/select/select.js b/src/select/select.js
index <HASH>..<HASH> 100644
--- a/src/select/select.js
+++ b/src/select/select.js
@@ -34,7 +34,6 @@ export class MdSelect {
}
handleChangeFromNativeSelect() {
- this.log.debug('handleChangeFromNativeSelect', this.element.value, $(this.element).val());
// Aurelia's select observer doesn't get noticed when something changes the
// select value directly (this.element.value = "something"). So we trigger
// the change here.
@@ -46,6 +45,7 @@ export class MdSelect {
// this._suspendUpdate = false;
if (!this._suspendUpdate) {
+ this.log.debug('handleChangeFromNativeSelect', this.element.value, $(this.element).val());
this._suspendUpdate = true;
fireEvent(this.element, 'change');
// this.valueObserver.notify();
|
chore(md-select): move logging to if block to avoid log spam
|
aurelia-ui-toolkits_aurelia-materialize-bridge
|
train
|
js
|
a0a61d9b090a5fd5b58cfdd1ca9f55306c373cbc
|
diff --git a/packages/jsdoc2spec/src/cli.js b/packages/jsdoc2spec/src/cli.js
index <HASH>..<HASH> 100755
--- a/packages/jsdoc2spec/src/cli.js
+++ b/packages/jsdoc2spec/src/cli.js
@@ -99,7 +99,7 @@ const runWithJSDoc = (files) => {
const temp = path.join(__dirname, 'temp.conf.json');
fs.writeFileSync(temp, JSON.stringify(cfg, null, 2));
try {
- s = cp.execSync('node ../node_modules/.bin/jsdoc -c ./temp.conf.json -p -X', { cwd: __dirname });
+ s = cp.execSync('jsdoc -c ./temp.conf.json -p -X', { cwd: __dirname });
} finally {
fs.unlinkSync(temp);
}
|
fix: run jsdoc from PATH
|
miralemd_scriptappy
|
train
|
js
|
6be42fcdaeb72e72d4a56402701806189b51b87e
|
diff --git a/tests/test.py b/tests/test.py
index <HASH>..<HASH> 100644
--- a/tests/test.py
+++ b/tests/test.py
@@ -18,8 +18,8 @@ def tmpdir():
def test():
- assert_raises(ValueError, lambda: Archive('blabla').extractall('/tmp'))
- assert_raises(PatoolError, lambda: Archive(__file__).extractall('/tmp'))
+ assert_raises(ValueError, lambda: Archive('blabla').extractall(tempfile.gettempdir()))
+ assert_raises(PatoolError, lambda: Archive(__file__).extractall(tempfile.gettempdir()))
def create_zip():
|
test: replace /tmp with gettempdir()
|
ponty_pyunpack
|
train
|
py
|
bdd2a12aa931e87f66271d5c1132e952ae8d9d32
|
diff --git a/src/components/number-input/number-input.config.js b/src/components/number-input/number-input.config.js
index <HASH>..<HASH> 100644
--- a/src/components/number-input/number-input.config.js
+++ b/src/components/number-input/number-input.config.js
@@ -32,24 +32,26 @@ module.exports = {
light: true,
},
},
- ...(componentsX
- ? [
- {
- name: 'mobile',
- label: 'Mobile Number Input',
- context: {
- mobile: true,
- },
- },
- {
- name: 'mobile-light',
- label: 'Mobile Number Input (light)',
- context: {
- light: true,
- mobile: true,
- },
- },
- ]
- : []),
+ {
+ name: 'mobile',
+ label: 'Mobile Number Input',
+ meta: {
+ xVersionOnly: true,
+ },
+ context: {
+ mobile: true,
+ },
+ },
+ {
+ name: 'mobile-light',
+ label: 'Mobile Number Input (light)',
+ meta: {
+ xVersionOnly: true,
+ },
+ context: {
+ light: true,
+ mobile: true,
+ },
+ },
],
};
|
fix(number-input): replace ternary operator with theme switcher options (#<I>)
|
carbon-design-system_carbon-components
|
train
|
js
|
3ca09b8e08d8c409d5d42a2b6d42016302fd8122
|
diff --git a/varlink/tests/__init__.py b/varlink/tests/__init__.py
index <HASH>..<HASH> 100644
--- a/varlink/tests/__init__.py
+++ b/varlink/tests/__init__.py
@@ -8,6 +8,9 @@ loader = unittest.defaultTestLoader
def suite():
suite = unittest.TestSuite()
for fn in os.listdir(here):
+ if fn.startswith("test_mocks") and sys.version_info.major < 3:
+ continue
+
if fn.startswith("test") and fn.endswith(".py"):
modname = "varlink.tests." + fn[:-3]
__import__(modname)
|
fix(tests): skip test_mocks for python < 3
|
varlink_python
|
train
|
py
|
73dbf12b7b687d37ad06ed4e69ce17c653348224
|
diff --git a/src/notebook/epics/github-publish.js b/src/notebook/epics/github-publish.js
index <HASH>..<HASH> 100644
--- a/src/notebook/epics/github-publish.js
+++ b/src/notebook/epics/github-publish.js
@@ -64,6 +64,8 @@ export function createGistCallback(firstTimePublish, observer, filename, notific
notifyUser(filename, gistID, notificationSystem);
if (firstTimePublish) {
observer.next(overwriteMetadata('gist_id', gistID));
+ } else {
+ observer.next();
}
};
}
|
fix(gh-publish): Ensure that next is called on observable
|
nteract_nteract
|
train
|
js
|
659783e6dd8ab9c01bbb47ccaa24c36a3471e8d4
|
diff --git a/tasks/files.js b/tasks/files.js
index <HASH>..<HASH> 100644
--- a/tasks/files.js
+++ b/tasks/files.js
@@ -19,7 +19,7 @@ var files = {
partialsDir: 'src/partials',
allHTML: '*.html',
allPartials: 'src/partials/*.html',
- allPartialsCombined: 'test/e2e/env/all-partials.js',
+ allPartialsCombined: '.tmp/all-partials.js',
unitTests: 'test/unit/**/*.+(js|coffee)',
e2eTests: ['test/e2e/SpecHelper.+(js|coffee)', 'test/e2e/*Spec.+(js|coffee)'],
|
chore(files): move allPartials.js to .tmp folder
|
Jimdo_angular-draggabilly
|
train
|
js
|
12a75aaf39ea67d9b9f1108f5925064eae3f6bda
|
diff --git a/test/setup.js b/test/setup.js
index <HASH>..<HASH> 100644
--- a/test/setup.js
+++ b/test/setup.js
@@ -1,7 +1,4 @@
'use strict';
-if (require('semver').lt(process.version, '4.0.0')) {
- require('babel-register');
-}
-
+require('babel-register');
require('coffee-script/register');
|
chore: Always transpile all code when running unit tests.
When we initially migrated back to ES6+, i added a check here to make sure
that no future JavaScript syntax was being used that was not also supported
by the current Node LTS (4.x at the time).
After having this around for some while, I no longer believe this is worth
the trouble. We should just support all the syntax that was standardized
and is supported by transpilation via babel.
|
tediousjs_tedious
|
train
|
js
|
5356deeb20c9537adc3a13a02f3c56b0e286b8d7
|
diff --git a/tasks/nice_package.js b/tasks/nice_package.js
index <HASH>..<HASH> 100644
--- a/tasks/nice_package.js
+++ b/tasks/nice_package.js
@@ -71,10 +71,12 @@ function findFixpack() {
var choices = [
join(cwd, 'fixpack/bin/fixpack'),
join(cwd, 'node_modules/fixpack/bin/fixpack'),
- join(cwd, '../fixpack/bin/fixpack'),
- join(cwd, '../.bin/fixpack'),
- join(cwd, '../node_modules/.bin/fixpack'),
- join(cwd, '../node_modules/fixpack/fixpack.js')
+ join(cwd, 'node_modules/fixpack/bin/fixpack'),
+ join(__dirname, '../fixpack/bin/fixpack'),
+ join(__dirname, '../.bin/fixpack'),
+ join(__dirname, '../node_modules/.bin/fixpack'),
+ join(__dirname, '../node_modules/fixpack/bin/fixpack'),
+ join(__dirname, '../node_modules/fixpack/fixpack.js')
];
return find(choices, fs.existsSync);
}
|
fix(fixpack): better search for fixpack
|
bahmutov_grunt-nice-package
|
train
|
js
|
9d1606d3a64744c4d09e29b45b5d803c93fd3577
|
diff --git a/scripts/check-pkg-for-release.js b/scripts/check-pkg-for-release.js
index <HASH>..<HASH> 100644
--- a/scripts/check-pkg-for-release.js
+++ b/scripts/check-pkg-for-release.js
@@ -51,8 +51,12 @@ function main() {
checkPublicConfigForNewComponent();
if (pkg.name !== MASTER_PKG.name) {
checkNameIsPresentInAllowedScope();
- checkDependencyAddedInWebpackConfig();
- checkDependencyAddedInMDCPackage();
+ if (pkg.private) {
+ console.log('Skipping private component', pkg.name);
+ } else {
+ checkDependencyAddedInWebpackConfig();
+ checkDependencyAddedInMDCPackage();
+ }
}
}
@@ -112,10 +116,6 @@ function checkCSSDependencyAddedInWebpackConfig() {
}
function checkDependencyAddedInMDCPackage() {
- if (pkg.private) {
- console.log('Skipping private component', pkg.name);
- return;
- }
// Package is added to package.json
checkPkgDependencyAddedInMDCPackage();
|
chore: Skip both package and webpack checks for private packages (#<I>)
|
material-components_material-components-web
|
train
|
js
|
e38fa85599917881edbd3f442ac7b3bbd31dc214
|
diff --git a/lib/core/connection/apm.js b/lib/core/connection/apm.js
index <HASH>..<HASH> 100644
--- a/lib/core/connection/apm.js
+++ b/lib/core/connection/apm.js
@@ -23,7 +23,7 @@ const namespace = command => command.ns;
const databaseName = command => command.ns.split('.')[0];
const collectionName = command => command.ns.split('.')[1];
const generateConnectionId = pool =>
- pool.options ? `${pool.options.host}:${pool.options.port}` : pool.id;
+ pool.options ? `${pool.options.host}:${pool.options.port}` : pool.address;
const maybeRedact = (commandName, result) => (SENSITIVE_COMMANDS.has(commandName) ? {} : result);
const LEGACY_FIND_QUERY_MAP = {
|
refactor: use the connection's address for monitoring events
|
mongodb_node-mongodb-native
|
train
|
js
|
1a9963f8e98513aff90207856cc9d35e82e20306
|
diff --git a/lib/shields-list.js b/lib/shields-list.js
index <HASH>..<HASH> 100644
--- a/lib/shields-list.js
+++ b/lib/shields-list.js
@@ -41,21 +41,18 @@ module.exports = {
path: 'david/{repo}',
link: 'https://david-dm.org/{repo}',
branchLink: 'https://david-dm.org/{repo}/{branch}',
- hasBranchVersion: true,
},
devdeps: {
text: 'devDependency status',
path: 'david/dev/{repo}',
link: 'https://david-dm.org/{repo}#info=devDependencies',
branchLink: 'https://david-dm.org/{repo}/{branch}#info=devDependencies',
- hasBranchVersion: true,
},
peerdeps: {
text: 'peerDependency status',
path: 'david/peer/{repo}',
link: 'https://david-dm.org/{repo}#info=peerDependencies',
branchLink: 'https://david-dm.org/{repo}/{branch}#info=peerDependencies',
- hasBranchVersion: true,
},
gemnasium: {
text: 'Gemnasium',
|
fix: david currently does not support branches (#5)
|
zkochan_shieldman
|
train
|
js
|
ff9afbe9a2d4d07a03cc40b7096fdb59eeb9c6d0
|
diff --git a/src/bots/worker.js b/src/bots/worker.js
index <HASH>..<HASH> 100644
--- a/src/bots/worker.js
+++ b/src/bots/worker.js
@@ -125,18 +125,6 @@ function endTask (task) {
logger.write(configEndTask(task), 'TASK.END');
}
-// Prepare the navigation task.
-var taskNavigate = {
- type: 'navigate',
- it: 'Start on ' + config.url,
- params: {
- url: config.url
- }
-};
-
-// Add the first navigate at the top.
-tasks.unshift(startTask(taskNavigate));
-
// GO.
casper.start();
// The Loop.
|
feat(worker): remove the prepended task of navigate
- WARNING, you'll have to be explicit to navigate to the wanted url on the first task
|
damonjs_damon
|
train
|
js
|
17daa0a2a2f5600e7d72ae441a01d70fd536c71a
|
diff --git a/src/creators/MarkerCreator.js b/src/creators/MarkerCreator.js
index <HASH>..<HASH> 100644
--- a/src/creators/MarkerCreator.js
+++ b/src/creators/MarkerCreator.js
@@ -110,7 +110,7 @@ export default class MarkerCreator extends Component {
if (0 < Children.count(children)) {
return (
<div>{Children.map(children, childElement =>
- React.cloneElement(childElement, {
+ childElement && React.cloneElement(childElement, {
mapHolderRef,
anchorHolderRef: this,
})
|
fix(Marker): allow null and undefined as children
* Original commit: f<I>c6f<I>f3beb<I>d<I>e1a<I>fef<I>d<I>bf<I>a
* Original
|
tomchentw_react-google-maps
|
train
|
js
|
d3a9a9244d3632953f93ffc19c106980fa9de83c
|
diff --git a/docs/_ext/aafig.py b/docs/_ext/aafig.py
index <HASH>..<HASH> 100644
--- a/docs/_ext/aafig.py
+++ b/docs/_ext/aafig.py
@@ -10,6 +10,7 @@
:author: Leandro Lucarella <llucax@gmail.com>
:license: BOLA, see LICENSE for details
"""
+import logging
import posixpath
from hashlib import sha1 as sha
from os import path
@@ -17,7 +18,6 @@ from os import path
from docutils import nodes
from docutils.parsers.rst.directives import flag, images, nonnegative_int
from sphinx.errors import SphinxError
-from sphinx.util import logging
from sphinx.util.osutil import ensuredir, relative_uri
try:
|
chore(aafig): Import from logging from standard library
|
tmux-python_tmuxp
|
train
|
py
|
b6074322b985e13eda5916d497751a815291c0ba
|
diff --git a/tests/unit/sign-in-test.js b/tests/unit/sign-in-test.js
index <HASH>..<HASH> 100644
--- a/tests/unit/sign-in-test.js
+++ b/tests/unit/sign-in-test.js
@@ -64,7 +64,7 @@ test('successful account.signIn(options)', function (t) {
password: 'secret'
})
- .then(function (session) {
+ .then(function (accountProperties) {
t.deepEqual(signIn.internals.request.lastCall.arg, {
method: 'PUT',
url: 'http://example.com/session',
@@ -82,8 +82,8 @@ test('successful account.signIn(options)', function (t) {
}
})
- t.equal(session.sessionId, 'session123', 'resolves with session.id')
- t.equal(session.username, 'deserialise username', 'resolves with session.account.username')
+ t.equal(accountProperties.id, 'deserialise id', 'resolves with account.id')
+ t.equal(accountProperties.username, 'deserialise username', 'resolves with account.username')
simple.restore()
})
|
test: sign in resolves with account
|
hoodiehq_hoodie-account-client
|
train
|
js
|
d302c5503f789e457e44c1173ca43c90a02d30ba
|
diff --git a/packages/cli-plugin-deploy-pulumi/utils/login.js b/packages/cli-plugin-deploy-pulumi/utils/login.js
index <HASH>..<HASH> 100644
--- a/packages/cli-plugin-deploy-pulumi/utils/login.js
+++ b/packages/cli-plugin-deploy-pulumi/utils/login.js
@@ -62,9 +62,6 @@ module.exports = async projectApplication => {
login = `file://${stateFilesFolder}`;
}
- console.log("LOGO", login);
- console.log("LOGO", login.toUpperCase());
-
await pulumi.run({
command: ["login", login]
});
|
fix: remove testing-related logs
|
Webiny_webiny-js
|
train
|
js
|
1983e2bb47707c2802c8a92bf77302e03ed8afc3
|
diff --git a/lib/service/extract-saz.js b/lib/service/extract-saz.js
index <HASH>..<HASH> 100644
--- a/lib/service/extract-saz.js
+++ b/lib/service/extract-saz.js
@@ -119,7 +119,7 @@ module.exports = function(buffer, cb) {
var result = sessions[index] = sessions[index] || {};
++count;
if (filename === 'c.txt') {
- result.req = util.getReq(content, function(req) {
+ util.getReq(content, function(req) {
process.nextTick(function() {
result.req = req;
--count;
|
refactor: Auto decode req&res body
|
avwo_whistle
|
train
|
js
|
1797dd7fd2edb741fdd8b091405ace8e8308df18
|
diff --git a/model/portableElement/storage/PortableElementRegistry.php b/model/portableElement/storage/PortableElementRegistry.php
index <HASH>..<HASH> 100644
--- a/model/portableElement/storage/PortableElementRegistry.php
+++ b/model/portableElement/storage/PortableElementRegistry.php
@@ -514,11 +514,9 @@ abstract class PortableElementRegistry implements ServiceLocatorAwareInterface
/**
* Export a portable element to a zip package
*
- * @param PortableElementObject $object
- * @return string
* @throws \common_Exception
*/
- public function export(PortableElementObject $object)
+ public function export(PortableElementObject $object): string
{
$zip = new \ZipArchive();
$path = $this->getZipLocation($object);
|
fix: missing files in exported pci zip
|
oat-sa_extension-tao-itemqti
|
train
|
php
|
3fce7287047c76c03e512ce2d4727fc251bd96bd
|
diff --git a/lib/__internal/EngineClient.js b/lib/__internal/EngineClient.js
index <HASH>..<HASH> 100644
--- a/lib/__internal/EngineClient.js
+++ b/lib/__internal/EngineClient.js
@@ -3,7 +3,7 @@ const got = require('got');
class EngineClient {
constructor({ workerId, path, interceptors }) {
this.workerId = workerId;
- this.baseUrl = path.replace(/\/$/, '');
+ this.baseUrl = `${path.replace(/\/$/, '')}/external-task`;
this.interceptors = interceptors;
/**
diff --git a/test/workers.test.js b/test/workers.test.js
index <HASH>..<HASH> 100644
--- a/test/workers.test.js
+++ b/test/workers.test.js
@@ -12,7 +12,7 @@ jest.mock('got');
const customWorkersOptions = {
- path: 'http://localhost:XXXX/engine-rest/external-task',
+ path: 'http://localhost:XXXX/engine-rest/',
workerId: 'foobarId',
maxTasks: 3,
interval: 100,
|
fix(path): make path expect only base engine url
Related to CAM-<I>
|
camunda_camunda-external-task-client-js
|
train
|
js,js
|
d4c07955c3a71637e2cda46803bd168b43605f33
|
diff --git a/packages/input-currency/src/CurrencyInput.js b/packages/input-currency/src/CurrencyInput.js
index <HASH>..<HASH> 100644
--- a/packages/input-currency/src/CurrencyInput.js
+++ b/packages/input-currency/src/CurrencyInput.js
@@ -20,7 +20,8 @@ EnhancedCurrencyInput.defaultProps = {
thousandSeparator: ",",
decimalSeparator: ".",
decimalScale: 2,
- fixedDecimalScale: true
+ fixedDecimalScale: true,
+ allowNegative: false
};
export default EnhancedCurrencyInput;
|
feat(CurrencyInput): set default allowNegative to false
affects: @crave/farmblocks-input-currency
|
CraveFood_farmblocks
|
train
|
js
|
d839311af3e22876650e7c942ac3dd808b0893f8
|
diff --git a/elements/Image.js b/elements/Image.js
index <HASH>..<HASH> 100644
--- a/elements/Image.js
+++ b/elements/Image.js
@@ -1,7 +1,7 @@
import React from "react";
import PropTypes from "prop-types";
-import { Image } from "react-native";
-import { requireNativeComponent } from "react-native";
+import { Image, requireNativeComponent } from "react-native";
+import ImageSourcePropType from 'react-native/Libraries/Image/ImageSourcePropType';
import { ImageAttributes } from "../lib/attributes";
import { numberProp, touchableProps, responderProps } from "../lib/props";
import Shape from "./Shape";
@@ -19,7 +19,7 @@ export default class extends Shape {
y: numberProp,
width: numberProp.isRequired,
height: numberProp.isRequired,
- href: Image.propTypes.source,
+ href: ImageSourcePropType,
preserveAspectRatio: PropTypes.string
};
|
chore(Image): Update image prop type to ImageSourcePropType
|
react-native-community_react-native-svg
|
train
|
js
|
b520494977239270f1b1df04b24c6c36abd33fbb
|
diff --git a/src/Col/index.js b/src/Col/index.js
index <HASH>..<HASH> 100644
--- a/src/Col/index.js
+++ b/src/Col/index.js
@@ -130,6 +130,7 @@ class ColUnstyled extends React.Component { // eslint-disable-line react/prefer-
return (
<Tag
className={mapToCssModules(cn(
+ 'col',
className,
colClasses
), cssModule)}
|
fix(col): adding missing classname .col to <Col /> component
|
bootstrap-styled_v4
|
train
|
js
|
781fb70d43909979d17729e486b9c873a8f13368
|
diff --git a/lib/foreman_fog_proxmox/engine.rb b/lib/foreman_fog_proxmox/engine.rb
index <HASH>..<HASH> 100644
--- a/lib/foreman_fog_proxmox/engine.rb
+++ b/lib/foreman_fog_proxmox/engine.rb
@@ -46,7 +46,7 @@ module ForemanFogProxmox
widget 'foreman_fog_proxmox_widget', name: N_('Foreman Fog Proxmox widget'), sizex: 8, sizey: 1
security_block :foreman_fog_proxmox do
permission :view_compute_resource, { :compute_resources =>
- [:ostemplates_by_node_and_storage, :isos_by_node_and_storage, :ostemplates_by_node, :isos_by_node, :storages_by_node, :iso_storages_by_node, :bridges_by_node] }
+ [:ostemplates_by_id_and_node_and_storage, :isos_by_id_and_node_and_storage, :ostemplates_by_id_and_node, :isos_by_id_and_node, :storages_by_id_and_node, :iso_storages_by_id_and_node, :bridges_by_id_and_node] }
end
end
end
|
fix: :bug: fixes routes permissions renamed
|
theforeman_foreman_fog_proxmox
|
train
|
rb
|
9619144a2fb96a3283bd05acfee2c9338e2926b8
|
diff --git a/ui/src/plugins/Cookies.js b/ui/src/plugins/Cookies.js
index <HASH>..<HASH> 100644
--- a/ui/src/plugins/Cookies.js
+++ b/ui/src/plugins/Cookies.js
@@ -26,7 +26,11 @@ function read (string) {
string = decode(string.replace(/\+/g, ' '))
try {
- string = JSON.parse(string)
+ const parsed = JSON.parse(string)
+
+ if (parsed === Object(parsed) || Array.isArray(parsed) === true) {
+ string = parsed
+ }
}
catch (e) {}
|
fix(Cookies): MAX_SAFE_INTEGER rounding when doing JSON.parse on a string cont… (#<I>)
* fix: MAX_SAFE_INTEGER rounding when doing JSON.parse on a string containing a number greater than MAX_SAFE_INTEGER
* Update Cookies.js
* Update Cookies.js
|
quasarframework_quasar
|
train
|
js
|
30610cf1f5f42af5568ec3dd38e0e5da72a4db1e
|
diff --git a/src/React/Renderers/VtkRenderer/index.js b/src/React/Renderers/VtkRenderer/index.js
index <HASH>..<HASH> 100644
--- a/src/React/Renderers/VtkRenderer/index.js
+++ b/src/React/Renderers/VtkRenderer/index.js
@@ -12,6 +12,8 @@ export default React.createClass({
propTypes: {
className: React.PropTypes.string,
client: React.PropTypes.object,
+ viewId: React.PropTypes.number,
+ interactionTimout: React.PropTypes.number,
connection: React.PropTypes.object,
showFPS: React.PropTypes.bool,
style: React.PropTypes.object,
@@ -22,6 +24,8 @@ export default React.createClass({
className: '',
showFPS: false,
style: {},
+ viewId: -1,
+ interactionTimout: 500,
};
},
@@ -43,6 +47,7 @@ export default React.createClass({
this.binaryImageStream.startInteractiveQuality();
} else {
this.binaryImageStream.stopInteractiveQuality();
+ setTimeout(() => this.binaryImageStream.invalidateCache(), this.props.interactionTimout);
}
});
@@ -60,7 +65,7 @@ export default React.createClass({
// Establish image stream connection
this.binaryImageStream.connect({
- view_id: -1,
+ view_id: this.props.viewId,
});
// Update size
|
fix(VtkRenderer): Clear cache and render after user interaction
This make sure the client will not receive a compressed image once its interaction is done
|
Kitware_paraviewweb
|
train
|
js
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.