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
8ce8220546dbd4b88bac492cb08b8faae6799850
diff --git a/lib/core/topologies/replset.js b/lib/core/topologies/replset.js index <HASH>..<HASH> 100644 --- a/lib/core/topologies/replset.js +++ b/lib/core/topologies/replset.js @@ -1089,9 +1089,8 @@ ReplSet.prototype.isDestroyed = function() { return this.state === DESTROYED; }; -// hard coded `serverSelectionTimeoutMS` for legacy topology -const SERVER_SELECTION_TIMEOUT_MS = 10000; - +const SERVER_SELECTION_TIMEOUT_MS = 10000; // hardcoded `serverSelectionTimeoutMS` for legacy topology +const SERVER_SELECTION_INTERVAL_MS = 1000; // time to wait between selection attempts /** * Selects a server * @@ -1129,13 +1128,13 @@ ReplSet.prototype.selectServer = function(selector, options, callback) { const server = this.s.replicaSetState.pickServer(readPreference); if (server == null) { - setTimeout(_selectServer, 1000); + setTimeout(_selectServer, SERVER_SELECTION_INTERVAL_MS); return; } if (!(server instanceof Server)) { lastError = server; - setTimeout(_selectServer, 1000); + setTimeout(_selectServer, SERVER_SELECTION_INTERVAL_MS); return; }
refactor(replset): add constant for selection interval
mongodb_node-mongodb-native
train
js
01718001527aba26501c9c3bf72e7618a325608c
diff --git a/test/unit/request/middleware/internal.test.js b/test/unit/request/middleware/internal.test.js index <HASH>..<HASH> 100644 --- a/test/unit/request/middleware/internal.test.js +++ b/test/unit/request/middleware/internal.test.js @@ -6,7 +6,7 @@ // var assert = require('assert'); var internal = require('../../../../lib/request/middleware/internal'); -var logHook = require('../../../helpers/loghook.js'); +var logHook = require('../../../helpers/logHook.js');
fix(tests): Misspelt a path to a file, not caught due to OS X handling mixed case filenames without error
socketstream_socketstream
train
js
cf5f269df140ad106ce4d6634d75a833ecf26f66
diff --git a/source/rafcon/gui/resave_state_machines.py b/source/rafcon/gui/resave_state_machines.py index <HASH>..<HASH> 100755 --- a/source/rafcon/gui/resave_state_machines.py +++ b/source/rafcon/gui/resave_state_machines.py @@ -71,13 +71,13 @@ def trigger_gui_signals(*args): def convert(config_path, source_path, target_path=None, gui_config_path=None): + logger.info("RAFCON launcher") + rafcon.gui.start.setup_l10n(logger) + from gi.repository import Gtk from rafcon.gui.controllers.main_window import MainWindowController from rafcon.gui.views.main_window import MainWindowView - logger.info("RAFCON launcher") - rafcon.gui.start.setup_l10n(logger) - setup_environment() gui_config_path = gui_config_path or get_default_config_path()
fix(resave_state_machines): setup_l<I>n before imports issue introduced in previous commit
DLR-RM_RAFCON
train
py
39640c5296d58d5ce413f16f63b15abed71a09b2
diff --git a/packages/react/src/components/Tooltip/Tooltip.js b/packages/react/src/components/Tooltip/Tooltip.js index <HASH>..<HASH> 100644 --- a/packages/react/src/components/Tooltip/Tooltip.js +++ b/packages/react/src/components/Tooltip/Tooltip.js @@ -412,7 +412,7 @@ class Tooltip extends Component { onBlur: this.handleMouse, 'aria-haspopup': 'true', 'aria-expanded': open, - 'aria-describedby': tooltipId, + 'aria-describedby': open ? tooltipId : null, // if the user provides property `triggerText`, // then the button should use aria-labelledby to point to its id, // if the user doesn't provide property `triggerText`,
fix(tooltip): conditionally set aria-describedby on open (#<I>)
carbon-design-system_carbon-components
train
js
3e2453a72ad2b3b3ea7b736e9c4fc5cba2887db1
diff --git a/ng-picky.js b/ng-picky.js index <HASH>..<HASH> 100644 --- a/ng-picky.js +++ b/ng-picky.js @@ -92,9 +92,8 @@ angular.module('ngPicky', []) // expects to be called with `this` set // to the parent element. scope.moveCursor = function(event) { - var bounds = this.getBoundingClientRect(), - x = event.pageX - bounds.left, - y = event.pageY - bounds.top; + var x = event.layerX, + y = event.layerY; // update cursor's position cursor.element.style.left = x + 'px'; diff --git a/src/ng-picky.js b/src/ng-picky.js index <HASH>..<HASH> 100644 --- a/src/ng-picky.js +++ b/src/ng-picky.js @@ -91,9 +91,8 @@ angular.module('ngPicky', []) // expects to be called with `this` set // to the parent element. scope.moveCursor = function(event) { - var bounds = this.getBoundingClientRect(), - x = event.pageX - bounds.left, - y = event.pageY - bounds.top; + var x = event.layerX, + y = event.layerY; // update cursor's position cursor.element.style.left = x + 'px';
fix(scroll): Debug cursor offsets when the view is scrolled.
danprince_ng-picky
train
js,js
1c7222239834e91e62c400aa546ababca67abc52
diff --git a/modules/indeterminate/indeterminate.js b/modules/indeterminate/indeterminate.js index <HASH>..<HASH> 100644 --- a/modules/indeterminate/indeterminate.js +++ b/modules/indeterminate/indeterminate.js @@ -3,12 +3,13 @@ * * @example <input type="checkbox" ui-indeterminate="isUnkown"> */ -angular.module('ui.indeterminate',[]).directive('uiIndeterminate', [, +angular.module('ui.indeterminate',[]).directive('uiIndeterminate', [ function () { return { compile: function(tElm, tAttrs) { - if (!tAttrs.type || tAttrs.toLowercase() !== 'checkbox') + if (!tAttrs.type || tAttrs.toLowercase() !== 'checkbox') { return angular.noop; + } return function ($scope, elm, attrs) { $scope.$watch(attrs.uiIndeterminate, function(newVal, oldVal) {
fix(indeterminate): Corrected jshint errors
angular-ui_ui-scrollpoint
train
js
81fd585816ebe13a2499254e3bf3fac8438bbda8
diff --git a/src/directives/default.js b/src/directives/default.js index <HASH>..<HASH> 100644 --- a/src/directives/default.js +++ b/src/directives/default.js @@ -44,7 +44,6 @@ specialDirectives["m-if"] = { let data = prop.data; let attrs = child.props; let ifChild; - let elseNode; if(attrs["m-else"] !== undefined) { data.elseNode = [i, child]; diff --git a/src/util/vdom.js b/src/util/vdom.js index <HASH>..<HASH> 100644 --- a/src/util/vdom.js +++ b/src/util/vdom.js @@ -241,7 +241,7 @@ const createComponentFromVNode = function(node, vnode, component) { * @param {Object} oldEventListeners */ const diffEventListeners = function(node, eventListeners, oldEventListeners) { - for(const type in eventListeners) { + for(let type in eventListeners) { const oldEventListener = oldEventListeners[type]; if(oldEventListener === undefined) { addEventHandler(node, type, eventListeners);
refactor: remove unused variables and const for in
kbrsh_moon
train
js,js
db3ac4c454f0fc731256a3780e54e30723f23634
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 @@ -49,7 +49,7 @@ module.exports = webpackMerge(commonConfig, { * * See: http://webpack.github.io/docs/configuration.html#debug */ - debug: true, + // debug: true, /** * Developer tool to enhance debugging @@ -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: '#eval-source-map', + devtool: '#cheap-module-eval-source-map', /** * Options affecting the output of the compilation. @@ -101,12 +101,6 @@ module.exports = webpackMerge(commonConfig, { }, plugins: [ - new webpack.SourceMapDevToolPlugin({ - filename: null, // if no value is provided the sourcemap is inlined - lineToLine: true, - module: false, - test: /\.(ts|map|js)($|\?)/i // process .js and .ts files only - }), /** * Plugin: DefinePlugin * Description: Define free variables.
fix(webpack): Fix sourcemapping issues see #<I> and #<I>
holisticon_angular-common
train
js
0aa9cfb4d99016ceee3362985302406e73e62638
diff --git a/webapps/ui/tasklist/client/scripts/process/plugins/action/cam-tasklist-navbar-action-start-process-plugin.js b/webapps/ui/tasklist/client/scripts/process/plugins/action/cam-tasklist-navbar-action-start-process-plugin.js index <HASH>..<HASH> 100644 --- a/webapps/ui/tasklist/client/scripts/process/plugins/action/cam-tasklist-navbar-action-start-process-plugin.js +++ b/webapps/ui/tasklist/client/scripts/process/plugins/action/cam-tasklist-navbar-action-start-process-plugin.js @@ -103,6 +103,10 @@ var Controller = [ var modalResolved = true; $scope.open = function(ignoreSearch) { + if (!modalResolved) { + return; + } + if (!ignoreSearch) { search.updateSilently({processStart: true}); }
fix(tasklist): prevent opening start process modal multiple times related to CAM-<I>
camunda_camunda-bpm-platform
train
js
7c28d0d76dec9c427ea1872c6160a00833371b26
diff --git a/tests/rename_test.py b/tests/rename_test.py index <HASH>..<HASH> 100644 --- a/tests/rename_test.py +++ b/tests/rename_test.py @@ -14,11 +14,11 @@ def test_rename(ds_filtered): assert ds.q.values.tolist() == qvalues -def test_reassign_virtual(ds): - df = ds +def test_reassign_virtual(ds_local): + df = ds_local x = df.x.values df['r'] = df.x+1 - df['r'] = df.x+1 + df['r'] = df.r+1 assert df.r.tolist() == (x+2).tolist()
fix(core): reassign to virtual column test was broken + does not work on remote dataframes
vaexio_vaex
train
py
c30b87292320cad2ed2b36326c3415ba69772b43
diff --git a/packages/map-balloon/src/MapBalloon.js b/packages/map-balloon/src/MapBalloon.js index <HASH>..<HASH> 100644 --- a/packages/map-balloon/src/MapBalloon.js +++ b/packages/map-balloon/src/MapBalloon.js @@ -89,7 +89,7 @@ const MapBalloon = ({ alignItems="center" justifyContent="space-between" > - <Box>{caption}</Box> + <Box ml={"8px"}>{caption}</Box> {interactiveBalloon ? ( <Text title diff --git a/packages/map-balloon/src/styledComponents/Balloon.js b/packages/map-balloon/src/styledComponents/Balloon.js index <HASH>..<HASH> 100644 --- a/packages/map-balloon/src/styledComponents/Balloon.js +++ b/packages/map-balloon/src/styledComponents/Balloon.js @@ -20,7 +20,7 @@ const animation = css` &.fade-enter, &.fade-exit-active { - transform: scale(0.5); + transform: scale(0.5) rotate(5deg); opacity: 0; } &.fade-enter-active,
feat(map-balloon): visual improvements affects: @crave/farmblocks-map-balloon
CraveFood_farmblocks
train
js,js
c9e236cc36a3bab0959a068b77813322c9c74e73
diff --git a/packages/table/src/presenters/stylesheet.js b/packages/table/src/presenters/stylesheet.js index <HASH>..<HASH> 100644 --- a/packages/table/src/presenters/stylesheet.js +++ b/packages/table/src/presenters/stylesheet.js @@ -1,4 +1,4 @@ -export default function stylesheet(props, themeData) { +export default function stylesheet(props, themeData, themeMeta) { const { alternateBg, cellColumnIndex, @@ -302,5 +302,5 @@ export default function stylesheet(props, themeData) { } }; - return customStylesheet ? customStylesheet(styles, props, themeData) : styles; + return customStylesheet ? customStylesheet(styles, props, themeData, themeMeta) : styles; }
refactor: pass in theme metadata to stylesheet func
Autodesk_hig
train
js
0cd536c56df6908f53040cb2a510256f00478366
diff --git a/lib/cistern/attributes.rb b/lib/cistern/attributes.rb index <HASH>..<HASH> 100644 --- a/lib/cistern/attributes.rb +++ b/lib/cistern/attributes.rb @@ -257,7 +257,7 @@ module Cistern::Attributes private def missing_attributes(keys) - keys.reduce({}) { |a,e| a.merge(e => send("#{e}")) } + keys.map(&:to_sym).reduce({}) { |a,e| a.merge(e => public_send("#{e}")) } .partition { |_,v| v.nil? } .map { |s| Hash[s] } end @@ -292,13 +292,13 @@ module Cistern::Attributes next if ignored_attributes.include?(symbol_key) if class_aliases.key?(symbol_key) - class_aliases[symbol_key].each { |attribute_alias| send("#{attribute_alias}=", value) } + class_aliases[symbol_key].each { |attribute_alias| public_send("#{attribute_alias}=", value) } end assignment_method = "#{key}=" if !protected_methods.include?(symbol_key) && self.respond_to?(assignment_method, true) - send(assignment_method, value) + public_send(assignment_method, value) end end end
refactor(attributes): normalize missing_attributes input and use #public_send for access
lanej_cistern
train
rb
dfa0e2182e694ddd3a87a32493adc82ac13d2e8f
diff --git a/src/resolvers/createMany.js b/src/resolvers/createMany.js index <HASH>..<HASH> 100644 --- a/src/resolvers/createMany.js +++ b/src/resolvers/createMany.js @@ -41,7 +41,7 @@ export default function createMany<TSource: MongooseDocument, TContext>( for (const field in tree) { if (tree.hasOwnProperty(field)) { const fieldOptions = tree[field]; - if (fieldOptions.required) { + if (fieldOptions.required && typeof fieldOptions.required !== 'function') { requiredFields.push(field); } } diff --git a/src/resolvers/createOne.js b/src/resolvers/createOne.js index <HASH>..<HASH> 100644 --- a/src/resolvers/createOne.js +++ b/src/resolvers/createOne.js @@ -26,7 +26,7 @@ export default function createOne<TSource: MongooseDocument, TContext>( for (const field in tree) { if (tree.hasOwnProperty(field)) { const fieldOptions = tree[field]; - if (fieldOptions.required) { + if (fieldOptions.required && typeof fieldOptions.required !== 'function') { requiredFields.push(field); } }
fix: disable default required type for mongoose conditional required fields (#<I>)
graphql-compose_graphql-compose-mongoose
train
js,js
0d1c330cd52f300586a822c6fb89ef0d32ba7f70
diff --git a/ui/src/components/editor/QEditor.js b/ui/src/components/editor/QEditor.js index <HASH>..<HASH> 100644 --- a/ui/src/components/editor/QEditor.js +++ b/ui/src/components/editor/QEditor.js @@ -283,6 +283,7 @@ export default defineComponent({ watch: { modelValue (v) { if (this.lastEmit !== v) { + this.lastEmit = v this.__setContent(v, true) } }
fix(QEditor): q-editor model not always updating display (#<I>)
quasarframework_quasar
train
js
60529fb5684b119b1a62993f0b9a7b08d7194e19
diff --git a/src/Overlay.js b/src/Overlay.js index <HASH>..<HASH> 100644 --- a/src/Overlay.js +++ b/src/Overlay.js @@ -49,7 +49,7 @@ const propTypes = { onHide: PropTypes.func, /** - * Animate the entering and exiting of the Ovelay. `true` will use the `<Fade>` transition, + * Animate the entering and exiting of the Overlay. `true` will use the `<Fade>` transition, * or a custom react-transition-group `<Transition>` component can be provided. */ transition: PropTypes.oneOfType([PropTypes.bool, elementType]),
docs: Fix overlay typo (#<I>)
react-bootstrap_react-bootstrap
train
js
8ac25d37d9f63a528842a0efd3704737480f76ba
diff --git a/src/managers/MessageManager.js b/src/managers/MessageManager.js index <HASH>..<HASH> 100644 --- a/src/managers/MessageManager.js +++ b/src/managers/MessageManager.js @@ -75,7 +75,7 @@ class MessageManager extends BaseManager { * @returns {Promise<Collection<Snowflake, Message>>} * @example * // Get pinned messages - * channel.fetchPinned() + * channel.messages.fetchPinned() * .then(messages => console.log(`Received ${messages.size} messages`)) * .catch(console.error); */
docs(MessageManager): Update example for fetchPinned (#<I>) Example showed the method for channel and not messageManager
discordjs_discord.js
train
js
e6aadfb70f41ed67504a8cec9be3c9ee7e891e25
diff --git a/src/tags-input.js b/src/tags-input.js index <HASH>..<HASH> 100644 --- a/src/tags-input.js +++ b/src/tags-input.js @@ -13,7 +13,7 @@ * @param {string=} [displayProperty=text] Property to be rendered as the tag label. * @param {string=} [keyProperty=text] Property to be used as a unique identifier for the tag. * @param {string=} [type=text] Type of the input element. Only 'text', 'email' and 'url' are supported values. - * @param {string} [text=NA] Assignable Angular expression for data-binding to the element's text. + * @param {string=} [text=NA] Assignable Angular expression for data-binding to the element's text. * @param {number=} tabindex Tab order of the control. * @param {string=} [placeholder=Add a tag] Placeholder text for the control. * @param {number=} [minLength=3] Minimum length for a new tag.
docs(tagsInput): Mark text option as not required [skip ci]
mbenford_ngTagsInput
train
js
33f4f595705f906eba7634137a2045dfa4496220
diff --git a/packages/mandelbrot/assets/js/mandelbrot.js b/packages/mandelbrot/assets/js/mandelbrot.js index <HASH>..<HASH> 100644 --- a/packages/mandelbrot/assets/js/mandelbrot.js +++ b/packages/mandelbrot/assets/js/mandelbrot.js @@ -14,8 +14,10 @@ const framer = require('./components/frame'); const Pen = require('./components/pen'); const Navigation = require('./components/navigation'); -new Navigation($('.Navigation')); +// frame needs to be initalized before navigation because it +// needs to add an event listener before Navigation->Tree triggers it const frame = framer($('#frame')); +new Navigation($('.Navigation')); global.fractal = { events: events,
fix: initialize frame before navigation (#<I>)
frctl_fractal
train
js
4733439e43e9015640cbb4a0534cba36187a1a1d
diff --git a/packages/cwp-template-aws/cli/info/index.js b/packages/cwp-template-aws/cli/info/index.js index <HASH>..<HASH> 100644 --- a/packages/cwp-template-aws/cli/info/index.js +++ b/packages/cwp-template-aws/cli/info/index.js @@ -20,7 +20,7 @@ const printEnvOutput = async (env, context) => { console.log(`Environment: ${green(env)}`); console.log(line); - const apiFolder = getApiFolder(); + const apiFolder = getApiFolder(context); let stacksDeployedCount = 0; let output = getStackOutput({ folder: apiFolder, env }); @@ -89,7 +89,6 @@ module.exports = { }, async args => { const { env } = args; - if (!env) { // Get all existing environments const glob = require("fast-glob");
fix(cwp-template-aws): pass context into path checking
Webiny_webiny-js
train
js
1d9167b081476fa820095ece5ec2731d74a5a73c
diff --git a/lib/datasource/docker/index.js b/lib/datasource/docker/index.js index <HASH>..<HASH> 100644 --- a/lib/datasource/docker/index.js +++ b/lib/datasource/docker/index.js @@ -349,6 +349,10 @@ async function getPkgReleases({ lookupName, registryUrls }) { return null; } const releases = tags.map(version => ({ version })); - const ret = { releases }; + const ret = { + dockerRegistry: registry, + dockerRepository: repository, + releases, + }; return ret; }
refactor(docker): include dockerRegistry, dockerRepository in results
renovatebot_renovate
train
js
4725571bc3e29ab4312ecf51888294b0bcd12795
diff --git a/ibis/backends/datafusion/compiler.py b/ibis/backends/datafusion/compiler.py index <HASH>..<HASH> 100644 --- a/ibis/backends/datafusion/compiler.py +++ b/ibis/backends/datafusion/compiler.py @@ -123,6 +123,14 @@ def aggregation(op, expr): agg = translate(expr) metrics.append(agg) + if op.predicates: + table = table.filter( + functools.reduce( + operator.and_, + map(translate, op.predicates), + ) + ) + return table.aggregate(group_by, metrics)
fix(datafusion): handle predicates in aggregates
ibis-project_ibis
train
py
f77cfa2e6426fbd221598433ce6e974da7a9f448
diff --git a/packages/testing-helpers/helpers.js b/packages/testing-helpers/helpers.js index <HASH>..<HASH> 100644 --- a/packages/testing-helpers/helpers.js +++ b/packages/testing-helpers/helpers.js @@ -58,6 +58,10 @@ export function nextFrame() { * @returns {Promise<void>} */ export async function triggerBlurFor(element) { + if (isIE()) { + await nextFrame(); + await nextFrame(); + } element.blur(); if (isIE()) { await nextFrame(); @@ -67,11 +71,17 @@ export async function triggerBlurFor(element) { /** * Resolves after focus. + * Adding an event and immediately trigger it in fails in IE. + * Also before checking the effects of a trigger IE needs some time. * * @param {HTMLElement} element * @returns {Promise<void>} */ export async function triggerFocusFor(element) { + if (isIE()) { + await nextFrame(); + await nextFrame(); + } element.focus(); if (isIE()) { await nextFrame();
fix(testing-helpers): add time before triggering focus/blur (only IE)
open-wc_open-wc
train
js
6037bec1bd4b3d4dad2a87154f7dcab41cf10f4b
diff --git a/engine/src/main/java/org/camunda/bpm/dmn/engine/impl/DefaultDmnDecisionContext.java b/engine/src/main/java/org/camunda/bpm/dmn/engine/impl/DefaultDmnDecisionContext.java index <HASH>..<HASH> 100644 --- a/engine/src/main/java/org/camunda/bpm/dmn/engine/impl/DefaultDmnDecisionContext.java +++ b/engine/src/main/java/org/camunda/bpm/dmn/engine/impl/DefaultDmnDecisionContext.java @@ -200,7 +200,7 @@ public class DefaultDmnDecisionContext { } protected void buildDecisionTree(DmnDecision decision, List<DmnDecision> requiredDecisions) { - if(requiredDecisions.contains(decision)) { + if (requiredDecisions.contains(decision)) { return; }
chore(dmn-engine): Formatting changes related to #CAM-<I>
camunda_camunda-engine-dmn
train
java
6c3c3c436bbee7c9bdd0ff6ec1adbf3244b94843
diff --git a/api/opentrons/server/main.py b/api/opentrons/server/main.py index <HASH>..<HASH> 100755 --- a/api/opentrons/server/main.py +++ b/api/opentrons/server/main.py @@ -6,7 +6,7 @@ import os import traceback import atexit from aiohttp import web -from opentrons import robot +from opentrons import robot, __version__ from opentrons.api import MainRouter from opentrons.server.rpc import Server from opentrons.server import endpoints as endp @@ -235,6 +235,9 @@ def main(): except Exception as e: log.exception("Error while connecting to motor-driver: {}".format(e)) + log.info("API server version: {}".format(__version__)) + log.info("Smoothie FW version: {}".format(robot.fw_version)) + if not ff.disable_home_on_boot(): log.info("Homing Z axes") robot.home_z()
feat(api): Log API server and Smoothie FW versions on API server boot (#<I>) Fixes #<I>
Opentrons_opentrons
train
py
55ac2f703e250f53b855124377fa14d0ed20decd
diff --git a/packages/input-text/src/protectedValue.js b/packages/input-text/src/protectedValue.js index <HASH>..<HASH> 100644 --- a/packages/input-text/src/protectedValue.js +++ b/packages/input-text/src/protectedValue.js @@ -102,7 +102,7 @@ export default WrappedComponent => { <WrappedComponent {...wrappedComponentProps} focused={this.state.isEditing} - value={this.state.isEditing ? "" : wrappedComponentProps.value} + value={this.state.isEditing ? "" : this.state.value} onKeyDown={covered ? this.onKeyDown : onKeyDown} /> {covered && !this.state.isEditing && this._renderCover()}
refactor(input-text): keep consistency on the rendered value of both the cover and the input on prot affects: @crave/farmblocks-input-text
CraveFood_farmblocks
train
js
0c66cd28b45486d2101a1b89aa13cc23b78e8266
diff --git a/src/build/index.js b/src/build/index.js index <HASH>..<HASH> 100644 --- a/src/build/index.js +++ b/src/build/index.js @@ -37,8 +37,8 @@ const build = async (argv) => { sourcemap: argv.bundlesize, minify: true, globalName, - banner: umdPre, - footer: umdPost, + banner: { js: umdPre }, + footer: { js: umdPost }, metafile: argv.bundlesize ? path.join(paths.dist, 'stats.json') : undefined, outfile, define: {
fix: fix esbuild banner and footer new syntax
ipfs_aegir
train
js
3094e353a93e1626c5c24a011e19d88a6ab0de20
diff --git a/src/index.js b/src/index.js index <HASH>..<HASH> 100644 --- a/src/index.js +++ b/src/index.js @@ -27,8 +27,8 @@ Math.Optimization = require('optimization'); // Statistics packages var Stat = exports.Stat = {}; -Stat.array = require('ml-stat/array'); -Stat.matrix = require('ml-stat/matrix'); +Stat.array = require('ml-stat').array; +Stat.matrix = require('ml-stat').matrix; Stat.PCA = require('ml-pca'); Stat.Performance = require('ml-performance');
fix(ml-stat): new access route for array and matrix
mljs_ml
train
js
075850494454edcaf3051a61acb2d50d1902cc22
diff --git a/samtranslator/__init__.py b/samtranslator/__init__.py index <HASH>..<HASH> 100644 --- a/samtranslator/__init__.py +++ b/samtranslator/__init__.py @@ -1 +1 @@ -__version__ = '1.13.1' +__version__ = '1.13.2'
chore: version bump to <I>
awslabs_serverless-application-model
train
py
aa94504c5798212e2b76bf621b4d613ef554d8e5
diff --git a/src/flow.js b/src/flow.js index <HASH>..<HASH> 100644 --- a/src/flow.js +++ b/src/flow.js @@ -717,12 +717,6 @@ this.flowObj = flowObj; /** - * Used to store the bytes read - * @type {Blob|string} - */ - this.bytes = null; - - /** * Reference to file * @type {File} */ @@ -1151,6 +1145,11 @@ */ this.readState = 0; + /** + * Used to store the bytes read + * @type {Blob|string} + */ + this.bytes = undefined; /** * Bytes transferred from total request size
fix: bytes should be declared on FlowChunk
flowjs_flow.js
train
js
48768dd4690a7b6f27fdbb67e65d13a113fb6e55
diff --git a/src/index.js b/src/index.js index <HASH>..<HASH> 100644 --- a/src/index.js +++ b/src/index.js @@ -353,7 +353,7 @@ function sortRankedItems(a, b) { const same = aRank === bRank if (same) { if (aKeyIndex === bKeyIndex) { - return aRankedItem.localeCompare(bRankedItem) + return String(aRankedItem).localeCompare(bRankedItem) } else { return aKeyIndex < bKeyIndex ? aFirst : bFirst }
fix: rankedItem casting to string (#<I>) (#<I>)
kentcdodds_match-sorter
train
js
7f79ac33b7c54494dd3b5ed3ef042699b53c03ec
diff --git a/packages/api-generator/src/maps/v-data-table.js b/packages/api-generator/src/maps/v-data-table.js index <HASH>..<HASH> 100644 --- a/packages/api-generator/src/maps/v-data-table.js +++ b/packages/api-generator/src/maps/v-data-table.js @@ -65,10 +65,16 @@ const DataTableExpandedItemScopedProps = { headers: 'TableHeader[]', } +const DataTableBodyScopedProps = { + ...DataDefaultScopedSlotProps, + headers: 'TableHeader[]', + isMobile: 'boolean', +} + const DataTableSlots = [ - { name: 'body.append', props: DataDefaultScopedSlotProps }, - { name: 'body.prepend', props: DataDefaultScopedSlotProps }, - { name: 'body', props: DataDefaultScopedSlotProps }, + { name: 'body.append', props: DataTableBodyScopedProps }, + { name: 'body.prepend', props: DataTableBodyScopedProps }, + { name: 'body', props: DataTableBodyScopedProps }, { name: 'footer', props: DataDefaultScopedSlotProps }, { name: 'footer.page-text', props: DataFooterPageTextScopedProps }, { name: 'header', props: DataTableHeaderScopedProps },
docs(VDataTable): fixed incorrect props for body slots (#<I>) closes #<I>
vuetifyjs_vuetify
train
js
78413dcedb3a7525043059764b6503ee0a419289
diff --git a/gridsome/app/entry.client.js b/gridsome/app/entry.client.js index <HASH>..<HASH> 100644 --- a/gridsome/app/entry.client.js +++ b/gridsome/app/entry.client.js @@ -20,6 +20,11 @@ document.addEventListener('click', event => { if ( event.defaultPrevented || // disables this behavior + event.which !== 1 || // not a left click + event.metaKey || + event.altKey || + event.ctrlKey || + event.shiftKey || $el === null || // no link clicked $el.__gLink__ || // g-link anchor $el.hostname !== hostname || // external link
fix(app): only intercept left clicks on links (#<I>)
gridsome_gridsome
train
js
d56167a3e697e2d32348b5e9b5611d0415475e40
diff --git a/static/lib/composer.js b/static/lib/composer.js index <HASH>..<HASH> 100644 --- a/static/lib/composer.js +++ b/static/lib/composer.js @@ -17,7 +17,8 @@ define('composer', [ 'topicThumbs', 'api', 'bootbox', -], function (taskbar, translator, uploads, formatting, drafts, tags, categoryList, preview, resize, autocomplete, scrollStop, topicThumbs, api, bootbox) { + 'hooks', +], function (taskbar, translator, uploads, formatting, drafts, tags, categoryList, preview, resize, autocomplete, scrollStop, topicThumbs, api, bootbox, hooks) { var composer = { active: undefined, posts: {}, @@ -427,7 +428,7 @@ define('composer', [ $('[data-format="zen"]').addClass('hidden'); } - $(window).trigger('action:composer.enhanced', { + hooks.fire('action:composer.enhanced', { postContainer: postContainer, postData: postData, draft: draft, @@ -789,7 +790,7 @@ define('composer', [ taskbar.discard('composer', post_uuid); $('[data-action="post"]').removeAttr('disabled'); - $(window).trigger('action:composer.discard', { + hooks.fire('action:composer.discard', { post_uuid: post_uuid, postData: postData, });
feat: use hooks lib for enhance and discard
NodeBB_nodebb-plugin-composer-default
train
js
7e8332f0c7c0ced1c416e61d7fb714059c33cc82
diff --git a/src/index.js b/src/index.js index <HASH>..<HASH> 100644 --- a/src/index.js +++ b/src/index.js @@ -19,10 +19,18 @@ exports.format = function formatArgv (object) { }) .reduce(function (args, arg) { if (arg.single) { - args.push(arg.flag, arg.value); + args.push(arg.flag); + if (arg.value !== true) { + args.push(arg.value); + } } else { - args.push(arg.flag + '=' + arg.value); + if (arg.value !== true) { + args.push(arg.flag + '=' + arg.value); + } + else { + args.push(arg.flag); + } } return args; }, []); diff --git a/test/index.js b/test/index.js index <HASH>..<HASH> 100644 --- a/test/index.js +++ b/test/index.js @@ -21,4 +21,12 @@ describe('argv-formatter', function () { assert({reporter: false}, []); }); + it('only includes a flag for true (single)', function () { + assert({R: true}, ['-R']); + }); + + it('only includes a flag for true (multi)', function () { + assert({reporter: true}, ['--reporter']); + }); + });
feat(formatter): only include flags for true keys
bendrucker_argv-formatter
train
js,js
bf594e49dade3c567023d25663dda9e422529b0c
diff --git a/rakelib/kokoro/command.rb b/rakelib/kokoro/command.rb index <HASH>..<HASH> 100644 --- a/rakelib/kokoro/command.rb +++ b/rakelib/kokoro/command.rb @@ -27,16 +27,13 @@ class Command end def run_command_with_timeout command, timeout - job = Process.spawn command begin Timeout.timeout timeout do - Process.wait job + run_command command end - return $?.exitstatus rescue Timeout::Error header_2 "TIMEOUT - #{timeout / 60} minute limit exceeded." - Process.kill "TERM", job + @failed = true end - @failed = true end end diff --git a/rakelib/kokoro/kokoro.rb b/rakelib/kokoro/kokoro.rb index <HASH>..<HASH> 100644 --- a/rakelib/kokoro/kokoro.rb +++ b/rakelib/kokoro/kokoro.rb @@ -40,7 +40,7 @@ class Kokoro < Command if @updated header "Gem Updated - Running Acceptance" run "bundle exec rake ci:acceptance", 3600 - release_please + release_please if ENV.fetch("OS", "") == "linux" else header "Gem Unchanged - Skipping Acceptance" run "bundle exec rake ci", 3600
chore: only run release-please on linux builds (#<I>)
googleapis_google-cloud-ruby
train
rb,rb
71b2e1763007c0d731ea7ae1dc475e978d2f76cf
diff --git a/Model/ResourceModel/Api/Customer.php b/Model/ResourceModel/Api/Customer.php index <HASH>..<HASH> 100644 --- a/Model/ResourceModel/Api/Customer.php +++ b/Model/ResourceModel/Api/Customer.php @@ -225,7 +225,7 @@ class Customer extends CustomerResourceModel */ private function getStoreIdsFromWebsite($websiteId) { - if (!array_key_exists($websiteId, $this->stores)) { + if (!array_key_exists($websiteId, $this->stores)) { $this->stores[$websiteId] = $this->storeCollectionFactory ->create() ->addFieldToFilter('website_id', $websiteId)
chore(code-style): fix code style CDPIP-OPS
emartech_magento2-extension
train
php
ee3d6bddf78ded5f9511163d10d99a89ad2370ee
diff --git a/zfs_test.go b/zfs_test.go index <HASH>..<HASH> 100644 --- a/zfs_test.go +++ b/zfs_test.go @@ -29,7 +29,7 @@ func _assert(t *testing.T, condition bool, msg string, v ...interface{}) { if !condition { _, file, line, _ := runtime.Caller(2) - fmt.Printf("\033[31m%s:%d: "+msg+"\033[39m\n\n", append([]interface{}{filepath.Base(file), line}, v...)...) + t.Logf("\033[31m%s:%d: "+msg+"\033[39m\n\n", append([]interface{}{filepath.Base(file), line}, v...)...) t.FailNow() } }
test: Use t.Logf instead of fmt.Printf t.Logf is quiet unless a test fails or -v is used. It also keeps the log messages grouped with the test names nicely.
mistifyio_go-zfs
train
go
b9221fa4bb688d15e026f6b5bd5b00aa6ffa308d
diff --git a/packages/site/pages/components/actionmenu.js b/packages/site/pages/components/actionmenu.js index <HASH>..<HASH> 100644 --- a/packages/site/pages/components/actionmenu.js +++ b/packages/site/pages/components/actionmenu.js @@ -61,6 +61,7 @@ export default withServerProps(_ => ( ]) ], 'ActionMenu.Item': [ + PropTypes.row(['href', 'string', null, null, 'anchor tag uri']), PropTypes.row([ 'iconId', <span>
feat(site): add href for the actionmenu.item proptypes
pluralsight_design-system
train
js
713a2644c3081622e82cef0d525e65965f8397b0
diff --git a/packages/components/bolt-tabs/__tests__/tabs.e2e.js b/packages/components/bolt-tabs/__tests__/tabs.e2e.js index <HASH>..<HASH> 100644 --- a/packages/components/bolt-tabs/__tests__/tabs.e2e.js +++ b/packages/components/bolt-tabs/__tests__/tabs.e2e.js @@ -2,11 +2,11 @@ let currentBrowser; module.exports = { tags: ['component', 'tabs', 'web component'], - 'Tabs: tab opened': function(browser) { + 'Tabs: tab selected': function(browser) { const { testingUrl } = browser.globals; console.log(`global browser url: ${testingUrl}`); currentBrowser = '--' + browser.currentEnv || 'chrome'; - let testName = 'tabs-tab-opened'; + let testName = 'tabs-tab-selected'; browser .url(
test: rename tabs test
bolt-design-system_bolt
train
js
922750fb833e84781f34ed65318fa254b626cede
diff --git a/application/tests/_ci_phpunit_test/CIPHPUnitTestCase.php b/application/tests/_ci_phpunit_test/CIPHPUnitTestCase.php index <HASH>..<HASH> 100644 --- a/application/tests/_ci_phpunit_test/CIPHPUnitTestCase.php +++ b/application/tests/_ci_phpunit_test/CIPHPUnitTestCase.php @@ -29,21 +29,11 @@ class CIPHPUnitTestCase extends TestCase * If you have a route with closure, PHPUnit can't serialize global variables. * You would see `Exception: Serialization of 'Closure' is not allowed`. * - * PHPUnit 9.2 and earlier - * - * @var array - */ - protected $backupGlobalsBlacklist = ['RTR']; - - /** - * If you have a route with closure, PHPUnit can't serialize global variables. - * You would see `Exception: Serialization of 'Closure' is not allowed`. - * * PHPUnit 9.3 and later * * @var string[] */ -// protected $backupGlobalsExcludeList = ['RTR']; + protected $backupGlobalsExcludeList = ['RTR']; /** * Detect warnings and notices in a request output
refactor: use $backupGlobalsExcludeList
kenjis_ci-phpunit-test
train
php
e55b0234d2a71888e0670112efc4fa64e81e5ceb
diff --git a/packages/bonde-webpage/src/lib/plugins/donation/plugin.spec.js b/packages/bonde-webpage/src/lib/plugins/donation/plugin.spec.js index <HASH>..<HASH> 100644 --- a/packages/bonde-webpage/src/lib/plugins/donation/plugin.spec.js +++ b/packages/bonde-webpage/src/lib/plugins/donation/plugin.spec.js @@ -90,7 +90,8 @@ test('pass extra props when FinishDonationMessage is rendered', t => { t.is(donationProps.defaultSelectedValue, plugin.state('selected_value')) t.is(donationProps.handleDonationTransactionCreate, handleDonationTransactionCreate) - t.is(donationProps.finishDonationComponent, FinishDefaultMessage.component) + //to do simulate render FinishDefaultMessage + // t.is(donationProps.finishDonationComponent, FinishDefaultMessage.component) }) })
feat(admin): refactor test plugin donation
nossas_bonde-client
train
js
7cb126967c8130b6f6c35bcebea79e639bb1174e
diff --git a/tests/functional/simple_snapshot_test.go b/tests/functional/simple_snapshot_test.go index <HASH>..<HASH> 100644 --- a/tests/functional/simple_snapshot_test.go +++ b/tests/functional/simple_snapshot_test.go @@ -89,7 +89,7 @@ func TestSnapshot(t *testing.T) { index, _ = strconv.Atoi(snapshots[0].Name()[2:6]) - if index < 1010 || index > 1025 { + if index < 1010 || index > 1029 { t.Fatal("wrong name of snapshot :", snapshots[0].Name()) } }
fix(simple_snapshot_test): enlarge reasonable index range
etcd-io_etcd
train
go
9b23c861607a80e736292d8d9820313ea26b9fcc
diff --git a/src/lib/graph-tiers.js b/src/lib/graph-tiers.js index <HASH>..<HASH> 100644 --- a/src/lib/graph-tiers.js +++ b/src/lib/graph-tiers.js @@ -17,16 +17,22 @@ function cloner(graph) { // Unique the list of nodes by using their inode value as a key in an object Object.keys(graph.nodes).forEach((node) => { - var inode; + var stat, key; try { - inode = fs.lstatSync(node).ino; + stat = fs.lstatSync(node); + + // Can't just use stat.ino, see https://github.com/tivac/modular-css/issues/242 + key = Object.keys(stat) + .map((name) => (name !== "ctime" && name !== "mtime" ? stat[name] : false)) + .filter(Boolean) + .join("-"); } catch(e) { - inode = missing++; + key = `key-${missing++}`; } - if(!nodes[`inode-${inode}`]) { - nodes[`inode-${inode}`] = node; + if(!nodes[key]) { + nodes[key] = node; } });
fix: over-complicate key creation, inodes are a lie (#<I>) Fixes #<I>
tivac_modular-css
train
js
91430c968575a52c79be3e4dab6ceff3e2d81474
diff --git a/src/Mail/Message/index.js b/src/Mail/Message/index.js index <HASH>..<HASH> 100644 --- a/src/Mail/Message/index.js +++ b/src/Mail/Message/index.js @@ -392,6 +392,22 @@ class Message { } /** + * Set extras to be sent to the current driver in + * use. It is the responsibility of the driver + * to parse and use the extras + * + * @method driverExtras + * + * @param {Object} extras + * + * @chainable + */ + driverExtras (extras) { + this.mailerMessage.extras = extras + return this + } + + /** * Returns nodemailer compatable message * object * diff --git a/test/message.spec.js b/test/message.spec.js index <HASH>..<HASH> 100644 --- a/test/message.spec.js +++ b/test/message.spec.js @@ -199,4 +199,13 @@ test.group('Message', () => { inReplyTo: '11010' }) }) + + test('define driver extras', (assert) => { + const message = new Message() + message.driverExtras({ campaign_id: 20 }) + + assert.deepEqual(message.toJSON(), { + extras: { campaign_id: 20 } + }) + }) })
feat(message): allow sending driver extras `driverExtras` method can be used to send extras to the current driver in use
adonisjs_adonis-mail
train
js,js
2c4df3cdb1ebfa9d92613520dc31985d31fecd1a
diff --git a/packages/cli-runtime/src/index.js b/packages/cli-runtime/src/index.js index <HASH>..<HASH> 100644 --- a/packages/cli-runtime/src/index.js +++ b/packages/cli-runtime/src/index.js @@ -1,7 +1,9 @@ 'use strict'; const load = require('./load'); +const PluginAPI = require('./PluginAPI'); module.exports = { load, + PluginAPI, };
feat(cli-runtime): expose PluginAPI in exports
carbon-design-system_toolkit
train
js
160594cb79f150e964e43332e7152437c36f6c4a
diff --git a/tools/scheduler.py b/tools/scheduler.py index <HASH>..<HASH> 100644 --- a/tools/scheduler.py +++ b/tools/scheduler.py @@ -983,7 +983,7 @@ if __name__ == '__main__': # if any thread of sched may use lock or call driver, join it first driver.stop(False) driver.join() - # mesos resourses are released, and no racer for lock any more + # mesos resources are released, and no racer for lock any more sched.cleanup() ctx.term() sys.exit(sched.ec)
docs: fix simple typo, resourses -> resources There is a small typo in tools/scheduler.py. Should read `resources` rather than `resourses`.
douban_dpark
train
py
5752895b43108a35ce0a208c19cdf7c44e50a44e
diff --git a/synth.py b/synth.py index <HASH>..<HASH> 100644 --- a/synth.py +++ b/synth.py @@ -39,5 +39,5 @@ s.copy(templates) # Node.js specific cleanup subprocess.run(['npm', 'install']) -subprocess.run(['npm', 'run', 'lint']) +subprocess.run(['npm', 'run', 'fix']) subprocess.run(['npx', 'compileProtos', 'src'])
chore: run fix instead of lint in synthfile (#<I>)
googleapis_nodejs-dlp
train
py
2385987537a20df68ca137959890a38daf53a7cd
diff --git a/packages/site/src/ui/guideline.js b/packages/site/src/ui/guideline.js index <HASH>..<HASH> 100644 --- a/packages/site/src/ui/guideline.js +++ b/packages/site/src/ui/guideline.js @@ -5,21 +5,21 @@ import { EqualColumnLayout } from '@pluralsight/ps-design-system-layout/react' export default props => ( <div className="guideline"> <EqualColumnLayout count={EqualColumnLayout.counts.two}> - <div className="box"> + <div className="box" style={props.doStyle}> + {props.do} <div className="badgeWrapper"> <Badge color={Badge.colors.green} className="badge"> Do </Badge> </div> - {props.do} </div> - <div className="box"> + <div className="box" style={props.dontStyle}> + {props.dont} <div className="badgeWrapper"> <Badge color={Badge.colors.red} className="badge"> Don't </Badge> </div> - {props.dont} </div> </EqualColumnLayout>
refactor(site): put guideline badges on top of the world
pluralsight_design-system
train
js
2e9b43877e12953e5ac618df38304f7425f0b447
diff --git a/packages/lib-js-core/src/server.js b/packages/lib-js-core/src/server.js index <HASH>..<HASH> 100644 --- a/packages/lib-js-core/src/server.js +++ b/packages/lib-js-core/src/server.js @@ -35,7 +35,6 @@ class Server { this.instance = new Instance(config) this.logger = Logger(config) this.users = new Users(config) - this.registry = new Registry(config) this.data = new Proxy(new Data(settings), { get (target, className) { return new Data(getConfig(className))
fix(core-cli): removing registry
Syncano_syncano-node
train
js
5cdec340ad1853690cb892268bdc5c023f19b3da
diff --git a/src/dial.js b/src/dial.js index <HASH>..<HASH> 100644 --- a/src/dial.js +++ b/src/dial.js @@ -23,9 +23,10 @@ const observeConnection = require('./observe-connection') * @param {function(Error, Connection)} callback */ class Dialer { - constructor (_switch, peerInfo, protocol, callback) { + constructor (_switch, peerInfo, ourPeerInfo, protocol, callback) { this.switch = _switch this.peerInfo = peerInfo + this.ourPeerInfo = ourPeerInfo this.protocol = protocol this.callback = callback } @@ -72,6 +73,9 @@ class Dialer { _establishConnection (callback) { const b58Id = this.peerInfo.id.toB58String() log('dialing %s', b58Id) + if (b58Id === this.ourPeerInfo.id.toB58String()) { + return callback(new Error('A node cannot dial itself')) + } waterfall([ (cb) => { @@ -385,7 +389,7 @@ function dial (_switch) { callback = callback || function noop () {} const peerInfo = getPeerInfo(peer, _switch._peerBook) - const dialer = new Dialer(_switch, peerInfo, protocol, callback) + const dialer = new Dialer(_switch, peerInfo, _switch._peerInfo, protocol, callback) return dialer.dial() }
fix: libp2p/js-libp2p#<I> Prevent self-dial
libp2p_js-libp2p-switch
train
js
2b6ffebad64e7a70a071c034b3867667936d5b62
diff --git a/packages/xod-project/test/patch.spec.js b/packages/xod-project/test/patch.spec.js index <HASH>..<HASH> 100644 --- a/packages/xod-project/test/patch.spec.js +++ b/packages/xod-project/test/patch.spec.js @@ -81,6 +81,16 @@ describe('Patch', () => { newPatch ); }); + it('new patch should not be equal to previvous', () => { + const newPath = '@/test2'; + const newPatch = Patch.duplicatePatch(newPath, patch); + + /* istanbul ignore next */ + expectEither( + right => { expect(right).to.not.be.equal(patch); }, + newPatch + ); + }); }); describe('getPatchPath', () => {
test(xod-project): add test of immutability of duplocicatePatch method
xodio_xod
train
js
93f0c513019a1e315ea28fe3458db499fb9ed570
diff --git a/es/utils/swagger.js b/es/utils/swagger.js index <HASH>..<HASH> 100644 --- a/es/utils/swagger.js +++ b/es/utils/swagger.js @@ -202,7 +202,7 @@ const httpConfig = { } const httpClients = { - get: (config) => (url) => axios.get(url, R.mergeDeepRight(httpConfig, config)), + get: (config) => (url, params) => axios.get(url, [httpConfig, config, params].reduce(R.mergeDeepRight)), post: (config) => (url, params) => axios.post(url, params, R.mergeDeepRight(httpConfig, config)) }
fix(swagger): Pass query params in case of get request (#<I>)
aeternity_aepp-sdk-js
train
js
d9e0e753f1a9d917a361115b1cfeb4aa2d2cb5a0
diff --git a/src/address-list/index.js b/src/address-list/index.js index <HASH>..<HASH> 100644 --- a/src/address-list/index.js +++ b/src/address-list/index.js @@ -41,14 +41,14 @@ export default createComponent({ return list.map((item, index) => ( <AddressItem + v-slots={{ + bottom: slots['item-bottom'], + }} data={item} key={item.id} disabled={disabled} switchable={props.switchable} defaultTagText={props.defaultTagText} - scopedSlots={{ - bottom: slots['item-bottom'], - }} onSelect={() => { emit(disabled ? 'select-disabled' : 'select', item, index);
fix(AddressList): bottom slot not work
youzan_vant
train
js
fdbb309e588b40edd172705ae4692cc4a1612390
diff --git a/lib/cfpropertylist/rbCFPropertyList.rb b/lib/cfpropertylist/rbCFPropertyList.rb index <HASH>..<HASH> 100644 --- a/lib/cfpropertylist/rbCFPropertyList.rb +++ b/lib/cfpropertylist/rbCFPropertyList.rb @@ -352,7 +352,7 @@ module CFPropertyList @value = prsr.load({:file => file}) when List::FORMAT_AUTO then # what we now do is ugly, but neccessary to recognize the file format - magic_number = IO.read(file,8) + magic_number = IO.read(file,12) raise IOError.new("File #{file} is empty.") unless magic_number filetype = magic_number[0..5] version = magic_number[6..7] @@ -363,7 +363,7 @@ module CFPropertyList prsr = Binary.new @format = List::FORMAT_BINARY else - if str =~ /^<(\?xml|!DOCTYPE|plist)/ + if magic_number =~ /^<(\?xml|!DOCTYPE|plist)/ prsr = CFPropertyList.xml_parser_interface.new @format = List::FORMAT_XML else
fix: read enough bytes to check for XML and also use correct variable
ckruse_CFPropertyList
train
rb
45bc3e0ac670a59868a28dae2d132e1c908b807a
diff --git a/src/main.js b/src/main.js index <HASH>..<HASH> 100644 --- a/src/main.js +++ b/src/main.js @@ -87,9 +87,9 @@ const withLogic = ({reducer, saga}) => BaseComponent => { getCurrentScope() { return [ ...(this.context.kScope ? this.context.kScope.scope : []), - this.props.scope != null - ? '' + this.props.scope - : 'defaultScope', + ...(this.props.scope != null + ? ('' + this.props.scope).split('.') + : ['defaultScope']), ]; }
feat(withLogic): handle dots in action types
krzysztofpniak_k-logic
train
js
f91030f7c715a764290009c095473ebb15d40c13
diff --git a/samples/system-test/analyze-streaming-safe-search.test.js b/samples/system-test/analyze-streaming-safe-search.test.js index <HASH>..<HASH> 100644 --- a/samples/system-test/analyze-streaming-safe-search.test.js +++ b/samples/system-test/analyze-streaming-safe-search.test.js @@ -22,7 +22,8 @@ const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); const cmd = 'node analyze-streaming-safe-search.js'; const file = 'resources/googlework_short.mp4'; -describe('streaming safe search', () => { +describe('streaming safe search', function () { + this.retries(3); it('should analyze explicit content in a streaming video', async () => { const output = execSync(`${cmd} ${file}`); assert.match(output, /UNLIKELY/);
chore: added retry logic for flaky test issue #<I>
googleapis_nodejs-video-intelligence
train
js
f9babacfc7e04d54deaa4a66e9f5c1827e6cecb0
diff --git a/controllers/endpoints.js b/controllers/endpoints.js index <HASH>..<HASH> 100644 --- a/controllers/endpoints.js +++ b/controllers/endpoints.js @@ -168,8 +168,9 @@ class EndpointController { let path = this.findByUrl(url).file // Remove node's require cache while in dev mode so we needn't restart - // to see endpoint changes - dev ? decache(path) : null + // to see endpoint changes. Disabled for default endpoint because of + // blitz-js-view's endpoint handling. + dev && path !== this.config.endpointParent ? decache(path) : null return require(path) }
fix: Don't decache default endpoint (view rendering)
cubic-js_cubic
train
js
b38dd958577bc3ba689be6597a0c9095a9fe0612
diff --git a/app/models/concerns/searchable.rb b/app/models/concerns/searchable.rb index <HASH>..<HASH> 100644 --- a/app/models/concerns/searchable.rb +++ b/app/models/concerns/searchable.rb @@ -35,9 +35,9 @@ module Searchable def published_filter # Bring in documents based on Draft status, Published date met, or either: Expired date not yet met, or Expired date null [ - {bool: {should: [term_search(:draft, false)]}}, - {bool: {should: [range_search(:published_at, :lte, DateTime.now.to_s)]}}, - {bool: {should: [range_search(:expired_at, :gte, DateTime.now.to_s), {missing: { field: :expired_at }}]}} + {bool: {must: [term_search(:draft, false)]}}, + {bool: {must: [range_search(:published_at, :lte, DateTime.now.to_s)]}}, + {bool: {should: [range_search(:expired_at, :gte, DateTime.now.to_s), {bool: {must_not: {exists: { field: :expired_at }}}}]}} ] end end
feat: update publish_filter queries for <I>
cortex-cms_cortex
train
rb
8f329b2be665b39fa5b01cc2d66ea804e4953d73
diff --git a/lib/instrumentation/modules/tedious.js b/lib/instrumentation/modules/tedious.js index <HASH>..<HASH> 100644 --- a/lib/instrumentation/modules/tedious.js +++ b/lib/instrumentation/modules/tedious.js @@ -3,8 +3,6 @@ var semver = require('semver') var sqlSummary = require('sql-summary') -var shimmer = require('../shimmer') - module.exports = function (tedious, agent, { version, enabled }) { if (!enabled) return tedious if (!semver.satisfies(version, '>=0.0.5')) { @@ -13,11 +11,14 @@ module.exports = function (tedious, agent, { version, enabled }) { } const ins = agent._instrumentation - agent.logger.debug('shimming tedious.Connection') - shimmer.wrap(tedious, 'Connection', wrapConnection) - shimmer.wrap(tedious, 'Request', wrapRequest) - return tedious + // NOTE: shimmer doesn't work because the TypeScript build used in tedious + // locks the property descriptors of all exports, preventing re-assignment. + return { + ...tedious, + Connection: wrapConnection(tedious.Connection), + Request: wrapRequest(tedious.Request) + } function wrapRequest (OriginalRequest) { class Request extends OriginalRequest {
fix(tedious): support <I>+ (#<I>) In <I>, tedious began using a version of TypeScript which locks property descriptors of exports. This prevents us from being able to re-assign functions with shimmer.
elastic_apm-agent-nodejs
train
js
d67fc2edd66b90a634f8b539a1b38d658140adb6
diff --git a/index.js b/index.js index <HASH>..<HASH> 100644 --- a/index.js +++ b/index.js @@ -9,11 +9,12 @@ * file that was distributed with this source code. */ -const Ioc = new (require('./src/Ioc'))() +const ioc = new (require('./src/Ioc'))() const ServiceProvider = require('./src/ServiceProvider') -const Registrar = new (require('./src/Registrar'))(Ioc) +const registrar = new (require('./src/Registrar'))(ioc) +const resolver = new (require('./src/Resolver/Manager'))(ioc) -global.use = Ioc.use.bind(Ioc) -global.make = Ioc.make.bind(Ioc) +global.use = ioc.use.bind(ioc) +global.make = ioc.make.bind(ioc) -module.exports = { Ioc, ServiceProvider, Registrar } +module.exports = { ioc, ServiceProvider, registrar, resolver }
refactor(main): export resolver and fix exports casing all exported instances are now lowercase
adonisjs_adonis-framework
train
js
0e03c9081499d0b6d928525c428a986a346a6be8
diff --git a/edx_rest_api_client/__version__.py b/edx_rest_api_client/__version__.py index <HASH>..<HASH> 100644 --- a/edx_rest_api_client/__version__.py +++ b/edx_rest_api_client/__version__.py @@ -1 +1 @@ -__version__ = '5.4.0' +__version__ = '5.4.1'
chore: test repo org move (#<I>) This updates to version <I> as a no-op (i.e. no change), simply to test CI test runs and package deployment after moving this repo from the edx org to the openedx org.
edx_edx-rest-api-client
train
py
cb3f39be2bb3933298f9ce5fa0fec37e5e0fb8bb
diff --git a/release.js b/release.js index <HASH>..<HASH> 100644 --- a/release.js +++ b/release.js @@ -12,7 +12,7 @@ var pushCmds = [ 'rm abort push' ]; var cleanupCmds = []; var defaultOptions = { encoding: 'utf-8' }; - var origin = 'https://github.com/angular/material.git'; + var origin = 'git@github.com:angular/material.git'; var lineWidth = 80; var lastMajorVer = JSON.parse(exec('curl https://material.angularjs.org/docs.json')).latest; var newVersion; @@ -197,7 +197,7 @@ function cloneRepo (repo) { start(`Cloning ${repo.cyan} from Github...`); exec(`rm -rf ${repo}`); - exec(`git clone https://github.com/angular/${repo}.git --depth=1`); + exec(`git clone git@github.com:angular/${repo}.git --depth=1`); done(); cleanupCmds.push(`rm -rf ${repo}`); }
fix(release): replace https urls with ssh versions to prevent typing password during release Closes #<I>
angular_material
train
js
ed70bed510137e77c52e7087867a412c99d0b8b8
diff --git a/shinken/daemon.py b/shinken/daemon.py index <HASH>..<HASH> 100644 --- a/shinken/daemon.py +++ b/shinken/daemon.py @@ -80,7 +80,7 @@ class Interface(object): -class Daemon: +class Daemon(object): properties = { 'workdir': { 'default': '/usr/local/shinken/var', 'pythonize': None, 'path': True },
fix: Daemon needs subclass object for super..
Alignak-monitoring_alignak
train
py
b8843029d8bc5427771b8c80dd69e2860100e610
diff --git a/tests/index.js b/tests/index.js index <HASH>..<HASH> 100644 --- a/tests/index.js +++ b/tests/index.js @@ -272,3 +272,44 @@ test('RedBox stack trace with missing filename', t => { afterEach() }) + +test('RedBox with throwing stack trace parser', t => { + t.plan(1) + RedBox.__Rewire__('ErrorStackParser', { + parse: function () { + // This mimicks the former behavior of stacktracejs, + // see https://github.com/stacktracejs/stackframe/issues/11. + throw new TypeError("Line Number must be a Number") + } + }) + const ERR_MESSAGE = "original error message" + const error = new TypeError(ERR_MESSAGE) + const component = createComponent(RedBox, {error}) + + const renderedError = component + .props.children[0] + .props.children + t.equal( + renderedError[0], + 'TypeError', + 'Main error message begins with error type of original error' + ) + t.equal( + renderedError[2], + ERR_MESSAGE, + 'Main error message ends with message originally supplied to error constructor.' + ) + const renderedStack = component + .props.children[1] + + t.deepEqual( + renderedStack, + <div style={style.stack}> + <div style={style.frame} key={0}> + <div>Failed to parse stack trace. Stack trace information unavailable.</div> + </div> + </div> + ) + + afterEach() +})
test: stack parser throws error
commissure_redbox-react
train
js
e3b0fa9a9a4ed7514ea2f966ecf24684253dd30d
diff --git a/src/Api/CurlHttpClient.php b/src/Api/CurlHttpClient.php index <HASH>..<HASH> 100644 --- a/src/Api/CurlHttpClient.php +++ b/src/Api/CurlHttpClient.php @@ -218,7 +218,9 @@ class CurlHttpClient implements HttpClient */ public function removeCookies() { - @unlink($this->cookieJar); + if (file_exists($this->cookieJar)) { + unlink($this->cookieJar); + } return $this; }
fix: check file exists before deleting cookies file
seregazhuk_php-pinterest-bot
train
php
d54fab1700d64d583155ae0e54287fda6a89994a
diff --git a/kubernetes/kubernetes/src/main/java/org/arquillian/cube/kubernetes/impl/SessionManager.java b/kubernetes/kubernetes/src/main/java/org/arquillian/cube/kubernetes/impl/SessionManager.java index <HASH>..<HASH> 100644 --- a/kubernetes/kubernetes/src/main/java/org/arquillian/cube/kubernetes/impl/SessionManager.java +++ b/kubernetes/kubernetes/src/main/java/org/arquillian/cube/kubernetes/impl/SessionManager.java @@ -16,6 +16,7 @@ import java.util.Collection; import java.util.HashMap; import java.util.List; import java.util.Map; +import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicReference; @@ -66,7 +67,7 @@ public class SessionManager implements SessionCreatedListener { private final FeedbackProvider feedbackProvider; private final List<HasMetadata> resources = new ArrayList<>(); - private final Map<String, Collection<Closeable>> watchersMap = new HashMap<String, Collection<Closeable>>(); + private final Map<String, Collection<Closeable>> watchersMap = new ConcurrentHashMap<>(); private Watch watchLog; private Watch watchEvents;
fix: ConcurrentModificationException when clearing console listener. (#<I>)
arquillian_arquillian-cube
train
java
b8cfdca1ab84c8e71feeb3970b7005cd5b4285a7
diff --git a/packages/components/bolt-image/src/image.js b/packages/components/bolt-image/src/image.js index <HASH>..<HASH> 100644 --- a/packages/components/bolt-image/src/image.js +++ b/packages/components/bolt-image/src/image.js @@ -77,9 +77,7 @@ class BoltImage extends withLitHtml() { rendered() { super.rendered && super.rendered(); - const lazyImage = this.shadowRoot - ? this.shadowRoot.querySelector('.js-lazyload') - : this.querySelector('.js-lazyload'); + const lazyImage = this.renderRoot.querySelector('.js-lazyload'); if (lazyImage) { // check if placeholder image has loaded; lazySizes will only unveil an image that is "complete"
refactor: use this.renderRoot to handle light and shadow DOM
bolt-design-system_bolt
train
js
ec55a2d644c7d09023402475ee174c8e2c18b4c9
diff --git a/packages/build-tools/tasks/webpack-tasks.js b/packages/build-tools/tasks/webpack-tasks.js index <HASH>..<HASH> 100644 --- a/packages/build-tools/tasks/webpack-tasks.js +++ b/packages/build-tools/tasks/webpack-tasks.js @@ -85,6 +85,7 @@ async function server(customWebpackConfig) { open: boltBuildConfig.open, logFileChanges: false, reloadOnRestart: true, + ghostMode: false, watchOptions: { ignoreInitial: true, },
fix: disable browsersync ghost syncing as a workaround to ensure local Nightwatch.js browser tests don't have clicks / interactions triggered by other browsers.
bolt-design-system_bolt
train
js
f43acea2a5ee207874f4b5120a95a6b0164bd405
diff --git a/lib/layer.js b/lib/layer.js index <HASH>..<HASH> 100644 --- a/lib/layer.js +++ b/lib/layer.js @@ -53,9 +53,24 @@ function layerRequirements() { return BbPromise.resolve(); } - this.serverless.cli.log('Packaging Python Requirements Lambda Layer...'); + let layerProgress; + if (this.progress) { + layerProgress = this.progress.get('python-layer-requirements'); + layerProgress.update('Packaging Python Requirements Lambda Layer', { + isMainEvent: true, + }); + } else { + this.serverless.cli.log('Packaging Python Requirements Lambda Layer...'); + } - return BbPromise.bind(this).then(zipRequirements).then(createLayers); + return BbPromise.bind(this) + .then(zipRequirements) + .then(createLayers) + .then(() => layerProgress && layerProgress.remove()) + .catch((e) => { + layerProgress && layerProgress.remove(); + throw e; + }); } module.exports = {
refactor: Adapt `layer` to modern logs
UnitedIncome_serverless-python-requirements
train
js
5031067cd2f5c184cc1e0cb8c55f60d09539e208
diff --git a/pygenstub.py b/pygenstub.py index <HASH>..<HASH> 100644 --- a/pygenstub.py +++ b/pygenstub.py @@ -865,6 +865,8 @@ def main(argv=None): try: mod = import_module(mod_name) source = Path(mod.__file__) + if not source.name.endswith(".py"): + continue source_rel = Path(*mod_name.split(".")) destination = Path(out_dir, source_rel.with_suffix(".pyi")) modules.append((source, destination))
fix: Skip modules where source file is not Python
uyar_pygenstub
train
py
f3bf61d564d7d6636791d991b02692301fd6513a
diff --git a/src/components/index.js b/src/components/index.js index <HASH>..<HASH> 100644 --- a/src/components/index.js +++ b/src/components/index.js @@ -163,6 +163,7 @@ class SortablePane extends React.Component<SortablePaneProps, State> { panes.addEventListener('touchend', this.handleMouseUp); panes.addEventListener('mousemove', this.handleMove); panes.addEventListener('mouseup', this.handleMouseUp); + panes.addEventListener('mouseleave', this.handleMouseUp); this.resizeObserver = new ResizeObserver(this.debounceUpdate); } if (this.panes && this.panes.parentElement instanceof Element) {
fix: add mouse leave (#<I>)
bokuweb_react-sortable-pane
train
js
e847ac3756014fdefe3c68ccc36011f7e9678a5d
diff --git a/scripts/buildWithCache.js b/scripts/buildWithCache.js index <HASH>..<HASH> 100644 --- a/scripts/buildWithCache.js +++ b/scripts/buildWithCache.js @@ -115,7 +115,6 @@ function getPackageCacheFolderPath(workspacePackage) { async function getPackageSourceHash(workspacePackage) { const { hash } = await hashElement(workspacePackage.packageFolder, { - algo: 'md5', folders: { exclude: ["dist"] } });
chore: undo md5
Webiny_webiny-js
train
js
9687ba6315d2a4f37224101790a8d74e4963907a
diff --git a/runtime/v2/shim/shim_test.go b/runtime/v2/shim/shim_test.go index <HASH>..<HASH> 100644 --- a/runtime/v2/shim/shim_test.go +++ b/runtime/v2/shim/shim_test.go @@ -24,11 +24,14 @@ import ( ) func TestRuntimeWithEmptyMaxEnvProcs(t *testing.T) { + var oldGoMaxProcs = runtime.GOMAXPROCS(0) + defer runtime.GOMAXPROCS(oldGoMaxProcs) os.Setenv("GOMAXPROCS", "") setRuntime() - var oldGoMaxProcs = runtime.GOMAXPROCS(0) - if oldGoMaxProcs != 2 { + + var currentGoMaxProcs = runtime.GOMAXPROCS(0) + if currentGoMaxProcs != 2 { t.Fatal("the max number of procs should be 2") } }
test: TestRuntimeWithEmptyMaxEnvProcs should cleanup TestRuntimeWithEmptyMaxEnvProcs should restore the GoMaxProcs after test so that the temporary change of GoMaxProcs will not impact other case, like TestRuntimeWithNonEmptyMaxEnvProcs.
containerd_containerd
train
go
608b74dca764c17c44acfae4327a2a8d52e556ad
diff --git a/@pob/root/createLintStagedConfig.js b/@pob/root/createLintStagedConfig.js index <HASH>..<HASH> 100644 --- a/@pob/root/createLintStagedConfig.js +++ b/@pob/root/createLintStagedConfig.js @@ -46,7 +46,7 @@ module.exports = function createLintStagedConfig() { return [ yarnMajorVersion < 2 ? 'yarn --prefer-offline' : 'yarn', - yarnMajorVersion < 2 ? 'yarn-deduplicate' : undefined, + yarnMajorVersion < 2 ? 'yarn-deduplicate' : 'yarn dedupe', yarnMajorVersion < 2 ? 'yarn --prefer-offline' : undefined, packagejsonFilenames.length === 0 ? undefined
feat: use yarn dedupe from yarn <I>
christophehurpeau_pob-lerna
train
js
450c481d0cf6edb4e0a155e4b28ce0d89a349914
diff --git a/intranet/apps/announcements/notifications.py b/intranet/apps/announcements/notifications.py index <HASH>..<HASH> 100644 --- a/intranet/apps/announcements/notifications.py +++ b/intranet/apps/announcements/notifications.py @@ -122,9 +122,8 @@ def announcement_posted_email(request, obj, send_all=False): else: users = ( get_user_model() - .objects.filter(user_type="student", graduation_year__gte=get_senior_graduation_year()) - .union(get_user_model().objects.filter(user_type__in=["teacher", "counselor"])) - .filter(receive_news_emails=True) + .objects.filter(user_type="student", graduation_year__gte=get_senior_graduation_year(), receive_news_emails=True) + .union(get_user_model().objects.filter(user_type__in=["teacher", "counselor"], receive_news_emails=True)) ) send_groups = obj.groups.all()
fix(announcements): fix send_all filtering
tjcsl_ion
train
py
1bca0c1e34e2cfe1b6a40bb9ba079fc1b5b3e0a6
diff --git a/idx/memory/memory.go b/idx/memory/memory.go index <HASH>..<HASH> 100755 --- a/idx/memory/memory.go +++ b/idx/memory/memory.go @@ -1321,7 +1321,19 @@ func (m *UnpartitionedMemoryIdx) Find(orgId uint32, pattern string, from, limit if orgId != idx.OrgIdPublic && idx.OrgIdPublic > 0 { tree, ok = m.tree[idx.OrgIdPublic] if ok { - publicNodes, err := m.findMaybeCached(tree, idx.OrgIdPublic, pattern, limit-int64(len(matchedNodes))) + if limit > 0 { + limit -= int64(len(matchedNodes)) + // technically, this is off by one: + // if limit was 10 and we found 10 nodes, then the request will still be OK + // if the find for publicNodes doesn't find anything. + // but we already use 0 to mean unlimited, can't use it for "this may not match anything" + // but this seems like an acceptable edge case. What we certainly want to avoid is the limit + // going negative or being set to 0 which would mean unlimited. + if limit < 1 { + return nil, errors.NewBadRequest("limit exhausted") + } + } + publicNodes, err := m.findMaybeCached(tree, idx.OrgIdPublic, pattern, limit) if err != nil { return nil, err }
fix: don't call find() in ways that would disable the limit
grafana_metrictank
train
go
8d57b1c7f4274eec9630e267fd7f22a3e6f3dfb6
diff --git a/lib/commands/init-project.js b/lib/commands/init-project.js index <HASH>..<HASH> 100644 --- a/lib/commands/init-project.js +++ b/lib/commands/init-project.js @@ -96,7 +96,7 @@ class InitProject { copyStaticFiles () { - let templatePath = `${__dirname}/../../src/templates/${this.templatesFolder()}/`; + let templatePath = `${__dirname}/../../src/templates/${this.type}/`; return new Promise((resolve, reject) => { glob(`${templatePath}/**/!(_*)`, (err, files) => { @@ -185,16 +185,6 @@ class InitProject { }); } - templatesFolder () { - if (InitProject.APPLICATION.includes(this.type)) { - return 'application'; - } - - if (InitProject.LIBRARY.includes(this.type)) { - return 'library'; - } - } - } InitProject.APPLICATION = 'application';
fix(init-project): templates folder is now easier to guess
groupe-sii_clea-cli
train
js
4206e62ff23db07b2f0da34200fa79e07965036e
diff --git a/packages/ad/src/dom-context.android.js b/packages/ad/src/dom-context.android.js index <HASH>..<HASH> 100644 --- a/packages/ad/src/dom-context.android.js +++ b/packages/ad/src/dom-context.android.js @@ -93,7 +93,10 @@ class DOMContext extends PureComponent { this.isVisible = false; this.webView.injectJavaScript(` if (typeof unrulyViewportStatus === "function") { - unrulyViewportStatus(false); + unrulyViewportStatus(${JSON.stringify({ + ...this.deviceInfo, + visible: false + })}); }; `); }; diff --git a/packages/ad/src/dom-context.js b/packages/ad/src/dom-context.js index <HASH>..<HASH> 100644 --- a/packages/ad/src/dom-context.js +++ b/packages/ad/src/dom-context.js @@ -85,7 +85,10 @@ class DOMContext extends PureComponent { this.isVisible = false; this.webView.injectJavaScript(` if (typeof unrulyViewportStatus === "function") { - unrulyViewportStatus(false); + unrulyViewportStatus(${JSON.stringify({ + ...this.deviceInfo, + visible: false + })}) }; `); };
fix: REPLAT-<I> unruly expect an object always (#<I>)
newsuk_times-components
train
js,js
69ac4623641a94c6511d742aa878e452d626e623
diff --git a/oidc/verifyAuthorizationCode.js b/oidc/verifyAuthorizationCode.js index <HASH>..<HASH> 100644 --- a/oidc/verifyAuthorizationCode.js +++ b/oidc/verifyAuthorizationCode.js @@ -18,7 +18,7 @@ function verifyAuthorizationCode (req, res, next) { if (params.grant_type === 'authorization_code') { AuthorizationCode.getByCode(params.code, function (err, ac) { - if (err) { return callback(err); } + if (err) { return next(err); } // Can't find authorization code if (!ac) {
fix(oidc): Fix callback function name `callback` is not defined in this context. Instead, the correct function to use is `next` (see `verifyAuthorizationCode` parameters)
anvilresearch_connect
train
js
cdf49de67e64b31c1078acabf3fb102a0f46d2af
diff --git a/server/src/public/js/ng/layout-ctrl.js b/server/src/public/js/ng/layout-ctrl.js index <HASH>..<HASH> 100644 --- a/server/src/public/js/ng/layout-ctrl.js +++ b/server/src/public/js/ng/layout-ctrl.js @@ -70,9 +70,12 @@ ngApp.controller('LayoutCtrl', ['$scope', '$http', '$rootScope', 'apiAdapter', ' if ($scope.vm.actorTags) { if (typeof $scope.vm.actorTags === 'string') { - actorTags = $scope.vm.actorTags.split(","); + actorTags = $scope.vm.actorTags + .split(",") + .map(function (tag) { return tag.trim(); }); } else if ($scope.vm.actorTags.length) { - actorTags = $scope.vm.actorTags; + actorTags = $scope.vm.actorTags + .map(function (tag) { return tag.trim(); });; } }
fix(server): spaces around actor tag names not trimmed-out in the "create session" dialog
mcdcorp_opentest
train
js
c2821791bac7d638890accc98798bf4cbfe122e7
diff --git a/core/peerstore/peerstore.go b/core/peerstore/peerstore.go index <HASH>..<HASH> 100644 --- a/core/peerstore/peerstore.go +++ b/core/peerstore/peerstore.go @@ -28,14 +28,14 @@ var ( // ProviderAddrTTL is the TTL of an address we've received from a provider. // This is also a temporary address, but lasts longer. After this expires, // the records we return will require an extra lookup. - ProviderAddrTTL = time.Minute * 10 + ProviderAddrTTL = time.Minute * 30 // RecentlyConnectedAddrTTL is used when we recently connected to a peer. // It means that we are reasonably certain of the peer's address. - RecentlyConnectedAddrTTL = time.Minute * 10 + RecentlyConnectedAddrTTL = time.Minute * 30 // OwnObservedAddrTTL is used for our own external addresses observed by peers. - OwnObservedAddrTTL = time.Minute * 10 + OwnObservedAddrTTL = time.Minute * 30 ) // Permanent TTLs (distinct so we can distinguish between them, constant as they
feat: keep addresses for longer (#<I>) There's really no reason to expire these after <I> minutes as opposed to <I>. Given that our default DHT refresh interval is <I> minutes, setting this to <I> reduces the chances that we'll "forget" peers.
libp2p_go-libp2p
train
go
05b9758e45f184f133fc3a77db302b684b18d940
diff --git a/src/components/run.js b/src/components/run.js index <HASH>..<HASH> 100644 --- a/src/components/run.js +++ b/src/components/run.js @@ -67,6 +67,13 @@ export default function (Glide, Components, Events) { // While direction is `=` we want jump to // a specified index described in steps. if (direction === '=') { + // Check if bound is true, + // as we want to avoid whitespaces. + if( Glide.settings.bound && toInt(steps) > length ) { + Glide.index = length + return + } + Glide.index = steps return
fix: Bound is not working when using dots or arrows #<I> (#<I>)
glidejs_glide
train
js
62efcaf010c65d3d2bf8b0004953608628c15465
diff --git a/packages/api-axios/src/resources/organizations.js b/packages/api-axios/src/resources/organizations.js index <HASH>..<HASH> 100644 --- a/packages/api-axios/src/resources/organizations.js +++ b/packages/api-axios/src/resources/organizations.js @@ -208,7 +208,7 @@ export default class AvOrganizationsApi extends AvApi { } } } - }, {}); + }); } return Object.keys(authorizedOrgs).reduce((accum, orgId) => {
fix(api-axios): resolve lint error
Availity_sdk-js
train
js
30da660d616c0e241b7fa66ce02bb77cfe9d35ad
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -1,5 +1,12 @@ from setuptools import setup +def local_scheme(_): + """Enables a version format so that upload to TestPyPI is successful. + For example: 2.6.2.dev8 + See https://github.com/pypa/setuptools_scm/issues/342. + """ + return "" + setup( - use_scm_version=True, + use_scm_version={"local_scheme": local_scheme}, )
ci(TestPyPi): Enables a version format .. so that upload to TestPyPI is successful
varlink_python
train
py
49c101668e4f20bea304557aba0dd9f38c425d0e
diff --git a/packages/node_modules/@webex/plugin-meetings/src/common/errors/parameter.js b/packages/node_modules/@webex/plugin-meetings/src/common/errors/parameter.js index <HASH>..<HASH> 100644 --- a/packages/node_modules/@webex/plugin-meetings/src/common/errors/parameter.js +++ b/packages/node_modules/@webex/plugin-meetings/src/common/errors/parameter.js @@ -12,10 +12,15 @@ export default class ParameterError extends Error { */ constructor(message = ERROR_DICTIONARY.PARAMETER.MESSAGE, error = null) { super(message); + + if (Error.captureStackTrace) { + Error.captureStackTrace(this, ParameterError); + } + this.name = ERROR_DICTIONARY.PARAMETER.NAME; this.sdkMessage = ERROR_DICTIONARY.PARAMETER.MESSAGE; this.error = error; - this.stack = error ? error.stack : (new Error()).stack; + this.code = ERROR_DICTIONARY.PARAMETER.CODE; } }
fix(meetings): use captureStackTrace for ParameterError Instead of creating a new error object, the preferred way to get the stack trace to a custom error is via captureStackTrace.
webex_spark-js-sdk
train
js
5a3f6c96b793cd83579e7f48fac8b08b0912d1e8
diff --git a/tests/share_elements/test_generic_libraries.py b/tests/share_elements/test_generic_libraries.py index <HASH>..<HASH> 100644 --- a/tests/share_elements/test_generic_libraries.py +++ b/tests/share_elements/test_generic_libraries.py @@ -41,6 +41,7 @@ def execute_all_generic_libraries_with_keyboard_only(): call_gui_callback(menubar_ctrl.on_stop_activate, None, None) +@pytest.mark.unstable @pytest.mark.timeout(30) def test_all_generic_libraries_in_a_row(caplog): testing_utils.run_gui(gui_config={'HISTORY_ENABLED': False, 'AUTO_BACKUP_ENABLED': False},
test(generic_libraries): all in a row does not work on Jenkins when running all tests in a row, the state machine is preempted. Possible reasons: * either the dialog is not popping up * or the key strokes are not occurring
DLR-RM_RAFCON
train
py
190568fd27c5f121061f50a80ed58533465e7733
diff --git a/test/test.js b/test/test.js index <HASH>..<HASH> 100644 --- a/test/test.js +++ b/test/test.js @@ -76,6 +76,14 @@ describe('node-serialize', function () { assert.equal('<b></b><i>foo</i>', serialize(node)); }); + it('should serialize an Array of nodes', function () { + var array = []; + array.push(document.createTextNode('foo')); + array.push(document.createElement('div')); + array[1].appendChild(document.createTextNode('bar')); + assert.equal('foo<div>bar</div>', serialize(array)); + }); + it('should emit a "serialize" event on a DIV node', function () { var node = document.createElement('div'); var count = 0;
test: add Array serialize test Should cover NodeLists in theory as well.
webmodules_dom-serialize
train
js
6381b480da195c10c0e46d71f6ab0cee9c5d9700
diff --git a/packages/core/test/mixins/collection.spec.js b/packages/core/test/mixins/collection.spec.js index <HASH>..<HASH> 100644 --- a/packages/core/test/mixins/collection.spec.js +++ b/packages/core/test/mixins/collection.spec.js @@ -22,13 +22,13 @@ describe('Collection', () => { }); describe('.initCollection', () => { - it('sets root propery to what is provided via config', () => { + it('sets root property to what is provided via config', () => { const collection = new Collection(); collection.initCollection({ root: true }); expect(collection.isRoot).toBeTrue(); }); - it('sets root propery to false by default', () => { + it('sets root property to false by default', () => { const collection = new Collection(); collection.initCollection({}); expect(collection.isRoot).toBeFalse();
test: fix typo in collection.spec.js (#<I>) propery -> property
frctl_fractal
train
js
203e77387f5a66b15c1e22585719c0a1d5f0d7c7
diff --git a/test/createTests.js b/test/createTests.js index <HASH>..<HASH> 100644 --- a/test/createTests.js +++ b/test/createTests.js @@ -292,6 +292,13 @@ module.exports = function createTests(createHistory, name, reset = defaultReset) state: null }) + history.push('/bar#baz') + expect(store).toContainRoute({ + path: '/bar#baz', + replace: false, + state: null + }) + history.replace({ state: { bar: 'baz' }, pathname: '/bar?query=1'
feat(test): test history.push with hash gets library back up to <I>% coverage
reactjs_react-router-redux
train
js
e410ebb7fcb1f9d36d594459ca0cd667e91745c1
diff --git a/webpack.common.js b/webpack.common.js index <HASH>..<HASH> 100644 --- a/webpack.common.js +++ b/webpack.common.js @@ -19,7 +19,10 @@ module.exports = { { test: /\.js$/, loader: 'babel-loader', - include: [demo, components, path.join(nodeModules, '@material')] + include: [demo, components, path.join(nodeModules, '@material')], + options: { + cacheDirectory: true + } }, { test: /\.vue$/,
chore(webpack): Cache babel-loader output
matsp_material-components-vue
train
js
ef7da2ac90cbead77d11de4df00a9a463b2afdd1
diff --git a/ipyvolume/serialize.py b/ipyvolume/serialize.py index <HASH>..<HASH> 100644 --- a/ipyvolume/serialize.py +++ b/ipyvolume/serialize.py @@ -1,3 +1,4 @@ +from __future__ import division import logging import math
fix: divisions for python<I> lead to wrong calculations in tiling
maartenbreddels_ipyvolume
train
py
2f08d5ca3ed5e34b2ee66c5bd6f38252a9b49515
diff --git a/dev/index.js b/dev/index.js index <HASH>..<HASH> 100644 --- a/dev/index.js +++ b/dev/index.js @@ -13,7 +13,12 @@ Vue.use(VueRouter) Vue.component(Boilerplate.name, Boilerplate) -new Vue({ +const vm = new Vue({ render: h => h(App), router -}).$mount('#app') +}) + +// Prevent layout jump while waiting for styles +window.addEventListener('load', () => { + vm.$mount('#app') +})
chore(dev): mount vue after content load vue-style-loader breaks tabs overflow, among other things
vuetifyjs_vuetify
train
js
333fee1a8fd98a2fbff1ab187c1b03246a7eb01f
diff --git a/commands.go b/commands.go index <HASH>..<HASH> 100644 --- a/commands.go +++ b/commands.go @@ -431,6 +431,7 @@ func (c statefulCmdable) AuthACL(ctx context.Context, username, password string) func (c cmdable) Wait(ctx context.Context, numSlaves int, timeout time.Duration) *IntCmd { cmd := NewIntCmd(ctx, "wait", numSlaves, int(timeout/time.Millisecond)) + cmd.setReadTimeout(timeout) _ = c(ctx, cmd) return cmd }
fix: set timeout for WAIT command. Fixes #<I>
go-redis_redis
train
go
84fd8e849ce75d332643075dd76e5dfdda17d70e
diff --git a/actor-apps/app-web/src/app/components/common/Dropdown.react.js b/actor-apps/app-web/src/app/components/common/Dropdown.react.js index <HASH>..<HASH> 100644 --- a/actor-apps/app-web/src/app/components/common/Dropdown.react.js +++ b/actor-apps/app-web/src/app/components/common/Dropdown.react.js @@ -120,7 +120,10 @@ class Dropdown extends React.Component { } dropdownItems.push( - <li className={elClassName} key={index} onClick={this.onSelect.bind(this, child.props.value)}> + <li className={elClassName} + key={index} + onClick={this.onSelect.bind(this, child.props.value)} + onMouseOver={() => this.setState({selectedIndex: index})}> {child.props.children} </li> );
fix(web): properly react on mouse over in mentions
actorapp_actor-platform
train
js
3571a15b3d24b10b8c7be8b2ca84c412abcbdc23
diff --git a/src/index.js b/src/index.js index <HASH>..<HASH> 100644 --- a/src/index.js +++ b/src/index.js @@ -1,8 +1,9 @@ // TODO move into the skatejs-web-components package. import 'custom-event-polyfill'; -import 'weakmap'; import debounce from 'debounce'; +import WeakMap from 'weakmap'; + import { eachChildNode, eachNodeOrFragmentNodes } from './util/each'; import { shadowDomV0, shadowDomV1 } from './util/support'; import canPatchNativeAccessors from './util/can-patch-native-accessors';
fix: Fix Opera <I>. The WeakMap polyfill says it puts it on window, but it doesn't seem to. Maybe it only does it when included via <script>. fixes #<I>
skatejs_named-slots
train
js
db51c6128e19c3d8f5e4d925cd43388d5dcbce0d
diff --git a/deisctl/cmd/cmd.go b/deisctl/cmd/cmd.go index <HASH>..<HASH> 100644 --- a/deisctl/cmd/cmd.go +++ b/deisctl/cmd/cmd.go @@ -510,7 +510,7 @@ func uninstallAllServices(b backend.Backend, wg *sync.WaitGroup, outchan chan st wg.Wait() outchan <- fmt.Sprintf("Control plane...") - b.Destroy([]string{"controller", "builder", "cache", "database", "registry@*"}, wg, outchan, errchan) + b.Destroy([]string{"controller", "builder", "database", "registry@*"}, wg, outchan, errchan) wg.Wait() outchan <- fmt.Sprintf("Logging subsystem...")
fix(deisctl): omit cache from `deisctl uninstall platform"
deis_deis
train
go
7147a9f25c3ee7b71e0509ba55c59d2c8ac595c4
diff --git a/platform/nativescript/plugins/navigator-plugin.js b/platform/nativescript/plugins/navigator-plugin.js index <HASH>..<HASH> 100644 --- a/platform/nativescript/plugins/navigator-plugin.js +++ b/platform/nativescript/plugins/navigator-plugin.js @@ -37,13 +37,13 @@ export function getFrameInstance(frame) { return getFrame(frame.id) } -export function findParentNavigationEntry(vm) { +export function findParentFrame(vm) { if (!vm) { return false } let entry = vm.$parent - while (entry && entry.$options.name !== 'NavigationEntry') { + while (entry && entry.$options.name !== 'Frame') { entry = entry.$parent } @@ -53,9 +53,9 @@ export function findParentNavigationEntry(vm) { export default { install(Vue) { Vue.prototype.$navigateBack = function(options, backstackEntry = null) { - const navEntry = findParentNavigationEntry(this) + const parentFrame = findParentFrame(this) const defaultOptions = { - frame: navEntry ? navEntry.$options.frame : 'default' + frame: parentFrame ? parentFrame : 'default' } options = Object.assign({}, defaultOptions, options) const frame = getFrameInstance(options.frame)
fix: look for parent Frame instead of a NavigationEntry
nativescript-vue_nativescript-vue
train
js
cbcc0131f9bd9212991c75683154e5f26983319f
diff --git a/tests/unit/state-service-test.js b/tests/unit/state-service-test.js index <HASH>..<HASH> 100644 --- a/tests/unit/state-service-test.js +++ b/tests/unit/state-service-test.js @@ -87,7 +87,7 @@ test('that stateFor with a single param returns the map which is initially unpop let data = subject.get('data'); assert.equal(data.bar, 'foo'); - assert.equal(map.get(mockModelA).bar, 'foo'); + assert.equal(map.get(mockModelA), data); }); test('that the state factory creates the correct object', function(assert) {
fix(tests): make sure to test the actual data objects
stefanpenner_ember-state-services
train
js
3ec52bfdcb2fe5f404bcd18af931220e97496811
diff --git a/index.js b/index.js index <HASH>..<HASH> 100644 --- a/index.js +++ b/index.js @@ -143,7 +143,7 @@ module.exports.util.attribution = function navngiving(type, doc, authors, licens if (licenses.has(license)) { return attribution + ` er lisensiert under <a href="${licenses.get(license)}">${license}</a>.`; - } else { - return attribution + ` er lisensiert under ${license}.`; } + + return attribution + ` er lisensiert under ${license}.`; };
fix(jshint): remove unexpected 'else' after 'return'
Turbasen_turbasen.js
train
js