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 |
|---|---|---|---|---|---|
e1cf14849b65a63a62e15ad31d260374ff400b85
|
diff --git a/src/utils/easing.js b/src/utils/easing.js
index <HASH>..<HASH> 100644
--- a/src/utils/easing.js
+++ b/src/utils/easing.js
@@ -30,9 +30,7 @@ export const easeInOutCirc = t => t < 0.5
? 0.5 * (1 - Math.sqrt(1 - 4 * t * t))
: 0.5 * (1 + Math.sqrt(-3 + 8 * t - 4 * t * t))
-const dampener = t => Math.E ** (-6.3 * t)
-const bounce = t => Math.cos(5 * t)
-export const overshoot = t => -1 * dampener(t) * bounce(t) + 1
+export const overshoot = t => -1 * (Math.E ** (-6.3 * t)) * (Math.cos(5 * t)) + 1
/* -- Material Design curves -- */
|
perf: Small improvement to easings
|
quasarframework_quasar
|
train
|
js
|
301baff1657b28eb18e5257ff4ec04c9983a72c5
|
diff --git a/src/foremast/securitygroup/create_securitygroup.py b/src/foremast/securitygroup/create_securitygroup.py
index <HASH>..<HASH> 100644
--- a/src/foremast/securitygroup/create_securitygroup.py
+++ b/src/foremast/securitygroup/create_securitygroup.py
@@ -90,10 +90,6 @@ class SpinnakerSecurityGroup(object):
except (ipaddress.NetmaskValueError, ValueError) as error:
raise SpinnakerSecurityGroupCreationFailed(error)
- if network.prefixlen < 13:
- msg = 'The network range ({0}) specified is too open.'.format(rule['app'])
- raise SpinnakerSecurityGroupCreationFailed(msg)
-
return True
def _process_rules(self, rules):
|
fix: Remove security group network restrictions
Closes #<I>
|
foremast_foremast
|
train
|
py
|
91f0c75d3bd950390783fe0ce390da64cbe9b0b4
|
diff --git a/src/act-compat.js b/src/act-compat.js
index <HASH>..<HASH> 100644
--- a/src/act-compat.js
+++ b/src/act-compat.js
@@ -82,7 +82,7 @@ function asyncAct(cb) {
if (!youHaveBeenWarned) {
// if act is supported and async act isn't and they're trying to use async
// act, then they need to upgrade from 16.8 to 16.9.
- // This is a seemless upgrade, so we'll add a warning
+ // This is a seamless upgrade, so we'll add a warning
console.error(
`It looks like you're using a version of react-dom that supports the "act" function, but not an awaitable version of "act" which you will need. Please upgrade to at least react-dom@16.9.0 to remove this warning.`,
)
|
docs: Fix typo, seemless -> seamless (#<I>)
There is a small typo in src/act-compat.js.
Should read `seamless` rather than `seemless`.
|
testing-library_react-testing-library
|
train
|
js
|
a6c619bcbf0cca1d73e6a4e0eaba1e28174a5efa
|
diff --git a/src/Ganesha/GuzzleMiddleware.php b/src/Ganesha/GuzzleMiddleware.php
index <HASH>..<HASH> 100644
--- a/src/Ganesha/GuzzleMiddleware.php
+++ b/src/Ganesha/GuzzleMiddleware.php
@@ -14,8 +14,8 @@ class GuzzleMiddleware
*/
private $ganesha;
- /*
- * @var ResourceNameExtractorInterface
+ /**
+ * @var ServiceNameExtractorInterface
*/
private $serviceNameExtractor;
|
chore: Fix phpdoc in GuzzleMiddleware
|
ackintosh_ganesha
|
train
|
php
|
f4a0662162cd9852f2d65cbbea7bdd046767fa1e
|
diff --git a/src/components/table/table-pagination.js b/src/components/table/table-pagination.js
index <HASH>..<HASH> 100644
--- a/src/components/table/table-pagination.js
+++ b/src/components/table/table-pagination.js
@@ -14,7 +14,7 @@ function fixPagination (p) {
p.page = 1
}
if (p.rowsPerPage !== void 0 && p.rowsPerPage < 1) {
- p.rowsPerPage = 5
+ p.rowsPerPage = 0
}
return p
}
|
fix: Possible loop on datatable with server-side interaction #<I>
|
quasarframework_quasar
|
train
|
js
|
0a36a85a757f7a043d26e7a7e645032f2add2606
|
diff --git a/sdks/python/sdk_version.py b/sdks/python/sdk_version.py
index <HASH>..<HASH> 100755
--- a/sdks/python/sdk_version.py
+++ b/sdks/python/sdk_version.py
@@ -26,7 +26,7 @@ try:
print(UNTAGGED_VERSION) # this goes to sys.stdout, so it's captured by the Makefile
exit(0)
- rc_version_suffix = re.findall("-rc\d+", git_tag)
+ rc_version_suffix = re.findall("-.*", git_tag)
if len(rc_version_suffix) > 0:
git_tag = git_tag.replace(rc_version_suffix[0], '')
version_digits = [int(i) for i in git_tag.replace(VERSION_PREFIX, '').split('.')]
|
chore: Fix Python version on `-*dev` branches. (#<I>)
|
argoproj_argo
|
train
|
py
|
ca3b5989bd0e44fc82d49a3b12548078740a5ddc
|
diff --git a/configValidation.js b/configValidation.js
index <HASH>..<HASH> 100644
--- a/configValidation.js
+++ b/configValidation.js
@@ -1,5 +1,3 @@
-'use strict';
-
const Joi = require('@hapi/joi');
// Schema Configuration
diff --git a/settings.js b/settings.js
index <HASH>..<HASH> 100644
--- a/settings.js
+++ b/settings.js
@@ -1,5 +1,3 @@
-'use strict';
-
var fs = require('fs');
var path = require('path');
var merge = require('lodash.merge');
diff --git a/test/configValidation.js b/test/configValidation.js
index <HASH>..<HASH> 100644
--- a/test/configValidation.js
+++ b/test/configValidation.js
@@ -1,5 +1,3 @@
-'use strict';
-
const tape = require('tape');
const configValidation = require('../configValidation');
diff --git a/test/settings.js b/test/settings.js
index <HASH>..<HASH> 100644
--- a/test/settings.js
+++ b/test/settings.js
@@ -1,5 +1,3 @@
-'use strict';
-
var path = require('path'),
settings = require('../settings'),
fs = require('fs');
|
fix(node): Remove usage of `use strict`
|
pelias_schema
|
train
|
js,js,js,js
|
f1c214dc16a60393d7c828038b43944296c39df7
|
diff --git a/common/oatbox/cache/SetupFileCache.php b/common/oatbox/cache/SetupFileCache.php
index <HASH>..<HASH> 100644
--- a/common/oatbox/cache/SetupFileCache.php
+++ b/common/oatbox/cache/SetupFileCache.php
@@ -30,7 +30,11 @@ class SetupFileCache extends ConfigurableService
public function createDirectory($cachePath): bool
{
- return mkdir($cachePath, 0700, true) || is_dir($cachePath);
+ if (is_dir($cachePath) && is_writable($cachePath)) {
+ return true;
+ }
+
+ return @mkdir($cachePath, 0700, true);
}
public function createPersistence(): void
|
fix: make sure directory writable
|
oat-sa_generis
|
train
|
php
|
342093d25358231edc5c4cff2adf34ab55ef7340
|
diff --git a/oidc/requireVerifiedEmail.js b/oidc/requireVerifiedEmail.js
index <HASH>..<HASH> 100644
--- a/oidc/requireVerifiedEmail.js
+++ b/oidc/requireVerifiedEmail.js
@@ -34,7 +34,7 @@ module.exports = function (options) {
if (err) { return next(err) }
var isAuthority = roles && roles.some(function (role) {
- return role.name === 'authority'
+ return role && role.name && role.name === 'authority'
})
if (req.user.emailVerified || isAuthority) {
|
fix(oidc): ensure role present and has name attr
|
anvilresearch_connect
|
train
|
js
|
3518a4d4b80e2d7063a2a44e6d7ac95c4d308a51
|
diff --git a/src/components/tabs/tabs.js b/src/components/tabs/tabs.js
index <HASH>..<HASH> 100644
--- a/src/components/tabs/tabs.js
+++ b/src/components/tabs/tabs.js
@@ -21,7 +21,7 @@ angular.module('material.components.tabs', [
'$compile',
'$timeout',
'$materialEffects',
- '$animate',
+ '$window',
TabsDirective
])
.directive('materialTab', [
@@ -103,7 +103,7 @@ angular.module('material.components.tabs', [
* </hljs>
*
*/
-function TabsDirective($compile, $timeout, $materialEffects) {
+function TabsDirective($compile, $timeout, $materialEffects, $window) {
return {
restrict: 'E',
@@ -201,7 +201,7 @@ function TabsDirective($compile, $timeout, $materialEffects) {
// On resize or tabChange
tabsController.onTabChange = updateInkNextFrame;
- angular.element(window).on('resize', function() {
+ angular.element($window).on('resize', function() {
updateInkBar(true);
});
|
refactor(tabs): use $window instead of window
|
angular_material
|
train
|
js
|
b2eca5c00c3bbca5834a6d308c8e038882070c91
|
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
@@ -487,7 +487,7 @@ function getRulesFromPlugins(type, req, res, callback) {
};
if (data) {
if (Date.now() - data.now <= data.maxAge) {
- return handleRules(null, data.body, data.values, data.raw);
+ return handleRules(false);
}
opts.headers[ETAG_HEADER] = data.etag;
}
|
feat: Supports cache the rules of plugin
|
avwo_whistle
|
train
|
js
|
f7471c3f2931f3fa0b9a6dfddfe425203d6b33a5
|
diff --git a/Middleware/AuthenticateWithBearerAuth.php b/Middleware/AuthenticateWithBearerAuth.php
index <HASH>..<HASH> 100644
--- a/Middleware/AuthenticateWithBearerAuth.php
+++ b/Middleware/AuthenticateWithBearerAuth.php
@@ -113,7 +113,7 @@ class AuthenticateWithBearerAuth
*/
protected function response($message, $code)
{
- return Rest::response()->json([
+ Rest::response()->json([
'status' => $message,
'code' => $code
], $code);
|
feat: die after response
die and prevent request from continuing
|
modulusphp_http
|
train
|
php
|
56309c6cfcefca1bc43a9fb72b22554ce644d32e
|
diff --git a/packages/node_modules/samples/browser-plugin-meetings/app.js b/packages/node_modules/samples/browser-plugin-meetings/app.js
index <HASH>..<HASH> 100644
--- a/packages/node_modules/samples/browser-plugin-meetings/app.js
+++ b/packages/node_modules/samples/browser-plugin-meetings/app.js
@@ -10,7 +10,7 @@
// Declare some globals that we'll need throughout
let webex, meeting, meetings, newMeeting, callTime;
-const mediaSettings = [];
+const mediaSettings = {};
const audioInputSelect = document.querySelector('select#audioSource');
const audioOutputSelect = document.querySelector('select#audioOutput');
const videoSelect = document.querySelector('select#videoSource');
|
fix(samples): update mediaSettings global to object
|
webex_spark-js-sdk
|
train
|
js
|
dd3e926edc0482315507e43288294b8b1c60b9cf
|
diff --git a/packages/webpack-preset-accurapp/index.js b/packages/webpack-preset-accurapp/index.js
index <HASH>..<HASH> 100644
--- a/packages/webpack-preset-accurapp/index.js
+++ b/packages/webpack-preset-accurapp/index.js
@@ -347,6 +347,8 @@ function buildWebpackConfig(config = []) {
// Uglification in staging is alright because we have sourcemaps
// that show the original code
sourceMap: process.env.GENERATE_SOURCEMAP === 'true',
+ // Don't generate the license.txt file
+ extractComments: false,
}),
]),
|
fix: π¨ Don't generate license.txt file
|
accurat_accurapp
|
train
|
js
|
cc93fa9cdc73befdcc620f6b7c6a38b40f6d02a5
|
diff --git a/go/flags/endtoend/flags_test.go b/go/flags/endtoend/flags_test.go
index <HASH>..<HASH> 100644
--- a/go/flags/endtoend/flags_test.go
+++ b/go/flags/endtoend/flags_test.go
@@ -1416,7 +1416,7 @@ max_rate_approach_threshold: 0.9
--vreplication_store_compressed_gtid
Store compressed gtids in the pos column of _vt.vreplication
--vreplication_tablet_type string
- comma separated list of tablet types used as a source (default PRIMARY,REPLICA)
+ comma separated list of tablet types used as a source (default in_order:REPLICA,PRIMARY)
--vstream_dynamic_packet_size
Enable dynamic packet sizing for VReplication. This will adjust the packet size during replication to improve performance. (default true)
--vstream_packet_size int
|
test: fix test output in flags_test
|
vitessio_vitess
|
train
|
go
|
09c362575003a09a0c5df0fcdcad7de196d3e529
|
diff --git a/integration/combination/test_http_api_with_cors.py b/integration/combination/test_http_api_with_cors.py
index <HASH>..<HASH> 100644
--- a/integration/combination/test_http_api_with_cors.py
+++ b/integration/combination/test_http_api_with_cors.py
@@ -34,7 +34,7 @@ class TestHttpApiWithCors(BaseTest):
# Every HttpApi should have a default tag created by SAM (httpapi:createdby: SAM)
tags = api_result["Tags"]
- self.assertEqual(len(tags), 1)
+ self.assertGreaterEqual(len(tags), 1)
self.assertEqual(tags["httpapi:createdBy"], "SAM")
# verifying if TimeoutInMillis is set properly in the integration
|
fix: Update tag count check for apigw v2 resources (#<I>)
|
awslabs_serverless-application-model
|
train
|
py
|
3ebd5ca4865bd67e93f93ef59687a3ac25564afd
|
diff --git a/tests/lib/rules/no-replace-test-comments.js b/tests/lib/rules/no-replace-test-comments.js
index <HASH>..<HASH> 100644
--- a/tests/lib/rules/no-replace-test-comments.js
+++ b/tests/lib/rules/no-replace-test-comments.js
@@ -36,5 +36,16 @@ ruleTester.run('no-replace-test-comments', rule, {
},
],
},
+ {
+ filename: 'test/some-app-file-test.js',
+ code: '// TODO: Replace this with your real tests',
+ output: null,
+ errors: [
+ {
+ message: ERROR_MESSAGE,
+ type: 'Line',
+ },
+ ],
+ },
],
});
|
test: add test for `no-replace-test-comments` rule with TODO-prefixed comment
|
ember-cli_eslint-plugin-ember
|
train
|
js
|
bd25ff59133ba31713647d3e6a5ef66abc4d54fb
|
diff --git a/src/util/Util.js b/src/util/Util.js
index <HASH>..<HASH> 100644
--- a/src/util/Util.js
+++ b/src/util/Util.js
@@ -75,9 +75,9 @@ class Util extends null {
while (char.length > 0 && splitText.some(elem => elem.length > maxLength)) {
const currentChar = char.shift();
if (currentChar instanceof RegExp) {
- splitText = splitText.map(chunk => chunk.match(currentChar));
+ splitText = splitText.flatMap(chunk => chunk.match(currentChar));
} else {
- splitText = splitText.map(chunk => chunk.split(currentChar));
+ splitText = splitText.flatMap(chunk => chunk.split(currentChar));
}
}
} else {
|
fix(Util): splitMessage not working with array (#<I>)
|
discordjs_discord.js
|
train
|
js
|
346ef5d9b6f2a0e56a5e268d860fcf0b714ca82a
|
diff --git a/src/js/handlers.js b/src/js/handlers.js
index <HASH>..<HASH> 100644
--- a/src/js/handlers.js
+++ b/src/js/handlers.js
@@ -10,8 +10,6 @@ import {
EVENT_CROP_END,
EVENT_CROP_MOVE,
EVENT_CROP_START,
- MIN_CONTAINER_WIDTH,
- MIN_CONTAINER_HEIGHT,
REGEXP_ACTIONS,
} from './constants';
import {
@@ -28,15 +26,11 @@ import {
export default {
resize() {
- const { options, container, containerData } = this;
- const minContainerWidth = Number(options.minContainerWidth) || MIN_CONTAINER_WIDTH;
- const minContainerHeight = Number(options.minContainerHeight) || MIN_CONTAINER_HEIGHT;
-
- if (this.disabled || containerData.width <= minContainerWidth
- || containerData.height <= minContainerHeight) {
+ if (this.disabled) {
return;
}
+ const { options, container, containerData } = this;
const ratio = container.offsetWidth / containerData.width;
// Resize when width changed or height changed
|
fix: improve container resizing
Fixed #<I>
|
fengyuanchen_cropperjs
|
train
|
js
|
7c3ac91c349e340f5914912898f9c97e50bdbae2
|
diff --git a/engine/src/main/java/org/camunda/bpm/engine/impl/jobexecutor/historycleanup/HistoryCleanupRemovalTime.java b/engine/src/main/java/org/camunda/bpm/engine/impl/jobexecutor/historycleanup/HistoryCleanupRemovalTime.java
index <HASH>..<HASH> 100644
--- a/engine/src/main/java/org/camunda/bpm/engine/impl/jobexecutor/historycleanup/HistoryCleanupRemovalTime.java
+++ b/engine/src/main/java/org/camunda/bpm/engine/impl/jobexecutor/historycleanup/HistoryCleanupRemovalTime.java
@@ -75,7 +75,7 @@ public class HistoryCleanupRemovalTime extends HistoryCleanupHandler {
}
protected boolean isDmnEnabled() {
- return Context.getCommandContext().getProcessEngineConfiguration()
+ return Context.getProcessEngineConfiguration()
.isDmnEnabled();
}
@@ -109,7 +109,7 @@ public class HistoryCleanupRemovalTime extends HistoryCleanupHandler {
}
public int getBatchSizePerDeleteOperation() {
- return Context.getCommandContext().getProcessEngineConfiguration()
+ return Context.getProcessEngineConfiguration()
.getHistoryCleanupBatchSize();
}
|
fix(engine): avoid accessing inconsistent command context
related to CAM-<I>
|
camunda_camunda-bpm-platform
|
train
|
java
|
027e718fc1f6931156ff4e434b649df6ffe1c2b6
|
diff --git a/oidc/token.js b/oidc/token.js
index <HASH>..<HASH> 100644
--- a/oidc/token.js
+++ b/oidc/token.js
@@ -87,7 +87,7 @@ function token (req, res, next) {
iss: settings.issuer,
sub: req.client._id,
aud: req.client._id,
- exp: req.client.default_max_age,
+ exp: nowSeconds(req.client.default_max_age),
scope: req.scope
}, privateKey, function (err, token) {
if (err) { return next(err) }
|
fix(token): correct client_credentials grant token expiration
|
anvilresearch_connect
|
train
|
js
|
0e84cfe647c9603d011f518ad552f0f2779153d7
|
diff --git a/engine/src/test/java/org/camunda/bpm/engine/test/jobexecutor/JobExecutorCleanupTest.java b/engine/src/test/java/org/camunda/bpm/engine/test/jobexecutor/JobExecutorCleanupTest.java
index <HASH>..<HASH> 100644
--- a/engine/src/test/java/org/camunda/bpm/engine/test/jobexecutor/JobExecutorCleanupTest.java
+++ b/engine/src/test/java/org/camunda/bpm/engine/test/jobexecutor/JobExecutorCleanupTest.java
@@ -82,7 +82,7 @@ public class JobExecutorCleanupTest {
// when: schedule & execute cleanup job
historyService.cleanUpHistoryAsync(true);
- testRule.waitForJobExecutorToProcessAllJobs(5_000L);
+ testRule.waitForJobExecutorToProcessAllJobs(10_000L);
// then
assertThat(historyService.createHistoricProcessInstanceQuery().count()).isZero();
|
chore(test): increase maxMillisToWait to ensure job execution
Related to CAM-<I>
|
camunda_camunda-bpm-platform
|
train
|
java
|
8c11806fb81dd904d0695f1a18601a206645ac81
|
diff --git a/src/internalHelpers/_isValidColor.js b/src/internalHelpers/_isValidColor.js
index <HASH>..<HASH> 100644
--- a/src/internalHelpers/_isValidColor.js
+++ b/src/internalHelpers/_isValidColor.js
@@ -2,3 +2,4 @@
export const isRgb = (color: string) : bool => /rgb\((\d{1,3}), ?(\d{1,3}), ?(\d{1,3})\)/.test(color)
export const isRgba = (color: string) : bool => /rgba\((\d{1,3}), ?(\d{1,3}), ?(\d{1,3}), ?(\d{1})?.?(\d{1,2})\)/.test(color)
export const isHsl = (color: string) : bool => /hsl\((\d{1,3}), ?(\d{1,3})%, ?(\d{1,3})%\)/.test(color)
+export const isHsla = (color: string) : bool => /hsla\((\d{1,3}), ?(\d{1,3})%, ?(\d{1,3})%, ?(\d{1})?.?(\d{1,2})\)/.test(color)
|
chore(transparentize): Added isHsla regex
|
styled-components_polished
|
train
|
js
|
8568456fa54af99b6ba9c9a35be00962d4f5cdfb
|
diff --git a/packages/eslint-config-udemy-website/index.js b/packages/eslint-config-udemy-website/index.js
index <HASH>..<HASH> 100644
--- a/packages/eslint-config-udemy-website/index.js
+++ b/packages/eslint-config-udemy-website/index.js
@@ -30,6 +30,11 @@ module.exports = {
exceptions: ['utils/currency-formatter(?:\\.spec)?\\.js$'],
},
{
+ // For code consistency
+ source: '^enzyme/build/index(?:\\.js)?$',
+ message: 'Please import from enzyme, not from enzyme/build/index',
+ },
+ {
// For improved JS bundling
source: '^lodash(?:\\.js)?$',
message: 'Please import from e.g. lodash/foo, not from lodash directly',
|
feat: import blacklist enzyme/build/index
|
udemy_js-tooling
|
train
|
js
|
78ee1372560010088bb83473525cf1b59b1e2f1d
|
diff --git a/src/Http/Controllers/Configuration/SeatController.php b/src/Http/Controllers/Configuration/SeatController.php
index <HASH>..<HASH> 100644
--- a/src/Http/Controllers/Configuration/SeatController.php
+++ b/src/Http/Controllers/Configuration/SeatController.php
@@ -249,7 +249,7 @@ class SeatController extends Controller
$docs_widget = [
'id' => '0',
'name' => 'SeAT',
- 'url' => 'https://seat.eveseat.net',
+ 'url' => 'https://docs.eveseat.net',
'updated_at' => carbon('now'),
];
|
fix: address a typo in documentation url
|
eveseat_web
|
train
|
php
|
6478cea94ae2d6add2f3dfc8a5e3f72a9984cc0e
|
diff --git a/lib/assertion-visitor.js b/lib/assertion-visitor.js
index <HASH>..<HASH> 100644
--- a/lib/assertion-visitor.js
+++ b/lib/assertion-visitor.js
@@ -40,16 +40,16 @@ AssertionVisitor.prototype.enter = function (currentNode, parentNode) {
AssertionVisitor.prototype.enterArgument = function (currentNode, parentNode, path) {
var argMatchResult = this.matcher.matchArgument(currentNode, parentNode);
- if (argMatchResult) {
- if (argMatchResult.name === 'message' && argMatchResult.kind === 'optional') {
- // skip optional message argument
- return undefined;
- }
- this.verifyNotInstrumented(currentNode);
- // entering target argument
- this.currentArgumentPath = [].concat(path);
+ if (!argMatchResult) {
+ return undefined;
+ }
+ if (argMatchResult.name === 'message' && argMatchResult.kind === 'optional') {
+ // skip optional message argument
return undefined;
}
+ this.verifyNotInstrumented(currentNode);
+ // entering target argument
+ this.currentArgumentPath = [].concat(path);
return undefined;
};
|
refactor(espower): flatten conditionals
|
power-assert-js_espower
|
train
|
js
|
9e32b2c1d585f7106d7b52698acb4476be70128b
|
diff --git a/fastly/vcl.go b/fastly/vcl.go
index <HASH>..<HASH> 100644
--- a/fastly/vcl.go
+++ b/fastly/vcl.go
@@ -4,6 +4,7 @@ import (
"fmt"
"net/url"
"sort"
+ "time"
)
// VCL represents a response about VCL from the Fastly API.
@@ -11,9 +12,12 @@ type VCL struct {
ServiceID string `mapstructure:"service_id"`
Version int `mapstructure:"version"`
- Name string `mapstructure:"name"`
- Main bool `mapstructure:"main"`
- Content string `mapstructure:"content"`
+ Name string `mapstructure:"name"`
+ Main bool `mapstructure:"main"`
+ Content string `mapstructure:"content"`
+ CreatedAt *time.Time `mapstructure:"created_at"`
+ UpdatedAt *time.Time `mapstructure:"updated_at"`
+ DeletedAt *time.Time `mapstructure:"deleted_at"`
}
// vclsByName is a sortable list of VCLs.
|
feat(vcl): add timestamp fields to response object
Add support for created_at, updated_at, and deleted_at fields.
|
sethvargo_go-fastly
|
train
|
go
|
36ad21e4c81a82890abfe16666e40f6e8d3effd3
|
diff --git a/Model/Api/ProductsApi.php b/Model/Api/ProductsApi.php
index <HASH>..<HASH> 100644
--- a/Model/Api/ProductsApi.php
+++ b/Model/Api/ProductsApi.php
@@ -448,7 +448,7 @@ class ProductsApi implements ProductsApiInterface
}
// @codingStandardsIgnoreLine
- rotected function setWhere()
+ protected function setWhere()
{
$this->productCollection
->addFieldToFilter($this->linkField, ['from' => $this->minId])
diff --git a/dev/test/system-info/get.spec.js b/dev/test/system-info/get.spec.js
index <HASH>..<HASH> 100644
--- a/dev/test/system-info/get.spec.js
+++ b/dev/test/system-info/get.spec.js
@@ -2,15 +2,12 @@
describe('SystemInfo API', function() {
it('should return system information', async function() {
- const expectedInfo = {
- magento_version: '2.2.6',
- php_version: '7.1.17',
- module_version: '1.1.2',
- magento_edition: 'Community'
- };
const info = await this.magentoApi.execute('systeminfo', 'get');
- expect(info).to.eql(expectedInfo);
+ expect(info.magento_version).to.not.be.undefined;
+ expect(info.php_version).to.not.be.undefined;
+ expect(info.module_version).to.not.be.undefined;
+ expect(info.magento_edition).to.not.be.undefined;
});
});
|
test(system-info-api): fix system API test to not expect exact data MAGENTO-OPS
|
emartech_magento2-extension
|
train
|
php,js
|
f6837c1cee9098a950b652b8f728aea9ed43e003
|
diff --git a/src/flamegraph.js b/src/flamegraph.js
index <HASH>..<HASH> 100644
--- a/src/flamegraph.js
+++ b/src/flamegraph.js
@@ -454,7 +454,7 @@ export default function () {
function injectIds (node, parentId, rank, nSibs, depth) {
function idgen (seed, rank, nSibs) {
- function toAlpha (rank) {
+ function toChar (rank) {
if (rank < 10 /* numeric */) {
return rank
} else if (rank < 10 + 25 /* + alphabet - 1 ('z') */) {
@@ -483,9 +483,9 @@ export default function () {
*/
if (nSibs > 60) {
/* We have to generate multiple bytes rank */
- return multiByte('Z' + toAlpha(rank % 60), rank / 60, nSibs / 60)
+ return multiByte('Z' + w + toChar(rank % 60), rank / 60, nSibs / 60)
} else {
- return w + toAlpha(rank)
+ return w + toChar(rank)
}
}
|
refactor: fix idgen long id generation
|
spiermar_d3-flame-graph
|
train
|
js
|
95d8c108335f27e12890712108a13e3eb3c92f85
|
diff --git a/etc/webpack.dev.js b/etc/webpack.dev.js
index <HASH>..<HASH> 100755
--- a/etc/webpack.dev.js
+++ b/etc/webpack.dev.js
@@ -57,7 +57,7 @@ module.exports = webpackMerge(commonConfig, {
* See: http://webpack.github.io/docs/configuration.html#devtool
* See: https://github.com/webpack/docs/wiki/build-performance#sourcemaps
*/
- devtool: '#source-map',
+ devtool: '#eval-source-map',
/**
* Options affecting the output of the compilation.
|
fix(webpack): Fix sourcemapping issues
see #<I> and #<I>
|
holisticon_angular-common
|
train
|
js
|
b4e4fdac71bedbc99a19a37b265ea1d8b17dd1c9
|
diff --git a/scripts/serverless.js b/scripts/serverless.js
index <HASH>..<HASH> 100755
--- a/scripts/serverless.js
+++ b/scripts/serverless.js
@@ -41,7 +41,7 @@ let hasTelemetryBeenReported = false;
// to propery handle e.g. `SIGINT` interrupt
const keepAliveTimer = setTimeout(() => {}, 60 * 60 * 1000);
-const standaloneCommands = ['plugin install'];
+const standaloneCommands = new Set(['plugin install']);
process.once('uncaughtException', (error) => {
clearTimeout(keepAliveTimer);
@@ -507,7 +507,7 @@ const processSpanPromise = (async () => {
const configurationFilename = configuration && configurationPath.slice(serviceDir.length + 1);
- const isStandaloneCommand = standaloneCommands.includes(command);
+ const isStandaloneCommand = standaloneCommands.has(command);
if (isInteractiveSetup || isStandaloneCommand) {
if (isInteractiveSetup) {
|
refactor: Use set instead of array
|
serverless_serverless
|
train
|
js
|
f9b85291b311b79641fced06921d795bd8bd39f6
|
diff --git a/src/Linfo/OS/Darwin.php b/src/Linfo/OS/Darwin.php
index <HASH>..<HASH> 100644
--- a/src/Linfo/OS/Darwin.php
+++ b/src/Linfo/OS/Darwin.php
@@ -613,7 +613,7 @@ class Darwin extends BSDcommon
$loads = $this->sysctl['vm.loadavg'];
- if (preg_match('/([\d\.]+) ([\d\.]+) ([\d\.]+)/', $loads, $m)) {
+ if (preg_match('/([\d\.\,]+) ([\d\.\,]+) ([\d\.\,]+)/', $loads, $m)) {
return array_combine(array('now', '5min', '15min'), array_slice($m, 1, 3));
} else {
return array();
|
fix: fixing darwin load regex (#<I>)
|
jrgp_linfo
|
train
|
php
|
8676973e5caf4af858dec98b1a66d1ce57b57e5e
|
diff --git a/src/lib/tutorial.js b/src/lib/tutorial.js
index <HASH>..<HASH> 100644
--- a/src/lib/tutorial.js
+++ b/src/lib/tutorial.js
@@ -8,7 +8,7 @@ export function isTutorial () {
export function display (t) {
const isSmall = document.querySelectorAll('.coz-nav')[0].offsetParent === null
const isLandscape = window.innerWidth > window.innerHeight
- const cozyBarMenuClass = isSmall ? '.coz-bar-burger' : '.coz-nav-section'
+ const cozyBarMenuClass = isSmall ? '.coz-bar-burger' : '[data-icon=icon-cube]'
const cozyBarMenuButton = document.querySelectorAll(cozyBarMenuClass)[0]
const tooltipClass = 'tooltip' + (isSmall ? 'Small' : '') + (isSmall && isLandscape ? 'Right' : 'Bottom')
introJs()
|
fix: Open cozy bar :boom:
|
cozy_cozy-home
|
train
|
js
|
334ca9c6d4ae32f8bbd76efc5981dc7b37be2ce6
|
diff --git a/lib/auth_processes/mongodb.js b/lib/auth_processes/mongodb.js
index <HASH>..<HASH> 100644
--- a/lib/auth_processes/mongodb.js
+++ b/lib/auth_processes/mongodb.js
@@ -53,7 +53,12 @@ class MongoAuthProcess {
performGssapiCanonicalizeHostName(this.canonicalizeHostName, this.host, err => {
if (err) return callback(err);
- kerberos.initializeClient(self.service, { user: username, password }, (err, client) => {
+ const initOptions = {};
+ if (password != null) {
+ Object.assign(initOptions, { user: username, password });
+ }
+
+ kerberos.initializeClient(self.service, initOptions, (err, client) => {
if (err) return callback(err, null);
self.client = client;
|
fix(auth-process): only send username/password if provided
NODE-<I>
|
mongodb-js_kerberos
|
train
|
js
|
fb21ba5abec36584368ffe2733e22ed56e104f99
|
diff --git a/spec/audited/adapters/mongo_mapper/auditor_spec.rb b/spec/audited/adapters/mongo_mapper/auditor_spec.rb
index <HASH>..<HASH> 100644
--- a/spec/audited/adapters/mongo_mapper/auditor_spec.rb
+++ b/spec/audited/adapters/mongo_mapper/auditor_spec.rb
@@ -211,6 +211,18 @@ describe Audited::Auditor, :adapter => :mongo_mapper do
end
end
+ describe "on destroy with unsaved object" do
+ let(:user) { Models::MongoMapper::User.new }
+
+ it "should not audit on 'destroy'" do
+ expect {
+ user.destroy
+ }.to_not raise_error
+
+ expect( user.audits ).to be_empty
+ end
+ end
+
describe "associated with" do
let(:owner) { Models::MongoMapper::Owner.create(:name => 'Models::MongoMapper::Owner') }
let(:owned_company) { Models::MongoMapper::OwnedCompany.create!(:name => 'The auditors', :owner => owner) }
|
feat: added mongomapper spec for auditing unsaved records that get destroyed
|
collectiveidea_audited
|
train
|
rb
|
a1e1991591bbdef9207aee16f858848985aab8aa
|
diff --git a/src/Utility/HttpRequest.php b/src/Utility/HttpRequest.php
index <HASH>..<HASH> 100644
--- a/src/Utility/HttpRequest.php
+++ b/src/Utility/HttpRequest.php
@@ -371,10 +371,11 @@ final class HttpRequest
* Use an exponential back-off with the formula:
* max(MIN_REQUEST_RETRY_DELAY, min(MAX_REQUEST_RETRY_DELAY, (100ms * (2 ** attempt - 1)) + random_between(0, MAX_REQUEST_RETRY_JITTER)))
*
- * β Each attempt increases base delay by (100ms * (2 ** attempt - 1))
- * β Randomizes jitter, adding up to MAX_REQUEST_RETRY_JITTER (250ms)
- * β Never less than MIN_REQUEST_RETRY_DELAY (100ms)
- * β Never more than MAX_REQUEST_RETRY_DELAY (500ms)
+ * Each retry attempt:
+ * β Increases base delay by (100ms * (2 ** attempt - 1))
+ * β Introduces jitter to the base delay; increases delay between 1ms to MAX_REQUEST_RETRY_JITTER (100ms)
+ * β Is never less than MIN_REQUEST_RETRY_DELAY (100ms)
+ * β Is never more than MAX_REQUEST_RETRY_DELAY (1s)
*/
$wait = intval(100 * pow(2, $attempt - 1)); // Exponential delay with each subsequent request attempt.
$wait = mt_rand($wait + 1, $wait + self::MAX_REQUEST_RETRY_JITTER); // Add jitter to the delay window.
|
docs: Add clarity about the exponential back-off
|
auth0_auth0-PHP
|
train
|
php
|
528ef18c2f720c58f734302547f83d674ba3324b
|
diff --git a/cmd/dex/serve.go b/cmd/dex/serve.go
index <HASH>..<HASH> 100644
--- a/cmd/dex/serve.go
+++ b/cmd/dex/serve.go
@@ -9,6 +9,7 @@ import (
"net"
"net/http"
"os"
+ "runtime"
"strings"
"syscall"
"time"
@@ -91,6 +92,15 @@ func runServe(options serveOptions) error {
if err != nil {
return fmt.Errorf("invalid config: %v", err)
}
+
+ logger.Infof(
+ "Dex Version: %s, Go Version: %s, Go OS/ARCH: %s %s",
+ version,
+ runtime.Version(),
+ runtime.GOOS,
+ runtime.GOARCH,
+ )
+
if c.Logger.Level != "" {
logger.Infof("config using log level: %s", c.Logger.Level)
}
|
feat: print dex version in the logs
|
dexidp_dex
|
train
|
go
|
fb38b7306ec6b68fb396179124ff032021d107fb
|
diff --git a/src/js/timepicker/index.js b/src/js/timepicker/index.js
index <HASH>..<HASH> 100644
--- a/src/js/timepicker/index.js
+++ b/src/js/timepicker/index.js
@@ -632,6 +632,13 @@ var TimePicker = defineClass(
/**
* Change event - TimePicker
* @event TimePicker#change
+ * @type {object} event - Event object
+ * @property {number} hour - changed hour
+ * @property {number} minute - changed minute
+ * @example
+ * timepicker.on('change', (e) => {
+ * console.log(e.hour, e.minute);
+ * });
*/
this.fire('change', {
hour: this._hour,
|
chore: add change event example (#<I>)
|
nhn_tui.time-picker
|
train
|
js
|
fd6ff0048e80a29bf80b8dacfd59facadbb73d42
|
diff --git a/src/util/scrollbarSize.js b/src/util/scrollbarSize.js
index <HASH>..<HASH> 100644
--- a/src/util/scrollbarSize.js
+++ b/src/util/scrollbarSize.js
@@ -3,7 +3,7 @@ import canUseDOM from './inDOM'
let size;
export default function(recalc) {
- if (!size || recalc) {
+ if (size !== undefined || recalc) {
if (canUseDOM) {
var scrollDiv = document.createElement('div');
|
fix: always called on osx as size equal to 0
|
react-bootstrap_dom-helpers
|
train
|
js
|
a4099004a625c09ca0e9b29f51a96b5fc97655a8
|
diff --git a/scripts/e2e/BuildE2eConfiguration.php b/scripts/e2e/BuildE2eConfiguration.php
index <HASH>..<HASH> 100644
--- a/scripts/e2e/BuildE2eConfiguration.php
+++ b/scripts/e2e/BuildE2eConfiguration.php
@@ -172,7 +172,7 @@ class BuildE2eConfiguration extends AbstractAction
private function createLabel(string $label): string
{
- return $label . '_' . mktime();
+ return $label . '_' . time();
}
private function createGroup(string $label): RdfResource
|
chore: avoid usage of reprecated function
|
oat-sa_extension-tao-delivery-rdf
|
train
|
php
|
1bf23d1e1e9d4d5f2a84aa1930bd7d91168a721a
|
diff --git a/algolia/suggestions/configuration.go b/algolia/suggestions/configuration.go
index <HASH>..<HASH> 100644
--- a/algolia/suggestions/configuration.go
+++ b/algolia/suggestions/configuration.go
@@ -8,7 +8,7 @@ import (
)
// Configuration contains all the different parameters one can change to
-// instantiate a new client for the Analytics API.
+// instantiate a new client for the Query Suggestions API.
type Configuration struct {
AppID string
APIKey string
diff --git a/cts/suggestions/config_test.go b/cts/suggestions/config_test.go
index <HASH>..<HASH> 100644
--- a/cts/suggestions/config_test.go
+++ b/cts/suggestions/config_test.go
@@ -76,7 +76,7 @@ func TestConfig(t *testing.T) {
require.Equal(t, &indexConfig, got[0])
})
- t.Run("Delete the AB test", func(t *testing.T) {
+ t.Run("Delete the query suggestion config", func(t *testing.T) {
err := querySuggestionsClient.DeleteConfig(indexName)
require.NoError(t, err)
|
chore: fix comment in suggestions api (#<I>)
Fix wrong comment in suggestions API
|
algolia_algoliasearch-client-go
|
train
|
go,go
|
b7e2dc6b05b9b8dfedcaa87881d7a5bd8f9210d1
|
diff --git a/packages/cozy-konnector-libs/src/libs/cozyclient.js b/packages/cozy-konnector-libs/src/libs/cozyclient.js
index <HASH>..<HASH> 100644
--- a/packages/cozy-konnector-libs/src/libs/cozyclient.js
+++ b/packages/cozy-konnector-libs/src/libs/cozyclient.js
@@ -70,4 +70,6 @@ const getCozyClient = function (environment = 'production') {
return cozyClient
}
-module.exports = getCozyClient(process.env.NODE_ENV)
+// webpack 4 now changes the NODE_ENV environment variable when you change its 'mode' option
+// since we do not want to minimize the built file, we recognize the 'none' mode as production mode
+module.exports = getCozyClient(process.env.NODE_ENV === 'none' ? 'production' : process.env.NODE_ENV)
|
fix: recognize webpack's 'none' mode as 'production' mode
|
konnectors_libs
|
train
|
js
|
fefa70caf3e8d064d16a08824f5399698960d335
|
diff --git a/packages/angular-templates/templates-handler.js b/packages/angular-templates/templates-handler.js
index <HASH>..<HASH> 100644
--- a/packages/angular-templates/templates-handler.js
+++ b/packages/angular-templates/templates-handler.js
@@ -1,3 +1,8 @@
+if (Package['modules-runtime']) {
+ var require = Package['modules-runtime'].meteorInstall();
+ require('angular');
+}
+
angular.module('angular-templates', []).config([
'$provide',
function ($provide) {
|
feat(templates): make compatible with modules
|
Urigo_angular-meteor
|
train
|
js
|
67377cf5ba3762e67450e78e479bcb15a11e0c46
|
diff --git a/lib/v1/decoder.js b/lib/v1/decoder.js
index <HASH>..<HASH> 100644
--- a/lib/v1/decoder.js
+++ b/lib/v1/decoder.js
@@ -412,7 +412,7 @@ proto.readObject = function (withType) {
while (label !== 'z') {
this.byteBuffer.position(this.byteBuffer.position() - 1);
key = this.read();
- key = key.toString();
+ // property name will auto transfer to a String type.
debug('read object prop: %j with type: %s', key, withType);
result.$[key] = this.read(withType);
label = this.byteBuffer.getChar();
diff --git a/test/map.test.js b/test/map.test.js
index <HASH>..<HASH> 100644
--- a/test/map.test.js
+++ b/test/map.test.js
@@ -308,4 +308,10 @@ describe('map.test.js', function () {
hessian.decode(buf2, '2.0').should.eql(map);
});
});
+
+ it('should decode successful when key is null', function () {
+ var data = new Buffer([77, 116, 0, 0, 78, 83, 0, 4, 110, 117, 108, 108, 122]);
+ var rv = hessian.decode(data);
+ rv.should.eql({null: 'null'});
+ });
});
|
fix(decode): toString is not stable.
|
node-modules_hessian.js
|
train
|
js,js
|
09f6ec709c532a61e1d8b17719c78aeb565e46c8
|
diff --git a/src/Cms/Model/CategoryVersion.php b/src/Cms/Model/CategoryVersion.php
index <HASH>..<HASH> 100644
--- a/src/Cms/Model/CategoryVersion.php
+++ b/src/Cms/Model/CategoryVersion.php
@@ -64,6 +64,9 @@ class CategoryVersion extends \Cms\Model\CategoryDraft
$attributeValueRelationModel->deleteAttributeValueRelations();
//nadpisanie danych oryginaΕu
$this->_category->setFromArray($draft->toArray());
+ //reset rodzica i kolejnoΕci (gdyΕΌ draft moΕΌe mieΔ nieaktualnΔ
)
+ $this->_category->parentId = $this->_category->getInitialStateValue('parentId');
+ $this->_category->order = $this->_category->getInitialStateValue('order');
//id pozostaje niezmienione
$this->_category->id = $this->_category->getInitialStateValue('id');
//status active
|
fix: version not saving parent or order
|
milejko_mmi-cms
|
train
|
php
|
9a2f39bd75dcc9732ae98da14af6eefbba40860d
|
diff --git a/aws/resource_aws_cloudwatch_event_archive.go b/aws/resource_aws_cloudwatch_event_archive.go
index <HASH>..<HASH> 100644
--- a/aws/resource_aws_cloudwatch_event_archive.go
+++ b/aws/resource_aws_cloudwatch_event_archive.go
@@ -32,6 +32,7 @@ func resourceAwsCloudWatchEventArchive() *schema.Resource {
"event_source_arn": {
Type: schema.TypeString,
Required: true,
+ ForceNew: true,
ValidateFunc: validateArn,
},
"description": {
@@ -97,7 +98,6 @@ func resourceAwsCloudWatchEventArchiveRead(d *schema.ResourceData, meta interfac
log.Printf("[DEBUG] Found Archive: #{*out}")
- // Review Question - Is there a problem in setting more than should name and Arn?
d.Set("name", out.ArchiveName)
d.Set("description", out.Description)
d.Set("event_pattern", out.EventPattern)
|
fix: address Bill's review.
|
terraform-providers_terraform-provider-aws
|
train
|
go
|
cf85747b6fb37bc50692086b0782b54ffb9ed5da
|
diff --git a/classes/hypeJunction/Prototyper/Plugin.php b/classes/hypeJunction/Prototyper/Plugin.php
index <HASH>..<HASH> 100644
--- a/classes/hypeJunction/Prototyper/Plugin.php
+++ b/classes/hypeJunction/Prototyper/Plugin.php
@@ -142,7 +142,7 @@ final class Plugin extends \hypeJunction\Plugin {
'shortname' => 'access_id',
'value' => get_default_access(),
'input_view' => 'input/access',
- 'input_view' => 'output/access',
+ 'output_view' => 'output/access',
'value_type' => 'integer',
'show_access' => false,
'multiple' => false,
|
fix(forms): fix typo in access field registration
|
hypeJunction_hypePrototyper
|
train
|
php
|
f4937f18840c88d0d0fc4bc7f2f07ed950ffc522
|
diff --git a/http/query_handler.go b/http/query_handler.go
index <HASH>..<HASH> 100644
--- a/http/query_handler.go
+++ b/http/query_handler.go
@@ -121,6 +121,7 @@ func (h *FluxHandler) handleQuery(w http.ResponseWriter, r *http.Request) {
EncodeError(ctx, err, w)
return
}
+ orgID = req.Request.OrganizationID
requestBytes = n
// Transform the context into one with the request's authorization.
|
fix(http): set org ID on event metric
Looks like this field was just mistakenly overlooked when it was
introduced.
|
influxdata_influxdb
|
train
|
go
|
c27fe24dc6088b517ab17c799a1852f97c22c076
|
diff --git a/src/compiler/parser/html-parser.js b/src/compiler/parser/html-parser.js
index <HASH>..<HASH> 100644
--- a/src/compiler/parser/html-parser.js
+++ b/src/compiler/parser/html-parser.js
@@ -36,10 +36,11 @@ const decodingMap = {
'"': '"',
'&': '&',
' ': '\n',
- '	': '\t'
+ '	': '\t',
+ ''': "'"
}
-const encodedAttr = /&(?:lt|gt|quot|amp);/g
-const encodedAttrWithNewLines = /&(?:lt|gt|quot|amp|#10|#9);/g
+const encodedAttr = /&(?:lt|gt|quot|amp|#39);/g
+const encodedAttrWithNewLines = /&(?:lt|gt|quot|amp|#39|#10|#9);/g
// #5992
const isIgnoreNewlineTag = makeMap('pre,textarea', true)
|
fix: decode single quotes in html attributes (#<I>)
|
kaola-fed_megalo
|
train
|
js
|
4fab1c0888aaa6c4e4568c53ba26eecae85a25bd
|
diff --git a/packages/site/pages/components/dropdown.js b/packages/site/pages/components/dropdown.js
index <HASH>..<HASH> 100644
--- a/packages/site/pages/components/dropdown.js
+++ b/packages/site/pages/components/dropdown.js
@@ -1,5 +1,6 @@
/* eslint-disable react/display-name */
import React, { forwardRef, useState } from 'react'
+import CorePropTypes from 'prop-types'
import Button from '@pluralsight/ps-design-system-button'
import * as core from '@pluralsight/ps-design-system-core'
@@ -143,6 +144,7 @@ const DropdownWithIcon = forwardRef(({ icon, ...props }, forwardedRef) => {
/>
)
})
+DropdownWithIcon.propTypes = { icon: CorePropTypes.node }
const FixedIconExample = () => {
return (
|
style(site): fix some linting errors
|
pluralsight_design-system
|
train
|
js
|
b6544156cbc5b3b25b916ab2ad84e969cfcdccc3
|
diff --git a/packages/cozy-stack-client/src/SharingCollection.js b/packages/cozy-stack-client/src/SharingCollection.js
index <HASH>..<HASH> 100644
--- a/packages/cozy-stack-client/src/SharingCollection.js
+++ b/packages/cozy-stack-client/src/SharingCollection.js
@@ -193,12 +193,12 @@ SharingCollection.normalizeDoctype = DocumentCollection.normalizeDoctypeJsonApi
export const getSharingRules = (document, sharingType) => {
if (sharingType) {
console.warn(
- `sharingType is deprecated and will be removed. We now set this default policy : ${
+ `sharingType is deprecated and will be removed. We now set this default rules: ${
isFile(document)
? getSharingRulesForFile(document)
: getSharingRulesForPhotosAlbum(document)
}} \n
- If this default policy doesn't follow your need, please set custom rules
+ If this default rules do not fill your need, please set custom rules
by using the 'rules' object of the SharingCollection.create() method`
)
}
|
fix: Remove the reference to policy in getSharingRules warning
|
cozy_cozy-client
|
train
|
js
|
d1e9506dd3f989d153547e91355304d60d0036f2
|
diff --git a/src/thresholds.service.js b/src/thresholds.service.js
index <HASH>..<HASH> 100644
--- a/src/thresholds.service.js
+++ b/src/thresholds.service.js
@@ -68,11 +68,15 @@ class ThresholdsService {
const plans = stockCount.plans || { version: 1 }
index[id] = angular.merge({}, { allocations: allocations, plans: plans })
- if (scLocation.lga && !promises.lga) {
- promises.lga = this.lgasService.list()
+ if (scLocation.lga) {
+ if (!promises.lga) {
+ promises.lga = this.lgasService.list()
+ }
index[id].type = 'lga'
- } else if (scLocation.state && !promises.state) {
- promises.state = this.statesService.list()
+ } else if (scLocation.state) {
+ if (!promises.state) {
+ promises.state = this.statesService.list()
+ }
index[id].type = 'state'
}
|
fix: breaks when more than one stockCount of same type
|
fielded_angular-nav-thresholds
|
train
|
js
|
be268ffd1c42e461a8ec99984d8daeeb98d6b7d0
|
diff --git a/classes/hypeJunction/Services/IconFactory.php b/classes/hypeJunction/Services/IconFactory.php
index <HASH>..<HASH> 100644
--- a/classes/hypeJunction/Services/IconFactory.php
+++ b/classes/hypeJunction/Services/IconFactory.php
@@ -67,7 +67,9 @@ class IconFactory {
$icon_sizes = $this->getSizes($entity, elgg_extract('icon_sizes', $options, array()));
foreach ($icon_sizes as $size => $props) {
-
+ if (empty($props)) {
+ continue;
+ }
if (!isset($props['croppable'])) {
$props['croppable'] = in_array($size, $this->config->getCroppableSizes());
}
|
fix(icons): do not attempt a crop if props are empty
|
hypeJunction_hypeApps
|
train
|
php
|
286a0eeea9229ae9a0ea7893bb1090eb68fd4724
|
diff --git a/packages/cozy-stack-client/src/OAuthClient.js b/packages/cozy-stack-client/src/OAuthClient.js
index <HASH>..<HASH> 100644
--- a/packages/cozy-stack-client/src/OAuthClient.js
+++ b/packages/cozy-stack-client/src/OAuthClient.js
@@ -88,7 +88,8 @@ export default class OAuthClient extends CozyStackClient {
client_name: 'clientName',
client_secret: 'clientSecret',
registration_access_token: 'registrationAccessToken',
- software_id: 'softwareID'
+ software_id: 'softwareID',
+ redirect_uris: 'redirectURI'
}
const result = {}
|
fix(stack-client): Map redirect_uris to camelcase
|
cozy_cozy-client
|
train
|
js
|
1bcc6b2c8f98e86e829ec2ec81e0890cd9b7cc9e
|
diff --git a/test/function_inheritance.js b/test/function_inheritance.js
index <HASH>..<HASH> 100644
--- a/test/function_inheritance.js
+++ b/test/function_inheritance.js
@@ -97,4 +97,32 @@ describe('Inheritance', function() {
});
});
+ describe('#setStatic(fnc)', function() {
+
+ it('should set a static property on the class constructor', function() {
+ TestClass.setStatic('staticText', 'text');
+ assert.equal(TestClass.staticText, 'text');
+ });
+
+ it('should set a static method on the class constructor', function() {
+ TestClass.setStatic('staticMethod', function staticMethod() {
+ return this;
+ });
+
+ assert.equal('function', typeof TestClass.staticMethod);
+ });
+
+ it('should have the constructor as the context in static methods', function() {
+ assert.equal(TestClass, TestClass.staticMethod());
+ });
+
+ it('should pass down static properties & methods to extended classes', function() {
+
+ var ExtendedClass = TestClass.extend(function ExtendedClass() {});
+
+ assert.equal(ExtendedClass, ExtendedClass.staticMethod(), 'Static method was not inherited');
+ });
+
+ });
+
});
\ No newline at end of file
|
test: add Function#setStatic unit tests
|
skerit_protoblast
|
train
|
js
|
356c53d7b9ae1ce449ba08c48f40681c2e064987
|
diff --git a/lib/binary-build.js b/lib/binary-build.js
index <HASH>..<HASH> 100644
--- a/lib/binary-build.js
+++ b/lib/binary-build.js
@@ -23,9 +23,9 @@ module.exports = async (config, archiveLocation) => {
const buildLogWatcher = watchBuildLog(config, response.metadata.name);
logger.info('waiting for build to finish');
- const MAX_RETRIES = 10;
+ const MAX_RETRIES = 200;
for (let i = 0; i <= MAX_RETRIES; i++) {
- const timeout = Math.pow(2, i + 8);
+ const timeout = (i + 1) * 200;
await wait(timeout);
const buildStatus = await config.openshiftRestClient.builds.find(response.metadata.name);
|
fix: increase build wait times linearly (#<I>)
|
nodeshift_nodeshift
|
train
|
js
|
1e56bb565dd67692d664e5794341706c4d74ffe7
|
diff --git a/lib/dependencies/CriticalDependencyWarning.js b/lib/dependencies/CriticalDependencyWarning.js
index <HASH>..<HASH> 100644
--- a/lib/dependencies/CriticalDependencyWarning.js
+++ b/lib/dependencies/CriticalDependencyWarning.js
@@ -2,13 +2,18 @@
MIT License http://www.opensource.org/licenses/mit-license.php
Author Tobias Koppers @sokra
*/
-function CriticalDependencyWarning(message) {
- Error.call(this);
- Error.captureStackTrace(this, CriticalDependencyWarning);
- this.name = "CriticalDependencyWarning";
- this.message = "Critical dependency: " + message;
+"use strict";
+
+class CriticalDependencyWarning extends Error {
+
+ constructor(message) {
+ super();
+ if(Error.hasOwnProperty("captureStackTrace")) {
+ Error.captureStackTrace(this, this.constructor);
+ }
+ this.name = "CriticalDependencyWarning";
+ this.message = "Critical dependency: " + message;
+ }
}
-module.exports = CriticalDependencyWarning;
-CriticalDependencyWarning.prototype = Object.create(Error.prototype);
-CriticalDependencyWarning.prototype.constructor = CriticalDependencyWarning;
+module.exports = CriticalDependencyWarning;
|
refactor(CriticalDependencyWarning): upgrade to ES6
|
webpack_webpack
|
train
|
js
|
c933931b6b8ac024820972bb447e5b17ed943669
|
diff --git a/packages/site/src/ui/example/react.js b/packages/site/src/ui/example/react.js
index <HASH>..<HASH> 100644
--- a/packages/site/src/ui/example/react.js
+++ b/packages/site/src/ui/example/react.js
@@ -234,10 +234,12 @@ class ReactExample extends React.Component {
{this.renderError()}
{this.props.themeToggle && (
- <ThemeToggle
- activeThemeName={this.state.themeName}
- onSelect={this.handleThemeSelect}
- />
+ <Theme name={this.state.themeName}>
+ <ThemeToggle
+ activeThemeName={this.state.themeName}
+ onSelect={this.handleThemeSelect}
+ />
+ </Theme>
)}
<div ref={this.outputEl} />
|
fix(site): themeToggle missing correct context
|
pluralsight_design-system
|
train
|
js
|
0f1ae636ec2f831728f034b7e7fea5faf08976bd
|
diff --git a/library/src/main/java/com/liulishuo/filedownloader/services/FileDownloadRunnable.java b/library/src/main/java/com/liulishuo/filedownloader/services/FileDownloadRunnable.java
index <HASH>..<HASH> 100644
--- a/library/src/main/java/com/liulishuo/filedownloader/services/FileDownloadRunnable.java
+++ b/library/src/main/java/com/liulishuo/filedownloader/services/FileDownloadRunnable.java
@@ -531,7 +531,7 @@ class FileDownloadRunnable implements Runnable {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR2) {
availableBytes = statFs.getAvailableBytes();
} else {
- availableBytes = statFs.getAvailableBlocks() * statFs.getBlockSize();
+ availableBytes = statFs.getAvailableBlocks() * (long) statFs.getBlockSize();
}
if (availableBytes < needAvailableSpace) {
|
fix(lesson_than_jelly-bean-mr2): fix the incorrect free space size was calculated in device less than JELLY_BEAN_MR2(Android <I>)
Closes #<I>
|
lingochamp_FileDownloader
|
train
|
java
|
157a3b907dab44232e73e7ef54a48ee15e30f6ca
|
diff --git a/packages/server/lib/saved_state.js b/packages/server/lib/saved_state.js
index <HASH>..<HASH> 100644
--- a/packages/server/lib/saved_state.js
+++ b/packages/server/lib/saved_state.js
@@ -9,6 +9,8 @@ const { fs } = require('./util/fs')
const stateFiles = {}
+// TODO: remove `showedOnBoardingModal` from this list - it is only included so that misleading `allowed` are not thrown
+// now that it has been removed from use
const allowed = `
appWidth
appHeight
@@ -22,6 +24,7 @@ browserY
isAppDevToolsOpen
isBrowserDevToolsOpen
reporterWidth
+showedOnBoardingModal
showedNewProjectBanner
firstOpenedCypress
showedStudioModal
|
chore: add showedOnBoardingModal back to allowed state keys (#<I>)
|
cypress-io_cypress
|
train
|
js
|
e114638fd202e035ee9346900439aa9e68acdd9d
|
diff --git a/tests/gui/test_semantic_data.py b/tests/gui/test_semantic_data.py
index <HASH>..<HASH> 100644
--- a/tests/gui/test_semantic_data.py
+++ b/tests/gui/test_semantic_data.py
@@ -37,7 +37,7 @@ def change_semantic_data_values():
state_machine_model = gui_singleton.state_machine_manager_model.state_machines[state_machine.state_machine_id]
states_editor_controller = gui_singleton.main_window_controller.get_controller("states_editor_ctrl")
- page_info, state_identifier = states_editor_controller.find_page_of_state_m(state_machine_model.root_state)
+ page_info, state_identifier = states_editor_controller.get_page_of_state_m(state_machine_model.root_state)
# print page_info, state_identifier
state_editor_controller = states_editor_controller.tabs[state_identifier]["controller"]
|
fix(semantic_data): Adapt to renamed method
|
DLR-RM_RAFCON
|
train
|
py
|
888fe246e42d20234057bcda00a39adeac74ab5a
|
diff --git a/docs/assets/js/chat.js b/docs/assets/js/chat.js
index <HASH>..<HASH> 100644
--- a/docs/assets/js/chat.js
+++ b/docs/assets/js/chat.js
@@ -39,13 +39,13 @@ var rules = [
{
name: 'playground',
message: 'Nice! I will redirect you...',
- actions: [{ redirect: '/docs/playground' }],
+ actions: [{ redirect: './docs/playground' }],
exit: true,
},
{
name: 'docs',
message: 'Nice! I will redirect you...',
- actions: [{ redirect: '/docs' }],
+ actions: [{ redirect: './docs' }],
exit: true,
}
];
|
docs: fix redirect url in chat
|
andersonba_yve-bot
|
train
|
js
|
1a29c9b8b84e212f3ee626d03dd7ed1ca4dca97c
|
diff --git a/src/textlint-rule-alex.js b/src/textlint-rule-alex.js
index <HASH>..<HASH> 100644
--- a/src/textlint-rule-alex.js
+++ b/src/textlint-rule-alex.js
@@ -35,7 +35,7 @@ export default function textlintRuleAlex(context, options = {}) {
return;
}
const text = getSource(node);
- const messages = alex.text(text, allowWords).messages;
+ const messages = alex(text, allowWords).messages;
messages.forEach((result) => {
reportError(node, result);
});
diff --git a/test/textlint-rule-alex-test.js b/test/textlint-rule-alex-test.js
index <HASH>..<HASH> 100644
--- a/test/textlint-rule-alex-test.js
+++ b/test/textlint-rule-alex-test.js
@@ -8,7 +8,13 @@ var tester = new TextLintTester();
tester.run("alex", rule, {
valid: [
"This is a pen",
- "η·ε₯³"
+ "η·ε₯³",
+ {
+ text: "The boogeyman",
+ options: {
+ allow: ["boogeyman-boogeywoman"]
+ }
+ }
],
invalid: [
{
|
fix(rule): fix to work "allow" option
close #1
|
textlint-rule_textlint-rule-alex
|
train
|
js,js
|
c7869c2e6c7e21a8622248b7ae862bb8aa29ef35
|
diff --git a/src/filter/collection/contains.js b/src/filter/collection/contains.js
index <HASH>..<HASH> 100644
--- a/src/filter/collection/contains.js
+++ b/src/filter/collection/contains.js
@@ -24,8 +24,9 @@ function containsFilter( $parse ) {
return collection.some( function(elm, index, self) {
- return (isObject(elm)) ? $parse(expression)(elm) :
- self.indexOf(expression);
+ return (isObject(elm) || isFunction(expression)) ?
+ $parse(expression)(elm) :
+ self.indexOf(expression) !== -1;
});
|
fix(contains): check if expression is a fucntion
|
a8m_angular-filter
|
train
|
js
|
ee2ba72a7e326baef758f180c023cb029415a9d6
|
diff --git a/handlers/home.go b/handlers/home.go
index <HASH>..<HASH> 100644
--- a/handlers/home.go
+++ b/handlers/home.go
@@ -1,10 +1,13 @@
package handlers
import (
- "fmt"
"net/http"
)
func HomeHandler(w http.ResponseWriter, r *http.Request) {
- fmt.Fprintf(w, "discovery.etcd.io")
+
+ http.Redirect(w, r,
+ "https://coreos.com/docs/cluster-management/setup/etcd-cluster-discovery/",
+ http.StatusTemporaryRedirect,
+ )
}
|
feat(handlers): home goes to the discovery instructions
|
coreos_discovery.etcd.io
|
train
|
go
|
660f8cfd80ecd6e00cabd55454f65191f504f6d9
|
diff --git a/pipeline/checksums/checksums_test.go b/pipeline/checksums/checksums_test.go
index <HASH>..<HASH> 100644
--- a/pipeline/checksums/checksums_test.go
+++ b/pipeline/checksums/checksums_test.go
@@ -17,7 +17,7 @@ func TestDescription(t *testing.T) {
func TestPipe(t *testing.T) {
var binary = "binary"
- var checksums = binary + "_checksums.txt"
+ var checksums = binary + "_bar_checksums.txt"
folder, err := ioutil.TempDir("", "goreleasertest")
assert.NoError(t, err)
var file = filepath.Join(folder, binary)
@@ -27,10 +27,11 @@ func TestPipe(t *testing.T) {
Dist: folder,
ProjectName: binary,
Checksum: config.Checksum{
- NameTemplate: "{{ .ProjectName }}_checksums.txt",
+ NameTemplate: "{{ .ProjectName }}_{{ .Env.FOO }}_checksums.txt",
},
},
)
+ ctx.Env = map[string]string{"FOO": "bar"}
ctx.Artifacts.Add(artifact.Artifact{
Name: binary,
Path: file,
|
test: added env to pipe tests
|
goreleaser_goreleaser
|
train
|
go
|
21c3b0a07aa671a6262bc4b8e52dfe34ac56a28b
|
diff --git a/samples/system-test/list-session-entity-types.test.js b/samples/system-test/list-session-entity-types.test.js
index <HASH>..<HASH> 100644
--- a/samples/system-test/list-session-entity-types.test.js
+++ b/samples/system-test/list-session-entity-types.test.js
@@ -68,7 +68,7 @@ describe('list session entity types', () => {
const output = exec(`${cmd} list-session-entity-types -s ${sessionId}`);
assert.include(output, sessionId);
assert.include(output, displayName);
- assert.include(output, '2');
+ assert.include(output, 'Number of entities');
});
after('delete the created entity type', async () => {
|
chore: don't enforce count (#<I>)
|
googleapis_nodejs-dialogflow
|
train
|
js
|
6104b2ea606b7e08eba24def01abfed051febc34
|
diff --git a/src/directives/array.js b/src/directives/array.js
index <HASH>..<HASH> 100644
--- a/src/directives/array.js
+++ b/src/directives/array.js
@@ -170,7 +170,7 @@ angular.module('schemaForm').directive('sfArray', ['sfSelect', 'schemaForm', 'sf
// Apparently the fastest way to clear an array, readable too.
// http://jsperf.com/array-destroy/32
while (arr.length > 0) {
- arr.shift();
+ arr.pop();
}
form.titleMap.forEach(function(item, index) {
|
refactor(array): change `shift` to `pop` for performance
|
json-schema-form_angular-schema-form
|
train
|
js
|
74091ddba1c831acc11fa35b3c114e33514f69b0
|
diff --git a/index.js b/index.js
index <HASH>..<HASH> 100644
--- a/index.js
+++ b/index.js
@@ -55,6 +55,7 @@ quest.stream = function(url, headers) {
res.ok = status >= 200 && status < 300
res.status = status
res.headers = stream.headers
+ res.emit('response')
})
quest.ok(req, err).then(stream => {
|
feat: emit a 'response' event on response streams
This event indicates that the status and headers are available
|
aleclarson_quest
|
train
|
js
|
2f343a68457cee43f6e292abb91ce679c4a847c5
|
diff --git a/audioread/ffdec.py b/audioread/ffdec.py
index <HASH>..<HASH> 100644
--- a/audioread/ffdec.py
+++ b/audioread/ffdec.py
@@ -100,12 +100,12 @@ class FFmpegAudioFile(object):
self.stderr_reader.start()
self.stdin_reader = None
+ self.audio_datas = Queue()
def read_data(self, block_size=4096, timeout=10.0):
"""Read blocks of raw PCM data from the file."""
# Read from stdout in a separate thread and poll the queue for datas.
- q = Queue()
- self.stdin_reader = QueueReaderThread(self.proc.stdout, q, block_size)
+ self.stdin_reader = QueueReaderThread(self.proc.stdout, self.audio_datas, block_size)
self.stdin_reader.start()
start_time = time.time()
@@ -113,7 +113,7 @@ class FFmpegAudioFile(object):
# Wait for data to be available or a timeout.
data = None
try:
- data = q.get(timeout = timeout)
+ data = self.audio_datas.get(timeout = timeout)
if data:
yield data
else:
@@ -211,6 +211,8 @@ class FFmpegAudioFile(object):
stdout_reader = ReaderThread(self.proc.stdout)
stdout_reader.start()
self.proc.wait()
+ # ensure the queue is cleared
+ self.audio_datas.queue.clear()
def __del__(self):
self.close()
|
feat: ensure that the queue is cleared
|
beetbox_audioread
|
train
|
py
|
4c00490b18b713113eb03ebcf079b2611bc2b3e0
|
diff --git a/src/index.js b/src/index.js
index <HASH>..<HASH> 100644
--- a/src/index.js
+++ b/src/index.js
@@ -66,6 +66,7 @@ export {
export OverflowMenu from './components/OverflowMenu';
export OverflowMenuItem from './components/OverflowMenuItem';
export Pagination from './components/Pagination';
+export PaginationV2 from './components/PaginationV2';
export PrimaryButton from './components/PrimaryButton';
export {
ProgressIndicator,
|
fix(pagination): added paginationv2 to export list (#<I>)
|
carbon-design-system_carbon-components-react
|
train
|
js
|
9f81d014f1bf59e9c599527a7031aee32e8cb60f
|
diff --git a/cmd/obdinfo.go b/cmd/obdinfo.go
index <HASH>..<HASH> 100644
--- a/cmd/obdinfo.go
+++ b/cmd/obdinfo.go
@@ -80,10 +80,10 @@ func getLocalDrivesOBD(ctx context.Context, parallel bool, endpointZones Endpoin
})
continue
}
- measure := func(index int) {
+ measure := func(index int, path string) {
latency, throughput, err := disk.GetOBDInfo(ctx, pathJoin(endpoint.Path, minioMetaTmpBucket, mustGetUUID()))
driveOBDInfo := madmin.DriveOBDInfo{
- Path: endpoint.Path,
+ Path: path,
Latency: latency,
Throughput: throughput,
}
@@ -96,9 +96,9 @@ func getLocalDrivesOBD(ctx context.Context, parallel bool, endpointZones Endpoin
wg.Add(1)
if parallel {
- go measure(i)
+ go measure(i, endpoint.Path)
} else {
- measure(i)
+ measure(i, endpoint.Path)
}
}
}
|
fix: drive names in output of parallel obd test (#<I>)
|
minio_minio
|
train
|
go
|
fd0d6d228c1d6414d2698f48b4b0ff3125f3946b
|
diff --git a/test/helpers/utils.go b/test/helpers/utils.go
index <HASH>..<HASH> 100644
--- a/test/helpers/utils.go
+++ b/test/helpers/utils.go
@@ -639,3 +639,10 @@ func SkipQuarantined() bool {
func SkipGKEQuarantined() bool {
return SkipQuarantined() && IsIntegration(CIIntegrationGKE)
}
+
+// SkipRaceDetectorEnabled returns whether tests failing with race detector
+// enabled should be skipped.
+func SkipRaceDetectorEnabled() bool {
+ race := os.Getenv("RACE")
+ return race == "1" || race == "true"
+}
|
test: detect RACE env var at runtime
This allows to determine whether the Cilium binaries under test were
built using the race detector enabled and the tests should be run
skipping any tests that fail with the race detector enabled.
|
cilium_cilium
|
train
|
go
|
00c55355c4f9a4a917a0054d8998f5607dc56599
|
diff --git a/views/js/qtiCreator/helper/itemLoader.js b/views/js/qtiCreator/helper/itemLoader.js
index <HASH>..<HASH> 100644
--- a/views/js/qtiCreator/helper/itemLoader.js
+++ b/views/js/qtiCreator/helper/itemLoader.js
@@ -63,12 +63,14 @@ define([
Promise.all([langList, itemRdf]).then(([languagesList, data]) => {
var loader, itemData, newItem;
- let newObject = {};
- for (const response in data.itemData.responses) {
- for (const mapKey in data.itemData.responses[response].mapping) {
- newObject[decodeHtml(mapKey)] = data.itemData.responses[response].mapping[mapKey];
+ if (data.itemData) {
+ let newObject = {};
+ for (const response in data.itemData.responses) {
+ for (const mapKey in data.itemData.responses[response].mapping) {
+ newObject[decodeHtml(mapKey)] = data.itemData.responses[response].mapping[mapKey];
+ }
+ data.itemData.responses[response].mapping = newObject;
}
- data.itemData.responses[response].mapping = newObject;
}
if (data.itemData && data.itemData.qtiClass === 'assessmentItem') {
|
fix: Error when item is empty
|
oat-sa_extension-tao-itemqti
|
train
|
js
|
9ad771c83a3af77c608798bba0446ab8359a978d
|
diff --git a/karma.conf.js b/karma.conf.js
index <HASH>..<HASH> 100755
--- a/karma.conf.js
+++ b/karma.conf.js
@@ -40,6 +40,7 @@ module.exports = function(config) {
// list of files / patterns to load in the browser
files: [
'packages/dna-core/**/*.spec.js',
+ 'packages/dna-idom/**/*.spec.js',
],
|
chore: trying to fix ios 9 tests
|
chialab_dna
|
train
|
js
|
9c68daf9729badc0f114ea6f665d79b2580a5c16
|
diff --git a/test/issue4.py b/test/issue4.py
index <HASH>..<HASH> 100644
--- a/test/issue4.py
+++ b/test/issue4.py
@@ -7,7 +7,8 @@ Test contributed by jacekt
from __future__ import absolute_import
from intervaltree import Interval, IntervalTree
from test.progress_bar import ProgressBar
-from test.data.issue4 import data as items, MAX
+from test.data import issue4
+items, MAX = issue4.data, issue4.MAX
from test.intervaltrees import trees
from test.intervals import write_ivs_data
from test.optimality_test_matrix import OptimalityTestMatrix
|
fix: broken import reference in test/issue4.py
|
chaimleib_intervaltree
|
train
|
py
|
0745774240f08ad1f4a67e241960b4f860c40c0a
|
diff --git a/proselint/checks/uncomparables/misc.py b/proselint/checks/uncomparables/misc.py
index <HASH>..<HASH> 100644
--- a/proselint/checks/uncomparables/misc.py
+++ b/proselint/checks/uncomparables/misc.py
@@ -45,7 +45,7 @@ One axiom of Standard Written English is that your reader is paying close
attention and expects you to have done the same.
"""
import re
-from proselint.tools import memoize
+from proselint.tools import existence_check, memoize
import itertools
@@ -114,9 +114,7 @@ def check(text):
("more", "possible") # FIXME
]
- all = [fr"(^|\W){i[0]}\s{i[1]}[\W$]" for i in itertools.product(
- comparators, uncomparables) if i not in exceptions]
+ uncomparables = [fr"{i[0]}\s{i[1]}" for i in itertools.product(
+ comparators, uncomparables) if i not in exceptions]
- occ = re.finditer("|".join(all), text.lower())
- return [(o.start(), o.end(), err, msg.format(o.group(0)), None)
- for o in occ]
+ return existence_check(text, uncomparables, err, msg, require_padding=True)
|
refactor: use existence_check for uncomparables
|
amperser_proselint
|
train
|
py
|
ceefaf677eeac4050c79b200b2f6007779e68905
|
diff --git a/src/ServiceLocator.js b/src/ServiceLocator.js
index <HASH>..<HASH> 100644
--- a/src/ServiceLocator.js
+++ b/src/ServiceLocator.js
@@ -30,6 +30,12 @@ ServiceLocator.prototype.set = function (name, callback) {
this._callbacks[name] = callback;
+ Object.defineProperty(this, name, {
+ get: () => {
+ return this.get(name);
+ }
+ });
+
return this;
};
diff --git a/test/unit/ServiceLocator.js b/test/unit/ServiceLocator.js
index <HASH>..<HASH> 100644
--- a/test/unit/ServiceLocator.js
+++ b/test/unit/ServiceLocator.js
@@ -198,3 +198,19 @@ t.test('#getNames: should return name of setted services', function (t) {
t.end();
});
+
+t.test('#get: should return service using getter', function (t) {
+ var locator = new ServiceLocator();
+
+ locator.set('test1', function () {
+ return {id: 1};
+ });
+
+ locator.set('test2', function () {
+ return {id: 2};
+ });
+
+ t.same(locator.test1, {id: 1});
+ t.same(locator.test2, {id: 2});
+ t.end();
+});
|
feat: define getter for service on .set call
|
mafjs_service-locator
|
train
|
js,js
|
60a2709213be956096a6a5c72672b457652e82a9
|
diff --git a/store/v2/compare_and_delete_command.go b/store/v2/compare_and_delete_command.go
index <HASH>..<HASH> 100644
--- a/store/v2/compare_and_delete_command.go
+++ b/store/v2/compare_and_delete_command.go
@@ -12,9 +12,9 @@ func init() {
// The CompareAndDelete performs a conditional delete on a key in the store.
type CompareAndDeleteCommand struct {
- Key string `json:"key"`
- PrevValue string `json:"prevValue"`
- PrevIndex uint64 `json:"prevIndex"`
+ Key string `json:"key"`
+ PrevValue string `json:"prevValue"`
+ PrevIndex uint64 `json:"prevIndex"`
}
// The name of the compareAndDelete command in the log
|
chore(gofmt): gofmt compare_and_delete_command.go
|
etcd-io_etcd
|
train
|
go
|
16adf587725cb420a42f973a9305b2634f00f162
|
diff --git a/docs/conf.py b/docs/conf.py
index <HASH>..<HASH> 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -19,6 +19,7 @@
import os
import sys
+from datetime import datetime
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
@@ -64,7 +65,7 @@ master_doc = "index"
# General information about the project.
project = "PyPhi"
-copyright = "2014--2018 {}".format(__author__)
+copyright = "2014β{year} {author}".format(year=datetime.today().year, author=__author__)
# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
|
docs: Update copyright year
|
wmayner_pyphi
|
train
|
py
|
01eaf49e8816e4667f9bc442b85329cddeb35fb2
|
diff --git a/src/components/Table/body/styled/cellContent.js b/src/components/Table/body/styled/cellContent.js
index <HASH>..<HASH> 100644
--- a/src/components/Table/body/styled/cellContent.js
+++ b/src/components/Table/body/styled/cellContent.js
@@ -15,6 +15,7 @@ const StyledCellContent = attachThemeAttrs(styled.div)`
white-space: nowrap;
font-weight: 400;
box-sizing: border-box;
+ height: 100%;
${props =>
props.component &&
|
fix: height on table (#<I>)
|
90milesbridge_react-rainbow
|
train
|
js
|
f6691dd14c4dedc14f2ad543062ca416ff125505
|
diff --git a/src/index.js b/src/index.js
index <HASH>..<HASH> 100644
--- a/src/index.js
+++ b/src/index.js
@@ -87,9 +87,6 @@ itk.readImageDICOMFileSeries = readImageDICOMFileSeries
import readImageFile from './readImageFile.js'
itk.readImageFile = readImageFile
-import readLocalFile from './readLocalFile.js'
-itk.readLocalFile = readLocalFile
-
import readMeshArrayBuffer from './readMeshArrayBuffer.js'
itk.readMeshArrayBuffer = readMeshArrayBuffer
|
fix(index): Remove readLocalFile
For Node.js runtime.
|
InsightSoftwareConsortium_itk-js
|
train
|
js
|
34515fc8f86ed3724762bd0fa2306d8d4142fb44
|
diff --git a/src/DropdownToggle.js b/src/DropdownToggle.js
index <HASH>..<HASH> 100644
--- a/src/DropdownToggle.js
+++ b/src/DropdownToggle.js
@@ -3,7 +3,7 @@ import { findDOMNode } from 'react-dom';
import PropTypes from 'prop-types';
import isRequiredForA11y from 'prop-types-extra/lib/isRequiredForA11y';
import { elementType } from 'prop-types-extra';
-import BaseDropdownToggle from 'react-overlays//DropdownToggle';
+import BaseDropdownToggle from 'react-overlays/DropdownToggle';
import React from 'react';
import Button from './Button';
|
fix: typo in module reference for react-overlay (#<I>)
|
react-bootstrap_react-bootstrap
|
train
|
js
|
7493ee6e19b9185a26e641c585deee293537feb7
|
diff --git a/src/Commands/new.js b/src/Commands/new.js
index <HASH>..<HASH> 100644
--- a/src/Commands/new.js
+++ b/src/Commands/new.js
@@ -16,6 +16,7 @@ const path = require('path')
const install = require('../../lib/install')
const clone = require('../../lib/clone')
const fix = require('./fix')
+const check = require('./check')
const Spinner = require('cli-spinner').Spinner
const repo = 'https://github.com/adonisjs/adonis-app.git'
@@ -38,6 +39,11 @@ module.exports = function (argv) {
return
}
+ if (!check(argv)) {
+ console.log(colors.yellow(`\nInstall stopped. Please check error above.`))
+ return
+ }
+
const projectPath = argv._[1]
const fullPath = path.isAbsolute(projectPath) ? projectPath : path.join(process.cwd(), projectPath)
const spinner = new Spinner(`${colors.green('installing dependencies... %s')}`)
|
feat: add check node.js and npm required versions to the new command.
|
adonisjs_adonis-cli
|
train
|
js
|
49dc882c96b9aeefb669f5d42cbd5a661f7dad95
|
diff --git a/controller/Groups.php b/controller/Groups.php
index <HASH>..<HASH> 100644
--- a/controller/Groups.php
+++ b/controller/Groups.php
@@ -87,6 +87,9 @@ class Groups extends tao_actions_SaSModule
$memberProperty = $this->getProperty(GroupsService::PROPERTY_MEMBERS_URI);
$memberForm = tao_helpers_form_GenerisTreeForm::buildReverseTree($group, $memberProperty);
$memberForm->setData('title', __('Select group test takers'));
+
+ $memberForm->setData('saveUrl', _url('setReverseValues', 'TestTakerGenerisTree', 'taoTestTaker'));
+
$this->setData('memberForm', $memberForm->render());
if ($this->getServiceLocator()->get(common_ext_ExtensionsManager::SERVICE_ID)->isEnabled('taoDeliveryRdf')) {
|
chore: pointed reverse TT group form to newly created endpoint
|
oat-sa_extension-tao-group
|
train
|
php
|
3fb291869834bd226b08d0c3c7fd6d8f759ea0e6
|
diff --git a/src/Leevel/Support/functions.php b/src/Leevel/Support/functions.php
index <HASH>..<HASH> 100644
--- a/src/Leevel/Support/functions.php
+++ b/src/Leevel/Support/functions.php
@@ -94,7 +94,9 @@ if (!function_exists('f_exists')) {
if (!function_exists('env')) {
/**
- * εεΎεΊη¨ηη―ε’ει.ζ―ζ bool, empty ε null.
+ * θ·εεΊη¨ηη―ε’ει.
+ *
+ * - ζ―ζ bool, empty ε null εΌ.
*
* @param mixed $name
* @param null|mixed $defaults
|
refactor(support): code poem
|
hunzhiwange_framework
|
train
|
php
|
38ff0820c12929b4c6c033c3a5bd84a79aab28a6
|
diff --git a/test/karma.conf.js b/test/karma.conf.js
index <HASH>..<HASH> 100644
--- a/test/karma.conf.js
+++ b/test/karma.conf.js
@@ -112,6 +112,7 @@ module.exports = function (config) {
// Continuous Integration mode
// if true, Karma captures browsers, runs the tests and exits
- singleRun: false
+ singleRun: false,
+ processKillTimeout: 1200000,
});
};
|
chore: debug ci again and again
|
twobin_react-lazyload
|
train
|
js
|
57ce035972aaec95c1a9ca5cf446e3e48a1c2e9e
|
diff --git a/src/DatabaseProvider/DatabaseContext.js b/src/DatabaseProvider/DatabaseContext.js
index <HASH>..<HASH> 100644
--- a/src/DatabaseProvider/DatabaseContext.js
+++ b/src/DatabaseProvider/DatabaseContext.js
@@ -5,7 +5,7 @@ const { Provider, Consumer } = DatabaseContext
export {
Consumer as DatabaseConsumer,
- Provider
+ Provider,
}
export default DatabaseContext
diff --git a/src/DatabaseProvider/test.js b/src/DatabaseProvider/test.js
index <HASH>..<HASH> 100644
--- a/src/DatabaseProvider/test.js
+++ b/src/DatabaseProvider/test.js
@@ -2,7 +2,9 @@ import React from 'react'
import * as TestRenderer from 'react-test-renderer'
import Database from '../Database'
import { mockDatabase } from '../__tests__/testModels'
-import DatabaseProvider, { DatabaseConsumer, withDatabase } from '.'
+import DatabaseProvider from '.'
+import { DatabaseConsumer } from './DatabaseContext'
+import withDatabase from './withDatabase'
// Simple mock component
function MockComponent() {
|
fix: test and lint #<I>
|
Nozbe_WatermelonDB
|
train
|
js,js
|
43dbd10046645643e2e71b38023b1454c46fbc23
|
diff --git a/lib/git.js b/lib/git.js
index <HASH>..<HASH> 100644
--- a/lib/git.js
+++ b/lib/git.js
@@ -29,7 +29,7 @@ async function getTags(execaOpts) {
return (await execa.stdout('git', ['tag'], execaOpts))
.split('\n')
.map(tag => tag.trim())
- .filter(tag => Boolean(tag));
+ .filter(Boolean);
}
/**
|
refactor: prefer filter shorter form
|
semantic-release_semantic-release
|
train
|
js
|
68328cc6935fa511d23270900adb97e3a95482a5
|
diff --git a/packages/react/src/components/MultiSelect/MultiSelect-story.js b/packages/react/src/components/MultiSelect/MultiSelect-story.js
index <HASH>..<HASH> 100644
--- a/packages/react/src/components/MultiSelect/MultiSelect-story.js
+++ b/packages/react/src/components/MultiSelect/MultiSelect-story.js
@@ -75,6 +75,8 @@ const props = () => ({
{
'close.menu': 'Close menu',
'open.menu': 'Open menu',
+ 'clear.all': 'Clear all',
+ 'clear.selection': 'Clear selection',
}
),
selectionFeedback: select(
diff --git a/packages/react/src/components/MultiSelect/MultiSelect.js b/packages/react/src/components/MultiSelect/MultiSelect.js
index <HASH>..<HASH> 100644
--- a/packages/react/src/components/MultiSelect/MultiSelect.js
+++ b/packages/react/src/components/MultiSelect/MultiSelect.js
@@ -319,6 +319,7 @@ export default class MultiSelect extends React.Component {
<ListBox.Selection
clearSelection={!disabled ? clearSelection : noop}
selectionCount={selectedItem.length}
+ translateWithId={translateWithId}
/>
)}
<span className={`${prefix}--list-box__label`}>
|
feat(MultiSelect): pass through `<ListBox.Selection>` translations (#<I>)
|
carbon-design-system_carbon-components
|
train
|
js,js
|
be6e1b5e6525401723d5d73b70da401ff7ae7445
|
diff --git a/src/i18njs-builder.js b/src/i18njs-builder.js
index <HASH>..<HASH> 100644
--- a/src/i18njs-builder.js
+++ b/src/i18njs-builder.js
@@ -93,9 +93,10 @@ define(function () {
escapedSingleQuotes] = src[i];
}
}
+ return dest;
}
- changeKeys(buildMap[name], compiled);
+ compiled = changeKeys(buildMap[name], compiled);
var toWrite = 'define(\'i18n!' + name +
'\', [\'i18njs\'], function (i18njs) {\n var locales = ';
|
fix: return at the end of `changeKeys`
|
yoannmoinet_requirejs-i18njs
|
train
|
js
|
306c4c04001395d40547a8fdf34ac061a1eeb159
|
diff --git a/packages/node_modules/@webex/internal-plugin-ediscovery/src/transforms.js b/packages/node_modules/@webex/internal-plugin-ediscovery/src/transforms.js
index <HASH>..<HASH> 100644
--- a/packages/node_modules/@webex/internal-plugin-ediscovery/src/transforms.js
+++ b/packages/node_modules/@webex/internal-plugin-ediscovery/src/transforms.js
@@ -310,7 +310,9 @@ class Transforms {
// leaves the tag, auth, IV, etc fields on the SCR object as undefined.
if (share.scr || share.sslr) {
promises.push(requestWithRetries(ctx.webex.internal.encryption, ctx.webex.internal.encryption.decryptScr,
- [activity.encryptionKeyUrl, share.scr || share.sslr, {onBehalfOf: container.onBehalfOfUser}])
+ // A share will have an encryptionKeyUrl when it's activity uses a different encryptionKeyUrl. This can happen when old activities are edited
+ // and key rotation is turn on.
+ [share.encryptionKeyUrl || activity.encryptionKeyUrl, share.scr || share.sslr, {onBehalfOf: container.onBehalfOfUser}])
.then((decryptedSCR) => {
if (share.scr) {
share.scr = decryptedSCR;
|
feat(ediscovery): support scr decryption on files that use their own key url
|
webex_spark-js-sdk
|
train
|
js
|
d3976cb0a50f4ce7075200d6fa7e92a0dead0a66
|
diff --git a/test/test.js b/test/test.js
index <HASH>..<HASH> 100644
--- a/test/test.js
+++ b/test/test.js
@@ -121,6 +121,24 @@ describe('Puppeteer', function() {
expect(fs.readdirSync(userDataDir).length).toBeGreaterThan(0);
rm(userDataDir);
}));
+ // Headless has issues shutting down gracefully
+ // @see https://crbug.com/771830
+ (headless ? xit : it)('userDataDir option should restore state', SX(async function() {
+ const userDataDir = fs.mkdtempSync(path.join(__dirname, 'test-user-data-dir'));
+ const options = Object.assign({userDataDir}, defaultBrowserOptions);
+ const browser = await puppeteer.launch(options);
+ const page = await browser.newPage();
+ await page.goto(EMPTY_PAGE);
+ await page.evaluate(() => localStorage.hey = 'hello');
+ await browser.close();
+
+ const browser2 = await puppeteer.launch(options);
+ const page2 = await browser2.newPage();
+ await page2.goto(EMPTY_PAGE);
+ expect(await page2.evaluate(() => localStorage.hey)).toBe('hello');
+ await browser2.close();
+ rm(userDataDir);
+ }));
});
describe('Puppeteer.connect', function() {
it('should work', SX(async function() {
|
test: add failing test for storing data in custom userDataDir
Headless isn't closing gracefully, which sometimes causes data loss when Chrome closes before it finishes writing things to disk.
See <URL>
|
GoogleChrome_puppeteer
|
train
|
js
|
be8355fd41fa49fcc5bbb9a068abfdaac57c8fed
|
diff --git a/src/platforms/mp/runtime/instance/update.js b/src/platforms/mp/runtime/instance/update.js
index <HASH>..<HASH> 100644
--- a/src/platforms/mp/runtime/instance/update.js
+++ b/src/platforms/mp/runtime/instance/update.js
@@ -49,7 +49,7 @@ export function createUpdateFn (page) {
const throttleSetData = throttle(function () {
const data = buffer.pop()
- if (!isEmptyObj(data)) {
+ if (!isEmptyObj(data) && page.setData) {
page.setData(data)
}
}, 50, { leadingDelay: 0 })
|
chore: not calling setData on App
|
kaola-fed_megalo
|
train
|
js
|
e4866ad32c5b1ccd5f2bb60ad69945e583f1b765
|
diff --git a/packages/graphiql/src/utility/StorageAPI.js b/packages/graphiql/src/utility/StorageAPI.js
index <HASH>..<HASH> 100644
--- a/packages/graphiql/src/utility/StorageAPI.js
+++ b/packages/graphiql/src/utility/StorageAPI.js
@@ -7,7 +7,8 @@
export default class StorageAPI {
constructor(storage) {
- this.storage = storage || window.localStorage;
+ this.storage =
+ storage || (typeof window !== 'undefined' ? window.localStorage : null);
}
get(name) {
|
fix: check `window` is defined before using it (#<I>)
|
graphql_graphiql
|
train
|
js
|
883a07d56ddd7d32bb585d77600eeba0a3c7c482
|
diff --git a/src/carousel/Carousel.js b/src/carousel/Carousel.js
index <HASH>..<HASH> 100644
--- a/src/carousel/Carousel.js
+++ b/src/carousel/Carousel.js
@@ -985,8 +985,9 @@ export default class Carousel extends Component {
showsHorizontalScrollIndicator={false}
showsVerticalScrollIndicator={false}
overScrollMode={'never'}
- directionalLockEnabled={true}
automaticallyAdjustContentInsets={false}
+ directionalLockEnabled={true}
+ pinchGestureEnabled={false}
scrollsToTop={false}
initialNumToRender={initialNumToRender}
maxToRenderPerBatch={maxToRenderPerBatch}
|
refactor(Carousel): disable `pinchGestureEnabled` by default
This is a new `ScrollView` prop, introduced in RN <I>.
|
archriss_react-native-snap-carousel
|
train
|
js
|
6f1c0e638021eeaf94473477493a3f5a3c2cb394
|
diff --git a/packages/cozy-client/src/authentication/mobile.js b/packages/cozy-client/src/authentication/mobile.js
index <HASH>..<HASH> 100644
--- a/packages/cozy-client/src/authentication/mobile.js
+++ b/packages/cozy-client/src/authentication/mobile.js
@@ -1,6 +1,10 @@
/* global prompt */
import { REGISTRATION_ABORT } from '../const'
-import { hasInAppBrowserPlugin, hasSafariPlugin } from 'cozy-device-helper'
+import {
+ hasInAppBrowserPlugin,
+ hasSafariPlugin,
+ isIOSApp
+} from 'cozy-device-helper'
const authenticateWithSafari = url => {
return new Promise((resolve, reject) => {
@@ -70,7 +74,7 @@ const authenticateWithInAppBrowser = url => {
}
export const authenticateWithCordova = async url => {
- if (await hasSafariPlugin()) {
+ if (isIOSApp() && (await hasSafariPlugin())) {
return authenticateWithSafari(url)
} else if (hasInAppBrowserPlugin()) {
return authenticateWithInAppBrowser(url)
|
fix: Rm safariViewController for Android
It works great until the call of the hide() method
|
cozy_cozy-client
|
train
|
js
|
438f352825b6afa5de6edd50845660eaad608077
|
diff --git a/src/ViewableService.php b/src/ViewableService.php
index <HASH>..<HASH> 100644
--- a/src/ViewableService.php
+++ b/src/ViewableService.php
@@ -195,13 +195,12 @@ class ViewableService implements ViewableServiceContract
}
$visitorCookie = Cookie::get($cookieName);
- $visitor = $visitorCookie ?? $this->ipRepository->get();
// Create a new View model instance
$view = app(ViewContract::class)->create([
'viewable_id' => $viewable->getKey(),
'viewable_type' => $viewable->getMorphClass(),
- 'visitor' => $visitor,
+ 'visitor' => $visitorCookie,
'viewed_at' => Carbon::now(),
]);
|
feat: remove IP address as fallback for visitor cookie
|
cyrildewit_eloquent-viewable
|
train
|
php
|
d6ce17b85a6d18a526a9a68e7ec51e7f635ca15b
|
diff --git a/semantic_release/__init__.py b/semantic_release/__init__.py
index <HASH>..<HASH> 100644
--- a/semantic_release/__init__.py
+++ b/semantic_release/__init__.py
@@ -12,5 +12,5 @@ def setup_hook(argv):
:param argv: sys.argv
"""
if len(argv) > 1 and argv[1] in ['version', 'publish', 'changelog']:
- from semantic_release.cli import main
+ from .cli import main
main()
|
chore(imports): Make all imports relative
|
relekang_python-semantic-release
|
train
|
py
|
d1e2f45c45f74c86db6b8d24b754c03f9e384125
|
diff --git a/dclab/features/emodulus/__init__.py b/dclab/features/emodulus/__init__.py
index <HASH>..<HASH> 100644
--- a/dclab/features/emodulus/__init__.py
+++ b/dclab/features/emodulus/__init__.py
@@ -198,6 +198,7 @@ def get_emodulus(area_um=None, deform=None, volume=None, medium="CellCarrier",
deform = np.array(deform, dtype=float, copy=copy)
if px_um:
# Correct deformation for pixelation effect (subtract ddelt).
+ # It is important to do this before scaling datax (area_um/volume).
deform -= get_pixelation_delta(feat_corr=featy,
feat_absc=featx,
data_absc=datax,
@@ -483,5 +484,6 @@ def normalize(data, dmax):
reason this does not work well with LUT data, so we
just normalize it by dividing by the maximum value.
"""
+ assert isinstance(data, np.ndarray)
data /= dmax
return data
|
docs: code comment and sanity test
|
ZELLMECHANIK-DRESDEN_dclab
|
train
|
py
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.