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
c3aa0dfe9f541954bd748cf42fd203f009048e7d
diff --git a/packages/zefir/lib/router/define-match.js b/packages/zefir/lib/router/define-match.js index <HASH>..<HASH> 100644 --- a/packages/zefir/lib/router/define-match.js +++ b/packages/zefir/lib/router/define-match.js @@ -2,18 +2,21 @@ import React from 'react' import {Redirect, Route} from 'react-router-dom' import connect from '../utils/connect' -const defineMatch = (shouldRender, redirectTo) => { +const defineMatch = (shouldRender) => { const DefinedMatch = ({ component, + exact, + path, ...rest }) => ( <Route - {...rest} + path={path} + exact={exact} render={props => ( shouldRender(rest) ? renderComponent(component, props) : rest.redirect - ? renderRedirect(redirectTo, props.location) + ? renderRedirect(rest.redirect, props.location) : null )} /> @@ -28,7 +31,7 @@ function renderRedirect (pathname, from) { ) } -function renderComponent (component, props) { +function renderComponent (component, {history, location, match, ...props}) { const Component = connect(component) return (
refactor(router): clean up props
eyedea-io_zefir
train
js
b49e830e3a1c04ed194500506dc63de0912e728d
diff --git a/src/Leevel/Http/Response.php b/src/Leevel/Http/Response.php index <HASH>..<HASH> 100644 --- a/src/Leevel/Http/Response.php +++ b/src/Leevel/Http/Response.php @@ -107,14 +107,6 @@ class Response extends BaseResponse } /** - * 获取 COOKIE. - */ - public function getCookies(): array - { - return $this->headers->getCookies(); - } - - /** * 取回 JSON 数据. * * @return mixed
refactor(http): refactor response
hunzhiwange_framework
train
php
f910c34cce10a99411be304521e63afed397865b
diff --git a/test/download-dht-torrent.js b/test/download-dht-torrent.js index <HASH>..<HASH> 100644 --- a/test/download-dht-torrent.js +++ b/test/download-dht-torrent.js @@ -77,13 +77,22 @@ test('Download using DHT (via .torrent file)', function (t) { file.getBuffer(function (err, buf) { if (err) throw err t.deepEqual(buf, leavesFile, 'downloaded correct content') + gotBuffer = true + maybeDone() }) }) torrent.once('done', function () { t.pass('client2 downloaded torrent from client1') - cb(null, client2) + torrentDone = true + maybeDone() }) + + var torrentDone = false + var gotBuffer = false + function maybeDone () { + if (torrentDone && gotBuffer) cb(null, client2) + } }) }] }, function (err, r) {
test: don't assume event ordering
webtorrent_webtorrent
train
js
e113d6dc52df6f8017d8c7fb77004a0fb85c4763
diff --git a/lib/components/map/route-viewer-overlay.js b/lib/components/map/route-viewer-overlay.js index <HASH>..<HASH> 100644 --- a/lib/components/map/route-viewer-overlay.js +++ b/lib/components/map/route-viewer-overlay.js @@ -4,6 +4,16 @@ import { FeatureGroup, MapLayer, Polyline } from 'react-leaflet' import polyline from '@mapbox/polyline' +// helper fn to check if geometry has been populated for all patterns in route +const isGeomComplete = routeData => { + return ( + routeData && + routeData.patterns && + Object.values(routeData.patterns) + .every(ptn => typeof ptn.geometry !== 'undefined') + ) +} + class RouteViewerOverlay extends MapLayer { static propTypes = {} @@ -13,18 +23,6 @@ class RouteViewerOverlay extends MapLayer { componentWillUnmount () {} componentWillReceiveProps (nextProps) { - // helper fn to check if geometry has been populated for all patterns in route - const isGeomComplete = routeData => { - return ( - routeData && - routeData.patterns && - Object.values(routeData.patterns).reduce( - (acc, ptn) => acc && typeof ptn.geometry !== 'undefined', - true - ) - ) - } - // if pattern geometry just finished populating, update the map points if ( !isGeomComplete(this.props.routeData) &&
refactor(route-viewer-overlay): use Array.every for geom complete check
opentripplanner_otp-react-redux
train
js
b60b5e4105a14ed1f93bbb21bfebe9aa4438d9ae
diff --git a/index.js b/index.js index <HASH>..<HASH> 100644 --- a/index.js +++ b/index.js @@ -27,7 +27,7 @@ module.exports = timeout /** * Create a new timeout middleware. * - * @param {number|string} time The timeout as a number of milliseconds or a string for `ms` + * @param {number|string} [time=5000] The timeout as a number of milliseconds or a string for `ms` * @param {object} [options] Additional options for middleware * @param {boolean} [options.respond=true] Automatically emit error when timeout reached * @return {function} middleware
docs: fix jsdoc that time is optional
expressjs_timeout
train
js
8ff97e6b7c279334e417dbdb65e64d0de2656986
diff --git a/lib/shared.js b/lib/shared.js index <HASH>..<HASH> 100644 --- a/lib/shared.js +++ b/lib/shared.js @@ -12,7 +12,7 @@ const sha256File = require('sha256-file'); * @param {Object} serverless * @return {undefined} */ -function checkForAndDeleteMaxCacheVersions(options, serverless) { +function checkForAndDeleteMaxCacheVersions({ serverless, options, log }) { // If we're using the static cache, and we have static cache max versions enabled if ( options.useStaticCache && @@ -42,10 +42,17 @@ function checkForAndDeleteMaxCacheVersions(options, serverless) { rimraf.sync(files[i]); items++; } + // Log the number of cache files flushed - serverless.cli.log( - `Removed ${items} items from cache because of staticCacheMaxVersions` - ); + if (log) { + log.info( + `Removed ${items} items from cache because of staticCacheMaxVersions` + ); + } else { + serverless.cli.log( + `Removed ${items} items from cache because of staticCacheMaxVersions` + ); + } } } }
refactor: Adapt `shared` to modern logs
UnitedIncome_serverless-python-requirements
train
js
f0b7e81468f7b67ae5b8571881c081388eb0fc6b
diff --git a/message.go b/message.go index <HASH>..<HASH> 100644 --- a/message.go +++ b/message.go @@ -288,13 +288,14 @@ type MessageAllowedMentions struct { // A MessageAttachment stores data for message attachments. type MessageAttachment struct { - ID string `json:"id"` - URL string `json:"url"` - ProxyURL string `json:"proxy_url"` - Filename string `json:"filename"` - Width int `json:"width"` - Height int `json:"height"` - Size int `json:"size"` + ID string `json:"id"` + URL string `json:"url"` + ProxyURL string `json:"proxy_url"` + Filename string `json:"filename"` + Width int `json:"width"` + Height int `json:"height"` + Size int `json:"size"` + Ephemeral bool `json:"ephemeral"` } // MessageEmbedFooter is a part of a MessageEmbed struct.
feat: ephemeral attachments (#<I>)
bwmarrin_discordgo
train
go
f61de394da5abcb22386eda3ee3d7f35056613df
diff --git a/webapps/ui/cockpit/plugins/base/app/views/processesDashboard/process-definitions.js b/webapps/ui/cockpit/plugins/base/app/views/processesDashboard/process-definitions.js index <HASH>..<HASH> 100644 --- a/webapps/ui/cockpit/plugins/base/app/views/processesDashboard/process-definitions.js +++ b/webapps/ui/cockpit/plugins/base/app/views/processesDashboard/process-definitions.js @@ -56,7 +56,7 @@ module.exports = [ 'ViewsProvider', function(ViewsProvider) { latest: true }, function(err, data) { $scope.processDefinitionData = data.items; - $scope.processDefinitionsCount = data.items.length; + $scope.processDefinitionsCount = data.count; if (err) { $scope.loadingState = 'ERROR'; }
chore(cockpit): change data source of count for process definitions.
camunda_camunda-bpm-platform
train
js
bc5ca10380d6b2195e9cb4566bf408e75ebec7ee
diff --git a/index.js b/index.js index <HASH>..<HASH> 100644 --- a/index.js +++ b/index.js @@ -258,12 +258,14 @@ module.exports = (api, options) => { removeArg('--dashboard', 1, rawArgs) removeArg('--debug', 1, rawArgs) removeArg('--headless', 1, rawArgs) + removeArg('--https', 1, rawArgs) // Run the serve command const server = await api.service.run('serve', { _: [], // Use dashboard if called from ui - dashboard: args.dashboard + dashboard: args.dashboard, + https: args.https }) const outputDir = pluginOptions.outputDir || 'dist_electron'
feat(serve): support https cli arg, fixes #<I>
nklayman_vue-cli-plugin-electron-builder
train
js
63f636d1bbabfc05e2092bbb4f2cac2ae6eb0a12
diff --git a/svg_model/svgload/path_parser.py b/svg_model/svgload/path_parser.py index <HASH>..<HASH> 100644 --- a/svg_model/svgload/path_parser.py +++ b/svg_model/svgload/path_parser.py @@ -41,7 +41,7 @@ class PathDataParser(object): def get_number(self): ''' - .. versionchanged:: X.X.X + .. versionchanged:: 0.9.2 Add support for float exponent strings (e.g., ``3.435e-7``). Fixes `issue #4 <https://github.com/wheeler-microfluidics/svg-model/issues/4>`.
docs(version): add version notifications
sci-bots_svg-model
train
py
8122fed02ee5ffc128922d807a05f0f6507dae14
diff --git a/src/utils/write-images.js b/src/utils/write-images.js index <HASH>..<HASH> 100644 --- a/src/utils/write-images.js +++ b/src/utils/write-images.js @@ -38,8 +38,6 @@ module.exports = function (opts) { rasterizeTasks.push(rasterizeTask); }); - RSVP.all(rasterizeTasks).then(() => { - resolve(opts.platformSizes) - }); + RSVP.all(rasterizeTasks).then(() => resolve(opts.platformSizes)); }); };
refactor(write-images): Update util to single line then callback
isleofcode_splicon
train
js
fb0718689ca74deeb2a3471af199257758babd11
diff --git a/lib/collection.js b/lib/collection.js index <HASH>..<HASH> 100644 --- a/lib/collection.js +++ b/lib/collection.js @@ -1453,7 +1453,7 @@ Collection.prototype.stats = function(options, callback) { /** * @typedef {Object} Collection~findAndModifyWriteOpResult - * @property {object} value Document returned from findAndModify command. + * @property {object} value Document returned from the `findAndModify` command. If no documents were found, `value` will be `null` by default (`returnOriginal: true`), even if a document was upserted; if `returnOriginal` was false, the upserted document will be returned in that case. * @property {object} lastErrorObject The raw lastErrorObject returned from the command. * @property {Number} ok Is 1 if the command executed correctly. */
docs(Collection): clarify findAndModify's result.value * Clarify that findAndModify's result.value doesn't echo upserted docs * Clarify the value returned when upserting a document
mongodb_node-mongodb-native
train
js
0c90b643f167233cb25256739877acb1f686d00b
diff --git a/packages/dna-skin-ce-v0/index.js b/packages/dna-skin-ce-v0/index.js index <HASH>..<HASH> 100644 --- a/packages/dna-skin-ce-v0/index.js +++ b/packages/dna-skin-ce-v0/index.js @@ -6,14 +6,14 @@ * Just another components pattern. * Use with Skin template and Custom Elements v0 spec. */ -import { SkinTemplateMixin } from 'dna-skin/src/mixins/skin.js'; -import { mix, MIXINS, BaseComponent as OriginalComponent } from 'dna-custom-elements-v0'; +import { SkinTemplateMixin } from '@dnajs/skin/src/mixins/skin.js'; +import { mix, MIXINS, BaseComponent as OriginalComponent } from '@dnajs/custom-elements-v0'; MIXINS.SkinTemplateMixin = SkinTemplateMixin; export { mix, MIXINS }; -export { Template, IDOM } from 'dna-skin'; -export { registry, render, define, prop, shim, HELPERS } from 'dna-custom-elements-v0'; +export { Template, IDOM } from '@dnajs/skin'; +export { registry, render, define, prop, shim, HELPERS } from '@dnajs/custom-elements-v0'; export class BaseComponent extends mix(OriginalComponent).with( SkinTemplateMixin ) {}
fix: skin-ce-v0 imports
chialab_dna
train
js
28cebd1e4652e3631d8176f1a369726f17333775
diff --git a/index.js b/index.js index <HASH>..<HASH> 100644 --- a/index.js +++ b/index.js @@ -33,6 +33,7 @@ function sassGenerateContents(destFilePath, creds, options){ for(var i = 0; i < len; i++){ spaceArr.push(spacer); } + return spaceArr.join(''); } @@ -135,10 +136,6 @@ function sassGenerateContents(destFilePath, creds, options){ return newFile; } - function getBase(filePath){ - return filePath.substring(0, replacePath(filePath).lastIndexOf(':')); - } - function throwWarning(fileName){ gutil.log(PLUGIN_NAME + ' Comments missing or malformed in file: ' + fileName + ' - File not included\n'); }
refactor: Strip getBase function as it is unused
andrewbrandwood_gulp-sass-generate-contents
train
js
4fd12b0f12f857284ece63c8a685a0a7f5b67123
diff --git a/packages/blueprint-handlebars/app/services/handlebars.js b/packages/blueprint-handlebars/app/services/handlebars.js index <HASH>..<HASH> 100644 --- a/packages/blueprint-handlebars/app/services/handlebars.js +++ b/packages/blueprint-handlebars/app/services/handlebars.js @@ -44,6 +44,16 @@ module.exports = Service.extend ({ }), /** + * Compile a template. + * + * @param path + * @returns {*} + */ + compile (path) { + return this._templateCompiler.compile (path); + }, + + /** * Initialize the handlebars environment instance. * * @private diff --git a/packages/blueprint-handlebars/lib/template-compiler.js b/packages/blueprint-handlebars/lib/template-compiler.js index <HASH>..<HASH> 100644 --- a/packages/blueprint-handlebars/lib/template-compiler.js +++ b/packages/blueprint-handlebars/lib/template-compiler.js @@ -14,9 +14,9 @@ module.exports = class TemplateCompiler { } /** - * Compile the template - * @param name - * @returns {Promise<null|*>} + * Compile the template. + * + * @param path Path to template file. */ async compile (path) { const exists = await fse.pathExists (path);
feat: added compile() method to the service
onehilltech_blueprint
train
js,js
869711185cb5b5d31aa5a79250cbf8b53a22b15d
diff --git a/src/Listener/ViewSearchListener.php b/src/Listener/ViewSearchListener.php index <HASH>..<HASH> 100644 --- a/src/Listener/ViewSearchListener.php +++ b/src/Listener/ViewSearchListener.php @@ -43,6 +43,7 @@ class ViewSearchListener extends BaseListener */ public function afterPaginate(Event $event) { + $event; if (!$this->_table()->behaviors()->has('Search')) { return; }
fix: reference event to quiet scrutinizer
FriendsOfCake_crud-view
train
php
6bdffdbf8d7d8909bb030e19fad9c50b40d72dc8
diff --git a/src/index.js b/src/index.js index <HASH>..<HASH> 100644 --- a/src/index.js +++ b/src/index.js @@ -30,7 +30,11 @@ function parsePath (filePath) { function attachReporter (reporterFilePath) { // Assign the reporter if it's directly passed as an argument try { - reporter = require(reporterFilePath || defaultReporter)(runner); + if (reporterFilePath && typeof reporterFilePath !== 'string') { + reporter = reporterFilePath(runner); + } else { + reporter = require(reporterFilePath || defaultReporter)(runner); + } } catch (err) { console.log(chalk.bgRed.bold.white(' No reporter ! ') + ' [' + chalk.dim.red(err) + ']');
feat: accept reporters not only as filepath but as objects also
damonjs_damon
train
js
44fb2e48f71747014c7b0e836ef0a69334b760df
diff --git a/bin/whistle.js b/bin/whistle.js index <HASH>..<HASH> 100755 --- a/bin/whistle.js +++ b/bin/whistle.js @@ -105,7 +105,7 @@ program.setConfig({ program .option('-d, --debug', 'debug mode') - .option('-A, --ATS', 'generate iOS ATS Root CA') + .option('-A, --ATS', 'generate Root CA for iOS ATS (Node >= 6 is required)') .option('-z, --certDir [directory]', 'custom certificate path', String, undefined) .option('-l, --localUIHost [hostname]', 'local ui host(' + config.localUIHost + ' by default)', String, undefined) .option('-n, --username [username]', 'login username', String, undefined)
refactor: Refine cmd tips
avwo_whistle
train
js
aa5d0abf25661d651ef331abb222652cf4e65a86
diff --git a/mongo_connector/doc_managers/solr_doc_manager.py b/mongo_connector/doc_managers/solr_doc_manager.py index <HASH>..<HASH> 100755 --- a/mongo_connector/doc_managers/solr_doc_manager.py +++ b/mongo_connector/doc_managers/solr_doc_manager.py @@ -79,10 +79,10 @@ class DocManager(): for wc_pattern in self._parse_fields(result, 'dynamicFields'): if wc_pattern[0] == "*": self._dynamic_field_regexes.append( - re.compile("\w%s\Z" % wc_pattern)) + re.compile(".*%s\Z" % wc_pattern[1:])) elif wc_pattern[-1] == "*": self._dynamic_field_regexes.append( - re.compile("\A%s\w*" % wc_pattern[:-1])) + re.compile("\A%s.*" % wc_pattern[:-1])) def _clean_doc(self, doc): """Reformats the given document before insertion into Solr.
fix: dynamicFields should match nested field names
yougov_mongo-connector
train
py
f5ea154480819fde89026ffadda7f3611deca501
diff --git a/source/rafcon/gui/mygaphas/aspect.py b/source/rafcon/gui/mygaphas/aspect.py index <HASH>..<HASH> 100644 --- a/source/rafcon/gui/mygaphas/aspect.py +++ b/source/rafcon/gui/mygaphas/aspect.py @@ -188,7 +188,10 @@ class SegmentHandleSelection(ItemHandleSelection): after = handles[handle_index + 1] d, p = distance_line_point(before.pos, after.pos, handle.pos) - if d < 1. / item.hierarchy_level: + # Checks how far the waypoint is from an imaginary line connecting the previous and next way/end point + # If it is close, the two segments are merged to one + merge_distance = item.line_width * 4 + if d < merge_distance: assert len(self.view.canvas.solver._marked_cons) == 0 Segment(item, self.view).merge_segment(segment)
fix(SegmentHandleSelection): Properly merge segments The merging of segments (removal of waypoints) should now properly work on all zoom and hierarchy levels. The commit fixes the issues, where it was no longer possible to create new waypoints on a deeply nested state.
DLR-RM_RAFCON
train
py
3c8a47d5853710a10f07df8c576cecbcb22054f4
diff --git a/.eslintrc.js b/.eslintrc.js index <HASH>..<HASH> 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -198,6 +198,7 @@ module.exports = { 'packages/components/**/*', 'packages/composite-checkout/**/*', 'packages/data-stores/**/*', + 'packages/js-utils/**/*', 'packages/launch/**/*', 'packages/wpcom-checkout/**/*', 'test/e2e/**/*', diff --git a/packages/js-utils/src/test/unique-by.js b/packages/js-utils/src/test/unique-by.js index <HASH>..<HASH> 100644 --- a/packages/js-utils/src/test/unique-by.js +++ b/packages/js-utils/src/test/unique-by.js @@ -1,6 +1,3 @@ -/** - * Internal dependencies - */ import uniqueBy from '../unique-by'; describe( 'uniqueBy()', () => {
chore: migrate packages/js-utils to import/order (#<I>)
Automattic_wp-calypso
train
js,js
b46535f93ecb06a8eb6bf5b43e4ac046182aaace
diff --git a/packages/extract-svg-sprite-webpack-plugin/lib/utils/replacement-generator.js b/packages/extract-svg-sprite-webpack-plugin/lib/utils/replacement-generator.js index <HASH>..<HASH> 100644 --- a/packages/extract-svg-sprite-webpack-plugin/lib/utils/replacement-generator.js +++ b/packages/extract-svg-sprite-webpack-plugin/lib/utils/replacement-generator.js @@ -42,14 +42,14 @@ class ReplacementGenerator { * @return {Replacement} */ static symbolUrl(symbol, config) { - const { filename, emit, spriteType, sriteConfig } = config; + const { filename, emit, spriteType, spriteConfig } = config; let replaceTo; if (!filename || !emit) { replaceTo = `#${symbol.id}`; } else { replaceTo = spriteType === mixer.StackSprite.TYPE - ? `${filename}#${symbol.id}${sriteConfig.usageIdSuffix}` + ? `${filename}#${symbol.id}${spriteConfig.usageIdSuffix}` : filename; }
fix: typo (#<I>)
JetBrains_svg-mixer
train
js
57c276c80aba6cb13a859369f4f194470df594d7
diff --git a/src/trumbowyg.js b/src/trumbowyg.js index <HASH>..<HASH> 100644 --- a/src/trumbowyg.js +++ b/src/trumbowyg.js @@ -1376,10 +1376,25 @@ Object.defineProperty(jQuery.trumbowyg, 'defaultOptions', { var t = this, prefix = t.o.prefix, fullscreenCssClass = prefix + 'fullscreen', - isFullscreen; + fullscreenPlaceholderClass = fullscreenCssClass + '-placeholder', + isFullscreen, + editorHeight = t.$box.outerHeight(); t.$box.toggleClass(fullscreenCssClass); isFullscreen = t.$box.hasClass(fullscreenCssClass); + + if (isFullscreen) { + t.$box.before( + $('<div/>', { + class: fullscreenPlaceholderClass + }).css({ + height: editorHeight + 'px' + }) + ); + } else { + $('.' + fullscreenPlaceholderClass).remove(); + } + $('body').toggleClass(prefix + 'body-fullscreen', isFullscreen); $(window).trigger('scroll'); t.$c.trigger('tbw' + (isFullscreen ? 'open' : 'close') + 'fullscreen');
fix: add a placeholder while fullscreen to keep editor space fix #<I>
Alex-D_Trumbowyg
train
js
7c51f1369547c308cb37a6a919917e5559b137b3
diff --git a/packages/core/renderers/renderer-hyperhtml.js b/packages/core/renderers/renderer-hyperhtml.js index <HASH>..<HASH> 100644 --- a/packages/core/renderers/renderer-hyperhtml.js +++ b/packages/core/renderers/renderer-hyperhtml.js @@ -34,11 +34,13 @@ export function BoltComponent(Base = HTMLElement) { // this.innerHTML = JSON.parse(this.dataset.ssrContent); // } this._checkSlots(); - super.connectedCallback && super.connectedCallback(); + this.connecting && this.connecting(); + this.connected && this.connected(); } disconnectedCallback() { - super.disconnectedCallback && super.disconnectedCallback(); + this.disconnecting && this.disconnecting(); + this.disconnected && this.disconnected(); } addStyles(stylesheet) {
fix: updating hyperhtml renderer to prevent extra connectedCallbacks from running unexpectedly
bolt-design-system_bolt
train
js
f9b72505fb101db83581c5fce08e7a4a8b7660b0
diff --git a/superset/config.py b/superset/config.py index <HASH>..<HASH> 100644 --- a/superset/config.py +++ b/superset/config.py @@ -656,7 +656,7 @@ DISPLAY_MAX_ROW = 10000 # Default row limit for SQL Lab queries. Is overridden by setting a new limit in # the SQL Lab UI -DEFAULT_SQLLAB_LIMIT = 10000 +DEFAULT_SQLLAB_LIMIT = 1000 # Maximum number of tables/views displayed in the dropdown window in SQL Lab. MAX_TABLE_NAMES = 3000
fix: revert DEFAULT_SQLLAB_LIMIT to default (#<I>)
apache_incubator-superset
train
py
fa66f1aa3496a45a61d2da221337b5ee7c674f3f
diff --git a/models/classes/preview/ItemPreviewerService.php b/models/classes/preview/ItemPreviewerService.php index <HASH>..<HASH> 100644 --- a/models/classes/preview/ItemPreviewerService.php +++ b/models/classes/preview/ItemPreviewerService.php @@ -72,10 +72,7 @@ class ItemPreviewerService extends ConfigurableService $config = $registry->get(self::REGISTRY_ENTRY_KEY); } - if (isset($config[self::PREVIEWERS_KEY])) { - return $config[self::PREVIEWERS_KEY]; - } - return []; + return $config[self::PREVIEWERS_KEY] ?? []; } /** @@ -90,10 +87,7 @@ class ItemPreviewerService extends ConfigurableService $config = $registry->get(self::REGISTRY_ENTRY_KEY); } - if (isset($config[self::PLUGINS_KEY])) { - return $config[self::PLUGINS_KEY]; - } - return []; + return $config[self::PLUGINS_KEY] ?? []; } /**
refactor: use null coalescing operator
oat-sa_extension-tao-item
train
php
de8c253b49f793ea85644610ca0cdef0cf4d024a
diff --git a/src/service/translate.js b/src/service/translate.js index <HASH>..<HASH> 100644 --- a/src/service/translate.js +++ b/src/service/translate.js @@ -532,6 +532,7 @@ function $translate($STORAGE_KEY, $windowProvider, $translateSanitizationProvide return $storageKey; } $storageKey = key; + return this; }; this.storageKey = storageKey;
fix(service): make provider's storageKey chainable Solves #<I>
angular-translate_angular-translate
train
js
3762ecd1d5d16d91d2976ef2dbdcea86fb5f0dba
diff --git a/gridsome/app/components/Link.js b/gridsome/app/components/Link.js index <HASH>..<HASH> 100644 --- a/gridsome/app/components/Link.js +++ b/gridsome/app/components/Link.js @@ -69,6 +69,7 @@ export default { attrs, directives, domProps: { + ...data.domProps, __gLink__: true } }, children)
fix(g-link): add support for v-html (#<I>)
gridsome_gridsome
train
js
eddf3f75271a51bf4a0f9416209efe6c68e60eb9
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -65,7 +65,7 @@ def is_requirement(line): README = open(os.path.join(os.path.dirname(__file__), 'README.rst')).read() -VERSION = '2.1.2' +VERSION = '2.1.3' if sys.argv[-1] == 'tag': print("Tagging the version on github:")
chore: Bump patch version number to <I> after requirements upgrade.
edx_xblock-utils
train
py
596b37f15340d357e8a6903d139331c675a2211d
diff --git a/delayed/delayed_test.go b/delayed/delayed_test.go index <HASH>..<HASH> 100644 --- a/delayed/delayed_test.go +++ b/delayed/delayed_test.go @@ -27,5 +27,7 @@ func TestDelayed(t *testing.T) { } func TestDelayedAll(t *testing.T) { - dstest.SubtestAll(t, New(datastore.NewMapDatastore(), delay.Fixed(time.Millisecond))) + // Delay for virtually no time, we just want to make sure this works correctly, not that it + // delays anything. + dstest.SubtestAll(t, New(datastore.NewMapDatastore(), delay.Fixed(time.Nanosecond))) }
test: faster delaystore test We don't _actually_ need to delay here. The basic subtests don't even know that things should be delayed.
ipfs_go-datastore
train
go
cb7154a82e6aedc54df57feb5502ed45399141b4
diff --git a/test/tools/runner/index.js b/test/tools/runner/index.js index <HASH>..<HASH> 100644 --- a/test/tools/runner/index.js +++ b/test/tools/runner/index.js @@ -98,3 +98,8 @@ after(() => mock.cleanup()); require('./plugins/deferred'); require('./plugins/session_leak_checker'); require('./plugins/client_leak_checker'); + +// configure mocha and chai +require('mocha-sinon'); +const chai = require('chai'); +chai.use(require('sinon-chai'));
chore: add sinon-chai and mocha-chai for all tests
mongodb_node-mongodb-native
train
js
3b39b18a5e21b2bceeceeccb3b102a1b324bcca5
diff --git a/endpoints/register.js b/endpoints/register.js index <HASH>..<HASH> 100644 --- a/endpoints/register.js +++ b/endpoints/register.js @@ -65,7 +65,7 @@ class Authentication extends Endpoint { refresh_token: null, last_ip: [] } - this.db.collection('users').insertOne(user) + await this.db.collection('users').insertOne(user) auth.saveIP.bind(this)(user.user_key, ip, 'register', true) return user.user_key
fix: Wait for actual user insertion before returning response
cubic-js_cubic
train
js
01e56c621366208cc4c563d11a51eaadf5cd2edc
diff --git a/test/grunt-karma-test.js b/test/grunt-karma-test.js index <HASH>..<HASH> 100644 --- a/test/grunt-karma-test.js +++ b/test/grunt-karma-test.js @@ -2,12 +2,14 @@ describe('grunt-karma', function(){ describe('one', function(){ it('should be awesome', function(){ + console.log('one'); expect('foo').to.be.a('string'); }); }); describe('two', function(){ it('should be equally awesome', function(){ + console.log('two'); expect('woot').to.be.a('string'); }); });
test: add log for sake of checking grep
karma-runner_grunt-karma
train
js
86a274a7eed37acb45f43c5e695e2bd6dce1b7d8
diff --git a/public/app/core/services/backend_srv.js b/public/app/core/services/backend_srv.js index <HASH>..<HASH> 100644 --- a/public/app/core/services/backend_srv.js +++ b/public/app/core/services/backend_srv.js @@ -105,6 +105,13 @@ function (angular, _, coreModule, config) { }); } + //populate error obj on Internal Error + if (_.isString(err.data) && err.status === 500 && !err.data) { + err.data = { + error: err.statusText + }; + } + // for Prometheus if (!err.data.message && _.isString(err.data.error)) { err.data.message = err.data.error;
feat(backendsrv): improves error response handling datasourceRequests that could not reach the destination threw invalid errors due to missing property. This fixes gives the user a better error message. closes #<I>
grafana_grafana
train
js
879de676ffcf61a34df040efc5479d555e2cf977
diff --git a/packages/card/index.js b/packages/card/index.js index <HASH>..<HASH> 100644 --- a/packages/card/index.js +++ b/packages/card/index.js @@ -1,3 +1,5 @@ -const React = require('./dist/react') +const css = require('./css') +const react = require('./react') +const vars = require('./vars') -module.exports = { React } +module.exports = { css, react, vars }
refactor(card): remember to update index for new css/vars imports
pluralsight_design-system
train
js
a4b3e61935d32af3f54b4adda012a9362112d829
diff --git a/kubernetes-model-generator/kubernetes-model-core/src/main/java/io/fabric8/kubernetes/api/model/HasMetadata.java b/kubernetes-model-generator/kubernetes-model-core/src/main/java/io/fabric8/kubernetes/api/model/HasMetadata.java index <HASH>..<HASH> 100644 --- a/kubernetes-model-generator/kubernetes-model-core/src/main/java/io/fabric8/kubernetes/api/model/HasMetadata.java +++ b/kubernetes-model-generator/kubernetes-model-core/src/main/java/io/fabric8/kubernetes/api/model/HasMetadata.java @@ -120,6 +120,7 @@ public interface HasMetadata extends KubernetesResource { : Pluralize.toPlural(getSingular(clazz))); } + @JsonIgnore default String getPlural() { return getPlural(getClass()); } @@ -139,6 +140,7 @@ public interface HasMetadata extends KubernetesResource { .toLowerCase(Locale.ROOT); } + @JsonIgnore default String getSingular() { return getSingular(getClass()); }
fix: do not include getSingular/Plural in serialization
fabric8io_kubernetes-client
train
java
0f74f5f340b41482dfc292c100032e3f37fe8225
diff --git a/core-impl/client/src/main/java/com/alipay/sofa/rpc/client/AbstractCluster.java b/core-impl/client/src/main/java/com/alipay/sofa/rpc/client/AbstractCluster.java index <HASH>..<HASH> 100644 --- a/core-impl/client/src/main/java/com/alipay/sofa/rpc/client/AbstractCluster.java +++ b/core-impl/client/src/main/java/com/alipay/sofa/rpc/client/AbstractCluster.java @@ -461,7 +461,7 @@ public abstract class AbstractCluster extends Cluster { * @return the provider */ protected ProviderInfo selectPinpointProvider(String targetIP, List<ProviderInfo> providerInfos) { - ProviderInfo tp = ProviderHelper.toProviderInfo(targetIP); + ProviderInfo tp = convertToProviderInfo(targetIP); // 存在注册中心provider才会遍历 if (CommonUtils.isNotEmpty(providerInfos)) { for (ProviderInfo providerInfo : providerInfos) { @@ -476,6 +476,10 @@ public abstract class AbstractCluster extends Cluster { return tp; } + protected ProviderInfo convertToProviderInfo(String targetIP) { + return ProviderHelper.toProviderInfo(targetIP); + } + /** * 找不到可用的服务列表的异常 *
refactor:extract method in AbstractCluster (#<I>) * refactor:extract method
alipay_sofa-rpc
train
java
bc53574e9e97da790da967f42c0a355ac5b41e87
diff --git a/dist/keo.js b/dist/keo.js index <HASH>..<HASH> 100644 --- a/dist/keo.js +++ b/dist/keo.js @@ -148,7 +148,7 @@ function runTimeout(fun) { return setTimeout(fun, 0); } try { - // when when somebody has screwed with setTimeout but no I.E. maddness + // when when somebody has screwed with setTimeout but no I.E. madness return cachedSetTimeout(fun, 0); } catch (e) { try { @@ -171,7 +171,7 @@ function runClearTimeout(marker) { return clearTimeout(marker); } try { - // when when somebody has screwed with setTimeout but no I.E. maddness + // when when somebody has screwed with setTimeout but no I.E. madness return cachedClearTimeout(marker); } catch (e) { try { @@ -4121,4 +4121,4 @@ module.exports = require("axios"); module.exports = require("react-dom"); /***/ }) -/******/ ]); \ No newline at end of file +/******/ ]);
docs: Fix simple typo, maddness -> madness There is a small typo in dist/keo.js. Should read `madness` rather than `maddness`.
Wildhoney_Keo
train
js
bf8e2bb7b0d1da27ed727c333c61500a985da4d1
diff --git a/test/helpers/cons.go b/test/helpers/cons.go index <HASH>..<HASH> 100644 --- a/test/helpers/cons.go +++ b/test/helpers/cons.go @@ -318,7 +318,7 @@ var ciliumCLICommands = map[string]string{ "cilium status --all-controllers": "status.txt", "cilium kvstore get cilium --recursive": "kvstore_get.txt", - "hubble observe --since 4h -o json": "hubble_observe.txt", + "hubble observe --since 4h -o jsonpb": "hubble_observe.json", } // ciliumKubCLICommands these commands are the same as `ciliumCLICommands` but @@ -333,7 +333,7 @@ var ciliumKubCLICommands = map[string]string{ "cilium policy get": "policy_get.txt", "cilium status --all-controllers": "status.txt", - "hubble observe --since 4h -o json": "hubble_observe.txt", + "hubble observe --since 4h -o jsonpb": "hubble_observe.json", } // ciliumKubCLICommandsKVStore contains commands related to querying the kvstore.
test: Use hubble's jsonpb output in artifacts hubble observe now supports [1] reading flows from stdin if they are in jsonpb format. We should therefore emit jsonpb artifact files for tests, to be able to feed those files back into hubble observe. That will allow us to use hubble observe's filters and different output format. 1 - <URL>
cilium_cilium
train
go
215892e7513584c203c12f580d55ca6fdff55d06
diff --git a/packages/node_modules/@webex/internal-plugin-ediscovery/src/report-generator.js b/packages/node_modules/@webex/internal-plugin-ediscovery/src/report-generator.js index <HASH>..<HASH> 100644 --- a/packages/node_modules/@webex/internal-plugin-ediscovery/src/report-generator.js +++ b/packages/node_modules/@webex/internal-plugin-ediscovery/src/report-generator.js @@ -18,7 +18,7 @@ const ReportGenerator = SparkPlugin.extend({ folder: 'object', spaces: 'object', size: {type: 'number', default: 0}, - maxSize: {type: 'number', default: 1000000} + maxSize: {type: 'number', default: 104857600} // 100 Mb max size }, /** @@ -128,7 +128,7 @@ const ReportGenerator = SparkPlugin.extend({ * @returns {Promise} A promise on the generated report */ generate() { - if (!this.zip) { + if (!this.zip || !this.spaces) { return Promise.resolve(); }
feat(ediscovery): bump maxsize to <I> mb
webex_spark-js-sdk
train
js
fb6828957fd30484cd5f06a50b6be9f22c739bd8
diff --git a/lib/server/plugins/api/index.js b/lib/server/plugins/api/index.js index <HASH>..<HASH> 100644 --- a/lib/server/plugins/api/index.js +++ b/lib/server/plugins/api/index.js @@ -77,7 +77,7 @@ var internals = { } // hapi eats newlines. We like newlines. For POSIX and such. - data = data + '\n'; + // data = data + '\n'; resp = reply(data).code(res.statusCode).hold(); resp.headers = res.headers;
fix(api): do not force newlines * * * This commit was sponsored by The Hoodie Firm. You can hire The Hoodie Firm: <URL>
hoodiehq_hoodie-server
train
js
efd75d6ef7e1c69546e058f04a418e50026b5aa1
diff --git a/packages/functionals/botpress-qna/src/views/index.js b/packages/functionals/botpress-qna/src/views/index.js index <HASH>..<HASH> 100755 --- a/packages/functionals/botpress-qna/src/views/index.js +++ b/packages/functionals/botpress-qna/src/views/index.js @@ -203,7 +203,7 @@ export default class QnaAdmin extends Component { const nodeOptions = !redirectFlow ? [] - : find(flows, { name: redirectFlow }).nodes.map(({ name }) => ({ label: name, value: name })) + : get(find(flows, { name: redirectFlow }), 'nodes', []).map(({ name }) => ({ label: name, value: name })) return ( <div className={style.paddedRow}>
fix(qna): on flow deletion or rename, QNA still works
botpress_botpress
train
js
37b428ebb5d10b0c38acbe41374d046024698221
diff --git a/.jsdoc.js b/.jsdoc.js index <HASH>..<HASH> 100644 --- a/.jsdoc.js +++ b/.jsdoc.js @@ -31,7 +31,8 @@ module.exports = { source: { excludePattern: '(^|\\/|\\\\)[._]', include: [ - 'build/src' + 'build/src', + 'protos' ], includePattern: '\\.js$' }, @@ -42,7 +43,7 @@ module.exports = { systemName: '@google-cloud/bigquery-data-transfer', theme: 'lumen', default: { - "outputSourceFiles": false + outputSourceFiles: false } }, markdown: {
chore: update .jsdoc.js by add protos and remove double quotes (#<I>)
googleapis_nodejs-bigquery-data-transfer
train
js
d72dccfbe13d5e0da6bd0c67be1de96d0535a17a
diff --git a/lib/config/presets.js b/lib/config/presets.js index <HASH>..<HASH> 100644 --- a/lib/config/presets.js +++ b/lib/config/presets.js @@ -20,7 +20,7 @@ async function resolveConfigPresets( ); let config = {}; // First, merge all the preset configs from left to right - if (inputConfig.extends) { + if (inputConfig.extends && inputConfig.extends.length) { logger.debug('Found presets'); for (const preset of inputConfig.extends) { // istanbul ignore if @@ -44,7 +44,8 @@ async function resolveConfigPresets( logger.trace({ config }, `Post-merge resolve config`); for (const key of Object.keys(config)) { const val = config[key]; - if (isObject(val) && key !== 'logger') { + const ignoredKeys = ['api', 'content', 'logger']; + if (isObject(val) && ignoredKeys.indexOf(key) === -1) { // Resolve nested objects logger.trace(`Resolving object "${key}"`); config[key] = await resolveConfigPresets(val, logger, existingPresets);
fix: do not resolve packageFile content (#<I>)
renovatebot_renovate
train
js
f6959138360a8183e898dfe10cbbb054e7935362
diff --git a/packages/components/bolt-carousel/__tests__/carousel.js b/packages/components/bolt-carousel/__tests__/carousel.js index <HASH>..<HASH> 100644 --- a/packages/components/bolt-carousel/__tests__/carousel.js +++ b/packages/components/bolt-carousel/__tests__/carousel.js @@ -19,7 +19,7 @@ const vrtDefaultConfig = { }, }; -const timeout = 120000; +const timeout = 180000; const viewportSizes = [ {
fix: increase max timeout in Carousel component Jest tests to reduce errors thrown
bolt-design-system_bolt
train
js
be1abdc8605a5bec71167dc19ece23b1f5dd3e40
diff --git a/src/Log.php b/src/Log.php index <HASH>..<HASH> 100644 --- a/src/Log.php +++ b/src/Log.php @@ -1,8 +1,6 @@ <?php namespace Phwoolcon; -use Exception; -use Phwoolcon\Exception\Http\NotFoundException; use Phalcon\Di; use Phalcon\Logger; use Phalcon\Logger\Adapter\File; @@ -27,7 +25,10 @@ class Log extends Logger static::log(static::ERROR, $message, $context); } - public static function exception(Exception $e) + /** + * @param \Throwable $e + */ + public static function exception($e) { $message = get_class($e); $e instanceof HttpException or $message .= "\n" . $e->__toString();
fix: php7 compatibility in log::exception()
phwoolcon_phwoolcon
train
php
6e10896011565d23056211ab7a67f12994097575
diff --git a/packages/upload/src/UploadProgressBar.js b/packages/upload/src/UploadProgressBar.js index <HASH>..<HASH> 100644 --- a/packages/upload/src/UploadProgressBar.js +++ b/packages/upload/src/UploadProgressBar.js @@ -55,7 +55,7 @@ class UploadProgressBar extends Component { event.preventDefault(); upload.sendPassword(password); if (typeof onPasswordSubmit === 'function') { - onPasswordSubmit(event); + onPasswordSubmit(event, upload); } this.toggleModal(); };
feat(upload): return upload onPasswordSubmit callback
Availity_availity-react
train
js
9fa57d06da1558a76e944f386fd1ead282ca8e7e
diff --git a/gulpfile.js b/gulpfile.js index <HASH>..<HASH> 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -567,7 +567,7 @@ gulp.task('test.all.dart', shell.task(['./scripts/ci/test_dart.sh'])); function getBrowsersFromCLI() { var isSauce = false; var args = minimist(process.argv.slice(2)); - var rawInput = args.browsers?args.browsers:'DartiumWithWebPlatform'; + var rawInput = args.browsers ? args.browsers : 'DartiumWithWebPlatform'; var inputList = rawInput.replace(' ', '').split(','); var outputList = []; for (var i = 0; i < inputList.length; i++) {
style(gulp): make code more readable
angular_angular
train
js
11ae11bfa5f9fcb903689805f8d35b4d62ab0c90
diff --git a/tests/functional/cli/test_cli_artifacts.py b/tests/functional/cli/test_cli_artifacts.py index <HASH>..<HASH> 100644 --- a/tests/functional/cli/test_cli_artifacts.py +++ b/tests/functional/cli/test_cli_artifacts.py @@ -1,12 +1,9 @@ import subprocess -import sys import textwrap import time from io import BytesIO from zipfile import is_zipfile -import pytest - content = textwrap.dedent( """\ test-artifact: @@ -23,11 +20,12 @@ data = { } -@pytest.mark.skipif(sys.version_info < (3, 8), reason="I am the walrus") def test_cli_artifacts(capsysbinary, gitlab_config, gitlab_runner, project): project.files.create(data) - while not (jobs := project.jobs.list(scope="success")): + jobs = None + while not jobs: + jobs = project.jobs.list(scope="success") time.sleep(0.5) job = project.jobs.get(jobs[0].id)
test(cli): replace assignment expression This is a feature added in <I>, removing it allows for the test to run with lower python versions.
python-gitlab_python-gitlab
train
py
eb79ad4dab445f76ee7bf93288863a4e172bb93d
diff --git a/npm/cli.js b/npm/cli.js index <HASH>..<HASH> 100755 --- a/npm/cli.js +++ b/npm/cli.js @@ -8,3 +8,14 @@ var child = proc.spawn(electron, process.argv.slice(2), {stdio: 'inherit'}) child.on('close', function (code) { process.exit(code) }) + +const handleTerminationSignal = function (signal) { + process.on(signal, function signalHandler () { + if (!child.killed) { + child.kill(signal) + } + }) +} + +handleTerminationSignal('SIGINT') +handleTerminationSignal('SIGTERM')
fix: handle SIGINT and SIGTERM from the Electron CLI helper (#<I>) Fixes #<I>
electron_electron
train
js
81b1690cd0f0bef3d87698a6a38654b70ecee8c5
diff --git a/changelog.rb b/changelog.rb index <HASH>..<HASH> 100755 --- a/changelog.rb +++ b/changelog.rb @@ -56,7 +56,7 @@ end arg_from = args["<from-commit>"] arg_to = args["<to-commit>"] -use_markdown = args["--md"] != nil +use_markdown = args["--md"] # Find if we're operating on tags tag_from = tagWithName(repo, arg_from)
fix(arguments): arguments for output formats now work correctly * fix: the output format is not stuck to `md` anymore and defaults to `slack`
iv-mexx_git-releaselog
train
rb
c3c8b7f5cad2a479bac193d94d2328f8ced3b8c3
diff --git a/index.js b/index.js index <HASH>..<HASH> 100644 --- a/index.js +++ b/index.js @@ -15,7 +15,7 @@ module.exports = function renameOverwrite (oldPath, newPath) { case 'EEXIST': return rimraf(newPath) .then(() => rename(oldPath, newPath)) - // weird Windows shit + // weird Windows stuff case 'EPERM': return timeout(200) .then(() => rimraf(newPath)) @@ -33,7 +33,7 @@ module.exports.sync = function renameOverwriteSync (oldPath, newPath) { switch (err.code) { case 'ENOTEMPTY': case 'EEXIST': - case 'EPERM': // weird Windows shit + case 'EPERM': // weird Windows stuff rimrafSync(newPath) fs.renameSync(oldPath, newPath) return
refactor: better language in comments
zkochan_rename-overwrite
train
js
cc0ea37c300c60e35eea72c44491a803277bab7e
diff --git a/test/test-server-metadata.js b/test/test-server-metadata.js index <HASH>..<HASH> 100644 --- a/test/test-server-metadata.js +++ b/test/test-server-metadata.js @@ -7,6 +7,9 @@ var exec = require('child_process').exec; var path = require('path'); var util = require('util'); +// TODO: convert to tap test and use tap@1's --bail option instead of asserts +// to get early bailout on the first failure. + var server = app.listen(); var cpuProfilingSupported = require('semver').gt(process.version, '0.11.0'); @@ -95,7 +98,7 @@ function testCpuStop(cb) { function testCpuWatchdogStart(cb) { if (!cpuProfilingSupported) return cb(); - ServiceProcess.findOne({where: { workerId: 1, stopTime: null }}, + ServiceProcess.findOne({where: { workerId: 1, stopTime: null }}, function(err, proc) { assert.ifError(err); assert.equal(proc.isProfiling, true);
test: mark test-server-metadata for tap@1 This is the last test that is incompatible with tap@1, mainly due to the lack of any TAP compliant output and in its place a bunch of TAP-like noise that is mistaken for unplanned nested tests. See isaacs/node-tap#<I>
strongloop_strong-pm
train
js
dcc060a5a522bc9fa5d8560eb6e72ea25138e828
diff --git a/src/main/core.js b/src/main/core.js index <HASH>..<HASH> 100644 --- a/src/main/core.js +++ b/src/main/core.js @@ -259,7 +259,7 @@ function format(text, opts) { module.exports = { formatWithCursor(text, opts) { opts = normalizeOptions(opts); - return format(text, normalizeOptions(opts)); + return format(text, opts); }, parse(text, opts, massage) {
refactor: remove redundant call to normalizeOptions (#<I>) Removes redundant call to `normalizeOptions` (already done in preceding line) <URL>
josephfrazier_prettier_d
train
js
4349a482d9364b50f9dfc964236bdee36ed26c3e
diff --git a/src/express/index.spec.js b/src/express/index.spec.js index <HASH>..<HASH> 100644 --- a/src/express/index.spec.js +++ b/src/express/index.spec.js @@ -4,4 +4,22 @@ describe('graffiti express', function() { var express = require('./'); + it('checks for required options'); + + it('creates the schema'); + + describe('requested url starts with prefix', function() { + + it('returns with proper results'); + + it('returns with an error'); + + }); + + describe('requested url does not start with prefix', function() { + + it('calls the next middleware'); + + }); + });
test(express): add failing test cases for Express middleware
RisingStack_graffiti
train
js
ad47e33314b3ecbaddf158faa08888339d22eb28
diff --git a/metric_tank/http.go b/metric_tank/http.go index <HASH>..<HASH> 100644 --- a/metric_tank/http.go +++ b/metric_tank/http.go @@ -90,7 +90,7 @@ func Get(w http.ResponseWriter, req *http.Request, metaCache *MetaCache, aggSett out := make([]Series, len(targets)) for i, target := range targets { var consolidateBy string - var id string + id := target // yes, i am aware of the arguably grossness of the below. // however, it is solid based on the documented allowed input format. // once we need to support several functions, we can implement
fix: set id properly in non-consolidation case
grafana_metrictank
train
go
9cc3fbabf73cdb2d59fd492cb1fb39a9b24f1bb3
diff --git a/script/publish-to-npm.js b/script/publish-to-npm.js index <HASH>..<HASH> 100644 --- a/script/publish-to-npm.js +++ b/script/publish-to-npm.js @@ -121,8 +121,8 @@ new Promise((resolve, reject) => { } const currentJson = JSON.stringify(fs.readFileSync(path.join(tempDir, 'package.json'), 'utf8')) - currentJson.name = '@electron/nightly' - rootPackageJson.name = '@electron/nightly' + currentJson.name = 'electron-nightly' + rootPackageJson.name = 'electron-nightly' fs.writeFileSync( path.join(tempDir, 'package.json'),
chore: @electron/nightly => electron-nightly (#<I>)
electron_electron
train
js
b3e6cd75ffb7a658cb614d1f82ae349e7246f798
diff --git a/examples/index.js b/examples/index.js index <HASH>..<HASH> 100644 --- a/examples/index.js +++ b/examples/index.js @@ -44,4 +44,6 @@ async function init() { }); } -init().catch(logger.error); +if (require.main === module) { + init().catch(logger.error); +}
fix: run the examples as a module, or as a main entry point
yfinkelstein_node-zookeeper
train
js
5355df94fde268d4eabad9608666f67b11c7fb80
diff --git a/src/cli.js b/src/cli.js index <HASH>..<HASH> 100755 --- a/src/cli.js +++ b/src/cli.js @@ -22,7 +22,14 @@ const cli = createCli(` Examples $ kode lint $ kode test --watch -`); +`, { + boolean: [ + 'any-branch', + 'skip-cleanup', + 'skip-test', + 'watch', + ], +}); /**
fix: Force parsing arguments as boolean
SimonDegraeve_kode
train
js
02e0e088451d12133f34c0a2673990eb62512051
diff --git a/server/gulpfile.js b/server/gulpfile.js index <HASH>..<HASH> 100644 --- a/server/gulpfile.js +++ b/server/gulpfile.js @@ -89,7 +89,7 @@ gulp.task('output-build-info', function () { // Capture changes from the last commit try { - execSync('git diff --quiet HEAD'); + execSync('git diff --quiet HEAD -- server'); } catch (err) { dirtyInfo = "-dirty"; }
fix(server): build-info dirty flag is capturing changes from all projects
mcdcorp_opentest
train
js
af9a238f852fb04fbfcdfa57b9b313426f579bd1
diff --git a/scripts/serverless.js b/scripts/serverless.js index <HASH>..<HASH> 100755 --- a/scripts/serverless.js +++ b/scripts/serverless.js @@ -448,7 +448,6 @@ processSpanPromise = (async () => { } } } - if (isHelpRequest || commands[0] === 'plugin') { processLog.debug('resolve variables in "plugins"'); // We do not need full config resolved, we just need to know what @@ -475,6 +474,12 @@ processSpanPromise = (async () => { if (!variablesMeta.size) return; // All properties successuflly resolved if (!ensureResolvedProperty('plugins')) return; + + // At this point we have all properties needed for `plugin install/uninstall` commands + if (commands[0] === 'plugin') { + return; + } + if (!ensureResolvedProperty('package\0path')) return; if (!ensureResolvedProperty('frameworkVersion')) return;
fix: Ensure to attempt minimal config resolution for plugin commands
serverless_serverless
train
js
ae625872fe24a8f424862c04232f1b605f33545b
diff --git a/docs/conf.py b/docs/conf.py index <HASH>..<HASH> 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -134,8 +134,8 @@ html_theme_options = { 'github_banner': True, 'show_powered_by': False, 'extra_nav_links': { - 'invenio-openaire@GitHub': 'http://github.com/inveniosoftware/invenio-openaire', - 'invenio-openaire@PyPI': 'http://pypi.python.org/pypi/invenio-openaire/', + 'invenio-openaire@GitHub': 'https://github.com/inveniosoftware/invenio-openaire', + 'invenio-openaire@PyPI': 'https://pypi.python.org/pypi/invenio-openaire/', } } @@ -326,3 +326,6 @@ texinfo_documents = [ # Example configuration for intersphinx: refer to the Python standard library. intersphinx_mapping = {'https://docs.python.org/': None} + +# Autodoc configuraton. +autoclass_content = 'both'
docs: autodoc configuration and HTTPS fix * Replaces HTTP links with HTTPS where possible.
inveniosoftware_invenio-openaire
train
py
b6ffedb25c3040bc6a8345a5e2b006abc6f413c5
diff --git a/src/df.js b/src/df.js index <HASH>..<HASH> 100644 --- a/src/df.js +++ b/src/df.js @@ -1,3 +1,4 @@ +import * as LogManager from 'aurelia-logging'; import {I18N} from './i18n'; export class DfValueConverter { @@ -17,7 +18,8 @@ export class DfValueConverter { if (dfOrOptions && (typeof dfOrOptions.format === 'function')) { return dfOrOptions.format(value); } else if (df) { - console.warn('This ValueConverter signature is depcrecated and will be removed in future releases. Please use the signature [dfOrOptions, locale]'); // eslint-disable-line no-console + let i18nLogger = LogManager.getLogger('i18n'); + i18nLogger.warn('This ValueConverter signature is depcrecated and will be removed in future releases. Please use the signature [dfOrOptions, locale]'); } else { df = this.service.df(dfOrOptions, locale || this.service.getLocale()); }
fix(logger): use LogManager instead console uses the aurelia-logging service instead of direct usage of console.warn
aurelia_i18n
train
js
17499e430c9d594fafa6e2e53638c502aff2380b
diff --git a/resources/views/previewLinkPopup.blade.php b/resources/views/previewLinkPopup.blade.php index <HASH>..<HASH> 100644 --- a/resources/views/previewLinkPopup.blade.php +++ b/resources/views/previewLinkPopup.blade.php @@ -1,6 +1,7 @@ <div id="MailPreviewDriverBox" style=" position:absolute; - top:0; + top:10px; + right:10px; z-index:99999; background:#fff; border:solid 1px #ccc; @@ -15,9 +16,19 @@ <a style="text-decoration: underline" href="{{ $previewUrl }}&file_type=eml">Open mail in email client</a> </li> </ul> + <span onclick="closePopup()" id="close" style=" + cursor: pointer; + font-size: smaller; + position: absolute; + top: 2px; + right: 6px; + font-family: monospace;">X</span> </div> <script type="text/javascript"> - setTimeout(function () { + function closePopup() { document.body.removeChild(document.getElementById('MailPreviewDriverBox')); - }, $timeoutInSeconds * 1000); + } + @if($timeoutInSeconds) + setTimeout(closePopup(), {{ $timeoutInSeconds }} * 1000); + @endif </script>
fix: make setTimeoutInSeconds works In previous version, variable $timeoutInSeconds wasn't scaped by double braces, so blade puts it like a string. Now, it is fixed, and as a plus, added a X button to close manually
themsaid_laravel-mail-preview
train
php
8da1859758490f032871eabd2aef632de4362cce
diff --git a/tests/test.js b/tests/test.js index <HASH>..<HASH> 100644 --- a/tests/test.js +++ b/tests/test.js @@ -55,6 +55,12 @@ describe('lessWatchCompilerUtils Module API', function(){ lessWatchCompilerUtils.config.sourceMap = true; assert.equal("lessc --source-map test testFolder/test.css", lessWatchCompilerUtils.compileCSS("test", true)); }); + it('should run the correct command with minified flag', function(){ + lessWatchCompilerUtils.config.outputFolder = "testFolder"; + lessWatchCompilerUtils.config.minified = true; + lessWatchCompilerUtils.config.sourceMap = false; + assert.equal("lessc -x test testFolder/test.min.css", lessWatchCompilerUtils.compileCSS("test", true)); + }); }) describe('filterFiles()', function(){ it('filterFiles() function should be there', function(){
test: Add test for minified flag
jonycheung_deadsimple-less-watch-compiler
train
js
47778a96833e8f352d1450f35f192d5a98438a2f
diff --git a/index.js b/index.js index <HASH>..<HASH> 100644 --- a/index.js +++ b/index.js @@ -123,6 +123,12 @@ function writeAndRunCodeBlocks(codeBlocks) { } }); }); + }) + .then(function(codeBlocks) { + return removeOldDir(dir) + .then(function() {; + return codeBlocks + }); }); }
fix: remove old directory from running markdown This was forgotten in a previous change.
carlwoodward_run-markdown
train
js
78db18bb567bd761c3810a6d833b7e3feca04a35
diff --git a/spec/api_connect_client/product_spec.rb b/spec/api_connect_client/product_spec.rb index <HASH>..<HASH> 100644 --- a/spec/api_connect_client/product_spec.rb +++ b/spec/api_connect_client/product_spec.rb @@ -1,6 +1,6 @@ require 'spec_helper' -RSpec.describe Product do +RSpec.describe ApiConnectClient::Product do let(:product) { described_class.new } describe '#all', vcr: { cassette_name: 'products' } do diff --git a/spec/api_connect_client/user_spec.rb b/spec/api_connect_client/user_spec.rb index <HASH>..<HASH> 100644 --- a/spec/api_connect_client/user_spec.rb +++ b/spec/api_connect_client/user_spec.rb @@ -1,7 +1,7 @@ require 'spec_helper' -RSpec.describe User do - let(:user) { User.new(ENV['ADMIN_USERNAME'], ENV['ADMIN_PASSWORD']) } +RSpec.describe ApiConnectClient::User do + let(:user) { ApiConnectClient::User.new(ENV['ADMIN_USERNAME'], ENV['ADMIN_PASSWORD']) } describe '#create', vcr: { cassette_name: 'user-new' } do it "returns the info of the newly created user" do
fix(specs): Fix bug introduced in merge
cffiebigc_api-connect-client
train
rb,rb
3ba2ca9c06a6f4eaf2e0d62e19c06f5014d5b25b
diff --git a/src/locale/lang/ua.js b/src/locale/lang/ua.js index <HASH>..<HASH> 100644 --- a/src/locale/lang/ua.js +++ b/src/locale/lang/ua.js @@ -1,7 +1,7 @@ export default { el: { colorpicker: { - confirm: 'OK', + confirm: 'Обрати', clear: 'Очистити' }, datepicker: { @@ -107,14 +107,14 @@ export default { hasCheckedFormat: '{checked}/{total} вибрано' }, image: { - error: 'FAILED' // to be translated + error: 'ПОМИЛКА' }, pageHeader: { - title: 'Back' // to be translated + title: 'Назад' }, popconfirm: { - confirmButtonText: 'Yes', // to be translated - cancelButtonText: 'No' // to be translated + confirmButtonText: 'Так', + cancelButtonText: 'Ні' } } };
fix: Update ua locale (#<I>)
ElemeFE_element
train
js
9d92a958c4d817d786bdee6749a563151ee811e6
diff --git a/lib/config/cli.js b/lib/config/cli.js index <HASH>..<HASH> 100644 --- a/lib/config/cli.js +++ b/lib/config/cli.js @@ -22,7 +22,8 @@ function getConfig(argv) { const coersions = { boolean: val => val === 'true', - list: val => val.split(',').map(el => el.trim()), + list: val => + val === '[]' || val === '' ? [] : val.split(',').map(el => el.trim()), string: val => val, integer: parseInt, };
refactor: massage [] or empty string for cli lists
renovatebot_renovate
train
js
984536c12b25fc182362bbc9ba26c474e2fb5b10
diff --git a/lint-staged.config.js b/lint-staged.config.js index <HASH>..<HASH> 100644 --- a/lint-staged.config.js +++ b/lint-staged.config.js @@ -1,6 +1,6 @@ 'use strict'; module.exports = { - '*.js': ['prettier --write', 'eslint --fix', 'git add'], - '*.{json,md,yml,css}': ['prettier --write', 'git add'], + '*.js': ['prettier --write', 'eslint --fix'], + '*.{json,md,yml,css}': ['prettier --write'], };
chore: update lint-staged config (#<I>)
webpack_webpack-dev-server
train
js
6a4b8081e003183ad1b36006ea4949e0b0cb89d8
diff --git a/test/Utils/ProjectTest.php b/test/Utils/ProjectTest.php index <HASH>..<HASH> 100644 --- a/test/Utils/ProjectTest.php +++ b/test/Utils/ProjectTest.php @@ -52,10 +52,10 @@ class ProjectTest extends \PHPUnit_Framework_TestCase public function testDownloadArchive() { $project = new Project(sys_get_temp_dir() . '/project' . rand()); - $archiveUrl = 'https://github.com/GoogleCloudPlatform/google-cloud-php/archive/master.zip'; + $archiveUrl = 'https://github.com/GoogleCloudPlatform/google-cloud-php/archive/main.zip'; $project->downloadArchive('Google Cloud client libraries', $archiveUrl); $this->assertTrue(file_exists( - $project->getDir() . '/google-cloud-php-master/composer.json')); + $project->getDir() . '/google-cloud-php-main/composer.json')); } public function testCopyFiles()
chore: fix master main (#<I>)
GoogleCloudPlatform_php-tools
train
php
ffc1f2a2e495a303904e4119de080b046d885cd2
diff --git a/luigi/parameter.py b/luigi/parameter.py index <HASH>..<HASH> 100644 --- a/luigi/parameter.py +++ b/luigi/parameter.py @@ -94,9 +94,9 @@ class Parameter(object): * Any value provided on the command line: - - With qualified task name (eg. ``--TaskA-param xyz``) + - To the root task (eg. ``--param xyz``) - - Without (eg. ``--param xyz``) + - Then to the class, using the qualified task name syntax (eg. ``--TaskA-param xyz``). * With ``[TASK_NAME]>PARAM_NAME: <serialized value>`` syntax. See :ref:`ParamConfigIngestion`
docs: Correct order of parameter resolution There were some changes in #<I> and #<I> in which I forgot to update the docs.
spotify_luigi
train
py
48bd25dbdaa7d879ded2dc36fa5966b81ff89596
diff --git a/lib/platform/bitbucket-server/index.js b/lib/platform/bitbucket-server/index.js index <HASH>..<HASH> 100644 --- a/lib/platform/bitbucket-server/index.js +++ b/lib/platform/bitbucket-server/index.js @@ -257,11 +257,13 @@ async function deleteBranch(branchName, closePr = false) { if (closePr) { // getBranchPr const pr = await getBranchPr(branchName); - await api.post( - `/rest/api/1.0/projects/${config.projectKey}/repos/${ - config.repositorySlug - }/pull-requests/${pr.number}/decline?version=${pr.version + 1}` - ); + if (pr) { + await api.post( + `/rest/api/1.0/projects/${config.projectKey}/repos/${ + config.repositorySlug + }/pull-requests/${pr.number}/decline?version=${pr.version + 1}` + ); + } } return config.storage.deleteBranch(branchName); }
fix(bitbucket-server): pr check after deleting branch Closes #<I>
renovatebot_renovate
train
js
87fda568c5e8e8833ffff8034a6c66bc00ad3c7b
diff --git a/src/utils/elasticDSL.js b/src/utils/elasticDSL.js index <HASH>..<HASH> 100644 --- a/src/utils/elasticDSL.js +++ b/src/utils/elasticDSL.js @@ -43,12 +43,10 @@ let simplifyBucket = _.flow( _.mapValues(flattenMetrics), _.mapKeys(renameMetrics) ) - let simplifyBuckets = _.flow( F.when(_.isPlainObject, F.unkeyBy('key')), _.map(simplifyBucket) ) - // VERY hacky and inefficient tree simpification // inefficient due to copying the entire tree to flatten, again to unflatten, and running regex replaces on EVERY key // This will be superseeded by a transmuteTree version later :) @@ -79,10 +77,15 @@ let basicSimplifyTree = _.flow( ), // Rename __DOT__ to '.' tree => { - F.walk()(x => { + F.walk()((x, index) => { let dots = _.filter(_.includes('__DOT__'), _.keys(x)) _.each(dot => renameOn(dot, _.replace(/__DOT__/g, '.', dot), x), dots) + + if (index === 'rows' || index === 'columns') { + tree['results'][index] = simplifyBuckets(x) + } })(tree) + console.log(JSON.stringify(tree, null, 2)) return tree } )
fix: simplify buckets on rows and columns
smartprocure_contexture-elasticsearch
train
js
48b820fc06f6522c32b4ba82889f7156f4a4e3b2
diff --git a/css-components/gulpfile.js b/css-components/gulpfile.js index <HASH>..<HASH> 100644 --- a/css-components/gulpfile.js +++ b/css-components/gulpfile.js @@ -80,7 +80,7 @@ function cssnext() { root: __dirname + '/src/components/' }), cssnextPlugin({ - browsers: babelrc.presets[0][1].targets.browsers, + browsers: corePkg.browserslist, }), reporter({ clearAllMessages: true,
chore(css-components): Fix serve command by using browserslist
OnsenUI_OnsenUI
train
js
f0fc515eac953b83bcee24089c649f61cf7bc5f5
diff --git a/lib/anycable/rails/railtie.rb b/lib/anycable/rails/railtie.rb index <HASH>..<HASH> 100644 --- a/lib/anycable/rails/railtie.rb +++ b/lib/anycable/rails/railtie.rb @@ -70,7 +70,7 @@ module AnyCable # Since Rails 6.1 if respond_to?(:server) server do - next unless AnyCable.config.embedded? + next unless AnyCable.config.embedded? && AnyCable::Rails.enabled? require "anycable/cli" AnyCable::CLI.embed!
fix: only run embedded server if AnyCable is enabled
anycable_anycable-rails
train
rb
e5e4e17c4c33cca72c560e7f133a946dbc07d647
diff --git a/lib/eventhub/heartbeat.rb b/lib/eventhub/heartbeat.rb index <HASH>..<HASH> 100644 --- a/lib/eventhub/heartbeat.rb +++ b/lib/eventhub/heartbeat.rb @@ -36,7 +36,7 @@ module EventHub heartbeat_cycle_in_ms: processor.heartbeat_cycle_in_s * 1000, served_queues: [processor.listener_queues], host: Socket.gethostname, - ip_addresses: ip_addresses, + addresses: addresses, messages: { total: statistics.messages_total, successful: statistics.messages_successful, @@ -51,7 +51,7 @@ module EventHub private - def ip_addresses + def addresses interfaces = Socket.getifaddrs.select do |interface| !interface.addr.ipv4_loopback? && !interface.addr.ipv6_loopback? end
fix: "ip_adresses" has to be "addresses"
thomis_eventhub-processor
train
rb
1acd179d1355a4fa91a7d06d2d6547fb8a620f6a
diff --git a/actions/class.TestImport.php b/actions/class.TestImport.php index <HASH>..<HASH> 100755 --- a/actions/class.TestImport.php +++ b/actions/class.TestImport.php @@ -36,7 +36,7 @@ class taoTests_actions_TestImport extends tao_actions_Import * overwrite the parent index to add the requiresRight for Tests * * @requiresRight id WRITE - * @see tao_actions_Import::index() + * @requiresRight classUri WRITE */ public function index() { diff --git a/actions/class.Tests.php b/actions/class.Tests.php index <HASH>..<HASH> 100755 --- a/actions/class.Tests.php +++ b/actions/class.Tests.php @@ -215,15 +215,6 @@ class taoTests_actions_Tests extends tao_actions_SaSModule /** * overwrite the parent moveAllInstances to add the requiresRight only in Items - * @see tao_actions_TaoModule::moveResource() - * @requiresRight classUri WRITE - */ - public function moveResource() - { - return parent::moveResource(); - } - /** - * overwrite the parent moveAllInstances to add the requiresRight only in Items * @see tao_actions_TaoModule::moveAll() * @requiresRight ids WRITE */
fix: fix permissions to view buttons
oat-sa_extension-tao-test
train
php,php
988eda3155ee89bf94ea330c7b6a03ce3810164f
diff --git a/server/src/test/java/org/cloudfoundry/identity/uaa/web/CookieBasedCsrfTokenRepositoryTests.java b/server/src/test/java/org/cloudfoundry/identity/uaa/web/CookieBasedCsrfTokenRepositoryTests.java index <HASH>..<HASH> 100644 --- a/server/src/test/java/org/cloudfoundry/identity/uaa/web/CookieBasedCsrfTokenRepositoryTests.java +++ b/server/src/test/java/org/cloudfoundry/identity/uaa/web/CookieBasedCsrfTokenRepositoryTests.java @@ -138,6 +138,7 @@ public class CookieBasedCsrfTokenRepositoryTests { CookieBasedCsrfTokenRepository repo = new CookieBasedCsrfTokenRepository(); repo.setSecure(isSecure); MockHttpServletRequest request = new MockHttpServletRequest(); + request.setProtocol("http"); MockHttpServletResponse response = new MockHttpServletResponse(); CsrfToken token = repo.generateToken(request); repo.saveToken(token, request, response);
refactor: make protocol default explicit
cloudfoundry_uaa
train
java
ce73a28b2d60d8b349fd5478918238a04a91ec7e
diff --git a/testem.js b/testem.js index <HASH>..<HASH> 100644 --- a/testem.js +++ b/testem.js @@ -1,10 +1,13 @@ /* eslint-env node */ +const DotReporter = require('testem/lib/reporters/dot_reporter'); + module.exports = { framework: 'qunit', test_page: 'tests/index.html?hidepassed', timeout: 540, disable_watching: true, + reporter: new DotReporter(), launch_in_ci: [ 'Chrome', 'Firefox',
chore: switch to testem dot reporter
CenterForOpenScience_ember-osf
train
js
6218d3b6ac9d2549354778e9fa5c68783d469b45
diff --git a/packages/api-generator/src/helpers/variables.js b/packages/api-generator/src/helpers/variables.js index <HASH>..<HASH> 100644 --- a/packages/api-generator/src/helpers/variables.js +++ b/packages/api-generator/src/helpers/variables.js @@ -192,8 +192,8 @@ const VSelect = { props: { parent: 'VueComponent', item: 'object', - on: 'object', - attrs: 'object', + on: 'object // Only needed when providing your own v-list-item', + attrs: 'object // Only needed when providing your own v-list-item', }, source: 'v-select', },
docs(VSelect): update information on the item slot on and attrs are only needed if the user has a root v-list-item in the item slot resolves #<I>
vuetifyjs_vuetify
train
js
0fc011d476d608a728d17299bd636fab8eb7aefa
diff --git a/src/foremast/awslambda/cloudwatch_log_event/cloudwatch_log_event.py b/src/foremast/awslambda/cloudwatch_log_event/cloudwatch_log_event.py index <HASH>..<HASH> 100644 --- a/src/foremast/awslambda/cloudwatch_log_event/cloudwatch_log_event.py +++ b/src/foremast/awslambda/cloudwatch_log_event/cloudwatch_log_event.py @@ -50,7 +50,7 @@ def create_cloudwatch_log_event(app_name, env, region, rules): LOG.critical('Filter name is required and no filter_name is defined!') raise InvalidEventConfiguration('Filter name is required and no filter_name is defined!') - if not filter_pattern: + if filter_pattern is None: LOG.critical('Filter pattern is required and no filter_pattern is defined!') raise InvalidEventConfiguration('Filter pattern is required and no filter_pattern is defined!')
fix: changed logic to accept blank filter pattern
foremast_foremast
train
py
e769f33cd31eadf790aad0637aedb01092ff19b0
diff --git a/src/components/MultiSelect/FilterableMultiSelect.js b/src/components/MultiSelect/FilterableMultiSelect.js index <HASH>..<HASH> 100644 --- a/src/components/MultiSelect/FilterableMultiSelect.js +++ b/src/components/MultiSelect/FilterableMultiSelect.js @@ -86,6 +86,11 @@ export default class FilterableMultiSelect extends React.Component { * Initialize the component with an open(`true`)/closed(`false`) menu. */ open: PropTypes.bool, + + /** + * Callback function for translating ListBoxMenuIcon SVG title + */ + translateWithId: PropTypes.func, }; static getDerivedStateFromProps({ open }, state) { @@ -221,6 +226,7 @@ export default class FilterableMultiSelect extends React.Component { light, invalid, invalidText, + translateWithId, } = this.props; const className = cx( `${prefix}--multi-select`, @@ -281,7 +287,10 @@ export default class FilterableMultiSelect extends React.Component { {inputValue && isOpen && ( <ListBox.Selection clearSelection={this.clearInputValue} /> )} - <ListBox.MenuIcon isOpen={isOpen} /> + <ListBox.MenuIcon + isOpen={isOpen} + translateWithId={translateWithId} + /> </ListBox.Field> {isOpen && ( <ListBox.Menu>
fix(multi-select): introduce translateWithId (#<I>) Fixes #<I>.
carbon-design-system_carbon-components-react
train
js
28cd22952632ba0e0bc4d37abfd68046348536bd
diff --git a/core/src/main/java/com/orientechnologies/orient/core/config/OGlobalConfiguration.java b/core/src/main/java/com/orientechnologies/orient/core/config/OGlobalConfiguration.java index <HASH>..<HASH> 100755 --- a/core/src/main/java/com/orientechnologies/orient/core/config/OGlobalConfiguration.java +++ b/core/src/main/java/com/orientechnologies/orient/core/config/OGlobalConfiguration.java @@ -148,7 +148,7 @@ public enum OGlobalConfiguration { // ENVIRONMENT "memory.directMemory.preallocate", "Preallocate amount of direct memory which is needed for the disk cache", Boolean.class, - true), + false), DIRECT_MEMORY_TRACK_MODE( "memory.directMemory.trackMode",
chore: disabled memory pre-allocation
orientechnologies_orientdb
train
java
8302384ecd8334cca506b9bfec0da4210657ecf9
diff --git a/lib/collection.js b/lib/collection.js index <HASH>..<HASH> 100644 --- a/lib/collection.js +++ b/lib/collection.js @@ -2039,7 +2039,7 @@ Collection.prototype.mapReduce = function(map, reduce, options, callback) { }; /** - * Initiate a Out of order batch write operation. All operations will be buffered into insert/update/remove commands executed out of order. + * Initiate an Out of order batch write operation. All operations will be buffered into insert/update/remove commands executed out of order. * * @method * @param {object} [options] Optional settings. @@ -2056,7 +2056,7 @@ Collection.prototype.initializeUnorderedBulkOp = function(options) { }; /** - * Initiate an In order bulk write operation, operations will be serially executed in the order they are added, creating a new operation for each switch in types. + * Initiate an In order bulk write operation. Operations will be serially executed in the order they are added, creating a new operation for each switch in types. * * @method * @param {object} [options] Optional settings.
docs(collection): fix typo & run-on sentence for initializeOrderedBulkOp
mongodb_node-mongodb-native
train
js
e08d478e712dc929893f8fe9537d2a64bed670b6
diff --git a/tests/express-test-harness.js b/tests/express-test-harness.js index <HASH>..<HASH> 100644 --- a/tests/express-test-harness.js +++ b/tests/express-test-harness.js @@ -45,6 +45,33 @@ describe('express-http-context', function () { }); }); + it('returns undefined when key is not found', function (done) { + // ARRANGE + const app = express(); + + app.use(httpContext.middleware); + + app.get('/test', (req, res) => { + httpContext.set('existing-key', 'some value'); + + setTimeout(() => { + const valueFromContext = httpContext.get('missing-key'); + res.status(200).json({ + typeOfValueFromContext: typeof (valueFromContext) + }); + }, 5); + }); + + const sut = supertest(app); + + // ACT + sut.get('/test').end((err, res) => { + // ASSERT + assert.equal(res.body.typeOfValueFromContext, 'undefined'); + done(); + }); + }); + it('does not store or return context outside of request', function () { // ARRANGE const key = 'key';
test: assert that missing keys return undefined
skonves_express-http-context
train
js
6516182d6d668c9861f5614723745e2c6c17a3c6
diff --git a/packages/webiny-ui/src/List/DataList/DataList.js b/packages/webiny-ui/src/List/DataList/DataList.js index <HASH>..<HASH> 100644 --- a/packages/webiny-ui/src/List/DataList/DataList.js +++ b/packages/webiny-ui/src/List/DataList/DataList.js @@ -246,7 +246,7 @@ const Pagination = (props: Props) => { return ( <React.Fragment> - {meta.totalCount && + {typeof meta.totalCount !== "undefined" && meta.totalCount > 0 && meta.from && meta.to && (
fix: Fix incorrect pagination info in DataList component (#<I>) A "0" would be outputted in the pagination section if there were no records to show.
Webiny_webiny-js
train
js
d70b13f050e9de4c659e45ec672864e3f6645473
diff --git a/src/geshi/tcl.php b/src/geshi/tcl.php index <HASH>..<HASH> 100644 --- a/src/geshi/tcl.php +++ b/src/geshi/tcl.php @@ -187,9 +187,6 @@ $language_data = array ( 'PARSER_CONTROL' => array( 'COMMENTS' => array( 'DISALLOWED_BEFORE' => '\\' - ), - 'ENABLE_FLAGS' => array( -// 'KEYWORDS' => GESHI_NEVER, ) ) );
fix: Removed superfluous ENABLE_FLAGS entry from tcl.php
GeSHi_geshi-1.0
train
php
a15b1f085ed33bfa467fddc86d70ee353832b870
diff --git a/packages/rum/src/apm-base.js b/packages/rum/src/apm-base.js index <HASH>..<HASH> 100644 --- a/packages/rum/src/apm-base.js +++ b/packages/rum/src/apm-base.js @@ -23,8 +23,11 @@ * */ -import { getInstrumentationFlags } from '@elastic/apm-rum-core' -import { PAGE_LOAD, ERROR } from '@elastic/apm-rum-core' +import { + getInstrumentationFlags, + PAGE_LOAD, + ERROR +} from '@elastic/apm-rum-core' class ApmBase { constructor(serviceFactory, disable) {
chore(rum): merge duplicate import statementments in apm base (#<I>)
elastic_apm-agent-rum-js
train
js
22c84a3879da4cb3b54a9ef65d257ad2938cc142
diff --git a/test/unit/index.js b/test/unit/index.js index <HASH>..<HASH> 100644 --- a/test/unit/index.js +++ b/test/unit/index.js @@ -14,6 +14,12 @@ describe('StorageService', function() { expect(record).to.be.an.instanceof(RecordService); expect(record.getType()).to.equal('Cat'); }); + it('should create records with ids', function() { + var storage = new StorageService(mockStorageProvider); + var record = storage.createRecord('Cat', '1'); + expect(record).to.be.an.instanceof(RecordService); + expect(record.getType()).to.equal('Cat'); + }); it('should create collections', function() { var storage = new StorageService(mockStorageProvider); var collection = storage.createCollection('Cat');
test(StorageService): case new record with id
castle-dev_le-storage-service
train
js
aed9b9ebcc156d2ebf0eb4e91baea6fb1af5d916
diff --git a/lib/commands/external.js b/lib/commands/external.js index <HASH>..<HASH> 100644 --- a/lib/commands/external.js +++ b/lib/commands/external.js @@ -39,7 +39,7 @@ class ExternalCommand { const commandToBeRun = `${packageManager} ${options.join(' ')}`; process.cliLogger.error(`The command moved into a separate package: ${chalk.keyword('orange')(name)}\n`); const question = `Would you like to install ${name}? (That will run ${chalk.green(commandToBeRun)})`; - const answer = await prompt([ + const { installConfirm } = await prompt([ { type: 'confirm', name: 'installConfirm', @@ -48,7 +48,7 @@ class ExternalCommand { choices: ['Yes', 'No', 'Y', 'N', 'y', 'n'], }, ]); - if (answer.installConfirm === true) { + if (installConfirm === true) { await ExternalCommand.runCommand(commandToBeRun); return ExternalCommand.validateEnv(name); }
chore: Minor code refactor adhering to ES6 semantics (#<I>) * chore: use object destructuring * chore: remove unwanted explicit boolean check * chore: use object destructuring assignment * chore: minor refactor * chore: revert * chore: revert * chore: minor tweak * chore: revert
webpack_webpack-cli
train
js
3869a4d2d98148b2d4de6164fb0e1eabe8cf3874
diff --git a/core/lib/engine_util.js b/core/lib/engine_util.js index <HASH>..<HASH> 100644 --- a/core/lib/engine_util.js +++ b/core/lib/engine_util.js @@ -213,6 +213,21 @@ function renderVariables (str, vars) { let rxmatch; let result = str.substring(0, str.length); + + // Special case for handling integer/boolean/object substitution: + // + // Does the template string contain one variable and nothing else? + // e.g.: "{{ myvar }" or "{{ myvar }", but NOT " {{ myvar }" + // If so, we treat it as a special case. + const matches = str.match(RX); + if (matches && matches.length === 1) { + if (matches[0] === str) { + // there's nothing else in the template but the variable + const varName = str.replace(/{/g, '').replace(/}/g, '').trim(); + return vars[varName] || ''; + } + } + while (result.search(RX) > -1) { let templateStr = result.match(RX)[0]; const varName = templateStr.replace(/{/g, '').replace(/}/g, '').trim();
fix: Using a template with exactly one variable keeps its type
artilleryio_artillery
train
js
2370d39e8905529de585758c8ccdfe11943d7dd4
diff --git a/plugins/outputs/graylog/graylog.go b/plugins/outputs/graylog/graylog.go index <HASH>..<HASH> 100644 --- a/plugins/outputs/graylog/graylog.go +++ b/plugins/outputs/graylog/graylog.go @@ -214,7 +214,7 @@ func (g *Graylog) serialize(metric telegraf.Metric) ([]string, error) { m := make(map[string]interface{}) m["version"] = "1.1" - m["timestamp"] = metric.Time().UnixNano() / 1000000000 + m["timestamp"] = float64(metric.Time().UnixNano()) / 1_000_000_000 m["short_message"] = "telegraf" m["name"] = metric.Name()
fix: output timestamp with fractional seconds (#<I>)
influxdata_telegraf
train
go
9b41a6a8a62331250f0787843c646fcb7f4aeb04
diff --git a/src/stores/GuildMemberRoleStore.js b/src/stores/GuildMemberRoleStore.js index <HASH>..<HASH> 100644 --- a/src/stores/GuildMemberRoleStore.js +++ b/src/stores/GuildMemberRoleStore.js @@ -106,7 +106,7 @@ class GuildMemberRoleStore extends DataStore { * @readonly */ get highest() { - return this.reduce((prev, role) => !prev || role.comparePositionTo(prev) > 0 ? role : prev); + return this.reduce((prev, role) => role.comparePositionTo(prev) > 0 ? role : prev, this.first()); } /** diff --git a/src/stores/RoleStore.js b/src/stores/RoleStore.js index <HASH>..<HASH> 100644 --- a/src/stores/RoleStore.js +++ b/src/stores/RoleStore.js @@ -56,6 +56,15 @@ class RoleStore extends DataStore { } /** + * The role with the highest position in the store + * @type {Role} + * @readonly + */ + get highest() { + return this.reduce((prev, role) => role.comparePositionTo(prev) > 0 ? role : prev, this.first()); + } + + /** * Data that can be resolved to a Role object. This can be: * * A Role * * A Snowflake
fix: re-add highest property to RoleStore and GuildMemberRoleStore closes #<I>
discordjs_discord.js
train
js,js
8ff27c0c89e9377b848af7c291afd12d66f9a024
diff --git a/packages/node_modules/@webex/internal-plugin-devices/test/integration/spec/devices.js b/packages/node_modules/@webex/internal-plugin-devices/test/integration/spec/devices.js index <HASH>..<HASH> 100644 --- a/packages/node_modules/@webex/internal-plugin-devices/test/integration/spec/devices.js +++ b/packages/node_modules/@webex/internal-plugin-devices/test/integration/spec/devices.js @@ -421,9 +421,9 @@ describe('plugin-devices', () => { }); describe('when the priority host cannot be mapped', () => { - beforeEach('remove postauth services', () => { - /* eslint-disable-next-line no-underscore-dangle */ - services._getCatalog().serviceGroups.postauth = []; + beforeEach('stub priority host url converting', () => { + services.convertUrlToPriorityHostUrl = sinon.stub(); + services.convertUrlToPriorityHostUrl.returns(undefined); }); it('should return a rejected promise',
test(internal-plugin-devices): improve websocket retrieval Update the test suite to validate that the web socket retrieval method updates work as expected.
webex_spark-js-sdk
train
js
fbf905a674299c6b4f850b51d0637e1665f77d56
diff --git a/config/local.js b/config/local.js index <HASH>..<HASH> 100644 --- a/config/local.js +++ b/config/local.js @@ -3,7 +3,7 @@ module.exports = { /** * Core-Node config */ - endpointPath: __dirname + '/../endpoints/', + endpointPath: `${process.cwd()}/api`, endpointParent: __dirname + '/../lib/endpoint.js', /**
feat: enable 0 config setup - use /api in cwd as standard folder for endpoints
cubic-js_cubic
train
js
2a3b37ea41a95352826ed9956561f916a049a2c1
diff --git a/src/Crypto.php b/src/Crypto.php index <HASH>..<HASH> 100644 --- a/src/Crypto.php +++ b/src/Crypto.php @@ -60,7 +60,7 @@ class Crypto // TODO: requester public key - if ($transaction->recipientId) { + if (isset($transaction->recipientId)) { $out .= \BitWasp\Bitcoin\Base58::decodeCheck($transaction->recipientId)->getBinary(); } else { $out .= pack('x21');
fix: check if recipient is set
ArkEcosystem_php-crypto
train
php
52bf1339460220b80d6afdd21eb710ef7d8eaf18
diff --git a/core/corehttp/gateway_handler.go b/core/corehttp/gateway_handler.go index <HASH>..<HASH> 100644 --- a/core/corehttp/gateway_handler.go +++ b/core/corehttp/gateway_handler.go @@ -662,6 +662,7 @@ func (i *gatewayHandler) deleteHandler(w http.ResponseWriter, r *http.Request) { nnode, err := root.GetDirectory().GetNode() if err != nil { webError(w, "WritableGateway: failed to finalize", err, http.StatusInternalServerError) + return } ncid := nnode.Cid()
fix(gw): missing return if dir fails to finalize (#<I>)
ipfs_go-ipfs
train
go
0fe8f693e602cc35086217d25cf653e4fe4c4ef8
diff --git a/topologies/replset.js b/topologies/replset.js index <HASH>..<HASH> 100644 --- a/topologies/replset.js +++ b/topologies/replset.js @@ -1196,7 +1196,11 @@ function executeWriteOperation(args, options, callback) { } const willRetryWrite = - !args.retrying && options.retryWrites && options.session && isRetryableWritesSupported(self); + !args.retrying && + options.retryWrites && + options.session && + isRetryableWritesSupported(self) && + !options.session.inTransaction(); if (!self.s.replicaSetState.hasPrimary()) { if (self.s.disconnectHandler) {
refactor(replset): don't retry writes if in a transaction
mongodb_node-mongodb-native
train
js
b4935f594eaccd85fe698604ab6c8ac92dd88d4f
diff --git a/docs/conf.py b/docs/conf.py index <HASH>..<HASH> 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -161,7 +161,7 @@ html_theme = 'alabaster' # Add any paths that contain custom static files (such as style sheets) here, # relative to this directory. They are copied after the builtin static files, # so a file named "default.css" will overwrite the builtin "default.css". -html_static_path = ['_static'] +html_static_path = [] # Add any extra paths that contain custom files (such as robots.txt or # .htaccess) here, relative to this directory. These files are copied
docs: Get rid of warning about missing _static/ dir
phodge_homely
train
py