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 |
|---|---|---|---|---|---|
2388aebeb44bc604a2c0f6be1635738c9663036c
|
diff --git a/src/utils/constants.js b/src/utils/constants.js
index <HASH>..<HASH> 100644
--- a/src/utils/constants.js
+++ b/src/utils/constants.js
@@ -47,6 +47,7 @@ export const validProps = [
'includeFields',
'excludeFields',
'size',
+ 'from',
'sortBy',
'sortOptions',
'pagination',
diff --git a/src/utils/transform.js b/src/utils/transform.js
index <HASH>..<HASH> 100644
--- a/src/utils/transform.js
+++ b/src/utils/transform.js
@@ -142,7 +142,7 @@ export const extractPropsFromState = (store, component, customOptions) => {
let dataField = componentProps.dataField;
let aggregations;
let pagination; // pagination for `term` type of queries
- let from; // offset for RL
+ let from = componentProps.from; // offset for RL
// For term queries i.e list component `dataField` will be treated as aggregationField
if (queryType === queryTypes.term) {
|
fix: currentPage issue with RS API
|
appbaseio_reactivecore
|
train
|
js,js
|
afa1e70deff3fd2de0f5d90632d146d6969893fe
|
diff --git a/src/channel.js b/src/channel.js
index <HASH>..<HASH> 100644
--- a/src/channel.js
+++ b/src/channel.js
@@ -583,6 +583,7 @@ export default class Channel {
will be fixed in the future, supposedly).
*/
static pipe(parent, ...channels) {
+ channels = channels.map(x => x instanceof Function ? new Channel(x) : x);
parent.pipeline.push(...channels);
if (!parent[ACTIONS.CANCEL]) {
let running = true;
|
feat: convert transforms into channels when passed to Channel#pipe()
|
dvlsg_async-csp
|
train
|
js
|
950355bdcb36afd5741a6e7d5b1b860c047969fe
|
diff --git a/ui/src/components/time/QTime.js b/ui/src/components/time/QTime.js
index <HASH>..<HASH> 100644
--- a/ui/src/components/time/QTime.js
+++ b/ui/src/components/time/QTime.js
@@ -288,6 +288,8 @@ export default defineComponent({
defaultDateModel.value
)
+ console.log({ ...model })
+
if (
model.dateHash !== innerModel.value.dateHash
|| model.timeHash !== innerModel.value.timeHash
@@ -310,10 +312,14 @@ export default defineComponent({
})
function setNow () {
- updateValue({
+ const date = {
...getCurrentDate(),
...getCurrentTime()
- })
+ }
+
+ updateValue(date)
+ Object.assign(innerModel.value, date) // reset any pending changes to innerModel
+
view.value = 'hour'
}
|
fix(QTime): "Now" button misbehaving if user is already middleway selecting a time #<I>
|
quasarframework_quasar
|
train
|
js
|
4985109b8cfab33c45bb43d13aa9c344dd12c572
|
diff --git a/src/lib/config.js b/src/lib/config.js
index <HASH>..<HASH> 100644
--- a/src/lib/config.js
+++ b/src/lib/config.js
@@ -104,6 +104,8 @@ async function updateAppsItems (config) {
}
comingSoonApps = await fetchComingSoonApps()
+ // drop coming soon apps already installed
+ .filter(comingSoonApp => apps.filter(app => app.slug === comingSoonApp.slug))
.catch(error => {
console.warn && console.warn(`Cozy-bar cannot fetch comming soon apps: ${error.message}`)
return []
|
fix: filter coming soon app :bug:
|
cozy_cozy-bar
|
train
|
js
|
6aa68db85081b05b15f7d2c49bf3ffc3e2337fce
|
diff --git a/stories/SearchBox.stories.js b/stories/SearchBox.stories.js
index <HASH>..<HASH> 100644
--- a/stories/SearchBox.stories.js
+++ b/stories/SearchBox.stories.js
@@ -16,10 +16,10 @@ storiesOf('ais-search-box', module)
template: `
<ais-search-box autofocus>
<input
- placeholder="Custom SearchBox"
slot-scope="{ currentRefinement, refine }"
:value="currentRefinement"
@input="refine($event.currentTarget.value)"
+ placeholder="Custom SearchBox"
/>
</ais-search-box>
`,
|
docs(SearchBox): better prop ordering
|
algolia_vue-instantsearch
|
train
|
js
|
3efac2cb890dc63ba41e8459b0d9378008f427b2
|
diff --git a/src/Leevel/Http/Request.php b/src/Leevel/Http/Request.php
index <HASH>..<HASH> 100644
--- a/src/Leevel/Http/Request.php
+++ b/src/Leevel/Http/Request.php
@@ -100,42 +100,42 @@ class Request implements IRequest, IArray, ArrayAccess
*
* @var string
*/
- protected ?string $baseUrl;
+ protected ?string $baseUrl = null;
/**
* 基础路径.
*
* @var string
*/
- protected ?string $basePath;
+ protected ?string $basePath = null;
/**
* 请求 url.
*
* @var string
*/
- protected ?string $requestUri;
+ protected ?string $requestUri = null;
/**
* 请求类型.
*
* @var string
*/
- protected ?string $method;
+ protected ?string $method = null;
/**
* pathInfo.
*
* @var string
*/
- protected ?string $pathInfo;
+ protected ?string $pathInfo = null;
/**
* 当前语言.
*
* @var string
*/
- protected ?string $language;
+ protected ?string $language = null;
/**
* 构造函数.
|
fix(http): fix typed properties of php<I>
|
hunzhiwange_framework
|
train
|
php
|
c38d0df1300ba1b86108104f383ff57bc4e70db5
|
diff --git a/js/src/pubsub.js b/js/src/pubsub.js
index <HASH>..<HASH> 100644
--- a/js/src/pubsub.js
+++ b/js/src/pubsub.js
@@ -575,7 +575,7 @@ module.exports = (common) => {
ipfs2.pubsub.unsubscribe(topic, sub2)
})
- it('send/receive 10k messages', function (done) {
+ it.skip('send/receive 10k messages', function (done) {
this.timeout(2 * 60 * 1000)
const msgBase = 'msg - '
|
test: skip some tests because pubsub does not make any gaurantee on message deliery
|
ipfs_interface-js-ipfs-core
|
train
|
js
|
c5da4b9858e7568d1f86094f526167c292234b43
|
diff --git a/tortoise/backends/base/executor.py b/tortoise/backends/base/executor.py
index <HASH>..<HASH> 100644
--- a/tortoise/backends/base/executor.py
+++ b/tortoise/backends/base/executor.py
@@ -42,7 +42,7 @@ if TYPE_CHECKING: # pragma: nocoverage
from tortoise.queryset import QuerySet
EXECUTOR_CACHE: Dict[
- str, Tuple[list, str, list, str, Dict[str, Callable], str, Dict[str, str]]
+ Tuple[str, Optional[str], str], Tuple[list, str, list, str, Dict[str, Callable], str, Dict[str, str]]
] = {}
@@ -67,7 +67,7 @@ class BaseExecutor:
self.prefetch_map = prefetch_map or {}
self._prefetch_queries = prefetch_queries or {}
self.select_related_idx = select_related_idx
- key = f"{self.db.connection_name}:{self.model._meta.db_table}"
+ key = (self.db.connection_name, self.model._meta.schema, self.model._meta.db_table)
if key not in EXECUTOR_CACHE:
self.regular_columns, columns = self._prepare_insert_columns()
self.insert_query = str(self._prepare_insert_statement(columns))
|
fix: include schema in query cache key (#<I>)
Fixes random errors when accessing two tables with the same name
in different schemas (e.g. "a.foo" and "b.foo").
|
tortoise_tortoise-orm
|
train
|
py
|
39ec67bf63621a2e46ddcb62e171e874ae3ff1b9
|
diff --git a/index.js b/index.js
index <HASH>..<HASH> 100644
--- a/index.js
+++ b/index.js
@@ -59,7 +59,7 @@ var setup = function (swaggerDoc, opts, options, customCss, customfavIcon, swagg
var html = generateHTML(swaggerDoc, opts, options, customCss, customfavIcon, swaggerUrl, customeSiteTitle, htmlTplString, jsTplString)
return function (req, res) {
if (req.swaggerDoc) {
- var reqHtml = generateHTML(swaggerDoc, opts, options, customCss, customfavIcon, swaggerUrl, customeSiteTitle, htmlTplString, jsTplString)
+ var reqHtml = generateHTML(req.swaggerDoc, opts, options, customCss, customfavIcon, swaggerUrl, customeSiteTitle, htmlTplString, jsTplString)
res.send(reqHtml)
} else {
res.send(html)
|
fix: use request's swaggerDoc when available
|
scottie1984_swagger-ui-express
|
train
|
js
|
0ea20cb0184531e7b468b502a3df561cc8d12733
|
diff --git a/tests/integration/routes/profile/patch-profile-test.js b/tests/integration/routes/profile/patch-profile-test.js
index <HASH>..<HASH> 100644
--- a/tests/integration/routes/profile/patch-profile-test.js
+++ b/tests/integration/routes/profile/patch-profile-test.js
@@ -105,9 +105,9 @@ getServer(function (error, server) {
server.inject(requestOptions, function (response) {
delete response.result.meta
- t.is(response.statusCode, 400, 'returns 400 status')
+ t.is(response.statusCode, 404, 'returns 404 status')
t.is(response.result.errors.length, 1, 'returns one error')
- t.is(response.result.errors[0].title, 'Bad Request', 'returns "Bad Request" error')
+ // t.is(response.result.errors[0].title, 'Bad Request', 'returns "Bad Request" error')
t.deepEqual(response.result.errors[0].detail, 'Admins have no account', 'returns "Admins have no account" error')
t.end()
})
|
test(routes): PATCH /session/account/profile error for admins
|
hoodiehq_hoodie-account-server
|
train
|
js
|
45a276f9343b24f9e2c53f378a0e99d66381eb2b
|
diff --git a/packages/transformer-remark/index.js b/packages/transformer-remark/index.js
index <HASH>..<HASH> 100644
--- a/packages/transformer-remark/index.js
+++ b/packages/transformer-remark/index.js
@@ -42,6 +42,9 @@ class RemarkTransformer {
properties: {
className: options.anchorClassName || 'icon icon-link'
}
+ },
+ linkProperties: {
+ 'aria-hidden': 'true'
}
}],
// user plugins
|
fix(remark): add aria-hidden to heading links
|
gridsome_gridsome
|
train
|
js
|
dd08a3e4f454d607a3c84cf1dd62a9dfa729f7a0
|
diff --git a/packages/oui-select-picker/src/select-picker.controller.js b/packages/oui-select-picker/src/select-picker.controller.js
index <HASH>..<HASH> 100644
--- a/packages/oui-select-picker/src/select-picker.controller.js
+++ b/packages/oui-select-picker/src/select-picker.controller.js
@@ -55,6 +55,13 @@ export default class SelectPickerController {
this.labelElement = this.$element.find("label");
this.labelElement.on("click", event => this.openSelectMenu(event));
+ // Prevent click propagation on parent label (Safari)
+ this.dropdownElement = angular.element(this.$element[0].querySelectorAll(".ui-select-match"));
+ this.dropdownElement.on("click", event => {
+ event.stopPropagation();
+ event.preventDefault();
+ });
+
// Avoid apply undefined class if this.variant is not already set
if (this.variant) {
this.$element.addClass(`oui-select-picker_${this.variant}`);
|
fix(oui-select-picker): fix click propagation on parent label (#<I>)
|
ovh-ux_ovh-ui-angular
|
train
|
js
|
ed4d7aa74790e51673047423ebb3a6d67952a36d
|
diff --git a/src/adapters/fetch.js b/src/adapters/fetch.js
index <HASH>..<HASH> 100644
--- a/src/adapters/fetch.js
+++ b/src/adapters/fetch.js
@@ -8,8 +8,8 @@ export default (next) => async ({endpoint, ...others}) => {
throw error;
}
- return {
+ return next({
data: await resp.text(),
headers: resp.headers,
- };
+ });
};
|
fix: call next even at the end of the chain
|
tungv_redux-api-call
|
train
|
js
|
3187a26a4fd0345fc5f3e8fae79e355a1e843660
|
diff --git a/lib/index.js b/lib/index.js
index <HASH>..<HASH> 100644
--- a/lib/index.js
+++ b/lib/index.js
@@ -5,7 +5,8 @@ var bcryptjs = require('bcryptjs');
var User = function(provider){
- this.provider = provider;
+ if (provider === undefined) throw new Error('You must provide a provider.');
+ this.provider = provider;
this.id = '';
this.userHandle = '';
this.fullName = '';
|
feat: added check for a provider to be passed in during instantiation
|
cdellinger_entryway
|
train
|
js
|
a771e102ec2238a60277e2dce68283833060fd37
|
diff --git a/git/repo/base.py b/git/repo/base.py
index <HASH>..<HASH> 100644
--- a/git/repo/base.py
+++ b/git/repo/base.py
@@ -564,7 +564,7 @@ class Repo(object):
doc="Retrieve a list of alternates paths or set a list paths to be used as alternates")
def is_dirty(self, index=True, working_tree=True, untracked_files=False,
- consider_submodules=True):
+ submodules=True):
"""
:return:
``True``, the repository is considered dirty. By default it will react
@@ -577,7 +577,7 @@ class Repo(object):
# start from the one which is fastest to evaluate
default_args = ['--abbrev=40', '--full-index', '--raw']
- if not consider_submodules:
+ if not submodules:
default_args.append('--ignore-submodules')
if index:
# diff index against HEAD
@@ -591,10 +591,7 @@ class Repo(object):
return True
# END working tree handling
if untracked_files:
- kwargs = {}
- if not consider_submodules:
- kwargs['ignore_submodules'] = True
- if len(self._get_untracked_files(**kwargs)):
+ if len(self._get_untracked_files(ignore_submodules=not submodules)):
return True
# END untracked files
return False
|
refactor(repo): parameter renaming and cleanup
* renamed `consider_submodules` to `submodules` to be in line with the
existing parameters. Nowadays I would prefer the `consider_` prefix,
but can't change the existing API and thus stick to the current
naming scheme.
* reduced amount of code in one portion to make it more maintainable.
Related to #<I>
|
gitpython-developers_GitPython
|
train
|
py
|
42345b268ba85a7fc676344715b5feaa64a2a51f
|
diff --git a/src/ci.js b/src/ci.js
index <HASH>..<HASH> 100644
--- a/src/ci.js
+++ b/src/ci.js
@@ -1,7 +1,7 @@
export default function (scaffolders, chosenService, options) {
const scaffolder = scaffolders[chosenService];
- if (scaffolder) return scaffolder(options);
+ if (scaffolder) return scaffolder.scaffolder(options);
return undefined;
}
diff --git a/test/unit/ci-test.js b/test/unit/ci-test.js
index <HASH>..<HASH> 100644
--- a/test/unit/ci-test.js
+++ b/test/unit/ci-test.js
@@ -10,7 +10,7 @@ suite('ci', () => {
const chosenServiceScaffolder = sinon.stub();
const scaffolderResult = any.simpleObject();
chosenServiceScaffolder.withArgs(options).resolves(scaffolderResult);
- const scaffolders = {...any.simpleObject(), [chosenService]: chosenServiceScaffolder};
+ const scaffolders = {...any.simpleObject(), [chosenService]: {scaffolder: chosenServiceScaffolder}};
return assert.becomes(scaffoldCi(scaffolders, chosenService, options), scaffolderResult);
});
|
fix(ci): got the scaffolder from the provided object
rather than assuming the object was the scaffolder
|
travi_javascript-scaffolder
|
train
|
js,js
|
fdd116bb48f85a74dd4b1c844c1a4b4103100b92
|
diff --git a/src/svg/Painter.js b/src/svg/Painter.js
index <HASH>..<HASH> 100644
--- a/src/svg/Painter.js
+++ b/src/svg/Painter.js
@@ -134,6 +134,14 @@ SVGPainter.prototype = {
return this._viewport;
},
+ getSvgDom: function () {
+ return this._svgDom;
+ },
+
+ getSvgRoot: function () {
+ return this._svgRoot;
+ },
+
getViewportRootOffset: function () {
var viewportRoot = this.getViewportRoot();
if (viewportRoot) {
|
feat(svg): support exporting svg with connected charts
|
ecomfe_zrender
|
train
|
js
|
57f5c1cb8a9036c65efcda87b52abbf27ab3ddd1
|
diff --git a/plugins/inputs/internet_speed/internet_speed_test.go b/plugins/inputs/internet_speed/internet_speed_test.go
index <HASH>..<HASH> 100644
--- a/plugins/inputs/internet_speed/internet_speed_test.go
+++ b/plugins/inputs/internet_speed/internet_speed_test.go
@@ -12,7 +12,7 @@ func TestGathering(t *testing.T) {
t.Skip("Skipping network-dependent test in short mode.")
}
internetSpeed := &InternetSpeed{
- EnableFileDownload: false,
+ EnableFileDownload: true,
Log: testutil.Logger{},
}
@@ -26,7 +26,7 @@ func TestDataGen(t *testing.T) {
t.Skip("Skipping network-dependent test in short mode.")
}
internetSpeed := &InternetSpeed{
- EnableFileDownload: false,
+ EnableFileDownload: true,
Log: testutil.Logger{},
}
|
test: switch internet speed to enable file download (#<I>)
|
influxdata_telegraf
|
train
|
go
|
5dc62e3d58f06aed8c8f78e209d552a0922f730b
|
diff --git a/test/tests/functional/server_tests.js b/test/tests/functional/server_tests.js
index <HASH>..<HASH> 100644
--- a/test/tests/functional/server_tests.js
+++ b/test/tests/functional/server_tests.js
@@ -1055,7 +1055,7 @@ describe('Server tests', function() {
test: function(done) {
server.setMessageHandler(request => {
- request.reply({ ok: 1, maxWireVersion: 1 });
+ request.reply(Object.assign({}, mock.DEFAULT_ISMASTER, { maxWireVersion: 1 }));
});
const client = new Server(server.address());
|
test(sdam): override to a too-low maxWireVeresion
|
mongodb-js_mongodb-core
|
train
|
js
|
747e7a7ba9a38554b4747e4176a2528a16d000c9
|
diff --git a/create-cycle-app/index.js b/create-cycle-app/index.js
index <HASH>..<HASH> 100755
--- a/create-cycle-app/index.js
+++ b/create-cycle-app/index.js
@@ -129,10 +129,8 @@ function discoverFlavors (cb) {
console.log(chalk.cyan('Fetching community flavors...'))
console.log()
- // NOTE: change the method to discover flavors to the published communityFlavors.json
- // following is just for testing
request({
- url: 'https://api.github.com/repos/nickbalestra/create-cycle-app-community-flavors/contents/communityFlavors.json',
+ url: 'https://api.github.com/repos/cyclejs-community/create-cycle-app/contents/create-cycle-app/communityFlavors.json',
headers: {
'User-Agent': 'create-cycle-app ' + VERSION
}
|
feat(create-cycle-app): Added community registry file
ISSUES CLOSED: #2
|
cyclejs-community_create-cycle-app
|
train
|
js
|
19641031046294fb0e18e645b8cf5cf8fd729e2e
|
diff --git a/hrp/step_api.go b/hrp/step_api.go
index <HASH>..<HASH> 100644
--- a/hrp/step_api.go
+++ b/hrp/step_api.go
@@ -48,6 +48,7 @@ func (path *APIPath) ToAPI() (*API, error) {
return nil, err
}
err = convertCompatValidator(api.Validators)
+ convertExtract(api.Extract)
return api, err
}
diff --git a/hrp/testcase.go b/hrp/testcase.go
index <HASH>..<HASH> 100644
--- a/hrp/testcase.go
+++ b/hrp/testcase.go
@@ -170,6 +170,9 @@ func (tc *TCase) makeCompat() error {
if err != nil {
return err
}
+
+ // 3. deal with extract expr including hyphen
+ convertExtract(step.Extract)
}
return nil
}
@@ -212,6 +215,13 @@ func convertCompatValidator(Validators []interface{}) (err error) {
return nil
}
+// convertExtract deals with extract expr including hyphen
+func convertExtract(extract map[string]string) {
+ for key, value := range extract {
+ extract[key] = convertCheckExpr(value)
+ }
+}
+
// convertCheckExpr deals with check expression including hyphen
func convertCheckExpr(checkExpr string) string {
if strings.Contains(checkExpr, textExtractorSubRegexp) {
|
fix: deal with extract expr including hyphen
|
HttpRunner_HttpRunner
|
train
|
go,go
|
7a9f07e2c1d1f28143668196e1ddc2d506e846e3
|
diff --git a/lib/plugins/index.js b/lib/plugins/index.js
index <HASH>..<HASH> 100644
--- a/lib/plugins/index.js
+++ b/lib/plugins/index.js
@@ -1543,7 +1543,7 @@ pluginMgr.setProxy = function (p) {
httpMgr.setPluginMgr(pluginMgr);
var PLUGIN_KEY_RE =/^\$(?:whistle\.)?([a-z\d_-]+)[/:]([^\s]+)$/;
-var MAX_VALUE_LEN = 1024 * 1024 * 12;
+var MAX_VALUE_LEN = 1024 * 1024 * 16;
function requestValue(options, callback, isBin) {
options.needRawData = isBin;
|
refactor: refine max value size
|
avwo_whistle
|
train
|
js
|
b7eea4f5778395ad91a724ffac17c447a9102c8d
|
diff --git a/modules/angular2/src/directives/for.js b/modules/angular2/src/directives/for.js
index <HASH>..<HASH> 100644
--- a/modules/angular2/src/directives/for.js
+++ b/modules/angular2/src/directives/for.js
@@ -22,7 +22,7 @@ import {ListWrapper} from 'angular2/src/facade/collection';
*
* ```
* <ul>
- * <li *for="error in errors; #i = index">
+ * <li *for="#error in errors; #i = index">
* Error {{i}} of {{errors.length}}: {{error.message}}
* </li>
* </ul>
|
docs(directives): add # to for directive microsyntax example
|
angular_angular
|
train
|
js
|
13dc5ab1d8850943e245c2e579a0cd494253e91c
|
diff --git a/src/util/load.js b/src/util/load.js
index <HASH>..<HASH> 100644
--- a/src/util/load.js
+++ b/src/util/load.js
@@ -25,7 +25,7 @@ export async function envs () {
allFunctionAliases.forEach(functionAliases => {
if (!isEqual(aliases, functionAliases)) {
- throw EnvironmentMismatch()
+ throw new EnvironmentMismatch()
}
})
|
fix: forgot to make an error new (#<I>)
|
bustle_shep
|
train
|
js
|
8c8b418a8cb0e67d326f574b5b30dbdcf317a237
|
diff --git a/modules/logger.js b/modules/logger.js
index <HASH>..<HASH> 100644
--- a/modules/logger.js
+++ b/modules/logger.js
@@ -4,10 +4,10 @@ function loggerPlugin() {
return {
name: 'LOGGER',
- onStart: function () {
+ onStart() {
console.info('Router started');
},
- onStop: function () {
+ onStop() {
console.info('Router stopped');
},
onTransitionStart(toState, fromState) {
@@ -29,7 +29,7 @@ function loggerPlugin() {
console.log('Transition success');
endGroup();
}
- }
+ };
}
export default loggerPlugin;
|
refactor: fix linting issues
|
router5_router5
|
train
|
js
|
fc63be111b11dbaa6331ce5e75937864683d8834
|
diff --git a/src/component/legend/LegendView.js b/src/component/legend/LegendView.js
index <HASH>..<HASH> 100644
--- a/src/component/legend/LegendView.js
+++ b/src/component/legend/LegendView.js
@@ -197,6 +197,7 @@ export default echarts.extendComponentView({
var itemWidth = legendModel.get('itemWidth');
var itemHeight = legendModel.get('itemHeight');
var inactiveColor = legendModel.get('inactiveColor');
+ var symbolKeepAspect = legendModel.get('symbolKeepAspect');
var isSelected = legendModel.isSelected(name);
var itemGroup = new Group();
@@ -217,7 +218,8 @@ export default echarts.extendComponentView({
itemWidth,
itemHeight,
isSelected ? color : inactiveColor,
- true
+ // symbolKeepAspect default true for legend
+ symbolKeepAspect == null ? true : symbolKeepAspect
));
// Compose symbols
@@ -232,8 +234,14 @@ export default echarts.extendComponentView({
}
// Put symbol in the center
itemGroup.add(createSymbol(
- symbolType, (itemWidth - size) / 2, (itemHeight - size) / 2, size, size,
- isSelected ? color : inactiveColor
+ symbolType,
+ (itemWidth - size) / 2,
+ (itemHeight - size) / 2,
+ size,
+ size,
+ isSelected ? color : inactiveColor,
+ // symbolKeepAspect default true for legend
+ symbolKeepAspect == null ? true : symbolKeepAspect
));
}
|
feat: support symbolKeepAspect for legend
|
apache_incubator-echarts
|
train
|
js
|
c9afbec3dad94cb48f1c5fdb2be4b9d1e46ef30a
|
diff --git a/src/events/touch.js b/src/events/touch.js
index <HASH>..<HASH> 100644
--- a/src/events/touch.js
+++ b/src/events/touch.js
@@ -101,7 +101,7 @@ let __touchHandler = function() {
const { speed } = this.options;
- this.__setMovement(
+ this.__addMovement(
Math.abs(x) > 5 ? x * speed * DEVICE_SCALE : 0,
Math.abs(y) > 5 ? y * speed * DEVICE_SCALE : 0
);
|
fix(touchend): use `addMovement` to perform inertial scrolling
|
idiotWu_smooth-scrollbar
|
train
|
js
|
4cf53f290b6aad3f38fabe233728b0db6a033ad1
|
diff --git a/src/App.php b/src/App.php
index <HASH>..<HASH> 100644
--- a/src/App.php
+++ b/src/App.php
@@ -48,8 +48,8 @@ final class App
*/
$aCommandLocations = [
- [FCPATH . 'vendor/nails/common/src/Common/Console/Command/', 'Nails\Common\Console\Command'],
- [FCPATH . 'src/Console/Command/', 'App\Console\Command'],
+ [NAILS_APP_PATH . 'vendor/nails/common/src/Common/Console/Command/', 'Nails\Common\Console\Command'],
+ [NAILS_APP_PATH . 'src/Console/Command/', 'App\Console\Command'],
];
$aModules = _NAILS_GET_MODULES();
diff --git a/src/Utf8.php b/src/Utf8.php
index <HASH>..<HASH> 100644
--- a/src/Utf8.php
+++ b/src/Utf8.php
@@ -14,7 +14,7 @@ namespace Nails\Console;
use Nails\Factory;
-require FCPATH . 'vendor/codeigniter/framework/system/core/Utf8.php';
+require NAILS_CI_SYSTEM_PATH . 'core/Utf8.php';
class Utf8 extends \CI_Utf8
{
|
chore: Replaced constant FCPATH with NAILS_APP_PATH
|
nails_module-console
|
train
|
php,php
|
0643d2e14e26b790316e979ff65dd320c7a87303
|
diff --git a/config.js b/config.js
index <HASH>..<HASH> 100644
--- a/config.js
+++ b/config.js
@@ -19,7 +19,7 @@ System.config({
"aurelia-templating-resources": "npm:aurelia-templating-resources@1.4.0",
"babel": "npm:babel-core@5.8.38",
"babel-runtime": "npm:babel-runtime@5.8.38",
- "bcx-aurelia-dnd": "npm:bcx-aurelia-dnd@0.3.0",
+ "bcx-aurelia-dnd": "npm:bcx-aurelia-dnd@0.3.1",
"core-js": "npm:core-js@1.2.7",
"jquery": "npm:jquery@3.2.1",
"github:jspm/nodelibs-assert@0.1.0": {
@@ -164,7 +164,7 @@ System.config({
"npm:babel-runtime@5.8.38": {
"process": "github:jspm/nodelibs-process@0.1.2"
},
- "npm:bcx-aurelia-dnd@0.3.0": {
+ "npm:bcx-aurelia-dnd@0.3.1": {
"aurelia-event-aggregator": "npm:aurelia-event-aggregator@1.0.1"
},
"npm:buffer@5.0.6": {
|
chore: upgrade jspm bcx-aurelia-dnd for testing.
|
buttonwoodcx_bcx-aurelia-reorderable-repeat
|
train
|
js
|
23dd352811581ff0223189b0310b6c8e45d5bea7
|
diff --git a/test/unit/specs/index-list.spec.js b/test/unit/specs/index-list.spec.js
index <HASH>..<HASH> 100644
--- a/test/unit/specs/index-list.spec.js
+++ b/test/unit/specs/index-list.spec.js
@@ -207,7 +207,7 @@ describe('IndexList', () => {
},
{
pageX: 300,
- pageY: 380
+ pageY: 370
}
], 100)
}, 20)
|
test(index-list): swipe position
|
didi_cube-ui
|
train
|
js
|
74d35c3b605e995caa3573faed3c5059025dd8f6
|
diff --git a/docs/.vuepress/config.js b/docs/.vuepress/config.js
index <HASH>..<HASH> 100644
--- a/docs/.vuepress/config.js
+++ b/docs/.vuepress/config.js
@@ -20,7 +20,7 @@ module.exports = {
cssLibs: ['https://unpkg.com/leaflet@1.6.0/dist/leaflet.css'],
onlineBtns: { codesandbox: true, codepen: false, jsfiddle: false },
codesandbox: {
- deps: { leaflet: 'latest', 'vue2-leaflet': 'latest' },
+ deps: { leaflet: 'latest', 'vue2-leaflet': 'latest', vue: '2.6.11' },
json: '',
query: '',
embed: '',
|
chore: lock vue dependency to 2.x
|
KoRiGaN_Vue2Leaflet
|
train
|
js
|
fde9cee857bb250db8107ecf4fb3c5da9f0c0dc9
|
diff --git a/websockets.js b/websockets.js
index <HASH>..<HASH> 100644
--- a/websockets.js
+++ b/websockets.js
@@ -94,13 +94,21 @@ Sockets.getFormattingOptions = function(socket, data, callback) {
Sockets.getCategoriesForSelect = async function (socket) {
const cids = await categories.getAllCidsFromSet('categories:cid');
- const [allowed, categoriesData, isModerator, isAdmin] = await Promise.all([
+ let [allowed, categoriesData, isModerator, isAdmin] = await Promise.all([
privileges.categories.isUserAllowedTo('topics:create', cids, socket.uid),
categories.getCategoriesData(cids),
user.isModerator(socket.uid, cids),
user.isAdministrator(socket.uid),
]);
+ const filtered = await plugins.fireHook('filter:composer.getCategoriesForSelect', {
+ allowed: allowed,
+ categoriesData: categoriesData,
+ isModerator: isModerator,
+ isAdmin: isAdmin,
+ });
+ [allowed, categoriesData, isModerator, isAdmin] = [... Object.values(filtered)];
+
categories.getTree(categoriesData);
const cidToAllowed = _.zipObject(cids, allowed.map((allowed, i) => isAdmin || isModerator[i] || allowed));
|
feat: add hook to allow plugins to change visibility of categories in selector
|
NodeBB_nodebb-plugin-composer-default
|
train
|
js
|
2d78020637dabcf11bc8503d15897aa747f9d4e0
|
diff --git a/lib/push-to-s3.js b/lib/push-to-s3.js
index <HASH>..<HASH> 100644
--- a/lib/push-to-s3.js
+++ b/lib/push-to-s3.js
@@ -4,7 +4,7 @@ const mime = require('mime')
const uuid = require('uuid')
const browserify = require('./browserify')
-const transformCss = require('./cssTransform')
+const transformCss = require('./css-transform')
module.exports = function ({
cloudfront,
|
fix(push): Use the correct filename.
|
conveyal_mastarm
|
train
|
js
|
7d49ecb8419682f587907ea807fd350e11713a15
|
diff --git a/docs/app/Layouts/StickyLayout.js b/docs/app/Layouts/StickyLayout.js
index <HASH>..<HASH> 100644
--- a/docs/app/Layouts/StickyLayout.js
+++ b/docs/app/Layouts/StickyLayout.js
@@ -114,7 +114,7 @@ export default class StickyLayout extends Component {
<p>This example shows how to use lazy loaded images, a sticky menu, and a simple text container</p>
</Container>
- {/* Attaching the top menu is a simple operation, we only switch `fixed` prop add add another styles if it has
+ {/* Attaching the top menu is a simple operation, we only switch `fixed` prop and add another style if it has
gone beyond the scope of visibility
*/}
<Visibility
|
docs(Layouts): fix typo in StickyLayout (#<I>)
docs(Layouts): fix typo in StickyLayout
|
Semantic-Org_Semantic-UI-React
|
train
|
js
|
b6c10001ee77e20553cfc2c789e56388a3a185a6
|
diff --git a/spoonx.js b/spoonx.js
index <HASH>..<HASH> 100644
--- a/spoonx.js
+++ b/spoonx.js
@@ -27,10 +27,7 @@ module.exports = {
*
* importsToAdd: ["import {AssociationSelect} from './association-select';"],
*/
- importsToAdd: [
- "import {AssociationSelect} from './component/association-select';",
- "import {Paged} from './component/paged';"
- ],
+ importsToAdd: [],
/* js to be transpiled, but not be concated
* (ValueConverters, CustomElements)
|
fix(project): do not import components twice during build
|
SpoonX_aurelia-orm
|
train
|
js
|
89d0c3f286e852438f086fbbffc9fe95a91d26c5
|
diff --git a/src/core/EventMixin.js b/src/core/EventMixin.js
index <HASH>..<HASH> 100644
--- a/src/core/EventMixin.js
+++ b/src/core/EventMixin.js
@@ -136,7 +136,7 @@ const EventMixin = /** @lends EventMixin# */ {
/**
* @callback EventMixinCallback
- * @param {Object} [e] 事件对象
+ * @param {Object} e 事件对象
* @param {string} e.type 事件类型
* @param {any} e.detail 事件数据
* @param {any} e.target 事件触发对象
|
docs: update EventMixin jsdoc comments
|
hiloteam_Hilo3d
|
train
|
js
|
2665ac49e970de3c7092d96fefd820cdc84e9229
|
diff --git a/lib/compile_text_parser.js b/lib/compile_text_parser.js
index <HASH>..<HASH> 100644
--- a/lib/compile_text_parser.js
+++ b/lib/compile_text_parser.js
@@ -153,7 +153,7 @@ function readCodeFor(type, charset, encodingExpr, config, options) {
case Types.DOUBLE:
return 'packet.parseLengthCodedFloat()';
case Types.NULL:
- return 'null; packet.skip(1)';
+ return 'packet.readLengthCodedNumber()';
case Types.DECIMAL:
case Types.NEWDECIMAL:
if (config.decimalNumbers) {
|
fix: make null reader code suitable to use as return value code
|
sidorares_node-mysql2
|
train
|
js
|
d3eefd63a662439291754b2da1be3c206139788b
|
diff --git a/src/client/request-signer.js b/src/client/request-signer.js
index <HASH>..<HASH> 100644
--- a/src/client/request-signer.js
+++ b/src/client/request-signer.js
@@ -32,8 +32,10 @@ function requestSigner(crypto) {
* */
function selfSign(request, privateKey) {
var fingerprint = crypto.calculateFingerprint(request.getSnapshot());
- var id = fingerprint.toString('hex');
- request.appendSignature(id, crypto.sign(fingerprint, privateKey));
+ var signerId = request.card_id ?
+ request.card_id : fingerprint.toString('hex');
+
+ request.appendSignature(signerId, crypto.sign(fingerprint, privateKey));
}
/**
|
fix: requestSigner#selfSign using wrong id for revocation requests
|
VirgilSecurity_virgil-sdk-javascript
|
train
|
js
|
0b286e784b15fc9b49cba58cab12bd45f726430f
|
diff --git a/packages/website/builder/scripts/hashToggleLinks.js b/packages/website/builder/scripts/hashToggleLinks.js
index <HASH>..<HASH> 100644
--- a/packages/website/builder/scripts/hashToggleLinks.js
+++ b/packages/website/builder/scripts/hashToggleLinks.js
@@ -4,8 +4,8 @@ document.querySelector('#nav').addEventListener('click', event => {
if (
node.tagName === 'A' &&
node.href.indexOf('#') >= 0 &&
- node.parentNode.parentNode.childNodes[0].tagName === 'INPUT'
+ node.parentNode.childNodes[0].tagName === 'INPUT'
) {
- node.parentNode.parentNode.childNodes[0].click()
+ node.parentNode.childNodes[0].click()
}
})
|
fix(website): fix hash links toggle
|
cerebral_cerebral
|
train
|
js
|
2e73f6890e0aa8f97b9f60c87e9b94832a44cfa8
|
diff --git a/nidmresults/exporter.py b/nidmresults/exporter.py
index <HASH>..<HASH> 100644
--- a/nidmresults/exporter.py
+++ b/nidmresults/exporter.py
@@ -146,7 +146,6 @@ class NIDMExporter():
"""
Initialise NIDM-Results bundle.
"""
- software_lc = self.software.name.lower()
software_uc = self.software.name.upper()
bundle_id = NIIRI[str(uuid.uuid4())]
@@ -160,7 +159,7 @@ class NIDMExporter():
(NIDM['version'], version))
)
- self.doc.wasGeneratedBy(NIIRI[software_lc+'_results_id'],
+ self.doc.wasGeneratedBy(bundle_id,
time=str(datetime.datetime.now().time()))
def _get_model_parameters_estimations(self, error_model):
|
fix: bundle id set as UUID is qualified generation
|
incf-nidash_nidmresults
|
train
|
py
|
a2fb39977fd94a7e1939206839790dbd6a20d915
|
diff --git a/lib/rules/no-curly-component-invocation.js b/lib/rules/no-curly-component-invocation.js
index <HASH>..<HASH> 100644
--- a/lib/rules/no-curly-component-invocation.js
+++ b/lib/rules/no-curly-component-invocation.js
@@ -43,6 +43,8 @@ const BUILT_INS = new Set([
'in-element',
/* from ember-cli-app-version */
'app-version',
+ /* from app/index.html */
+ 'rootURL',
]);
const ALWAYS_CURLY = new Set(['yield']);
diff --git a/lib/rules/no-implicit-this.js b/lib/rules/no-implicit-this.js
index <HASH>..<HASH> 100644
--- a/lib/rules/no-implicit-this.js
+++ b/lib/rules/no-implicit-this.js
@@ -44,7 +44,11 @@ const ARGLESS_BUILTIN_HELPERS = [
];
// arg'less Components / Helpers in default ember-cli blueprint
-const ARGLESS_DEFAULT_BLUEPRINT = ['welcome-page'];
+const ARGLESS_DEFAULT_BLUEPRINT = [
+ 'welcome-page',
+ /* from app/index.html */
+ 'rootURL',
+];
module.exports = class NoImplicitThis extends Rule {
parseConfig(config) {
|
fix: Add rooURL to ignore list for index.html
|
ember-template-lint_ember-template-lint
|
train
|
js,js
|
786ea3e07e0917ebc200941fb6b1f55cb02fcf4b
|
diff --git a/lib/index.js b/lib/index.js
index <HASH>..<HASH> 100644
--- a/lib/index.js
+++ b/lib/index.js
@@ -52,8 +52,8 @@ function sourceToJSON (jsonSource) {
function tryReadAndParse (jsonSource) {
try {
- const lines = [...readlines(jsonSource)]
- return lines.join('\n')
+ const lines = [...readlines(jsonSource)].join('\n')
+ return JSON.parse(lines)
} catch (err) {
return null
}
|
fix: Correct tryReadAndParse so it does, indeed, parse
|
wmfs_j2119
|
train
|
js
|
e29d7a79fa89fab18ce1bf8f30ffba57081fdf66
|
diff --git a/packages/xod-doc/test/generate.spec.js b/packages/xod-doc/test/generate.spec.js
index <HASH>..<HASH> 100644
--- a/packages/xod-doc/test/generate.spec.js
+++ b/packages/xod-doc/test/generate.spec.js
@@ -3,6 +3,7 @@ import path from 'path';
import chaiFiles from 'chai-files';
import chaiFs from 'chai-fs';
import dirtyChai from 'dirty-chai';
+import rimraf from 'rimraf';
import doc from '../src/index';
const packed = require('./mocks/pack.json');
@@ -19,7 +20,7 @@ describe('Generate docs', () => {
const file = chaiFiles.file;
const dir = chaiFiles.dir;
- const tmpPath = path.join(__dirname, 'tmp');
+ const tmpPath = path.join(__dirname, '.tmp');
before((done) => {
doc(
@@ -29,6 +30,9 @@ describe('Generate docs', () => {
true)
.then(done);
});
+ after(() => {
+ rimraf.sync(tmpPath);
+ });
it('shoult create folder tmp', () =>
expect(
|
fix(xod-doc): add removing tmpDir after tests and change its name to .tmp (cause its already ignored in .gitignore)
|
xodio_xod
|
train
|
js
|
f7f0560bda773fb228302289b54ae6f52e84591c
|
diff --git a/packages/babel-helpers/src/helpers.js b/packages/babel-helpers/src/helpers.js
index <HASH>..<HASH> 100644
--- a/packages/babel-helpers/src/helpers.js
+++ b/packages/babel-helpers/src/helpers.js
@@ -875,7 +875,7 @@ helpers.readOnlyError = helper("7.0.0-beta.0")`
}
`;
-helpers.writeOnlyError = helper("7.12.12")`
+helpers.writeOnlyError = helper("7.12.13")`
export default function _writeOnlyError(name) {
throw new TypeError("\\"" + name + "\\" is write-only");
}
|
fix: wrong helper version (#<I>)
|
babel_babel
|
train
|
js
|
e19731564e92683407650cdf8c0efaafab4e820a
|
diff --git a/intranet/apps/users/models.py b/intranet/apps/users/models.py
index <HASH>..<HASH> 100644
--- a/intranet/apps/users/models.py
+++ b/intranet/apps/users/models.py
@@ -276,6 +276,10 @@ class User(AbstractBaseUser, PermissionsMixin):
"""
return self.first_name
+ def get_full_name(self):
+ """Return full name, e.g. Angela William."""
+ return self.full_name
+
def get_short_name(self):
"""Get short (first) name of a user."""
return self.short_name
|
fix: override User.get_full_name() (abstract in AbstractBaseUser)
|
tjcsl_ion
|
train
|
py
|
06e8aa774aca42713f5923baeeb477e4e0581fd3
|
diff --git a/lib/utils.js b/lib/utils.js
index <HASH>..<HASH> 100644
--- a/lib/utils.js
+++ b/lib/utils.js
@@ -29,10 +29,8 @@ var clone = exports.clone = function clone(obj, options) {
: new obj.constructor(obj.id);
}
- if ('ReadPreference' === obj._type && obj.isValid && obj.toObject) {
- return 'function' == typeof obj.clone
- ? obj.clone()
- : new obj.constructor(obj.mode, clone(obj.tags, options));
+ if (obj.constructor.name === 'ReadPreference') {
+ return new obj.constructor(obj.mode, clone(obj.tags, options));
}
if ('Binary' == obj._bsontype && obj.buffer && obj.value) {
|
test: fix tests re: Automattic/mongoose#<I>
|
aheckmann_mquery
|
train
|
js
|
83f7af848f4b9d3dcaad0482f30db40a3e5bc6b3
|
diff --git a/examples/index.js b/examples/index.js
index <HASH>..<HASH> 100644
--- a/examples/index.js
+++ b/examples/index.js
@@ -72,8 +72,19 @@ class App extends Component {
return (<div style={ {margin: '0 auto', width: 300} }>
<h1>Belle Playground</h1>
+ <TogglePlayground />
+
+ <SelectPlayground />
+
+ <ButtonPlayground />
+
+ <TextInputPlayground />
+
<CardPlayground />
+ <RatingPlayground />
+
+ <ComboBoxPlayground />
</div>);
}
}
|
chore(examples): re-add playgrounds
|
nikgraf_belle
|
train
|
js
|
9eb1bbec1ab658835099884b27017d0f6afc4ee3
|
diff --git a/src/Neutrino/Debug/Debugger.php b/src/Neutrino/Debug/Debugger.php
index <HASH>..<HASH> 100644
--- a/src/Neutrino/Debug/Debugger.php
+++ b/src/Neutrino/Debug/Debugger.php
@@ -304,7 +304,6 @@ class Debugger
$volt->setOptions([
"compiledPath" => Di::getDefault()->get('config')->view->compiled_path,
'compiledSeparator' => '_',
- "compiledExtension" => ".compiled",
'compileAlways' => true,
]);
$compiler = $volt->getCompiler();
|
feat(Debugger): Remove file extension
|
phalcon-nucleon_framework
|
train
|
php
|
e5d7c676c82ae081fd3391dc4eb6424cfbdaecaf
|
diff --git a/config/addon-docs.js b/config/addon-docs.js
index <HASH>..<HASH> 100644
--- a/config/addon-docs.js
+++ b/config/addon-docs.js
@@ -6,4 +6,7 @@ const AddonDocsConfig = require('ember-cli-addon-docs/lib/config');
module.exports = class extends AddonDocsConfig {
// See https://ember-learn.github.io/ember-cli-addon-docs/docs/deploying
// for details on configuration you can override here.
+ getRootURL() {
+ return '';
+ }
};
|
chore(docs): set addon-docs root url to '' for custom domain
|
typed-ember_ember-cli-typescript
|
train
|
js
|
de7dd3cc6e4dfe025a67f4f737561fd1d3f6b302
|
diff --git a/src/components/RefinementList/__tests__/RefinementList-test.js b/src/components/RefinementList/__tests__/RefinementList-test.js
index <HASH>..<HASH> 100644
--- a/src/components/RefinementList/__tests__/RefinementList-test.js
+++ b/src/components/RefinementList/__tests__/RefinementList-test.js
@@ -240,6 +240,27 @@ describe('RefinementList', () => {
expect(actual.length).toEqual(0);
});
+ it('does not add a showMore link when the facet values length is equal to the minLimit', () => {
+ // Given
+ let props = {
+ facetValues: [
+ {name: 'foo'},
+ {name: 'bar'},
+ {name: 'baz'}
+ ],
+ showMore: true,
+ limitMin: 3,
+ limitMax: 4
+ };
+
+ // When
+ let root = shallowRender(props);
+ let actual = root.find('Template').filter({templateKey: 'show-more-inactive'});
+
+ // Then
+ expect(actual.length).toEqual(0);
+ });
+
it('changing the state will toggle the number of items displayed', () => {
// Given
let props = {
@@ -324,4 +345,3 @@ describe('RefinementList', () => {
});
});
});
-
|
test(showMore): test showMore not added when no more to show
|
algolia_instantsearch.js
|
train
|
js
|
db5cc2511ea19c41c77aa99fb12b8359eeb4a6be
|
diff --git a/src/po-helpers.js b/src/po-helpers.js
index <HASH>..<HASH> 100644
--- a/src/po-helpers.js
+++ b/src/po-helpers.js
@@ -30,7 +30,7 @@ export function buildPotData(translations) {
// merge references
if (oldTrans.comments && oldTrans.comments.reference &&
trans.comments && trans.comments.reference &&
- ! oldTrans.comments.reference.match(trans.comments.reference)) {
+ !oldTrans.comments.reference.includes(trans.comments.reference)) {
oldTrans.comments.reference = `${oldTrans.comments.reference}\n${trans.comments.reference}`;
}
}
|
fix: string comparison for reference comments (#<I>)
* fix: string comparison for reference comments
* fix: string comparison for reference comments
|
ttag-org_babel-plugin-ttag
|
train
|
js
|
7ccd63275bdf23f5e4e1d6383a837495ba581bdf
|
diff --git a/wdio.conf.js b/wdio.conf.js
index <HASH>..<HASH> 100644
--- a/wdio.conf.js
+++ b/wdio.conf.js
@@ -75,13 +75,6 @@ const capabilities = [
{
...commonCapabilities,
browserName: 'Edge',
- browser_version: '18.0',
- os: 'Windows',
- os_version: '10',
- },
- {
- ...commonCapabilities,
- browserName: 'Edge',
browser_version: '15.0',
os: 'Windows',
os_version: '10',
|
test: remove flaky Edge <I> on Windows <I> test (#<I>)
Browserstack seems to have trouble accessing the local proxy on recent
Edge <I> / Windows <I> machines. Since Edge <I> is deprecated anyways
and since we still have an Edge <I> test as a safety net it should be
fine to just drop the Edge <I> test.
|
kelektiv_node-uuid
|
train
|
js
|
1d7bba6857c6714f47fbd83ea12433807d563f2f
|
diff --git a/src/cli.js b/src/cli.js
index <HASH>..<HASH> 100755
--- a/src/cli.js
+++ b/src/cli.js
@@ -196,7 +196,7 @@ async function runCmd (argv, stdout, stderr) {
outDir = resolve(
require("os").tmpdir(),
- crypto.createHash('md5').digest(resolve(args._[1] || ".")).toString('hex')
+ crypto.createHash('md5').update(resolve(args._[1] || ".")).digest('hex')
);
if (existsSync(outDir))
rimraf.sync(outDir);
|
fix: incorrect usage of Hash.digest (#<I>)
Hey,
Hash.digest expect an encoding value as parameter(latin1 | hex | base<I>).
The absolute path of the file was passed to `Hash.digest` which is incorrect. To generate a hash
based on the pathname we have to call `Hash.update` first.
The desired encoding format is then passed to `Hash.digest`. This remove the need to call `toString` method.
|
zeit_ncc
|
train
|
js
|
cdcd66e3cee0de0ce784c3abeb40ad59694ef5f8
|
diff --git a/src/utils/calculate-textarea-height.js b/src/utils/calculate-textarea-height.js
index <HASH>..<HASH> 100644
--- a/src/utils/calculate-textarea-height.js
+++ b/src/utils/calculate-textarea-height.js
@@ -1,3 +1,5 @@
+/* jscs:disable disallowSpacesInsideTemplateStringPlaceholders */
+
import { canUseDOM } from 'exenv';
let hiddenTextarea;
|
chore(TextInput): disable linting rule to get confused with height calculation
|
nikgraf_belle
|
train
|
js
|
805f12420c54b3d76081d1cdd566cf5b83ffc505
|
diff --git a/test/test_renderer.rb b/test/test_renderer.rb
index <HASH>..<HASH> 100644
--- a/test/test_renderer.rb
+++ b/test/test_renderer.rb
@@ -27,4 +27,21 @@ class TestRenderer < Minitest::Test
results = CommonMarker::HtmlRenderer.new.render(doc)
assert_equal 2, results.scan(/<tbody>/).size
end
+
+ def test_escape_html_encoding
+ my_renderer = Class.new(HtmlRenderer) do
+ attr_reader :input_encoding, :output_encoding
+
+ def text(node)
+ @input_encoding = node.string_content.encoding
+ escape_html(node.string_content).tap do |escaped|
+ @output_encoding = escaped.encoding
+ end
+ end
+ end
+
+ renderer = my_renderer.new
+ assert_equal Encoding::UTF_8, renderer.render(@doc).encoding
+ assert_equal renderer.input_encoding, renderer.output_encoding
+ end
end
|
test: escape_html should preserve encoding
|
gjtorikian_commonmarker
|
train
|
rb
|
9b5a9518ac57f96196d0aeffe820b3452a0ecbc0
|
diff --git a/lib/generators/data_migration/data_migration_generator.rb b/lib/generators/data_migration/data_migration_generator.rb
index <HASH>..<HASH> 100644
--- a/lib/generators/data_migration/data_migration_generator.rb
+++ b/lib/generators/data_migration/data_migration_generator.rb
@@ -20,11 +20,8 @@ module DataMigrate
attr_reader :migration_action
def self.next_migration_number(dirname)
- if ActiveRecord::Base.timestamped_migrations
- Time.new.utc.strftime("%Y%m%d%H%M%S")
- else
- "%.3d" % (current_migration_number(dirname) + 1)
- end
+ next_migration_number = current_migration_number(dirname) + 1
+ ActiveRecord::Migration.next_migration_number(next_migration_number)
end
def set_local_assigns!
|
fix: support not timestamped data_migration generation
ActiveRecord::Base.timestamped_migrations has been deprecated
|
ilyakatz_data-migrate
|
train
|
rb
|
75bbfa0df8ba7878dce3f479578c3adea272155f
|
diff --git a/src/utils.js b/src/utils.js
index <HASH>..<HASH> 100644
--- a/src/utils.js
+++ b/src/utils.js
@@ -778,19 +778,3 @@ exports.stackTraceFilter = function () {
return stack.join('\n')
}
}
-
-/**
- * Crude, but effective.
- * @api
- * @param {*} value
- * @returns {boolean} Whether or not `value` is a Promise
- */
-exports.isPromise = function isPromise (value) {
- return typeof value === 'object' && typeof value.then === 'function'
-}
-
-/**
- * It's a noop.
- * @api
- */
-exports.noop = function () {}
|
refactor: remove isPromise and noop
|
kt3k_kocha
|
train
|
js
|
64dfb5aa3313ce2c8c9304add03527fce8d2e503
|
diff --git a/api/views.py b/api/views.py
index <HASH>..<HASH> 100644
--- a/api/views.py
+++ b/api/views.py
@@ -289,7 +289,6 @@ class AppConfigViewSet(BaseAppViewSet):
previous_config = config.app.config_set.latest()
config.owner = self.request.user
if previous_config:
- config.owner = previous_config.owner
for attr in ['cpu', 'memory', 'tags', 'values']:
# Guard against migrations from older apps without fixes to
# JSONField encoding.
|
fix(controller): set config as the issuing user
When you created new config values, the previous config's owner would
become the creator of this config. Removing this line allows the
request's user to become the owner.
|
deis_controller-sdk-go
|
train
|
py
|
b69eeacb9962b2fb78d69335f38dd256755f4175
|
diff --git a/application/tests/_ci_phpunit_test/replacing/helpers/url_helper.php b/application/tests/_ci_phpunit_test/replacing/helpers/url_helper.php
index <HASH>..<HASH> 100644
--- a/application/tests/_ci_phpunit_test/replacing/helpers/url_helper.php
+++ b/application/tests/_ci_phpunit_test/replacing/helpers/url_helper.php
@@ -76,6 +76,11 @@ if ( ! function_exists('redirect'))
ob_end_clean();
}
+ if ($code === NULL)
+ {
+ $code = 200;
+ }
+
throw new CIPHPUnitTestRedirectException('Redirect to ' . $uri, $code);
}
}
|
fix: ensure $code is int for PHP <I>
|
kenjis_ci-phpunit-test
|
train
|
php
|
499b1c4ff5b90a754384a5ca91b770d062d76db8
|
diff --git a/pywal/colors.py b/pywal/colors.py
index <HASH>..<HASH> 100644
--- a/pywal/colors.py
+++ b/pywal/colors.py
@@ -6,6 +6,7 @@ import os
import random
import re
import sys
+import hashlib
from . import theme
from . import util
@@ -86,12 +87,19 @@ def saturate_colors(colors, amount):
def cache_fname(img, backend, light, cache_dir, sat=""):
"""Create the cache file name."""
color_type = "light" if light else "dark"
- file_name = re.sub("[/|\\|.]", "_", img)
+ file_hash = hashf(img)
- file_parts = [file_name, color_type, backend, sat, __cache_version__]
+ file_parts = [file_hash, color_type, backend, sat, __cache_version__]
return [cache_dir, "schemes", "%s_%s_%s_%s_%s.json" % (*file_parts,)]
+def hashf(fpath):
+ return hashlib.md5(file_bytes(open(fpath, 'rb'))).hexdigest()
+
+def file_bytes(fpath):
+ with fpath:
+ return fpath.read()
+
def get_backend(backend):
"""Figure out which backend to use."""
if backend == "random":
|
feat: hash file for cache filename
rebase me
|
dylanaraps_pywal
|
train
|
py
|
b90661af9b493644697bcdf21e9302fe3aa0574b
|
diff --git a/test/e2e/framework/util.go b/test/e2e/framework/util.go
index <HASH>..<HASH> 100644
--- a/test/e2e/framework/util.go
+++ b/test/e2e/framework/util.go
@@ -3542,7 +3542,7 @@ func WaitForDeploymentStatusValid(c clientset.Interface, d *extensions.Deploymen
reason string
)
- err := wait.Poll(Poll, 2*time.Minute, func() (bool, error) {
+ err := wait.Poll(Poll, 5*time.Minute, func() (bool, error) {
var err error
deployment, err = c.Extensions().Deployments(d.Namespace).Get(d.Name)
if err != nil {
|
test: bump deployment test timeout
Matches the timeout used in WaitForDeploymentStatus
|
kubernetes_kubernetes
|
train
|
go
|
73266f8f3df8c7933793be33bd04bec82ca30398
|
diff --git a/build/fuses/build.py b/build/fuses/build.py
index <HASH>..<HASH> 100755
--- a/build/fuses/build.py
+++ b/build/fuses/build.py
@@ -1,5 +1,6 @@
#!/usr/bin/env python3
+from collections import OrderedDict
import json
import os
import sys
@@ -50,7 +51,7 @@ const volatile char kFuseWire[] = { /* sentinel */ {sentinel}, /* fuse_version *
"""
with open(os.path.join(dir_path, "fuses.json5"), 'r') as f:
- fuse_defaults = json.loads(''.join(line for line in f.readlines() if not line.strip()[0] == "/"))
+ fuse_defaults = json.loads(''.join(line for line in f.readlines() if not line.strip()[0] == "/"), object_pairs_hook=OrderedDict)
fuse_version = fuse_defaults['_version']
del fuse_defaults['_version']
|
fix: ensure fuse order is read in a stable way (#<I>)
|
electron_electron
|
train
|
py
|
18a00883d7f9b978affcb0456c874fc3950108d9
|
diff --git a/src/Calendar.js b/src/Calendar.js
index <HASH>..<HASH> 100644
--- a/src/Calendar.js
+++ b/src/Calendar.js
@@ -101,7 +101,7 @@ class Calendar extends React.Component {
* - end time
* - title
* - whether its an "all day" event or not
- * - any resource the event may be a related too
+ * - any resource the event may be related to
*
* Each of these properties can be customized or generated dynamically by
* setting the various "accessor" props. Without any configuration the default
|
docs: fix typo (#<I>)
Fix some typos in the docs
|
intljusticemission_react-big-calendar
|
train
|
js
|
c60c671c838724f2acba673e7a8e0aeaf7c54da7
|
diff --git a/src/Models/Calendar/CharacterCalendarEvent.php b/src/Models/Calendar/CharacterCalendarEvent.php
index <HASH>..<HASH> 100644
--- a/src/Models/Calendar/CharacterCalendarEvent.php
+++ b/src/Models/Calendar/CharacterCalendarEvent.php
@@ -49,7 +49,8 @@ class CharacterCalendarEvent extends Model
public function detail()
{
- return $this->hasOne(CharacterCalendarEventDetail::class, 'event_id', 'event_id');
+ return $this->hasOne(CharacterCalendarEventDetail::class, 'event_id', 'event_id')
+ ->withDefault();
}
/**
|
fix(calendar): prevent null exception
prevent a null exception to be throw when an event detail isn't pulled yet
Closes eveseat/seat#<I>
|
eveseat_eveapi
|
train
|
php
|
9243a8dbad7de46b0f043604bbb456c276a40b47
|
diff --git a/app/src/robot/api-client/client.js b/app/src/robot/api-client/client.js
index <HASH>..<HASH> 100755
--- a/app/src/robot/api-client/client.js
+++ b/app/src/robot/api-client/client.js
@@ -155,6 +155,19 @@ export default function client(dispatch) {
freshUpload = true
remote.session_manager
.create(name, contents, fileIsBinary(state.protocol.file))
+ .catch(error => {
+ // back compat: for robot versions before 3.13, Session.create fn takes only 3 args (self, name, contents)
+ // not 4 (self, name, contents, is_binary)
+ if (
+ error.name === 'RemoteError' &&
+ error.methodName === 'create' &&
+ /takes 3 positional arguments/.test(error.message)
+ ) {
+ return remote.session_manager.create(name, contents)
+ }
+
+ throw error
+ })
.then(apiSession => {
remote.session_manager.session = apiSession
// state change will trigger a session notification, which will
|
fix(app): fix broken back-compat for pre-<I>.x robots (#<I>)
closes #<I>
|
Opentrons_opentrons
|
train
|
js
|
ad9915e4fbebec05b92d7e33a10696519ef00a2f
|
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -11,7 +11,7 @@ install_requires = [
'six>=1.11.0',
'qiniu>=7.1.4,<7.2.4',
'requests>=2.20.0,<=2.22.0',
- 'urllib3>=1.24.3,<=1.25.3'
+ 'urllib3>=1.24.3,<=1.25.3',
'werkzeug',
'gevent>=1.0.2,<2.0.0'
]
|
fix: typo in requires list of setup.py
close #<I>
|
leancloud_python-sdk
|
train
|
py
|
f6f4fa755fad49c74c12ba2d43f92304957fa1c7
|
diff --git a/packages/app-backend/src/clone.js b/packages/app-backend/src/clone.js
index <HASH>..<HASH> 100644
--- a/packages/app-backend/src/clone.js
+++ b/packages/app-backend/src/clone.js
@@ -376,7 +376,7 @@ function clone (object, options) {
// if the object cannot / should not be cloned, don't
if (
// promise-like
- typeof object.then === 'function' ||
+ (hasOwnProperty.call(object, 'then') && typeof object.then === 'function') ||
// errors
object instanceof Error ||
// weakmaps
|
fix(clone): Make sure the 'then' property exists on the object before checking if its a function (#<I>)
|
vuejs_vue-devtools
|
train
|
js
|
93259464b323062d6c88d87649a7f795a690a0d4
|
diff --git a/tasks/htmlSnapshot.js b/tasks/htmlSnapshot.js
index <HASH>..<HASH> 100644
--- a/tasks/htmlSnapshot.js
+++ b/tasks/htmlSnapshot.js
@@ -30,6 +30,10 @@ module.exports = function(grunt) {
return name.replace(/#|\/|\!/g,'_') || '';
};
+ var isLastUrl = function(url){
+ return options.urls[options.urls.length - 1] === url;
+ };
+
phantom.on("error.onError", function (msg, trace) {
grunt.log.writeln('error: ' + msg);
phantom.halt();
@@ -41,9 +45,11 @@ module.exports = function(grunt) {
phantom.on("htmlSnapshot.pageReady", function (msg, url) {
+ var plainUrl = url.replace(sitePath, '');
+
var fileName = options.snapshotPath +
options.fileNamePrefix +
- sanitizeFilename(url.replace(sitePath, '')) +
+ sanitizeFilename(plainUrl) +
'.html';
if (options.removeScripts){
@@ -53,6 +59,8 @@ module.exports = function(grunt) {
grunt.file.write(fileName, msg);
grunt.log.writeln(fileName, 'written');
phantom.halt();
+
+ isLastUrl(plainUrl) && done();
});
var done = this.async();
|
fix(htmlSnapshot): make sure task finishs after last url
|
cburgdorf_grunt-html-snapshot
|
train
|
js
|
468e37baf724b98adfc70b0f3d204252ebd072c2
|
diff --git a/packages/ssr/__tests__/integration/article.js b/packages/ssr/__tests__/integration/article.js
index <HASH>..<HASH> 100644
--- a/packages/ssr/__tests__/integration/article.js
+++ b/packages/ssr/__tests__/integration/article.js
@@ -20,7 +20,7 @@ describe("Article", () => {
cy.get("@raImages").each(item => {
const url = new URL(item.attr("src"));
- expect(url.searchParams.get("resize")).to.equal("301");
+ expect(url.searchParams.get("resize")).to.equal("306");
});
}));
});
|
fix: article cypress test (#<I>)
|
newsuk_times-components
|
train
|
js
|
f11c07716beda0ccd412949576da9a766f07aa9c
|
diff --git a/cypress/support/login/authenticateWithCognito.js b/cypress/support/login/authenticateWithCognito.js
index <HASH>..<HASH> 100644
--- a/cypress/support/login/authenticateWithCognito.js
+++ b/cypress/support/login/authenticateWithCognito.js
@@ -39,7 +39,7 @@ export default ({ username, password }) => {
const newPassword = "12345678";
userAttributes.email = username;
- cognitoUser.completeNewPasswordChallenge(newPassword, userAttributes, {
+ cognitoUser.completeNewPasswordChallenge(newPassword, null, {
onSuccess: resolve,
onFailure: function (err) {
console.log(
|
test: do not pass any user attributes on `completeNewPasswordChallenge`
|
Webiny_webiny-js
|
train
|
js
|
411006ef107bdc9aca6c8f72c8315a83377495bd
|
diff --git a/scripts/watch.js b/scripts/watch.js
index <HASH>..<HASH> 100644
--- a/scripts/watch.js
+++ b/scripts/watch.js
@@ -9,9 +9,9 @@ require('colors-cli/toxic');
const watchOptions = {
input: 'src/index.js',
plugins: [
- nodeResolve(), // so Rollup can find `ms`
+ nodeResolve.default(), // so Rollup can find `ms`
commonjs(), // so Rollup can convert `ms` to an ES module
- babel({
+ babel.default({
babelHelpers: 'bundled',
exclude: 'node_modules/**', // 只编译我们的源代码
presets: [[
|
fix: Fixed an error when executing the command "npm run watch" (#<I>)
|
jaywcjlove_hotkeys
|
train
|
js
|
e66b2dae48fa05ec2936470c8f30878c5cd08084
|
diff --git a/bin/whistle.js b/bin/whistle.js
index <HASH>..<HASH> 100755
--- a/bin/whistle.js
+++ b/bin/whistle.js
@@ -105,7 +105,7 @@ program.setConfig({
program
.option('-d, --debug', 'debug mode')
- .option('-A, --ATS', 'generate Root CA for iOS ATS (Node >= 6 is required)')
+ .option('-A, --ATS', 'generate Root CA for iOS ATS (Node >= 4 is required)')
.option('-z, --certDir [directory]', 'custom certificate path', String, undefined)
.option('-l, --localUIHost [hostname]', 'local ui host (' + config.localUIHost + ' by default)', String, undefined)
.option('-n, --username [username]', 'login username', String, undefined)
|
refactor: Generate root ca
|
avwo_whistle
|
train
|
js
|
f4b532288bbf8555ab14792b2b42e54408ba0c31
|
diff --git a/lib/service/yandex.js b/lib/service/yandex.js
index <HASH>..<HASH> 100644
--- a/lib/service/yandex.js
+++ b/lib/service/yandex.js
@@ -1,7 +1,7 @@
var Promise = require('promise');
var _ = require('lodash');
-var hashSimple = '/|/|/|';
+var hashSimple = '@@@';
var translateService;
function init(setting) {
|
fix(yandexService): Fixed issue with parsing yandex values containing '/'
Yandex output sometimes contained '/' character (eg. to mark alternative translations). This
caused issues because this character was also used as text separator (hash). Changing separator
to '@@@' resolves problems.
#<I>
|
KhaledMohamedP_translate-json-object
|
train
|
js
|
745af7eeb1467c664ac71bf8c54fc05ba2e73994
|
diff --git a/service.js b/service.js
index <HASH>..<HASH> 100755
--- a/service.js
+++ b/service.js
@@ -221,7 +221,7 @@ class ServiceConsul extends service.Service {
recurse: true
})
.then(data => {
- si = data.map(d => d.Value);
+ si = data[0].map(d => d.Value);
firstPromise = undefined;
|
fix: extract Value from kv get
|
Kronos-Integration_kronos-service-consul
|
train
|
js
|
8edbf10bd3a555180530e88af0b652893e56c688
|
diff --git a/lib/module.js b/lib/module.js
index <HASH>..<HASH> 100644
--- a/lib/module.js
+++ b/lib/module.js
@@ -61,7 +61,7 @@ function proxyModule(options) {
// https://github.com/chimurai/http-proxy-middleware
const middleware = Proxy.apply(undefined, args)
middleware.prefix = false // Don't add router base
- this.options.serverMiddleware.push(middleware)
+ this.addServerMiddleware(middleware)
})
}
|
refactor: use addServerMiddleware (#<I>)
|
nuxt-community_proxy-module
|
train
|
js
|
47aa48711a905101b83452daa5ded82242c186bd
|
diff --git a/src/container.js b/src/container.js
index <HASH>..<HASH> 100644
--- a/src/container.js
+++ b/src/container.js
@@ -260,7 +260,15 @@ export class Container {
return info.activator.invoke(fn, args);
}catch(e){
- throw AggregateError(`Error instantiating ${fn.name}.`, e, true);
+ var activatingText = info.activator instanceof ClassActivator ? 'instantiating' : 'invoking';
+ var message = `Error ${activatingText} ${fn.name}.`
+ if (i < ii) {
+ message += ` The argument at index ${i} (key:${keys[i]}) could not be satisfied.`;
+ }
+
+ message += ' Check the inner error for details.'
+
+ throw AggregateError(message, e, true);
}
}
|
feat(container): improve helpfulness of activation errors
|
aurelia_dependency-injection
|
train
|
js
|
48cc6d7c8d2096b7b86811d929b8879d4355e73c
|
diff --git a/src/installSync.js b/src/installSync.js
index <HASH>..<HASH> 100644
--- a/src/installSync.js
+++ b/src/installSync.js
@@ -4,6 +4,8 @@ export default install;
// install single component
function install(definition, Component) {
+ definition = handleEsModule(definition);
+
const Ctor = register(definition, Component);
// no dependencies
@@ -25,6 +27,14 @@ function install(definition, Component) {
return Ctor;
}
+function handleEsModule(definition) {
+ if (definition.__esModule) {
+ return definition.default;
+ }
+
+ return definition;
+}
+
function register(definition, Component) {
if (isCtor(definition)) {
return definition;
|
fix: handle dynamical import as es module
|
fengzilong_regular-router
|
train
|
js
|
70672f12ff19591c53fef6876c059c854f9cb816
|
diff --git a/scripts/cherry-pick-patch-commits.js b/scripts/cherry-pick-patch-commits.js
index <HASH>..<HASH> 100644
--- a/scripts/cherry-pick-patch-commits.js
+++ b/scripts/cherry-pick-patch-commits.js
@@ -135,6 +135,11 @@ async function attemptCherryPicks(tag, list) {
if (e.message.includes(CONFLICT_MESSAGE)) {
results.conflicted.push(logLine);
await simpleGit.raw(['cherry-pick', '--abort']);
+ } else if (e.message.includes('is a merge')) {
+ const logCommand = `\`git log --oneline --graph ${logLine.hash}\``;
+ console.warn(`Merge commit found! Run ${logCommand} and take note of commits on each parent,`);
+ console.warn('then compare to your detached history afterwards to ensure no commits of interest were skipped.');
+ results.skipped.push(logLine);
} else {
console.error(`${logLine.hash} unexpected failure!`, e);
}
|
chore: Skip merges in cherry-pick script (#<I>)
|
material-components_material-components-web
|
train
|
js
|
d1fcc14cb15f90fd60ba8a9dd3a247b0df298c47
|
diff --git a/components/input/Input.js b/components/input/Input.js
index <HASH>..<HASH> 100644
--- a/components/input/Input.js
+++ b/components/input/Input.js
@@ -69,13 +69,9 @@ const factory = (FontIcon) => {
}
}
- componentDidUpdate (prevProps) {
- const { multiline, value } = this.props;
-
+ componentDidUpdate () {
// resize the textarea, if nessesary
- if (multiline && (prevProps.value && prevProps.value.length) !== (value && value.length)) {
- this.handleAutoresize();
- }
+ if (this.props.multiline) this.handleAutoresize();
}
componentWillUnmount () {
|
fix(input): always recalculate size
The assumstion that an equal amount of characters consume the same size is wrong as not all fonts are monospaced.
|
react-toolbox_react-toolbox
|
train
|
js
|
dfc91dd17224c2c1dd2ce78672157918a95b5cb0
|
diff --git a/examples/official-storybook/preview.js b/examples/official-storybook/preview.js
index <HASH>..<HASH> 100644
--- a/examples/official-storybook/preview.js
+++ b/examples/official-storybook/preview.js
@@ -234,7 +234,6 @@ export const globalTypes = {
{ value: 'kr', right: '🇰🇷', title: '한국어' },
],
},
- john: {},
},
};
|
fix: type isntead of condition
|
storybooks_storybook
|
train
|
js
|
c1d8b58ed8a5a7a91d9dfa28536a9c0d997b809b
|
diff --git a/scripts/serverless.js b/scripts/serverless.js
index <HASH>..<HASH> 100755
--- a/scripts/serverless.js
+++ b/scripts/serverless.js
@@ -170,6 +170,20 @@ const processSpanPromise = (async () => {
// Load eventual environment variables from .env files
await require('../lib/cli/conditionally-load-dotenv')(options, configuration);
+
+ if (
+ !_.get(configuration.provider, 'variableSyntax') &&
+ variablesMeta.size &&
+ !hasVariableResolutionFailed
+ ) {
+ delete resolverConfiguration.sources.env.isIncomplete;
+ await resolveVariables(resolverConfiguration);
+ hasVariableResolutionFailed = eventuallyReportVariableResolutionErrors(
+ configurationPath,
+ configuration,
+ variablesMeta
+ );
+ }
}
serverless = new Serverless({
|
refactor(Variables): Resolve all env variables with new resolver
|
serverless_serverless
|
train
|
js
|
dc1d0ceebaad1e135cea917ee01430e3709ad119
|
diff --git a/test/cluster/cluster.go b/test/cluster/cluster.go
index <HASH>..<HASH> 100644
--- a/test/cluster/cluster.go
+++ b/test/cluster/cluster.go
@@ -332,6 +332,8 @@ git config user.name "CI"
git merge origin/master
{{ end }}
+docker pull scratch
+
make
if [[ -f test/scripts/debug-info.sh ]]; then
|
test: Pull docker scratch image up front.
This appears to fix races within docker that otherwise make CI rather painful to set up.
|
flynn_flynn
|
train
|
go
|
d252ddf9daa57311b8bc6435a959f2c49f901e3b
|
diff --git a/src/structures/Message.js b/src/structures/Message.js
index <HASH>..<HASH> 100644
--- a/src/structures/Message.js
+++ b/src/structures/Message.js
@@ -63,7 +63,7 @@ class Message extends Base {
/**
* The author of the message
- * @type {User}
+ * @type {?User}
*/
this.author = data.author ? this.client.users.add(data.author, !data.webhook_id) : null;
|
docs: Document Message#author as nullable (#<I>)
Fixes #<I>
|
discordjs_discord.js
|
train
|
js
|
50d6e99efa71c6cd25ea14b1bfbaed9d1f6e876b
|
diff --git a/tests/acceptance/yaml.py b/tests/acceptance/yaml.py
index <HASH>..<HASH> 100644
--- a/tests/acceptance/yaml.py
+++ b/tests/acceptance/yaml.py
@@ -17,7 +17,8 @@
import yaml
from io import StringIO
-from tests.latex_project import LatexProject, TexFile, FlapTestCase, Fragment, Invocation
+from tests.latex_project import LatexProject, TexFile, FlapTestCase, \
+ Fragment, Invocation
class YamlCodec:
@@ -47,7 +48,7 @@ class YamlCodec:
return file.has_extension_from(self.YAML_EXTENSIONS)
def extract_from(self, file):
- content = yaml.load(StringIO(file.content()))
+ content = yaml.safe_load(StringIO(file.content()))
arguments = [self._extract_name_from(content),
self._extract_project_from(content),
self._extract_expected_from(content),
|
fix: YAML warning about unsafe_load
|
fchauvel_flap
|
train
|
py
|
a877aba97ae385fa13d0ac55401453d1bfbe51c5
|
diff --git a/source/application/hooks/configure/index.js b/source/application/hooks/configure/index.js
index <HASH>..<HASH> 100644
--- a/source/application/hooks/configure/index.js
+++ b/source/application/hooks/configure/index.js
@@ -108,16 +108,8 @@ export default {
let user = {};
for (const userPath of existingConfigPaths) {
this.log.debug(`Loading configuration from '${userPath}'`);
-
- try {
- const userPathConfig = load(userPath, this.configuration.filter, application.runtime.env);
- user = merge(user, userPathConfig);
- } catch (err) {
- this.log.error(`Error while reading configuration from ${userPath}.`);
- this.log.error(err);
- err.message = 'Failed loading configuration from ${userPath}';
- throw err;
- }
+ const userPathConfig = load(userPath, this.configuration.filter, application.runtime.env);
+ user = merge(user, userPathConfig);
}
merge(application.configuration, core, user, application.runtime.api, (a, b) => {
|
fix: cease to shadow exceptions in user configuration
|
sinnerschrader_boilerplate-server
|
train
|
js
|
2ef0df4c497fa29fe041757758dc646df6db6ae7
|
diff --git a/src/models/StyledComponent.js b/src/models/StyledComponent.js
index <HASH>..<HASH> 100644
--- a/src/models/StyledComponent.js
+++ b/src/models/StyledComponent.js
@@ -40,12 +40,6 @@ export default (ComponentStyle) => {
}
const element = this.$props.as
return createElement(
- // We check to see if the target element is a Vue / Styled component.
- // If true, we render the component,
- // Otherwise, we know that it's the inner-most / inner styled component.
- // Before we render it, we check to see if a user as declared the polymorphic "as" prop.
- // If "as" is a valid HTML Element, we render the element.
- // If "as" is invalid, we render the default declared tag.
isVueComponent(target) ? target : element || target,
{
class: [this.generatedClassName],
|
docs: removed in code comments
|
styled-components_vue-styled-components
|
train
|
js
|
aa642a40462a2ce4de6270399638a4f78b4108eb
|
diff --git a/plugins/parsers/xpath/protocolbuffer_document.go b/plugins/parsers/xpath/protocolbuffer_document.go
index <HASH>..<HASH> 100644
--- a/plugins/parsers/xpath/protocolbuffer_document.go
+++ b/plugins/parsers/xpath/protocolbuffer_document.go
@@ -1,6 +1,7 @@
package xpath
import (
+ "errors"
"fmt"
"sort"
"strings"
@@ -55,6 +56,13 @@ func (d *protobufDocument) Init() error {
if err != nil {
return fmt.Errorf("creating file descriptor from proto failed: %v", err)
}
+ if _, err := protoregistry.GlobalFiles.FindFileByPath(fileDesc.Path()); !errors.Is(err, protoregistry.NotFound) {
+ if err != nil {
+ return fmt.Errorf("searching for file %q in registry failed: %v", fileDesc.Path(), err)
+ }
+ d.Log.Warnf("Protocol buffer with path %q already registered. Skipping...", fileDesc.Path())
+ continue
+ }
if err := protoregistry.GlobalFiles.RegisterFile(fileDesc); err != nil {
return fmt.Errorf("registering file descriptor %q failed: %v", fileDesc.Package(), err)
}
|
fix: Handle duplicate registration of protocol-buffer files gracefully. (#<I>)
|
influxdata_telegraf
|
train
|
go
|
ca93203bf68518b359f63fa76cc264e44683376f
|
diff --git a/mpd/watcher_test.go b/mpd/watcher_test.go
index <HASH>..<HASH> 100644
--- a/mpd/watcher_test.go
+++ b/mpd/watcher_test.go
@@ -39,15 +39,15 @@ func loadTestFiles(t *testing.T, cli *Client, n int) (ok bool) {
}
func TestWatcher(t *testing.T) {
- w := localWatch(t, "player")
- defer w.Close()
-
c := localDial(t)
defer teardown(c, t)
if !loadTestFiles(t, c, 10) {
return
}
+ w := localWatch(t, "player")
+ defer w.Close()
+
// Give the watcher a chance.
<-time.After(time.Second)
@@ -71,6 +71,8 @@ func TestWatcher(t *testing.T) {
}
w.Subsystems("options", "playlist")
+ <-time.After(time.Second) // Give the watcher a chance.
+
if err := c.Stop(); err != nil { // player change
t.Fatalf("Client.Stop failed: %s\n", err)
}
|
test: workaround Watcher test dead-lock
|
fhs_gompd
|
train
|
go
|
2be326ba34a4f6fab86beb0187c85c38f55979b3
|
diff --git a/api.go b/api.go
index <HASH>..<HASH> 100644
--- a/api.go
+++ b/api.go
@@ -669,20 +669,23 @@ func (c Client) executeMethod(ctx context.Context, method string, metadata reque
case "InvalidRegion":
fallthrough
case "AccessDenied":
- if metadata.bucketName != "" && errResponse.Region != "" {
+ if errResponse.Region == "" {
+ // Region is empty we simply return the error.
+ return res, err
+ }
+ // Region is not empty figure out a way to
+ // handle this appropriately.
+ if metadata.bucketName != "" {
// Gather Cached location only if bucketName is present.
if _, cachedOk := c.bucketLocCache.Get(metadata.bucketName); cachedOk {
c.bucketLocCache.Set(metadata.bucketName, errResponse.Region)
continue // Retry.
}
} else {
- // Most probably for ListBuckets()
+ // This is for ListBuckets() fallback.
if errResponse.Region != metadata.bucketLocation {
- // Retry if the error
- // response has a
- // different region
- // than the request we
- // just made.
+ // Retry if the error response has a different region
+ // than the request we just made.
metadata.bucketLocation = errResponse.Region
continue // Retry
}
|
fix: retry AccessDenied only if Region is present (#<I>)
|
minio_minio-go
|
train
|
go
|
67656d0936b655d746341cc265192fe637d7d1ef
|
diff --git a/src/base/events.js b/src/base/events.js
index <HASH>..<HASH> 100644
--- a/src/base/events.js
+++ b/src/base/events.js
@@ -290,9 +290,9 @@ Events.PLAYER_ERROR = 'error'
* @param {Object} progress Data
* progress object
* @param {Number} [progress.current]
- * current time
+ * current time (in seconds)
* @param {Number} [progress.total]
- * total time
+ * total time (in seconds)
*/
Events.PLAYER_TIMEUPDATE = 'timeupdate'
/**
@@ -334,9 +334,9 @@ Events.PLAYBACK_PROGRESS = 'playback:progress'
* @param {Object} progress Data
* progress object
* @param {Number} [progress.current]
- * current time
+ * current time (in seconds)
* @param {Number} [progress.total]
- * total time
+ * total time (in seconds)
*/
Events.PLAYBACK_TIMEUPDATE = 'playback:timeupdate'
/**
@@ -647,9 +647,9 @@ Events.CONTAINER_SUBTITLE_CHANGED = 'container:subtitle:changed'
* @param {Object} progress Data
* progress object
* @param {Number} [progress.current]
- * current time
+ * current time (in seconds)
* @param {Number} [progress.total]
- * total time
+ * total time (in seconds)
*/
Events.CONTAINER_TIMEUPDATE = 'container:timeupdate'
/**
|
docs(events): add unit (seconds) to timeupdate events
|
clappr_clappr
|
train
|
js
|
1c816474bebe11236478d87d906a17cb6547ec25
|
diff --git a/src/notebook/components/cell/inputs.js b/src/notebook/components/cell/inputs.js
index <HASH>..<HASH> 100644
--- a/src/notebook/components/cell/inputs.js
+++ b/src/notebook/components/cell/inputs.js
@@ -6,17 +6,14 @@ type Props = {
running: boolean,
};
-export default class Inputs extends React.PureComponent {
- props: Props;
+export default function Inputs(props: Props): ?React.Element<any> {
+ const { executionCount, running } = props;
+ const count = !executionCount ? ' ' : executionCount;
+ const input = running ? '*' : count;
- render(): ?React.Element<any> {
- const { executionCount, running } = this.props;
- const count = !executionCount ? ' ' : executionCount;
- const input = running ? '*' : count;
- return (
- <div className="prompt">
- [{input}]
- </div>
- );
- }
+ return (
+ <div className="prompt">
+ [{input}]
+ </div>
+ );
}
|
refactor(Inputs): Rewrite component into stateless function
|
nteract_nteract
|
train
|
js
|
efc4e902fba283f35152e5ecc4765d07f0a5512f
|
diff --git a/trunk/JLanguageTool/src/java/org/languagetool/rules/patterns/XMLRuleHandler.java b/trunk/JLanguageTool/src/java/org/languagetool/rules/patterns/XMLRuleHandler.java
index <HASH>..<HASH> 100644
--- a/trunk/JLanguageTool/src/java/org/languagetool/rules/patterns/XMLRuleHandler.java
+++ b/trunk/JLanguageTool/src/java/org/languagetool/rules/patterns/XMLRuleHandler.java
@@ -281,6 +281,7 @@ public class XMLRuleHandler extends DefaultHandler {
}
protected void startPattern(final Attributes attrs) throws SAXException {
+ tokenCounter = 0;
inPattern = true;
if (attrs.getValue(MARK_FROM) != null) {
startPositionCorrection = Integer.parseInt(attrs.getValue(MARK_FROM));
@@ -458,7 +459,7 @@ public class XMLRuleHandler extends DefaultHandler {
+ pLocator.getLineNumber() + ", column: "
+ pLocator.getColumnNumber() + ".");
}
- if (tokenCounter +add - endPositionCorrection < 0) {
+ if (tokenCounter + add - endPositionCorrection < 0) {
throw new SAXException(
"Attempt to mark a token no. ("+ endPositionCorrection +") that is outside the pattern ("
+ tokenCounter + " elements). End positions should be negative but not larger than the token count!"
|
fix: reset token counter on pattern start
|
languagetool-org_languagetool
|
train
|
java
|
968ec6b5c48faaed2d04827d5bc8754d2f9cbcca
|
diff --git a/src/foremast/pipeline/construct_pipeline_block.py b/src/foremast/pipeline/construct_pipeline_block.py
index <HASH>..<HASH> 100644
--- a/src/foremast/pipeline/construct_pipeline_block.py
+++ b/src/foremast/pipeline/construct_pipeline_block.py
@@ -82,6 +82,10 @@ def construct_pipeline_block(env='',
This handles the common repeatable patterns in a pipeline, such as
judgement, infrastructure, tagger and qe.
+ Note:
+ ASG Health Check type is overridden to `EC2` when deploying to **dev** or
+ using :ref:`eureka_enabled`.
+
Args:
env (str): Deploy environment name, e.g. dev, stage, prod.
generated (gogoutils.Generator): Gogo Application name generator.
@@ -94,6 +98,7 @@ def construct_pipeline_block(env='',
Returns:
dict: Pipeline JSON template rendered with configurations.
+
"""
LOG.info('%s block for [%s].', env, region)
|
docs: ASG Health Check type override note
|
foremast_foremast
|
train
|
py
|
9c86c9624e974203c4af4d077dad6d8f10047378
|
diff --git a/packages/webiny-app-admin/src/app.js b/packages/webiny-app-admin/src/app.js
index <HASH>..<HASH> 100644
--- a/packages/webiny-app-admin/src/app.js
+++ b/packages/webiny-app-admin/src/app.js
@@ -126,7 +126,7 @@ export default () => {
app.router.addRoute({
name: "Users.Create",
- path: "/Users/new",
+ path: "/users/new",
component: () => import("./admin/views/UsersForm").then(m => m.default),
title: "Security - Create User",
group: securityManager
|
fix(security): fix /users/new route.
affects: webiny-app-admin
|
Webiny_webiny-js
|
train
|
js
|
17bcd56eae11900654c0754a315880fc2f8e141b
|
diff --git a/karma.browserstack.js b/karma.browserstack.js
index <HASH>..<HASH> 100644
--- a/karma.browserstack.js
+++ b/karma.browserstack.js
@@ -3,7 +3,9 @@ module.exports = function (config) {
// global config of your BrowserStack account
browserStack: {
username: process.env.BROWSERSTACK_USERNAME,
- accessKey: process.env.BROWSERSTACK_ACCESSKEY
+ accessKey: process.env.BROWSERSTACK_ACCESSKEY,
+ project: 'showdown',
+ build: require('./package.json').version
},
// define browsers
|
test: add project name and build to browserstack
|
showdownjs_showdown
|
train
|
js
|
a5917ed1fdb7819d4e1edd870fd0321e9bd8aeed
|
diff --git a/decode.go b/decode.go
index <HASH>..<HASH> 100644
--- a/decode.go
+++ b/decode.go
@@ -423,6 +423,7 @@ type streamDecoder struct {
reader *Reader
array ArrayParser
err error
+ count int
}
func (d *streamDecoder) Decode(v interface{}) (err error) {
@@ -454,6 +455,7 @@ func (d *streamDecoder) Decode(v interface{}) (err error) {
d.decodeValue(d.reader, x, to)
}
+ d.count++
return
}
@@ -461,7 +463,11 @@ func (d *streamDecoder) Len() int {
if d.array == nil {
return -1
}
- return d.array.Len()
+ n := d.array.Len()
+ if n >= 0 {
+ n -= d.count
+ }
+ return n
}
func (d *streamDecoder) Error() error {
|
fix: make the stream decoder return the remaining number of arguments
|
segmentio_objconv
|
train
|
go
|
5cdef2952278cb7fb39f15c2e8e6377f1c65558f
|
diff --git a/gulpfile.babel.js b/gulpfile.babel.js
index <HASH>..<HASH> 100755
--- a/gulpfile.babel.js
+++ b/gulpfile.babel.js
@@ -619,9 +619,9 @@ gulp.task('e2e-test-webdriverio', ['webdriver-download', 'prepare'], function(do
// WebdriverIO
// ↓ <access>
// standalone Selenium Server (<- launched by this gulpfile)
- // ↓ <access>
+ // ↓ <launch + access>
// SafariDriver
- // ↓ <access>
+ // ↓ <launch + access>
// Safari
// ↓ <access>
// local HTTP server (<- launched by this gulpfile)
|
docs(gulpfile): Fix some comments.
|
OnsenUI_OnsenUI
|
train
|
js
|
54628d6c75dc531ea401c9c8321fe398aa5c4332
|
diff --git a/jobs/registry-change.js b/jobs/registry-change.js
index <HASH>..<HASH> 100644
--- a/jobs/registry-change.js
+++ b/jobs/registry-change.js
@@ -224,7 +224,6 @@ module.exports = async function (
}
}))
]
- if (repoDocsCount >= 4000) log.info(`going to start ${jobs.length} jobs`, { jobs })
log.success(`${jobs.length} registry-change jobs for dependency ${dependency} created`)
return jobs
|
fix(registry-change): remove needless log
|
greenkeeperio_greenkeeper
|
train
|
js
|
d59a7f1c748cd223c725b9748a85041a2e874712
|
diff --git a/meleeuploader/forms.py b/meleeuploader/forms.py
index <HASH>..<HASH> 100755
--- a/meleeuploader/forms.py
+++ b/meleeuploader/forms.py
@@ -164,7 +164,7 @@ class SMurlInput(BaseWidget):
class YouTubeSelector(BaseWidget):
def __init__(self):
- super(YouTubeSelector, self).__init__("YouTubeSelector")
+ super(YouTubeSelector, self).__init__("YouTube Account Selector")
self._youtubes = ControlCombo("Accounts")
self._ok = ControlButton("Load")
self._new = ControlButton("New Account")
diff --git a/meleeuploader/main.py b/meleeuploader/main.py
index <HASH>..<HASH> 100755
--- a/meleeuploader/main.py
+++ b/meleeuploader/main.py
@@ -17,7 +17,7 @@ def main():
):
consts.youtube = yt.get_youtube_service()
elif len(os.listdir(consts.yt_accounts_folder)):
- pyforms_lite.start_app(forms.YouTubeSelector, geometry=(200, 200, 1, 1))
+ pyforms_lite.start_app(forms.YouTubeSelector, geometry=(200, 200, 330, 100))
consts.youtube = yt.get_youtube_service()
except Exception as e:
print(e)
|
refactor: update YoutubeSelector size and title
|
NikhilNarayana_Melee-YouTube-Uploader
|
train
|
py,py
|
e20c572cb7580e94d19776f476748fc8f494c45e
|
diff --git a/benchbuild/environments/domain/declarative.py b/benchbuild/environments/domain/declarative.py
index <HASH>..<HASH> 100644
--- a/benchbuild/environments/domain/declarative.py
+++ b/benchbuild/environments/domain/declarative.py
@@ -168,8 +168,8 @@ DEFAULT_BASES: tp.Dict[str, ContainerImage] = {
.from_("docker.io/alpine:edge") \
.run('apk', 'update') \
.run('apk', 'add', 'python3', 'python3-dev', 'postgresql-dev',
- 'linux-headers', 'musl-dev', 'git', 'gcc', 'sqlite-libs',
- 'libgit2-dev', 'libffi-dev', 'py3-pip')
+ 'linux-headers', 'musl-dev', 'git', 'gcc', 'g++',
+ 'sqlite-libs', 'libgit2-dev', 'libffi-dev', 'py3-pip')
}
|
feat(environments): add g++ to base image
Some python packages require a c++ compiler now.
|
PolyJIT_benchbuild
|
train
|
py
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.