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 |
|---|---|---|---|---|---|
42a11dfd2561ac0b43a6e223adb5f0eae366f574
|
diff --git a/src/service-consul.js b/src/service-consul.js
index <HASH>..<HASH> 100755
--- a/src/service-consul.js
+++ b/src/service-consul.js
@@ -141,7 +141,10 @@ export class ServiceConsul extends Service {
console.log(`*** ***`);
console.log(r);
const dict = {};
- r[0].forEach(e => (dict[e.Key] = e.Value));
+ if (r[0] !== undefined) {
+ r[0].forEach(e => (dict[e.Key] = e.Value));
+ }
+
//console.log(dict);
return dict;
}
|
fix: handle undefined in kv endpoint
|
Kronos-Integration_kronos-service-consul
|
train
|
js
|
eae1d1093de1912c92a076ffd8457b3d6a1ba0f5
|
diff --git a/src/flatten2.js b/src/flatten2.js
index <HASH>..<HASH> 100644
--- a/src/flatten2.js
+++ b/src/flatten2.js
@@ -52,17 +52,9 @@ flatten2.flatten = function(obj, path) {
* @return {array} - return array of flattened objects
*/
flatten2.flattenMany = function(data) {
- var flattenedObjects = [];
-
- for (var i = 0; i < data.length; i++) {
- var currentObject = data[i];
-
- var flatObject = flatten2.flatten(currentObject);
-
- flattenedObjects.push(flatObject);
- }
-
- return flattenedObjects;
+ return data.map((obj) => {
+ return flatten2.flatten(obj);
+ });
};
/**
|
refactor: simplify with use of map
|
joelcolucci_flatten2
|
train
|
js
|
c67e9029533350610e0cd0fdaeaec33b37742cd5
|
diff --git a/packages/react/src/components/Tabs/Tabs-story.js b/packages/react/src/components/Tabs/Tabs-story.js
index <HASH>..<HASH> 100644
--- a/packages/react/src/components/Tabs/Tabs-story.js
+++ b/packages/react/src/components/Tabs/Tabs-story.js
@@ -67,9 +67,7 @@ const props = {
}),
};
-const CustomLabel = ({ text }) => {
- text;
-};
+const CustomLabel = ({ text }) => text;
const CodeSnippetExample = () => (
<CodeSnippet type="multi">
|
docs(Tabs): return text node in custom label example (#<I>)
|
carbon-design-system_carbon-components
|
train
|
js
|
f98255aa53d75e8e1143a225b1782e40d07c1d75
|
diff --git a/sentry_sdk/integrations/celery.py b/sentry_sdk/integrations/celery.py
index <HASH>..<HASH> 100644
--- a/sentry_sdk/integrations/celery.py
+++ b/sentry_sdk/integrations/celery.py
@@ -2,7 +2,12 @@ from __future__ import absolute_import
import sys
-from celery.exceptions import SoftTimeLimitExceeded, Retry # type: ignore
+from celery.exceptions import ( # type: ignore
+ SoftTimeLimitExceeded,
+ Retry,
+ Ignore,
+ Reject,
+)
from sentry_sdk.hub import Hub
from sentry_sdk.utils import capture_internal_exceptions, event_from_exception
@@ -12,6 +17,9 @@ from sentry_sdk.integrations import Integration
from sentry_sdk.integrations.logging import ignore_logger
+CELERY_CONTROL_FLOW_EXCEPTIONS = (Retry, Ignore, Reject)
+
+
class CeleryIntegration(Integration):
identifier = "celery"
@@ -137,7 +145,7 @@ def _capture_exception(task, exc_info):
if hub.get_integration(CeleryIntegration) is None:
return
- if isinstance(exc_info[1], Retry):
+ if isinstance(exc_info[1], CELERY_CONTROL_FLOW_EXCEPTIONS):
return
if hasattr(task, "throws") and isinstance(exc_info[1], task.throws):
return
|
fix: Ignore Celery exceptions used for control flow (#<I>)
* fix: Ignore Celery exceptions used for control flow
* fix: Linters
|
getsentry_sentry-python
|
train
|
py
|
0d4154c123fa2e8948787d6aedd109b8a2a757c9
|
diff --git a/lib/Model.js b/lib/Model.js
index <HASH>..<HASH> 100644
--- a/lib/Model.js
+++ b/lib/Model.js
@@ -501,7 +501,7 @@ Model.prototype.batch = function batch(schedulerOrDelayArg) {
} else if (!schedulerOrDelay || !schedulerOrDelay.schedule) {
schedulerOrDelay = new ASAPScheduler();
}
- var clone = this.clone();
+ var clone = this._clone();
clone._request = new RequestQueue(clone, schedulerOrDelay);
return clone;
|
fix(Model): fix batch with ._clone()
fixes #<I>
|
Netflix_falcor
|
train
|
js
|
30b84aedb1cba8af3dd390f81bcd020baeab9dcb
|
diff --git a/src/Service/ContextFactory.php b/src/Service/ContextFactory.php
index <HASH>..<HASH> 100644
--- a/src/Service/ContextFactory.php
+++ b/src/Service/ContextFactory.php
@@ -32,7 +32,8 @@ class ContextFactory
) {
$context = Context::of();
foreach ($this->defaults as $key => $default) {
- $context[$key] = $default;
+ $method = 'set' . ucfirst($key);
+ $context->$method($default);
}
if (is_null($locale)) {
$locale = $context->getLocale();
|
refactor(ContextFactory): use setter to setup context defaults
|
commercetools_commercetools-php-symfony
|
train
|
php
|
03b64e97b73b543e6a1b22040cd61a35ab8821d4
|
diff --git a/lib/transactions.js b/lib/transactions.js
index <HASH>..<HASH> 100644
--- a/lib/transactions.js
+++ b/lib/transactions.js
@@ -140,6 +140,10 @@ class Transaction {
);
}
+ get isPinned() {
+ return this._pinnedServer != null;
+ }
+
pinServer(server) {
if (this.isActive) {
this._pinnedServer = server;
|
refactor(transactions): provide an `isPinned` accessor
|
mongodb-js_mongodb-core
|
train
|
js
|
07ff74960717c6e6dc55961e8a50f09cec55576a
|
diff --git a/tests/Stubs/AuditableTransformStub.php b/tests/Stubs/AuditableTransformStub.php
index <HASH>..<HASH> 100644
--- a/tests/Stubs/AuditableTransformStub.php
+++ b/tests/Stubs/AuditableTransformStub.php
@@ -19,7 +19,7 @@ class AuditableTransformStub extends AuditableStub
/**
* {@inheritdoc}
*/
- public function transformAudit(array $data)
+ public function transformAudit(array $data): array
{
$data['foo'] = 'bar';
|
fix(Auditable): transform stub method
|
owen-it_laravel-auditing
|
train
|
php
|
318b1c8616601fdf653d1819ae5356dc83b923b7
|
diff --git a/packages/node_modules/@cerebral/router/src/router.js b/packages/node_modules/@cerebral/router/src/router.js
index <HASH>..<HASH> 100644
--- a/packages/node_modules/@cerebral/router/src/router.js
+++ b/packages/node_modules/@cerebral/router/src/router.js
@@ -100,7 +100,17 @@ export default class Router {
event && event.preventDefault()
const { computedRMapping, map, propsMapping, signal, stateMapping } = match
- let payload = values
+
+ // remove undefined values from payload
+ // TODO: can be replaced with next line when fixed in url-mapper
+ // let payload = values
+ let payload = Object.keys(values).reduce((cleanedPayload, key) => {
+ if (values[key] !== undefined) {
+ cleanedPayload[key] = values[key]
+ }
+ return cleanedPayload
+ }, {})
+
const getters = { props: payload, state: this.stateGetter }
if (stateMapping || computedRMapping) {
|
fix(router): remove undefined values from payload
|
cerebral_cerebral
|
train
|
js
|
b92aefe968be3294c1a49407dc5351c80e90ef65
|
diff --git a/ibm_watson/visual_recognition_v3.py b/ibm_watson/visual_recognition_v3.py
index <HASH>..<HASH> 100644
--- a/ibm_watson/visual_recognition_v3.py
+++ b/ibm_watson/visual_recognition_v3.py
@@ -168,11 +168,11 @@ class VisualRecognitionV3(BaseService):
form_data.append(
('threshold', (None, threshold, 'application/json')))
if owners:
- for item in owners:
- form_data.append(('owners', (None, item, 'text/plain')))
+ owners = self._convert_list(owners)
+ form_data.append(('owners', (None, item, 'text/plain')))
if classifier_ids:
- for item in classifier_ids:
- form_data.append(('classifier_ids', (None, item, 'text/plain')))
+ classifier_ids = self._convert_list(classifier_ids)
+ form_data.append(('classifier_ids', (None, item, 'text/plain')))
url = '/v3/classify'
request = self.prepare_request(method='POST',
|
chore(vr3): Hand edit owners and classifier_ids in classify
|
watson-developer-cloud_python-sdk
|
train
|
py
|
ca09e80e4adc0443f33d6d76341f61b776c960e1
|
diff --git a/tmuxp/log.py b/tmuxp/log.py
index <HASH>..<HASH> 100644
--- a/tmuxp/log.py
+++ b/tmuxp/log.py
@@ -57,16 +57,6 @@ def set_style(
return prefix + message + suffix
-class LogTemplateFn(t.Protocol):
- def template(
- self,
- record: logging.LogRecord,
- stylized: t.Optional[bool],
- **kwargs: t.Any,
- ) -> str:
- ...
-
-
def default_log_template(
self: t.Type[logging.Formatter],
record: logging.LogRecord,
@@ -119,7 +109,7 @@ def default_log_template(
return levelname + asctime + name
-class LogFormatter(logging.Formatter, LogTemplateFn):
+class LogFormatter(logging.Formatter):
template = default_log_template
def __init__(self, color=True, *args, **kwargs):
|
refactor(logging): Remove protocol for now, to avoid typing-extensions
Strict mypy may force us to need this
|
tmux-python_tmuxp
|
train
|
py
|
24a815781145a4fb4f3533884bd6c80f6a67eeea
|
diff --git a/src/backend/vuex.js b/src/backend/vuex.js
index <HASH>..<HASH> 100644
--- a/src/backend/vuex.js
+++ b/src/backend/vuex.js
@@ -74,9 +74,7 @@ export function initVuexBackend (hook, bridge, isLegacy) {
...options,
preserveState: false
},
- state: clone(state, {
- includeNonEnumerable: true
- })
+ state: clone(state)
}
if (SharedData.recordVuex) {
@@ -145,9 +143,7 @@ export function initVuexBackend (hook, bridge, isLegacy) {
mutations.push({
type,
- payload: clone(payload, {
- includeNonEnumerable: true
- }),
+ payload: clone(payload),
index,
handlers: store._mutations[type],
registeredModules: Object.keys(registeredModules),
|
fix(vuex): don't clone non enumerable properties
|
vuejs_vue-devtools
|
train
|
js
|
f0a1a00cffe3bd8ce8c9a86ce3d17060aead57f6
|
diff --git a/lib/markdown/link.js b/lib/markdown/link.js
index <HASH>..<HASH> 100644
--- a/lib/markdown/link.js
+++ b/lib/markdown/link.js
@@ -12,7 +12,7 @@ module.exports = md => {
const link = token.attrs[hrefIndex]
const href = link[1]
const isExternal = /^https?:/.test(href)
- const isSourceLink = /(\/|\.md|\.html)(#[\w-]*)?$/.test(href)
+ const isSourceLink = /(\/|\.md|\.html)(#.*)?$/.test(href)
if (isExternal) {
addAttr(token, 'target', '_blank')
addAttr(token, 'rel', 'noopener noreferrer')
@@ -34,12 +34,13 @@ module.exports = md => {
to = to
.replace(/\.md$/, '.html')
- .replace(/\.md(#[\w-]*)$/, '.html$1')
+ .replace(/\.md(#.*)$/, '.html$1')
// normalize links to README/index
if (/^index|readme\.html/i.test(to)) {
to = '/'
}
- link[1] = to
+ // markdown-it encodes the uri
+ link[1] = decodeURI(to)
return Object.assign({}, token, {
tag: 'router-link'
})
|
fix: handle links with encoded hash
|
vuejs_vuepress
|
train
|
js
|
a8626becc9ce87229d0d16dfd02da428deee5acd
|
diff --git a/packages/radar/src/RadarTooltipItem.js b/packages/radar/src/RadarTooltipItem.js
index <HASH>..<HASH> 100644
--- a/packages/radar/src/RadarTooltipItem.js
+++ b/packages/radar/src/RadarTooltipItem.js
@@ -55,7 +55,7 @@ const RadarTooltipItem = memo(
setIsHover(true)
showTooltipFromEvent(tooltip, event)
},
- [showTooltipFromEvent]
+ [showTooltipFromEvent, tooltip]
)
const hideItemTooltip = useCallback(() => {
setIsHover(false)
|
fix(radar): fix Radar cached tooltip
|
plouc_nivo
|
train
|
js
|
3f12728586378d2c822b4ac4ca739f0610b49dab
|
diff --git a/mailjet-client.js b/mailjet-client.js
index <HASH>..<HASH> 100755
--- a/mailjet-client.js
+++ b/mailjet-client.js
@@ -219,7 +219,7 @@ MailjetClient.prototype.connectStrategy = function (apiKey, apiSecret, options)
}
MailjetClient.prototype.setConfig = function (options) {
- const config = require('./config')
+ const config = require('./config.json')
if (typeof options === 'object' && options != null && options.length != 0) {
if (options.url) config.url = options.url
if (options.version) config.version = options.version
|
fix: problem with wrong using require for load config.json file
|
mailjet_mailjet-apiv3-nodejs
|
train
|
js
|
e087ee40adbf7a09f1d0ee29a42b02208b77914d
|
diff --git a/src/AssetRepository.php b/src/AssetRepository.php
index <HASH>..<HASH> 100644
--- a/src/AssetRepository.php
+++ b/src/AssetRepository.php
@@ -299,7 +299,7 @@ class AssetRepository
foreach ($files as $path => $desc) {
$isUrl = filter_var($path, FILTER_VALIDATE_URL);
- if (pathinfo($path, PATHINFO_EXTENSION) == $type && $desc['type'] != "copy" && !$isUrl) {
+ if (pathinfo($path, PATHINFO_EXTENSION) == $type && $desc['type'] != "copy") {
if (isset($limit['auth'])) {
$desc += ["auth" => $limit['auth']];
}
|
fix: limits auth and options must be applied to urls too
|
grape-fluid_grape-fluid
|
train
|
php
|
51ea093a6a1138635b03eb90ce70581962d24334
|
diff --git a/test/fixtures/demo/app/router.js b/test/fixtures/demo/app/router.js
index <HASH>..<HASH> 100644
--- a/test/fixtures/demo/app/router.js
+++ b/test/fixtures/demo/app/router.js
@@ -1,9 +1,7 @@
'use strict';
module.exports = function(app) {
- var userRole = app.role.can('user');
-
- app.get('/', userRole, app.controller.home.get);
+ app.get('/', app.controller.home.get);
app.get('/hello', app.controller.home.hello);
app.get('/service', app.controller.home.service);
app.get('/service/old', app.controller.home.serviceOld);
|
test: remove userrole (#<I>)
|
eggjs_egg-mock
|
train
|
js
|
51a8011ffffb695a4d8fc59fe19f0f29a1c0311e
|
diff --git a/src/index.js b/src/index.js
index <HASH>..<HASH> 100644
--- a/src/index.js
+++ b/src/index.js
@@ -4,7 +4,7 @@ export {BpfLoader} from './bpf-loader';
export {BudgetProgram} from './budget-program';
export {Connection} from './connection';
export {Loader} from './loader';
-export {NonceAccount} from './nonce-account';
+export {NonceAccount, NONCE_ACCOUNT_LENGTH} from './nonce-account';
export {PublicKey} from './publickey';
export {
STAKE_CONFIG_ID,
|
fix: properly export NONCE_ACCOUNT_LENGTH
|
solana-labs_solana-web3.js
|
train
|
js
|
e615676f54d5e0ffc717d9cc7821dcb3aa16d76f
|
diff --git a/log.go b/log.go
index <HASH>..<HASH> 100644
--- a/log.go
+++ b/log.go
@@ -238,8 +238,8 @@ func (l *Log) containsEntry(index uint64, term uint64) bool {
// index provided. A nil list of entries is returned if the index no longer
// exists because a snapshot was made.
func (l *Log) getEntriesAfter(index uint64, maxLogEntriesPerRequest uint64) ([]*LogEntry, uint64) {
- l.mutex.Lock()
- defer l.mutex.Unlock()
+ l.mutex.RLock()
+ defer l.mutex.RUnlock()
// Return nil if index is before the start of the log.
if index < l.startIndex {
|
fix(log): use Rlock in getEntriesAfter
getEntriesAfter only reads the log and doesn't make any motifications.
Using an RLock is safe here.
|
influxdata_influxdb
|
train
|
go
|
9b96190a0d314978e4d91f39a7e1cba2f2f13152
|
diff --git a/lib/neo4j/active_node/query/query_proxy_eager_loading.rb b/lib/neo4j/active_node/query/query_proxy_eager_loading.rb
index <HASH>..<HASH> 100644
--- a/lib/neo4j/active_node/query/query_proxy_eager_loading.rb
+++ b/lib/neo4j/active_node/query/query_proxy_eager_loading.rb
@@ -23,6 +23,8 @@ module Neo4j
end
def add_spec(spec)
+ fail "Cannot eager load \"past\" a polymorphic association. (since the association can return multiple models, we don't how to handle the \"#{spec}\" association." unless model
+
if spec.is_a?(Array)
spec.each { |s| add_spec(s) }
elsif spec.is_a?(Hash)
|
fix: add helpful error message to AssociationTree
Add helpful error message when trying to eager load "past" a polymorphic association. Currently, trying to eager load past a polymorphic association in the console receives
```
NoMethodError: undefined method `associations' for nil:NilClass
from (irb):2
```
Which is difficult to diagnose.
(cherry picked from commit a9dd<I>e<I>c<I>b7f<I>b<I>cd)
|
neo4jrb_neo4j
|
train
|
rb
|
60bea43218dfac8c3afd1684a776be70d9a7d39a
|
diff --git a/views/js/controller/creator/views/item.js b/views/js/controller/creator/views/item.js
index <HASH>..<HASH> 100644
--- a/views/js/controller/creator/views/item.js
+++ b/views/js/controller/creator/views/item.js
@@ -20,13 +20,14 @@
* @author Bertrand Chevrier <bertrand@taotesting.com>
*/
define([
+ 'module',
'jquery',
'i18n',
'core/logger',
'taoQtiTest/provider/testItems',
'ui/resource/selector',
'ui/feedback'
-], function ($, __, loggerFactory, testItemProviderFactory, resourceSelectorFactory, feedback) {
+], function (module, $, __, loggerFactory, testItemProviderFactory, resourceSelectorFactory, feedback) {
'use strict';
/**
@@ -56,6 +57,7 @@ define([
* @param {jQueryElement} $container - where to append the view
*/
return function itemView($container) {
+ const filters = module.config().BRS || false; // feature flag BRS (search by metadata) in Test Authoring
const selectorConfig = {
type: __('items'),
selectionMode: resourceSelectorFactory.selectionModes.multiple,
@@ -67,7 +69,8 @@ define([
uri: ITEM_URI,
type: 'class'
}
- ]
+ ],
+ filters
};
//set up the resource selector with one root class Item in classSelector
|
feat: feature flag BRS (search by metadata) in Test Authoring
|
oat-sa_extension-tao-testqti
|
train
|
js
|
08caf6b600f2e85d4a824e197892e29eca4580e2
|
diff --git a/test/command/test_fluentd.rb b/test/command/test_fluentd.rb
index <HASH>..<HASH> 100644
--- a/test/command/test_fluentd.rb
+++ b/test/command/test_fluentd.rb
@@ -831,6 +831,7 @@ CONF
'-internal-encoding' => '--internal-encoding=utf-8',
)
test "-E option is set to RUBYOPT3" do |opt|
+ omit "hard to run correctly on Windows. Need to debug." if Fluent.windows?
conf = <<CONF
<source>
@type dummy
@@ -864,6 +865,7 @@ CONF
end
test 'invalid values are set to RUBYOPT' do
+ omit "hard to run correctly on Windows. Need to debug." if Fluent.windows?
conf = <<CONF
<source>
@type dummy
|
test: Omit testcase which is hard to run correctly
It is hard to run RUBYOPT testcases on Windows.... :/
|
fluent_fluentd
|
train
|
rb
|
af747af8f787f8bbd77c3cb0c36c55836c88fcf7
|
diff --git a/packages/themes/src/g10.js b/packages/themes/src/g10.js
index <HASH>..<HASH> 100644
--- a/packages/themes/src/g10.js
+++ b/packages/themes/src/g10.js
@@ -41,7 +41,7 @@ import {
} from '@carbon/colors';
export const interactive01 = blue60;
-export const interactive02 = gray100;
+export const interactive02 = gray80;
export const interactive03 = blue60;
export const interactive04 = blue60;
diff --git a/packages/themes/src/white.js b/packages/themes/src/white.js
index <HASH>..<HASH> 100644
--- a/packages/themes/src/white.js
+++ b/packages/themes/src/white.js
@@ -41,7 +41,7 @@ import {
} from '@carbon/colors';
export const interactive01 = blue60;
-export const interactive02 = gray100;
+export const interactive02 = gray80;
export const interactive03 = blue60;
export const interactive04 = blue60;
|
fix(themes): chagne interactive-<I> value to g<I> (#<I>)
|
carbon-design-system_carbon-components
|
train
|
js,js
|
2aeec85931eec91dd0ce3e5cba99193b8c809f86
|
diff --git a/test/helper.go b/test/helper.go
index <HASH>..<HASH> 100644
--- a/test/helper.go
+++ b/test/helper.go
@@ -282,6 +282,7 @@ var Hostnames hostnames
type hostnames struct {
sync.Mutex
+ lastModified time.Time
}
func (h *hostnames) Add(t *c.C, ip string, names ...string) {
@@ -292,6 +293,12 @@ func (h *hostnames) Add(t *c.C, ip string, names ...string) {
defer f.Close()
_, err = fmt.Fprintf(f, "%s %s\n", ip, strings.Join(names, " "))
t.Assert(err, c.IsNil)
+
+ // wait for the Go resolver's /etc/hosts cache to expire
+ if time.Since(h.lastModified) < 5*time.Second {
+ time.Sleep(5 * time.Second)
+ }
+ h.lastModified = time.Now()
}
func (h *hostnames) Remove(t *c.C, ip string) {
|
test: Wait for the Go resolver's /etc/hosts cache to expire
|
flynn_flynn
|
train
|
go
|
04aeba7a98f51fef425b82e880c5e00cc08b0609
|
diff --git a/src/components/core/core.js b/src/components/core/core.js
index <HASH>..<HASH> 100644
--- a/src/components/core/core.js
+++ b/src/components/core/core.js
@@ -342,7 +342,7 @@ export default class Core extends UIObject {
const sources = options.source || options.sources
sources && this.load(sources, options.mimeType || this.options.mimeType)
- this.trigger(Events.CORE_OPTIONS_CHANGE)
+ this.trigger(Events.CORE_OPTIONS_CHANGE, options) // Trigger with newly provided options
this.containers.forEach((container) => container.configure(this.options))
}
|
feat(core): pass new options in CORE_OPTIONS_CHANGE event
|
clappr_clappr
|
train
|
js
|
46abedccd36b18e29937d16412b8533ac207a215
|
diff --git a/test/org/nutz/http/HttpTest.java b/test/org/nutz/http/HttpTest.java
index <HASH>..<HASH> 100644
--- a/test/org/nutz/http/HttpTest.java
+++ b/test/org/nutz/http/HttpTest.java
@@ -40,9 +40,9 @@ public class HttpTest {
@Test
public void testEncode() {
// 根据Http头的Content-Type自动识别编码类型
- Response response1 = Http.get("www.baidu.com");
- assertEquals("utf-8", response1.getEncodeType());
- assertTrue(response1.getContent().indexOf("百度") > 0);
+ Response response1 = Http.get("www.danoonetworks.com");
+ assertEquals("utf-8", response1.getEncodeType().toLowerCase());
+ assertTrue(response1.getContent().indexOf("视通") > 0);
// 如果Http头中没有指定编码类型,用户也可以手工指定
Response response2 = Http.get("www.exam8.com/SiteMap/Article1.htm");
assertTrue(response2.getContent("GBK").indexOf("考试吧") > 0);
|
fix: HttpTest fail, because www.baidu.com not resp as UTF8 now
|
nutzam_nutz
|
train
|
java
|
d29f0d6bc117a8275477fccefbdb02e111a092e6
|
diff --git a/test/process.js b/test/process.js
index <HASH>..<HASH> 100644
--- a/test/process.js
+++ b/test/process.js
@@ -97,9 +97,13 @@ describe('watcher', function() {
sock.on('message', function(msg, update){
timer.save()
- expect(msg).to.equal('update')
- expect(update).to.have.length.of(1)
- can_go_on = true
+
+ if(msg == 'update') {
+ expect(update).to.have.length.of(1)
+ can_go_on = true
+ } else {
+ expect(msg).to.equal('waiting')
+ }
})
})
})
|
test(watcher): test waiting status
|
ezseed_watcher
|
train
|
js
|
43e8d51d1e3529b2afb3e3cd9dce8adedb66180b
|
diff --git a/shortuuid/__init__.py b/shortuuid/__init__.py
index <HASH>..<HASH> 100644
--- a/shortuuid/__init__.py
+++ b/shortuuid/__init__.py
@@ -1,6 +1,4 @@
# flake8: noqa
-import importlib.metadata
-
from shortuuid.main import decode
from shortuuid.main import encode
from shortuuid.main import get_alphabet
|
fix: Fix compatibility for python versions older than <I> (#<I>)
|
skorokithakis_shortuuid
|
train
|
py
|
5a521db38534b1a6b1d60114b7c69e9526392a79
|
diff --git a/packages/optimizely-sdk/lib/utils/fns/index.js b/packages/optimizely-sdk/lib/utils/fns/index.js
index <HASH>..<HASH> 100644
--- a/packages/optimizely-sdk/lib/utils/fns/index.js
+++ b/packages/optimizely-sdk/lib/utils/fns/index.js
@@ -30,7 +30,6 @@ module.exports = {
return _isFinite(number) && Math.abs(number) <= MAX_NUMBER_LIMIT;
},
keyBy: require('lodash/keyBy'),
- filter: require('lodash/filter'),
forEach: require('lodash/forEach'),
forOwn: require('lodash/forOwn'),
map: require('lodash/map'),
|
refactor: Removed lodash.filter (#<I>)
Summary:
Removed lodash.filter because it wasnt being used anywhere in the project. This is part of an effort to remove lodash dependency to reduce bundle size.
Test Plan:
All Unit tests and Full Stack SDK compatibility passed
|
optimizely_javascript-sdk
|
train
|
js
|
e37788c9a0aa5593e636e190ceb8e79b6604c715
|
diff --git a/platform/nativescript/element-registry.js b/platform/nativescript/element-registry.js
index <HASH>..<HASH> 100644
--- a/platform/nativescript/element-registry.js
+++ b/platform/nativescript/element-registry.js
@@ -1,4 +1,5 @@
import * as builtInComponents from './runtime/components'
+import { trace } from './util'
const elementMap = {}
const nativeRegExp = /Native/gi
@@ -25,8 +26,11 @@ export function registerElement(elementName, resolver, meta) {
meta = Object.assign({}, defaultViewMeta, meta)
+ // allow override of elements classes (N ones especially)
+ // this is very practical in case you want to test new component
+ // or simply override the global Button for example
if (elementMap[normalizedName]) {
- throw new Error(`Element for ${elementName} already registered.`)
+ trace(`Element for ${elementName} already registered.`)
}
if (!meta.component) {
|
feat(registry): allow overriding elements (#<I>)
* feat: allow override of registerElement
* fix: log when element was already registered
|
nativescript-vue_nativescript-vue
|
train
|
js
|
6ebdc5e2288f410fac64c8a3bba0e88e5de7e641
|
diff --git a/coveralls/api.py b/coveralls/api.py
index <HASH>..<HASH> 100644
--- a/coveralls/api.py
+++ b/coveralls/api.py
@@ -224,7 +224,8 @@ class Coveralls:
# TODO: an auto-incrementing integer might be easier to reason
# about if we could fetch the previous value
new_id = '{}-{}'.format(
- self.config['service_job_id'], random.randint(0, sys.maxsize))
+ self.config.get('service_job_id', 42),
+ random.randint(0, sys.maxsize))
print('resubmitting with id {}'.format(new_id))
self.config['service_job_id'] = new_id
|
fix(api): fixup retries for services without job IDs
|
coveralls-clients_coveralls-python
|
train
|
py
|
cba6cd087178281c6eb42432cea11146f3292662
|
diff --git a/src/satosa/micro_services/primary_identifier.py b/src/satosa/micro_services/primary_identifier.py
index <HASH>..<HASH> 100644
--- a/src/satosa/micro_services/primary_identifier.py
+++ b/src/satosa/micro_services/primary_identifier.py
@@ -54,7 +54,7 @@ class PrimaryIdentifier(satosa.micro_services.base.ResponseMicroService):
# Get the values asserted by the IdP for the configured list of attribute names for this candidate
# and substitute None if the IdP did not assert any value for a configured attribute.
- values = [ attributes.get(attribute_name, [None])[0] for attribute_name in candidate['attribute_names'] ]
+ values = [ attributes.get(attribute_name, [None])[0] for attribute_name in candidate['attribute_names'] if attribute_name != 'name_id' ]
msg = "{} Found candidate values {}".format(logprefix, values)
logline = lu.LOG_FMT.format(id=lu.get_session_id(context.state), message=msg)
logger.debug(logline)
|
fix: PrimaryIdentifier: exclude name_id from attribute value search
Attribute 'name_id' gets special handling in other parts of the code - and the
way attribute values were fetched, name_id would always throw a None value in,
which would later cause this candidate to be rejected with
Candidate is missing value so skipping
This makes name_id work with PrimaryIdentifier
|
IdentityPython_SATOSA
|
train
|
py
|
9c04b2efcde649d41b6d6f3be461928069a40799
|
diff --git a/library.js b/library.js
index <HASH>..<HASH> 100644
--- a/library.js
+++ b/library.js
@@ -481,6 +481,10 @@ Plugin._recaptchaCheck = function (req, res, userData, next) {
};
Plugin._hcaptchaCheck = async (userData) => {
+ if (pluginSettings.hCaptchaEnabled !== 'on') {
+ return;
+ }
+
const response = await hCaptcha.verify(pluginSettings.hCaptchaSecretKey, userData['h-captcha-response']);
if (!response.success) {
throw new Error('Captcha not verified, are you a robot?');
|
fix: #<I>, recaptcha failing even if verified ok
|
akhoury_nodebb-plugin-spam-be-gone
|
train
|
js
|
f8407a120afa9867675f1d18ce5182985ae89743
|
diff --git a/packages/core-js/internals/global.js b/packages/core-js/internals/global.js
index <HASH>..<HASH> 100644
--- a/packages/core-js/internals/global.js
+++ b/packages/core-js/internals/global.js
@@ -10,4 +10,4 @@ module.exports =
check(typeof self == 'object' && self) ||
check(typeof global == 'object' && global) ||
// eslint-disable-next-line no-new-func
- Function('return this')();
+ (function () { return this; })() || Function('return this')();
|
fix: some runtime can't use new Function (#<I>)
|
zloirock_core-js
|
train
|
js
|
2d37d7fffdda3cb2329b77eb2bf80fc9e153eb0a
|
diff --git a/views/default/object/comment/elements/icon.php b/views/default/object/comment/elements/icon.php
index <HASH>..<HASH> 100644
--- a/views/default/object/comment/elements/icon.php
+++ b/views/default/object/comment/elements/icon.php
@@ -1,7 +1,11 @@
<?php
-namespace hypeJunction\Inbox;
-
$entity = elgg_extract('entity', $vars);
+if (!$entity instanceof ElggEntity) {
+ return;
+}
-echo elgg_view_entity_icon($entity, 'small');
\ No newline at end of file
+$owner = $entity->getOwnerEntity();
+echo elgg_view_entity_icon($owner, 'small', [
+ 'use_hover' => false,
+]);
\ No newline at end of file
|
fix(views): use actual owner icon
|
hypeJunction_hypeInteractions
|
train
|
php
|
c45103828cabb590e4cd7fcb0d8e620351424054
|
diff --git a/actor-apps/app-web/src/app/stores/AddContactStore.js b/actor-apps/app-web/src/app/stores/AddContactStore.js
index <HASH>..<HASH> 100644
--- a/actor-apps/app-web/src/app/stores/AddContactStore.js
+++ b/actor-apps/app-web/src/app/stores/AddContactStore.js
@@ -36,8 +36,7 @@ class AddContactStore extends EventEmitter {
let AddContactStoreInstance = new AddContactStore();
AddContactStoreInstance.dispatchToken = ActorAppDispatcher.register(action => {
- console.info(action);
-
+ // console.info(action);
switch(action.type) {
case ActionTypes.CONTACT_ADD_MODAL_SHOW:
_isModalOpen = true;
|
fix(web): disable console output for actions;
|
actorapp_actor-platform
|
train
|
js
|
2a4efc596d6299a706f2b1b5ea90705279ab33b1
|
diff --git a/internal/support/scheduler/main.go b/internal/support/scheduler/main.go
index <HASH>..<HASH> 100644
--- a/internal/support/scheduler/main.go
+++ b/internal/support/scheduler/main.go
@@ -72,8 +72,8 @@ func Main(ctx context.Context, cancel context.CancelFunc, router *mux.Router, re
dic,
[]interfaces.BootstrapHandler{
handlers.SecureProviderBootstrapHandler,
- v2Handlers.NewDatabase(httpServer, configuration, v2SchedulerContainer.DBClientInterfaceName).BootstrapHandler, // add v2 db client bootstrap handler
database.NewDatabase(httpServer, configuration).BootstrapHandler,
+ v2Handlers.NewDatabase(httpServer, configuration, v2SchedulerContainer.DBClientInterfaceName).BootstrapHandler, // add v2 db client bootstrap handler
NewBootstrap(router).BootstrapHandler,
telemetry.BootstrapHandler,
httpServer.BootstrapHandler,
|
fix: Support Scheduler V1 DB credentials not used due to V2 DB Handler side effect (#<I>)
Reveresed order of DB handlers to resove issue.
closes #<I>
|
edgexfoundry_edgex-go
|
train
|
go
|
b3fb7497c29dca54687e5b4d45ac59ea5113a66c
|
diff --git a/script/release/notes/notes.js b/script/release/notes/notes.js
index <HASH>..<HASH> 100644
--- a/script/release/notes/notes.js
+++ b/script/release/notes/notes.js
@@ -591,6 +591,8 @@ const getNotes = async (fromRef, toRef, newVersion) => {
})
}
+ pool.commits = removeSupercededChromiumUpdates(pool.commits)
+
const notes = {
breaking: [],
docs: [],
@@ -623,6 +625,20 @@ const getNotes = async (fromRef, toRef, newVersion) => {
return notes
}
+const removeSupercededChromiumUpdates = (commits) => {
+ const chromiumRegex = /^Updated Chromium to \d+\.\d+\.\d+\.\d+/
+ const updates = commits.filter(commit => (commit.note || commit.subject).match(chromiumRegex))
+ const keepers = commits.filter(commit => !updates.includes(commit))
+
+ // keep the newest update.
+ if (updates.length) {
+ updates.sort((a, b) => a.originalPr.number - b.originalPr.number)
+ keepers.push(updates.pop())
+ }
+
+ return keepers
+}
+
/***
**** Render
***/
|
chore: omit superceded Chromium updates from notes (#<I>)
* feat: omit superceded Chromium updates from notes
* chore: simplify changed code
|
electron_electron
|
train
|
js
|
cae3d42842a431f9814ab548a5a558d3d6a071be
|
diff --git a/lib/read.js b/lib/read.js
index <HASH>..<HASH> 100644
--- a/lib/read.js
+++ b/lib/read.js
@@ -876,7 +876,7 @@ Reader.prototype.handler = function(name) {
// helpers //////////////////////////
function createStack() {
- const stack = [];
+ var stack = [];
Object.defineProperty(stack, 'peek', {
value: function() {
|
fix(read): make ES5 compliant
|
bpmn-io_moddle-xml
|
train
|
js
|
16f62050044d8eaca1ee794ab1903a719895662f
|
diff --git a/cmd/helm/helm_test.go b/cmd/helm/helm_test.go
index <HASH>..<HASH> 100644
--- a/cmd/helm/helm_test.go
+++ b/cmd/helm/helm_test.go
@@ -31,6 +31,7 @@ import (
"helm.sh/helm/v3/internal/test"
"helm.sh/helm/v3/pkg/action"
"helm.sh/helm/v3/pkg/chartutil"
+ "helm.sh/helm/v3/pkg/cli"
kubefake "helm.sh/helm/v3/pkg/kube/fake"
"helm.sh/helm/v3/pkg/release"
"helm.sh/helm/v3/pkg/storage"
@@ -136,14 +137,14 @@ func executeActionCommand(cmd string) (*cobra.Command, string, error) {
}
func resetEnv() func() {
- origSettings, origEnv := settings, os.Environ()
+ origEnv := os.Environ()
return func() {
os.Clearenv()
- settings = origSettings
for _, pair := range origEnv {
kv := strings.SplitN(pair, "=", 2)
os.Setenv(kv[0], kv[1])
}
+ settings = cli.New()
}
}
|
fix(test): Make resetEnv() properly reset settings
Because the 'settings' variable is a pointer, it cannot be used to store
the original envSettings and then restore them.
Instead, this commit creates an entirely new envSettings, after having
set the environment variables, which may affect it.
|
helm_helm
|
train
|
go
|
d563f8a910e5e22d9fec64593bd9c6498a4230b9
|
diff --git a/src/router-configuration.js b/src/router-configuration.js
index <HASH>..<HASH> 100644
--- a/src/router-configuration.js
+++ b/src/router-configuration.js
@@ -177,7 +177,7 @@ export class RouterConfiguration {
router.useViewPortDefaults(this.viewPortDefaults);
}
- router.options = this.options;
+ Object.assign(router.options, this.options);
let pipelineSteps = this.pipelineSteps;
if (pipelineSteps.length) {
|
fix(router-configuration): merge options instead of assign in exportRouter
|
aurelia_router
|
train
|
js
|
620370357f4e832b7a5cf8c990c754e3f591a570
|
diff --git a/nicfit/aio.py b/nicfit/aio.py
index <HASH>..<HASH> 100644
--- a/nicfit/aio.py
+++ b/nicfit/aio.py
@@ -23,6 +23,11 @@ class Application(AsyncApplication):
except asyncio.CancelledError as ex:
self.log.debug("aio.Application: Cancelled: {}"
.format(ex))
+ except BaseException as base_ex:
+ # This cleans up the _main_task and prevents"asyncio:Task exception was never retrieved"
+ # e.g. SystemExit
+ raise self._main_task.exception()
+
return self._exit_status
def stop(self, exit_status=0):
|
fix: Consume main_task exceptions
|
nicfit_nicfit.py
|
train
|
py
|
40211f72a6e52eeb37386e925fc9ff66afa399b8
|
diff --git a/go/vt/vtgate/plan_execute.go b/go/vt/vtgate/plan_execute.go
index <HASH>..<HASH> 100644
--- a/go/vt/vtgate/plan_execute.go
+++ b/go/vt/vtgate/plan_execute.go
@@ -219,7 +219,7 @@ func (e *Executor) executePlan(
if err != nil {
return nil, e.rollbackExecIfNeeded(ctx, safeSession, bindVars, logStats, err)
}
- return qr, err
+ return qr, nil
}
// rollbackExecIfNeeded rollbacks the partial execution if earlier it was detected that it needs partial query execution to be rolled back.
|
refactor: return nil explicity instead of err having nil
|
vitessio_vitess
|
train
|
go
|
2193f120c30aecc4c077b93cd29aa5df9cf7b85e
|
diff --git a/packages/records/src/outputs/display-data.js b/packages/records/src/outputs/display-data.js
index <HASH>..<HASH> 100644
--- a/packages/records/src/outputs/display-data.js
+++ b/packages/records/src/outputs/display-data.js
@@ -70,9 +70,10 @@ export function displayDataRecordFromNbformat(
{},
{
outputType: s.output_type,
- data: common.createImmutableMimeBundle(s.data)
- },
- common.sanitize(s)
+ data: s.data,
+ metadata: s.metadata
+ }
+ //common.sanitize(s)
)
);
}
|
chore: removing sanitize for now
|
nteract_nteract
|
train
|
js
|
bc2b2c9c278a90cf89aa17ea8aa1b7e2c849c429
|
diff --git a/samcli/__init__.py b/samcli/__init__.py
index <HASH>..<HASH> 100644
--- a/samcli/__init__.py
+++ b/samcli/__init__.py
@@ -2,4 +2,4 @@
SAM CLI version
"""
-__version__ = "1.38.1"
+__version__ = "1.39.0"
|
chore: Version bump (#<I>)
|
awslabs_aws-sam-cli
|
train
|
py
|
963249be416c962d98d911c9df9c013757393ab2
|
diff --git a/components/select-ng/select-ng.js b/components/select-ng/select-ng.js
index <HASH>..<HASH> 100644
--- a/components/select-ng/select-ng.js
+++ b/components/select-ng/select-ng.js
@@ -232,6 +232,7 @@ angular.module('Ring.select', ['Ring.select.options'])
selectedLabel: '@',
externalFilter: '=',
filter: '=?',
+ clear: '=?',
onSelect: '&',
onOpen: '&',
onClose: '&',
@@ -384,6 +385,7 @@ angular.module('Ring.select', ['Ring.select.options'])
label: ctrl.label,
selectedLabel: ctrl.selectedLabel,
filter: ctrl.filter,
+ clear: ctrl.clear,
type: getSelectType(),
loadingMessage: ctrl.loadingMessage,
notFoundMessage: ctrl.notFoundMessage,
|
chore: support clear attribute for angular select
Former-commit-id: d<I>f<I>bdac<I>cecd<I>d<I>
|
JetBrains_ring-ui
|
train
|
js
|
261dc04d8e9112dca217b6561e7f1e44a452939e
|
diff --git a/aio/tools/transforms/examples-package/services/region-parser.js b/aio/tools/transforms/examples-package/services/region-parser.js
index <HASH>..<HASH> 100644
--- a/aio/tools/transforms/examples-package/services/region-parser.js
+++ b/aio/tools/transforms/examples-package/services/region-parser.js
@@ -16,9 +16,12 @@ regionParserImpl.regionMatchers = {
es6: inlineC,
dart: inlineC,
html: html,
+ svg: html,
css: blockC,
yaml: inlineHash,
+ yml: inlineHash,
jade: inlineCOnly,
+ pug: inlineCOnly,
json: inlineC,
'json.annotated': inlineC
};
|
fix(docs-infra): detect docregions on more file types (`pug`, `svg`, `yml`) (#<I>)
PR Close #<I>
|
angular_angular
|
train
|
js
|
04d35e4c347289f2d8649670d75a51fe918e40f3
|
diff --git a/src/game/rooms.js b/src/game/rooms.js
index <HASH>..<HASH> 100644
--- a/src/game/rooms.js
+++ b/src/game/rooms.js
@@ -1173,7 +1173,7 @@ exports.makePos = function(_register) {
RoomPosition.prototype.getDirectionTo = register.wrapFn(function(firstArg, secondArg) {
var [x,y,roomName] = utils.fetchXYArguments(firstArg, secondArg, globals);
- if(roomName == this.roomName) {
+ if(!roomName || roomName == this.roomName) {
return utils.getDirection(x - this.x, y - this.y);
}
|
fix(runtime): fix a bug in `RoomPostion.getDirectionTo`
|
screeps_engine
|
train
|
js
|
9f8a054f8865ca95f67ae20f7a3b721367d6df9a
|
diff --git a/src/api/web/index.js b/src/api/web/index.js
index <HASH>..<HASH> 100644
--- a/src/api/web/index.js
+++ b/src/api/web/index.js
@@ -67,6 +67,7 @@ module.exports = function(config, auth, storage) {
.replace(/ToReplaceByVersion/g, pkgJSON.version)
.replace(/ToReplaceByTitle/g, _.get(config, 'web.title') ? config.web.title : WEB_TITLE)
.replace(/ToReplaceByLogo/g, _.get(config, 'web.logo') ? config.web.logo : '')
+ .replace(/ToReplaceByPrimaryColor/g, _.get(config, 'web.primary_color') ? config.web.primary_color : '')
.replace(/ToReplaceByScope/g, _.get(config, 'web.scope') ? config.web.scope : '');
res.setHeader('Content-Type', HEADERS.TEXT_HTML);
|
feat: accept web.primary_color as config option and inject into webui (#<I>)
|
verdaccio_verdaccio
|
train
|
js
|
688c1b9dd2a3aa05bc3a712264ce14b9c8998b06
|
diff --git a/scripts/publish-to-s3.js b/scripts/publish-to-s3.js
index <HASH>..<HASH> 100644
--- a/scripts/publish-to-s3.js
+++ b/scripts/publish-to-s3.js
@@ -70,7 +70,7 @@ const uploadFile = (data, fileName, options) => {
Promise.all(
pkg.files.map(filePath => {
const name = path.basename(filePath)
- return Promise.all([readFile(name), name])
+ return Promise.all([readFile(filePath), name])
})
)
.then(files =>
|
chore: fix s3 publish script
|
uploadcare_uploadcare-widget
|
train
|
js
|
39f4f26ad1fb8ec6b96254620a1b9dcc1525694a
|
diff --git a/src/components/gridList/gridList.js b/src/components/gridList/gridList.js
index <HASH>..<HASH> 100644
--- a/src/components/gridList/gridList.js
+++ b/src/components/gridList/gridList.js
@@ -293,7 +293,11 @@ function GridListDirective($interpolate, $mdConstant, $mdGridLayout, $mdMedia, $
}
function getColumnCount() {
- return parseInt($mdMedia.getResponsiveAttribute(attrs, 'md-cols'), 10);
+ var colCount = parseInt($mdMedia.getResponsiveAttribute(attrs, 'md-cols'), 10);
+ if (isNaN(colCount)) {
+ throw 'md-grid-list: md-cols attribute was not found, or contained a non-numeric value';
+ }
+ return colCount;
}
function getGutter() {
@@ -356,7 +360,7 @@ GridListController.prototype = {
this.invalidateLayout();
},
- invalidateLayout: function(tile) {
+ invalidateLayout: function() {
if (this.invalidated) {
return;
}
|
fix(gridlist): Throws error on invalid or missing colCount to avoid infinite loops
Close #<I>.
|
angular_material
|
train
|
js
|
fc892130a6689e4a6f1cea2648317d8acaebeda7
|
diff --git a/word_tokenizer.go b/word_tokenizer.go
index <HASH>..<HASH> 100644
--- a/word_tokenizer.go
+++ b/word_tokenizer.go
@@ -80,10 +80,14 @@ func (p *DefaultWordTokenizer) Tokenize(text string, onlyPeriodContext bool) []*
getNextWord := false
for i, char := range text {
- if !unicode.IsSpace(char) && i != textLength-1 {
+ if !unicode.IsSpace(char) && !IsCjkPunct(char) && i != textLength-1 {
continue
}
+ if IsCjkPunct(char) {
+ i += len(string(char))
+ }
+
if char == '\n' {
if lineStart {
paragraphStart = true
@@ -254,3 +258,11 @@ func (p *DefaultWordTokenizer) HasSentEndChars(t *Token) bool {
return false
}
+
+func IsCjkPunct(r rune) bool {
+ switch r {
+ case '。', ';', '!', '?':
+ return true
+ }
+ return false
+}
|
feat: add support for CJK
|
neurosnap_sentences
|
train
|
go
|
db33f4bd247d485419522b859814a2c7acc8207a
|
diff --git a/http/bucket_service.go b/http/bucket_service.go
index <HASH>..<HASH> 100644
--- a/http/bucket_service.go
+++ b/http/bucket_service.go
@@ -327,7 +327,11 @@ type postBucketRequest struct {
func (b postBucketRequest) Validate() error {
if !b.Bucket.OrgID.Valid() {
- return fmt.Errorf("bucket requires an organization")
+ return &influxdb.Error{
+ Code: influxdb.EInvalid,
+ Msg: "bucket requires an organization",
+ }
+
}
return nil
}
@@ -335,7 +339,10 @@ func (b postBucketRequest) Validate() error {
func decodePostBucketRequest(ctx context.Context, r *http.Request) (*postBucketRequest, error) {
b := &bucket{}
if err := json.NewDecoder(r.Body).Decode(b); err != nil {
- return nil, err
+ return nil, &influxdb.Error{
+ Code: influxdb.EInvalid,
+ Err: err,
+ }
}
pb, err := b.toInfluxDB()
|
fix(http): post bucket validation.
|
influxdata_influxdb
|
train
|
go
|
b3645727e43817027bed6e32e1c06b8ad2bfb559
|
diff --git a/packages/workbox/lib/defaults.js b/packages/workbox/lib/defaults.js
index <HASH>..<HASH> 100644
--- a/packages/workbox/lib/defaults.js
+++ b/packages/workbox/lib/defaults.js
@@ -1,6 +1,6 @@
module.exports = {
// General
- workboxVersion: '3.6.3-5',
+ workboxVersion: '4.0.0-rc.0',
workboxURL: undefined,
importScripts: [],
autoRegister: true,
|
feat(workbox): upgrade workboxVersion to <I>-rc<I>
|
nuxt-community_pwa-module
|
train
|
js
|
842a760aead6d68aa5fc6d2a469bd6de2e60c038
|
diff --git a/test/e2e/runner.js b/test/e2e/runner.js
index <HASH>..<HASH> 100644
--- a/test/e2e/runner.js
+++ b/test/e2e/runner.js
@@ -37,8 +37,7 @@ const NW_CONFIG = isLocal
? resolve(__dirname, './nightwatch.browserstack.js')
: resolve(__dirname, './nightwatch.config.js')
-// add a configuration by default if not provided
-// add a configuration by default if not provided
+// check -c option is passed when usig multiple environments
if (args.indexOf('-c') < 0) {
// check if multiple envs are provided. The way Nightwatch works
// requires to explicitely provide the conf
@@ -51,7 +50,6 @@ if (args.indexOf('-c') < 0) {
)
process.exit(1)
}
- args.push('-c', NW_CONFIG)
} else if (isLocal) {
const conf = args[args.indexOf('-c') + 1]
if (resolve('.', conf) !== NW_CONFIG) {
|
chore(test): remove useless code and comments (#<I>)
* chore(test): remove useless code and comments
* chore: comment
|
vuejs_vue-router
|
train
|
js
|
5a329f221123efbb5a5515692260eb87469ebd39
|
diff --git a/test/test_vim.py b/test/test_vim.py
index <HASH>..<HASH> 100644
--- a/test/test_vim.py
+++ b/test/test_vim.py
@@ -90,9 +90,9 @@ def test_vars(vim):
def test_options(vim):
- assert vim.options['listchars'] == 'tab:> ,trail:-,nbsp:+'
- vim.options['listchars'] = 'tab:xy'
- assert vim.options['listchars'] == 'tab:xy'
+ assert vim.windows[0].options['listchars'] == 'tab:> ,trail:-,nbsp:+'
+ vim.windows[0].options['listchars'] = 'tab:xy'
+ assert vim.windows[0].options['listchars'] == 'tab:xy'
def test_buffers(vim):
|
test: fix test_options
IIRC this became more strict at some point: since 'listchars' is
window-local, it is not resolved by vim.options (nvim_get_option).
|
neovim_pynvim
|
train
|
py
|
6ace47c6bad18c8326bf09088be3f16de91f5ded
|
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
@@ -420,7 +420,7 @@ module.exports = function (cfg) {
filename: cfg.pwa.filename,
staticFileGlobs: [`${cfg.build.distDir}/**/*.{${cfg.pwa.cacheExt}}`],
minify: cfg.build.minify,
- stripPrefix: cfg.build.distDir + '/'
+ stripPrefix: cfg.build.distDir.replace(/\\/g, '/') + '/'
}),
// write manifest.json file
|
fix: Filepaths relative to project root in service-worker.js on windows #<I>
|
quasarframework_quasar-cli
|
train
|
js
|
2305311ec1a9036307ebe38ef25be85cef901fd9
|
diff --git a/src/client/voice/VoiceWebSocket.js b/src/client/voice/VoiceWebSocket.js
index <HASH>..<HASH> 100644
--- a/src/client/voice/VoiceWebSocket.js
+++ b/src/client/voice/VoiceWebSocket.js
@@ -69,7 +69,7 @@ class VoiceWebSocket extends EventEmitter {
* The actual WebSocket used to connect to the Voice WebSocket Server.
* @type {WebSocket}
*/
- this.ws = WebSocket.create(`wss://${this.voiceConnection.authentication.endpoint}`, { v: 3 });
+ this.ws = WebSocket.create(`wss://${this.voiceConnection.authentication.endpoint}/`, { v: 3 });
this.ws.onopen = this.onOpen.bind(this);
this.ws.onmessage = this.onMessage.bind(this);
this.ws.onclose = this.onClose.bind(this);
@@ -97,7 +97,7 @@ class VoiceWebSocket extends EventEmitter {
*/
sendPacket(packet) {
try {
- packet = WebSocket.pack(packet);
+ packet = JSON.stringify(packet);
} catch (error) {
return Promise.reject(error);
}
|
fix: voice websocket sending
|
discordjs_discord.js
|
train
|
js
|
b05543900dd324449d0897a2198c6b034a19a2c7
|
diff --git a/packages/webpack-config/plugins/config/htmlWebpackPlugin.js b/packages/webpack-config/plugins/config/htmlWebpackPlugin.js
index <HASH>..<HASH> 100644
--- a/packages/webpack-config/plugins/config/htmlWebpackPlugin.js
+++ b/packages/webpack-config/plugins/config/htmlWebpackPlugin.js
@@ -1,11 +1,15 @@
const HtmlWebpackPlugin = require('html-webpack-plugin');
+const webpackPkgConfig = require('../../webpackPkgConfig');
+const { fromRoot, getPkgSrcDir } = require('@goldwasserexchange/read-pkg-up-helpers');
+
+const { htmlTemplate } = webpackPkgConfig;
module.exports = new HtmlWebpackPlugin(Object.assign(
{},
{
inject: true,
env: process.env,
- template: 'app/index.ejs',
+ template: htmlTemplate || `${fromRoot(getPkgSrcDir())}/index.ejs`,
},
process.env.NODE_ENV === 'production'
? {
|
feat(webpack-config): read template file from package.json for HTML Webpack plugin
affects: @goldwasserexchange/webpack-config
ISSUES CLOSED: #<I>
|
goldwasserexchange_public
|
train
|
js
|
1b984ed6b708b5acba42194b66699aae1d243fe2
|
diff --git a/src/components/tabs/js/tabsController.js b/src/components/tabs/js/tabsController.js
index <HASH>..<HASH> 100644
--- a/src/components/tabs/js/tabsController.js
+++ b/src/components/tabs/js/tabsController.js
@@ -278,7 +278,10 @@ function MdTabsController ($scope, $element, $window, $mdConstant, $mdTabInkRipp
function select (index) {
if (!locked) ctrl.focusIndex = ctrl.selectedIndex = index;
ctrl.lastClick = true;
- ctrl.tabs[ index ].element.triggerHandler('click');
+ // nextTick is required to prevent errors in user-defined click events
+ $mdUtil.nextTick(function () {
+ ctrl.tabs[ index ].element.triggerHandler('click');
+ }, false);
}
/**
|
fix(tabs): fixes errors thrown when user-defined click events triggered
their own digest cycles
|
angular_material
|
train
|
js
|
78a523cfda538910b127f84ecc9a959a0f0330fe
|
diff --git a/lib/jss/utility.rb b/lib/jss/utility.rb
index <HASH>..<HASH> 100644
--- a/lib/jss/utility.rb
+++ b/lib/jss/utility.rb
@@ -211,7 +211,7 @@ module JSS
# if we're here, its a Pathname
raise JSS::MissingDataError, "No such file: #{plist}" unless plist.file?
- Plist.parse_xml `/usr/libexec/PlistBuddy -x -c print #{Shellwords.escape(plist.to_s)}`
+ Plist.parse_xml `/usr/libexec/PlistBuddy -x -c print #{Shellwords.escape(plist.to_s)}`.force_encoding('UTF-8')
end # parse_plist
# Converts anything that responds to #to_s to a Time, or nil
|
fix: parsing plist xml is always UTF-8
|
PixarAnimationStudios_ruby-jss
|
train
|
rb
|
f30e3e59b5809cfd8306dad0f831138c7fef29a9
|
diff --git a/modules/angular2/test/core/compiler/integration_spec.js b/modules/angular2/test/core/compiler/integration_spec.js
index <HASH>..<HASH> 100644
--- a/modules/angular2/test/core/compiler/integration_spec.js
+++ b/modules/angular2/test/core/compiler/integration_spec.js
@@ -102,7 +102,7 @@ export function main() {
});
});
- it('should consume binding to propery names where attr name and property name do not match', (done) => {
+ it('should consume binding to property names where attr name and property name do not match', (done) => {
tplResolver.setTemplate(MyComp, new Template({inline: '<div [tabindex]="ctxNumProp"></div>'}));
compiler.compile(MyComp).then((pv) => {
|
fix(docs): fix typo in compiler integration_spec.js
Closes #<I>
|
angular_angular
|
train
|
js
|
c98154e51fb6e3b142543c68d882e99cd1057362
|
diff --git a/src/parser.js b/src/parser.js
index <HASH>..<HASH> 100644
--- a/src/parser.js
+++ b/src/parser.js
@@ -19,21 +19,23 @@ export class Parser {
parse(input, opts = {}) {
input = input || '';
- if (!this.cache[input]) {
+ const hashKey = input + ':' + JSON.stringify(opts);
+
+ if (!this.cache[hashKey]) {
const parserImp = new ParserImplementation(this.lexer, input, opts);
- this.cache[input] = parserImp.parseExpression();
+ this.cache[hashKey] = parserImp.parseExpression();
let exp = '';
for (let i = 0, length = parserImp.tokens.length; i < length; ++i) {
exp += parserImp.tokens[i].text;
}
- this.cache[input].toString = function() {
+ this.cache[hashKey].toString = function() {
return exp;
};
}
- return this.cache[input];
+ return this.cache[hashKey];
}
}
|
fix: fix cache collision for same expression but in two modes
|
buttonwoodcx_bcx-expression-evaluator
|
train
|
js
|
53c28cc83792ad5ea0215ae9e6ce4d031290ce37
|
diff --git a/gspreadsheet/gspreadsheet.py b/gspreadsheet/gspreadsheet.py
index <HASH>..<HASH> 100644
--- a/gspreadsheet/gspreadsheet.py
+++ b/gspreadsheet/gspreadsheet.py
@@ -141,7 +141,7 @@ class GSpreadsheet(object):
print "! not a valid url:", url
raise
- self.connect()
+ self.client = self.get_client()
# Now look for the worksheet
if url is not None:
@@ -154,21 +154,17 @@ class GSpreadsheet(object):
self.get_feed()
- def connect(self):
+ def get_client(self):
+ """Get the google data client."""
global gd_client
if gd_client:
- self.client = gd_client
- return
+ return gd_client
+
gd_client = SpreadsheetsService()
gd_client.source = "texastribune-ttspreadimporter-1"
-
- # login
- email = self.email
- password = self.password
- if email and password:
- gd_client.ClientLogin(email, password)
-
- self.client = gd_client
+ if self.email and self.password:
+ gd_client.ClientLogin(self.email, self.password)
+ return gd_client
def get_feed(self):
if self.worksheet:
|
refactor: connect to google to return a reference, not set
|
texastribune_gspreadsheet
|
train
|
py
|
bc848006a9745d4c4f8524fdded962be9aae4a52
|
diff --git a/test/index.js b/test/index.js
index <HASH>..<HASH> 100644
--- a/test/index.js
+++ b/test/index.js
@@ -78,6 +78,9 @@ describe("getPaths()", function() {
it("should return the lowest common folder", async function() {
let paths = getPaths("scss");
expect(await paths).to.eql(["folder2", "folder3", "folder4", "folder5/folder5-1", "folder6/folder6-1", "."]);
+
+ paths = getPaths("js");
+ expect(await paths).to.eql(["folder1", "folder2", "folder4/folder4-3", "folder5/folder5-2", "folder6/folder6-2/folder6-2-1"]);
});
});
});
|
test: add test for JS inside folder structure 2
|
unumux_ux-get-paths
|
train
|
js
|
b70f17b88d9f653a4c3232688678cf886b5291f1
|
diff --git a/src/utils/iterators.js b/src/utils/iterators.js
index <HASH>..<HASH> 100644
--- a/src/utils/iterators.js
+++ b/src/utils/iterators.js
@@ -217,7 +217,7 @@ export function CancelableGenerator(iterable, onFinally = async () => {}, { time
if (v instanceof Error) {
p.reject(v)
} else {
- p.resolve()
+ p.resolve({ value: undefined, done: true })
}
}
|
fix(pipeline): Fix cancel resolve shape.
|
streamr-dev_streamr-client-javascript
|
train
|
js
|
d51b549024ec43178353636681f7488b8008a553
|
diff --git a/connection/connection.js b/connection/connection.js
index <HASH>..<HASH> 100644
--- a/connection/connection.js
+++ b/connection/connection.js
@@ -193,21 +193,34 @@ class Connection extends EventEmitter {
* Destroy connection
* @method
*/
- destroy() {
+ destroy(options, callback) {
+ if (typeof options === 'function') {
+ callback = options;
+ options = {};
+ }
+
+ options = Object.assign({ force: false }, options);
+
if (connectionAccounting) {
deleteConnection(this.id);
}
- if (this.socket) {
- // Catch posssible exception thrown by node 0.10.x
- try {
- this.socket.end();
- } catch (err) {} // eslint-disable-line
+ if (this.socket == null) {
+ this.destroyed = true;
+ return;
+ }
+ if (options.force) {
this.socket.destroy();
+ this.destroyed = true;
+ if (typeof callback === 'function') callback(null, null);
+ return;
}
- this.destroyed = true;
+ this.socket.end(err => {
+ this.destroyed = true;
+ if (typeof callback === 'function') callback(err, null);
+ });
}
/**
|
refactor(connection): support passing callback to `destroy`
|
mongodb_node-mongodb-native
|
train
|
js
|
9fb1ffa60fb4d926d4e4e587529693be8ea005ce
|
diff --git a/src/animator.js b/src/animator.js
index <HASH>..<HASH> 100644
--- a/src/animator.js
+++ b/src/animator.js
@@ -7,6 +7,8 @@ export class CssAnimator {
this.animationEnteredClass = 'au-entered';
this.animationLeftClass = 'au-left';
this.isAnimating = false;
+
+ this.animationTimeout = 50;
}
addMultipleEventListener(el, s, fn) {
@@ -137,7 +139,7 @@ export class CssAnimator {
resolve(false);
}
- }, this.getElementAnimationDelay(element) + 400 + delay);
+ }, this.getElementAnimationDelay(element) + this.animationTimeout + delay);
});
}
@@ -223,7 +225,7 @@ export class CssAnimator {
resolve(false);
}
- }, this.getElementAnimationDelay(element) + 400 + delay);
+ }, this.getElementAnimationDelay(element) + this.animationTimeout + delay);
});
}
@@ -287,7 +289,7 @@ export class CssAnimator {
resolve(false);
}
- }, this.getElementAnimationDelay(element) + 400);
+ }, this.getElementAnimationDelay(element) + this.animationTimeout);
});
}
@@ -345,7 +347,7 @@ export class CssAnimator {
resolve(false);
}
- }, this.getElementAnimationDelay(element) + 400);
+ }, this.getElementAnimationDelay(element) + this.animationTimeout);
});
}
}
|
fix(timeout): fixes timeouts for animation triggers
this fixes the too long timeout, waiting for an animation to trigger
Fixes issue <URL>
|
aurelia_animator-css
|
train
|
js
|
c79322776443a0564f110fd3e45b8d2042924d1d
|
diff --git a/examples/photobooth/main.js b/examples/photobooth/main.js
index <HASH>..<HASH> 100644
--- a/examples/photobooth/main.js
+++ b/examples/photobooth/main.js
@@ -30,7 +30,7 @@ const os = require('os');
width: 800,
height: 648 + 24,
icon: path.join(__dirname, '/app_icon.png'),
- channel: ['canary'],
+ channel: ['canary', 'stable'],
localDataDir: path.join(os.homedir(), '.carlophotobooth'),
});
} catch(e) {
@@ -41,7 +41,6 @@ const os = require('os');
app.on('exit', () => process.exit());
// New windows are opened when this app is started again from command line.
app.on('window', window => window.load('index.html'));
- console.log('This example requires Chrome 72 (Chrome Canary) to function.');
app.serveFolder(path.join(__dirname, '/www'));
await app.exposeFunction('saveImage', saveImage);
await app.load('index.html');
|
fix(example): photobooth works on chrome stable (#<I>)
|
GoogleChromeLabs_carlo
|
train
|
js
|
356778b9d56bead4b6534f372c4c139b7e4c606a
|
diff --git a/src/client/actions/MessageDeleteBulk.js b/src/client/actions/MessageDeleteBulk.js
index <HASH>..<HASH> 100644
--- a/src/client/actions/MessageDeleteBulk.js
+++ b/src/client/actions/MessageDeleteBulk.js
@@ -12,7 +12,10 @@ class MessageDeleteBulkAction extends Action {
const messages = new Collection();
for (const id of ids) {
const message = channel.messages.get(id);
- if (message) messages.set(message.id, message);
+ if (message) {
+ messages.set(message.id, message);
+ channel.messages.delete(id);
+ }
}
if (messages.size > 0) client.emit(Events.MESSAGE_BULK_DELETE, messages);
|
fix(MessageBulkDeleteAction): remove deleted messages from cache (#<I>)
Fixes #<I>
|
discordjs_discord.js
|
train
|
js
|
ee2102d97accfde06a855f3c575e5ca54381da3a
|
diff --git a/models/classes/StatisticalMetadata/Import/Processor/NotifyImportService.php b/models/classes/StatisticalMetadata/Import/Processor/NotifyImportService.php
index <HASH>..<HASH> 100644
--- a/models/classes/StatisticalMetadata/Import/Processor/NotifyImportService.php
+++ b/models/classes/StatisticalMetadata/Import/Processor/NotifyImportService.php
@@ -83,7 +83,7 @@ class NotifyImportService
public function addResource(core_kernel_classes_Resource $resource): self
{
- $this->resources[] = $resource;
+ $this->resources[$resource->getUri()] = $resource;
return $this;
}
|
fix: store resources with uri to avoid duplication
|
oat-sa_tao-core
|
train
|
php
|
21dd5da2ba38def56630f360c29202e51582d74b
|
diff --git a/lib/activeadmin_addons/addons/image_builder.rb b/lib/activeadmin_addons/addons/image_builder.rb
index <HASH>..<HASH> 100644
--- a/lib/activeadmin_addons/addons/image_builder.rb
+++ b/lib/activeadmin_addons/addons/image_builder.rb
@@ -1,11 +1,38 @@
+require 'pry'
+
module ActiveAdminAddons
class ImageBuilder < CustomBuilder
def render
return nil if data.nil?
- raise "you need to pass a paperclip image attribute" unless data.respond_to?(:url)
+
+ if Object.const_defined?('Paperclip::Attachment') && data.is_a?(Paperclip::Attachment)
+ paperclip_data
+ elsif Object.const_defined?('Shrine::UploadedFile') && data.is_a?(Shrine::UploadedFile)
+ shrine_data
+ else
+ raise "you need to pass a paperclip or shrine image attribute"
+ end
+ end
+
+ private
+
+ def paperclip_data
style = options.fetch(:style, :original)
context.image_tag(data.url(style)) if data.file?
end
+
+ def shrine_data
+ image_options = options[:image_options].presence || {}
+ if options[:style] && derivatives.include?(options[:style])
+ context.image_tag(model.send("#{attribute}_url", options[:style]), image_options)
+ else
+ context.image_tag(data.url, image_options)
+ end
+ end
+
+ def derivatives
+ model.send("#{attribute}_derivatives")
+ end
end
end
|
feat(image-builder): define case for shrine
|
platanus_activeadmin_addons
|
train
|
rb
|
55d956e7adb0499fc53c6215369f36b6b9f4186e
|
diff --git a/lib/https/index.js b/lib/https/index.js
index <HASH>..<HASH> 100644
--- a/lib/https/index.js
+++ b/lib/https/index.js
@@ -119,6 +119,7 @@ function resolveWebsocket(socket, wss) {
}
resData.statusCode = status;
resData.body = body;
+ resData.ip = resData.ip || LOCALHOST;
data.requestTime = data.dnsTime =Date.now();
getResRules(socket, resData, function() {
var rawData = statusMsg + '\r\n' + getRawHeaders(resHeaders) + '\r\n\r\n' + body;
diff --git a/lib/tunnel.js b/lib/tunnel.js
index <HASH>..<HASH> 100644
--- a/lib/tunnel.js
+++ b/lib/tunnel.js
@@ -523,6 +523,7 @@ function tunnelProxy(server, proxy) {
data.responseTime = data.endTime = Date.now();
resData.rawHeaderNames = rawHeaderNames;
resData.statusCode = code || 200;
+ resData.ip = resData.ip || LOCALHOST;
resData.headers = resHeaders;
reqEmitter.emit('response', data);
reqEmitter.emit('end', data);
|
chore: ensure show the server ip
|
avwo_whistle
|
train
|
js,js
|
9c5c92897176383e59e43928397fdcf90dfb2d97
|
diff --git a/lib/operations/command_v2.js b/lib/operations/command_v2.js
index <HASH>..<HASH> 100644
--- a/lib/operations/command_v2.js
+++ b/lib/operations/command_v2.js
@@ -7,6 +7,7 @@ const ReadConcern = require('../read_concern');
const WriteConcern = require('../write_concern');
const maxWireVersion = require('../core/utils').maxWireVersion;
const commandSupportsReadConcern = require('../core/sessions').commandSupportsReadConcern;
+const MongoError = require('../error').MongoError;
const SUPPORTS_WRITE_CONCERN_AND_COLLATION = 5;
@@ -44,6 +45,17 @@ class CommandOperationV2 extends OperationBase {
Object.assign(cmd, { readConcern: this.readConcern });
}
+ if (options.collation && serverWireVersion < SUPPORTS_WRITE_CONCERN_AND_COLLATION) {
+ callback(
+ new MongoError(
+ `Server ${
+ server.name
+ }, which reports wire version ${serverWireVersion}, does not support collation`
+ )
+ );
+ return;
+ }
+
if (serverWireVersion >= SUPPORTS_WRITE_CONCERN_AND_COLLATION) {
if (this.writeConcern && this.hasAspect(Aspect.WRITE_OPERATION)) {
Object.assign(cmd, { writeConcern: this.writeConcern });
|
refactor(command): report an error if collation not supported
|
mongodb_node-mongodb-native
|
train
|
js
|
5547c34eefbee85c664b65a8c0b1d1e6776ef1a5
|
diff --git a/lib/fetch/index.js b/lib/fetch/index.js
index <HASH>..<HASH> 100644
--- a/lib/fetch/index.js
+++ b/lib/fetch/index.js
@@ -1123,6 +1123,9 @@ async function httpNetworkOrCacheFetch (
// 18. Modify httpRequest’s header list per HTTP. Do not append a given
// header if httpRequest’s header list contains that header’s name.
// TODO: https://github.com/whatwg/fetch/issues/1285#issuecomment-896560129
+ if (!httpRequest.headersList.has('accept-encoding')) {
+ httpRequest.headersList.append('accept-encoding', 'br, gzip, deflate')
+ }
// 19. If includeCredentials is true, then:
if (includeCredentials) {
|
fix(fetch): set accept-encoding
|
mcollina_undici
|
train
|
js
|
ed0cb15fc8186ba27016d1be22615bec3f9bbd72
|
diff --git a/packages/ui-scripts/lib/test/lint.js b/packages/ui-scripts/lib/test/lint.js
index <HASH>..<HASH> 100644
--- a/packages/ui-scripts/lib/test/lint.js
+++ b/packages/ui-scripts/lib/test/lint.js
@@ -32,14 +32,14 @@ let csspaths = ['**/*.css']
if (paths.length) {
jspaths = paths.filter(p => (p.indexOf('.js') > -1))
csspaths = paths.filter(p => (p.indexOf('.css') > -1)) || ['**/*.css']
+}
- if (process.argv.includes('--fix')) {
- if (jspaths.length) {
- jspaths.push('--fix')
- }
- if (csspaths.length) {
- csspaths.push('--fix')
- }
+if (process.argv.includes('--fix')) {
+ if (jspaths.length) {
+ jspaths.unshift('--fix')
+ }
+ if (csspaths.length) {
+ csspaths.unshift('--fix')
}
}
|
fix(ui-scripts): Make fix flag work when no paths are passed to the lint command
Change-Id: Ibd<I>d2c<I>f<I>add7d<I>bfd<I>ab<I>a<I>be8
Reviewed-on: <URL>
|
instructure_instructure-ui
|
train
|
js
|
0e41a4d3fd813097433cad78012657b85b07e2c4
|
diff --git a/packages/docs/docs/.vuepress/config.js b/packages/docs/docs/.vuepress/config.js
index <HASH>..<HASH> 100644
--- a/packages/docs/docs/.vuepress/config.js
+++ b/packages/docs/docs/.vuepress/config.js
@@ -1,4 +1,3 @@
-const path = require('path')
const container = require('markdown-it-container')
module.exports = ctx => ({
@@ -32,10 +31,10 @@ module.exports = ctx => ({
editLinks: true,
docsDir: 'packages/docs/docs',
// #697 Provided by the official algolia team.
- algolia: ctx.isProd ? ({
- apiKey: '3a539aab83105f01761a137c61004d85',
- indexName: 'vuepress'
- }) : null,
+ // algolia: ctx.isProd ? ({
+ // apiKey: '3a539aab83105f01761a137c61004d85',
+ // indexName: 'vuepress'
+ // }) : null,
locales: {
'/': {
label: 'English',
|
docs: Temporarily disable algolia search due to #<I>
Algolia search has a bit of latency to refresh the search result, and now it will lead the user to
the wrong address.
|
vuejs_vuepress
|
train
|
js
|
217cae1f599c842687c1d2a19056df3820c06d96
|
diff --git a/src/components/autocomplete/js/autocompleteController.js b/src/components/autocomplete/js/autocompleteController.js
index <HASH>..<HASH> 100644
--- a/src/components/autocomplete/js/autocompleteController.js
+++ b/src/components/autocomplete/js/autocompleteController.js
@@ -297,6 +297,8 @@ function MdAutocompleteCtrl ($scope, $element, $mdUtil, $mdConstant, $timeout, $
self.hidden = true;
self.index = 0;
self.matches = [];
+ //-- force form to update state for validation
+ elements.$.input.controller('ngModel').$setViewValue($scope.searchText);
}
function clearValue () {
|
fix(autocomplete): selecting a value will now flag the form/input as `$dirty`
Closes #<I>
|
angular_material
|
train
|
js
|
8e4530093d269addc22fb8c51f522e08456573f8
|
diff --git a/lib/actions/api.js b/lib/actions/api.js
index <HASH>..<HASH> 100644
--- a/lib/actions/api.js
+++ b/lib/actions/api.js
@@ -511,6 +511,7 @@ export function findPatternsForRoute (params) {
findPatternsForRouteResponse,
findPatternsForRouteError,
{
+ noThrottle: true,
rewritePayload: (payload) => {
// convert pattern array to ID-mapped object
const patterns = {}
diff --git a/lib/components/viewers/route-details.js b/lib/components/viewers/route-details.js
index <HASH>..<HASH> 100644
--- a/lib/components/viewers/route-details.js
+++ b/lib/components/viewers/route-details.js
@@ -36,11 +36,11 @@ class RouteDetails extends Component {
};
componentDidMount = () => {
- const { getVehiclePositionsForRoute, route } = this.props
+ const { getVehiclePositionsForRoute, pattern, route } = this.props
if (!route.vehicles) {
getVehiclePositionsForRoute(route.id)
}
- this.getStops()
+ if (!pattern?.stops) { this.getStops() }
};
componentDidUpdate = (prevProps) => {
|
refactor(route-details-viewer): avoid white-screen crashes
|
opentripplanner_otp-react-redux
|
train
|
js,js
|
7cab071dea8f1fd986f499a9baeda2504b688092
|
diff --git a/system/Commands/Server/rewrite.php b/system/Commands/Server/rewrite.php
index <HASH>..<HASH> 100644
--- a/system/Commands/Server/rewrite.php
+++ b/system/Commands/Server/rewrite.php
@@ -22,7 +22,7 @@ $_SERVER['CI_ENVIRONMENT'] = 'development';
$uri = urldecode(parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH));
// Front Controller path - expected to be in the default folder
-$fcpath = realpath(__DIR__ . '/../../../public') . DIRECTORY_SEPARATOR;
+$fcpath = FCPATH;
// Full path
$path = $fcpath . ltrim($uri, '/');
|
fix: Fixed a bug where you can not change the path freely
|
codeigniter4_CodeIgniter4
|
train
|
php
|
f15f3ea5beb48d6e1dd4eaa7a19cb8bf7f586d70
|
diff --git a/lib/https/ca.js b/lib/https/ca.js
index <HASH>..<HASH> 100644
--- a/lib/https/ca.js
+++ b/lib/https/ca.js
@@ -10,7 +10,7 @@ var util = require('../util');
var config = require('../config');
var CUR_VERSION = process.version;
-var SUPPORTS_2048_RSA = parseInt(CUR_VERSION.slice(1), 10) >= 6;
+var SUPPORTS_2048_RSA = parseInt(CUR_VERSION.slice(1), 10) >= 4;
var enableATS = SUPPORTS_2048_RSA && config.ATS;
var HTTPS_DIR = util.mkdir(path.join(config.getDataDir(), 'certs'));
var ROOT_2048_KEY_FILE = path.join(HTTPS_DIR, 'root_2048.key');
@@ -26,7 +26,7 @@ var MAC_ADDR = getMacAddress();
var ROOT_KEY, ROOT_CRT;
if (config.ATS) {
- assert(SUPPORTS_2048_RSA, 'Enable ATS requires Node >= 6 (current: '
+ assert(SUPPORTS_2048_RSA, 'Enable ATS requires Node >= 4 (current: '
+ CUR_VERSION + '), access https://nodejs.org to install the latest version.');
}
|
feat: ATS >= Node4
|
avwo_whistle
|
train
|
js
|
ea09be4ff0750d1d0873677fac9055a9acb630b3
|
diff --git a/lib/frameworks/jasmine.js b/lib/frameworks/jasmine.js
index <HASH>..<HASH> 100644
--- a/lib/frameworks/jasmine.js
+++ b/lib/frameworks/jasmine.js
@@ -30,7 +30,7 @@ RunnerReporter.prototype.specDone = function(result) {
}
var entry = {
- description: result.description,
+ description: result.fullName,
assertions: [],
duration: new Date().getTime() - this.startTime.getTime()
};
|
fix(jasmine): Return the full test name in Jasmine test results. (#<I>)
Fixes #<I>
|
angular_protractor
|
train
|
js
|
aa5047a20486bf68660e7acd59e90b5cf83f07ae
|
diff --git a/swarm-syncable/src/StreamOpSource.js b/swarm-syncable/src/StreamOpSource.js
index <HASH>..<HASH> 100644
--- a/swarm-syncable/src/StreamOpSource.js
+++ b/swarm-syncable/src/StreamOpSource.js
@@ -196,7 +196,7 @@ StreamOpSource.prototype.eatLines = function (till) {
i=j;
}
if (key==='.off') {
- this.stream.removeAllListeners();
+ this.stream && this.stream.removeAllListeners();
this.emitEnd(value);
break;
} else if (!this.hs) { // we expect a handshake
|
chore(StreamOpSource): stream might be closed when handling .off
StreamOpSource might be already closed when it receives an .off
operation from the peer.
|
gritzko_swarm
|
train
|
js
|
a41ada0e05c82cc8792ee3a4ddb3a3c8a9ed83c6
|
diff --git a/effect/default_effector.go b/effect/default_effector.go
index <HASH>..<HASH> 100644
--- a/effect/default_effector.go
+++ b/effect/default_effector.go
@@ -59,6 +59,17 @@ func (e *DefaultEffector) MergeEffects(expr string, effects []Effect, results []
break
}
}
+ } else if expr == "some(where (p_eft == allow)) || !some(where (p_eft == deny))" {
+ result = true
+ for i, eft := range effects {
+ if eft == Allow {
+ result = true
+ explainIndex = i
+ break
+ } else if eft == Deny {
+ result = false
+ }
+ }
} else if expr == "priority(p_eft) || deny" {
result = false
for i, eft := range effects {
|
feat: add a rule of effect "Allow-override" (#<I>)
* fix: add a rule of effect "Allow-override"
|
casbin_casbin
|
train
|
go
|
8fd6f901968be775ec5250e114ec8448c375a258
|
diff --git a/test/will.js b/test/will.js
index <HASH>..<HASH> 100644
--- a/test/will.js
+++ b/test/will.js
@@ -325,14 +325,17 @@ test('does not store multiple will with same clientid', function (t) {
var opts = { clientId: 'abcde' }
var broker = aedes()
- var s = willConnect(setup(broker), opts, function () {
+
+ var s = willConnect(setup(broker, false), opts, function () {
// gracefully close client so no will is sent
s.inStream.end({
cmd: 'disconnect'
})
+ })
+ broker.on('clientDisconnect', function (c) {
// reconnect same client with will
- s = willConnect(setup(broker), opts, function () {
+ s = willConnect(setup(broker, false), opts, function () {
// check that there are not 2 will messages for the same clientid
s.broker.persistence.delWill({ id: opts.clientId }, function (err, packet) {
t.error(err, 'no error')
@@ -340,6 +343,7 @@ test('does not store multiple will with same clientid', function (t) {
s.broker.persistence.delWill({ id: opts.clientId }, function (err, packet) {
t.error(err, 'no error')
t.equal(!!packet, false, 'no duplicated packets')
+ broker.close()
})
})
})
|
fix: Improved test using clientDisconnect event
|
mcollina_aedes
|
train
|
js
|
9f3ca730756599a8c0ac69661f0b2df5f39c06da
|
diff --git a/src/lib/routes/admin-api/config.js b/src/lib/routes/admin-api/config.js
index <HASH>..<HASH> 100644
--- a/src/lib/routes/admin-api/config.js
+++ b/src/lib/routes/admin-api/config.js
@@ -6,8 +6,12 @@ class ConfigController extends Controller {
constructor(config, { versionService }) {
super(config);
this.versionService = versionService;
+ const authenticationType = config.authentication.type;
this.uiConfig = {
...config.ui,
+ authenticationType,
+ unleashUrl: config.unleashUrl,
+ baseUriPath: config.baseUriPath,
version: config.version,
};
this.get('/', this.getUIConfig);
|
fix: expose auth-type in ui-config
|
Unleash_unleash
|
train
|
js
|
a4830321c35a79094451f6d2c7f88bfe4564c21a
|
diff --git a/lib/crabfarm/rspec.rb b/lib/crabfarm/rspec.rb
index <HASH>..<HASH> 100644
--- a/lib/crabfarm/rspec.rb
+++ b/lib/crabfarm/rspec.rb
@@ -14,7 +14,7 @@ module Crabfarm
end
snapshot_path = described_class.snapshot_path _snapshot
- raise Error.new "Snapshot does not exist #{_snapshot}" unless File.exist? snapshot_path
+ raise Error.new "Snapshot does not exist #{snapshot_path}" unless File.exist? snapshot_path
data = File.read snapshot_path
reducer = described_class.new data, _options
|
chore(rspec): improves snapshot not found error
|
platanus_crabfarm-gem
|
train
|
rb
|
1e7d17c5e54c14aed544b88fb8d8e0af2b4efe5e
|
diff --git a/test/ctor.js b/test/ctor.js
index <HASH>..<HASH> 100644
--- a/test/ctor.js
+++ b/test/ctor.js
@@ -29,7 +29,7 @@ describe('ActiveDirectory', function() {
done();
});
it('should replace default user attributes if specified', function(done) {
- var ad = new ActiveDirectory(_.extend(config, {
+ var ad = new ActiveDirectory(_.extend({}, config, {
attributes: {
user: [ 'mycustomuserattribute' ]
}
@@ -40,7 +40,7 @@ describe('ActiveDirectory', function() {
done();
});
it('should replace default group attributes if specified', function(done) {
- var ad = new ActiveDirectory(_.extend(config, {
+ var ad = new ActiveDirectory(_.extend({}, config, {
attributes: {
group: [ 'mycustomgroupattribute' ]
}
|
fix: Ensure test config object is not modified
|
gheeres_node-activedirectory
|
train
|
js
|
8d323e4810fc0f1257096dbc8561a1de3d32d364
|
diff --git a/packages/react-router5/modules/BaseLink.js b/packages/react-router5/modules/BaseLink.js
index <HASH>..<HASH> 100644
--- a/packages/react-router5/modules/BaseLink.js
+++ b/packages/react-router5/modules/BaseLink.js
@@ -91,8 +91,8 @@ class BaseLink extends Component {
const active = this.isActive()
const href = this.buildUrl(routeName, routeParams)
- const linkclassName = (className ? className.split(' ') : [])
- .concat(active ? [activeClassName] : [])
+ const linkclassName = (active ? [activeClassName] : [])
+ .concat(className ? className.split(' ') : [])
.join(' ')
return React.createElement(
|
fix(BaseLink): ensure activeClassName has higher specificity
Avoids need for `!important` to override base styles when selectors have equal specificity
|
router5_router5
|
train
|
js
|
0ee2155a492c2315e6d3df83fc8e8650faa57a5a
|
diff --git a/src/main/index.js b/src/main/index.js
index <HASH>..<HASH> 100644
--- a/src/main/index.js
+++ b/src/main/index.js
@@ -26,7 +26,7 @@ const argv = require('yargs')
const notebooks = argv._
.filter(Boolean)
- .filter(x => /^(?!-)/.test(x)) // Ignore strangeness on OS X first launch
+ .filter(x => /^(?!-psn)/.test(x)) // Ignore strangeness on OS X first launch
// see #805
.filter(x => x !== '.'); // Ignore the `electron .`
// TODO: Consider opening something for directories
|
fix(launch): filter out ProcessSerialNumber for OS X
|
nteract_nteract
|
train
|
js
|
b65236b70ae3d6eb86d3d78631144fe65848d4ca
|
diff --git a/src/components/chips/js/chipsController.js b/src/components/chips/js/chipsController.js
index <HASH>..<HASH> 100644
--- a/src/components/chips/js/chipsController.js
+++ b/src/components/chips/js/chipsController.js
@@ -91,7 +91,7 @@
}
break;
case this.$mdConstant.KEY_CODE.BACKSPACE:
- if (!event.target.selectionStart) {
+ if (!event.target.selectionStart && !event.target.selectionEnd) {
event.preventDefault();
if (this.items.length) this.removeChip(this.items.length - 1);
event.target.focus();
|
fix(chips): prevents item deletion when text is selected
Closes #<I>
|
angular_material
|
train
|
js
|
b7d317d247c096096b2252dca2e0004bd7af32f6
|
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
@@ -940,7 +940,7 @@ class QuasarConfFile {
cfg.__versions.workboxWebpackPlugin = getPackageMajorVersion('workbox-webpack-plugin')
}
- if (this.ctx.mode.capacitor && cfg.__versions.capacitorSplashscreen && cfg.capacitor.hideSplashscreen !== false) {
+ if (this.ctx.mode.capacitor && cfg.__versions.capacitorPluginSplashscreen && cfg.capacitor.hideSplashscreen !== false) {
cfg.__needsAppMountHook = true
}
|
fix(app): capacitorPluginSplashscreen check #<I> (#<I>)
Incorrect property accessor name
|
quasarframework_quasar
|
train
|
js
|
16be4951d275fba5c9c9e434ac9be4c502f3ee98
|
diff --git a/src/utils/subscription-registry.js b/src/utils/subscription-registry.js
index <HASH>..<HASH> 100644
--- a/src/utils/subscription-registry.js
+++ b/src/utils/subscription-registry.js
@@ -146,8 +146,8 @@ class SubscriptionRegistry {
}
// for all unique senders and their gaps, build their special messages
- let i = 1
for (const uniqueSender of uniqueSenders) {
+ let i = 1
let message = sharedMessages.substring(0, uniqueSender[i++])
let lastStop = uniqueSender[i++]
while (i < uniqueSender.length) {
|
fix(subscription-registry): Reset i in broadcast
|
deepstreamIO_deepstream.io
|
train
|
js
|
15112ea3e5fa3d050d9d712ec53d35ca9678677f
|
diff --git a/src/geshi/php.php b/src/geshi/php.php
index <HASH>..<HASH> 100644
--- a/src/geshi/php.php
+++ b/src/geshi/php.php
@@ -55,7 +55,7 @@ $language_data = array (
'COMMENT_SINGLE' => array(1 => '//', 2 => '#'),
'COMMENT_MULTI' => array('/*' => '*/'),
//Heredoc and Nowdoc syntax
- 'COMMENT_REGEXP' => array(3 => '/<<<\s*?(\'?)([a-zA-Z0-9]+?)\1[^\n]*?\\n.*?\\n\\2(?![a-zA-Z0-9])/siU'),
+ 'COMMENT_REGEXP' => array(3 => '/<<<\s*?(\'?)([a-zA-Z0-9]+?)\1[^\n]*?\\n.*\\n\\2(?![a-zA-Z0-9])/siU'),
'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
'QUOTEMARKS' => array("'", '"'),
'ESCAPE_CHAR' => '\\',
|
fix: Issue with the previous patch not fully working as expected
|
GeSHi_geshi-1.0
|
train
|
php
|
83e7b5f0ef4cd2f677b6ef93e1aaacd2ba589136
|
diff --git a/lib/workers/branch/index.js b/lib/workers/branch/index.js
index <HASH>..<HASH> 100644
--- a/lib/workers/branch/index.js
+++ b/lib/workers/branch/index.js
@@ -245,9 +245,13 @@ async function processBranch(branchConfig) {
}
}
}
- } catch (err) {
+ } catch (err) /* istanbul ignore next */ {
logger.error({ err }, `Error ensuring PR: ${err.message}`);
- // Don't throw here - we don't want to stop the other renovations
+ if (err.message === 'rate-limit-exceeded') {
+ logger.debug('Passing rate-limit-exceeded error up');
+ throw err;
+ }
+ // Otherwise don't throw here - we don't want to stop the other renovations
}
if (!branchExists) {
return 'pr-created';
|
fix: pass up rate limit exceeded error when ensuring PR
|
renovatebot_renovate
|
train
|
js
|
73e04d722cf2a2cd86cb9145d44a229640d13fa9
|
diff --git a/test/gitStash.spec.js b/test/gitStash.spec.js
index <HASH>..<HASH> 100644
--- a/test/gitStash.spec.js
+++ b/test/gitStash.spec.js
@@ -1,5 +1,3 @@
-jest.dontMock('execa') // Must be before all requires to work
-
const execa = require('execa')
const path = require('path')
const tmp = require('tmp')
@@ -8,6 +6,7 @@ const pify = require('pify')
const fsp = pify(require('fs'))
tmp.setGracefulCleanup()
+jest.unmock('execa')
let wcDir
let wcDirPath
|
chore: Use `unmock` to get rid of mock hoisting (#<I>)
|
okonet_lint-staged
|
train
|
js
|
f86139d3a07bfcf098b39d63d05e0e8ff27211c0
|
diff --git a/lib/connector/NodeConnector.js b/lib/connector/NodeConnector.js
index <HASH>..<HASH> 100644
--- a/lib/connector/NodeConnector.js
+++ b/lib/connector/NodeConnector.js
@@ -119,7 +119,7 @@ class NodeConnector extends Connector {
for (let i = 0, len = parts.length; i < len; i += 1) {
const part = parts[i];
- if (part.indexOf('Expires=') === 0) {
+ if (part.trim().indexOf('Expires=') === 0) {
const date = Date.parse(part.substring(8));
if (date < Date.now()) {
return null;
|
fix(node-connector): Trim cookie parts to allow spaces
|
Baqend_js-sdk
|
train
|
js
|
6cab8823db679cfdcb86572af1bce53af0ec38a4
|
diff --git a/src/index.js b/src/index.js
index <HASH>..<HASH> 100644
--- a/src/index.js
+++ b/src/index.js
@@ -1292,7 +1292,9 @@ export default class ReactJkMusicPlayer extends PureComponent {
isAutoPlayWhenUserClicked: true,
},
() => {
- this.audio.volume = startVolume
+ if (fadeIn) {
+ this.audio.volume = startVolume
+ }
this.loadAndPlayAudio()
},
)
|
fix: no longer mutes on play when fadeIn is 0
|
lijinke666_react-music-player
|
train
|
js
|
472480e31d36612afb7061033aee39e7fff37cb1
|
diff --git a/plugins/cleanpaste/trumbowyg.cleanpaste.js b/plugins/cleanpaste/trumbowyg.cleanpaste.js
index <HASH>..<HASH> 100644
--- a/plugins/cleanpaste/trumbowyg.cleanpaste.js
+++ b/plugins/cleanpaste/trumbowyg.cleanpaste.js
@@ -60,9 +60,8 @@
// strip out extra spaces -cgCraft
html = html.replace(/ <\//gi, '</');
- while (html.indexOf(' ') !== -1) {
- html = html.split(' ').join(' ');
- }
+ // Remove multiple spaces
+ html.replace(/\s+/g, ' ');
// strip -cgCraft
html = html.replace(/^\s*|\s*$/g, '');
@@ -78,7 +77,7 @@
return match;
});
- // Final cleanout for MS Word crud
+ // Final clean out for MS Word crud
html = html.replace(/<\?xml[^>]*>/g, '');
html = html.replace(/<[^ >]+:[^>]*>/g, '');
html = html.replace(/<\/[^ >]+:[^>]*>/g, '');
|
fix: use regex instead of while in cleanpaste plugin
|
Alex-D_Trumbowyg
|
train
|
js
|
0af6a9779d12cc850effa19138461acd41994fab
|
diff --git a/.babelrc.js b/.babelrc.js
index <HASH>..<HASH> 100644
--- a/.babelrc.js
+++ b/.babelrc.js
@@ -4,7 +4,7 @@ module.exports = {
'@babel/preset-env',
{
targets: {
- node: 6,
+ node: 8,
browsers: ['last 4 versions', 'safari >= 7']
}
}
|
feat: change transpile target to node@8
BREAKING CHANGE:
This increases the minimum required node version to 8 (odlest node version
still in LTS).
|
ds82_tiny-di
|
train
|
js
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.