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 |
|---|---|---|---|---|---|
f583a5b85841e5223ecb1ef1261c37f80d60218c
|
diff --git a/vyper/parser/events.py b/vyper/parser/events.py
index <HASH>..<HASH> 100644
--- a/vyper/parser/events.py
+++ b/vyper/parser/events.py
@@ -1,5 +1,5 @@
from vyper import ast as vy_ast
-from vyper.exceptions import TypeMismatch
+from vyper.exceptions import StructureException, TypeMismatch
from vyper.parser.expr import Expr
from vyper.parser.lll_node import LLLnode
from vyper.parser.parser_utils import (
@@ -301,6 +301,11 @@ def pack_logging_data(expected_data, args, context, pos):
for i, (arg, data) in enumerate(zip(args, expected_data)):
typ = data.typ
if isinstance(typ, ByteArrayLike):
+ if isinstance(arg, vy_ast.Call) and arg.func.get("id") == "empty":
+ # TODO add support for this
+ raise StructureException(
+ "Cannot use `empty` on Bytes or String types within an event log", arg
+ )
pack_args_by_32(
holder=holder,
maxlen=maxlen,
|
fix: explicitly disallow empty on bytes-array types in event logging
|
ethereum_vyper
|
train
|
py
|
718102572a13d7e70d1f2c0b48b6b60a766b76b2
|
diff --git a/lib/watcher.js b/lib/watcher.js
index <HASH>..<HASH> 100644
--- a/lib/watcher.js
+++ b/lib/watcher.js
@@ -73,7 +73,7 @@ var getWatchedPatterns = function(patternObjects) {
});
};
-exports.watch = function(patterns, excludes, fileList, usePolling) {
+exports.watch = function(patterns, excludes, fileList, usePolling, emitter) {
var watchedPatterns = getWatchedPatterns(patterns);
var options = {
usePolling: usePolling,
@@ -101,7 +101,13 @@ exports.watch = function(patterns, excludes, fileList, usePolling) {
log.debug(e);
});
+ emitter.on('exit', function(done) {
+ chokidarWatcher.close();
+ done();
+ });
+
return chokidarWatcher;
};
-exports.watch.$inject = ['config.files', 'config.exclude', 'fileList', 'config.usePolling'];
+exports.watch.$inject = ['config.files', 'config.exclude', 'fileList', 'config.usePolling',
+ 'emitter'];
|
fix(watcher): Close file watchers on exit event
|
karma-runner_karma
|
train
|
js
|
b901f04e33575baca3c6c289dbb6c238bc25b0e9
|
diff --git a/dev/test/cypress/plugins/index.js b/dev/test/cypress/plugins/index.js
index <HASH>..<HASH> 100644
--- a/dev/test/cypress/plugins/index.js
+++ b/dev/test/cypress/plugins/index.js
@@ -180,10 +180,6 @@ module.exports = (on, config) => {
}
return defaultCustomer;
},
- log: logObject => {
- console.log('LOG', logObject);
- return true;
- },
setDefaultCustomerProperty: customerData => {
defaultCustomer = Object.assign({}, defaultCustomer, customerData);
return defaultCustomer;
diff --git a/dev/test/cypress/support/commands.js b/dev/test/cypress/support/commands.js
index <HASH>..<HASH> 100644
--- a/dev/test/cypress/support/commands.js
+++ b/dev/test/cypress/support/commands.js
@@ -43,10 +43,6 @@ Cypress.Commands.add('shouldNotShowErrorMessage', excludeErrorMessage => {
}
});
-Cypress.Commands.add('clog', logObject => {
- cy.task('log', logObject);
-});
-
Cypress.Commands.add('isSubscribed', (email, doubleOptin) => {
const expectedStatus = doubleOptin ? 2 : 1;
cy.task('getSubscription', email).then(subscription => {
|
feat(cypress-tests): remove clog CDPIP-OPS
|
emartech_magento2-extension
|
train
|
js,js
|
e2d7b18e05cdc4906afc2a23aeaf959edd9351b0
|
diff --git a/src/input/input.js b/src/input/input.js
index <HASH>..<HASH> 100644
--- a/src/input/input.js
+++ b/src/input/input.js
@@ -70,7 +70,9 @@ export class MdInput {
}
mdValueChanged() {
- this.updateService.update();
+ if (!$(this.input).is(':focus')) {
+ this.updateService.update();
+ }
if (this.mdTextArea) {
$(this.input).trigger('autoresize');
}
|
fix(md-input): run updateService only..
..if input has no focus. If an input have text and
you delete the text, the label get pulled down into
the input before focus is removed.
This also move an error message downward when using validateTrigger.change.
|
aurelia-ui-toolkits_aurelia-materialize-bridge
|
train
|
js
|
f89cab0eee653d28e64c31cce0ffcecb803edb21
|
diff --git a/Gruntfile.js b/Gruntfile.js
index <HASH>..<HASH> 100644
--- a/Gruntfile.js
+++ b/Gruntfile.js
@@ -277,9 +277,9 @@ module.exports = function (grunt) {
]);
grunt.registerTask('publish', ['publish:patch']);
- grunt.registerTask('publish:patch', ['fulltest', 'bump-only:patch', '_publish']);
- grunt.registerTask('publish:minor', ['fulltest', 'bump-only:minor', '_publish']);
- grunt.registerTask('publish:major', ['fulltest', 'bump-only:major', '_publish']);
+ grunt.registerTask('publish:patch', ['test', 'bump-only:patch', '_publish']);
+ grunt.registerTask('publish:minor', ['test', 'bump-only:minor', '_publish']);
+ grunt.registerTask('publish:major', ['test', 'bump-only:major', '_publish']);
grunt.registerTask('default', [
'test',
|
refactor(grunt): forgot to change task names
Ref 6ff<I>a
|
seriema_angular-apimock
|
train
|
js
|
4c592becc0977de24175c5d63a668d7835bd9877
|
diff --git a/src/index.js b/src/index.js
index <HASH>..<HASH> 100644
--- a/src/index.js
+++ b/src/index.js
@@ -47,7 +47,7 @@ export class DefaultLoader extends Loader {
var that = this;
if(System.polyfilled){
- define('html-import-template', [], {
+ define('view', [], {
load: function (name, req, onload, config) {
var entry = that.getOrCreateTemplateRegistryEntry(name),
address;
@@ -66,7 +66,7 @@ export class DefaultLoader extends Loader {
}
});
}else{
- System.set('html-import-template', System.newModule({
+ System.set('view', System.newModule({
fetch: function(load, fetch) {
var id = load.name.substring(0, load.name.indexOf('!'));
var entry = load.metadata.templateRegistryEntry = that.getOrCreateTemplateRegistryEntry(id);
@@ -113,9 +113,9 @@ export class DefaultLoader extends Loader {
loadTemplate(url){
if(System.polyfilled){
- return System.import('html-import-template!' + url);
+ return System.import('view!' + url);
}else{
- return System.import(url + '!html-import-template');
+ return System.import(url + '!view');
}
}
}
|
fix(loader): change plugin name to view
Changing the internal name used with the various loaders for plugins to
view. This will make it nicer for developers to use in their own code
as part of their imports.
|
aurelia_loader-default
|
train
|
js
|
5b572b14d7c4a73ba0d678b9393a6bd97b05f792
|
diff --git a/src/Leevel/Debug/Console/LinkDebugBar.php b/src/Leevel/Debug/Console/LinkDebugBar.php
index <HASH>..<HASH> 100644
--- a/src/Leevel/Debug/Console/LinkDebugBar.php
+++ b/src/Leevel/Debug/Console/LinkDebugBar.php
@@ -49,7 +49,7 @@ class LinkDebugBar extends Command
*
* @var string
*/
- protected $description = 'Create a symbolic link from `vendor/maximebf/debugbar/src/DebugBar/Resources` to `www/debugbar`.';
+ protected $description = 'Create a symbolic link from `debugbar/src/DebugBar/Resources` to `www/debugbar`.';
/**
* 响应命令.
@@ -67,7 +67,7 @@ class LinkDebugBar extends Command
}
link(
- $path = $app->path('vendor/maximebf/debugbar/src/DebugBar/Resources'), $link
+ $path = $app->path('debugbar'), $link
);
$this->info(sprintf('Linked `%s` directory to `%s` successed.', $path, $link));
|
refactor: adjust debugbar
|
hunzhiwange_framework
|
train
|
php
|
3d597f8d9f7fb94af57644904a70f1ba4c916cda
|
diff --git a/packages/build-tools/tasks/pattern-lab-tasks.js b/packages/build-tools/tasks/pattern-lab-tasks.js
index <HASH>..<HASH> 100644
--- a/packages/build-tools/tasks/pattern-lab-tasks.js
+++ b/packages/build-tools/tasks/pattern-lab-tasks.js
@@ -67,7 +67,7 @@ async function plBuild(errorShouldExit) {
sh(
'php',
- ['-d', 'memory_limit=4048M', consolePath, '--generate'],
+ ['-d', 'memory_limit=8096M', consolePath, '--generate'],
errorShouldExit,
false,
)
|
fix: update max memory for Pattern Lab PHP generation command — testing fix for PL not compiling as expected.
|
bolt-design-system_bolt
|
train
|
js
|
9328f67e20e4874b6b7cc9b9551cdf4725ce0620
|
diff --git a/lib/helper.js b/lib/helper.js
index <HASH>..<HASH> 100644
--- a/lib/helper.js
+++ b/lib/helper.js
@@ -6,7 +6,8 @@ var Promise = require('bluebird')
exports.browserFullNameToShort = function (fullName) {
var agent = useragent.parse(fullName)
- return agent.family !== 'Other' ? agent.toAgent() + ' (' + agent.os + ')' : fullName
+ var isKnown = agent.family !== 'Other' && agent.os.family !== 'Other'
+ return isKnown ? agent.toAgent() + ' (' + agent.os + ')' : fullName
}
exports.isDefined = function (value) {
|
fix(helper): Ensure browser detection is handled in the unkown case
|
karma-runner_karma
|
train
|
js
|
35a22df316ee0f149d3d4aa3be0535ab3e841644
|
diff --git a/test/fetch-https.test.js b/test/fetch-https.test.js
index <HASH>..<HASH> 100644
--- a/test/fetch-https.test.js
+++ b/test/fetch-https.test.js
@@ -15,10 +15,8 @@ describe('fetch: https', function () {
// This is a remote call which isn't great but it means we get a valid
// https certificate without having to pull any tricks.
this.timeout(2000);
- return fetch('https://api.reddit.com/r/javascript/about.json')
- .then(function (res) {
- assert.equal(200, res.statusCode);
- });
+ return fetch('https://api.reddit.com/user/ageitgey/about.json')
+ .json();
});
it('fails with self-signed https', function () {
|
test: Use smaller reddit endpoint
|
groupon_gofer
|
train
|
js
|
b0f1be170b4948564d8e5349d889e1d972708a1b
|
diff --git a/lib/TextBox.js b/lib/TextBox.js
index <HASH>..<HASH> 100644
--- a/lib/TextBox.js
+++ b/lib/TextBox.js
@@ -130,7 +130,9 @@ TextBox.prototype.create = function(bounds, style, value, options) {
}, parentStyle);
var contentStyle = pick(style, [
+ 'fontFamily',
'fontSize',
+ 'fontWeight',
'lineHeight',
'padding',
'paddingTop',
|
feat(text-box): accept font family and font weight styles
|
bpmn-io_diagram-js-direct-editing
|
train
|
js
|
a7e0a1560581e8b9530f9d8847a9e8cb551563bd
|
diff --git a/lib/ditty/controllers/component.rb b/lib/ditty/controllers/component.rb
index <HASH>..<HASH> 100644
--- a/lib/ditty/controllers/component.rb
+++ b/lib/ditty/controllers/component.rb
@@ -52,8 +52,8 @@ module Ditty
# Create
post '/' do
- authorize settings.model_class, :create
entity = settings.model_class.new(permitted_attributes(settings.model_class, :create))
+ authorize entity, :create
success = entity.valid? && entity.save
log_action("#{dehumanized}_create".to_sym) if success && settings.track_actions
|
fix: Authorize create on object, not class
|
EagerELK_ditty
|
train
|
rb
|
0ae1cf41953ad4dc893f684206d620d1cd412ba3
|
diff --git a/src/OutputController.js b/src/OutputController.js
index <HASH>..<HASH> 100644
--- a/src/OutputController.js
+++ b/src/OutputController.js
@@ -31,7 +31,8 @@ class OutputController {
label: 'Working…',
stdout: stderr
} );
- this.pending = [];
+ this.pendingLogs = [];
+ this.pendingWarnings = [];
}
/* istanbul ignore next */
@@ -45,21 +46,25 @@ class OutputController {
}
addLog( ...args ) {
- this.pending.push( args );
+ this.pendingLogs.push( args );
}
- addWarning( log ) {
- if ( isExternalDepWarning( log ) ) {
+ addWarning( warningMessage ) {
+ if ( isExternalDepWarning( warningMessage ) ) {
return;
}
- const warning = createWarning( log );
+ const warning = createWarning( warningMessage );
- this.pending.push( [ warning ] );
+ this.pendingWarnings.push( [ warning ] );
}
display() {
- this.pending.forEach( ( log ) => {
+ this.pendingWarnings.forEach( ( warning ) => {
+ this.console.warn( ...warning );
+ } );
+
+ this.pendingLogs.forEach( ( log ) => {
this.console.log( ...log );
} );
}
|
fix(outputcontroller): log warnings into `stderr`
|
Comandeer_rollup-lib-bundler
|
train
|
js
|
4948dd79b1d6e167fc99dbfcdc454e4cb49f4975
|
diff --git a/packages/bonde-styleguide/src/layout/Flexbox2/Flexbox2.js b/packages/bonde-styleguide/src/layout/Flexbox2/Flexbox2.js
index <HASH>..<HASH> 100644
--- a/packages/bonde-styleguide/src/layout/Flexbox2/Flexbox2.js
+++ b/packages/bonde-styleguide/src/layout/Flexbox2/Flexbox2.js
@@ -14,6 +14,7 @@ const Flexbox = styled.div`
flex-direction: row;
`}
${props => props.vertical && `
+ width: 100%;
height: 100%;
flex-direction: column;
`}
diff --git a/packages/bonde-styleguide/src/layout/Page/Page.js b/packages/bonde-styleguide/src/layout/Page/Page.js
index <HASH>..<HASH> 100644
--- a/packages/bonde-styleguide/src/layout/Page/Page.js
+++ b/packages/bonde-styleguide/src/layout/Page/Page.js
@@ -3,6 +3,7 @@ import PropTypes from 'prop-types'
import styled from 'styled-components'
const PageContainer = styled.div`{
+ width: 100%;
position: relative;
padding-top: ${props => props.top ? `calc(${props.top}px + 32px)` : '32px'};
padding-left: 155px;
@@ -12,6 +13,7 @@ const PageContainer = styled.div`{
}`
const PageContent = styled.div`{
+ width: 100%;
position: relative;
display: flex;
}`
|
fix(styleguide): set width full to flexbox layouts
|
nossas_bonde-client
|
train
|
js,js
|
405fc5b8a4feaacc23669516d5e745c2c8a5d329
|
diff --git a/intranet/apps/users/models.py b/intranet/apps/users/models.py
index <HASH>..<HASH> 100644
--- a/intranet/apps/users/models.py
+++ b/intranet/apps/users/models.py
@@ -895,7 +895,7 @@ class User(AbstractBaseUser, PermissionsMixin):
def recommended_activities(self):
key = "{}:recommended_activities".format(self.username)
cached = cache.get(key)
- if cached:
+ if cached is not None:
return cached
acts = set()
for signup in (
|
perf(users): do not needlessly reevaluate User.recommended_activities
The current logic reevaluates it if the cached list is empty.
|
tjcsl_ion
|
train
|
py
|
52feccbfdf9c65d01238edffe83efa75eb6e248a
|
diff --git a/packages/sankey/src/SankeyLinksItem.js b/packages/sankey/src/SankeyLinksItem.js
index <HASH>..<HASH> 100644
--- a/packages/sankey/src/SankeyLinksItem.js
+++ b/packages/sankey/src/SankeyLinksItem.js
@@ -80,7 +80,7 @@ const SankeyLinksItem = ({
/>
)}
<path
- fill={enableGradient ? `url(#${linkId})` : color}
+ fill={enableGradient ? `url(#${encodeURI(linkId)})` : color}
d={path}
fillOpacity={opacity}
onMouseEnter={handleMouseEnter}
|
fix(sankey): fix issue with gradient links and spaces in IDs (#<I>)
|
plouc_nivo
|
train
|
js
|
43f1c9fac7845f99fddb0ef20bd549ae3d365389
|
diff --git a/website/client/docusaurus.config.js b/website/client/docusaurus.config.js
index <HASH>..<HASH> 100644
--- a/website/client/docusaurus.config.js
+++ b/website/client/docusaurus.config.js
@@ -1,5 +1,5 @@
module.exports = {
- title: 'Effector',
+ title: 'effector',
tagline: 'The state manager',
url: process.env.SITE_URL || 'https://effector.dev',
baseUrl: '/',
@@ -18,9 +18,9 @@ module.exports = {
indexName: 'effector',
},
navbar: {
- title: 'Effector',
+ title: 'effector',
logo: {
- alt: 'Effector Logo',
+ alt: 'effector Logo',
src: 'img/comet.png',
},
items: [
@@ -84,6 +84,10 @@ module.exports = {
label: 'Telegram',
href: 'https://t.me/effector_en',
},
+ {
+ label: 'Youtube',
+ href: 'https://www.youtube.com/channel/UCm8PRc_yjz3jXHH0JylVw1Q',
+ }
],
},
{
@@ -97,7 +101,7 @@ module.exports = {
},
],
logo: {
- alt: 'Effector - the state manager',
+ alt: 'effector - the state manager',
src: 'img/comet.png',
href: 'https://github.com/effector/effector',
},
|
docs: effector name should be lowercased
|
zerobias_effector
|
train
|
js
|
7ade096ed75f415717e6d4138ca9dd5b1bb16f7b
|
diff --git a/intranet/middleware/access_log.py b/intranet/middleware/access_log.py
index <HASH>..<HASH> 100644
--- a/intranet/middleware/access_log.py
+++ b/intranet/middleware/access_log.py
@@ -31,13 +31,7 @@ class AccessLogMiddleWare:
user_agent = request.META.get("HTTP_USER_AGENT", "")
log_line = '{} - {} - [{}] "{}" "{}"'.format(ip, username, datetime.now(), request.get_full_path(), user_agent)
- loggable = True
- for user_agent_substring in settings.NONLOGGABLE_USER_AGENT_SUBSTRINGS:
- if user_agent_substring in user_agent:
- loggable = False
- break
-
- if loggable:
+ if user_agent and not any(user_agent_substring in user_agent for user_agent_substring in settings.NONLOGGABLE_USER_AGENT_SUBSTRINGS)
logger.info(log_line)
return response
|
refactor(logging): use any to determine
if a line is loggable
|
tjcsl_ion
|
train
|
py
|
b962fe38cd09f61c0587606b77a257c44609d0e5
|
diff --git a/agent/testagent.go b/agent/testagent.go
index <HASH>..<HASH> 100644
--- a/agent/testagent.go
+++ b/agent/testagent.go
@@ -25,6 +25,7 @@ import (
"github.com/hashicorp/consul/api"
"github.com/hashicorp/consul/logger"
"github.com/hashicorp/consul/sdk/freeport"
+ "github.com/hashicorp/consul/sdk/testutil"
"github.com/hashicorp/consul/sdk/testutil/retry"
"github.com/stretchr/testify/require"
@@ -149,7 +150,7 @@ func (a *TestAgent) Start(t *testing.T) *TestAgent {
logOutput := a.LogOutput
if logOutput == nil {
- logOutput = os.Stderr
+ logOutput = testutil.TestWriter(t)
}
agentLogger := log.New(logOutput, a.Name+" - ", log.LstdFlags|log.Lmicroseconds)
|
test: send testagent logs through testing.Logf (#<I>)
|
hashicorp_consul
|
train
|
go
|
05f407a70ee9c6d916a4e557562d3ff6e0c3bbf1
|
diff --git a/ui/src/components/tree/QTree.js b/ui/src/components/tree/QTree.js
index <HASH>..<HASH> 100644
--- a/ui/src/components/tree/QTree.js
+++ b/ui/src/components/tree/QTree.js
@@ -617,9 +617,11 @@ export default createComponent({
if (hasSelection.value) {
if (meta.selectable) {
- const val = meta.key !== props.selected ? meta.key : null
- if (props.noSelectionUnset !== true || val !== null) {
- emit('update:selected', val)
+ if (props.noSelectionUnset === false) {
+ emit('update:selected', meta.key !== props.selected ? meta.key : null)
+ }
+ else if (meta.key !== props.selected) {
+ emit('update:selected', meta.key || null)
}
}
}
|
fix(QTree): #<I> with "noSelectionUnset" QTree can't emit null (#<I>)
* fix: Adding an extra props "unSelectable" to QTree (fix #<I>)
* Update QTree.js
* fix: with "noSelectionUnset" QTree can't emit null (fix #<I>)
* Update QTree.js
|
quasarframework_quasar
|
train
|
js
|
76856b967af1f9d467451b229822b8a03d76e29f
|
diff --git a/src/structures/interfaces/Application.js b/src/structures/interfaces/Application.js
index <HASH>..<HASH> 100644
--- a/src/structures/interfaces/Application.js
+++ b/src/structures/interfaces/Application.js
@@ -115,7 +115,7 @@ class Application extends Base {
/**
* When concatenated with a string, this automatically returns the application's name instead of the
- * Oauth2Application object.
+ * Application object.
* @returns {?string}
* @example
* // Logs: Application name: My App
|
docs(Application): rename Oauth2Application to Application (#<I>)
|
discordjs_discord.js
|
train
|
js
|
6545f4dbf41ba5f99666b365bcc5dfe445ece8e7
|
diff --git a/ibis/backends/pandas/execution/strings.py b/ibis/backends/pandas/execution/strings.py
index <HASH>..<HASH> 100644
--- a/ibis/backends/pandas/execution/strings.py
+++ b/ibis/backends/pandas/execution/strings.py
@@ -237,6 +237,8 @@ def execute_group_concat_series_gb_mask(
op, data, sep, mask, aggcontext=None, **kwargs
):
def method(series, sep=sep):
+ if series.empty:
+ return pd.NA
return sep.join(series.values.astype(str))
return aggcontext.agg(
|
fix(pandas): properly handle empty groups when aggregating with `GroupConcat`
|
ibis-project_ibis
|
train
|
py
|
c9c9fc4adfd3f81f0f0e0dd32cc0e3d4dabe24eb
|
diff --git a/spec/gibbon/api_request_spec.rb b/spec/gibbon/api_request_spec.rb
index <HASH>..<HASH> 100644
--- a/spec/gibbon/api_request_spec.rb
+++ b/spec/gibbon/api_request_spec.rb
@@ -60,12 +60,6 @@ describe Gibbon::APIRequest do
end
end
- context 'Faraday::Error::ClientError' do
- let(:error_class) { Faraday::Error::ClientError }
-
- include_examples 'client error handling'
- end
-
context 'Faraday::ClientError' do
let(:error_class) { Faraday::ClientError }
|
test: remove failing deprecated suite
|
amro_gibbon
|
train
|
rb
|
a575e2a311776547b606168fbd4e9316d268ab69
|
diff --git a/libs/linkBankOperations.js b/libs/linkBankOperations.js
index <HASH>..<HASH> 100644
--- a/libs/linkBankOperations.js
+++ b/libs/linkBankOperations.js
@@ -172,6 +172,9 @@ class Linker {
*/
linkBillsToOperations (bills, options) {
const result = {}
+
+ bills = bills.filter(bill => !bill.isThirdPartyPayer === true)
+
return bluebird.each(bills, bill => {
const res = result[bill._id] = {matching: [], reimbursed: []}
// Get all operations whose date is close to out bill
|
feat: linkBankOperations: ignore third party bills
|
konnectors_libs
|
train
|
js
|
2a6353c18db5bbff846d505ad9093fe77251e57f
|
diff --git a/test/components/loader_spec.js b/test/components/loader_spec.js
index <HASH>..<HASH> 100644
--- a/test/components/loader_spec.js
+++ b/test/components/loader_spec.js
@@ -24,7 +24,6 @@ describe('Loader', function() {
})
it('should not contain the MSE/Flash based playbacks when PLAIN_HTML5_ONLY is set', function() {
- PLAIN_HTML5_ONLY == true
const loader = new Loader([], 0, true)
// expected order from previous Clappr versions
const expectedPlaybacks = [HTML5VideoPlayback, HTML5AudioPlayback, HTMLImgPlayback, NoOp]
|
test(loader): remove unnecessary lines from test files
|
clappr_clappr
|
train
|
js
|
7095a7ca7d985d5447aed80cf3e41a4f8c19b954
|
diff --git a/src/utils.js b/src/utils.js
index <HASH>..<HASH> 100644
--- a/src/utils.js
+++ b/src/utils.js
@@ -71,7 +71,7 @@ function defaultGetLocalIdent(
let relativeMatchResource = "";
// eslint-disable-next-line no-underscore-dangle
- if (loaderContext._module.matchResource) {
+ if (loaderContext._module && loaderContext._module.matchResource) {
relativeMatchResource = `${normalizePath(
// eslint-disable-next-line no-underscore-dangle
path.relative(options.context, loaderContext._module.matchResource)
@@ -138,7 +138,8 @@ const icssRegExp = /\.icss\.\w+$/i;
function getModulesOptions(rawOptions, loaderContext) {
const resourcePath =
// eslint-disable-next-line no-underscore-dangle
- loaderContext._module.matchResource || loaderContext.resourcePath;
+ (loaderContext._module && loaderContext._module.matchResource) ||
+ loaderContext.resourcePath;
let isIcss;
|
fix: crash with thread-loader (#<I>)
|
webpack-contrib_css-loader
|
train
|
js
|
a422f8074811e76f89e18051b4d52feb9671fabd
|
diff --git a/src/sendErrorToSlack.js b/src/sendErrorToSlack.js
index <HASH>..<HASH> 100644
--- a/src/sendErrorToSlack.js
+++ b/src/sendErrorToSlack.js
@@ -2,7 +2,8 @@ import Slack from 'slack-node'
import { extend, isEmpty } from 'lodash'
function getRemoteAddress (req) {
- return req.ip ||
+ return req.headers['x-forwarded-for'] ||
+ req.ip ||
req._remoteAddress ||
(req.connection && req.connection.remoteAddress) ||
undefined
|
feat: add req.headers['x-forwarded-for'] support
|
chunkai1312_express-error-slack
|
train
|
js
|
174974caf29d08c656578906c970a8522a3e176e
|
diff --git a/go/vt/sqlparser/parse_test.go b/go/vt/sqlparser/parse_test.go
index <HASH>..<HASH> 100644
--- a/go/vt/sqlparser/parse_test.go
+++ b/go/vt/sqlparser/parse_test.go
@@ -49,7 +49,7 @@ var (
output: "create table x (\n\te enum('red', 'yellow') collate 'utf8_bin' null\n)",
}, {
input: "create table 3t2 (c1 bigint not null, c2 text, primary key(c1))",
- output: "create table 3t2 (\n\tc1 bigint not null,\n\tc2 text,\n\tprimary key (c1)\n)",
+ output: "create table `3t2` (\n\tc1 bigint not null,\n\tc2 text,\n\tprimary key (c1)\n)",
}, {
input: "select 1 from t1 where exists (select 1) = TRUE",
output: "select 1 from t1 where exists (select 1 from dual) = true",
@@ -3496,9 +3496,6 @@ var (
input: "select : from t",
output: "syntax error at position 9 near ':'",
}, {
- input: "select 0xH from t",
- output: "syntax error at position 10 near '0x'",
- }, {
input: "select x'78 from t",
output: "syntax error at position 12 near '78'",
}, {
|
test: fix test expectations and remove an incorrect test
|
vitessio_vitess
|
train
|
go
|
48e443d0e2c4095661a8119ed0ae26084a79b6c6
|
diff --git a/src/mixins/field.js b/src/mixins/field.js
index <HASH>..<HASH> 100644
--- a/src/mixins/field.js
+++ b/src/mixins/field.js
@@ -14,7 +14,7 @@ export const FieldMixin = {
},
created() {
- if (this.vanField) {
+ if (this.vanField && !this.vanField.children) {
this.vanField.children = this;
}
},
diff --git a/src/radio-group/index.js b/src/radio-group/index.js
index <HASH>..<HASH> 100644
--- a/src/radio-group/index.js
+++ b/src/radio-group/index.js
@@ -1,10 +1,11 @@
import { createNamespace } from '../utils';
+import { FieldMixin } from '../mixins/field';
import { ParentMixin } from '../mixins/relation';
const [createComponent, bem] = createNamespace('radio-group');
export default createComponent({
- mixins: [ParentMixin('vanRadio')],
+ mixins: [ParentMixin('vanRadio'), FieldMixin],
props: {
value: null,
|
feat(Form): support using RadioGroup
|
youzan_vant
|
train
|
js,js
|
5c345f6718d6e4fabcbca2d2430b642a2621dc8d
|
diff --git a/packages/vaex-core/vaex/dataframe.py b/packages/vaex-core/vaex/dataframe.py
index <HASH>..<HASH> 100644
--- a/packages/vaex-core/vaex/dataframe.py
+++ b/packages/vaex-core/vaex/dataframe.py
@@ -4423,6 +4423,7 @@ class DataFrame(object):
start, stop, step = item.start, item.stop, item.step
start = start or 0
stop = stop or len(self)
+ stop = min(stop, len(self))
assert step in [None, 1]
if self.filtered and start == 0:
mask = self._selection_masks[FILTER_SELECTION_NAME]
diff --git a/tests/slice_test.py b/tests/slice_test.py
index <HASH>..<HASH> 100644
--- a/tests/slice_test.py
+++ b/tests/slice_test.py
@@ -36,3 +36,10 @@ def test_head_with_selection():
df = vaex.example()
df.select(df.x > 0, name='test')
df.head()
+
+
+def test_slice_beyond_end(df_local):
+ df = df_local
+ df2 = df[:100]
+ assert df2.x.tolist() == df.x.tolist()
+ assert len(df[:100]) == len(df)
|
fix(core): slicing beyond the end of a dataframe should clip it
Fixes #<I>
|
vaexio_vaex
|
train
|
py,py
|
95602c43f890c40e5269a536c93979372f89ab6f
|
diff --git a/src/index.js b/src/index.js
index <HASH>..<HASH> 100644
--- a/src/index.js
+++ b/src/index.js
@@ -327,7 +327,6 @@ class CrawlKit {
* @return {(Stream|Promise.<Object>)} By default a Promise object is returned that resolves to the result. If streaming is enabled it returns a JSON stream of the results.
*/
crawl(shouldStream) {
- const crawlTimer = new NanoTimer();
let stream;
if (shouldStream) {
stream = JSONStream.stringifyObject();
@@ -341,7 +340,7 @@ class CrawlKit {
throw new Error(`Defined url '${this.url}' is not valid.`);
}
const seen = new Map();
- crawlTimer.time((stopCrawlTimer) => {
+ new NanoTimer().time((stopCrawlTimer) => {
let addUrl;
const q = async.queue((scope, workerFinished) => {
scope.tries++;
|
style: no need to put nanoTimer in symbol
|
crawlkit_crawlkit
|
train
|
js
|
44720726b67b247071aba1c69f8bd16a7b3781ee
|
diff --git a/nodes/config-server/config-server.js b/nodes/config-server/config-server.js
index <HASH>..<HASH> 100644
--- a/nodes/config-server/config-server.js
+++ b/nodes/config-server/config-server.js
@@ -212,6 +212,7 @@ module.exports = function(RED) {
getFromContext(key) {
let haCtx = this.context().global.get('homeassistant');
+ haCtx = haCtx || {};
return haCtx[this.nameAsCamelcase]
? haCtx[this.nameAsCamelcase][key]
: null;
|
fix(config-server): trying to get global namespace before it created
|
zachowj_node-red-contrib-home-assistant-websocket
|
train
|
js
|
50321d43ccd12e456eea32efe27e371de30ccd7e
|
diff --git a/lib/browser/managed-upload.js b/lib/browser/managed-upload.js
index <HASH>..<HASH> 100644
--- a/lib/browser/managed-upload.js
+++ b/lib/browser/managed-upload.js
@@ -283,12 +283,6 @@ proto._createStream = function _createStream(file, start, end) {
if (isBlob(file) || isFile(file)) {
return new WebFileReadStream(file.slice(start, end));
}
- // else if (is.string(file)) {
- // return fs.createReadStream(file, {
- // start: start,
- // end: end - 1
- // });
- // }
throw new Error('_createStream requires File/Blob.');
};
diff --git a/lib/managed-upload.js b/lib/managed-upload.js
index <HASH>..<HASH> 100644
--- a/lib/managed-upload.js
+++ b/lib/managed-upload.js
@@ -253,7 +253,9 @@ WebFileReadStream.prototype._read = function _read(size) {
};
proto._createStream = function _createStream(file, start, end) {
- if (isFile(file)) {
+ if (is.readableStream(file)) {
+ return file;
+ } else if (isFile(file)) {
return new WebFileReadStream(file.slice(start, end));
} else if (is.string(file)) {
return fs.createReadStream(file, {
|
feat(node): uploadPart support file stream (#<I>)
|
ali-sdk_ali-oss
|
train
|
js,js
|
adcecc268fb80cf46027aa0eaacb53c6886843dc
|
diff --git a/app/lib/helpers/banner.js b/app/lib/helpers/banner.js
index <HASH>..<HASH> 100644
--- a/app/lib/helpers/banner.js
+++ b/app/lib/helpers/banner.js
@@ -19,6 +19,10 @@ module.exports = function (argv, cmd, details) {
Pkg @quasar/app... ${green('v' + cliAppVersion)}
Debugging......... ${cmd === 'dev' || argv.debug ? green('enabled') : grey('no')}`
+ if (cmd === 'build') {
+ banner += `\n Publishing........ ${argv.publish !== void 0 ? green('yes') : grey('no')}`
+ }
+
if (details) {
banner += `
==================
|
feat(app): Addition to onPublish hooks
|
quasarframework_quasar
|
train
|
js
|
c869c29f84578ad4cd75f0289ed05cb4eed60a27
|
diff --git a/views/js/controller/creator/index.js b/views/js/controller/creator/index.js
index <HASH>..<HASH> 100644
--- a/views/js/controller/creator/index.js
+++ b/views/js/controller/creator/index.js
@@ -70,10 +70,8 @@ define([
* The entrypoint
*/
start() {
-
//TODO move module config away from controllers
const config = module.config();
- config.properties.allowCustomTemplate = config.plugins.some(({ name }) => name === 'xmlResponseProcessing');
const logger = loggerFactory('controller/creator');
/**
@@ -95,12 +93,15 @@ define([
//load plugins dynamically
if (config) {
if(config.plugins){
+ config.properties.allowCustomTemplate = config.plugins.some(({ name }) => name === 'xmlResponseProcessing');
+
_.forEach(config.plugins, plugin => {
if(plugin && plugin.module){
pluginLoader.add(plugin);
}
});
}
+
if(config.contextPlugins){
_.forEach(config.contextPlugins, plugin => {
if(plugin && plugin.module){
|
fix: Use xmlResponseProcessing only when plugins are exists in the config
|
oat-sa_extension-tao-itemqti
|
train
|
js
|
32ded5720cc67b74b7dc39908d87fd915ea1e35f
|
diff --git a/v2/call_option.go b/v2/call_option.go
index <HASH>..<HASH> 100644
--- a/v2/call_option.go
+++ b/v2/call_option.go
@@ -173,6 +173,21 @@ func (o grpcOpt) Resolve(s *CallSettings) {
s.GRPC = o
}
+type pathOpt struct {
+ p string
+}
+
+func (p pathOpt) Resolve(s *CallSettings) {
+ s.Path = p.p
+}
+
+// WithPath applies a Path override to the HTTP-based APICall.
+//
+// This is for internal use only.
+func WithPath(p string) CallOption {
+ return &pathOpt{p: p}
+}
+
// WithGRPCOptions allows passing gRPC call options during client creation.
func WithGRPCOptions(opt ...grpc.CallOption) CallOption {
return grpcOpt(append([]grpc.CallOption(nil), opt...))
@@ -186,4 +201,7 @@ type CallSettings struct {
// CallOptions to be forwarded to GRPC.
GRPC []grpc.CallOption
+
+ // Path is an HTTP override for an APICall.
+ Path string
}
|
feat(v2): add WithPath override support (#<I>)
|
googleapis_gax-go
|
train
|
go
|
594263474c8f4279c1b0cefa6b51a3c0ebb71448
|
diff --git a/spec/rollbar/plugins/delayed_job_spec.rb b/spec/rollbar/plugins/delayed_job_spec.rb
index <HASH>..<HASH> 100644
--- a/spec/rollbar/plugins/delayed_job_spec.rb
+++ b/spec/rollbar/plugins/delayed_job_spec.rb
@@ -32,6 +32,19 @@ describe Rollbar::Delayed, :reconfigure_notifier => true do
FailingJob.new.delay.do_job_please!(:foo, :bar)
end
+
+ it 'adds the job data' do
+ payload = nil
+
+ ::Rollbar::Item.any_instance.stub(:dump) do |item|
+ payload = item.payload
+ nil
+ end
+
+ FailingJob.new.delay.do_job_please!(:foo, :bar)
+
+ expect(payload['data'][:request]["handler"]).to include({:args=>[:foo, :bar], :method_name=>:do_job_please!})
+ end
end
context 'with failed deserialization' do
|
test: verify job data is added correctly
|
rollbar_rollbar-gem
|
train
|
rb
|
e755ff0593390fd4b896afa6fabd53b16af458aa
|
diff --git a/Tests/DependencyInjection/PayumExtensionTest.php b/Tests/DependencyInjection/PayumExtensionTest.php
index <HASH>..<HASH> 100644
--- a/Tests/DependencyInjection/PayumExtensionTest.php
+++ b/Tests/DependencyInjection/PayumExtensionTest.php
@@ -47,9 +47,8 @@ class PayumExtensionTest extends TestCase
{
$factory = $this->createMock(StorageFactoryInterface::class);
$factory
- ->expects($this->any())
->method('getName')
- ->will($this->returnValue('theFoo'))
+ ->willReturn('theFoo')
;
$extension = new PayumExtension;
@@ -73,7 +72,7 @@ class PayumExtensionTest extends TestCase
$factoryWithEmptyName
->expects($this->once())
->method('getName')
- ->will($this->returnValue(''))
+ ->willReturn('')
;
$extension = new PayumExtension;
@@ -91,7 +90,7 @@ class PayumExtensionTest extends TestCase
$factory
->expects($this->atLeastOnce())
->method('getName')
- ->will($this->returnValue('theFoo'))
+ ->willReturn('theFoo')
;
$extension = new PayumExtension;
|
test: upgrade phpunit to <I>
|
Payum_PayumBundle
|
train
|
php
|
d744e51c1bdb4c7a26c0faeea1f2f45baaf5fd3c
|
diff --git a/src/structures/Role.js b/src/structures/Role.js
index <HASH>..<HASH> 100644
--- a/src/structures/Role.js
+++ b/src/structures/Role.js
@@ -197,8 +197,6 @@ class Role extends Base {
* .catch(console.error);
*/
async edit(data, reason) {
- if (typeof data.permissions !== 'undefined') data.permissions = Permissions.resolve(data.permissions);
- else data.permissions = this.permissions.bitfield;
if (typeof data.position !== 'undefined') {
await Util.setPosition(
this,
@@ -220,7 +218,7 @@ class Role extends Base {
name: data.name || this.name,
color: data.color !== null ? Util.resolveColor(data.color || this.color) : null,
hoist: typeof data.hoist !== 'undefined' ? data.hoist : this.hoist,
- permissions: data.permissions,
+ permissions: typeof data.permissions !== 'undefined' ? new Permissions(data.permissions) : this.permissions,
mentionable: typeof data.mentionable !== 'undefined' ? data.mentionable : this.mentionable,
},
reason,
|
fix(Role): pass Permissions class, not the bitfield (#<I>)
|
discordjs_discord.js
|
train
|
js
|
3f9ea688e5ddf9e5e25ddbcdcd12122ae77cb300
|
diff --git a/lib/util/buffer-transform.js b/lib/util/buffer-transform.js
index <HASH>..<HASH> 100644
--- a/lib/util/buffer-transform.js
+++ b/lib/util/buffer-transform.js
@@ -2,6 +2,10 @@ var Transform = require('pipestream').Transform;
var util = require('util');
var iconv = require('iconv-lite');
+function toBuffer(data) {
+ return data ? (data instanceof Buffer ? data : new Buffer(data + '')) : null;
+}
+
function BufferTransform(data) {
if (!(this instanceof BufferTransform)) {
return new BufferTransform(data);
@@ -10,13 +14,13 @@ function BufferTransform(data) {
Transform.call(this);
if (data.body) {
var body = [];
- data.top && body.push(data.top);
+ data.top && body.push(toBuffer(data.top));
body.push(body);
- data.bottom && body.push(data.bottom);
- data.body = Buffer.concat(body);
+ data.bottom && body.push(toBuffer(data.bottom));
+ data.body = Buffer.concat(toBuffer(body));
} else {
- this._top = data.top;
- this._bottom = data.bottom;
+ this._top = toBuffer(data.top);
+ this._bottom = toBuffer(data.bottom);
}
}
|
feat: Add readFilesBuffer
|
avwo_whistle
|
train
|
js
|
ad6df40144c372dcac538f8f43054bf521f99695
|
diff --git a/lib/appium_capybara/driver/appium/driver.rb b/lib/appium_capybara/driver/appium/driver.rb
index <HASH>..<HASH> 100644
--- a/lib/appium_capybara/driver/appium/driver.rb
+++ b/lib/appium_capybara/driver/appium/driver.rb
@@ -79,6 +79,17 @@ module Appium::Capybara
end
# new
+ def swipe(opts)
+ start_x = opts.fetch :start_x, 0
+ start_y = opts.fetch :start_y, 0
+ end_x = opts.fetch :end_x, 0
+ end_y = opts.fetch :end_y, 0
+ duration = opts.fetch :duration, 200
+
+ Appium::TouchAction.new(browser).swipe(start_x: start_x, start_y: start_y, end_x: end_x, end_y: end_y, duration: duration).perform
+ end
+
+ # new
# Use :landscape or :portrait
def rotate(opts)
browser.rotate opts
|
feat: Added swipe feature for android and ios (#<I>)
* added swipe feature for android and ios
* replaced offset with xy coordinates
* arguments as keywords for swipe
|
appium_appium_capybara
|
train
|
rb
|
0909c7b8e8c229b6d95ff035a2b585ba5d5bd70a
|
diff --git a/src/Listener/Traits/FormTypeTrait.php b/src/Listener/Traits/FormTypeTrait.php
index <HASH>..<HASH> 100644
--- a/src/Listener/Traits/FormTypeTrait.php
+++ b/src/Listener/Traits/FormTypeTrait.php
@@ -47,18 +47,7 @@ trait FormTypeTrait
{
$action = $this->_action();
- $formSubmitButtonText = $action->getConfig('scaffold.form_submit_button_text');
- if ($formSubmitButtonText === null) {
- $formSubmitButtonText = $action->getConfig('scaffold.submit_button_text');
- if ($formSubmitButtonText !== null) {
- $this->deprecatedScaffoldKeyNotice(
- 'scaffold.submit_button_text',
- 'scaffold.form_submit_button_text'
- );
- }
- }
-
- return $formSubmitButtonText ?: __d('crud', 'Save');
+ return $action->getConfig('scaffold.form_submit_button_text') ?: __d('crud', 'Save');
}
/**
|
fix: remove deprecated method of setting the form submit button text
|
FriendsOfCake_crud-view
|
train
|
php
|
c4f29c51408b9be6ad513d0eaf9e303ac12a19eb
|
diff --git a/packages/chord/src/ChordCanvas.js b/packages/chord/src/ChordCanvas.js
index <HASH>..<HASH> 100644
--- a/packages/chord/src/ChordCanvas.js
+++ b/packages/chord/src/ChordCanvas.js
@@ -88,7 +88,8 @@ class ChordCanvas extends Component {
this.ctx.translate(centerX, centerY)
- this.ctx.font = `${theme.labels.text.fontSize}px sans-serif`
+ this.ctx.font = `${theme.labels.text.fontSize}px ${theme.labels.text.fontFamily ||
+ 'sans-serif'}`
ribbonGenerator.context(this.ctx)
ribbons.forEach(ribbon => {
diff --git a/website/src/nivoTheme.js b/website/src/nivoTheme.js
index <HASH>..<HASH> 100644
--- a/website/src/nivoTheme.js
+++ b/website/src/nivoTheme.js
@@ -89,6 +89,8 @@ export const lightTheme = {
labels: {
text: {
fill: '#555',
+ fontSize: 12,
+ fontWeight: 500,
},
},
}
|
feat(chord): add support for font style for ChordCanvas
|
plouc_nivo
|
train
|
js,js
|
1bf8bb3c22f435b8b7a68db6e7dcb60bb03a53ba
|
diff --git a/.versionrc.js b/.versionrc.js
index <HASH>..<HASH> 100644
--- a/.versionrc.js
+++ b/.versionrc.js
@@ -20,8 +20,8 @@ module.exports = {
tag: true,
},
scripts: {
- prerelease:
- 'node utils/remove_version_suffix.js && node utils/generate_version_file.js',
- postbump: 'IS_RELEASE=true npm run doc && git add --update',
+ prerelease: 'node utils/remove_version_suffix.js',
+ postbump:
+ 'node utils/generate_version_file.js && IS_RELEASE=true npm run doc && git add --update',
},
};
|
chore: fix version generation during release (#<I>)
|
GoogleChrome_puppeteer
|
train
|
js
|
52c6c93a757a19ea955d2ade2ce20d7b6baf1312
|
diff --git a/revuo/tests.py b/revuo/tests.py
index <HASH>..<HASH> 100644
--- a/revuo/tests.py
+++ b/revuo/tests.py
@@ -18,5 +18,4 @@ class PortalTest(LiveServerTestCase):
home page test at /
"""
self.browser.get(self.live_server_url + '/')
- title = self.browser.find_element_by_tag_name('title')
- self.assertIn('Home', title.text)
+ self.assertIn('Home', self.browser.title)
|
fix: getting page title in home test
|
Lasanha_revuo
|
train
|
py
|
16c1887f4c55eba9625bf655a7813bb7b463cdd4
|
diff --git a/protocol-designer/src/step-forms/reducers/index.js b/protocol-designer/src/step-forms/reducers/index.js
index <HASH>..<HASH> 100644
--- a/protocol-designer/src/step-forms/reducers/index.js
+++ b/protocol-designer/src/step-forms/reducers/index.js
@@ -194,8 +194,8 @@ export const savedStepForms = (
// migrate old kebab-case keys to camelCase
const cleanedLoadedStepForms = mapValues(loadedStepForms, (stepForm) => ({
...omit(stepForm, ['step-name', 'step-details']),
- stepName: stepForm['step-name'],
- stepDetails: stepForm['step-details'],
+ stepName: stepForm.stepName || stepForm['step-name'],
+ stepDetails: stepForm.stepDetails || stepForm['step-details'],
}))
return mapValues(cleanedLoadedStepForms, stepForm => ({
|
fix(protocol-designer): migrate old and new step names and descriptions (#<I>)
|
Opentrons_opentrons
|
train
|
js
|
37c865687b64866b9295e5a3347e5747853db937
|
diff --git a/packages/cloudapi-gql/src/schema/resolvers.js b/packages/cloudapi-gql/src/schema/resolvers.js
index <HASH>..<HASH> 100644
--- a/packages/cloudapi-gql/src/schema/resolvers.js
+++ b/packages/cloudapi-gql/src/schema/resolvers.js
@@ -115,7 +115,7 @@ const resolvers = {
networks: ({ networks }) =>
Promise.all(networks.map(id => resolvers.Query.network(null, { id }))),
// eslint-disable-next-line camelcase
- package: (root) => resolvers.Query.package(null, { name: root.package }),
+ package: root => resolvers.Query.package(null, { name: root.package }),
snapshots: ({ id }, { name }) =>
resolvers.Query.snapshots(null, { machine: id, name }),
// eslint-disable-next-line camelcase
|
feat(cloudapi-gql): resolve Machine package
|
yldio_joyent-portal
|
train
|
js
|
5b53ac09ede7cde2b227b009ad37c2d8aa3cf6d7
|
diff --git a/packages/micro-journeys/src/two-character-layout.js b/packages/micro-journeys/src/two-character-layout.js
index <HASH>..<HASH> 100644
--- a/packages/micro-journeys/src/two-character-layout.js
+++ b/packages/micro-journeys/src/two-character-layout.js
@@ -78,8 +78,10 @@ class BoltTwoCharacterLayout extends withLitHtml() {
this.isInitialRender
) {
setTimeout(() => {
- this.charactersAreReadyInitialization();
- this.isInitialRender = false;
+ window.requestAnimationFrame(() => {
+ this.charactersAreReadyInitialization();
+ this.isInitialRender = false;
+ });
});
}
}
|
fix(micro-journeys): make bolt-character render happen in two-character-layout in requestAnimationFrame
|
bolt-design-system_bolt
|
train
|
js
|
b98694426274c60e3fcd18c8c1871dc26c860c7d
|
diff --git a/spec/basic/handling_spec.js b/spec/basic/handling_spec.js
index <HASH>..<HASH> 100644
--- a/spec/basic/handling_spec.js
+++ b/spec/basic/handling_spec.js
@@ -2,7 +2,7 @@
describe('handling timeout errors', function() {
it('should call error handler on a timeout', function() {
- browser.get('dummyUrl', 1).then(function() {
+ browser.get('http://dummyUrl', 1).then(function() {
throw 'did not handle error';
}, function(err) {
expect(err).toBeDefined();
|
chore(tests): fix test when dummyUrl resolves
When there is a baseUrl, and a router that routes unrecognized paths to the default page, then baseUrl/dummyUrl could actually resolve to a correct page, and this will not fail.
|
angular_protractor
|
train
|
js
|
64e49726cd9ef7912a8017ccc668563568a5418c
|
diff --git a/mod/mod.go b/mod/mod.go
index <HASH>..<HASH> 100644
--- a/mod/mod.go
+++ b/mod/mod.go
@@ -3,6 +3,7 @@ package mod
import (
"net/http"
+ "path"
"github.com/coreos/etcd/mod/dashboard"
"github.com/gorilla/mux"
@@ -10,9 +11,16 @@ import (
var ServeMux *http.Handler
+func addSlash(w http.ResponseWriter, req *http.Request) {
+ http.Redirect(w, req, path.Join("mod", req.URL.Path) + "/", 302)
+ return
+}
+
func HttpHandler() (handler http.Handler) {
modMux := mux.NewRouter()
+ modMux.HandleFunc("/dashboard", addSlash)
modMux.PathPrefix("/dashboard/").
Handler(http.StripPrefix("/dashboard/", dashboard.HttpHandler()))
+
return modMux
}
|
fix(mod): redirect dashboard to /dashboard
|
etcd-io_etcd
|
train
|
go
|
4acc8c8be1971112be45e0feb7fb7eddbfc9d247
|
diff --git a/src/platforms/web/runtime/directives/model.js b/src/platforms/web/runtime/directives/model.js
index <HASH>..<HASH> 100644
--- a/src/platforms/web/runtime/directives/model.js
+++ b/src/platforms/web/runtime/directives/model.js
@@ -3,9 +3,11 @@
* properties to Elements.
*/
-import { looseEqual, looseIndexOf } from 'shared/util'
+import { looseEqual, looseIndexOf, makeMap } from 'shared/util'
import { warn, isAndroid, isIE9, isIE, isEdge } from 'core/util/index'
+const isTextInputType = makeMap('text,password,search,email,tel,url')
+
/* istanbul ignore if */
if (isIE9) {
// http://www.matts411.com/post/internet-explorer-9-oninput/
@@ -28,7 +30,7 @@ export default {
if (isIE || isEdge) {
setTimeout(cb, 0)
}
- } else if (vnode.tag === 'textarea' || el.type === 'text' || el.type === 'password') {
+ } else if (vnode.tag === 'textarea' || isTextInputType(el.type)) {
el._vModifiers = binding.modifiers
if (!binding.modifiers.lazy) {
// Safari < 10.2 & UIWebView doesn't fire compositionend when
|
fix(v-model): use consistent behavior during IME composition for other text-like input types (fix #<I>)
|
IOriens_wxml-transpiler
|
train
|
js
|
fb38ce76b7acaeaa180773b4eaf23c2cacb6ac27
|
diff --git a/test/core/reporters/raw-env.js b/test/core/reporters/raw-env.js
index <HASH>..<HASH> 100644
--- a/test/core/reporters/raw-env.js
+++ b/test/core/reporters/raw-env.js
@@ -1,4 +1,3 @@
-/*global helpers */
describe('reporters - raw-env', function() {
'use strict';
@@ -133,9 +132,12 @@ describe('reporters - raw-env', function() {
if (err) {
return done(err);
}
- var env = helpers.getEnvironmentData();
assert.deepEqual(results.raw, rawResults);
- assert.deepEqual(results.env, env);
+ assert.isNotNull(results.env);
+ assert.isNotNull(results.env.url);
+ assert.isNotNull(results.env.timestamp);
+ assert.isNotNull(results.env.testEnvironement);
+ assert.isNotNull(results.env.testRunner);
done();
});
});
|
test: fix flakey test (#<I>)
* test: fix flakey test
* copy test from v1 reporter
|
dequelabs_axe-core
|
train
|
js
|
2bba86f75d193ec9fcc9c86cbd656b133edba545
|
diff --git a/packages/vaex-core/vaex/column.py b/packages/vaex-core/vaex/column.py
index <HASH>..<HASH> 100644
--- a/packages/vaex-core/vaex/column.py
+++ b/packages/vaex-core/vaex/column.py
@@ -74,9 +74,10 @@ class ColumnIndexed(Column):
self.dtype = self.df.dtype(name)
self.shape = (len(indices),)
self.masked = masked
- max_index = self.indices.max()
- if not np.ma.is_masked(max_index):
- assert max_index < self.df._length_original
+ # this check is too expensive
+ # max_index = self.indices.max()
+ # if not np.ma.is_masked(max_index):
+ # assert max_index < self.df._length_original
@staticmethod
def index(df, column, name, indices, direct_indices_map=None, masked=False):
|
perf(core): don't check the index on the indexed column
|
vaexio_vaex
|
train
|
py
|
4f9fcd863bb20522b5e39f454b718b6d684b7939
|
diff --git a/fluent/fluent_test.go b/fluent/fluent_test.go
index <HASH>..<HASH> 100644
--- a/fluent/fluent_test.go
+++ b/fluent/fluent_test.go
@@ -175,6 +175,22 @@ func Benchmark_PostWithShortMessage(b *testing.B) {
}
}
+func Benchmark_PostWithShortMessageMarshalAsJSON(b *testing.B) {
+ b.StopTimer()
+ f, err := New(Config{MarshalAsJSON: true})
+ if err != nil {
+ panic(err)
+ }
+
+ b.StartTimer()
+ data := map[string]string{"message": "Hello World"}
+ for i := 0; i < b.N; i++ {
+ if err := f.Post("tag", data); err != nil {
+ panic(err)
+ }
+ }
+}
+
func Benchmark_LogWithChunks(b *testing.B) {
b.StopTimer()
f, err := New(Config{})
|
test: Add benchmack test case for marshal as json instead of msgpack
|
fluent_fluent-logger-golang
|
train
|
go
|
623f08ed63dd03e277b0d64ce3453b538c7135f4
|
diff --git a/src/Facades/Helper.php b/src/Facades/Helper.php
index <HASH>..<HASH> 100644
--- a/src/Facades/Helper.php
+++ b/src/Facades/Helper.php
@@ -18,7 +18,7 @@ use Illuminate\Support\Facades\Facade;
*
* @package Enea\Authorization\Facades
*
- * @method static \Enea\Authorization\Contracts\Authorizable authenticated(?string $guard = null)
+ * @method static \Enea\Authorization\Contracts\Authorizable|\Illuminate\Database\Eloquent\Model authenticated(?string $guard = null)
* @method static \Enea\Authorization\Authorizer authorizer()
* @method static \Illuminate\Support\Collection except(\Illuminate\Support\Collection $grantableCollection, array $exceptNames)
*
|
docs: update phpdocs in Helper facade
|
eneav_laravel-authorization
|
train
|
php
|
f10cdc8115ce92591479a780890745f44f6dca61
|
diff --git a/test/openshift-client-test.js b/test/openshift-client-test.js
index <HASH>..<HASH> 100644
--- a/test/openshift-client-test.js
+++ b/test/openshift-client-test.js
@@ -21,6 +21,7 @@ test('openshift client tests', (t) => {
t.ok(client.buildconfigs, 'client object should have a buildconfigs object');
t.ok(client.services, 'client object should have a services object');
t.ok(client.deploymentconfigs, 'client object should have a deploymentconfigs object');
+ t.ok(client.persistentvolumeclaims, 'client object should have a persistentvolumeclaims object');
t.ok(client.routes, 'client object should have a routes object');
t.end();
});
|
fix(tests): missing PVC test
|
nodeshift_openshift-rest-client
|
train
|
js
|
9c75cf6be1ec2af3e73f96e1b91f435cff9258f0
|
diff --git a/lib/all.js b/lib/all.js
index <HASH>..<HASH> 100644
--- a/lib/all.js
+++ b/lib/all.js
@@ -11,15 +11,20 @@ module.exports = function(Promise) {
return Promise.resolve(result);
}
return new Promise(function(resolve, reject) {
- util.forEach(array, function(promised, index) {
- promised.then(function(value) {
+ util.forEach(array, function(p, index) {
+ if (p instanceof Promise) {
+ p._queue.resolve(callResolve);
+ p._queue.catch(reject);
+ p._resume();
+ } else {
+ p.then(callResolve, reject);
+ }
+ function callResolve(value) {
result[index] = value;
if (--size === 0) {
resolve(result);
}
- }, function(reason) {
- reject(reason);
- });
+ }
});
});
};
diff --git a/test/lib/test.all.js b/test/lib/test.all.js
index <HASH>..<HASH> 100644
--- a/test/lib/test.all.js
+++ b/test/lib/test.all.js
@@ -69,7 +69,7 @@ parallel('#Promise#all', () => {
}, DELAY * (limit - n));
});
});
- return Promise.all(tasks)
+ return global.Promise.all(tasks)
.then(res => {
assert.deepEqual(res, [0, 1, 2, 3, 4]);
assert.deepEqual(order, [4, 3, 2, 1, 0]);
|
perf(all): improve performance
|
suguru03_aigle
|
train
|
js,js
|
bb6888885e872293a6f563181401653b3c683275
|
diff --git a/pkg/models/alert.go b/pkg/models/alert.go
index <HASH>..<HASH> 100644
--- a/pkg/models/alert.go
+++ b/pkg/models/alert.go
@@ -24,7 +24,7 @@ type Alert struct {
}
func (alert *Alert) ValidToSave() bool {
- return alert.DashboardId != 0
+ return alert.DashboardId != 0 && alert.OrgId != 0 && alert.PanelId != 0
}
func (this *Alert) ContainsUpdates(other *Alert) bool {
|
fix(alerting): makes valid to save more explicit
|
grafana_grafana
|
train
|
go
|
2f7e698e4d312704041c764a4a4ed01caf3dae40
|
diff --git a/scripts/serverless.js b/scripts/serverless.js
index <HASH>..<HASH> 100755
--- a/scripts/serverless.js
+++ b/scripts/serverless.js
@@ -41,7 +41,9 @@ let hasTelemetryBeenReported = false;
// to properly handle e.g. `SIGINT` interrupt
const keepAliveTimer = setTimeout(() => {}, 60 * 60 * 1000);
-const standaloneCommands = new Set(['doctor', 'plugin install', 'plugin uninstall']);
+// Names of the commands which are configured independently in root `commands` folder
+// and not in Serverless class internals
+const notIntegratedCommands = new Set(['doctor', 'plugin install', 'plugin uninstall']);
process.once('uncaughtException', (error) => {
clearTimeout(keepAliveTimer);
@@ -509,7 +511,7 @@ const processSpanPromise = (async () => {
const configurationFilename = configuration && configurationPath.slice(serviceDir.length + 1);
- const isStandaloneCommand = standaloneCommands.has(command);
+ const isStandaloneCommand = notIntegratedCommands.has(command);
if (isInteractiveSetup || isStandaloneCommand) {
if (configuration) require('../lib/cli/ensure-supported-command')(configuration);
|
refactor: Improve var naming
|
serverless_serverless
|
train
|
js
|
426ac79299f60cd64b003edd6d12f66d80a9b69f
|
diff --git a/packages/site/pages/components/starrating.js b/packages/site/pages/components/starrating.js
index <HASH>..<HASH> 100644
--- a/packages/site/pages/components/starrating.js
+++ b/packages/site/pages/components/starrating.js
@@ -34,7 +34,7 @@ export default withServerProps(_ => (
props={[
PropTypes.row([
'onChange',
- 'function',
+ '(number, Event) => ()',
null,
null,
'triggered when the value changes'
|
refactor(site): update starrating docs with prop signature
|
pluralsight_design-system
|
train
|
js
|
9673f3fd42e6cdaa8e9f7e16965173c7de58b441
|
diff --git a/packages/cozy-stack-client/src/AppCollection.js b/packages/cozy-stack-client/src/AppCollection.js
index <HASH>..<HASH> 100644
--- a/packages/cozy-stack-client/src/AppCollection.js
+++ b/packages/cozy-stack-client/src/AppCollection.js
@@ -11,6 +11,8 @@ export const normalizeApp = app => {
* Implements `DocumentCollection` API along with specific methods for `io.cozy.apps`.
*/
class AppCollection {
+ endpoint = '/apps/'
+
constructor(stackClient) {
this.stackClient = stackClient
}
@@ -24,8 +26,7 @@ class AppCollection {
* @throws {FetchError}
*/
async all() {
- const path = uri`/apps/`
- const resp = await this.stackClient.fetchJSON('GET', path)
+ const resp = await this.stackClient.fetchJSON('GET', this.endpoint)
return {
data: resp.data.map(app => normalizeApp(app)),
meta: {
|
refactor(stack): Prepare AppCollection to be overriden 🛠
|
cozy_cozy-client
|
train
|
js
|
c7439c2c02cecd970fd7ba40f4b943b3cb27242d
|
diff --git a/src/test/java/alexh/ConverterTest.java b/src/test/java/alexh/ConverterTest.java
index <HASH>..<HASH> 100644
--- a/src/test/java/alexh/ConverterTest.java
+++ b/src/test/java/alexh/ConverterTest.java
@@ -128,7 +128,7 @@ public class ConverterTest {
.expect(Converter::intoDouble, 123451123412341231.67132123121234761239847612938743123899d)
.expect(Converter::intoDecimal, new BigDecimal("123451123412341231.6713212312123476123984761293874312389"))
.expect(Converter::intoLocalDateTime, LocalDateTime
- .ofInstant(Instant.ofEpochMilli(123451123412341232l), ZoneId.of("Europe/London")))
+ .ofInstant(Instant.ofEpochMilli(123451123412341232l), ZoneId.systemDefault()))
.throwsWhen(Converter::intoZonedDateTime);
}
|
test(converter): london -> system default to allow tests to run in any time zone
|
alexheretic_dynamics
|
train
|
java
|
a4ebcb026e5aadac8454e06092af0de811f5f926
|
diff --git a/packages/core/renderers/bolt-base.js b/packages/core/renderers/bolt-base.js
index <HASH>..<HASH> 100644
--- a/packages/core/renderers/bolt-base.js
+++ b/packages/core/renderers/bolt-base.js
@@ -59,10 +59,10 @@ export function BoltBase(Base = HTMLElement) {
const slotName = child.getAttribute ? child.getAttribute('slot') : null;
if (!slotName) {
- elem.slots.default.push(child);
- } else {
- elem.slots[slotName] = child;
- }
+ elem.slots.default.push(child);
+ } else {
+ elem.slots[slotName] = child;
+ }
});
}
|
fix: fix additional indent issues
|
bolt-design-system_bolt
|
train
|
js
|
ef559a484828c03335402ad89721cd6ea812ca95
|
diff --git a/src/react/LogMonitor.js b/src/react/LogMonitor.js
index <HASH>..<HASH> 100644
--- a/src/react/LogMonitor.js
+++ b/src/react/LogMonitor.js
@@ -54,7 +54,8 @@ export default class LogMonitor extends Component {
jumpToState: PropTypes.func.isRequired,
setMonitorState: PropTypes.func.isRequired,
select: PropTypes.func.isRequired,
- visibleOnLoad: PropTypes.bool
+ visibleOnLoad: PropTypes.bool,
+ theme: PropTypes.object
};
static defaultProps = {
|
fix(LogMonitor): add theme to propTypes
|
reduxjs_redux-devtools
|
train
|
js
|
a7291d47e95e61f9a2448f69dac05822aa3fb771
|
diff --git a/samtranslator/plugins/__init__.py b/samtranslator/plugins/__init__.py
index <HASH>..<HASH> 100644
--- a/samtranslator/plugins/__init__.py
+++ b/samtranslator/plugins/__init__.py
@@ -1,6 +1,6 @@
import logging
-from samtranslator.model.exceptions import InvalidResourceException
+from samtranslator.model.exceptions import InvalidResourceException, InvalidDocumentException
from enum import Enum
@@ -128,7 +128,7 @@ class SamPlugins(object):
try:
getattr(plugin, method_name)(*args, **kwargs)
- except InvalidResourceException as ex:
+ except (InvalidResourceException, InvalidDocumentException) as ex:
# Don't need to log these because they don't result in crashes
raise ex
except Exception as ex:
|
fix: do not log InvalidDocumentException as an uncaught error (#<I>)
|
awslabs_serverless-application-model
|
train
|
py
|
88f655b0f53a1e93375a26eccc2435c69267aa2d
|
diff --git a/lib/build/webpack-config.js b/lib/build/webpack-config.js
index <HASH>..<HASH> 100644
--- a/lib/build/webpack-config.js
+++ b/lib/build/webpack-config.js
@@ -112,6 +112,7 @@ module.exports = function (cfg) {
layouts: appPaths.resolve.src(`layouts`),
pages: appPaths.resolve.src(`pages`),
assets: appPaths.resolve.src(`assets`),
+ plugins: appPaths.resolve.src(`plugins`),
variables: appPaths.resolve.app(`.quasar/variables.styl`),
// CLI using these ones:
|
feat: Add "plugins" webpack alias
|
quasarframework_quasar-cli
|
train
|
js
|
07a08278f6c62cdc215e112d2b7dc3278b1965f9
|
diff --git a/gulpfile.babel.js b/gulpfile.babel.js
index <HASH>..<HASH> 100755
--- a/gulpfile.babel.js
+++ b/gulpfile.babel.js
@@ -379,6 +379,8 @@ function eslintTargets() {
'gulpfile.babel.js',
'docs/packages/**/*.js',
'core/src/**/*.js',
+ '!core/src/polyfills/**/*.js',
+ '!core/src/vendor/**/*.js',
'bindings/angular1/js/**/*.js',
'bindings/angular1/directives/**/*.js',
'bindings/angular1/services/**/*.js',
|
chore(sling): Ignore third-party modules.
|
OnsenUI_OnsenUI
|
train
|
js
|
963d7e4623735a7cf02e57d85dc3e042bcf502c1
|
diff --git a/omaha/omaha_test.go b/omaha/omaha_test.go
index <HASH>..<HASH> 100644
--- a/omaha/omaha_test.go
+++ b/omaha/omaha_test.go
@@ -36,7 +36,7 @@ func TestOmahaRequestUpdateCheck(t *testing.T) {
t.Error("Expected a Previous Boot Id")
}
- if v.Apps[0].Oem != "ec3000" {
+ if v.Apps[0].OEM != "ec3000" {
t.Error("Expected an OEM")
}
|
fix(omaha): fixup Oem test after change
I forgot to run the tests after making the change to OEM. Fix.
|
coreos_go-omaha
|
train
|
go
|
5fe5c47cd15499ecbc97718a6c57b0536152a39c
|
diff --git a/src/components/button/__tests__/CdrButton.spec.js b/src/components/button/__tests__/CdrButton.spec.js
index <HASH>..<HASH> 100644
--- a/src/components/button/__tests__/CdrButton.spec.js
+++ b/src/components/button/__tests__/CdrButton.spec.js
@@ -97,8 +97,10 @@ describe('CdrButton.vue', () => {
it('adds icon class when slot is used', () => {
const wrapper = shallowMount(CdrButton, {
slots: {
- default: [
+ icon: [
'named slot icon',
+ ],
+ default: [
'default slot for text'
],
},
|
test(button): fix unit test that looks at slots
affects: @rei/cdr-button
|
rei_rei-cedar
|
train
|
js
|
a24d8fad01aa51265dcc620666724b648656221b
|
diff --git a/src/components/tabs/tabs.js b/src/components/tabs/tabs.js
index <HASH>..<HASH> 100644
--- a/src/components/tabs/tabs.js
+++ b/src/components/tabs/tabs.js
@@ -40,6 +40,11 @@ class Tab extends ContentSwitcher {
this._handleKeyDown(event);
})
);
+ this.manage(
+ on(this.element.ownerDocument, 'click', event => {
+ this._handleDocumentClick(event);
+ })
+ );
const selected = this.element.querySelector(this.options.selectorButtonSelected);
if (selected) {
@@ -82,6 +87,20 @@ class Tab extends ContentSwitcher {
}
/**
+ * Handles click on document.
+ * @param {Event} event The triggering event.
+ * @private
+ */
+ _handleDocumentClick(event) {
+ const { element } = this;
+ const isOfSelf = element.contains(event.target);
+ if (isOfSelf) {
+ return;
+ }
+ this._updateMenuState(false);
+ }
+
+ /**
* Handles arrow keys on tab container.
* * Left keys are used to go to previous tab.
* * Right keys are used to go to next tab.
|
feat(tabs): collapse dropdown on document click in mobile variant (#<I>)
|
carbon-design-system_carbon-components
|
train
|
js
|
fe8a31e752fd38ebbff204fc849afad98f3c6238
|
diff --git a/config/webpack-testing.config.js b/config/webpack-testing.config.js
index <HASH>..<HASH> 100644
--- a/config/webpack-testing.config.js
+++ b/config/webpack-testing.config.js
@@ -15,7 +15,7 @@ config.node = {
};
config.module.loaders.forEach(function (loader) {
- if (loader.loader !== 'babel-loader') {
+ if (loader.loader !== 'babel-loader' && loader.tag !== 'glo') {
delete loader.include;
}
});
diff --git a/webpack.js b/webpack.js
index <HASH>..<HASH> 100644
--- a/webpack.js
+++ b/webpack.js
@@ -67,11 +67,11 @@ module.exports = function (config, basePath, options) {
query: {
presets: ['es2015']
},
- include: includePaths,
- exclude: gloPath
+ include: includePaths.concat(gloPath)
},
{
test: /\.js$/,
+ tag: 'glo',
loaders: [
'exports-loader?GLO',
'imports-loader?_=underscore&cola=webcola'
|
test: build glo.js with webpack so unit tests run
|
Kitware_candela
|
train
|
js,js
|
231fc06ca45ff999034920da16a93840526edd2a
|
diff --git a/scripts/rollup.js b/scripts/rollup.js
index <HASH>..<HASH> 100644
--- a/scripts/rollup.js
+++ b/scripts/rollup.js
@@ -28,6 +28,7 @@ gulp.task('rollup-code', '', function() {
'@angular/platform-browser': 'ng.platformBrowser',
'@angular/platform-browser-dynamic': 'ng.platformBrowserDynamic',
'@angular/material': 'ng.material',
+ '@angular/flex-layout': 'ng.flexLayout',
// Rxjs dependencies
'rxjs/Subject': 'Rx',
|
fix(rollup): add missing dep to options.globals (#<I>)
|
Teradata_covalent
|
train
|
js
|
6005d6ecf5ec9b9ae4d3df64e09f24912c84a216
|
diff --git a/deployutils/templatetags/deployutils_tags.py b/deployutils/templatetags/deployutils_tags.py
index <HASH>..<HASH> 100644
--- a/deployutils/templatetags/deployutils_tags.py
+++ b/deployutils/templatetags/deployutils_tags.py
@@ -66,6 +66,8 @@ def site_prefixed(path):
if not path:
return '/%s' % settings.APP_NAME
return urljoin('/%s/' % settings.APP_NAME, path)
+ if not path:
+ return ''
return urljoin('/', path)
|
fix: empty str special case in production as well
|
djaodjin_djaodjin-deployutils
|
train
|
py
|
7455801408059b62f847d2e006517455ed2c0e3e
|
diff --git a/src/component/form-association.js b/src/component/form-association.js
index <HASH>..<HASH> 100644
--- a/src/component/form-association.js
+++ b/src/component/form-association.js
@@ -6,6 +6,8 @@ import {resolvedView} from 'aurelia-view-manager';
export class FormAssociation {
@bindable({defaultBindingMode: bindingMode.twoWay}) value;
+ @bindable name;
+
@bindable options;
@bindable disabled;
|
chore(form-association): add name property
|
SpoonX_aurelia-form
|
train
|
js
|
f436906bf12fd31d738076f7ed5b408e184d6372
|
diff --git a/dom/test/browser/render.js b/dom/test/browser/render.js
index <HASH>..<HASH> 100644
--- a/dom/test/browser/render.js
+++ b/dom/test/browser/render.js
@@ -440,6 +440,7 @@ describe('Rendering', function () {
wrongElement.click();
setTimeout(() => correctElement.click(), 5);
});
+ done();
});
});
|
test(render): add `done()` to test timing out
Add `done()` to *should have the same effect as DOM.select()* test.
|
cyclejs_cyclejs
|
train
|
js
|
cff1601395b9e9660c29ee6ab2052e367ff1ff3d
|
diff --git a/packages/node_modules/@webex/internal-plugin-encryption/src/index.js b/packages/node_modules/@webex/internal-plugin-encryption/src/index.js
index <HASH>..<HASH> 100644
--- a/packages/node_modules/@webex/internal-plugin-encryption/src/index.js
+++ b/packages/node_modules/@webex/internal-plugin-encryption/src/index.js
@@ -9,11 +9,12 @@
// specific action, accept whichever one completes first).
import {registerInternalPlugin} from '@webex/webex-core';
+import {has, isObject, isString} from 'lodash';
+
import Encryption from './encryption';
import config from './config';
-import {has, isObject, isString} from 'lodash';
import {DryError} from './kms-errors';
-import '@webex/internal-plugin-wdm';
+import '@webex/internal-plugin-device';
import '@webex/internal-plugin-mercury';
import KmsDryErrorInterceptor from './kms-dry-error-interceptor';
|
refactor(internal-plugin-encryption): migrate to device
Migrate from internal-plugin-wdm to internal-plugin-device.
|
webex_spark-js-sdk
|
train
|
js
|
025ba38b3e28af67525e63b31457d196ec92d4f9
|
diff --git a/test/index.test.js b/test/index.test.js
index <HASH>..<HASH> 100644
--- a/test/index.test.js
+++ b/test/index.test.js
@@ -5,11 +5,31 @@
const { strict: assert } = require('assert')
const Vinyl = require('vinyl')
const data = require('gulp-data')
+const ejsDependency = require('ejs')
+
const ejs = require('../')
describe('gulp-ejs', function() {
it('should expose ejs global object', function() {
- assert.equal(typeof ejs.__EJS__, 'object')
+ assert.equal(ejs.__EJS__, ejsDependency)
+ })
+
+ it('should work with no suplied data', done => {
+ const stream = ejs()
+
+ stream.on('data', data => {
+ assert.equal(data.contents.toString(), '')
+ })
+
+ stream.on('end', done)
+
+ stream.write(
+ new Vinyl({
+ contents: Buffer.from('')
+ })
+ )
+
+ stream.end()
})
it('should render ejs template', done => {
|
test: add test case for passing no data
|
rogeriopvl_gulp-ejs
|
train
|
js
|
c817a8870ed931d4d5ce76edb7768d2d0bec005b
|
diff --git a/lib/prepare.js b/lib/prepare.js
index <HASH>..<HASH> 100644
--- a/lib/prepare.js
+++ b/lib/prepare.js
@@ -13,6 +13,7 @@ module.exports = async (npmrc, {tarballDir, pkgRoot}, {cwd, env, stdout, stderr,
{
cwd: basePath,
env,
+ preferLocal: true,
}
);
versionResult.stdout.pipe(stdout, {end: false});
|
fix: add missed `preferLocal` option for execa call (#<I>)
|
semantic-release_npm
|
train
|
js
|
43db5d137e8a5847783f9315d1bdd9493c3a30cf
|
diff --git a/funcparserlib/parser.py b/funcparserlib/parser.py
index <HASH>..<HASH> 100644
--- a/funcparserlib/parser.py
+++ b/funcparserlib/parser.py
@@ -504,11 +504,6 @@ def a(value):
>>> expr = a("x")
>>> expr.parse("x")
'x'
-
- ```
-
- ```pycon
- >>> expr = a("x")
>>> expr.parse("y")
Traceback (most recent call last):
...
|
docs: Use a single code fence block for the examples in the docstring for `a()`
It's two tests for the same parser.
|
vlasovskikh_funcparserlib
|
train
|
py
|
53e72ebc8d963649ab0ba6d9c24a11cb3c561231
|
diff --git a/packages/node_modules/@webex/webex-server/src/webex.js b/packages/node_modules/@webex/webex-server/src/webex.js
index <HASH>..<HASH> 100644
--- a/packages/node_modules/@webex/webex-server/src/webex.js
+++ b/packages/node_modules/@webex/webex-server/src/webex.js
@@ -19,7 +19,7 @@ import '@webex/internal-plugin-search';
import '@webex/internal-plugin-support';
import '@webex/internal-plugin-team';
import '@webex/internal-plugin-user';
-import '@webex/internal-plugin-wdm';
+import '@webex/internal-plugin-device';
import WebexCore from '@webex/webex-core';
|
refactor(webex-server): migrate to device
Migrate from internal-plugin-wdm to internal-plugin-device.
|
webex_spark-js-sdk
|
train
|
js
|
7cc8a68d922e11b6168032b44ad70ac0c1df8749
|
diff --git a/src/address-edit/index.js b/src/address-edit/index.js
index <HASH>..<HASH> 100644
--- a/src/address-edit/index.js
+++ b/src/address-edit/index.js
@@ -113,6 +113,12 @@ export default createComponent({
}
return '';
},
+
+ // hide bottom field when use search && detail get focused
+ hideBottomFields() {
+ const { searchResult } = this;
+ return searchResult && searchResult.length && this.detailFocused;
+ },
},
watch: {
@@ -290,13 +296,9 @@ export default createComponent({
},
render(h) {
- const { data, errorInfo, searchResult, disableArea } = this;
+ const { data, errorInfo, disableArea, hideBottomFields } = this;
const onFocus = (name) => () => this.onFocus(name);
- // hide bottom field when use search && detail get focused
- const hideBottomFields =
- searchResult && searchResult.length && this.detailFocused;
-
return (
<div class={bem()}>
<div class={bem('fields')}>
|
fix(AddressEdit): incorrect bottom fields when get focused
|
youzan_vant
|
train
|
js
|
ba8c02f5946a0ead15f633b79b7359ac35135c79
|
diff --git a/pkg/services/sqlstore/alert.go b/pkg/services/sqlstore/alert.go
index <HASH>..<HASH> 100644
--- a/pkg/services/sqlstore/alert.go
+++ b/pkg/services/sqlstore/alert.go
@@ -94,9 +94,9 @@ func HandleAlertsQuery(query *m.GetAlertsQuery) error {
if i > 0 {
sql.WriteString(" OR ")
}
- if strings.HasPrefix(v, "not") {
+ if strings.HasPrefix(v, "not_") {
sql.WriteString("state <> ? ")
- v = v[4:]
+ v = strings.TrimPrefix(v, "not_")
} else {
sql.WriteString("state = ? ")
}
|
refactor: changed string slicing to strings.TrimPrefix, #<I>
|
grafana_grafana
|
train
|
go
|
3d5bd94825688a6814266e7e1401b56e513f84c9
|
diff --git a/src/components/autocomplete/js/autocompleteDirective.js b/src/components/autocomplete/js/autocompleteDirective.js
index <HASH>..<HASH> 100644
--- a/src/components/autocomplete/js/autocompleteDirective.js
+++ b/src/components/autocomplete/js/autocompleteDirective.js
@@ -153,9 +153,10 @@ function MdAutocomplete ($mdTheming, $mdUtil) {
</li>\
' + (function () {
return noItemsTemplate
- ? '<li ng-if="!$mdAutocompleteCtrl.matches.length"\
- ng-hide="$mdAutocompleteCtrl.hidden"\
- md-autocomplete-parent-scope>' + noItemsTemplate + '</li>'
+ ? '<li ng-if="!$mdAutocompleteCtrl.matches.length && !$mdAutocompleteCtrl.loading\
+ && !$mdAutocompleteCtrl.hidden"\
+ ng-hide="$mdAutocompleteCtrl.hidden"\
+ md-autocomplete-parent-scope>' + noItemsTemplate + '</li>'
: '';
})() + '\
</ul>\
|
fix(autocomplete): prevents `not found` message from displaying while
results are loading
|
angular_material
|
train
|
js
|
c3b0c65c64cde1f92329d61b65615d95aa6c6f9d
|
diff --git a/src/request.js b/src/request.js
index <HASH>..<HASH> 100644
--- a/src/request.js
+++ b/src/request.js
@@ -116,7 +116,7 @@ const request = ({
method,
path,
query,
- data = {},
+ data,
authOptions,
signKey = true,
}) => {
@@ -160,7 +160,7 @@ const _request = (
className,
objectId,
method,
- data = {},
+ data,
authOptions,
query
) => {
|
fix: keep the undefined `data` for AV.request
cocos2d-x-lite throws if we send {}
|
leancloud_javascript-sdk
|
train
|
js
|
0630539aa382bc3434c9906488ec2383b9585445
|
diff --git a/spec/coercion.spec.js b/spec/coercion.spec.js
index <HASH>..<HASH> 100644
--- a/spec/coercion.spec.js
+++ b/spec/coercion.spec.js
@@ -142,7 +142,9 @@ var coercionRules = {
var coercionArrayRules = JSON.parse(JSON.stringify(coercionRules));
coercionArrayRules.string.array = [
- { from: ['abc'], to: 'abc' }
+ { from: ['abc'], to: 'abc' },
+ { from: ['abc', 'def'], to: undefined },
+ { from: [], to: undefined }
];
coercionArrayRules.number.array = [
{ from: [1.5], to: 1.5 }
|
test: coerceTypes: "array" coercion should fail if array length != 1, #<I>
|
epoberezkin_ajv
|
train
|
js
|
4b519b32123b81d9ec42bc8576fa14313a03d776
|
diff --git a/src/geshi.php b/src/geshi.php
index <HASH>..<HASH> 100644
--- a/src/geshi.php
+++ b/src/geshi.php
@@ -2034,7 +2034,7 @@ class GeSHi {
preg_match($delimiters, $code, $matches_rx, PREG_OFFSET_CAPTURE, $i)) {
//We got a match ...
$matches[$dk] = array(
- 'next_match' => $matches_rx[0][1],
+ 'next_match' => $matches_rx[1][1],
'dk' => $dk,
'close_strlen' => strlen($matches_rx[2][0]),
|
fix: use the opener pos as start position for regexp strict blocks
|
GeSHi_geshi-1.0
|
train
|
php
|
46adfb48ba53c8663dc34644dc8e04686f7b83a3
|
diff --git a/tests/test_unified_install_cache.py b/tests/test_unified_install_cache.py
index <HASH>..<HASH> 100644
--- a/tests/test_unified_install_cache.py
+++ b/tests/test_unified_install_cache.py
@@ -108,7 +108,7 @@ def test_issues_789_demo():
colorized_isort_pex_info.pex_root = ptex_cache
# Force the standard pex to extract its code. An external tool like Pants would already know the
- # orignal source code file paths, but we need to discover here.
+ # original source code file paths, but we need to discover here.
code_hash = colorized_isort_pex_info.code_hash
assert code_hash is not None
colorized_isort_pex_code_dir = os.path.join(
|
docs: fix simple typo, orignal -> original (#<I>)
There is a small typo in tests/test_unified_install_cache.py.
Should read `original` rather than `orignal`.
|
pantsbuild_pex
|
train
|
py
|
7a8c06d2ea2c60f2b99100088b6122f7b42a9987
|
diff --git a/quasar/src/components/layout/QDrawer.js b/quasar/src/components/layout/QDrawer.js
index <HASH>..<HASH> 100644
--- a/quasar/src/components/layout/QDrawer.js
+++ b/quasar/src/components/layout/QDrawer.js
@@ -70,7 +70,11 @@ export default Vue.extend({
: false
if (this.value !== void 0 && this.value !== showing) {
- this.$emit('input', showing)
+ // setTimeout needed otherwise
+ // it breaks Vue state
+ setTimeout(() => {
+ this.$emit('input', showing)
+ })
}
return {
|
fix(QDrawer): breaking Vue state if initial model is initially true but component immediately emits false #<I>
|
quasarframework_quasar
|
train
|
js
|
8caaff5865829d70bb42ec12265461ad35745eb2
|
diff --git a/authorizer/auth.go b/authorizer/auth.go
index <HASH>..<HASH> 100644
--- a/authorizer/auth.go
+++ b/authorizer/auth.go
@@ -121,7 +121,16 @@ func (s *AuthorizationService) CreateAuthorization(ctx context.Context, a *influ
return err
}
- for _, p := range a.Permissions {
+ if err := VerifyPermissions(ctx, a.Permissions); err != nil {
+ return err
+ }
+
+ return s.s.CreateAuthorization(ctx, a)
+}
+
+// VerifyPermission ensures that an authorization is allowed all of the appropriate permissions.
+func VerifyPermissions(ctx context.Context, ps []influxdb.Permission) error {
+ for _, p := range ps {
if err := IsAllowed(ctx, p); err != nil {
return &influxdb.Error{
Err: err,
@@ -131,7 +140,7 @@ func (s *AuthorizationService) CreateAuthorization(ctx context.Context, a *influ
}
}
- return s.s.CreateAuthorization(ctx, a)
+ return nil
}
// SetAuthorizationStatus checks to see if the authorizer on context has write access to the authorization provided.
|
feat(authorizer): add method to verify integrity of permissions
|
influxdata_influxdb
|
train
|
go
|
0353a762dc8b35a7ed30b006d67dcc618a44f364
|
diff --git a/Database/Concrete/MySQL.php b/Database/Concrete/MySQL.php
index <HASH>..<HASH> 100644
--- a/Database/Concrete/MySQL.php
+++ b/Database/Concrete/MySQL.php
@@ -78,8 +78,6 @@ class MySQL extends AbstractDb
if($this->connect->select_db($this->database)===false)
throw new DbException('can\'t connect to database: ' . $this->connect->error, $this->connect->errno);
- $this->pass=null;
-
$this->query("SET CHARACTER SET 'utf8'"/*, $encoding*/);
}
|
fix: can't reopen timedout connection
|
PHPColibri_framework
|
train
|
php
|
9c87f129500e23297f4f2d768abb5aaf3aaf28d8
|
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -36,7 +36,7 @@ extra_dependencies = {
],
"redis": [
- "redis>=2.10",
+ "redis>=2.10,<3",
],
"watch": [
|
fix(build): pin redis <3
|
Bogdanp_dramatiq
|
train
|
py
|
d5bc4b5f1f2acbb527e9ce22c96bf350858368a6
|
diff --git a/packages/mdc-typography/index.js b/packages/mdc-typography/index.js
index <HASH>..<HASH> 100644
--- a/packages/mdc-typography/index.js
+++ b/packages/mdc-typography/index.js
@@ -39,7 +39,7 @@ module.exports = {
});
if (typography.autoLinkFont) {
- this.ui.writeLine ('Linking Roboto fonts with the application.');
+ this.ui.writeLine (`[${config.environment}]: Linking Roboto fonts with the application.`);
return '<link href="https://fonts.googleapis.com/css?family=Roboto:300,400,500" rel="stylesheet" />';
}
}
|
chore: added environment to log message for more clarity
|
onehilltech_ember-cli-mdc
|
train
|
js
|
94f31b194888e93893d63c74f37fa7e924d0bdc5
|
diff --git a/packages/cli/lib/lib/webpack/run-webpack.js b/packages/cli/lib/lib/webpack/run-webpack.js
index <HASH>..<HASH> 100644
--- a/packages/cli/lib/lib/webpack/run-webpack.js
+++ b/packages/cli/lib/lib/webpack/run-webpack.js
@@ -90,12 +90,17 @@ async function prodBuild(env) {
}
let clientCompiler = webpack(config);
- let stats = await runCompiler(clientCompiler);
- // Timeout for plugins that work on `after-emit` event of webpack
- await new Promise(r => setTimeout(r, 20));
+ try {
+ let stats = await runCompiler(clientCompiler);
- return showStats(stats, true);
+ // Timeout for plugins that work on `after-emit` event of webpack
+ await new Promise(r => setTimeout(r, 20));
+
+ return showStats(stats, true);
+ } catch (error) {
+ console.log(error);
+ }
}
function runCompiler(compiler) {
@@ -104,7 +109,7 @@ function runCompiler(compiler) {
showStats(stats, true);
if (err || (stats && stats.hasErrors())) {
- rej(red('Build failed! ' + (err || '')));
+ rej(`${red('\n\nBuild failed! \n\n')} ${err || ''}`);
}
res(stats);
|
chore: Log build errors (#<I>)
* chore: Display babel build errors during build time
* beauitfy log output
|
developit_preact-cli
|
train
|
js
|
38534639a106284fc5f9cd3b150bd5b364d43027
|
diff --git a/src/formatter/propNameSorter.js b/src/formatter/propNameSorter.js
index <HASH>..<HASH> 100644
--- a/src/formatter/propNameSorter.js
+++ b/src/formatter/propNameSorter.js
@@ -1,13 +1,17 @@
/* @flow */
+const isKeyOrRefProps = (propName: string) => ['key', 'ref'].includes(propName);
+
export default (sortProps: boolean) => (a: string, b: string): -1 | 0 | 1 => {
if (a === b) {
return 0;
}
- if (['key', 'ref'].includes(a)) {
+ if (isKeyOrRefProps(a) && isKeyOrRefProps(b)) {
+ return 1;
+ } else if (isKeyOrRefProps(a)) {
return -1;
- } else if (['key', 'ref'].includes(b)) {
+ } else if (isKeyOrRefProps(b)) {
return 1;
}
|
fix(formatting): Make the props "key" and "ref" order predictibale (#<I>)
|
algolia_react-element-to-jsx-string
|
train
|
js
|
adb9438466e2a1dfb26d7ac3f96af5f1920adc26
|
diff --git a/lib/Model/actions/Creator.js b/lib/Model/actions/Creator.js
index <HASH>..<HASH> 100644
--- a/lib/Model/actions/Creator.js
+++ b/lib/Model/actions/Creator.js
@@ -93,7 +93,7 @@ class Creator {
}
} // for ...
- if (this.model.modifiedByField && whereParts.length > 0) {
+ if (this.model.modifiedByField && updateColumns.length > 0 && whereParts.length > 0) {
updateColumns.push(this.model.modifiedByField)
parsedDoc.keyAndAttributeValues.push(this.model.currentUserFn())
updatePlaceholders.push('$' + (parsedDoc.keyAndAttributeValues.length))
|
fix: If there are no update columns, don't add the modifiedByField
|
wmfs_pg-model
|
train
|
js
|
c792cdf1ccca8ca9e21bca4f257715196f6ec468
|
diff --git a/src/host.js b/src/host.js
index <HASH>..<HASH> 100644
--- a/src/host.js
+++ b/src/host.js
@@ -1,12 +1,10 @@
-const { now: { alias } } = require('../package.json')
-
const port = process.env.PORT || 3000
-const host = process.env.NOW ? `http://${alias}.now.sh` : `http://127.0.0.1:${port}`
+const host = process.env.API_URL
+const allowedCORSHosts = [process.env.CLIENT_URL]
-const allowedCORSHosts = [
- `http://localhost:${port}`,
- `https://localhost:${port}`
-].concat((process.env.CORS_HOSTS || '').split(','))
+if (process.env.CORS_HOSTS) {
+ allowedCORSHosts.push(process.env.CORS_HOSTS.split(','))
+}
exports.allowedCORSHosts = allowedCORSHosts
exports.host = host
|
fix: remove hardcoded urls, now logic
|
redthreadsnet_open-budget-api
|
train
|
js
|
921b5e5ef63da049179d51a8db84fafd5640a41e
|
diff --git a/lib/components/viewers/styled.js b/lib/components/viewers/styled.js
index <HASH>..<HASH> 100644
--- a/lib/components/viewers/styled.js
+++ b/lib/components/viewers/styled.js
@@ -75,14 +75,14 @@ export const Stop = styled.a`
&::after {
content: '';
display: block;
- height: 13pt; /* set position in line-height agnostic way */
+ height: 12pt; /* set position in line-height agnostic way */
width: 10px;
background: ${(props) => props.routeColor};
position: relative;
left: -30px;
/* this is 2px into the blob (to make it look attached) + 30px so that each
stop's bar connects the previous bar with the current one */
- top: -30pt; /* adjust position in a way that is agnostic to line-height */
+ top: -28pt; /* adjust position in a way that is agnostic to line-height */
}
/* hide the first line between blobs */
|
refactor(route-details-viewer): another attempt of tmo-agnostic styling
|
opentripplanner_otp-react-redux
|
train
|
js
|
88bab6c4c87e924fabae656481021437d9370045
|
diff --git a/issue.go b/issue.go
index <HASH>..<HASH> 100644
--- a/issue.go
+++ b/issue.go
@@ -521,9 +521,9 @@ func (s *IssueService) DownloadAttachment(attachmentID string) (*Response, error
return resp, nil
}
-// PostAttachment uploads r (io.Reader) as an attachment to a given attachmentID
-func (s *IssueService) PostAttachment(attachmentID string, r io.Reader, attachmentName string) (*[]Attachment, *Response, error) {
- apiEndpoint := fmt.Sprintf("rest/api/2/issue/%s/attachments", attachmentID)
+// PostAttachment uploads r (io.Reader) as an attachment to a given issueID
+func (s *IssueService) PostAttachment(issueID string, r io.Reader, attachmentName string) (*[]Attachment, *Response, error) {
+ apiEndpoint := fmt.Sprintf("rest/api/2/issue/%s/attachments", issueID)
b := new(bytes.Buffer)
writer := multipart.NewWriter(b)
|
refactor: rename PostAttachment arg to `issueID`
|
andygrunwald_go-jira
|
train
|
go
|
b0600915c6741174f2409897574bb3f76fb0afca
|
diff --git a/lib/api-client/resources/migration.js b/lib/api-client/resources/migration.js
index <HASH>..<HASH> 100644
--- a/lib/api-client/resources/migration.js
+++ b/lib/api-client/resources/migration.js
@@ -48,4 +48,20 @@ Migration.execute = function (params, done) {
});
};
+/**
+ * Execute a migration plan asynchronously
+ * @param {Object} params
+ * @param {String} [params.migrationPlan]
+ * @param {String} [params.processInstanceIds]
+ * @param {Function} done
+ */
+Migration.executeAsync = function (params, done) {
+ var path = this.path + '/executeAsync';
+
+ return this.http.post(path, {
+ data: params,
+ done: done
+ });
+};
+
module.exports = Migration;
|
feat(api): add migration execute async method
related to CAM-<I>
|
camunda_camunda-bpm-sdk-js
|
train
|
js
|
554255cbe9bc72e2122f57b4d9f659f6526ec03a
|
diff --git a/lib/connect.js b/lib/connect.js
index <HASH>..<HASH> 100644
--- a/lib/connect.js
+++ b/lib/connect.js
@@ -15,8 +15,17 @@ function connect (state, options) {
state.replication = this.sync(options.remote, {
create_target: true,
live: true,
- retry: true,
- since: 'now'
+ retry: true
+ })
+
+ state.replication.on('error', function (error) {
+ state.emitter.emit('error', error)
+ })
+
+ state.replication.on('change', function (change) {
+ for (var i = 0; i < change.change.docs.length; i++) {
+ state.emitter.emit(change.direction, change.change.docs[i])
+ }
})
state.emitter.emit('connect')
|
fix: emit change & error events on connect
|
hoodiehq_pouchdb-hoodie-sync
|
train
|
js
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.