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 |
|---|---|---|---|---|---|
2c3b11b16585b38df871dfd28d53835541666f2b
|
diff --git a/packages/react/src/components/DatePicker/DatePicker.js b/packages/react/src/components/DatePicker/DatePicker.js
index <HASH>..<HASH> 100644
--- a/packages/react/src/components/DatePicker/DatePicker.js
+++ b/packages/react/src/components/DatePicker/DatePicker.js
@@ -329,6 +329,7 @@ export default class DatePicker extends Component {
onValueUpdate: onHook,
});
this.addKeyboardEvents(this.cal);
+ this.addRoleAttributeToDialog();
}
}
}
@@ -386,6 +387,22 @@ export default class DatePicker extends Component {
}
};
+ /**
+ * Flatpickr's calendar dialog is not rendered in a landmark causing an
+ * error with IBM Equal Access Accessibility Checker so we add an aria
+ * role to the container div.
+ */
+ addRoleAttributeToDialog = () => {
+ if (this.inputField) {
+ this.cal.calendarContainer.setAttribute('role', 'region');
+ // IBM EAAC requires an aria-label on a role='region'
+ this.cal.calendarContainer.setAttribute(
+ 'aria-label',
+ 'calendar-container'
+ );
+ }
+ };
+
addKeyboardEvents = (cal) => {
if (this.inputField) {
this.inputField.addEventListener('keydown', (e) => {
|
fix(Datepicker): add aria role to Flatpickr dialog (#<I>)
|
carbon-design-system_carbon-components
|
train
|
js
|
9e49ff0d7fafaf79762b47158581966942bc30d9
|
diff --git a/Helper/Product.php b/Helper/Product.php
index <HASH>..<HASH> 100644
--- a/Helper/Product.php
+++ b/Helper/Product.php
@@ -665,7 +665,7 @@ class Product extends AbstractHelper
);
if (!$webShopPrice) {
$webShopPrice = $price;
- }elseif ($price > 0) {
+ } elseif ($price > 0) {
if ($webShopPrice > $price) {
$webShopPrice = $price;
} else {
@@ -689,7 +689,7 @@ class Product extends AbstractHelper
);
if (!$originalWebShopPrice) {
$originalWebShopPrice = $originalPrice;
- }elseif ($originalPrice > 0) {
+ } elseif ($originalPrice > 0) {
if ($originalWebShopPrice > $originalPrice) {
$originalWebShopPrice = $originalPrice;
} else {
|
fix(code-style): missing spaces CDP-<I>
|
emartech_magento2-extension
|
train
|
php
|
5daf8411ccae819f039be275d2a975a4779907d0
|
diff --git a/error.js b/error.js
index <HASH>..<HASH> 100644
--- a/error.js
+++ b/error.js
@@ -42,6 +42,10 @@ class MongoError extends Error {
static create(options) {
return new MongoError(options);
}
+
+ hasErrorLabel(label) {
+ return this.errorLabels && this.errorLabels.indexOf(label) !== -1;
+ }
}
/**
|
feat(error): all `hasErrorLabel` method to MongoError
This improves readability in the transactions code when branching
on error labels for certain retry scenarios.
|
mongodb_node-mongodb-native
|
train
|
js
|
755830ea064e0af3b89deb7caaf0eae182dd23b1
|
diff --git a/p2p/net/swarm/swarm_test.go b/p2p/net/swarm/swarm_test.go
index <HASH>..<HASH> 100644
--- a/p2p/net/swarm/swarm_test.go
+++ b/p2p/net/swarm/swarm_test.go
@@ -102,12 +102,10 @@ func connectSwarms(t *testing.T, ctx context.Context, swarms []*Swarm) {
}
log.Info("Connecting swarms simultaneously.")
- for _, s1 := range swarms {
- for _, s2 := range swarms {
- if s2.local != s1.local { // don't connect to self.
- wg.Add(1)
- connect(s1, s2.LocalPeer(), s2.ListenAddresses()[0]) // try the first.
- }
+ for i, s1 := range swarms {
+ for _, s2 := range swarms[i+1:] {
+ wg.Add(1)
+ connect(s1, s2.LocalPeer(), s2.ListenAddresses()[0]) // try the first.
}
}
wg.Wait()
|
test: connect each peer precisely once.
Otherwise, some tests will get confused by duplicate (temporary, we close
duplicates quickly) connections.
fixes libp2p/go-libp2p#<I>
|
libp2p_go-libp2p
|
train
|
go
|
513bf10a38e10f5dc69f1a93fe28478df4f0b32d
|
diff --git a/superset/views/core.py b/superset/views/core.py
index <HASH>..<HASH> 100755
--- a/superset/views/core.py
+++ b/superset/views/core.py
@@ -33,7 +33,7 @@ from flask_appbuilder.security.decorators import has_access, has_access_api
from flask_appbuilder.security.sqla import models as ab_models
from flask_babel import gettext as __, lazy_gettext as _
from jinja2.exceptions import TemplateError
-from sqlalchemy import and_, or_, select
+from sqlalchemy import and_, or_
from sqlalchemy.engine.url import make_url
from sqlalchemy.exc import (
ArgumentError,
@@ -1129,8 +1129,8 @@ class Superset(BaseSupersetView): # pylint: disable=too-many-public-methods
username = g.user.username if g.user is not None else None
engine = database.get_sqla_engine(user_name=username)
- with closing(engine.connect()) as conn:
- conn.scalar(select([1]))
+ with closing(engine.raw_connection()) as conn:
+ engine.dialect.do_ping(conn)
return json_success('"OK"')
except CertificateException as ex:
logger.info("Certificate exception")
|
chore: Leverage SQLALchemy ping rather than explicit SELECT 1 for testconn (#<I>)
|
apache_incubator-superset
|
train
|
py
|
86b693dc94aa3cb5c323d27efc96e102e6865b44
|
diff --git a/src/Model.php b/src/Model.php
index <HASH>..<HASH> 100644
--- a/src/Model.php
+++ b/src/Model.php
@@ -467,7 +467,7 @@ abstract class Model extends PhalconModel
$params['order'] = $orderBy;
}
if ($columns) {
- $params['columns'] = is_array($columns) ? explode(',', $columns) : $columns;
+ $params['columns'] = is_array($columns) ? implode(',', $columns) : $columns;
}
if (is_int($limit)) {
$params['limit'] = $limit;
|
fix(Model): implode an array.
|
phwoolcon_phwoolcon
|
train
|
php
|
caf63ab2e99c215057b492416c70fb32585571ad
|
diff --git a/src/index.js b/src/index.js
index <HASH>..<HASH> 100644
--- a/src/index.js
+++ b/src/index.js
@@ -9,7 +9,7 @@ function addModifier(baseClass, modifier) {
function getClassArray(block, element, modifiers = []) {
const baseClass = getBaseClass(block, element);
const modifierFn = addModifier.bind(null, baseClass);
- return [baseClass].concat(modifiers.map(modifierFn));
+ return [baseClass].concat(modifiers.map(modifierFn)).filter(c => c);
}
function getClassesAsString(block, element, modifiers) {
|
fix(modifiers): disallow empty modifiers
Ignore values such as `null` and empty strings when generating modifier classes.
|
jlengstorf_bemmit
|
train
|
js
|
a090076323955cc24894deba59a3f0faf3868809
|
diff --git a/cloudvolume/datasource/graphene/mesh/sharded.py b/cloudvolume/datasource/graphene/mesh/sharded.py
index <HASH>..<HASH> 100644
--- a/cloudvolume/datasource/graphene/mesh/sharded.py
+++ b/cloudvolume/datasource/graphene/mesh/sharded.py
@@ -149,13 +149,9 @@ class GrapheneShardedMeshSource(GrapheneUnshardedMeshSource):
filenames = self.get_fragment_filenames(seg_id, level=level, bbox=bounding_box)
lists = self.parse_manifest_filenames(filenames)
- files = []
+ meshes = []
if lists['dynamic']:
- files = CloudFiles(dynamic_cloudpath, green=self.config.green).get(lists['dynamic'])
-
- meshes = [
- f['content'] for f in files
- ]
+ meshes = CloudFiles(dynamic_cloudpath, green=self.config.green).get(lists['dynamic'])
fetches = []
for layer_id, filename, byte_start, size in lists['initial']:
@@ -166,7 +162,6 @@ class GrapheneShardedMeshSource(GrapheneUnshardedMeshSource):
})
cloudpath = self.meta.join(self.meta.meta.cloudpath, self.meta.mesh_path, 'initial')
- raw_binaries = []
initial_meshes = CloudFiles(cloudpath, green=self.config.green).get(fetches)
meshes += initial_meshes
|
fix: incompatibility between inital and dynamic meshes (#<I>)
|
seung-lab_cloud-volume
|
train
|
py
|
ac09e3851851c27a80e7f283299553127c30a3a0
|
diff --git a/src/shared/get-support.js b/src/shared/get-support.js
index <HASH>..<HASH> 100644
--- a/src/shared/get-support.js
+++ b/src/shared/get-support.js
@@ -7,7 +7,7 @@ function calcSupport() {
const document = getDocument();
return {
- smoothScroll: 'scrollBehavior' in document.documentElement.style,
+ smoothScroll: document.documentElement && 'scrollBehavior' in document.documentElement.style,
touch: !!(
'ontouchstart' in window ||
|
fix(core): double check for documentElement in smoothScroll detection
|
nolimits4web_swiper
|
train
|
js
|
c5ae330b00f64939e7d74cc4f8d787e01e6d16ed
|
diff --git a/src/performance/captureHardNavigation.js b/src/performance/captureHardNavigation.js
index <HASH>..<HASH> 100644
--- a/src/performance/captureHardNavigation.js
+++ b/src/performance/captureHardNavigation.js
@@ -22,7 +22,7 @@ function isValidTrace (transaction, trace) {
module.exports = function captureHardNavigation (transaction) {
if (transaction.isHardNavigation && window.performance && window.performance.timing) {
- var baseTime = window.performance.timing.navigationStart
+ var baseTime = window.performance.timing.fetchStart
var timings = window.performance.timing
transaction._rootTrace._start = transaction._start = 0
|
fix: use fetchStart instead of navigationStart for the base time
|
opbeat_opbeat-js-core
|
train
|
js
|
361ac45d72875f7a070601b17c27fdb3773bb1ec
|
diff --git a/src/foremast/utils/lookups.py b/src/foremast/utils/lookups.py
index <HASH>..<HASH> 100644
--- a/src/foremast/utils/lookups.py
+++ b/src/foremast/utils/lookups.py
@@ -102,8 +102,9 @@ class GitLookup():
"""
file_contents = ''
+ file_path = os.path.join(self.runway_dir, filename)
+
try:
- file_path = os.path.join(self.runway_dir, filename)
with open(file_path, 'rt') as lookup_file:
file_contents = lookup_file.read()
except FileNotFoundError:
|
refactor: Move safe assignment outside of try
See also: #<I>
|
foremast_foremast
|
train
|
py
|
a1a8ca4814dc35766b897f2d825212faf088621a
|
diff --git a/src/util/Constants.js b/src/util/Constants.js
index <HASH>..<HASH> 100644
--- a/src/util/Constants.js
+++ b/src/util/Constants.js
@@ -723,7 +723,7 @@ exports.VerificationLevels = createEnum(['NONE', 'LOW', 'MEDIUM', 'HIGH', 'VERY_
* * MESSAGE_ALREADY_HAS_THREAD
* * THREAD_LOCKED
* * MAXIMUM_ACTIVE_THREADS
- * * MAXIMUM_ACTIVE_ANNOUCEMENT_THREAD
+ * * MAXIMUM_ACTIVE_ANNOUNCEMENT_THREAD
* @typedef {string} APIError
* @see {@link https://discord.com/developers/docs/topics/opcodes-and-status-codes#json-json-error-codes}
*/
|
docs(Constants): fix typo "announcement" (#<I>)
|
discordjs_discord.js
|
train
|
js
|
712bb76528f88e7b217ee053450c00dc66c8b11b
|
diff --git a/src/index.js b/src/index.js
index <HASH>..<HASH> 100644
--- a/src/index.js
+++ b/src/index.js
@@ -23,7 +23,7 @@ module.exports = function createServePlaceholder (_options) {
}
// In case of no handler guessed
- if (handler === undefined) {
+ if (typeof handler === 'undefined') {
if (options.skipUnknown) {
// Skip this middleware
return next()
|
refactor: use typeof for undefined check
|
nuxt_serve-placeholder
|
train
|
js
|
f0ed81725b6e9f4a3fa69a575841caa4efacd65c
|
diff --git a/packages/node_modules/@webex/internal-plugin-wdm/src/config.js b/packages/node_modules/@webex/internal-plugin-wdm/src/config.js
index <HASH>..<HASH> 100644
--- a/packages/node_modules/@webex/internal-plugin-wdm/src/config.js
+++ b/packages/node_modules/@webex/internal-plugin-wdm/src/config.js
@@ -13,7 +13,8 @@ export default {
hydra: process.env.HYDRA_SERVICE_URL || 'https://api.ciscospark.com/v1'
},
defaults: {
- name: process.title.trim() || inBrowser && 'browser' || 'javascript',
+ name: (typeof process.title === 'string' ? process.title.trim() : undefined) ||
+ inBrowser && 'browser' || 'javascript',
deviceType: 'WEB',
model: 'web-js-sdk',
localizedModel: 'webex-js-sdk',
|
fix(internal-plugin-wdm): hotfix possible error trigger
Update config.device.defaults.name to also validate that
process.title is a string before attempting to run the
String.trim() command.
|
webex_spark-js-sdk
|
train
|
js
|
cba1aadbbe3474a001e4787cf85fabde91ebd3ec
|
diff --git a/lib/events-ha-node.js b/lib/events-ha-node.js
index <HASH>..<HASH> 100644
--- a/lib/events-ha-node.js
+++ b/lib/events-ha-node.js
@@ -73,7 +73,9 @@ class EventsHaNode extends EventsNode {
switch (type) {
case INTEGRATION_UNLOADED:
case INTEGRATION_NOT_LOADED:
- this.isEnabled = true;
+ if (this.type !== 'trigger-state') {
+ this.isEnabled = true;
+ }
this.removeSubscription();
this.updateConnectionStatus();
break;
|
fix: stop enabling trigger-state node on connection to HA
Fixes: #<I>
|
zachowj_node-red-contrib-home-assistant-websocket
|
train
|
js
|
ccf6f5d8c2b54414169f820b1b12ce24f4dedb8e
|
diff --git a/packages/build/postcss/postcss-css-var-selectors.js b/packages/build/postcss/postcss-css-var-selectors.js
index <HASH>..<HASH> 100644
--- a/packages/build/postcss/postcss-css-var-selectors.js
+++ b/packages/build/postcss/postcss-css-var-selectors.js
@@ -11,7 +11,7 @@ const createSelectorsForVar = (decl, options) => {
}).props
.map((p, i, newProps) =>
postcss.parse(`
-.${prop + (newProps.length > 1 ? `-${p}` : '')} { ${p}: ${value}; }
+.${prop + (newProps.length > 1 ? `--${p}` : '')} { ${p}: ${value}; }
`)
)
}
|
refactor(build): a bit more bem in the multi-prop modifiers
|
pluralsight_design-system
|
train
|
js
|
d497f6f6716df40b74efe85a77034f1d22a41756
|
diff --git a/ui/src/utils/date.js b/ui/src/utils/date.js
index <HASH>..<HASH> 100644
--- a/ui/src/utils/date.js
+++ b/ui/src/utils/date.js
@@ -308,7 +308,7 @@ export function extractDate (str, mask, dateLocale) {
const date = new Date(
d.year,
d.month === null ? null : d.month - 1,
- d.day,
+ d.day === null ? 1 : d.day,
d.hour,
d.minute,
d.second,
|
fix(extractDate): default to first day of month instead of last day of prev month when day is missing in the mask #<I> (#<I>)
|
quasarframework_quasar
|
train
|
js
|
df2eec868c598c748822337c76d153619c3a161e
|
diff --git a/src/mixins/menuable.js b/src/mixins/menuable.js
index <HASH>..<HASH> 100644
--- a/src/mixins/menuable.js
+++ b/src/mixins/menuable.js
@@ -283,10 +283,6 @@ export default {
this.dimensions = Object.assign({}, dimensions)
},
updateDimensions () {
- // Ensure that overflow calculation
- // can work properly every update
- this.resetDimensions()
-
const dimensions = {}
// Activator should already be shown
|
fix(menuable): removed position reset
position reset was causing some browsers to recalc position before it could be reset causing a
wobble
fixes #<I>
|
vuetifyjs_vuetify
|
train
|
js
|
4def1356fdb11b2280877c6c8dc0ee7ee6772c78
|
diff --git a/index.js b/index.js
index <HASH>..<HASH> 100644
--- a/index.js
+++ b/index.js
@@ -11,7 +11,7 @@ module.exports._opts = function _opts(agent) {
return {
headers: {
'User-Agent': 'NRK%20TV/43 CFNetwork/711.5.6 Darwin/14.0.0',
- 'accept': '*/*',
+ accept: '*/*',
'app-version-ios': '43',
'Accept-Language:': 'en-us',
},
@@ -25,7 +25,7 @@ module.exports._opts = function _opts(agent) {
'AppleWebKit/536.26 (KHTML, like Gecko) Version/6.0',
'Mobile/10A5376e Safari/8536.25',
].join(' '),
- 'accept': 'application/json, text/javascript, */*; q=0.01',
+ accept: 'application/json, text/javascript, */*; q=0.01',
'x-requested-with': 'XMLHttpRequest',
},
};
|
fix(eslint): unnecessarily quoted property `accept`
|
Starefossen_node-nrk
|
train
|
js
|
dc819afa449978f8be6670072248ba8ebab6b3ec
|
diff --git a/cmd/data-usage-cache.go b/cmd/data-usage-cache.go
index <HASH>..<HASH> 100644
--- a/cmd/data-usage-cache.go
+++ b/cmd/data-usage-cache.go
@@ -549,7 +549,7 @@ func (d *dataUsageCache) deserialize(r io.Reader) error {
return io.ErrUnexpectedEOF
}
switch b[0] {
- case 1:
+ case 1, 2:
return errors.New("cache version deprecated (will autoupdate)")
case dataUsageCacheVer:
default:
|
fix: auto update crawler meta version
PR <I>bcd<I>c2a9a5f<I>ceb<I>e9fe<I>cdc9 introduced
version '3', we need to make sure that we do not
print an unexpected error instead log a message to
indicate we will auto update the version.
|
minio_minio
|
train
|
go
|
06261f1c994953f64347ce6ecf37d3f7e1f68ca3
|
diff --git a/src/pubsub.js b/src/pubsub.js
index <HASH>..<HASH> 100644
--- a/src/pubsub.js
+++ b/src/pubsub.js
@@ -448,7 +448,7 @@ module.exports = (common) => {
)
})
- it('send/receive 10k messages', function (done) {
+ it('send/receive 10k messages', (done) => {
this.timeout(2 * 60 * 1000)
const msgBase = 'msg - '
@@ -459,9 +459,12 @@ module.exports = (common) => {
let counter = 0
const sub1 = (msg) => {
- const expectedMsg = msgBase + receivedCount
- const receivedMsg = msg.data.toString()
- expect(receivedMsg).to.eql(expectedMsg)
+ // go-ipfs can't send messages in order when there are
+ // only two nodes in the same machine ¯\_(ツ)_/¯
+ // https://github.com/ipfs/js-ipfs-api/pull/493#issuecomment-289499943
+ // const expectedMsg = msgBase + receivedCount
+ // const receivedMsg = msg.data.toString()
+ // expect(receivedMsg).to.eql(expectedMsg)
receivedCount++
|
feat: make tests go-ipfs friendly
|
ipfs_interface-js-ipfs-core
|
train
|
js
|
fd8f244e2f3bb457e61be47463995839997647be
|
diff --git a/docusaurus/docusaurus.config.js b/docusaurus/docusaurus.config.js
index <HASH>..<HASH> 100644
--- a/docusaurus/docusaurus.config.js
+++ b/docusaurus/docusaurus.config.js
@@ -70,7 +70,7 @@ module.exports = {
},
theme: {
- // customCss: require.resolve('./src/theme/ReactLiveScope/index.scss'),
+ customCss: require.resolve('./src/theme/ReactLiveScope/index.scss'),
},
},
],
|
feat(dinosaurdocs): add custom sass
|
Availity_availity-react
|
train
|
js
|
f97ae6a26a3678d6bad99055d7b2fe378b328a37
|
diff --git a/src/test/java/com/adobe/epubcheck/cli/CheckerIT.java b/src/test/java/com/adobe/epubcheck/cli/CheckerIT.java
index <HASH>..<HASH> 100644
--- a/src/test/java/com/adobe/epubcheck/cli/CheckerIT.java
+++ b/src/test/java/com/adobe/epubcheck/cli/CheckerIT.java
@@ -21,7 +21,7 @@ public class CheckerIT
{
try
{
- Process process = run(valid30EPUB + "minimal.epub");
+ Process process = run(valid30EPUB + "ocf-minimal-valid.epub");
InputStream stderr = process.getErrorStream();
process.waitFor();
assertEmpty(stderr);
|
test: fix CheckerIT test after renaming the minimal packaged EPUB 3
|
w3c_epubcheck
|
train
|
java
|
b0f2eee597a56aa8e58c7349fd941c5a24fe5256
|
diff --git a/src/js/core/icon.js b/src/js/core/icon.js
index <HASH>..<HASH> 100644
--- a/src/js/core/icon.js
+++ b/src/js/core/icon.js
@@ -48,7 +48,9 @@ const Icon = {
props: ['icon'],
- data: {include: []},
+ data: {
+ include: ['focusable']
+ },
isIcon: true,
diff --git a/src/js/core/svg.js b/src/js/core/svg.js
index <HASH>..<HASH> 100644
--- a/src/js/core/svg.js
+++ b/src/js/core/svg.js
@@ -14,6 +14,7 @@ export default {
ratio: Number,
'class': String,
strokeAnimation: Boolean,
+ focusable: Boolean,
attributes: 'list'
},
@@ -21,7 +22,8 @@ export default {
ratio: 1,
include: ['style', 'class'],
'class': '',
- strokeAnimation: false
+ strokeAnimation: false,
+ focusable: 'false'
},
connected() {
|
fix(icon): make SVG icons non-focusable in IE
|
uikit_uikit
|
train
|
js,js
|
c9faaeb8430283b32dd2b5e2359c270875695390
|
diff --git a/selector.go b/selector.go
index <HASH>..<HASH> 100644
--- a/selector.go
+++ b/selector.go
@@ -466,10 +466,13 @@ func siblingSelector(s1, s2 Selector, adjacent bool) Selector {
}
if adjacent {
- if n.PrevSibling == nil {
- return false
+ for n = n.PrevSibling; n != nil; n = n.PrevSibling {
+ if n.Type == html.TextNode || n.Type == html.CommentNode {
+ continue
+ }
+ return s1(n)
}
- return s1(n.PrevSibling)
+ return false
}
// Walk backwards looking for element that matches s1
diff --git a/selector_test.go b/selector_test.go
index <HASH>..<HASH> 100644
--- a/selector_test.go
+++ b/selector_test.go
@@ -321,7 +321,9 @@ var selectorTests = []selectorTest{
},
},
{
- `<p id="1"><p id="2"></p><address></address><p id="3">`,
+ `<p id="1"></p>
+ <!--comment-->
+ <p id="2"></p><address></address><p id="3">`,
`p + p`,
[]string{
`<p id="2">`,
|
fix: adjacent sibling selector should ignore text node and comment node
|
andybalholm_cascadia
|
train
|
go,go
|
effa0279ce6da26fd7ddbf47175b287868009707
|
diff --git a/packages/webpack-cli/lib/webpack-cli.js b/packages/webpack-cli/lib/webpack-cli.js
index <HASH>..<HASH> 100644
--- a/packages/webpack-cli/lib/webpack-cli.js
+++ b/packages/webpack-cli/lib/webpack-cli.js
@@ -1337,7 +1337,7 @@ class WebpackCLI {
} else {
const { interpret } = this.utils;
- // Order defines the priority, in increasing order
+ // Order defines the priority, in decreasing order
const defaultConfigFiles = ['webpack.config', '.webpack/webpack.config', '.webpack/webpackfile']
.map((filename) =>
// Since .cjs is not available on interpret side add it manually to default config extension list
|
fix: comment on config resolution priority (#<I>)
|
webpack_webpack-cli
|
train
|
js
|
a436435d0f71870dabf5c7a71aa0dfaa8ad9dcb3
|
diff --git a/lib/instrumentation/span.js b/lib/instrumentation/span.js
index <HASH>..<HASH> 100644
--- a/lib/instrumentation/span.js
+++ b/lib/instrumentation/span.js
@@ -122,10 +122,9 @@ Span.prototype._encode = function (cb) {
timestamp: self.timestamp,
duration: self.duration(),
context: undefined,
- stacktrace: undefined
+ stacktrace: frames
}
- if (frames) payload.stacktrace = frames
if (self._db || self._tags) {
payload.context = {
db: self._db || undefined,
|
refactor: improve span payload encoding (#<I>)
|
elastic_apm-agent-nodejs
|
train
|
js
|
dc7cfb603f39bedc2528d9d627a7b1b423107930
|
diff --git a/src/webpack.js b/src/webpack.js
index <HASH>..<HASH> 100644
--- a/src/webpack.js
+++ b/src/webpack.js
@@ -3,7 +3,6 @@
* @flow
*/
-import invariant from 'invariant';
import {renderToString} from './index';
import {
findConfig,
@@ -22,4 +21,4 @@ module.exports = function reactdown(source: string): string {
parseConfigFromQuery(this.query)
);
return renderToString(source, config).code;
-}
+};
|
style(webpack): lint errors
|
andreypopp_reactdown
|
train
|
js
|
ca88bb6c178475ef4c872a750a94c7086bfa37c5
|
diff --git a/packages/typography/src/__stories__/Typography.new-stories.js b/packages/typography/src/__stories__/Typography.new-stories.js
index <HASH>..<HASH> 100644
--- a/packages/typography/src/__stories__/Typography.new-stories.js
+++ b/packages/typography/src/__stories__/Typography.new-stories.js
@@ -15,15 +15,15 @@ export default {
argTypes: {
variant: {
options: AVAILABLE_VARIANTS,
- control: { type: "select" },
+ control: "select",
},
align: {
options: AVAILABLE_ALIGNMENTS,
- control: { type: "select" },
+ control: "select",
},
fontWeight: {
options: AVAILABLE_FONT_WEIGHTS,
- control: { type: "select" },
+ control: "select",
},
},
parameters: {
|
feat: use latest theme-data
- forcing a missed release, this should be a docs: commit for new storybook stories
|
Autodesk_hig
|
train
|
js
|
1123e5ca1f55a31cd2dcd2b78bd3fbfd428cea3c
|
diff --git a/pkg/cli/environment.go b/pkg/cli/environment.go
index <HASH>..<HASH> 100644
--- a/pkg/cli/environment.go
+++ b/pkg/cli/environment.go
@@ -95,12 +95,12 @@ func (s *EnvSettings) EnvVars() map[string]string {
"HELM_REGISTRY_CONFIG": s.RegistryConfig,
"HELM_REPOSITORY_CACHE": s.RepositoryCache,
"HELM_REPOSITORY_CONFIG": s.RepositoryConfig,
- "HELM_NAMESPACE": s.Namespace,
+ "HELM_NAMESPACE": s.Namespace(),
"HELM_KUBECONTEXT": s.KubeContext,
}
- if s.KubeConfig != "" {
- envvars["KUBECONFIG"] = s.KubeConfig
+ if s.kubeConfig != "" {
+ envvars["KUBECONFIG"] = s.kubeConfig
}
return envvars
|
fix(cli): Fixes incorrect variable reference
Because these were additions, git didn't pick up that the recent refactor of
env settings had changed some of the variables. This fixes those small changes
|
helm_helm
|
train
|
go
|
b60afa47ed89e515f263ef37053eb1a5c1c75242
|
diff --git a/core/src/elements/ons-ripple/index.js b/core/src/elements/ons-ripple/index.js
index <HASH>..<HASH> 100644
--- a/core/src/elements/ons-ripple/index.js
+++ b/core/src/elements/ons-ripple/index.js
@@ -51,10 +51,18 @@ class RippleElement extends BaseElement {
*/
/**
- * @attribute center
+ * @attribute color
+ * @type {String}
+ * @description
+ * [en]Color of the ripple effect.[/en]
+ * [ja]リップルエフェクトの色を指定します。[/ja]
+ */
+
+ /**
+ * @attribute background
* @description
- * [en]If this attribute is set, the effect will originate from the center.[/en]
- * [ja]この属性が設定された場合、その効果は要素の中央から始まります。[/ja]
+ * [en]Color of the background.[/en]
+ * [ja]背景の色を設定します。[/ja]
*/
/**
|
docs(ons-ripple): Add docs for "background" attribute.
|
OnsenUI_OnsenUI
|
train
|
js
|
d1e3baa537f4342dcf9e201983c6a656e8c1b4e1
|
diff --git a/src/Exscript/util/template.py b/src/Exscript/util/template.py
index <HASH>..<HASH> 100644
--- a/src/Exscript/util/template.py
+++ b/src/Exscript/util/template.py
@@ -20,7 +20,7 @@ from Exscript.interpreter import Parser
def _compile(conn, filename, template, parser_kwargs, **kwargs):
if conn:
- kwargs.update(conn.get_host().vars)
+ kwargs.update(conn.get_host().get_all())
# Init the parser.
parser = Parser(**parser_kwargs)
|
fix: Exscript.util.template.run() on hosts that have no variables defined.
|
knipknap_exscript
|
train
|
py
|
988197c7954d6e4123c1650cab090ba8f529d6f9
|
diff --git a/src/_pytest/tmpdir.py b/src/_pytest/tmpdir.py
index <HASH>..<HASH> 100644
--- a/src/_pytest/tmpdir.py
+++ b/src/_pytest/tmpdir.py
@@ -158,9 +158,9 @@ class TempPathFactory:
def get_user() -> Optional[str]:
"""Return the current user name, or None if getuser() does not work
in the current environment (see #1010)."""
- import getpass
-
try:
+ # In some exotic environments, getpass may not be importable.
+ import getpass
return getpass.getuser()
except (ImportError, KeyError):
return None
|
fix: move 'import getpass' statement to try-clause
|
pytest-dev_pytest
|
train
|
py
|
54b0f8b224c2efaea8844ba684290d279893b1fb
|
diff --git a/package-scripts.js b/package-scripts.js
index <HASH>..<HASH> 100644
--- a/package-scripts.js
+++ b/package-scripts.js
@@ -1,8 +1,8 @@
-/* eslint prefer-template:"off" */ // this file runs in node 0.10.0
-const nodeVersion = Number(process.version.match(/^v(\d+\.\d+)/)[1])
-const validate = ['lint', 'build', 'cover']
+/* eslint prefer-template:"off", no-var:"off" */ // this file runs in node 0.10.0
+var nodeVersion = Number(process.version.match(/^v(\d+\.\d+)/)[1])
+var validate = ['lint', 'build', 'cover']
if (nodeVersion < 4) {
- validate.slice(1)
+ validate = validate.slice(1)
}
module.exports = {
scripts: {
|
fix(scripts): validate needs reassignment
|
kentcdodds_nps
|
train
|
js
|
ede0ab8d80a5d77429687a03fb2c61078306a053
|
diff --git a/index.js b/index.js
index <HASH>..<HASH> 100644
--- a/index.js
+++ b/index.js
@@ -246,7 +246,7 @@ class CrawlKit {
let timeoutHandler;
const runnerId = next.value[0];
const runner = next.value[1];
- Promise.all([runner.getCompanionFiles() || []].map((filename) => {
+ Promise.all((runner.getCompanionFiles() || []).map((filename) => {
return new Promise((injected, reject) => {
scope.page.injectJs(filename, (err) => {
if (err) {
|
fix: companionfiles was always an empty array
|
crawlkit_crawlkit
|
train
|
js
|
66c86a6689aaac82006fa47762bd86496ad76bf7
|
diff --git a/lib/config.js b/lib/config.js
index <HASH>..<HASH> 100644
--- a/lib/config.js
+++ b/lib/config.js
@@ -23,18 +23,19 @@ var UrlPattern = function(url) {
var createPatternObject = function(pattern) {
- if (helper.isString(pattern)) {
+ if (pattern && helper.isString(pattern)) {
return helper.isUrlAbsolute(pattern) ? new UrlPattern(pattern) : new Pattern(pattern);
}
if (helper.isObject(pattern)) {
- if (!helper.isDefined(pattern.pattern)) {
- log.warn('Invalid pattern %s!\n\tObject is missing "pattern" property".', pattern);
- }
-
- return helper.isUrlAbsolute(pattern.pattern) ?
+ if (pattern.pattern && helper.isString(pattern.pattern)) {
+ return helper.isUrlAbsolute(pattern.pattern) ?
new UrlPattern(pattern.pattern) :
new Pattern(pattern.pattern, pattern.served, pattern.included, pattern.watched);
+ }
+
+ log.warn('Invalid pattern %s!\n\tObject is missing "pattern" property.', pattern);
+ return new Pattern(null, false, false, false);
}
log.warn('Invalid pattern %s!\n\tExpected string or object with "pattern" property.', pattern);
|
fix(config): ignore empty string patterns
An empty string pattern is a mistake - there is no reason to do that. It can however happen (for instance when you generate the config file).
Before this fix, Karma would try to watch this empty string pattern, which would result in watching the entire `basePath` directory.
Now, the pattern will be ignored and a warning showed.
|
karma-runner_karma
|
train
|
js
|
0627114ab3c9d440d852933a54f63be715dcb748
|
diff --git a/src/plugin/release/index.js b/src/plugin/release/index.js
index <HASH>..<HASH> 100644
--- a/src/plugin/release/index.js
+++ b/src/plugin/release/index.js
@@ -46,6 +46,12 @@ function action (config, directory, options) {
? config.releaseBranch
: 'master'
+ const { code } = execSync('git checkout ' + releaseBranch)
+
+ if (code !== 0) {
+ throw new Error('Could not switch to ' + releaseBranch)
+ }
+
const packages = config.packages.map(getPkg(directory))
checkRelease(packages).then(function (status) {
|
fix(northbrook): switch to releaseBranch before doing anything
|
northbrookjs_northbrook
|
train
|
js
|
0c59c7b3e824e60ad005c5b2301df50de1f28bd6
|
diff --git a/config/nightwatch.conf.js b/config/nightwatch.conf.js
index <HASH>..<HASH> 100644
--- a/config/nightwatch.conf.js
+++ b/config/nightwatch.conf.js
@@ -2,12 +2,12 @@
const path = require('path')
module.exports = {
- src_folders: path.resolve('test/specs/'),
- globals_path: path.resolve('test/globals.js'),
- output_folder: path.resolve('test/reports'),
+ src_folders: path.resolve('tests/specs/'),
+ globals_path: path.resolve('tests/globals.js'),
+ output_folder: path.resolve('tests/reports'),
custom_commands_path: [path.resolve('node_modules/nightwatch-accessibility/commands')],
custom_assertions_path: [path.resolve('node_modules/nightwatch-accessibility/assertions')],
- page_objects_path: path.resolve('test/page-objects'),
+ page_objects_path: path.resolve('tests/page-objects'),
selenium: {
start_process: false,
},
|
fix(nighwatch): Update path to /tests in config file
|
telus_tds-core
|
train
|
js
|
0055d476d90fbf1ee8175585f4f532e784bfd750
|
diff --git a/multiqc/modules/ngsderive/ngsderive.py b/multiqc/modules/ngsderive/ngsderive.py
index <HASH>..<HASH> 100644
--- a/multiqc/modules/ngsderive/ngsderive.py
+++ b/multiqc/modules/ngsderive/ngsderive.py
@@ -264,6 +264,9 @@ class MultiqcModule(BaseMultiqcModule):
headers["majoritypctdetected"] = {
"title": "Read Length: % Supporting",
"description": "Percentage of reads which were measured at the predicted read length.",
+ "min": 0,
+ "max": 100,
+ "suffix": "%",
}
self.general_stats_addcols(data, headers)
|
refactor: add percentage suffix to read length %
|
ewels_MultiQC
|
train
|
py
|
cff9d3e294fdf074c8cdeded7e756e442c77e453
|
diff --git a/src/client/index.js b/src/client/index.js
index <HASH>..<HASH> 100644
--- a/src/client/index.js
+++ b/src/client/index.js
@@ -115,7 +115,7 @@ const setOptions = ({
}
// Universal method (client + server)
-const getSession = async ({ req, ctx, triggerEvent = true } = {}) => {
+export const getSession = async ({ req, ctx, triggerEvent = true } = {}) => {
// If passed 'appContext' via getInitialProps() in _app.js then get the req
// object from ctx and use that for the req value to allow getSession() to
// work seemlessly in getInitialProps() on server side pages *and* in _app.js.
|
fix: export getSession [skip release]
somehow the default export does not work in the dev app
|
iaincollins_next-auth
|
train
|
js
|
88247750fd4c0180a2c27e292a17c2208ea28307
|
diff --git a/karma.conf.js b/karma.conf.js
index <HASH>..<HASH> 100644
--- a/karma.conf.js
+++ b/karma.conf.js
@@ -31,8 +31,6 @@ module.exports = function (config) {
{pattern: 'node_modules/@angular/**/*.js', included: false, watched: false},
{pattern: 'node_modules/@angular/**/*.js.map', included: false, watched: false},
- {pattern: 'systemjs.config.js', included: false, watched: false},
-
'karma-test-shim.js',
{ pattern: 'lib/**/*.js', included: false },
|
fix(build): removed unneeded path
|
Stabzs_Angular2-Toaster
|
train
|
js
|
610cb1088fcb84ec88aa4b7b3d3422c8a17542fe
|
diff --git a/scripts/sass-render/index.js b/scripts/sass-render/index.js
index <HASH>..<HASH> 100644
--- a/scripts/sass-render/index.js
+++ b/scripts/sass-render/index.js
@@ -37,7 +37,13 @@ async function sassToCss(sassFile) {
},
outputStyle: 'compressed',
});
- return result.css.toString();
+
+ // Strip any Byte Order Marking from output CSS
+ let cssStr = result.css.toString();
+ if (cssStr.charCodeAt(0) === 0xFEFF) {
+ cssStr = cssStr.substr(1);
+ }
+ return cssStr;
}
async function sassRender(sourceFile, templateFile, outputFile) {
|
fix(select): Strip byte order mark in CSS compilation
|
material-components_material-components-web-components
|
train
|
js
|
e6e2f62a7ad97cc7b55568376d72b0dcad4b6592
|
diff --git a/src/router-configuration.js b/src/router-configuration.js
index <HASH>..<HASH> 100644
--- a/src/router-configuration.js
+++ b/src/router-configuration.js
@@ -30,6 +30,9 @@ export class RouterConfiguration {
* @chainable
*/
addPipelineStep(name: string, step: Function|PipelineStep): RouterConfiguration {
+ if (step === null || step === undefined) {
+ throw new Error('Pipeline step cannot be null or undefined.');
+ }
this.pipelineSteps.push({name, step});
return this;
}
|
fix(router-configuration): throw early on invalid pipeline steps
|
aurelia_router
|
train
|
js
|
dc6679d636fb0404be5502b4ee6f22ae3eb1358f
|
diff --git a/src/Tag/METER.php b/src/Tag/METER.php
index <HASH>..<HASH> 100644
--- a/src/Tag/METER.php
+++ b/src/Tag/METER.php
@@ -5,7 +5,7 @@ namespace Mpdf\Tag;
use Mpdf\Mpdf;
-class METER extends Tag
+class METER extends InlineTag
{
public function open($attr, &$ahtml, &$ihtml)
@@ -304,6 +304,7 @@ class METER extends Tag
public function close(&$ahtml, &$ihtml)
{
+ parent::close($ahtml, $ihtml);
$this->mpdf->ignorefollowingspaces = false;
$this->mpdf->inMeter = false;
}
|
fix: make PROGRESS and METER inline tags again
|
mpdf_mpdf
|
train
|
php
|
5383450a6a35f856084cefbffd9ef1fbc4e59084
|
diff --git a/config/webpack.dev.js b/config/webpack.dev.js
index <HASH>..<HASH> 100644
--- a/config/webpack.dev.js
+++ b/config/webpack.dev.js
@@ -87,8 +87,10 @@ module.exports = webpackMerge(commonConfig, {
*
* See: http://webpack.github.io/docs/configuration.html#output-chunkfilename
*/
- chunkFilename: '[id].chunk.js'
+ chunkFilename: '[id].chunk.js',
+ library: 'ac_[name]',
+ libraryTarget: 'var',
},
plugins: [
|
chore: provide var lib for dev
|
inchingorg_xdata-web
|
train
|
js
|
db5df8d19f157eab4e9d93525dc22d1e73b4614e
|
diff --git a/go/mysql/collations/integration/main_test.go b/go/mysql/collations/integration/main_test.go
index <HASH>..<HASH> 100644
--- a/go/mysql/collations/integration/main_test.go
+++ b/go/mysql/collations/integration/main_test.go
@@ -38,6 +38,8 @@ var (
var waitmysql = flag.Bool("waitmysql", false, "")
func mysqlconn(t *testing.T) *mysql.Conn {
+ t.Skipf("temporarily disabled because of MySQL upgrade")
+
conn, err := mysql.Connect(context.Background(), &connParams)
if err != nil {
t.Fatal(err)
|
ci: temporarily disable integration tests
|
vitessio_vitess
|
train
|
go
|
8c70fc1f54846adc1ff21d1b5e2533ac97b5a4d3
|
diff --git a/src/main/java/no/finn/unleash/repository/ToggleCollection.java b/src/main/java/no/finn/unleash/repository/ToggleCollection.java
index <HASH>..<HASH> 100644
--- a/src/main/java/no/finn/unleash/repository/ToggleCollection.java
+++ b/src/main/java/no/finn/unleash/repository/ToggleCollection.java
@@ -12,7 +12,7 @@ public final class ToggleCollection {
private final int version = 1; // required for serialization
private final transient Map<String, FeatureToggle> cache;
- ToggleCollection(final Collection<FeatureToggle> features) {
+ public ToggleCollection(final Collection<FeatureToggle> features) {
this.features = ensureNotNull(features);
this.cache = new ConcurrentHashMap<>();
for(FeatureToggle featureToggle : this.features) {
|
fix: Make ToggleCollection constructor public (#<I>)
|
Unleash_unleash-client-java
|
train
|
java
|
2ae1a45f2017fbaf945103912b368621e1969fc8
|
diff --git a/src/js/mixin/slider-autoplay.js b/src/js/mixin/slider-autoplay.js
index <HASH>..<HASH> 100644
--- a/src/js/mixin/slider-autoplay.js
+++ b/src/js/mixin/slider-autoplay.js
@@ -35,7 +35,7 @@ export default {
if (document.hidden) {
this.stopAutoplay();
} else {
- this.startAutoplay();
+ !this.userInteracted && this.startAutoplay();
}
}
@@ -87,7 +87,7 @@ export default {
this.stopAutoplay();
- if (this.autoplay && !this.userInteracted) {
+ if (this.autoplay) {
this.interval = setInterval(
() => !(this.isHovering && this.pauseOnHover) && !this.stack.length && this.show('next'),
this.autoplayInterval
|
fix: autoplay in slider-drag after userinteraction
|
uikit_uikit
|
train
|
js
|
2c50d5c2c7bf34f26b2f6e605673a78cc3602602
|
diff --git a/client/deis.py b/client/deis.py
index <HASH>..<HASH> 100755
--- a/client/deis.py
+++ b/client/deis.py
@@ -658,10 +658,13 @@ class DeisClient(object):
-a --app=<app>
the uniquely identifiable name for the application.
"""
+ command = ' '.join(args.get('<command>'))
+ self._logger.info('Running `{}`...'.format(command))
+
app = args.get('--app')
if not app:
app = self._session.app
- body = {'command': ' '.join(args.get('<command>'))}
+ body = {'command': command}
response = self._dispatch('post',
"/api/apps/{}/run".format(app),
json.dumps(body))
|
feat(client): add loading info msg to run command
|
deis_deis
|
train
|
py
|
6db8d7918dbb2c769858c0e89c2f027e3ee33757
|
diff --git a/docs/fiddles/system/protocol-handler/launch-app-from-URL-in-another-app/main.js b/docs/fiddles/system/protocol-handler/launch-app-from-URL-in-another-app/main.js
index <HASH>..<HASH> 100644
--- a/docs/fiddles/system/protocol-handler/launch-app-from-URL-in-another-app/main.js
+++ b/docs/fiddles/system/protocol-handler/launch-app-from-URL-in-another-app/main.js
@@ -1,5 +1,5 @@
// Modules to control application life and create native browser window
-const { app, BrowserWindow, ipcMain, shell } = require('electron')
+const { app, BrowserWindow, ipcMain, shell, dialog } = require('electron')
const path = require('path')
let mainWindow;
|
fix: dialog is not defined (#<I>)
Corrects the following error in Electron Fiddle:
```
Uncaught Exception:
ReferenceError: dialog is not defined
...
```
|
electron_electron
|
train
|
js
|
f900f55913ad9b0a85167e98b19bc71ce3c8a598
|
diff --git a/protocol-designer/src/components/BatchEditForm/index.js b/protocol-designer/src/components/BatchEditForm/index.js
index <HASH>..<HASH> 100644
--- a/protocol-designer/src/components/BatchEditForm/index.js
+++ b/protocol-designer/src/components/BatchEditForm/index.js
@@ -190,8 +190,14 @@ export const BatchEditMoveLiquid = (
props: BatchEditMoveLiquidProps
): React.Node => {
const { propsForFields, handleCancel, handleSave } = props
- const [cancelButtonTargetProps, cancelButtonTooltipProps] = useHoverTooltip()
- const [saveButtonTargetProps, saveButtonTooltipProps] = useHoverTooltip()
+ const [cancelButtonTargetProps, cancelButtonTooltipProps] = useHoverTooltip({
+ placement: 'top',
+ strategy: 'fixed',
+ })
+ const [saveButtonTargetProps, saveButtonTooltipProps] = useHoverTooltip({
+ placement: 'top',
+ strategy: 'fixed',
+ })
const disableSave = !props.batchEditFormHasChanges
return (
|
fix(protocol-designer): Update tooltip placement to avoid deckmap conflict (#<I>)
|
Opentrons_opentrons
|
train
|
js
|
e8f4366f03efafeec3c1558e5241b6e6e5fbe6a5
|
diff --git a/index.js b/index.js
index <HASH>..<HASH> 100644
--- a/index.js
+++ b/index.js
@@ -19,7 +19,7 @@ module.exports = {
return path.relative(this.project.root, require.resolve(npmCompilerPath));
},
included: function (app) {
- this._super.included(app);
+ this._super.included.apply(this, arguments);
if (app.env === 'production' || app.env === 'test') {
return;
|
fix: apply included function with arguments instead of app
This is the "recommended" way as seen in <URL>` it causes some issues with ember-decorators and the next ember-cli-typescript version.
This will prevent others from having to dive in on why this happens if you try to port your addon to use these addons.
|
adopted-ember-addons_ember-cli-hot-loader
|
train
|
js
|
c84cdbd08ab4f8e0bcbda4c979871ebede776c0e
|
diff --git a/tika/tika.py b/tika/tika.py
index <HASH>..<HASH> 100644
--- a/tika/tika.py
+++ b/tika/tika.py
@@ -61,7 +61,7 @@ Example usage as python client:
import sys, os, getopt, time
try:
- unicode_string = unicode
+ unicode_string = 'utf_8'
binary_string = str
except NameError:
unicode_string = str
@@ -451,4 +451,4 @@ if __name__ == '__main__':
if type(resp) == list:
print('\n'.join([r[1] for r in resp]))
else:
- print resp
+ print(resp)
|
fix: removed errors in running python3
|
chrismattmann_tika-python
|
train
|
py
|
3b3edb85964a0226cb371c081ac9053e7d13265d
|
diff --git a/lib/bulk/common.js b/lib/bulk/common.js
index <HASH>..<HASH> 100644
--- a/lib/bulk/common.js
+++ b/lib/bulk/common.js
@@ -13,10 +13,7 @@ const executeOperation = require('../utils').executeOperation;
const isPromiseLike = require('../utils').isPromiseLike;
// Error codes
-const UNKNOWN_ERROR = 8;
-const INVALID_BSON_ERROR = 22;
const WRITE_CONCERN_ERROR = 64;
-const MULTIPLE_ERROR = 65;
// Insert types
const INSERT = 1;
@@ -1145,20 +1142,8 @@ Object.defineProperty(BulkOperationBase.prototype, 'length', {
module.exports = {
Batch,
BulkOperationBase,
- BulkWriteError,
- BulkWriteResult,
bson,
- FindOperators,
- handleMongoWriteConcernError,
- LegacyOp,
- mergeBatchResults,
- INVALID_BSON_ERROR: INVALID_BSON_ERROR,
- MULTIPLE_ERROR: MULTIPLE_ERROR,
- UNKNOWN_ERROR: UNKNOWN_ERROR,
- WRITE_CONCERN_ERROR: WRITE_CONCERN_ERROR,
INSERT: INSERT,
UPDATE: UPDATE,
- REMOVE: REMOVE,
- WriteError,
- WriteConcernError
+ REMOVE: REMOVE
};
|
refactor(BulkOp): remove code that is not used
|
mongodb_node-mongodb-native
|
train
|
js
|
0c5e878ef6fb97edd3b1fb75c33e5fee92ba0df8
|
diff --git a/renku/core/__init__.py b/renku/core/__init__.py
index <HASH>..<HASH> 100644
--- a/renku/core/__init__.py
+++ b/renku/core/__init__.py
@@ -16,3 +16,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.
"""Renku core."""
+import logging
+
+logging.getLogger('py-filelock.filelock').setLevel(logging.ERROR)
|
chore(core): set filelock logging to warning (#<I>)
|
SwissDataScienceCenter_renku-python
|
train
|
py
|
5874d37bf0c7b24ae372b21cf263d09d3621e1c4
|
diff --git a/lib/request.js b/lib/request.js
index <HASH>..<HASH> 100644
--- a/lib/request.js
+++ b/lib/request.js
@@ -205,10 +205,9 @@ class Request extends AsyncResource {
}
if (
- this.streaming &&
this.body &&
- !this.body.destroyed &&
- typeof this.body.destroy === 'function'
+ typeof this.body.destroy === 'function' &&
+ !this.body.destroyed
) {
this.body.destroy(err)
}
|
refactor: simplify req body destroy
|
mcollina_undici
|
train
|
js
|
b6e1f7b2af0639070d5ab191110c99f524a8f6ca
|
diff --git a/src/index.js b/src/index.js
index <HASH>..<HASH> 100644
--- a/src/index.js
+++ b/src/index.js
@@ -7,7 +7,6 @@ const stylelint = require('stylelint');
const debug = require('debug')('prettier-stylelint:main');
// const explorer = cosmiconfig('stylelint');
-const linterAPI = stylelint.createLinter({ fix: true });
/**
* Resolve Config for the given file
@@ -19,6 +18,7 @@ const linterAPI = stylelint.createLinter({ fix: true });
*/
function resolveConfig(file, options = {}) {
const resolve = resolveConfig.resolve;
+ const linterAPI = stylelint.createLinter({ fix: true });
if (options.stylelintConfig) {
return Promise.resolve(resolve(options.stylelintConfig));
@@ -68,6 +68,8 @@ resolveConfig.resolve = (stylelintConfig) => {
};
function stylelinter(code, filePath) {
+ const linterAPI = stylelint.createLinter({ fix: true });
+
return linterAPI
._lintSource({
code,
|
fix: dont re use the same linter instance because we can't invalidate the config cache
|
hugomrdias_prettier-stylelint
|
train
|
js
|
2fc1d40acbb0ee69587a8b2e80fc3cddec722e75
|
diff --git a/src/Client/Middleware/MiddlewareClient.php b/src/Client/Middleware/MiddlewareClient.php
index <HASH>..<HASH> 100644
--- a/src/Client/Middleware/MiddlewareClient.php
+++ b/src/Client/Middleware/MiddlewareClient.php
@@ -22,7 +22,7 @@ trait MiddlewareClient
/**
* @var IOAuthClient
*/
- private $client;
+ protected $client;
/**
* Set the OAuth Client.
|
fix(Middleware): Change middleware client accessibility
|
zerospam_sdk-framework
|
train
|
php
|
c6c83aa9b96807692e68f71dca5c73e6878b3ed0
|
diff --git a/webapps/client/scripts/filter/modals/cam-tasklist-filter-modal.js b/webapps/client/scripts/filter/modals/cam-tasklist-filter-modal.js
index <HASH>..<HASH> 100644
--- a/webapps/client/scripts/filter/modals/cam-tasklist-filter-modal.js
+++ b/webapps/client/scripts/filter/modals/cam-tasklist-filter-modal.js
@@ -31,12 +31,12 @@ define([
function unfixLike(key, value) {
if (likeExp.test(key)) {
- if (val[0] === '%') {
- val = val.slice(1, val.length);
+ if (value[0] === '%') {
+ value = value.slice(1, value.length);
}
- if (val.slice(-1) === '%') {
- val = val.slice(0, -1);
+ if (value.slice(-1) === '%') {
+ value = value.slice(0, -1);
}
}
return value;
|
fix(filter): fix typo in filter dialog
related to CAM-<I>
|
camunda_camunda-bpm-platform
|
train
|
js
|
892126c4bc2f6dee16fb9d525baa1b43a361ad85
|
diff --git a/bin/whistle.js b/bin/whistle.js
index <HASH>..<HASH> 100755
--- a/bin/whistle.js
+++ b/bin/whistle.js
@@ -1,6 +1,6 @@
#! /usr/bin/env node
-var program = require('../../starting');
+var program = require('starting');
var path = require('path');
var os = require('os');
var config = require('../lib/config');
|
refactor: show plugins debug info
|
avwo_whistle
|
train
|
js
|
65165c6f60282f1433e7ac9d2ab7c8f3d9541896
|
diff --git a/actor-apps/app-web/src/app/index.js b/actor-apps/app-web/src/app/index.js
index <HASH>..<HASH> 100644
--- a/actor-apps/app-web/src/app/index.js
+++ b/actor-apps/app-web/src/app/index.js
@@ -35,7 +35,11 @@ const initReact = () => {
crosstab.broadcast(ActorInitEvent, {});
}
- window.messenger = new window.actor.ActorApp();
+ if (location.pathname === '/app') {
+ window.messenger = new window.actor.ActorApp('wss://' + location.hostname + ':9080/');
+ } else {
+ window.messenger = new window.actor.ActorApp();
+ }
}
const App = React.createClass({
|
feat(web): detect local version and set proper endpoint
|
actorapp_actor-platform
|
train
|
js
|
14aa9aa6919e4b70c59cd20722ac113c0ffeb45b
|
diff --git a/src/Unirest/Request.php b/src/Unirest/Request.php
index <HASH>..<HASH> 100755
--- a/src/Unirest/Request.php
+++ b/src/Unirest/Request.php
@@ -399,6 +399,9 @@ class Request
if ($method === Method::POST) {
curl_setopt(self::$handle, CURLOPT_POST, true);
} else {
+ if ($method === Method::HEAD) {
+ curl_setopt(self::$handle, CURLOPT_NOBODY, true);
+ }
curl_setopt(self::$handle, CURLOPT_CUSTOMREQUEST, $method);
}
diff --git a/tests/Unirest/RequestTest.php b/tests/Unirest/RequestTest.php
index <HASH>..<HASH> 100644
--- a/tests/Unirest/RequestTest.php
+++ b/tests/Unirest/RequestTest.php
@@ -251,6 +251,16 @@ class UnirestRequestTest extends \PHPUnit_Framework_TestCase
$this->assertEquals('John', $response->body->queryString->name[1]);
}
+ // HEAD
+ public function testHead()
+ {
+ $response = Request::head('http://mockbin.com/request?name=Mark', array(
+ 'Accept' => 'application/json'
+ ));
+
+ $this->assertEquals(200, $response->code);
+ }
+
// POST
public function testPost()
{
|
feat(HEAD): CURLOPT_NOBODY option for HEAD requests
* When using HEAD requests set the appropriate curl header to not wait for a response body. See <URL>
|
Kong_unirest-php
|
train
|
php,php
|
45829d0b3c7050b97a72494c68d8aff9c43996b2
|
diff --git a/hooks/after_prepare_android.js b/hooks/after_prepare_android.js
index <HASH>..<HASH> 100644
--- a/hooks/after_prepare_android.js
+++ b/hooks/after_prepare_android.js
@@ -54,7 +54,7 @@ if (platformDir) {
}
if (!fs.existsSync(manifestFile)) {
- throw new Error("! Can't find the AndroidManifest.xml. This shouldn't happen, please contact us for support.\n")
+ throw new Error("! Can't find the AndroidManifest.xml. This shouldn't happen: try running `cordova prepare`, if it doesn\'t fix the issue please contact us for support.\n")
}
/**
|
refactor(hooks): better error message
|
nearit_Cordova-SDK
|
train
|
js
|
94597ce179cc06e9730056477057994e850bc3ec
|
diff --git a/lib/textlint.js b/lib/textlint.js
index <HASH>..<HASH> 100644
--- a/lib/textlint.js
+++ b/lib/textlint.js
@@ -174,7 +174,7 @@ api.lintFile = function (filePath) {
api.pushReport = function (ruleId, txtNode, error) {
debug("api.pushReport %s", error);
messages.push(objectAssign({
- id: ruleId,
+ ruleId: ruleId,
message: error.message,
line: error.line ? txtNode.loc.start.line + error.line : txtNode.loc.start.line,
column: error.column ? txtNode.loc.start.column + error.column : txtNode.loc.start.column,
|
chore(textlint): reaname "id" to "ruleId"
|
textlint_textlint
|
train
|
js
|
4220556089e0ed5b601ac523600480afe6b9c111
|
diff --git a/lib/UnsupportedFeatureWarning.js b/lib/UnsupportedFeatureWarning.js
index <HASH>..<HASH> 100644
--- a/lib/UnsupportedFeatureWarning.js
+++ b/lib/UnsupportedFeatureWarning.js
@@ -2,14 +2,19 @@
MIT License http://www.opensource.org/licenses/mit-license.php
Author Tobias Koppers @sokra
*/
-function UnsupportedFeatureWarning(module, message) {
- Error.call(this);
- Error.captureStackTrace(this, UnsupportedFeatureWarning);
- this.name = "UnsupportedFeatureWarning";
- this.message = message;
- this.origin = this.module = module;
+"use strict";
+
+class UnsupportedFeatureWarning extends Error {
+
+ constructor(module, message) {
+ super();
+ if(Error.hasOwnProperty("captureStackTrace")) {
+ Error.captureStackTrace(this, this.constructor);
+ }
+ this.name = "UnsupportedFeatureWarning";
+ this.message = message;
+ this.origin = this.module = module;
+ }
}
-module.exports = UnsupportedFeatureWarning;
-UnsupportedFeatureWarning.prototype = Object.create(Error.prototype);
-UnsupportedFeatureWarning.prototype.constructor = UnsupportedFeatureWarning;
+module.exports = UnsupportedFeatureWarning;
|
refactor(ES6): upgrade UnsupportedFeatureWarning to ES6 (#<I>)
|
webpack_webpack
|
train
|
js
|
bd6811a1fd4637ae192872cd176afd087028d76b
|
diff --git a/lib/pincers/support/http_client.rb b/lib/pincers/support/http_client.rb
index <HASH>..<HASH> 100644
--- a/lib/pincers/support/http_client.rb
+++ b/lib/pincers/support/http_client.rb
@@ -26,11 +26,11 @@ module Pincers::Support
attr_reader :proxy_addr, :proxy_port, :cookies
def initialize(_options={})
- if _options.key? :proxy
+ if _options[:proxy]
@proxy_addr, @proxy_port = _options[:proxy].split ':'
end
- @cookies = if _options.key? :cookies
+ @cookies = if _options[:cookies]
_options[:cookies].copy
else
CookieJar.new
|
refactor(http_client): makes http_client more resilent to nil options
|
platanus_pincers
|
train
|
rb
|
74c8cebe36de7026f4e7a43df9844a530641dc79
|
diff --git a/tests/system-logger.js b/tests/system-logger.js
index <HASH>..<HASH> 100644
--- a/tests/system-logger.js
+++ b/tests/system-logger.js
@@ -11,8 +11,8 @@ const DELAYTOCHECKTESTLOGFILE = 1000;
const TESTLOGFILE = './tests/testArea/test.log';
describe('logging Tests', function() {
- before(() => {
- fs.unlinkSync(TESTLOGFILE); // No need to check file exist fs.existsSync(TESTLOGFILE). unlinkSync will skip when file no exist
+ after(() => {
+ fs.unlinkSync(TESTLOGFILE);
});
describe('Setting Tests', function() {
it('verify converseLeveValue', function() {
|
test(syste-logger): Change the cleanup after the test
|
leocwlam_system-logger
|
train
|
js
|
8e0f4b02594349fcad6312a5c7aaed2a0767aa43
|
diff --git a/Firestore/synth.py b/Firestore/synth.py
index <HASH>..<HASH> 100644
--- a/Firestore/synth.py
+++ b/Firestore/synth.py
@@ -23,7 +23,7 @@ logging.basicConfig(level=logging.DEBUG)
gapic = gcp.GAPICBazel()
common = gcp.CommonTemplates()
-for ver in ['V1', 'V1beta1']:
+for ver in ['V1']:
lower_version = ver.lower()
library = gapic.php_library(
|
chore: disable updating v1beta1 client (#<I>)
|
googleapis_google-cloud-php
|
train
|
py
|
07b23a99c7088a7c740f23051f3f755f091519b0
|
diff --git a/packages/discord.js/src/structures/InteractionCollector.js b/packages/discord.js/src/structures/InteractionCollector.js
index <HASH>..<HASH> 100644
--- a/packages/discord.js/src/structures/InteractionCollector.js
+++ b/packages/discord.js/src/structures/InteractionCollector.js
@@ -45,16 +45,14 @@ class InteractionCollector extends Collector {
* @type {?Snowflake}
*/
this.channelId =
- this.client.channels.resolveId(options.message?.channel) ??
- options.message?.channel_id ??
- this.client.channels.resolveId(options.channel);
+ options.message?.channelId ?? options.message?.channel_id ?? this.client.channels.resolveId(options.channel);
/**
* The guild from which to collect interactions, if provided
* @type {?Snowflake}
*/
this.guildId =
- this.client.guilds.resolveId(options.message?.guild) ??
+ options.message?.guildId ??
options.message?.guild_id ??
this.client.guilds.resolveId(options.channel?.guild) ??
this.client.guilds.resolveId(options.guild);
@@ -83,7 +81,6 @@ class InteractionCollector extends Collector {
*/
this.total = 0;
- this.empty = this.empty.bind(this);
this.client.incrementMaxListeners();
const bulkDeleteListener = messages => {
|
refactor(InteractionCollector): simplify constructor logic (#<I>)
* refactor(InteractionCollector): simplify constructor logic
* fix: oversight
|
discordjs_discord.js
|
train
|
js
|
6545945ba6e84279b5bb34dd86a344b693b0bf6a
|
diff --git a/src/MemoryState.js b/src/MemoryState.js
index <HASH>..<HASH> 100644
--- a/src/MemoryState.js
+++ b/src/MemoryState.js
@@ -35,13 +35,11 @@ class LockOperations {
(retry, n) => {
if (this.locks.has(key)) {
let err = new ChatServiceError('timeout')
- return retry(err)
+ retry(err)
} else {
this.locks.set(key, val)
- return Promise.resolve()
}
- }
- )
+ })
}
unlock (key, val) {
diff --git a/src/RedisState.js b/src/RedisState.js
index <HASH>..<HASH> 100644
--- a/src/RedisState.js
+++ b/src/RedisState.js
@@ -67,9 +67,7 @@ class LockOperations {
return this.redis.set(key, val, 'NX', 'PX', ttl).then(res => {
if (!res) {
let error = new ChatServiceError('timeout')
- return retry(error)
- } else {
- return null
+ retry(error)
}
}).catch(retry)
})
|
refactor: retry cleanup
|
an-sh_chat-service
|
train
|
js,js
|
44a9e48af0f2ff381daf96cabffa009c08225ffa
|
diff --git a/ipyvolume/datasets.py b/ipyvolume/datasets.py
index <HASH>..<HASH> 100644
--- a/ipyvolume/datasets.py
+++ b/ipyvolume/datasets.py
@@ -44,13 +44,20 @@ class Dataset(object):
return self
def download_command(self):
- if os == "osx":
- return "cd %s; curl -O -L %s" % (data_dir, self.url)
- else:
+ use_wget = True # we prefer wget...
+ if osname in ["linux", "osx"]: # for linux
+ if os.system("wget --version > /dev/null") != 0:
+ use_wget = False
+
+ if use_wget:
return "wget --progress=bar:force -c -P %s %s" % (data_dir, self.url)
+ else:
+ return "cd %s; curl -O -L %s" % (data_dir, self.url)
hdz2000 = Dataset("hdz2000")
aquariusA2 = Dataset("aquarius-A2")
egpbosLCDM = Dataset("egpbos-LCDM")
zeldovich = Dataset("zeldovich", density=False)
+
+# low poly cat from: https://sketchfab.com/models/1e7143dfafd04ff4891efcb06949a0b4#
\ No newline at end of file
|
fix: check if wget exists, if not use curl (rtd seems to miss wget)
|
maartenbreddels_ipyvolume
|
train
|
py
|
7d649442977942beb6b4fbc13577b9a95875c2ff
|
diff --git a/src/Leevel/Router/Proxy/Request.php b/src/Leevel/Router/Proxy/Request.php
index <HASH>..<HASH> 100644
--- a/src/Leevel/Router/Proxy/Request.php
+++ b/src/Leevel/Router/Proxy/Request.php
@@ -218,7 +218,7 @@ class Request
* @param array $server The SERVER parameters
* @param null|resource|string $content The raw body data
*/
- public static function initialize(array $query = [], array $request = [], array $attributes = [], array $cookies = [], array $files = [], array $server = [], $content = null)
+ public static function initialize(array $query = [], array $request = [], array $attributes = [], array $cookies = [], array $files = [], array $server = [], $content = null): void
{
self::proxy()->initialize($query, $request, $attributes, $cookies, $files, $server, $content);
}
|
fix(router): fix for phpstan level 5
|
hunzhiwange_framework
|
train
|
php
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.