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 |
|---|---|---|---|---|---|
36d0eca59fefe28514f6ef190a3a77ac675895be
|
diff --git a/config/helpers.js b/config/helpers.js
index <HASH>..<HASH> 100644
--- a/config/helpers.js
+++ b/config/helpers.js
@@ -19,14 +19,6 @@ function root(args) {
return path.join.apply(path, [ROOT].concat(args));
}
-function checkNodeImport(context, request, cb) {
- if (!path.isAbsolute(request) && request.charAt(0) !== '.') {
- cb(null, 'commonjs ' + request); return;
- }
- cb();
-}
-
exports.hasProcessFlag = hasProcessFlag;
exports.isWebpackDevServer = isWebpackDevServer;
exports.root = root;
-exports.checkNodeImport = checkNodeImport;
|
refactor(helper): checkNodeImport is never used! (#<I>)
|
inchingorg_xdata-web
|
train
|
js
|
d340f36d96b1fb20e91606bc1b17b9475146bd0e
|
diff --git a/lib/index.js b/lib/index.js
index <HASH>..<HASH> 100644
--- a/lib/index.js
+++ b/lib/index.js
@@ -53,6 +53,11 @@ function cache (config = {}) {
return res
}
+ // exclude binary response from cache
+ if (['arraybuffer', 'blob'].indexOf(res.responseType) >= -1) {
+ return res;
+ }
+
return config.store.setItem(uuid, {
expires: config.maxAge === 0 ? 0 : Date.now() + config.maxAge,
data: config.serialize(req, res)
|
feat(cache): exclude binary response
|
RasCarlito_axios-cache-adapter
|
train
|
js
|
093e62150c90930e1e4fb62b54a805859538dae0
|
diff --git a/packages/node_modules/@webex/plugin-authorization-browser/src/authorization.js b/packages/node_modules/@webex/plugin-authorization-browser/src/authorization.js
index <HASH>..<HASH> 100644
--- a/packages/node_modules/@webex/plugin-authorization-browser/src/authorization.js
+++ b/packages/node_modules/@webex/plugin-authorization-browser/src/authorization.js
@@ -6,6 +6,7 @@
import querystring from 'querystring';
import url from 'url';
+
import {base64, oneFlight, whileInFlight} from '@webex/common';
import {grantErrors, WebexPlugin} from '@webex/webex-core';
import {cloneDeep, isEmpty, omit} from 'lodash';
@@ -180,10 +181,12 @@ const Authorization = WebexPlugin.extend({
* @returns {Promise}
*/
requestAccessTokenFromJwt({jwt}) {
+ const hydraUri = this.webex.internal.services.get('hydra', true) ||
+ process.env.HYDRA_SERVICE_URL || 'https://api.ciscospark.com/v1/';
+
return this.webex.request({
method: 'POST',
- service: 'hydra',
- resource: 'jwt/login',
+ uri: `${hydraUri}jwt/login`,
headers: {
authorization: jwt
}
|
fix(plugin-authorization-browser): append manditory hydra uri
Append a statement that allows hydra to be used
as a service before u2c catalogs are collected
|
webex_spark-js-sdk
|
train
|
js
|
0e9d0567e0d856aeb2ffbe8d5a9c14eb9df7c1a8
|
diff --git a/system/Database/OCI8/Connection.php b/system/Database/OCI8/Connection.php
index <HASH>..<HASH> 100644
--- a/system/Database/OCI8/Connection.php
+++ b/system/Database/OCI8/Connection.php
@@ -68,7 +68,7 @@ class Connection extends BaseConnection implements ConnectionInterface
*
* @var resource
*/
- public $stmtId;
+ protected $stmtId;
/**
* Commit mode flag
@@ -82,7 +82,7 @@ class Connection extends BaseConnection implements ConnectionInterface
*
* @var resource
*/
- public $cursorId;
+ protected $cursorId;
/**
* RowID
|
fix: The scope of the access modifier has been changed to protected.
|
codeigniter4_CodeIgniter4
|
train
|
php
|
f2b26095b5581b485075d9495952391b737d1bdd
|
diff --git a/lib/HooksWorkerClient.js b/lib/HooksWorkerClient.js
index <HASH>..<HASH> 100644
--- a/lib/HooksWorkerClient.js
+++ b/lib/HooksWorkerClient.js
@@ -40,7 +40,10 @@ class HooksWorkerClient {
logger.debug('Connecting to hooks handler.');
this.connectToHandler((connectHandlerError) => {
- if (connectHandlerError) { return callback(connectHandlerError); }
+ if (connectHandlerError) {
+ this.terminateHandler(terminateError => callback(connectHandlerError || terminateError));
+ return;
+ }
logger.debug('Registering hooks.');
this.registerHooks((registerHooksError) => {
|
fix: terminate hooks handler if unable to connect
|
apiaryio_dredd
|
train
|
js
|
51fd04826669c705c936c8141ea5b27a640715ce
|
diff --git a/src/components/core/events/onTouchMove.js b/src/components/core/events/onTouchMove.js
index <HASH>..<HASH> 100644
--- a/src/components/core/events/onTouchMove.js
+++ b/src/components/core/events/onTouchMove.js
@@ -185,6 +185,9 @@ export default function onTouchMove(event) {
) {
data.currentTranslate = data.startTranslate;
}
+ if (!swiper.allowSlidePrev && !swiper.allowSlideNext) {
+ data.currentTranslate = data.startTranslate;
+ }
// Threshold
if (params.threshold > 0) {
|
fix(core): don't try to move slider when it is locked
fixes #<I>
|
nolimits4web_swiper
|
train
|
js
|
a3af781f94bc13a4dfff6555d6725d1e0da21173
|
diff --git a/lib/mina-circle/helpers.rb b/lib/mina-circle/helpers.rb
index <HASH>..<HASH> 100644
--- a/lib/mina-circle/helpers.rb
+++ b/lib/mina-circle/helpers.rb
@@ -13,7 +13,8 @@ module MinaCircle
base_path = "#{circle_user}/#{circle_project}/tree/master"
url = "#{base_uri}/#{base_path}?circle-token=#{circle_token}&limit=1&filter=completed"
build_num = JSON.parse(open(url).read).first['build_num'].to_s
- echo "[mina-circle] using build number: #{build_num}"
+ puts "[mina-circle] Using build number: #{build_num}"
+ puts "[mina-circle] Using username/project: #{circle_user}/#{cirlce_project}"
build_num
end
diff --git a/lib/mina-circle/tasks.rb b/lib/mina-circle/tasks.rb
index <HASH>..<HASH> 100644
--- a/lib/mina-circle/tasks.rb
+++ b/lib/mina-circle/tasks.rb
@@ -27,7 +27,7 @@ namespace :circleci do
desc 'Downloads and explodes the archive file containing the build'
task :deploy do
- print "[mina-circle] Fetching: #{circle_artifact}"
+ puts "[mina-circle] Fetching: #{circle_artifact}"
queue "curl -o #{circle_artifact} #{build_url}"
queue "#{circle_explode_command} #{circle_artifact}"
end
|
fix: using puts instead of print/echo
|
sparkbox_mina-circle
|
train
|
rb,rb
|
b1063404c71ad97c611c761eb3d44d0cfcff5dba
|
diff --git a/test/test.js b/test/test.js
index <HASH>..<HASH> 100644
--- a/test/test.js
+++ b/test/test.js
@@ -998,8 +998,10 @@ describe('Integration tests', () => {
.then(() => {
throw new Error('Promise rejection expected');
})
- .catch((err) => console.log(err.message))
- .catch((err) => assert(err.message.indexOf(GUARD_ERROR) >= 0)));
+ .catch((err) => {
+ console.log(err.message);
+ return assert(err.message.indexOf(GUARD_ERROR) >= 0);
+ }));
it('Should allow publishing with special flag', () =>
exec('npm publish --with-publish-please')
|
test(publish): fix test that was green for bad reason
|
inikulin_publish-please
|
train
|
js
|
a2e940133645dba14e16ecccb86d3e801c009893
|
diff --git a/packages/netlify-cms-widget-text/src/TextControl.js b/packages/netlify-cms-widget-text/src/TextControl.js
index <HASH>..<HASH> 100644
--- a/packages/netlify-cms-widget-text/src/TextControl.js
+++ b/packages/netlify-cms-widget-text/src/TextControl.js
@@ -45,6 +45,7 @@ export default class TextControl extends React.Component {
onFocus={setActiveStyle}
onBlur={setInactiveStyle}
style={{ minHeight: '140px' }}
+ css={{ fontFamily: 'inherit' }}
onChange={e => onChange(e.target.value)}
/>
);
|
fix(netlify-cms-widget-text): set correct font family (#<I>)
|
netlify_netlify-cms
|
train
|
js
|
6b74b3a1203d7acf5eae13d798a2c83a1ac964ab
|
diff --git a/lib/generator.js b/lib/generator.js
index <HASH>..<HASH> 100644
--- a/lib/generator.js
+++ b/lib/generator.js
@@ -4,7 +4,7 @@ const micromatch = require('micromatch');
const template = require('./template');
module.exports = function(locals) {
- const config = this.config;
+ const {config} = this;
let skipRenderList = [
'**/*.js',
'**/*.css'
@@ -17,10 +17,10 @@ module.exports = function(locals) {
}
const posts = [].concat(locals.posts.toArray(), locals.pages.toArray())
- .filter(function(post) {
+ .filter(post => {
return post.sitemap !== false && !isMatch(post.source, skipRenderList);
})
- .sort(function(a, b) {
+ .sort((a, b) => {
return b.updated - a.updated;
});
|
refactor: arrow function (#<I>)
|
hexojs_hexo-generator-sitemap
|
train
|
js
|
8d15f88e8c1e400a5f28622aa16e18587aea8a3c
|
diff --git a/allauth/socialaccount/providers/amazon/provider.py b/allauth/socialaccount/providers/amazon/provider.py
index <HASH>..<HASH> 100644
--- a/allauth/socialaccount/providers/amazon/provider.py
+++ b/allauth/socialaccount/providers/amazon/provider.py
@@ -25,7 +25,7 @@ class AmazonProvider(OAuth2Provider):
first_name, last_name = name, ""
if name and " " in name:
first_name, last_name = name.split(" ", 1)
- return dict(email=data["email"], last_name=last_name, first_name=first_name)
+ return dict(email=data.get("email", ""), last_name=last_name, first_name=first_name)
provider_classes = [AmazonProvider]
|
fix(amazon): Handle absent email key
When using 'SCOPE': ["profile:user_id"] the users email address is not returned causing a KeyError.
|
pennersr_django-allauth
|
train
|
py
|
bf433e5730cdcff599d54a91e6039b79a7634bfa
|
diff --git a/client/mobrender/widgets/adjustments/connect.js b/client/mobrender/widgets/adjustments/connect.js
index <HASH>..<HASH> 100644
--- a/client/mobrender/widgets/adjustments/connect.js
+++ b/client/mobrender/widgets/adjustments/connect.js
@@ -20,10 +20,28 @@ const adjustFields = (fields) => {
return adjusts
}
+const validate = (values) => {
+ const errors = {}
+ if (!values.button_text) {
+ errors.button_text = 'Insira o texto do botão'
+ } else if (values.button_text.length > 50) {
+ errors.button_text = 'O limite de caracteres foi atingido.'
+ }
+ return errors
+}
+
export const adjustmentsFormExtend = ({ fields, ...config }) => ModelForm({
form: 'adjustmentsForm',
fields: adjustFields(fields),
...config
})
-export const adjustmentsForm = adjustmentsFormExtend({})
+export const adjustmentsForm = adjustmentsFormExtend({
+ mapInitialValues: (widget) => ({
+ // Fix field to config title on widget
+ call_to_action: widget.settings
+ ? widget.settings.call_to_action ||
+ widget.settings.title_text : ''
+ }),
+ validate
+})
|
chore(adjustments): fix adjustments to use in all place like page
|
nossas_bonde-client
|
train
|
js
|
f5cbd05d30f14b1b08358dd2ad37c818783a4970
|
diff --git a/lib/components/viewers/stop-viewer.js b/lib/components/viewers/stop-viewer.js
index <HASH>..<HASH> 100644
--- a/lib/components/viewers/stop-viewer.js
+++ b/lib/components/viewers/stop-viewer.js
@@ -285,9 +285,13 @@ class StopViewer extends Component {
<FormattedMessage id="components.StopViewer.noStopsFound" />
</div>
)
- // If geometries are available (and are not a point) and stop times
- // are not, it is a strong indication that the stop is a flex stop.
- if (stopData?.geometries?.geoJson?.type !== 'Point') {
+ /* If geometries are available (and are not a point) and stop times
+ are not, it is a strong indication that the stop is a flex stop.
+
+ The extra checks stopData are needed to ensure that the message is
+ not shown while stopData is loading
+ */
+ if (stopData && stopData.geometries && stopData.geometries.geoJson?.type !== 'Point') {
contents = <div><FormattedMessage id="components.StopViewer.flexStop" /></div>
}
} else if (scheduleView) {
|
refactor(stop-viewer): don't show flex message during stopData load
|
opentripplanner_otp-react-redux
|
train
|
js
|
e3eeb46e8df9b30cea5670dd29cad220edc455eb
|
diff --git a/lib/workers/repository/error.js b/lib/workers/repository/error.js
index <HASH>..<HASH> 100644
--- a/lib/workers/repository/error.js
+++ b/lib/workers/repository/error.js
@@ -89,7 +89,10 @@ async function handleError(config, err) {
delete config.branchList; // eslint-disable-line no-param-reassign
return err.message;
}
- if (err.message === 'disk-space') {
+ if (
+ err.message.includes('No space left on device') ||
+ err.message === 'disk-space'
+ ) {
logger.error('Disk space error - skipping');
delete config.branchList; // eslint-disable-line no-param-reassign
return err.message;
|
fix: gracefully ‘No space left on device'
|
renovatebot_renovate
|
train
|
js
|
c707154a2350fa71d2e2d63262760382d61257c2
|
diff --git a/_examples/error-handler/error.go b/_examples/error-handler/error.go
index <HASH>..<HASH> 100644
--- a/_examples/error-handler/error.go
+++ b/_examples/error-handler/error.go
@@ -1,8 +1,8 @@
package main
import (
- "fmt"
"errors"
+ "fmt"
"gopkg.in/h2non/gentleman.v2"
"gopkg.in/h2non/gentleman.v2/context"
|
fix(examples): formatting issue
|
h2non_gentleman
|
train
|
go
|
18f2ecdffdfc70e891750b570bfe8bea5b5ca8c2
|
diff --git a/lib/Launcher.js b/lib/Launcher.js
index <HASH>..<HASH> 100644
--- a/lib/Launcher.js
+++ b/lib/Launcher.js
@@ -35,6 +35,7 @@ const DEFAULT_ARGS = [
'--disable-background-timer-throttling',
'--disable-client-side-phishing-detection',
'--disable-default-apps',
+ '--disable-dev-shm-usage',
'--disable-extensions',
'--disable-hang-monitor',
'--disable-popup-blocking',
diff --git a/test/test.js b/test/test.js
index <HASH>..<HASH> 100644
--- a/test/test.js
+++ b/test/test.js
@@ -46,7 +46,7 @@ const defaultBrowserOptions = {
executablePath,
slowMo,
headless,
- args: ['--no-sandbox', '--disable-dev-shm-usage']
+ args: ['--no-sandbox']
};
let parallel = 1;
|
fix(Launcher): launch chrome with --disable-dev-shm-usage by default (#<I>)
Fixes #<I>.
|
GoogleChrome_puppeteer
|
train
|
js,js
|
701926f0b5834f3d7d13a5cd29c40592360f0c14
|
diff --git a/lib/Task.js b/lib/Task.js
index <HASH>..<HASH> 100644
--- a/lib/Task.js
+++ b/lib/Task.js
@@ -67,8 +67,10 @@ class Task {
this.tasks.log(force, skip)
}
- fail (reason) {
- this.errors.push(reason)
+ fail (reason, exit = false) {
+ this.isFailed = true
+ if (exit) throw new Error(reason)
+ else this.errors.push(reason)
}
}
|
feat(task): exit arg for task.fail() method
|
hjvedvik_tasks
|
train
|
js
|
a609a071785d6d8b874b1ad42ad9d8334f746360
|
diff --git a/lib/operations/execute_operation.js b/lib/operations/execute_operation.js
index <HASH>..<HASH> 100644
--- a/lib/operations/execute_operation.js
+++ b/lib/operations/execute_operation.js
@@ -95,7 +95,8 @@ function executeOperation(topology, operation, callback) {
function executeWithServerSelection(topology, operation, callback) {
const readPreference = operation.readPreference || ReadPreference.primary;
- const shouldRetryReads = topology.s.options.retryReads !== false;
+ const shouldRetryReads =
+ topology.s.options.retryReads !== false && !operation.session.inTransaction();
function callbackWithRetry(err, result) {
if (err == null) {
|
refactor(execute-operation): don't retry reads in a transaction
|
mongodb_node-mongodb-native
|
train
|
js
|
30334c272283252a7ee7dde798e3f8963f077b6c
|
diff --git a/lib/workers/repository/onboarding/pr/index.js b/lib/workers/repository/onboarding/pr/index.js
index <HASH>..<HASH> 100644
--- a/lib/workers/repository/onboarding/pr/index.js
+++ b/lib/workers/repository/onboarding/pr/index.js
@@ -41,7 +41,7 @@ You can post questions in [our Config Help repository](https://github.com/renova
prBody =
prBody.replace(
'{{PACKAGE FILES}}',
- '## Detected Package Files\n\n' + files.join('\n')
+ '### Detected Package Files\n\n' + files.join('\n')
) + '\n';
} else {
prBody = prBody.replace('{{PACKAGE FILES}}\n', '');
|
refactor(onboarding): consistent header depth
|
renovatebot_renovate
|
train
|
js
|
e66c9535408d2c7ce5630091d590d124539e8056
|
diff --git a/scripts/setupCypress.js b/scripts/setupCypress.js
index <HASH>..<HASH> 100644
--- a/scripts/setupCypress.js
+++ b/scripts/setupCypress.js
@@ -11,7 +11,8 @@ const args = {
force: argv.force || false,
localhost: argv.localhost || false,
projectFolder: argv.projectFolder || null,
- pretty: argv.pretty !== false
+ pretty: argv.pretty !== false,
+ json: argv.json
};
/**
@@ -87,13 +88,15 @@ const args = {
await writeJson(cypressConfigPath, cypressConfig);
- console.log(
- `${green("✔")} Created ${green(
- "cypress.json"
- )} config file! To open Cypress, just run ${green("cypress open")} in your terminal.`
- );
+ if (!args.json) {
+ console.log(
+ `${green("✔")} Created ${green(
+ "cypress.json"
+ )} config file! To open Cypress, just run ${green("cypress open")} in your terminal.`
+ );
- console.log(`Created config:`);
+ console.log(`Created config:`);
+ }
if (args.pretty) {
console.log(JSON.stringify(cypressConfig, null, 4));
|
ci: run Cypress tests in parallel
|
Webiny_webiny-js
|
train
|
js
|
36e9d3c890f7ca8f8313f249d59ceae53ab0f12a
|
diff --git a/unicore/distribute/api/repo_status.py b/unicore/distribute/api/repo_status.py
index <HASH>..<HASH> 100644
--- a/unicore/distribute/api/repo_status.py
+++ b/unicore/distribute/api/repo_status.py
@@ -21,20 +21,3 @@ class RepositoryStatusResource(object):
storage_path = self.config.get('repo.storage_path')
return format_repo_status(get_repository(
os.path.join(storage_path, name)))
-
-
-@resource(path='/status/{name}/{commit_id}.json')
-class RepositoryDiffFilesResource(object):
- def __init__(self, request):
- self.request = request
- self.config = get_config(request)
-
- @view(renderer='json')
- def get(self):
- name = self.request.matchdict['name']
- commit_id = self.request.matchdict['commit_id']
- storage_path = self.config.get('repo.storage_path')
- return {
- "commit": commit_id,
- "commit_reversed": commit_id[::-1]
- }
|
refactor: added tests for repo_status.py
|
universalcore_unicore.distribute
|
train
|
py
|
c2cab74105f184113214356969c40dbda7f7cbd7
|
diff --git a/test/k8sT/Services.go b/test/k8sT/Services.go
index <HASH>..<HASH> 100644
--- a/test/k8sT/Services.go
+++ b/test/k8sT/Services.go
@@ -369,9 +369,7 @@ var _ = Describe("K8sServicesTest", func() {
url = getURL(k8s1IP, data.Spec.Ports[0].NodePort)
failRequests(url, count, k8s1Name)
- // FIXME after adding externalTafficPolicy=local flag to BPF maps
- doRequests(url, count, k8s2Name)
- //failRequests(url, count, k8s2Name)
+ failRequests(url, count, k8s2Name)
}
It("Tests NodePort (kube-proxy)", func() {
|
test: Fix externalTafficPolicy=Local test cases
The commit b2c9b<I>e ("bpf, sock: reduce xlation for externalTrafficPolicy=Local to host_id")
has fixed the externalTrafficPolicy=Local behaviour, so adjust the test
accordingly.
|
cilium_cilium
|
train
|
go
|
fc9fd7f4523f1f4202c3001df94eec855573539c
|
diff --git a/src/Cursor.js b/src/Cursor.js
index <HASH>..<HASH> 100644
--- a/src/Cursor.js
+++ b/src/Cursor.js
@@ -2,10 +2,6 @@ import { COLORS } from './colors';
import { DISPLAY_MODES } from './displayModes';
import { ERASE_REGIONS } from './eraseRegions';
-export * from './colors';
-export * from './displayModes';
-export * from './eraseRegions';
-
/**
* Cursor implements low-level API to terminal control codes.
*
@@ -24,10 +20,6 @@ export class Cursor {
* @param {Stream|Array<Stream>} [stream=process.stdout] Streams that will be used as target for cursor
*/
constructor(stream = process.stdout) {
- this.COLORS = COLORS;
- this.DISPLAY_MODES = DISPLAY_MODES;
- this.ERASE_REGIONS = ERASE_REGIONS;
-
this._buffer = '';
this._streams = Array.isArray(stream) ? stream : [stream];
}
|
fix(cursor): Remove unnecessary pointers to COLORS, etc...
|
kittikjs_cursor
|
train
|
js
|
a57fa4605efaed1f7941113231414a135da81dc3
|
diff --git a/tensorpack/dataflow/dataset/caltech101.py b/tensorpack/dataflow/dataset/caltech101.py
index <HASH>..<HASH> 100644
--- a/tensorpack/dataflow/dataset/caltech101.py
+++ b/tensorpack/dataflow/dataset/caltech101.py
@@ -50,7 +50,7 @@ class Caltech101Silhouettes(RNGDataFlow):
self.data = get_images_and_labels("caltech101_silhouettes_28_split1.mat")
- if self.train_or_test == "train":
+ if self.name == "train":
self.images = self.data["train_data"].reshape((4100, 28, 28))
self.labels = self.data["train_labels"].ravel() - 1
elif self.name == "test":
|
fix: train_or_test to name (#<I>)
|
tensorpack_tensorpack
|
train
|
py
|
0a8800d2d426846e48f64790ac55977141c1388c
|
diff --git a/pp.go b/pp.go
index <HASH>..<HASH> 100644
--- a/pp.go
+++ b/pp.go
@@ -120,8 +120,9 @@ func (pp *PrettyPrinter) SetColoringEnabled(enabled bool) {
// SetOutput sets pp's output
func (pp *PrettyPrinter) SetOutput(o io.Writer) {
pp.outLock.Lock()
+ defer pp.outLock.Unlock()
+
pp.out = o
- pp.outLock.Unlock()
}
// GetOutput returns pp's output.
@@ -132,8 +133,9 @@ func (pp *PrettyPrinter) GetOutput() io.Writer {
// ResetOutput sets pp's output back to the default output
func (pp *PrettyPrinter) ResetOutput() {
pp.outLock.Lock()
+ defer pp.outLock.Unlock()
+
pp.out = defaultOut
- pp.outLock.Unlock()
}
// SetColorScheme takes a colorscheme used by all future Print calls.
|
refactor: use defer release lock
|
k0kubun_pp
|
train
|
go
|
7b9fe4e3634f845d435b793eb6730e9f597a16ff
|
diff --git a/lib/plugin/index.js b/lib/plugin/index.js
index <HASH>..<HASH> 100644
--- a/lib/plugin/index.js
+++ b/lib/plugin/index.js
@@ -12,8 +12,8 @@ const defaultConfigCore = require('../config/default.core')
function register (server, options, next) {
const config = buildConfig(defaultConfigCore, defaultConfig, options.config || {})
const { decorateUdaruCore = true } = config
- const udaru = buildUdaru(options.dbPool, config)
if (decorateUdaruCore) {
+ const udaru = buildUdaru(options.dbPool, config)
server.decorate('request', 'udaruCore', udaru)
}
server.decorate('server', 'udaruConfig', config)
|
fix: do not create Udaru instnace when no need to decorate
|
nearform_udaru
|
train
|
js
|
2d831269abc342146381479a09685454aadba696
|
diff --git a/src/util/Permissions.js b/src/util/Permissions.js
index <HASH>..<HASH> 100644
--- a/src/util/Permissions.js
+++ b/src/util/Permissions.js
@@ -150,6 +150,10 @@ class Permissions {
return this.missing(permissions, !explicit);
}
+ valueOf() {
+ return this.bitfield;
+ }
+
/**
* Data that can be resolved to give a permission number. This can be:
* * A string (see {@link Permissions.FLAGS})
|
feat(Permissions): add valueOf method (#<I>)
|
discordjs_discord.js
|
train
|
js
|
a424eec2edf5599d1596cbcd6e8f555cf99ea96e
|
diff --git a/tests/doc/comments.js b/tests/doc/comments.js
index <HASH>..<HASH> 100644
--- a/tests/doc/comments.js
+++ b/tests/doc/comments.js
@@ -959,6 +959,24 @@ map:
`)
})
})
+
+ test('eemeli/yaml#277', () => {
+ const src = source`
+ environment:
+ ### SESSION START ###
+ A: "true"
+ B: "true"
+ ### SESSION END ###
+
+ ### ANOTHER SESSION START ###
+ C: "true"
+ D: "true"
+ ### ANOTHER SESSION END ###
+
+ `
+ const doc = YAML.parseDocument(src)
+ expect(doc.toString()).toBe(src)
+ })
})
describe('eemeli/yaml#18', () => {
|
test: Add example from eemeli/yaml#<I>
|
eemeli_yaml
|
train
|
js
|
8faf8a093722de5be176407bda0e356074a61c60
|
diff --git a/packages/pg-cursor/index.js b/packages/pg-cursor/index.js
index <HASH>..<HASH> 100644
--- a/packages/pg-cursor/index.js
+++ b/packages/pg-cursor/index.js
@@ -28,6 +28,9 @@ util.inherits(Cursor, EventEmitter)
Cursor.prototype._ifNoData = function () {
this.state = 'idle'
this._shiftQueue()
+ if (this.connection) {
+ this.connection.removeListener('rowDescription', this._rowDescription)
+ }
}
Cursor.prototype._rowDescription = function () {
|
fix(pg-cursor): EventEmitter memory leak (#<I>)
|
brianc_node-postgres
|
train
|
js
|
59996c32b8a9239ed88b27007ee9acd5b0ead135
|
diff --git a/app/api/v1/resources/posts.rb b/app/api/v1/resources/posts.rb
index <HASH>..<HASH> 100644
--- a/app/api/v1/resources/posts.rb
+++ b/app/api/v1/resources/posts.rb
@@ -36,12 +36,14 @@ module V1
params_hash = Digest::MD5.hexdigest(declared(params).to_s)
cache_key = "feed-#{last_updated_at}-#{current_tenant.id}-#{params_hash}"
- posts_page = ::Rails.cache.fetch(cache_key, expires_in: 30.minutes, race_condition_ttl: 10) do
+ posts = ::Rails.cache.fetch(cache_key, expires_in: 30.minutes, race_condition_ttl: 10) do
posts = ::GetPosts.call(params: declared(clean_params(params), include_missing: false), tenant: current_tenant, published: true).posts
- ::V1::Entities::Post.represent paginate(posts).records
+ paginated_posts = paginate(posts).records.to_a
+ {records: paginated_posts, headers: header}
end
- posts_page
+ header.merge!(posts[:headers])
+ ::V1::Entities::Post.represent posts[:records]
end
desc 'Show all published posts', { entity: ::V1::Entities::Post, nickname: "allPostFeed" }
|
fix(API): ensure headers are cached and re-applied for Posts Feed
|
cortex-cms_cortex
|
train
|
rb
|
857544c00abacc0abe2322d68167b7c66a4633f0
|
diff --git a/haproxy/tests/test_commands.py b/haproxy/tests/test_commands.py
index <HASH>..<HASH> 100644
--- a/haproxy/tests/test_commands.py
+++ b/haproxy/tests/test_commands.py
@@ -280,7 +280,10 @@ def test_queue_peaks_generated_keys(line_factory, date, expected_key):
cmd = commands.QueuePeaks()
cmd(line_factory(queue_backend=0, accept_date=date))
keys = list(cmd.requests.keys())
- assert keys[0] == expected_key
+ # account for a 1h difference, if UTC is used (as in travis)
+ assert expected_key - 4000 <= keys[0] <= expected_key + 4000
+ # check that microseconds are exact though
+ assert expected_key - int(expected_key) == keys[0] - int(keys[0])
def test_queue_peaks_details(line_factory):
|
test(ci): handle travis being on UTC
|
gforcada_haproxy_log_analysis
|
train
|
py
|
a3c44ad77cb0bfba01820af66296e589457eaa94
|
diff --git a/isort/settings.py b/isort/settings.py
index <HASH>..<HASH> 100644
--- a/isort/settings.py
+++ b/isort/settings.py
@@ -245,7 +245,7 @@ class _Config:
if sys.version_info.major == 2 and sys.version_info.minor <= 6:
py_version = "2"
elif sys.version_info.major == 3 and (
- sys.version_info.minor <= 5 or sys.version_info.minor >= 9
+ sys.version_info.minor <= 5 or sys.version_info.minor >= 10
):
py_version = "3"
else:
|
feat(settings): support Python <I> in auto mode
|
timothycrosley_isort
|
train
|
py
|
0a253eb7373aa2200ccf1e56ef601fcb6623ce18
|
diff --git a/test/unit/dfvalueconverter.spec.js b/test/unit/dfvalueconverter.spec.js
index <HASH>..<HASH> 100644
--- a/test/unit/dfvalueconverter.spec.js
+++ b/test/unit/dfvalueconverter.spec.js
@@ -50,11 +50,11 @@ describe('dfvalueconverter tests', () => {
let val = "";
expect(dfvc.toView(val)).toBe("");
});
-
+
it('should return 0 as begin of unix timestamp', (done) => {
let val = 0;
sut.setLocale('de').then( () => {
- expect(dfvc.toView(val)).toBe("1.1.1970");
+ expect(dfvc.toView(val, { timeZone: 'UTC'})).toBe("1.1.1970");
done();
});
});
|
fix(test): respect timezone for df tests
sets UTC as base for datevalueconverter tests
|
aurelia_i18n
|
train
|
js
|
eb87259928cfceb67b4a640eb7263b2d4d5bb815
|
diff --git a/molgenis-settings/src/main/java/org/molgenis/settings/entity/DataExplorerEntitySettingsMetadata.java b/molgenis-settings/src/main/java/org/molgenis/settings/entity/DataExplorerEntitySettingsMetadata.java
index <HASH>..<HASH> 100644
--- a/molgenis-settings/src/main/java/org/molgenis/settings/entity/DataExplorerEntitySettingsMetadata.java
+++ b/molgenis-settings/src/main/java/org/molgenis/settings/entity/DataExplorerEntitySettingsMetadata.java
@@ -1,7 +1,10 @@
package org.molgenis.settings.entity;
import static java.util.Objects.requireNonNull;
-import static org.molgenis.data.meta.AttributeType.*;
+import static org.molgenis.data.meta.AttributeType.STRING;
+import static org.molgenis.data.meta.AttributeType.XREF;
+import static org.molgenis.data.meta.AttributeType.SCRIPT;
+import static org.molgenis.data.meta.AttributeType.BOOL;
import static org.molgenis.data.meta.model.EntityType.AttributeRole.ROLE_ID;
import static org.molgenis.data.meta.model.Package.PACKAGE_SEPARATOR;
import static org.molgenis.settings.entity.EntitySettingsPackage.PACKAGE_ENTITY_SETTINGS;
|
fix: replace star import with full path
|
molgenis_molgenis
|
train
|
java
|
15a7c904821ba35f218628ef6da3e99d03daaff7
|
diff --git a/src/components/context-menu/ContextMenuDesktop.js b/src/components/context-menu/ContextMenuDesktop.js
index <HASH>..<HASH> 100644
--- a/src/components/context-menu/ContextMenuDesktop.js
+++ b/src/components/context-menu/ContextMenuDesktop.js
@@ -54,8 +54,8 @@ export default {
this.$emit('show', this.event)
},
__onHide (evt) {
- document.body.addEventListener('contextmenu', this.__bodyHide, true)
- document.body.addEventListener('click', this.__bodyHide, true)
+ document.body.removeEventListener('contextmenu', this.__bodyHide, true)
+ document.body.removeEventListener('click', this.__bodyHide, true)
this.$emit('hide', this.event, evt)
}
},
|
fix: QContextMenu does not close when another QContextMenu is opened #<I>
|
quasarframework_quasar
|
train
|
js
|
3a0d78b664417408ed339b3b7533bba38be1e20c
|
diff --git a/tests/system/Publisher/PublisherRestrictionsTest.php b/tests/system/Publisher/PublisherRestrictionsTest.php
index <HASH>..<HASH> 100644
--- a/tests/system/Publisher/PublisherRestrictionsTest.php
+++ b/tests/system/Publisher/PublisherRestrictionsTest.php
@@ -69,11 +69,11 @@ final class PublisherRestrictionsTest extends CIUnitTestCase
public function fileProvider()
{
- yield 'php' => ['index.php'];
-
- yield 'exe' => ['cat.exe'];
-
- yield 'flat' => ['banana'];
+ yield from [
+ 'php' => ['index.php'],
+ 'exe' => ['cat.exe'],
+ 'flat' => ['banana'],
+ ];
}
/**
|
test: refactor dataProvider
|
codeigniter4_CodeIgniter4
|
train
|
php
|
a231c3c14ce5ac2c82afcd83bf86aef7e0278ca4
|
diff --git a/lib/class/block_buffer.js b/lib/class/block_buffer.js
index <HASH>..<HASH> 100644
--- a/lib/class/block_buffer.js
+++ b/lib/class/block_buffer.js
@@ -166,7 +166,7 @@ module.exports = function(Hawkejs, Blast) {
for (i = 0; i < this.length; i++) {
line = this[i];
- if (line instanceof Hawkejs.Placeholder) {
+ if (line instanceof Hawkejs.Placeholder || (line != null && line.getContent != null)) {
(function IIFE(line) {
tasks[tasks.length] = function waitForPlaceholder(next) {
|
feat: Objects in a BlockBuffer that have a #getContent method will be called
|
skerit_hawkejs
|
train
|
js
|
08207db561475e106361a0c48c853f2cc744832e
|
diff --git a/lib/chromedriver.js b/lib/chromedriver.js
index <HASH>..<HASH> 100644
--- a/lib/chromedriver.js
+++ b/lib/chromedriver.js
@@ -216,7 +216,8 @@ class Chromedriver extends events.EventEmitter {
// on Android 7-9 webviews are backed by the main Chrome, not the system webview
if (this.adb) {
const apiLevel = await this.adb.getApiLevel();
- if (apiLevel >= 24 && apiLevel <= 28) {
+ if (apiLevel >= 24 && apiLevel <= 28 &&
+ [WEBVIEW_SHELL_BUNDLE_ID, ...WEBVIEW_BUNDLE_IDS].includes(this.bundleId)) {
this.bundleId = CHROME_BUNDLE_ID;
}
}
|
fix: Bug in chromium-browser handling (#<I>)
When testing chromium-browser (custom-built chrome) on
Android 7-9, the version of chrome will be used instead
of the chromium-browser, because the bundleId of webview
bundle will be replaced with CHROME_BUNDLE_ID.
This patch fixes the bug by adding a check checking whether
the bundleId is a webview bundle id or not.
|
appium_appium-chromedriver
|
train
|
js
|
de38baa26e1b5ffd287d52876f1757c96f6e849b
|
diff --git a/src/special/webpack.js b/src/special/webpack.js
index <HASH>..<HASH> 100644
--- a/src/special/webpack.js
+++ b/src/special/webpack.js
@@ -135,6 +135,7 @@ function loadNextWebpackConfig(filepath) {
plugins: [],
module: { rules: [] },
optimization: { splitChunks: { cacheGroups: {} } },
+ resolve: { alias: () => {} },
};
const fakeContext = { webpack: fakeWebpack, defaultLoaders: {} };
|
fix(webpack): support resolve.alias in fakeConfig for next.js
|
depcheck_depcheck
|
train
|
js
|
bcaa13b40c820bf9f4a8e3f168c02a32db4e9eb5
|
diff --git a/anyconfig/processors.py b/anyconfig/processors.py
index <HASH>..<HASH> 100644
--- a/anyconfig/processors.py
+++ b/anyconfig/processors.py
@@ -212,7 +212,7 @@ class Processors(object):
"""
:param type_or_id: Processor's type or ID to find
"""
- return find_by_type_or_id(type_or_id, self.list(sort=False))
+ return self.find(None, forced_type=type_or_id)
def find(self, obj, forced_type=None,
cls=anyconfig.models.processor.Processor):
|
refactor: don't call find_by_type_or_id directly
don't call find_by_type_or_id directly from Processors' method to
simplify the logic.
|
ssato_python-anyconfig
|
train
|
py
|
c4b6366536dfb59dbe06c5500bf8eed75897f4a2
|
diff --git a/core/commands/root.go b/core/commands/root.go
index <HASH>..<HASH> 100644
--- a/core/commands/root.go
+++ b/core/commands/root.go
@@ -44,6 +44,7 @@ DATA STRUCTURE COMMANDS
files Interact with files as if they were a unix filesystem
object Interact with dag-pb objects (deprecated, use 'dag' or 'files')
block Interact with raw blocks in the datastore
+ cid Convert and discover properties of CIDs
ADVANCED COMMANDS
daemon Start a long-running daemon process
@@ -65,13 +66,14 @@ NETWORK COMMANDS
dht Query the DHT for values or peers
ping Measure the latency of a connection
diag Print diagnostics
+ bitswap Inspect bitswap state
+ pubsub Send and receive messages via pubsub
TOOL COMMANDS
config Manage configuration
version Show IPFS version information
update Download and apply go-ipfs updates
commands List all available commands
- cid Convert and discover properties of CIDs
log Manage and show logs of running daemon
Use 'ipfs <command> --help' to learn more about each command.
|
fix: update root help
* move the `cid` command to the "datastructures" section.
* document bitswap & pubsub commands
fixes #<I>
|
ipfs_go-ipfs
|
train
|
go
|
af3ec0eaf804e1148ed29268f06379a471a3c941
|
diff --git a/floyd/client/module.py b/floyd/client/module.py
index <HASH>..<HASH> 100644
--- a/floyd/client/module.py
+++ b/floyd/client/module.py
@@ -58,10 +58,9 @@ class ModuleClient(FloydHttpClient):
data=multipart_encoder_monitor,
headers={"Content-Type": multipart_encoder.content_type},
timeout=3600)
- except Exception as e:
+ finally:
# always make sure we clear the console
bar.done()
- raise(e)
floyd_logger.info("Done")
return response.json().get("id")
|
fix: also clear progress bar when there is no error
|
floydhub_floyd-cli
|
train
|
py
|
26e2952345ef571664d0d5785b23302446cda066
|
diff --git a/app/lib/quasar-conf-file.js b/app/lib/quasar-conf-file.js
index <HASH>..<HASH> 100644
--- a/app/lib/quasar-conf-file.js
+++ b/app/lib/quasar-conf-file.js
@@ -918,7 +918,6 @@ class QuasarConfFile {
}
if (this.ctx.mode.capacitor) {
-
const { capVersion } = require('./capacitor/cap-cli')
cfg.__versions.capacitor = capVersion
diff --git a/ui/src/components/carousel/QCarousel.js b/ui/src/components/carousel/QCarousel.js
index <HASH>..<HASH> 100644
--- a/ui/src/components/carousel/QCarousel.js
+++ b/ui/src/components/carousel/QCarousel.js
@@ -259,7 +259,7 @@ export default defineComponent({
getPanelContent(),
'sl-cont',
props.swipeable,
- () => panelDirectives
+ () => panelDirectives.value
)
].concat(getContent()))
}
|
fix(QCarousel): swipeable not working correctly #<I>
|
quasarframework_quasar
|
train
|
js,js
|
6e576c02dfebab5474c43d6069247ed32942e3e3
|
diff --git a/src/components/tooltip/tooltip.js b/src/components/tooltip/tooltip.js
index <HASH>..<HASH> 100644
--- a/src/components/tooltip/tooltip.js
+++ b/src/components/tooltip/tooltip.js
@@ -165,7 +165,7 @@ function MdTooltipDirective($timeout, $window, $$rAF, $document, $mdUtil, $mdThe
// Otherwise, recalculate based on 'top' since default is 'bottom'
if (direction) {
newPosition = fitInParent(newPosition);
- } else if (newPosition.top > tooltipParent.prop('scrollHeight') - tipRect.height - TOOLTIP_WINDOW_EDGE_SPACE) {
+ } else if (newPosition.top > element.prop('offsetParent').scrollHeight - tipRect.height - TOOLTIP_WINDOW_EDGE_SPACE) {
newPosition = fitInParent(getPosition('top'));
}
|
fix(tooltip): tooltip will no longer be pushed up if there is room for it within its `offsetParent`
|
angular_material
|
train
|
js
|
08b9d333fab682696b17ce0651a438af9674b22f
|
diff --git a/packages/components/bolt-modal/focus-trap/focus-trap.js b/packages/components/bolt-modal/focus-trap/focus-trap.js
index <HASH>..<HASH> 100755
--- a/packages/components/bolt-modal/focus-trap/focus-trap.js
+++ b/packages/components/bolt-modal/focus-trap/focus-trap.js
@@ -59,8 +59,10 @@ class FocusTrap extends withLitHtml() {
*/
disconnecting() {
super.disconnecting && super.disconnecting();
- this.$start.removeEventListener('focus', this.focusLastElement);
- this.$end.removeEventListener('focus', this.focusFirstElement);
+ // Check that $start and $end are defined. In IE, disconnecting() can be called while $start and $end are still undefined, which throws an error.
+ this.$start &&
+ this.$start.removeEventListener('focus', this.focusLastElement);
+ this.$end && this.$end.removeEventListener('focus', this.focusFirstElement);
this.removeEventListener('focusin', this.onFocusIn);
this.removeEventListener('focusout', this.onFocusOut);
}
|
fix: focus-trap IE JS error
|
bolt-design-system_bolt
|
train
|
js
|
0576f3b2d22cd744fa6f6bd4a47a99f912aedcdf
|
diff --git a/packages/jsx/src/lib/actions/fetchPosts.js b/packages/jsx/src/lib/actions/fetchPosts.js
index <HASH>..<HASH> 100644
--- a/packages/jsx/src/lib/actions/fetchPosts.js
+++ b/packages/jsx/src/lib/actions/fetchPosts.js
@@ -10,7 +10,7 @@ export const FETCHING_POSTS_SUCCESS = "FETCHING_POSTS_SUCCESS";
export const FETCHING_POSTS_CANCELLED = "FETCHING_POSTS_CANCELLED";
export const FETCHING_POSTS = "FETCHING_POSTS";
-export const FETCHING_POSTS_PER_PAGE = 16;
+export const FETCHING_POSTS_PER_PAGE = 4;
export const fetchPostsCreator = (fetchUrl, type = "global") => (dispatch, getState) => {
const state = getState();
|
perf(jsx): Set `FETCHING_POSTS_PER_PAGE` to `4`.
Load fewer posts so I can better see who's scrolling how far down. Semi-related to #<I>.
|
randytarampi_me
|
train
|
js
|
3fa73c4c170467ecaf7c00338ddfd7e855fc4d0a
|
diff --git a/src/utils/helper.js b/src/utils/helper.js
index <HASH>..<HASH> 100644
--- a/src/utils/helper.js
+++ b/src/utils/helper.js
@@ -753,6 +753,7 @@ export const suggestionTypes = {
Index: 'index',
Recent: 'recent',
Promoted: 'promoted',
+ Featured: 'featured',
};
// this map helps to get the interval divider
|
feat: add _featured_ suggestion type to suggestion types constants map
|
appbaseio_reactivecore
|
train
|
js
|
8e5b3d784b6cb90c95bf88a365afb1ce740f6ab9
|
diff --git a/src/actions/auth.js b/src/actions/auth.js
index <HASH>..<HASH> 100644
--- a/src/actions/auth.js
+++ b/src/actions/auth.js
@@ -271,7 +271,10 @@ export const createUserProfile = (dispatch, firebase, userData, profile) => {
}
// Convert custom object type within Provider data to a normal object
- if (isArray(newProfile.providerData)) {
+ if (
+ isArray(newProfile.providerData) &&
+ newProfile.providerData.length
+ ) {
newProfile.providerData = newProfile.providerData.map(
providerDataItem =>
pick(providerDataItem, config.keysToPreserveFromProviderData)
|
fix(profile): only include providerData if it is not an empty array in Firestore - #<I>
|
prescottprue_react-redux-firebase
|
train
|
js
|
6601525e2c6274686c86f9d95526cf147d3fe677
|
diff --git a/prudentia/cli.py b/prudentia/cli.py
index <HASH>..<HASH> 100644
--- a/prudentia/cli.py
+++ b/prudentia/cli.py
@@ -3,7 +3,8 @@ import os
from os import path
import sys
-from . import __version__
+from . import __version__ as prudentia_ver
+from ansible import __version__ as ansible_ver
# Setting Ansible config file environment variable as first thing
@@ -29,10 +30,11 @@ Providers = {
def parse(args=None):
parser = argparse.ArgumentParser(
- prog='prudentia',
+ prog='Prudentia',
description='A useful Continuous Deployment toolkit.'
)
- parser.add_argument('-v', '--version', action='version', version='%(prog)s ' + __version__)
+ parser.add_argument('-v', '--version', action='version',
+ version='%(prog)s ' + prudentia_ver + ', Ansible ' + ansible_ver)
parser.add_argument('provider', choices=Providers.keys(),
help='use one of the available providers')
parser.add_argument('commands', nargs='*', default='',
|
chore(version): Prints Ansible version as well
|
StarterSquad_prudentia
|
train
|
py
|
0f9db2706a3f35cc23df1f7c7d8df64f387e1ab5
|
diff --git a/src/geshi/vbscript.php b/src/geshi/vbscript.php
index <HASH>..<HASH> 100644
--- a/src/geshi/vbscript.php
+++ b/src/geshi/vbscript.php
@@ -77,7 +77,7 @@ $language_data = array (
'UCase', 'VarType', 'Weekday', 'WeekdayName', 'Year'
),
3 => array(
- 'Call', 'Case', 'Const', 'Dim', 'Do', 'Each', 'Else', 'Erase',
+ 'Call', 'Case', 'Const', 'Dim', 'Do', 'Each', 'Else', 'End', 'Erase',
'Execute', 'Exit', 'For', 'Function', 'If', 'Loop', 'Next',
'On Error', 'Option Explicit', 'Private', 'Public',
'Randomize', 'ReDim', 'Rem', 'Select', 'Set', 'Sub', 'Then',
@@ -143,6 +143,9 @@ $language_data = array (
'HIGHLIGHT_STRICT_BLOCK' => array(
),
'PARSER_CONTROL' => array(
+ 'KEYWORDS' => array(
+ 'SPACE_AS_WHITESPACE' => true
+ ),
'ENABLE_FLAGS' => array(
'BRACKETS' => GESHI_NEVER
)
|
fix: Some minor additions for VBScript
|
GeSHi_geshi-1.0
|
train
|
php
|
8e1ed2ffee5e10041de6a2d4dd12430626174556
|
diff --git a/index.js b/index.js
index <HASH>..<HASH> 100644
--- a/index.js
+++ b/index.js
@@ -7,4 +7,4 @@ const bucket = require(path.join(__dirname, 'lib', 'bucket'));
/* export gridfs bucket */
-module.exports = bucket;
+module.exports = exports = bucket;
diff --git a/lib/bucket.js b/lib/bucket.js
index <HASH>..<HASH> 100644
--- a/lib/bucket.js
+++ b/lib/bucket.js
@@ -10,7 +10,6 @@ const createFileSchema = require(path.join(__dirname, 'schema'));
const {
GridFSBucket,
MongooseTypes: { ObjectId },
- isConnected,
toCollectionName,
model
} = require('@lykmapipo/mongoose-common');
@@ -586,13 +585,6 @@ function createBucket(optns = {}) {
const options =
_.merge({}, DEFAULT_BUCKET_OPTIONS, _.omit(optns, 'connection'));
- // check if connection is connected.
- if (!isConnected(connection)) {
- const error = new Error('Mongoose is not connected');
- error.status = 500;
- throw error;
- }
-
// create GridFSBucket
const db = connection.db;
const bucket = new GridFSBucket(db, options);
|
refactor(bucket): remove exist connection check to allow lazy connections
|
lykmapipo_mongoose-gridfs
|
train
|
js,js
|
5ea2b6fe2f3ccb5e465f65fca359baf7210e5fdb
|
diff --git a/packages/netlify-cms-widget-code/src/CodeControl.js b/packages/netlify-cms-widget-code/src/CodeControl.js
index <HASH>..<HASH> 100644
--- a/packages/netlify-cms-widget-code/src/CodeControl.js
+++ b/packages/netlify-cms-widget-code/src/CodeControl.js
@@ -271,6 +271,8 @@ export default class CodeControl extends React.Component {
id={forID}
className={css`
height: 100%;
+ border-radius: 0 3px 3px 3px;
+ overflow: hidden;
.CodeMirror {
height: auto;
diff --git a/packages/netlify-cms-widget-code/src/SettingsPane.js b/packages/netlify-cms-widget-code/src/SettingsPane.js
index <HASH>..<HASH> 100644
--- a/packages/netlify-cms-widget-code/src/SettingsPane.js
+++ b/packages/netlify-cms-widget-code/src/SettingsPane.js
@@ -13,8 +13,10 @@ const SettingsPaneContainer = styled.div`
z-index: 10;
height: 100%;
background-color: #fff;
+ overflow: hidden;
overflow-y: scroll;
padding: 12px;
+ border-radius: 0 3px 3px 0;
${shadows.drop};
`;
|
fix: allow widget overflow (#<I>)
|
netlify_netlify-cms
|
train
|
js,js
|
a3b126099a34ee0a9dc000fc551c3da9cd67f534
|
diff --git a/lib/validator.js b/lib/validator.js
index <HASH>..<HASH> 100644
--- a/lib/validator.js
+++ b/lib/validator.js
@@ -198,7 +198,13 @@ function autoCast(value, parameterDefinition) {
return result;
}
case 'boolean': {
- return value.toLowerCase() === 'true' || value.toLowerCase() === 'false' ? value.toLowerCase() === 'true' : value;
+ if (typeof (value) == 'boolean') {
+ return value;
+ } else if (typeof (value) == 'string') {
+ return value.toLowerCase() === 'true' || value.toLowerCase() === 'false' ? value.toLowerCase() === 'true' : value;
+ } else {
+ return value;
+ }
}
case 'integer': {
const result = Number(value);
|
fix: don't error on undefined param
|
DriveTimeInc_gangplank
|
train
|
js
|
b0166737f6ab73af6b7346463884bfbff3b626b0
|
diff --git a/test/instrumentation/modules/ioredis.js b/test/instrumentation/modules/ioredis.js
index <HASH>..<HASH> 100644
--- a/test/instrumentation/modules/ioredis.js
+++ b/test/instrumentation/modules/ioredis.js
@@ -51,7 +51,7 @@ test('not nested', function (t) {
t.strictEqual(calls, 3)
agent.endTransaction()
- redis.quit()
+ redis.disconnect()
agent.flush()
})
})
@@ -91,7 +91,7 @@ test('nested', function (t) {
t.strictEqual(calls, 2)
agent.endTransaction()
- redis.quit()
+ redis.disconnect()
agent.flush()
})
})
@@ -123,7 +123,7 @@ test('rejections_handled', function (t) {
redis.get('a', function (err, result) {
t.ok(err)
trans.end()
- redis.quit()
+ redis.disconnect()
agent.flush()
}) // wrong type, should reject
})
|
fix(tests): fix hang in ioredis test (#<I>)
ioredis@<I> includes a bug when using `redis.quit()` that can leave
a setInterval uncleared. See luin/ioredis#<I>.
Fixes #<I>
|
elastic_apm-agent-nodejs
|
train
|
js
|
cafef19a4696057d6816aa1bf82f4599676a1965
|
diff --git a/packages/form/src/Field.js b/packages/form/src/Field.js
index <HASH>..<HASH> 100644
--- a/packages/form/src/Field.js
+++ b/packages/form/src/Field.js
@@ -35,14 +35,14 @@ const Field = ({
const labelCol = {};
if (grid) {
- colSizes.forEach((colSize) => {
+ for (const colSize of colSizes) {
if (grid[colSize]) {
row = true;
const sizeNum = Number.parseInt(grid[colSize], 10);
col[colSize] = sizeNum;
labelCol[colSize] = 12 - sizeNum;
}
- });
+ }
}
let input = (
@@ -124,6 +124,7 @@ const Field = ({
};
Field.propTypes = {
+ name: PropTypes.string.isRequired,
append: PropTypes.node,
children: PropTypes.func,
disabled: PropTypes.bool,
@@ -136,7 +137,6 @@ Field.propTypes = {
labelAttrs: PropTypes.object,
labelClass: PropTypes.string,
labelHidden: PropTypes.bool,
- name: PropTypes.string.isRequired,
prepend: PropTypes.node,
readOnly: PropTypes.bool,
size: PropTypes.string,
|
fix(form): resolve lint error
|
Availity_availity-react
|
train
|
js
|
3f3f5c33e1c2d3c5c4493213812f564b04b6b280
|
diff --git a/protocol-designer/webpack.config.js b/protocol-designer/webpack.config.js
index <HASH>..<HASH> 100644
--- a/protocol-designer/webpack.config.js
+++ b/protocol-designer/webpack.config.js
@@ -16,7 +16,7 @@ const PROTOCOL_DESIGNER_ENV_VAR_PREFIX = 'OT_PD_'
// Also remove all OT_PD_VERSION env vars, the version should always
// be gleaned from the package.json
-const OT_PD_VERSION = '4.0.3'
+const OT_PD_VERSION = '4.0.4'
const OT_PD_BUILD_DATE = new Date().toUTCString()
const JS_ENTRY = path.join(__dirname, 'src/index.js')
|
chore(protocol-designer): bump to <I> (#<I>)
|
Opentrons_opentrons
|
train
|
js
|
7f7ec67dc484078b1fa706bbd7ec1072d2c4e132
|
diff --git a/src/elements/Step/StepGroup.js b/src/elements/Step/StepGroup.js
index <HASH>..<HASH> 100644
--- a/src/elements/Step/StepGroup.js
+++ b/src/elements/Step/StepGroup.js
@@ -35,7 +35,7 @@ function StepGroup(props) {
size,
useKeyOnly(fluid, 'fluid'),
useKeyOnly(ordered, 'ordered'),
- useKeyOnly(unstackable, 'unstackable,'),
+ useKeyOnly(unstackable, 'unstackable'),
useKeyOnly(vertical, 'vertical'),
useValueAndKey(stackable, 'stackable'),
'steps',
|
fix(Step): fixed typo in Step.Group className (#<I>)
fixed typo of invalid comma for the generated class unstackable
|
Semantic-Org_Semantic-UI-React
|
train
|
js
|
4674c7ed3db63e6258cf68c72ca3623e00f1bd09
|
diff --git a/src/components/Table/helpers/columns/__test__/getColumns.spec.js b/src/components/Table/helpers/columns/__test__/getColumns.spec.js
index <HASH>..<HASH> 100644
--- a/src/components/Table/helpers/columns/__test__/getColumns.spec.js
+++ b/src/components/Table/helpers/columns/__test__/getColumns.spec.js
@@ -68,7 +68,7 @@ describe('getColumns', () => {
{
sortable: false,
type: 'action',
- width: 50,
+ width: 75,
},
]);
});
diff --git a/src/components/Table/helpers/columns/getColumns.js b/src/components/Table/helpers/columns/getColumns.js
index <HASH>..<HASH> 100644
--- a/src/components/Table/helpers/columns/getColumns.js
+++ b/src/components/Table/helpers/columns/getColumns.js
@@ -27,7 +27,7 @@ export default function getColumns(params) {
if (type === 'action') {
return {
...column.props,
- width: widthNumber || 50,
+ width: widthNumber || 75,
};
}
return {
|
fix: change action column widht in Table (#<I>)
|
90milesbridge_react-rainbow
|
train
|
js,js
|
d1c01c868d947ded62586273205b4bb580973c68
|
diff --git a/karma.conf.js b/karma.conf.js
index <HASH>..<HASH> 100755
--- a/karma.conf.js
+++ b/karma.conf.js
@@ -135,8 +135,7 @@ module.exports = function(config) {
browserNoActivityTimeout: 4 * 60 * 1000,
captureTimeout: 4 * 60 * 1000,
reporters: ['progress', 'saucelabs'],
- sauceLabs: sauceLabsConf,
- customLaunchers: {
+ sauceLabs: {
startConnect: false,
options: {},
username: process.env.SAUCE_USERNAME,
@@ -149,6 +148,7 @@ module.exports = function(config) {
undefined,
recordScreenshots: true,
},
+ customLaunchers: saucelabsBrowsers,
browsers: Object.keys(saucelabsBrowsers),
});
break;
|
test: fix saucelabs conf
|
chialab_dna
|
train
|
js
|
f339b00e588d365ae7162e2dfa9ab9cf4b02b9fb
|
diff --git a/components/shortcuts/shortcuts.js b/components/shortcuts/shortcuts.js
index <HASH>..<HASH> 100644
--- a/components/shortcuts/shortcuts.js
+++ b/components/shortcuts/shortcuts.js
@@ -17,7 +17,7 @@ export default class Shortcuts extends PureComponent {
options: {}
};
- componentWillMount() {
+ componentDidMount() {
if (!this.props.disabled) {
this.turnShorcutsOn();
}
|
chore: "componentWillMount"=>"componentDidMount" as React suggests
|
JetBrains_ring-ui
|
train
|
js
|
e8d1d9a5002a4305dffb361f3c36a2e97a83e8f7
|
diff --git a/packages/cozy-konnector-libs/src/libs/categorization/localModel/parameters.js b/packages/cozy-konnector-libs/src/libs/categorization/localModel/parameters.js
index <HASH>..<HASH> 100644
--- a/packages/cozy-konnector-libs/src/libs/categorization/localModel/parameters.js
+++ b/packages/cozy-konnector-libs/src/libs/categorization/localModel/parameters.js
@@ -1,10 +1,5 @@
-const cozyClient = require('../../cozyclient')
const { BankTransaction } = require('cozy-doctypes')
-if (!BankTransaction.cozyClient) {
- BankTransaction.registerClient(cozyClient)
-}
-
async function fetchTransactionsWithManualCat() {
const transactionsWithManualCat = await BankTransaction.queryAll({
manualCategoryId: { $exists: true }
|
fix: Do not register client in library
1. client could have been registered on Document directly and in this
case, BankTransaction.cozyClient is the wrong check
2. library code should not register the client, it should be up to
to the app
|
konnectors_libs
|
train
|
js
|
5f98a40832bfdd0a23f60ebe36fd0310771a94a5
|
diff --git a/test/compare-harmony/yield-precedence.expected.js b/test/compare-harmony/yield-precedence.expected.js
index <HASH>..<HASH> 100644
--- a/test/compare-harmony/yield-precedence.expected.js
+++ b/test/compare-harmony/yield-precedence.expected.js
@@ -1,5 +1,6 @@
function* foo() {
var a = yield wat(), b = 2;
var c = yield (a = b);
+ yield a, yield b;
return (yield 1) || (yield 2);
}
diff --git a/test/compare-harmony/yield-precedence.js b/test/compare-harmony/yield-precedence.js
index <HASH>..<HASH> 100644
--- a/test/compare-harmony/yield-precedence.js
+++ b/test/compare-harmony/yield-precedence.js
@@ -1,5 +1,6 @@
function *foo () {
var a = yield wat(), b = 2;
var c = yield (a = b);
+ yield a, yield b;
return (yield 1) || (yield 2);
}
|
test: add a "Statement" test the yield compare test
|
estools_escodegen
|
train
|
js,js
|
5b0442b72a701074143151687498ec37b5e87758
|
diff --git a/src/victory-label/victory-label.js b/src/victory-label/victory-label.js
index <HASH>..<HASH> 100644
--- a/src/victory-label/victory-label.js
+++ b/src/victory-label/victory-label.js
@@ -157,7 +157,7 @@ export default class VictoryLabel extends React.Component {
{content.map((line, i) => {
const dy = i ? props.lineHeight * fontSize : undefined;
return (
- <tspan key={i} x={props.x} dy={dy}>
+ <tspan key={i} x={props.x} dy={dy} dx={props.dx}>
{line}
</tspan>
);
|
fix(VictoryLabel): apply dx to every tspan
In case of multiline text, dx is applied to only the first tspan element, causing the text alignment to break.
|
FormidableLabs_victory
|
train
|
js
|
112f38db7cd45f4b1ffe759d4c9ff35ef96ce511
|
diff --git a/java-monitoring-dashboards/synth.py b/java-monitoring-dashboards/synth.py
index <HASH>..<HASH> 100644
--- a/java-monitoring-dashboards/synth.py
+++ b/java-monitoring-dashboards/synth.py
@@ -18,6 +18,8 @@ import synthtool as s
import synthtool.gcp as gcp
import synthtool.languages.java as java
+AUTOSYNTH_MULTIPLE_COMMITS = True
+
gapic = gcp.GAPICBazel()
service = 'monitoring-dashboard'
|
chore: enable context aware commits (#<I>)
|
googleapis_google-cloud-java
|
train
|
py
|
9258e4c05fab4c7fbadf18bca5cdd54b5f6d8e27
|
diff --git a/lib/components/app/view-switcher.js b/lib/components/app/view-switcher.js
index <HASH>..<HASH> 100644
--- a/lib/components/app/view-switcher.js
+++ b/lib/components/app/view-switcher.js
@@ -8,7 +8,7 @@ import { MainPanelContent, setMainPanelContent } from '../../actions/ui'
class ViewSwitcher extends Component {
static propTypes = {
- activePanel: PropTypes.string,
+ activePanel: PropTypes.number,
setMainPanelContent: PropTypes.func,
sticky: PropTypes.bool
}
diff --git a/lib/reducers/create-otp-reducer.js b/lib/reducers/create-otp-reducer.js
index <HASH>..<HASH> 100644
--- a/lib/reducers/create-otp-reducer.js
+++ b/lib/reducers/create-otp-reducer.js
@@ -898,6 +898,14 @@ function createOtpReducer (config) {
})
}
// Otherwise, overwrite only this route
+ if (!state.transitIndex.routes[action.payload.id]) {
+ return update(state, {
+ transitIndex: {
+ // If it is a new route, set rather than merge with an empty object
+ routes: { [action.payload.id]: { $set: action.payload } }
+ }
+ })
+ }
return update(state, {
transitIndex: {
routes: { [action.payload.id]: { $merge: action.payload } }
|
refactor: resolve react/redux errors
|
opentripplanner_otp-react-redux
|
train
|
js,js
|
96f7c7a458a28a0945c16939bcf07496626edef5
|
diff --git a/tests.js b/tests.js
index <HASH>..<HASH> 100644
--- a/tests.js
+++ b/tests.js
@@ -20,3 +20,33 @@ test('destroy', function (assert) {
client.end(assert.pass)
})
})
+
+test('accepts keys as hex', { timeout: 1000 }, function (assert) {
+ assert.plan(3)
+ var server = network.createServer()
+ var client
+
+ server.on('connection', function (encryptedStream) {
+ assert.pass('Connected')
+ encryptedStream.pipe(encryptedStream)
+ encryptedStream.on('error', assert.error)
+
+ encryptedStream.on('data', function (data) {
+ assert.pass('received data')
+
+ server.close()
+ client.end(assert.pass)
+ })
+ })
+
+ var serverKeys = network.keygen()
+ var keys = {
+ publicKey: serverKeys.publicKey.toString('hex'),
+ secretKey: serverKeys.secretKey.toString('hex')
+ }
+
+ server.listen(keys, function connectClient () {
+ client = network.connect(keys.publicKey)
+ client.write('hello')
+ })
+})
|
test: silent fail when keys are hex
common scenario when writing a server: keys are stored in hex in
a config
|
mafintosh_noise-network
|
train
|
js
|
64389df664e49d5933e104e1b7c8ddbcd6b83d18
|
diff --git a/test/browser/sauce-tests.js b/test/browser/sauce-tests.js
index <HASH>..<HASH> 100755
--- a/test/browser/sauce-tests.js
+++ b/test/browser/sauce-tests.js
@@ -2,6 +2,19 @@
'use strict';
+Uncomment for debugging
+(function() {
+ var childProcess = require("child_process");
+ var oldSpawn = childProcess.spawn;
+ function mySpawn() {
+ console.log('spawn called');
+ console.log(arguments);
+ var result = oldSpawn.apply(this, arguments);
+ return result;
+ }
+ childProcess.spawn = mySpawn;
+})();
+
var Promise = require('bluebird'),
spawn = require('child_process').spawn;
|
test(sauce): debug
|
delta-db_deltadb-common-utils
|
train
|
js
|
d316ec3556e0591aac7faeafdcdb59f6f3ea1d29
|
diff --git a/src/reducers/index.js b/src/reducers/index.js
index <HASH>..<HASH> 100644
--- a/src/reducers/index.js
+++ b/src/reducers/index.js
@@ -2,7 +2,6 @@ import { combineReducers } from 'redux'
import { reducer } from 'redux-cozy-client'
import * as fromAccounts from '../ducks/accounts'
-import * as fromKonnectors from '../ducks/konnectors'
import * as fromTriggers from '../ducks/triggers'
import registry, * as fromRegistry from '../ducks/registry'
import connections, * as fromConnections from '../ducks/connections'
@@ -24,8 +23,8 @@ export const getConnections = state =>
)
.map(connection => ({
account: fromAccounts.getAccount(state.cozy, connection.accountId),
- konnector: fromKonnectors.getKonnector(
- state.cozy,
+ konnector: fromRegistry.getRegistryKonnector(
+ state.registry,
connection.konnectorSlug
),
trigger: fromTriggers.getTrigger(state.cozy, connection.triggerId)
|
fix: avoid konnector Linxo to be shown in connected services 📝
|
cozy_cozy-home
|
train
|
js
|
3b1a495c857f188e3dc71091fc0e1b485dbf4a7b
|
diff --git a/gulpfile.js b/gulpfile.js
index <HASH>..<HASH> 100644
--- a/gulpfile.js
+++ b/gulpfile.js
@@ -5,7 +5,6 @@ var gulp = require('gulp'),
cssmin = require('gulp-cssmin'),
csso = require('csso'),
del = require('del'),
- exec = require('child_process').exec,
fs = require("fs"),
htmlMinifier = require('html-minifier'),
lessCompiler = require('gulp-less'),
@@ -13,7 +12,6 @@ var gulp = require('gulp'),
path = require('path'),
postcss = require('postcss'),
replace = require('gulp-replace'),
- runSequence = require('run-sequence'),
sourcemaps = require('gulp-sourcemaps'),
stylus = require('stylus');
|
fix(gulp): Removed unused plugins
|
patternfly_patternfly-ng
|
train
|
js
|
bb6a7a10dac8aa544bad6c0aaa53f593c9856dd7
|
diff --git a/demo/src/main/java/com/liulishuo/filedownloader/demo/DemoApplication.java b/demo/src/main/java/com/liulishuo/filedownloader/demo/DemoApplication.java
index <HASH>..<HASH> 100644
--- a/demo/src/main/java/com/liulishuo/filedownloader/demo/DemoApplication.java
+++ b/demo/src/main/java/com/liulishuo/filedownloader/demo/DemoApplication.java
@@ -38,8 +38,11 @@ public class DemoApplication extends Application {
public OkHttpClient customMake() {
// just for OkHttpClient customize.
final OkHttpClient.Builder builder = new OkHttpClient.Builder();
+ // you can set the connection timeout.
builder.connectTimeout(15_000, TimeUnit.MILLISECONDS);
+ // you can set the HTTP proxy.
builder.proxy(Proxy.NO_PROXY);
+ // etc.
return builder.build();
}
});
|
docs(java-code): add docs in DemoApplication, let the describes of customize the okhttp more make sense
|
lingochamp_FileDownloader
|
train
|
java
|
329309d9ec5c4995d0d5976da068b35ec89e935a
|
diff --git a/src/packages/database/model/index.js b/src/packages/database/model/index.js
index <HASH>..<HASH> 100644
--- a/src/packages/database/model/index.js
+++ b/src/packages/database/model/index.js
@@ -410,10 +410,6 @@ class Model {
}
getAttributes(...keys: Array<string>): Object {
- if (!keys.length) {
- keys = this.constructor.attributeNames;
- }
-
return setType(() => pick(this, ...keys));
}
|
fix: empty 'fields' params cause all keys of a resource to be exposed (#<I>)
refactor: simplify Model.prototype.getAttributes
|
postlight_lux
|
train
|
js
|
4a86e49488bd14b4fb79a78b1b5223abc3f8d10f
|
diff --git a/pyneuroml/tune/NeuroMLTuner.py b/pyneuroml/tune/NeuroMLTuner.py
index <HASH>..<HASH> 100644
--- a/pyneuroml/tune/NeuroMLTuner.py
+++ b/pyneuroml/tune/NeuroMLTuner.py
@@ -664,6 +664,9 @@ def _run_optimisation(a):
plt.xlabel("Time (ms)")
plt.ylabel("Membrane potential(mV)")
+ if a.save_to_file_output:
+ plt.savefig(a.save_to_file_output, dpi=300, bbox_inches='tight')
+
utils.plot_generation_evolution(
sim_var.keys(),
individuals_file_name="%s/ga_individuals.csv" % run_dir,
@@ -672,13 +675,13 @@ def _run_optimisation(a):
save_to_file=a.save_to_file,
save_to_file_scatter=a.save_to_file_scatter,
save_to_file_hist=a.save_to_file_hist,
- save_to_file_output=a.save_to_file_output,
title_prefix=ref,
)
if a.show_plot_already:
plt.show()
+
return reportj
|
fix: correctly save model output to file
|
NeuroML_pyNeuroML
|
train
|
py
|
853be621ac5c9a0f4d85a4bcb990b05853f8b6d6
|
diff --git a/src/structures/Channel.js b/src/structures/Channel.js
index <HASH>..<HASH> 100644
--- a/src/structures/Channel.js
+++ b/src/structures/Channel.js
@@ -22,9 +22,9 @@ class Channel extends Base {
* * `category` - a guild category channel
* * `news` - a guild news channel
* * `store` - a guild store channel
- * * `news_thread` - a guild news channels' public thread channel
- * * `public_thread` - a guild text channels' public thread channel
- * * `private_thread` - a guild text channels' private thread channel
+ * * `news_thread` - a guild news channel's public thread channel
+ * * `public_thread` - a guild text channel's public thread channel
+ * * `private_thread` - a guild text channel's private thread channel
* * `stage` - a guild stage channel
* * `unknown` - a generic channel of unknown type, could be Channel or GuildChannel
* @type {string}
|
docs(Channel): fix description of thread channel types (#<I>)
|
discordjs_discord.js
|
train
|
js
|
f784e86f1b07223ee23e886b2a1dda3b0fdef314
|
diff --git a/discovery/src/test/java/com/ibm/watson/developer_cloud/discovery/v1/DiscoveryServiceIT.java b/discovery/src/test/java/com/ibm/watson/developer_cloud/discovery/v1/DiscoveryServiceIT.java
index <HASH>..<HASH> 100644
--- a/discovery/src/test/java/com/ibm/watson/developer_cloud/discovery/v1/DiscoveryServiceIT.java
+++ b/discovery/src/test/java/com/ibm/watson/developer_cloud/discovery/v1/DiscoveryServiceIT.java
@@ -1741,6 +1741,8 @@ public class DiscoveryServiceIT extends WatsonServiceTest {
}
}
+ // ignoring temporarily while the service is having problems :/
+ @Ignore
@Test
public void credentialsOperationsAreSuccessful() {
String url = "https://login.salesforce.com";
|
test(Discovery): Ignore problematic test due to service
|
watson-developer-cloud_java-sdk
|
train
|
java
|
186f6c512f4c4dba817ce01c932ec7a01b917d97
|
diff --git a/pkg/plugin/plugin.go b/pkg/plugin/plugin.go
index <HASH>..<HASH> 100644
--- a/pkg/plugin/plugin.go
+++ b/pkg/plugin/plugin.go
@@ -230,6 +230,7 @@ func SetupPluginEnv(settings helm_env.EnvSettings,
"HELM_PATH_CACHE": helmpath.CachePath(),
"HELM_PATH_CONFIG": helmpath.ConfigPath(),
"HELM_PATH_DATA": helmpath.DataPath(),
+ "HELM_HOME": helmpath.DataPath(), // for backwards compatibility with Helm 2 plugins
} {
os.Setenv(key, val)
}
|
fix(plugin): add HELM_HOME back
This allows Helm 2 plugins that used HELM_HOME as a scratchpad to continue to work the same in Helm 3.
|
helm_helm
|
train
|
go
|
0966b0656e191afb86459655f35a6c6f8d4ce362
|
diff --git a/pgi/codegen/arguments.py b/pgi/codegen/arguments.py
index <HASH>..<HASH> 100644
--- a/pgi/codegen/arguments.py
+++ b/pgi/codegen/arguments.py
@@ -184,6 +184,8 @@ class ArrayArgument(GIArgument):
return ByteArrayArgument
elif typev == GIArrayType.ARRAY:
return GArrayArgument
+ elif typev == GIArrayType.PTR_ARRAY:
+ return PtrArrayArgument
raise NotImplementedError("unsupported array type: %r" % array_type)
@@ -196,6 +198,10 @@ class ByteArrayArgument(ArrayArgument):
pass
+class PtrArrayArgument(ArrayArgument):
+ pass
+
+
class CArrayArgument(ArrayArgument):
def setup(self):
|
docs: support PtrArray args
|
pygobject_pgi
|
train
|
py
|
a8f4aebe5d482a491d86d3427b259db00674cc72
|
diff --git a/lib/configuration/variables/index.js b/lib/configuration/variables/index.js
index <HASH>..<HASH> 100644
--- a/lib/configuration/variables/index.js
+++ b/lib/configuration/variables/index.js
@@ -5,6 +5,7 @@
const ensureString = require('type/string/ensure');
const ensurePlainObject = require('type/plain-object/ensure');
+const ServerlessError = require('../../serverless-error');
const resolveMeta = require('./resolve-meta');
const resolve = require('./resolve');
@@ -23,7 +24,7 @@ const reportEventualErrors = (variablesMeta) => {
if (!resolutionErrors.size) return;
- throw new Error(
+ throw new ServerlessError(
`Variables resolution errored with:${Array.from(
resolutionErrors,
(error) => `\n - ${error.message}`
|
fix(Variables): Ensure report user error as user error
|
serverless_serverless
|
train
|
js
|
f6f412c9406ce226c9bebc74523469eef05e4615
|
diff --git a/src/components/Choice.js b/src/components/Choice.js
index <HASH>..<HASH> 100644
--- a/src/components/Choice.js
+++ b/src/components/Choice.js
@@ -14,9 +14,9 @@ export default class Choice extends Component {
static propTypes = {
children: React.PropTypes.oneOfType([
React.PropTypes.arrayOf(React.PropTypes.node),
- React.PropTypes.node
+ React.PropTypes.node,
]),
- value: React.PropTypes.bool.isRequired
+ value: React.PropTypes.bool.isRequired,
};
render() {
|
chore(Choice): comply to jscs standard
|
nikgraf_belle
|
train
|
js
|
ee61f5e697e6d803c04b2968be5c17b52e7127b6
|
diff --git a/src/Console/Write.php b/src/Console/Write.php
index <HASH>..<HASH> 100644
--- a/src/Console/Write.php
+++ b/src/Console/Write.php
@@ -46,4 +46,16 @@ class Write
{
return $this->output->writeln($messages, $options);
}
+
+ /**
+ * Writes a info message to the output and adds a newline at the end
+ *
+ * @param string|iterable $messages The message as an iterable of strings or a single string
+ * @param bool $newline Whether to add a newline
+ * @return mixed
+ */
+ public function info(string $message, $options = 0)
+ {
+ return $this->output->writeln("<info>{$message}</info>", $options);
+ }
}
|
feat: Writes a info message to the output and adds a newline at the end
|
modulusphp_hibernate
|
train
|
php
|
1162cdde809e22c40ecaba7d1901d17159498506
|
diff --git a/test/rtcpeerconnection.js b/test/rtcpeerconnection.js
index <HASH>..<HASH> 100644
--- a/test/rtcpeerconnection.js
+++ b/test/rtcpeerconnection.js
@@ -2386,16 +2386,20 @@ describe('Edge shim', () => {
describe('after an offer containing a rejected mline', () => {
it('rejects the m-line in the answer', () => {
const sdp = SDP_BOILERPLATE +
- MINIMAL_AUDIO_MLINE.replace('m=audio 9', 'm=audio 0');
+ MINIMAL_AUDIO_MLINE.replace('m=audio 9', 'm=audio 0') +
+ MINIMAL_AUDIO_MLINE.replace('m=audio 9', 'm=video 0');
return pc.setRemoteDescription({type: 'offer', sdp: sdp})
.then(() => {
return pc.createAnswer();
})
.then((answer) => {
const sections = SDPUtils.getMediaSections(answer.sdp);
- expect(sections.length).to.equal(1);
+ expect(sections.length).to.equal(2);
expect(SDPUtils.getKind(sections[0])).to.equal('audio');
expect(SDPUtils.isRejected(sections[0])).to.equal(true);
+
+ expect(SDPUtils.getKind(sections[1])).to.equal('video');
+ expect(SDPUtils.isRejected(sections[1])).to.equal(true);
});
});
});
|
test: increase coverage a tiny bit
|
otalk_rtcpeerconnection-shim
|
train
|
js
|
63f8f1457de7f4ef6daf82ab9a74611d65289f04
|
diff --git a/platform/nativescript/plugins/navigator-plugin.js b/platform/nativescript/plugins/navigator-plugin.js
index <HASH>..<HASH> 100644
--- a/platform/nativescript/plugins/navigator-plugin.js
+++ b/platform/nativescript/plugins/navigator-plugin.js
@@ -75,6 +75,14 @@ export default {
}
page.on('navigatedFrom', handler)
+ // ensure that the navEntryInstance vue instance is destroyed when the
+ // page is disposed (clearHistory: true for example)
+ const dispose = page.disposeNativeView
+ page.disposeNativeView = (...args) => {
+ navEntryInstance.$destroy()
+ dispose.call(page, args)
+ }
+
frame.navigate(Object.assign({}, options, { create: () => page }))
resolve(page)
})
|
fix: destroy the navigation entry instance when the page is disposed
|
nativescript-vue_nativescript-vue
|
train
|
js
|
2046b7eb79c3e1697159d3b6c0f2a6669f0eb124
|
diff --git a/lib/cli/index.js b/lib/cli/index.js
index <HASH>..<HASH> 100644
--- a/lib/cli/index.js
+++ b/lib/cli/index.js
@@ -221,7 +221,7 @@ cli.run = function () {
try {
cli.exec(command, argv, function (err, result) {
if (err) { throw err }
- console.log(result)
+ console.log(JSON.stringify(result, null, 2))
process.exit()
})
} catch (e) {
|
fix(cli): Clean up CLI output
No longer outputs Modinha implementation-specific properties and methods - only the requested data
|
anvilresearch_connect
|
train
|
js
|
5159e8189e6994e493b6245e20e011111eea4abf
|
diff --git a/vue/app-client.js b/vue/app-client.js
index <HASH>..<HASH> 100644
--- a/vue/app-client.js
+++ b/vue/app-client.js
@@ -2,7 +2,7 @@ import Vue from 'vue'
import { createApp } from './app.js'
import { registerStoreModules } from './ssr/registerStoreModules.js'
import root from 'src/app.vue'
-import Progress from 'src/components/progress.vue'
+const Progress = require('src/components/progress.vue')
// Register global progress bar
const progress = Vue.prototype.$progress = new Vue(Progress).$mount()
|
fix: Remove vue-touch from base setup. (resolves #<I>)
|
cubic-js_cubic
|
train
|
js
|
53799b927f045e6d642b637c7ee94d21ed2f06df
|
diff --git a/lib/api-client/resources/history.js b/lib/api-client/resources/history.js
index <HASH>..<HASH> 100644
--- a/lib/api-client/resources/history.js
+++ b/lib/api-client/resources/history.js
@@ -895,13 +895,13 @@ History.deleteVariable = function(id, done) {
* Delete the history of a single variable
*/
- History.deleteAllVariables = function(id, done) {
+History.deleteAllVariables = function(id, done) {
var url = this.path + '/process-instance/' + id + '/variable-instances';
return this.http.del(url, {
done: done
});
- }
+};
/**
* Query for the history cleanup job
|
chore(history): fix indentation
|
camunda_camunda-bpm-sdk-js
|
train
|
js
|
cecb453b5b550bebfb3d6bdca43f71d5211a5fd4
|
diff --git a/packages/flyout/src/behaviors/DelayedHoverBehavior.js b/packages/flyout/src/behaviors/DelayedHoverBehavior.js
index <HASH>..<HASH> 100644
--- a/packages/flyout/src/behaviors/DelayedHoverBehavior.js
+++ b/packages/flyout/src/behaviors/DelayedHoverBehavior.js
@@ -5,12 +5,11 @@ const HoverBehavior = props => {
const { openOnHoverDelay, onMouseEnter } = props;
const [hasHover, setHasHover] = useState(false);
- const focusTimeout = event => {
+ const focusTimeout = event =>
setTimeout(() => {
setHasHover(true);
onMouseEnter(event);
}, openOnHoverDelay);
- };
const handleFocus = event => {
if (onMouseEnter) {
|
fix: onmouseover not working flyout
|
Autodesk_hig
|
train
|
js
|
241a6483ab1def5c0364c0fc6f43ba648b3eb39a
|
diff --git a/src/common.js b/src/common.js
index <HASH>..<HASH> 100644
--- a/src/common.js
+++ b/src/common.js
@@ -68,7 +68,7 @@ export function original(value) {
// otherwise return undefined
}
-const assign =
+export const assign =
Object.assign ||
function assign(target, value) {
for (let key in value) {
diff --git a/src/proxy.js b/src/proxy.js
index <HASH>..<HASH> 100644
--- a/src/proxy.js
+++ b/src/proxy.js
@@ -2,15 +2,16 @@
// @ts-check
import {
- is,
+ assign,
+ each,
has,
+ is,
isProxyable,
isProxy,
- PROXY_STATE,
finalize,
shallowCopy,
- RETURNED_AND_MODIFIED_ERROR,
- each
+ PROXY_STATE,
+ RETURNED_AND_MODIFIED_ERROR
} from "./common"
let proxies = null
@@ -134,7 +135,7 @@ function markChanged(state) {
state.modified = true
state.copy = shallowCopy(state.base)
// copy the proxies over the base-copy
- Object.assign(state.copy, state.proxies) // yup that works for arrays as well
+ assign(state.copy, state.proxies) // yup that works for arrays as well
if (state.parent) markChanged(state.parent)
}
}
|
fix: always use `assign` polyfill
|
immerjs_immer
|
train
|
js,js
|
be8d3444e52a7cc13352599aa87967301191200a
|
diff --git a/src/Log.php b/src/Log.php
index <HASH>..<HASH> 100644
--- a/src/Log.php
+++ b/src/Log.php
@@ -27,6 +27,11 @@ class Log extends Logger
static::log(static::ERROR, $message, $context);
}
+ public static function exception(Exception $e)
+ {
+ static::error($e instanceof HttpException ? get_class($e) : "\n" . $e->__toString());
+ }
+
public static function info($message = null, array $context = [])
{
static::log(static::INFO, $message, $context);
@@ -40,11 +45,6 @@ class Log extends Logger
static::$logger->log($type, $message, $context);
}
- public static function exception(Exception $e)
- {
- static::error($e instanceof HttpException ? get_class($e) : "\n" . $e->__toString());
- }
-
public static function register(Di $di)
{
static::$hostname = gethostname();
@@ -63,4 +63,9 @@ class Log extends Logger
return $logger;
});
}
+
+ public static function warning($message = null, array $context = [])
+ {
+ static::log(static::WARNING, $message, $context);
+ }
}
|
feat(log): add warning log method
|
phwoolcon_phwoolcon
|
train
|
php
|
e49c18b58ec7ea6b198167d6a130418b8df6ce19
|
diff --git a/index.js b/index.js
index <HASH>..<HASH> 100644
--- a/index.js
+++ b/index.js
@@ -1,5 +1,8 @@
import sensors from "./src/sensors";
-export { setUpdateInterval as setUpdateIntervalForType, setLogLevelForType } from "./src/rnsensors";
+export {
+ setUpdateInterval as setUpdateIntervalForType,
+ setLogLevelForType
+} from "./src/rnsensors";
export const SensorTypes = {
accelerometer: "accelerometer",
|
style(logLevel): Fix to make travis happy
|
react-native-sensors_react-native-sensors
|
train
|
js
|
2cd26651f17f8da053fcbbd5d8021fa5473652f1
|
diff --git a/test/client.js b/test/client.js
index <HASH>..<HASH> 100644
--- a/test/client.js
+++ b/test/client.js
@@ -565,7 +565,7 @@ describe('Client:Auth', () => {
it('create database', done => {
client.createDatabase().then(() => {
- setTimeout(done, 300);
+ setTimeout(done, 1000);
}).catch(done);
});
|
refactor: change delay ms
|
vicanso_influxdb-nodejs
|
train
|
js
|
884f5ed9f96af28940fcbdb7176a2160045c66d5
|
diff --git a/ui/src/mixins/virtual-scroll.js b/ui/src/mixins/virtual-scroll.js
index <HASH>..<HASH> 100644
--- a/ui/src/mixins/virtual-scroll.js
+++ b/ui/src/mixins/virtual-scroll.js
@@ -241,7 +241,7 @@ export default {
let
toIndex = 0,
listOffset = scrollDetails.scrollStart - scrollDetails.offsetStart,
- offset = 0
+ offset = listOffset
for (let j = 0; listOffset >= this.virtualScrollSizesAgg[j] && toIndex < listLastIndex; j++) {
listOffset -= this.virtualScrollSizesAgg[j]
|
fix(VirtualScroll): Don't scroll first row of a QTable when the position is on top and there is header (#<I>)
|
quasarframework_quasar
|
train
|
js
|
bb265b9cbd90386f916663e3471ae8efb4e4eff7
|
diff --git a/packages/es-dev-server/src/middleware/compatibility-transform.js b/packages/es-dev-server/src/middleware/compatibility-transform.js
index <HASH>..<HASH> 100644
--- a/packages/es-dev-server/src/middleware/compatibility-transform.js
+++ b/packages/es-dev-server/src/middleware/compatibility-transform.js
@@ -56,6 +56,10 @@ export function createCompatibilityTransformMiddleware(cfg) {
}
const filePath = getRequestFilePath(ctx, cfg.rootDir);
+ // if there is no file path, this file was not served statically
+ if (!filePath) {
+ return undefined;
+ }
// Ensure we respond with js content type
ctx.response.set('content-type', 'text/javascript');
|
fix(es-dev-server): don't handle requests without a file path
|
open-wc_open-wc
|
train
|
js
|
39e9e05b3284a5d289b8a702b32eb26b91745301
|
diff --git a/Exscript/interpreter/expression.py b/Exscript/interpreter/expression.py
index <HASH>..<HASH> 100644
--- a/Exscript/interpreter/expression.py
+++ b/Exscript/interpreter/expression.py
@@ -216,7 +216,7 @@ class Expression(Token):
# Check if there is any child node that has a better priority.
previous = root
current = root.rgt
- while current is not None and current.priority() >= prio:
+ while current is not None and current.priority() != prio:
previous = current
current = current.rgt
|
fix: accidentally comitted a code change
|
knipknap_exscript
|
train
|
py
|
318e6add68b8e514a809eed16b892fdeebddc027
|
diff --git a/packages/components/bolt-toc/src/toc.js b/packages/components/bolt-toc/src/toc.js
index <HASH>..<HASH> 100644
--- a/packages/components/bolt-toc/src/toc.js
+++ b/packages/components/bolt-toc/src/toc.js
@@ -173,11 +173,16 @@ class BoltToc extends withContext(BoltElement) {
};
}
+ // Smooth scroll events triggered by clicking menu items
logScrollEvent(event) {
if (event.type === 'scrollStart') {
this.scrolling = true;
} else if (event.type === 'scrollStop' || event.type === 'scrollCancel') {
- this.scrolling = false;
+ // Wait before unsetting the scrolling flag as waypoint events may fire
+ // at same time as `scrollStop` event, avoids race condition
+ setTimeout(() => {
+ this.scrolling = false;
+ }, 100);
}
}
|
fix: race condition on smoothScroll stop
|
bolt-design-system_bolt
|
train
|
js
|
e4be4629980b694b0684a39bdf6025f8fc2240b4
|
diff --git a/docs/app/Examples/elements/Button/GroupVariations/ButtonExampleGroupVertical.js b/docs/app/Examples/elements/Button/GroupVariations/ButtonExampleGroupVertical.js
index <HASH>..<HASH> 100644
--- a/docs/app/Examples/elements/Button/GroupVariations/ButtonExampleGroupVertical.js
+++ b/docs/app/Examples/elements/Button/GroupVariations/ButtonExampleGroupVertical.js
@@ -2,7 +2,7 @@ import React from 'react'
import { Button } from 'semantic-ui-react'
const ButtonExampleGroupVertical = () => (
- <Button.Group attached='top' vertical>
+ <Button.Group vertical>
<Button>Feed</Button>
<Button>Messages</Button>
<Button>Events</Button>
|
docs(Button): remove redundant prop in Vertical Group example (#<I>)
|
Semantic-Org_Semantic-UI-React
|
train
|
js
|
e9aed735d9b970b19a24d25d95fa28496665d9c7
|
diff --git a/src/components/Rating.js b/src/components/Rating.js
index <HASH>..<HASH> 100644
--- a/src/components/Rating.js
+++ b/src/components/Rating.js
@@ -274,7 +274,7 @@ export default class Rating extends Component {
* Sets isActive state to true.
*/
_onMouseDown = (event) => {
- if (!this.props.disabled && event.buttons === 1) {
+ if (!this.props.disabled && event.button === 0) {
this.setState({ isActive: true });
this.preventNextMouseUpTriggerUpdate = false;
}
|
fix(Rating): fix bug in safari picking a rating was not working
|
nikgraf_belle
|
train
|
js
|
3775e88a558c312aad063a78c64dbfc6040e7ba3
|
diff --git a/workflow/progress/updater.go b/workflow/progress/updater.go
index <HASH>..<HASH> 100644
--- a/workflow/progress/updater.go
+++ b/workflow/progress/updater.go
@@ -39,7 +39,7 @@ func UpdateProgress(wf *wfv1.Workflow) {
}
}
for nodeID, node := range wf.Status.Nodes {
- if node.Type == wfv1.NodeTypePod && node.Type != wfv1.NodeTypeHTTP {
+ if node.Type == wfv1.NodeTypePod {
continue
}
progress := sumProgress(wf, node, make(map[string]bool))
|
chore: Remove unnecessary check on HTTP node type (#<I>)
|
argoproj_argo
|
train
|
go
|
bd09b3d6d9f79998a651cbca2d8f7aaa8da615d6
|
diff --git a/build/hot-reload.js b/build/hot-reload.js
index <HASH>..<HASH> 100644
--- a/build/hot-reload.js
+++ b/build/hot-reload.js
@@ -1,9 +1,3 @@
/* eslint-disable */
require('eventsource-polyfill')
-var hotClient = require('webpack-hot-middleware/client?noInfo=true&reload=true')
-
-hotClient.subscribe(function (event) {
- if (event.action === 'reload') {
- window.location.reload()
- }
-})
+require('webpack-hot-middleware/client?noInfo=true&reload=true')
|
chore: Update dev server hot-reload
|
quasarframework_quasar
|
train
|
js
|
3dfe437238f90ba1f6c851074d414a025ab05694
|
diff --git a/template/template_test.go b/template/template_test.go
index <HASH>..<HASH> 100644
--- a/template/template_test.go
+++ b/template/template_test.go
@@ -40,6 +40,7 @@ func TestTemplate(t *testing.T) {
Spread bool
DirList []string
Compression *compression.Options
+ Debug bool
}{
Pkg: "main",
Files: files,
|
fix: debug must be setup in the test
|
UnnoTed_fileb0x
|
train
|
go
|
2e5c74625b211484bb0482978a5492323abab72f
|
diff --git a/recordlinkage/base.py b/recordlinkage/base.py
index <HASH>..<HASH> 100644
--- a/recordlinkage/base.py
+++ b/recordlinkage/base.py
@@ -354,7 +354,7 @@ class BaseCompare(object):
*args :
Additional arguments.
**kwargs :
- Keyword arguments.
+ Keyword arguments. (keyword 'label' is not allowed)
label : (list of) label(s)
The name of the feature and the name of the column. IMPORTANT:
This argument is a keyword argument.
|
docs: label keyword is not allowed
|
J535D165_recordlinkage
|
train
|
py
|
c9bc5ff169b665c2d2f6c070af909633099e0681
|
diff --git a/lib/components/user/monitored-trip/trip-basics-pane.js b/lib/components/user/monitored-trip/trip-basics-pane.js
index <HASH>..<HASH> 100644
--- a/lib/components/user/monitored-trip/trip-basics-pane.js
+++ b/lib/components/user/monitored-trip/trip-basics-pane.js
@@ -109,10 +109,11 @@ class TripBasicsPane extends Component {
return (
<div>
- {/* Prevent user from leaving when form is dirty */}
+ {/* Prevent user from leaving when form has been changed, but
+ don't show it when they click submit. */}
<Prompt
- when={this.props.dirty}
- message="You have haven't saved your new trip yet. If you leave, it will be lost."
+ when={this.props.dirty && !this.props.isSubmitting}
+ message={`You have haven't saved your ${this.props.isCreating ? 'new ' : ''}trip yet. If you leave, ${this.props.isCreating ? 'it' : 'changes'} will be lost.`}
/>
{/* Do not show trip status when saving trip for the first time
|
refactor(trip-page): don’t show prevention dialog when submitting
|
opentripplanner_otp-react-redux
|
train
|
js
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.