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
619965bd7c7c6526903ad36a7f09d7ac14e98e55
diff --git a/packages/@vue/cli-plugin-pwa/ui.js b/packages/@vue/cli-plugin-pwa/ui.js index <HASH>..<HASH> 100644 --- a/packages/@vue/cli-plugin-pwa/ui.js +++ b/packages/@vue/cli-plugin-pwa/ui.js @@ -29,7 +29,7 @@ module.exports = api => { type: 'list', message: 'org.vue.pwa.config.pwa.workboxPluginMode.message', description: 'org.vue.pwa.config.pwa.workboxPluginMode.description', - link: 'https://developers.google.com/web/tools/workbox/modules/workbox-webpack-plugin#which_plugin_to_use', + link: 'https://developer.chrome.com/docs/workbox/modules/workbox-webpack-plugin/#which-plugin-to-use', default: 'GenerateSW', value: data.vue && data.vue.pwa && data.vue.pwa.workboxPluginMode, choices: [
docs: fix <I> links
vuejs_vue-cli
train
js
5546728695cd0ee0ad23acca653f73ccd6c680d8
diff --git a/tests/Google/Task/ComposerTest.php b/tests/Google/Task/ComposerTest.php index <HASH>..<HASH> 100644 --- a/tests/Google/Task/ComposerTest.php +++ b/tests/Google/Task/ComposerTest.php @@ -149,7 +149,7 @@ class Google_Task_ComposerTest extends BaseTest { $composerJson = json_encode([ 'require' => [ - 'google/apiclient' => 'dev-add-composer-cleanup' + 'google/apiclient' => 'dev-master' ], 'scripts' => [ 'post-update-cmd' => 'Google_Task_Composer::cleanup' @@ -178,7 +178,7 @@ class Google_Task_ComposerTest extends BaseTest $composerJson = json_encode([ 'require' => [ - 'google/apiclient' => 'dev-add-composer-cleanup' + 'google/apiclient' => 'dev-master' ], 'scripts' => [ 'post-update-cmd' => 'Google_Task_Composer::cleanup'
test: composer cleanup task branch (#<I>)
googleapis_google-api-php-client
train
php
f516751281c218c4899d718b84d9c591b7326564
diff --git a/test/index.js b/test/index.js index <HASH>..<HASH> 100644 --- a/test/index.js +++ b/test/index.js @@ -21,20 +21,20 @@ test('middleware configuration need a store', t => { t.end() }) -test('middleware need a store with a valid API', t => { +test.skip('middleware need a store with a valid API', t => { const handler = superapiCache({ store: {} }) - const next = () => { - return Promise.resolve() - } + return new Promise((resolve, reject) => { + t.throws(() => { + handler({}, function () {}, {}) - t.throws(() => { - handler({}, next, {}) - }, /store.getItem/, 'should throw if invalid store provided') - - t.end() + resolve() + }, /Error/, 'should throw if invalid store provided') + }).catch(err => { + console.log(err); + }) }) test('cache read function', t => {
test(store): deactivate failing test Too bad but minor impact.
RasCarlito_axios-cache-adapter
train
js
25bf64bd1fbd9b03ff609d8b8614ce40b7a4f4be
diff --git a/packages/yup/tests/date.test.js b/packages/yup/tests/date.test.js index <HASH>..<HASH> 100644 --- a/packages/yup/tests/date.test.js +++ b/packages/yup/tests/date.test.js @@ -4,7 +4,10 @@ const INVALID = 'Date is invalid.'; const defaults = {}; -const validate = async (date, { format, min, max, message } = defaults) => { +const validate = async ( + date, + { format, min, max, message, inclusivity } = defaults +) => { let schema = avDate({ format, }); @@ -18,7 +21,9 @@ const validate = async (date, { format, min, max, message } = defaults) => { } if (min && max) { - schema = schema.between(min, max, message); + schema = inclusivity + ? schema.between(min, max, message, inclusivity) + : schema.between(min, max, message); } return schema.validate(date); @@ -145,5 +150,14 @@ describe('Date', () => { format: 'YYYY/MM/DD', }) ).rejects.toThrow(); + + await expect( + validate('2012/12/12', { + max: '2012/12/12', + min: '2012/12/10', + format: 'YYYY/MM/DD', + inclusivity: '(]', + }) + ).resolves.toBeTruthy(); }); });
feat(yup): unit test for inclusivity
Availity_sdk-js
train
js
c2f904b1cf646aa38c59c96986cf28f540f982f5
diff --git a/biz/index.js b/biz/index.js index <HASH>..<HASH> 100644 --- a/biz/index.js +++ b/biz/index.js @@ -76,6 +76,7 @@ module.exports = function(req, res, next) { } var colon = proxyUrl.indexOf(':'); var proxyPort = colon === -1 ? 80 : proxyUrl.substring(colon + 1); + req.headers.host = 'local.whistlejs.com'; util.transformReq(req, res, proxyPort > 0 ? proxyPort : 80, ip); }); } else if (isWebUI) {
refactor: webui path
avwo_whistle
train
js
63fffab715f66b15e91f5b7b0665e6b68b030c34
diff --git a/packages/react/mixins/mixin.core.js b/packages/react/mixins/mixin.core.js index <HASH>..<HASH> 100644 --- a/packages/react/mixins/mixin.core.js +++ b/packages/react/mixins/mixin.core.js @@ -8,12 +8,6 @@ module.exports = class ReactMixin extends Mixin { fileLoaderConfig.exclude.push(/\.jsx$/); jsLoaderConfig.test.push(/\.jsx$/); - jsLoaderConfig.exclude.push( - /node_modules\/react-helmet/, - /node_modules\/react-dom/, - /node_modules\/react/ - ); - jsLoaderConfig.options.presets.push(require.resolve('@babel/preset-react')); if (target !== 'develop' && process.env.NODE_ENV === 'production') {
fix: do not exclude packages from transpilation they include code that needs polyfills that we would miss if we ignore them
untool_untool
train
js
90074750e9c5c8d3684eecaa3b1ad7ec8345bfcc
diff --git a/lib/core/Canvas.js b/lib/core/Canvas.js index <HASH>..<HASH> 100644 --- a/lib/core/Canvas.js +++ b/lib/core/Canvas.js @@ -954,14 +954,7 @@ Canvas.prototype.getAbsoluteBBox = function(element) { if (element.waypoints) { var gfx = this.getGraphics(element); - var transformBBox = gfx.getBBox(true); bbox = gfx.getBBox(); - - bbox.x -= transformBBox.x; - bbox.y -= transformBBox.y; - - bbox.width += 2 * transformBBox.x; - bbox.height += 2 * transformBBox.y; } // shapes // use data
fix(canvas): remove parameter from getBBox which doesn't take parameters * was previously used for Snap.svg
bpmn-io_diagram-js
train
js
6982ae627b8ceb0f1fb3ac59ff5351b27912769f
diff --git a/packages/core/src/plugins/input/csl.js b/packages/core/src/plugins/input/csl.js index <HASH>..<HASH> 100644 --- a/packages/core/src/plugins/input/csl.js +++ b/packages/core/src/plugins/input/csl.js @@ -273,12 +273,17 @@ const correctDate = function (date, bestGuessConversions) { * @access private * @memberof module:@citation-js/core.plugins.input.util * - * @param {String} type - type + * @param {String|*} type - type * @param {Boolean} bestGuessConversions - make some best guess conversions on type mismatch * * @return {String|undefined} returns the (corrected) value if possible, otherwise undefined */ const correctType = function (type, bestGuessConversions) { + // Also anything that can be converted to a string. Taking `language` as a field + // with similar string constraints, as fields like `title` might take HTML into + // account in the future. + type = correctField('language', type, bestGuessConversions) + if (entryTypes[type] === true) { return type } else if (bestGuessConversions && type in entryTypes) {
fix(core): clean `type` as regular string Still allow regular string-fixing operations on type fields, on top of content-specific corrections. See <I>b<I>b5d<I>cfab<I>dac<I>bb<I>c0c<I>e<I>
citation-js_citation-js
train
js
2e72fc6725d47d86f105886cd6452e7e7e5640f8
diff --git a/test/unit/lifecycle.spec.js b/test/unit/lifecycle.spec.js index <HASH>..<HASH> 100644 --- a/test/unit/lifecycle.spec.js +++ b/test/unit/lifecycle.spec.js @@ -181,7 +181,7 @@ describe('Unit: lifecycle.js', function () { it('should should populate child process', function () { const sevenFake = new Readable({ read () {} }) - sevenFake._bin = 'cd' + sevenFake._bin = 'npm' sevenFake._args = [] const r = Seven.run(sevenFake) expect(isChildProcess(r._childProcess)).to.eql(true)
ci: Use npm command as mock because it's cross platform
quentinrossetti_node-7z
train
js
63d921b8d037d4aea8d702fe83eea2eaedf6077b
diff --git a/invenio_app/celery.py b/invenio_app/celery.py index <HASH>..<HASH> 100644 --- a/invenio_app/celery.py +++ b/invenio_app/celery.py @@ -15,7 +15,8 @@ from flask_celeryext import create_celery_app from .factory import create_ui celery = create_celery_app(create_ui( - SENTRY_TRANSPORT='raven.transport.http.HTTPTransport' + SENTRY_TRANSPORT='raven.transport.http.HTTPTransport', + RATELIMIT_ENABLED=False, )) """Celery application for Invenio.
fix: disable ratelimit for celery When ratelimit is enabled celery tasks that simulate request context i.e oaiserver will fail.
inveniosoftware_invenio-app
train
py
68ab344bfce754b08a31798c05da83ffcc13a4da
diff --git a/client/deis.py b/client/deis.py index <HASH>..<HASH> 100755 --- a/client/deis.py +++ b/client/deis.py @@ -492,8 +492,10 @@ class DeisClient(object): name for the application. """ app = args.get('--app') + delete_remote = False if not app: app = self._session.app + delete_remote = True confirm = args.get('--confirm') if confirm == app: pass @@ -520,8 +522,9 @@ class DeisClient(object): requests.codes.not_found): self._logger.info('done in {}s'.format(int(time.time() - before))) try: - # If the requested app is a heroku app, delete the git remote - if self._session.is_git_app(): + # If the requested app is a heroku app and the app + # was inferred from session, delete the git remote + if self._session.is_git_app() and delete_remote: subprocess.check_call( ['git', 'remote', 'rm', 'deis'], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
fix(client): avoid git remote deletion for apps specified by -a
deis_deis
train
py
f6e1cfa180fdf2b54a77451cfb665fecc1ee2c7d
diff --git a/index.js b/index.js index <HASH>..<HASH> 100644 --- a/index.js +++ b/index.js @@ -36,6 +36,13 @@ function apply(options, compiler) { } else { done(); } + }).catch(function(e) { + if (options.failOnError && errors.length) { + done(new Error('Failed because of a stylelint error.\n')); + } else { + done(); + } + console.log(chalk.red(e)); }); compilation.plugin && compilation.plugin('compilation', function(compilation) { diff --git a/lib/linter.js b/lib/linter.js index <HASH>..<HASH> 100644 --- a/lib/linter.js +++ b/lib/linter.js @@ -6,7 +6,6 @@ function lint(options) { stylelint.lint(options).then(function(data) { resolve(data); }).catch(function(e) { - console.log(e); reject(e); }); });
fix: don’t break webpack compilation on syntax errors
webpack-contrib_stylelint-webpack-plugin
train
js,js
4665e601cdbcf76682d1edd64ee314ed5b64e8fb
diff --git a/packages/cli-plugin-scaffold-react-package/index.js b/packages/cli-plugin-scaffold-react-package/index.js index <HASH>..<HASH> 100644 --- a/packages/cli-plugin-scaffold-react-package/index.js +++ b/packages/cli-plugin-scaffold-react-package/index.js @@ -70,10 +70,6 @@ module.exports = [ ) .replace(/\\/g, "/"); - console.log(baseTsConfigPath); - console.log(baseTsConfigBuildPath); - console.log(baseTsConfigBuildPath); - // Copy template files await ncp(sourceFolder, location);
chore(scaffolding): remove console logs
Webiny_webiny-js
train
js
9f61b7656a00440d4f1ab493ba7f453f6a3db718
diff --git a/spec/thinking_sphinx/active_record/index_spec.rb b/spec/thinking_sphinx/active_record/index_spec.rb index <HASH>..<HASH> 100644 --- a/spec/thinking_sphinx/active_record/index_spec.rb +++ b/spec/thinking_sphinx/active_record/index_spec.rb @@ -5,7 +5,9 @@ require 'spec_helper' describe ThinkingSphinx::ActiveRecord::Index do let(:index) { ThinkingSphinx::ActiveRecord::Index.new :user } let(:config) { double('config', :settings => {}, - :indices_location => 'location', :next_offset => 8) } + :indices_location => 'location', :next_offset => 8, + :index_set_class => index_set_class) } + let(:index_set_class) { double :reference_name => :user } before :each do allow(ThinkingSphinx::Configuration).to receive_messages :instance => config
test: Allow for index_set_class call. I don't know why this was an issue on my machine, but not in CI.
pat_thinking-sphinx
train
rb
f54f506b34e2b3fd4b5350dd47f61b6459771e46
diff --git a/src/sagemaker/amazon/amazon_estimator.py b/src/sagemaker/amazon/amazon_estimator.py index <HASH>..<HASH> 100644 --- a/src/sagemaker/amazon/amazon_estimator.py +++ b/src/sagemaker/amazon/amazon_estimator.py @@ -538,7 +538,7 @@ def get_image_uri(region_name, repo_name, repo_version=1): "There is a more up to date SageMaker XGBoost image." "To use the newer image, please set 'repo_version'=" "'0.90-1. For example:\n" - "\tget_image_uri(region, 'xgboost', %s).", + "\tget_image_uri(region, 'xgboost', '%s').", XGBOOST_LATEST_VERSION, ) repo = "{}:{}".format(repo_name, repo_version)
fix: Fix get_image_uri warning log for default xgboost version. (#<I>)
aws_sagemaker-python-sdk
train
py
c6c4d56d6d54da66201e9e0e6a61aa2b13f36e37
diff --git a/library/src/main/java/com/liulishuo/filedownloader/connection/FileDownloadUrlConnection.java b/library/src/main/java/com/liulishuo/filedownloader/connection/FileDownloadUrlConnection.java index <HASH>..<HASH> 100644 --- a/library/src/main/java/com/liulishuo/filedownloader/connection/FileDownloadUrlConnection.java +++ b/library/src/main/java/com/liulishuo/filedownloader/connection/FileDownloadUrlConnection.java @@ -107,7 +107,10 @@ public class FileDownloadUrlConnection implements FileDownloadConnection { @Override public void ending() { - // for reuse,so do nothing. + try { + mConnection.getInputStream().close(); + } catch (IOException ignored) { + } }
fix: close intput stream when connection ending avoid input-stream leak especially for the trial connection
lingochamp_FileDownloader
train
java
bdd2b0aa0b55a6d4085017f25e649a9cf3c57915
diff --git a/webapps/ui/cockpit/tests/specs/tasks-spec.js b/webapps/ui/cockpit/tests/specs/tasks-spec.js index <HASH>..<HASH> 100644 --- a/webapps/ui/cockpit/tests/specs/tasks-spec.js +++ b/webapps/ui/cockpit/tests/specs/tasks-spec.js @@ -16,7 +16,7 @@ describe('Cockpit Tasks Dashboard Spec', function() { // when tasksPage.navigateToWebapp('Cockpit'); tasksPage.authentication.userLogin('admin', 'admin'); - tasksPage.goToSection('tasks'); + tasksPage.goToSection('Human Tasks'); }); });
test(tasks): correct the goToSection usage Related to CAM-<I>
camunda_camunda-bpm-platform
train
js
ae2f013653c8a9f9ffb12ae8fcdb1bb604b39236
diff --git a/packages/discord.js/src/util/Sweepers.js b/packages/discord.js/src/util/Sweepers.js index <HASH>..<HASH> 100644 --- a/packages/discord.js/src/util/Sweepers.js +++ b/packages/discord.js/src/util/Sweepers.js @@ -375,11 +375,11 @@ class Sweepers { * Sweep a direct sub property of all guilds * @param {string} key The name of the property * @param {Function} filter Filter function passed to sweep - * @param {SweepEventOptions} [eventOptions] Options for the Client event emitted here + * @param {SweepEventOptions} [eventOptions={}] Options for the Client event emitted here * @returns {Object} Object containing the number of guilds swept and the number of items swept * @private */ - _sweepGuildDirectProp(key, filter, { emit = true, outputName }) { + _sweepGuildDirectProp(key, filter, { emit = true, outputName } = {}) { if (typeof filter !== 'function') { throw new TypeError('INVALID_TYPE', 'filter', 'function'); }
fix(sweepers): provide default for object param (#<I>)
discordjs_discord.js
train
js
d04a2dc2169170a32263b1ad798f2b8d93b622d1
diff --git a/sass/themes/cr/2019/components/membership-signup/js/membership-signup.js b/sass/themes/cr/2019/components/membership-signup/js/membership-signup.js index <HASH>..<HASH> 100644 --- a/sass/themes/cr/2019/components/membership-signup/js/membership-signup.js +++ b/sass/themes/cr/2019/components/membership-signup/js/membership-signup.js @@ -269,7 +269,6 @@ if (url_string.indexOf('?') > -1 ) { url_string = url_string.substring(0, url_string.indexOf('?')); } - /* Redirect user to donation */ redirect(donationLink + "?clientOverride=" + clientId + "&amount=" + amount + "&currency=" + currency + "&givingType=" + givingType + "&cartId=" + cartId + "&affiliate=" + affiliateValue + "&siteurl=" + url_string + '&rowID=' + rowID); }
fix: add params rowID to redirect link
comicrelief_pattern-lab
train
js
d31e1da2689e0ff11e9a7e1dcb28ffd5c0d8ecd1
diff --git a/engine/src/main/java/org/camunda/bpm/engine/impl/persistence/deploy/cache/CaseDefinitionCache.java b/engine/src/main/java/org/camunda/bpm/engine/impl/persistence/deploy/cache/CaseDefinitionCache.java index <HASH>..<HASH> 100644 --- a/engine/src/main/java/org/camunda/bpm/engine/impl/persistence/deploy/cache/CaseDefinitionCache.java +++ b/engine/src/main/java/org/camunda/bpm/engine/impl/persistence/deploy/cache/CaseDefinitionCache.java @@ -71,9 +71,7 @@ public class CaseDefinitionCache extends ResourceDefinitionCache<CaseDefinitionE @Override protected void checkInvalidDefinitionByKeyVersionTagAndTenantId(String definitionKey, String definitionVersionTag, String tenantId, CaseDefinitionEntity definition) { - ensureNotNull(CaseDefinitionNotFoundException.class, "no case definition deployed with key = '" + definitionKey + "', versionTag = '" + definitionVersionTag + "'" - + " and tenant-id = '" + tenantId + "'", "caseDefinition", definition); - } + throw new UnsupportedOperationException("Version tag is not implemented in case definition."); } @Override protected void checkInvalidDefinitionByDeploymentAndKey(String deploymentId, String definitionKey, CaseDefinitionEntity definition) {
chore(engine): fix unsupported method versionTag is not supported in case Related to CAM-<I>
camunda_camunda-bpm-platform
train
java
98a1dd72b312e630b374ca9c5f0deaad4b3d61ff
diff --git a/test/screenshot/infra/lib/diff-base-parser.js b/test/screenshot/infra/lib/diff-base-parser.js index <HASH>..<HASH> 100644 --- a/test/screenshot/infra/lib/diff-base-parser.js +++ b/test/screenshot/infra/lib/diff-base-parser.js @@ -101,7 +101,7 @@ class DiffBaseParser { const parsedDiffBase = await this.parseDiffBase_(rawDiffBase); const parsedBranch = parsedDiffBase.git_revision ? parsedDiffBase.git_revision.branch : null; - if (isOnline && isRealBranch(parsedBranch)) { + if (isOnline && isRealBranch(parsedBranch) && process.env.TRAVIS) { const prNumber = await this.gitHubApi_.getPullRequestNumber(parsedBranch); if (prNumber) { parsedDiffBase.git_revision.pr_number = prNumber;
chore(infrastructure): Only try resolving PR ID on Travis CBT runs (#<I>)
material-components_material-components-web
train
js
a974f1f176e2692fbb2a32c22bae4fc6bbe7069d
diff --git a/test/struct.js b/test/struct.js index <HASH>..<HASH> 100644 --- a/test/struct.js +++ b/test/struct.js @@ -225,7 +225,7 @@ describe('Struct', function () { var test15 = Struct({ 'a': test1 - , 'b': test2 + , 'b': test1 }) test(test15, 15)
test: fix incorrect struct definition causing test to fail
node-ffi-napi_ref-struct-di
train
js
be60430b26087c1d61127dee7c67a1a9d1572f24
diff --git a/src/uiSelectController.js b/src/uiSelectController.js index <HASH>..<HASH> 100644 --- a/src/uiSelectController.js +++ b/src/uiSelectController.js @@ -305,7 +305,7 @@ uis.controller('uiSelectCtrl', var refreshPromise = $scope.$eval(refreshAttr); if (refreshPromise && angular.isFunction(refreshPromise.then) && !ctrl.refreshing) { ctrl.refreshing = true; - refreshPromise.then(function() { + refreshPromise.finally(function() { ctrl.refreshing = false; }); }}, ctrl.refreshDelay);
fix(uiSelectCtrl): Reset refreshing flag even if async request errors Previously the `ctrl.refreshing` flag may not have been reset to `false` if the async request for data failed. Closes #<I>
angular-ui_ui-select
train
js
3d1f7fd67d81369be7c36d91233c9e642c5dbf32
diff --git a/shell/src/main/java/org/jboss/seam/forge/shell/ShellImpl.java b/shell/src/main/java/org/jboss/seam/forge/shell/ShellImpl.java index <HASH>..<HASH> 100644 --- a/shell/src/main/java/org/jboss/seam/forge/shell/ShellImpl.java +++ b/shell/src/main/java/org/jboss/seam/forge/shell/ShellImpl.java @@ -881,6 +881,7 @@ public class ShellImpl extends AbstractShellPrompt implements Shell try { reader.print(new String(new byte[] { b })); + reader.flush(); } catch (IOException e) {
fix: output buffer not flushing (redux)
forge_core
train
java
20e3783a1d21d1c3c6015366dac01591d522bac6
diff --git a/lib/workers/branch/get-updated.js b/lib/workers/branch/get-updated.js index <HASH>..<HASH> 100644 --- a/lib/workers/branch/get-updated.js +++ b/lib/workers/branch/get-updated.js @@ -32,7 +32,8 @@ async function getUpdatedPackageFiles(config) { parentBranch: undefined, }); } - throw new Error('Error updating branch content and cannot rebase'); + logger.debug({ existingContent, upgrade }, 'Error updating file'); + throw new Error('update-failure'); } if (newContent !== existingContent) { if (config.parentBranch) { diff --git a/lib/workers/branch/index.js b/lib/workers/branch/index.js index <HASH>..<HASH> 100644 --- a/lib/workers/branch/index.js +++ b/lib/workers/branch/index.js @@ -277,7 +277,9 @@ async function processBranch(branchConfig, prHourlyLimitReached, packageFiles) { logger.debug('Passing disk-space error up'); throw err; } - if ( + if (err.message === 'update-failure') { + logger.warn('Error updating branch: update failure'); + } else if ( err.message !== 'registry-failure' && err.message !== 'platform-failure' ) {
refactor: lower error to warn for branch update failure
renovatebot_renovate
train
js,js
081d003023c797a5b6f8c5c9c66e5e16fe7b6b74
diff --git a/gwpy/timeseries/core.py b/gwpy/timeseries/core.py index <HASH>..<HASH> 100644 --- a/gwpy/timeseries/core.py +++ b/gwpy/timeseries/core.py @@ -81,6 +81,9 @@ class TimeSeries(NDData): read fetch resample + highpass + lowpass + bandpass """ def __init__(self, data, epoch=None, channel=None, unit=None, sample_rate=None, name=None, **kwargs):
docs: fixed bug in {high,low,band}pass docs
gwpy_gwpy
train
py
43264909b4866f7a8c82f09b5038e4e07d5f705f
diff --git a/src/components/icon/js/iconService.js b/src/components/icon/js/iconService.js index <HASH>..<HASH> 100644 --- a/src/components/icon/js/iconService.js +++ b/src/components/icon/js/iconService.js @@ -498,7 +498,7 @@ * Define the Icon class */ function Icon(el, config) { - if (el.tagName != 'svg') { + if (el && el.tagName != 'svg') { el = angular.element('<svg xmlns="http://www.w3.org/2000/svg">').append(el)[0]; }
fix(icon): adds check for `el` before checking its `tagName`
angular_material
train
js
0c1debe5748b024c3cd795d956b5dbea8295ca27
diff --git a/clb/client_test.go b/clb/client_test.go index <HASH>..<HASH> 100644 --- a/clb/client_test.go +++ b/clb/client_test.go @@ -10,7 +10,7 @@ import ( var _ = fmt.Print // For debugging; delete when done. var _ = log.Print // For debugging; delete when done. -func ExampleRoundRobin() { +func Example_RoundRobin() { srvName := "foo.service.fliglio.com" c := NewRoundRobinClb("8.8.8.8", "53") address, err := c.GetAddress(srvName) @@ -30,7 +30,7 @@ func ExampleRoundRobin() { // Output: 0.1.2.3:8001 } -func ExampleRoundRobinFacade() { +func Example_RoundRobinFacade() { srvName := "foo.service.fliglio.com" c := NewClb("8.8.8.8", "53", RoundRobin) address, err := c.GetAddress(srvName)
style(tests): rearranging tests
benschw_srv-lb
train
go
5a836954898b3a355555fa21adf17b3453833469
diff --git a/.storybook/webpack.config.js b/.storybook/webpack.config.js index <HASH>..<HASH> 100644 --- a/.storybook/webpack.config.js +++ b/.storybook/webpack.config.js @@ -14,6 +14,6 @@ module.exports = function(config) { rules.less({ browsers }), ], }, - plugins: [...config.plugins, plugins.extractText()], + plugins: [...config.plugins], } }
chore: remove extractText plugin to fix storybook (#<I>)
intljusticemission_react-big-calendar
train
js
661e1ba5797d1ead003ca2221733bcac07062081
diff --git a/anyconfig/schema.py b/anyconfig/schema.py index <HASH>..<HASH> 100644 --- a/anyconfig/schema.py +++ b/anyconfig/schema.py @@ -156,14 +156,14 @@ def gen_schema(node, **options): if _type in _SIMPLE_TYPES: typemap = options.get("ac_schema_typemap", _SIMPLETYPE_MAP) - ret = dict(type=typemap[_type]) + scm = dict(type=typemap[_type]) elif isinstance(node, dict): - ret = object_to_schema(node, **options) + scm = object_to_schema(node, **options) elif _type in (list, tuple) or hasattr(node, "__iter__"): - ret = array_to_schema(node, **options) + scm = array_to_schema(node, **options) - return ret + return scm # vim:sw=4:ts=4:et:
refactor: change variable name from ret to scm (schema object) in .schema.gen_schema
ssato_python-anyconfig
train
py
f00c8bb4180b05d0b14368f50bd83f465a51e2a0
diff --git a/commitlint.config.js b/commitlint.config.js index <HASH>..<HASH> 100644 --- a/commitlint.config.js +++ b/commitlint.config.js @@ -16,8 +16,8 @@ if (isPushEvent) { module.exports = { extends: ['@commitlint/config-conventional'], rules: { - 'header-max-length': [2, 'always', maxLineLength], - 'body-max-line-length': [2, 'always', maxLineLength], - 'footer-max-line-length': [2, 'always', maxLineLength], + 'header-max-length': [1, 'always', maxLineLength], + 'body-max-line-length': [1, 'always', maxLineLength], + 'footer-max-line-length': [1, 'always', maxLineLength], }, };
ci: consider commit linting errors about length as warnings (#<I>)
ForestAdmin_forest-express-sequelize
train
js
428ba0c1cf09a84097e0641369f38df78945972b
diff --git a/packages/node_modules/@ciscospark/internal-plugin-ediscovery/src/report-generator.js b/packages/node_modules/@ciscospark/internal-plugin-ediscovery/src/report-generator.js index <HASH>..<HASH> 100644 --- a/packages/node_modules/@ciscospark/internal-plugin-ediscovery/src/report-generator.js +++ b/packages/node_modules/@ciscospark/internal-plugin-ediscovery/src/report-generator.js @@ -14,7 +14,7 @@ const ReportGenerator = SparkPlugin.extend({ props: { zip: 'object', folder: 'object', - count: 'int' + count: 'number' }, /**
feat(ediscovery): switching from int to number
webex_spark-js-sdk
train
js
51a0638553b6aa95b8c0812edd3f5323267814d0
diff --git a/config/webpack.loaders.js b/config/webpack.loaders.js index <HASH>..<HASH> 100644 --- a/config/webpack.loaders.js +++ b/config/webpack.loaders.js @@ -30,7 +30,7 @@ module.exports = [ loader: 'html-loader', }, { test: /\.js$/, - include: /node_modules\/|\\paraviewweb\/|\\/, + include: /node_modules(\/|\\)paraviewweb(\/|\\)/, loader: 'babel?presets[]=es2015,presets[]=react', }, { test: /\.js$/,
fix(loaders): Fix loader rule used by other projects Fix broken loader rule which caused everything matching either node_modules or paraviewweb to be run through babel, instead of only things matching node_modules/paraviewweb/.
Kitware_paraviewweb
train
js
3ad938fc92586d6b4ede28d5c88b5dee9f10e894
diff --git a/packages/bonde-public/pages/mobilization.connected.js b/packages/bonde-public/pages/mobilization.connected.js index <HASH>..<HASH> 100644 --- a/packages/bonde-public/pages/mobilization.connected.js +++ b/packages/bonde-public/pages/mobilization.connected.js @@ -86,9 +86,6 @@ const plugins = [ FinishDefaultMessage: { component: FormTellAFriend, props: { imageUrl, href: getSharedPath(props.mobilization) } - }, - FinishDonationMessage: { - component: FinishPostDonation } }} /> @@ -107,6 +104,9 @@ const plugins = [ component: DonationTellAFriend, props: { imageUrl, href: getSharedPath(props.mobilization) } }, + FinishDonationMessage: { + component: FinishPostDonation + } }} /> )
fix(public): resolve bug FinishDonationMessage
nossas_bonde-client
train
js
f57133174a67e588a11458b5ef666589a570eeeb
diff --git a/src/component/toolbox/feature/DataZoom.js b/src/component/toolbox/feature/DataZoom.js index <HASH>..<HASH> 100644 --- a/src/component/toolbox/feature/DataZoom.js +++ b/src/component/toolbox/feature/DataZoom.js @@ -240,30 +240,12 @@ function updateZoomBtnStatus(featureModel, ecModel, view, payload, api) { zoomActive ? { brushType: 'auto', - brushStyle: mapBrushStyle(featureModel.option.brushStyle) + brushStyle: featureModel.getModel('brushStyle').getItemStyle() } : false ); } -function mapBrushStyle(brushStyle) { - var properties = [ - ['fill', 'color'], - ['lineWidth', 'borderWidth'], - ['stroke', 'borderColor'], - ['opacity', 'opacity'] - ]; - var style = {}; - for (var i = 0; i < properties.length; i++) { - var propName = properties[i][1]; - var val = brushStyle[propName]; - if (val != null) { - style[properties[i][0]] = val; - } - } - return style; -} - featureManager.register('dataZoom', DataZoom);
fix(dataZoom): use itemStyle mixin to map style properties.
apache_incubator-echarts
train
js
3f139c8863532a3922faf6c584d260f4a509ae1f
diff --git a/test/index.js b/test/index.js index <HASH>..<HASH> 100644 --- a/test/index.js +++ b/test/index.js @@ -9,10 +9,7 @@ global.WEB_SOCKET_SUPPRESS_CROSS_DOMAIN_SWF_ERROR = null; global.WEB_SOCKET_DISABLE_AUTO_INITIALIZATION = null; global.WEB_SOCKET_SWF_LOCATION = null; -// node only tests -if (env.node) { - require('./url'); -} +require('./url'); // browser only tests if (env.browser) { diff --git a/test/url.js b/test/url.js index <HASH>..<HASH> 100644 --- a/test/url.js +++ b/test/url.js @@ -1,5 +1,4 @@ -var old = global.location = { protocol: 'http:', hostname: 'localhost'}; var loc = {}; var url = require('../lib/url'); var expect = require('expect.js'); @@ -43,7 +42,7 @@ describe('url', function(){ loc.protocol = 'http:'; loc.hostname = 'woot.com'; - expect(url('/woot').path).to.be('/woot'); + expect(url('/woot', loc).path).to.be('/woot'); expect(url('http://google.com').path).to.be('/'); expect(url('http://google.com/').path).to.be('/'); });
test: make url tests run on the browser
tsjing_socket.io-client
train
js,js
8915bc1d37f1b83fc9bbd3cfef337bd5f75e4779
diff --git a/src/client/Client.js b/src/client/Client.js index <HASH>..<HASH> 100644 --- a/src/client/Client.js +++ b/src/client/Client.js @@ -113,7 +113,8 @@ class Client extends BaseClient { /** * All of the {@link Channel}s that the client is currently handling, mapped by their IDs - * as long as sharding isn't being used, this will be *every* channel in *every* guild the bot - * is a member of, and all DM channels + * is a member of. Note that DM channels will not be initially cached, and thus not be present + * in the store without their explicit fetching or use. * @type {ChannelStore<Snowflake, Channel>} */ this.channels = new ChannelStore(this);
docs:(Client): disambiguate the description of channels collection (#<I>) * Disambiguate the description of <client>.channels Although not explicitly said, the current wording makes it seem like all channels are cached and available at any time in this store. Hopefully this variation makes it a bit clearer. * make more explicit (I think) * remove trailing white spaces
discordjs_discord.js
train
js
ec0b424e42c9340934096eae1d703313ad45b5fb
diff --git a/test/runtime/Policies.go b/test/runtime/Policies.go index <HASH>..<HASH> 100644 --- a/test/runtime/Policies.go +++ b/test/runtime/Policies.go @@ -958,6 +958,7 @@ var _ = Describe("RuntimeValidatedPolicies", func() { It("Tests Egress To World", func() { googleDNS := "8.8.8.8" + googleHTTP := "google.com" checkEgressToWorld := func() { By("Testing egress access to the world") res := vm.ContainerExec(helpers.App1, helpers.Ping(googleDNS)) @@ -967,6 +968,10 @@ var _ = Describe("RuntimeValidatedPolicies", func() { res = vm.ContainerExec(helpers.App1, helpers.Ping(helpers.App2)) ExpectWithOffset(2, res.WasSuccessful()).Should( BeFalse(), "unexpectedly able to ping %s", helpers.App2) + + res = vm.ContainerExec(helpers.App1, helpers.CurlFail("http://%s", googleHTTP)) + ExpectWithOffset(2, res.WasSuccessful()).Should( + BeTrue(), "not able to curl %s", googleHTTP) } setupPolicyAndTestEgressToWorld := func(policy string) {
test: Add TCP request to egress world test
cilium_cilium
train
go
e451d49191649e2e9becee92ba79db6805e77b97
diff --git a/src/test/attrs.test.js b/src/test/attrs.test.js index <HASH>..<HASH> 100644 --- a/src/test/attrs.test.js +++ b/src/test/attrs.test.js @@ -105,17 +105,17 @@ describe('attrs', () => { }) it('pass attrs to style block', () => { - /* Would be a React Router Link in IRL */ + /* Would be a React Router Link in URL */ const Comp = styled.a.attrs({ href: '#', - activeClassName: '--is-active' + 'data-active-class-name': '--is-active' })` color:blue; - &.${props => props.activeClassName} { + &.${props => props['data-active-class-name']} { color:red; } ` - expect(shallow(<Comp />).html()).toEqual('<a href="#" class="sc-a b"></a>') + expect(shallow(<Comp />).html()).toEqual('<a href="#" data-active-class-name="--is-active" class="sc-a b"></a>') expectCSSMatches('.sc-a {} .b { color:blue; } .b.--is-active { color:red; }') })
fix: console error in attrs test
styled-components_styled-components
train
js
65465deea1988171c8b1634c398ba076c548498f
diff --git a/lib/client.js b/lib/client.js index <HASH>..<HASH> 100644 --- a/lib/client.js +++ b/lib/client.js @@ -149,13 +149,14 @@ function _connect (client) { _reset = false } else { socket.resume() - client[kQueue].resume() } if (_callback) { _callback() _callback = null } + + client[kQueue].resume() } client[kStream].finished(socket, (err) => {
fix: resume queue after callback resuming the queue before callback would cause the task to be unecessarily re-queued.
mcollina_undici
train
js
4acb8b056017535353bf6ee792e976dc7b5c89c9
diff --git a/packages/reactstrap-validation-select/AvSelect.js b/packages/reactstrap-validation-select/AvSelect.js index <HASH>..<HASH> 100644 --- a/packages/reactstrap-validation-select/AvSelect.js +++ b/packages/reactstrap-validation-select/AvSelect.js @@ -307,6 +307,9 @@ class AvSelect extends AvBaseInput { styles={{ ...styles, placeholder: (provided, state) => { + if (state.isDisabled) { + return provided; + } const showError = touched && hasError && !state.focused; return { @@ -320,7 +323,11 @@ class AvSelect extends AvBaseInput { width: '90%', }), control: (provided, state) => { + if (state.isDisabled) { + return provided; + } const showError = touched && hasError && !state.focused; + return { ...provided, borderRadius: '.25em', @@ -338,6 +345,9 @@ class AvSelect extends AvBaseInput { maxWidth: '99%', }), dropdownIndicator: (provided, state) => { + if (state.isDisabled) { + return provided; + } const showError = touched && hasError && !state.focused; return {
fix(reactstrap-validation-select): prevents the provided styles from react-select from being overridden by the styles applied in error conditions
Availity_availity-react
train
js
5dea0fda51fe0cc7ce1e2fdb17f2dabe16b7213f
diff --git a/pkg/setting/setting.go b/pkg/setting/setting.go index <HASH>..<HASH> 100644 --- a/pkg/setting/setting.go +++ b/pkg/setting/setting.go @@ -359,12 +359,12 @@ func loadConfiguration(args *CommandLineArgs) { configFiles = append(configFiles, defaultConfigFile) Cfg, err = ini.Load(defaultConfigFile) - Cfg.BlockMode = false - if err != nil { log.Fatal(3, "Failed to parse defaults.ini, %v", err) } + Cfg.BlockMode = false + // command line props commandLineProps := getCommandLineProperties(args.Args) // load default overrides
fix(settings): remove nil pointer exception
grafana_grafana
train
go
621ea96f2f130805b00e0eccdb14618e7cd31de1
diff --git a/tests/AuditingTestCase.php b/tests/AuditingTestCase.php index <HASH>..<HASH> 100644 --- a/tests/AuditingTestCase.php +++ b/tests/AuditingTestCase.php @@ -21,7 +21,6 @@ use OwenIt\Auditing\Resolvers\IpAddressResolver; use OwenIt\Auditing\Resolvers\UrlResolver; use OwenIt\Auditing\Resolvers\UserAgentResolver; use OwenIt\Auditing\Resolvers\UserResolver; -use OwenIt\Auditing\Tests\Models\User; class AuditingTestCase extends TestCase { @@ -39,7 +38,11 @@ class AuditingTestCase extends TestCase ]); // Audit - $app['config']->set('audit.user.model', User::class); + $app['config']->set('audit.user.morph_prefix', 'user'); + $app['config']->set('audit.user.guards', [ + 'web', + 'api', + ]); $app['config']->set('audit.resolver.user', UserResolver::class); $app['config']->set('audit.resolver.url', UrlResolver::class); $app['config']->set('audit.resolver.ip_address', IpAddressResolver::class);
fix(Tests): env setup method
owen-it_laravel-auditing
train
php
156050027516389f9815b8c93e90c80b53d9d749
diff --git a/migrations/Version202203101426253772_taoLti.php b/migrations/Version202203101426253772_taoLti.php index <HASH>..<HASH> 100644 --- a/migrations/Version202203101426253772_taoLti.php +++ b/migrations/Version202203101426253772_taoLti.php @@ -30,7 +30,6 @@ use oat\taoLti\models\classes\Platform\Repository\LtiPlatformRepositoryInterface final class Version202203101426253772_taoLti extends AbstractMigration { - public function getDescription(): string { return 'Populate LTI 1.3 platform registration table'; @@ -38,10 +37,10 @@ final class Version202203101426253772_taoLti extends AbstractMigration public function up(Schema $schema): void { - /** @var LtiPlatformRepositoryInterface $rdfRepository */ + /** @var LtiPlatformRepositoryInterface $ltiRepository */ $ltiRepository = $this->getServiceLocator()->get(LtiPlatformRepositoryInterface::SERVICE_ID); - /** @var Lti1p3RegistrationSnapshotRepository $snaptshotRepository */ + /** @var Lti1p3RegistrationSnapshotRepository $snapshotRepository */ $snapshotRepository = $this->getServiceLocator()->getContainer()->get(RegistrationRepositoryInterface::class); foreach ($ltiRepository->findAll() as $registration) {
chore: update variable name in doc block
oat-sa_extension-tao-lti
train
php
988e241014ac5c6734e71d30c91f5af3bec53e8a
diff --git a/packages/build-tools/tasks/task-collections.js b/packages/build-tools/tasks/task-collections.js index <HASH>..<HASH> 100644 --- a/packages/build-tools/tasks/task-collections.js +++ b/packages/build-tools/tasks/task-collections.js @@ -121,7 +121,7 @@ async function clean(cleanAll = false) { dirs = [config.buildDir]; break; } - if (cleanAll === true) { + if (cleanAll === true && config.env !== 'pwa') { dirs = [config.wwwDir]; } await internalTasks.clean(dirs);
test: re-test optimized webpack build
bolt-design-system_bolt
train
js
65de08bddb334129a9baa6a872a8aa3bced5d07c
diff --git a/spotbugs/src/main/java/edu/umd/cs/findbugs/SAXBugCollectionHandler.java b/spotbugs/src/main/java/edu/umd/cs/findbugs/SAXBugCollectionHandler.java index <HASH>..<HASH> 100644 --- a/spotbugs/src/main/java/edu/umd/cs/findbugs/SAXBugCollectionHandler.java +++ b/spotbugs/src/main/java/edu/umd/cs/findbugs/SAXBugCollectionHandler.java @@ -587,10 +587,8 @@ public class SAXBugCollectionHandler extends DefaultHandler { // The qName should equal to its classname, so we can reflect the class by 'qName'. annotationClazz = plugin.getClassLoader().loadClass(k); return annotationClazz.getMethod("fromXML", String.class, Attributes.class); - } catch (NoSuchMethodException | ClassCastException e) { - e.printStackTrace(); - } catch (ClassNotFoundException ignored) { - LOG.warn("{} not found in Plugin({})", k, plugin.getPluginId()); + } catch (NoSuchMethodException | ClassCastException | ClassNotFoundException ignored) { + LOG.warn("{} not found in Plugin({})", k, plugin.getPluginId(), ignored); // The current plugin classloader doesn't have the annotation class called 'qName', ignore. } }
fix: fix the security hotspot reported by SQ <URL>
spotbugs_spotbugs
train
java
a73ca5475b54c7a598cc3b9b2729a603a8f0040e
diff --git a/index.js b/index.js index <HASH>..<HASH> 100644 --- a/index.js +++ b/index.js @@ -26,7 +26,7 @@ function create (options) { redirect, exclude } = Object.assign({}, defaults, options) - const _port = redirectPort === 443 ? '' : (': ' + redirectPort) + const _port = redirectPort === 443 ? '' : (':' + redirectPort) return function redirectSSL (req, res, next) { if (redirect && !isExcluded(req.url, exclude)) {
fix: remove space from URL when port is not <I> (#<I>)
nuxt-community_redirect-ssl
train
js
49a6275281afc84cb8a806ec10a7302c08ae6c46
diff --git a/test/application/domain/verifier/useCases/getIssuerProfile.test.js b/test/application/domain/verifier/useCases/getIssuerProfile.test.js index <HASH>..<HASH> 100644 --- a/test/application/domain/verifier/useCases/getIssuerProfile.test.js +++ b/test/application/domain/verifier/useCases/getIssuerProfile.test.js @@ -27,13 +27,14 @@ describe('Verifier domain getIssuerProfile use case test suite', function () { describe('given it is called with an issuerAddress parameter', function () { const issuerProfileFixtureString = JSON.stringify(issuerProfileV2JsonFixture); const issuerAddressV2Fixture = fixtureBlockcertsV2.badge.issuer; - const issuerAddressV3AlphaFixture = fixtureBlockcertsV3Alpha.issuer; beforeEach(function () { stubRequest.resolves(issuerProfileFixtureString); }); describe('and the Blockcerts version is 3.0-alpha', function () { + const issuerAddressV3AlphaFixture = fixtureBlockcertsV3Alpha.issuer; + it('should request the profile address', async function () { await getIssuerProfile(issuerAddressV3AlphaFixture); expect(stubRequest.getCall(0).args).toEqual([{ url: fixtureBlockcertsV3Alpha.issuer }]);
test(Verification): var declaration position
blockchain-certificates_cert-verifier-js
train
js
75c964b4a54beb58281fe2190d2601f05254980f
diff --git a/src/Jobs/Contracts/Character/Contracts.php b/src/Jobs/Contracts/Character/Contracts.php index <HASH>..<HASH> 100644 --- a/src/Jobs/Contracts/Character/Contracts.php +++ b/src/Jobs/Contracts/Character/Contracts.php @@ -79,7 +79,7 @@ class Contracts extends AbstractAuthCharacterJob ]); if ($contracts->isCachedLoad() && - ContractDetail::where('character_id', $this->getCharacterId())->count() > 0) + CharacterContract::where('character_id', $this->getCharacterId())->count() > 0) return; collect($contracts)->each(function ($contract) {
fix(contracts): fix a typo in contract model call
eveseat_eveapi
train
php
3cf0ce251092727da8e680945c6aa99654b49156
diff --git a/src/dna-base-component.next.js b/src/dna-base-component.next.js index <HASH>..<HASH> 100644 --- a/src/dna-base-component.next.js +++ b/src/dna-base-component.next.js @@ -13,16 +13,6 @@ import { DNAAttributesComponent } from './dna-attributes-component.next.js'; */ export class DNABaseComponent extends DNAMixedComponent { /** - * Fires when an instance of the element is created. - */ - createdCallback() { - super.createdCallback(); - // Add scope style class - if (this.is) { - this.classList.add(this.is); - } - } - /** * A list of mixins. * @type {Array} */ diff --git a/src/dna-style-component.next.js b/src/dna-style-component.next.js index <HASH>..<HASH> 100644 --- a/src/dna-style-component.next.js +++ b/src/dna-style-component.next.js @@ -67,4 +67,14 @@ export class DNAStyleComponent extends DNAComponent { } return style; } + /** + * Fires when an instance of the element is created. + */ + createdCallback() { + super.createdCallback(); + // Add scope style class + if (this.is) { + this.classList.add(this.is); + } + } }
refactor: add css scoped class in `DNAStyleComponent` instaed of `DNABaseComponent`
chialab_dna
train
js,js
8e968deda9f7a8a6dbb25a12f7ac208cee594ca3
diff --git a/js/poloniex.js b/js/poloniex.js index <HASH>..<HASH> 100644 --- a/js/poloniex.js +++ b/js/poloniex.js @@ -574,7 +574,7 @@ module.exports = class poloniex extends Exchange { result.push (trades[j]); } } else { - let [ baseId, quoteId ] = id.split ('_'); + let [ quoteId, baseId ] = id.split ('_'); let base = this.commonCurrencyCode (baseId); let quote = this.commonCurrencyCode (quoteId); let symbol = base + '/' + quote;
fix: Poloniex markets inconsistency Poloniex define markets' IDs this way: QUOTE_BASE
ccxt_ccxt
train
js
cc122226f5ee01933c16655863cef861313d7d5f
diff --git a/nni/tools/nnictl/ts_management.py b/nni/tools/nnictl/ts_management.py index <HASH>..<HASH> 100644 --- a/nni/tools/nnictl/ts_management.py +++ b/nni/tools/nnictl/ts_management.py @@ -9,7 +9,7 @@ _builtin_training_services = [ 'remote', 'openpai', 'pai', 'aml', - 'dlc' + 'dlc', 'kubeflow', 'frameworkcontroller', 'adl',
fix: Missing comma (#<I>)
Microsoft_nni
train
py
f3c9db17c52e3ad898f926c125d27af1ca7b75f4
diff --git a/classes/hypeJunction/Services/IconFactory.php b/classes/hypeJunction/Services/IconFactory.php index <HASH>..<HASH> 100644 --- a/classes/hypeJunction/Services/IconFactory.php +++ b/classes/hypeJunction/Services/IconFactory.php @@ -244,7 +244,7 @@ class IconFactory { * * @param \ElggEntity $entity Entity * @param string $size Size - * @return ElggFile + * @return \ElggFile */ public function getURL(\ElggEntity $entity, $size = '') { @@ -292,7 +292,7 @@ class IconFactory { $size = strtolower($size ? : 'medium'); $filename = "icons/" . $entity->guid . $size . ".jpg"; $etag = md5($entity->icontime . $size); - $filehandler = new ElggFile(); + $filehandler = new \ElggFile(); $filehandler->owner_guid = $entity->owner_guid; $filehandler->setFilename($filename); if ($filehandler->exists()) {
fix(icons): classname missing scope
hypeJunction_hypeApps
train
php
158ea1a6852c60d481eb10c3f6a29d0efb3513bf
diff --git a/docs/lib/url_generator.js b/docs/lib/url_generator.js index <HASH>..<HASH> 100644 --- a/docs/lib/url_generator.js +++ b/docs/lib/url_generator.js @@ -123,7 +123,7 @@ function normalizeNestedPaths (data) { return flatten(value, memo, parents.concat(key)) } - memo[key] = parents.concat(value).join("/") + memo[key] = parents.concat(value).join('/') return memo }, memo) @@ -135,7 +135,7 @@ function normalizeNestedPaths (data) { return expand(value, parents.concat(key)) } - return parents.concat(value).join("/") + return parents.concat(value).join('/') }) }
docs: eslint use single quotes
cypress-io_cypress
train
js
22c17347df295838fdda216770f3166a350e24a4
diff --git a/lib/components/user/stacked-pane-display.js b/lib/components/user/stacked-pane-display.js index <HASH>..<HASH> 100644 --- a/lib/components/user/stacked-pane-display.js +++ b/lib/components/user/stacked-pane-display.js @@ -8,6 +8,7 @@ import { PageHeading, StackedPaneContainer } from './styled' * This component handles the flow between screens for new OTP user accounts. */ const StackedPaneDisplay = ({ onCancel, paneSequence, title }) => { + // Create indicator of if cancel button was clicked so that child components can know const [isBeingCanceled, updateBeingCanceled] = useState(false) return (
refactor(trip-page): clarify use of new state variable
opentripplanner_otp-react-redux
train
js
59aa37d708547bbaf0d94b30c74ebc81a8fd7b8e
diff --git a/src/cattrs/gen.py b/src/cattrs/gen.py index <HASH>..<HASH> 100644 --- a/src/cattrs/gen.py +++ b/src/cattrs/gen.py @@ -36,7 +36,11 @@ class AttributeOverride: omit: bool = False # Omit the field completely. -def override(omit_if_default=None, rename=None, omit: bool = False): +def override( + omit_if_default: Optional[bool] = None, + rename: Optional[str] = None, + omit: bool = False, +): return AttributeOverride(omit_if_default=omit_if_default, rename=rename, omit=omit) @@ -50,7 +54,7 @@ def make_dict_unstructure_fn( converter: "BaseConverter", _cattrs_omit_if_default: bool = False, _cattrs_use_linecache: bool = True, - **kwargs, + **kwargs: AttributeOverride, ) -> Callable[[T], Dict[str, Any]]: """ Generate a specialized dict unstructuring function for an attrs class or a
fix: missing annotations from gen and make_unstructure_dict_fn
Tinche_cattrs
train
py
e9946c3f6cc38e73c9c5585816e5856634798294
diff --git a/test/api/connectivity_test.js b/test/api/connectivity_test.js index <HASH>..<HASH> 100644 --- a/test/api/connectivity_test.js +++ b/test/api/connectivity_test.js @@ -76,10 +76,12 @@ describe('Reconnection', function() { }); }); after(function() { + client.close(); server1.forceShutdown(); server2.forceShutdown(); }); it('Should end with either OK or UNAVAILABLE when querying a server that is shutting down', function(done) { + this.timeout(10000); let pendingCalls = 0; let testDone = false; let callInterval; @@ -94,7 +96,8 @@ describe('Reconnection', function() { server2.bindAsync(`localhost:${port}`, serverCreds, (err) => { assert.ifError(err); server2.start(); - client.unary({}, (err, data) => { + const metadata = new clientGrpc.Metadata({ waitForReady: true }); + client.unary({}, metadata, (err, data) => { assert.ifError(err); clearInterval(callInterval); testDone = true; @@ -103,6 +106,7 @@ describe('Reconnection', function() { }); }); callInterval = setInterval(() => { + assert.strictEqual(testDone, false); pendingCalls += 1; client.unary({}, (err, data) => { pendingCalls -= 1;
test: make connctivity test more robust The key change here is forcing the final unary call to wait for the server to be ready. The native client was making the RPC, but didn't appear to have a valid connection at the time.
grpc_grpc-node
train
js
558017dcf0e041688d8f096302647fd8041ebde2
diff --git a/src/core/components/pubsub.js b/src/core/components/pubsub.js index <HASH>..<HASH> 100644 --- a/src/core/components/pubsub.js +++ b/src/core/components/pubsub.js @@ -24,7 +24,7 @@ module.exports = function pubsub (self) { } self._pubsub.on(topic, handler) - setImmediate(() => callback()) + setImmediate(cb) } if (!callback) {
fix(pubsub): subscribe promises (#<I>)
ipfs_js-ipfs
train
js
7c70db859e2f3c07e6a4e78fe4357b6fbbfd0338
diff --git a/ui/src/utils/escape-key.js b/ui/src/utils/escape-key.js index <HASH>..<HASH> 100644 --- a/ui/src/utils/escape-key.js +++ b/ui/src/utils/escape-key.js @@ -1,13 +1,24 @@ import { isKeyCode } from './key-composition.js' let handlers = [] +let escDown = false export default { __install () { this.__installed = true + window.addEventListener('keydown', evt => { + escDown = evt.keyCode === 27 + }) + window.addEventListener('blur', () => { + escDown === true && (escDown = false) + }) window.addEventListener('keyup', evt => { - if (handlers.length !== 0 && isKeyCode(evt, 27) === true) { - handlers[handlers.length - 1].fn(evt) + if (escDown === true) { + escDown = false + + if (handlers.length !== 0 && isKeyCode(evt, 27) === true) { + handlers[handlers.length - 1].fn(evt) + } } }) },
feat(EscapeKey): Only accept ESC key if it was pressed while the app had focus #<I> (#<I>)
quasarframework_quasar
train
js
f22e04d0a9e6e1a9dac12c5b52b4652d8e0ea2ca
diff --git a/src/kff.ServiceContainer.js b/src/kff.ServiceContainer.js index <HASH>..<HASH> 100644 --- a/src/kff.ServiceContainer.js +++ b/src/kff.ServiceContainer.js @@ -303,6 +303,14 @@ kff.ServiceContainer = kff.createClass( */ loadService: function(serviceName) { + if(typeof serviceName === 'string') + { + var match = serviceName.match(/^[^\s#]*/); + if(match) + { + serviceName = match[0]; + } + } return kff.evalObjectPath(serviceName); } }); diff --git a/test/kff.ServiceContainer.test.js b/test/kff.ServiceContainer.test.js index <HASH>..<HASH> 100644 --- a/test/kff.ServiceContainer.test.js +++ b/test/kff.ServiceContainer.test.js @@ -24,6 +24,9 @@ describe('kff.ServiceContainer', function() 'construct': Service1, 'args': ['%kocka%', 'haf'] }, + 'Service7 #1': + { + }, 'service2': { 'construct': Service2, @@ -163,6 +166,11 @@ describe('kff.ServiceContainer', function() container.createService('Service7').should.equal(Service7); }); + it('should create object service with space', function() + { + container.createService('Service7 #1').should.equal(Service7); + }); + }); describe('#getService', function()
feat(ServiceContainer): allow service name to contain spaces If service name contains space (or # character), strip first non-spaced segment of the string and use it as object path to find a service symbol. This allows for different services to be resolved to the same symbol but with different configuration.
karfcz_kff
train
js,js
ec6340833d35b2d55da4adade7d21916d039f30c
diff --git a/httprunner/v3/runner.py b/httprunner/v3/runner.py index <HASH>..<HASH> 100644 --- a/httprunner/v3/runner.py +++ b/httprunner/v3/runner.py @@ -91,6 +91,10 @@ class TestCaseRunner(object): raise finally: self.validation_results = resp_obj.validation_results + # save request & response meta data + self.session.meta_data["validators"] = self.validation_results + self.session.meta_data["name"] = step.name + self.meta_datas.append(self.session.meta_data) return extract_mapping @@ -109,10 +113,6 @@ class TestCaseRunner(object): extract_mapping = self.__run_step(step) # save extracted variables to session variables session_variables.update(extract_mapping) - # save request & response meta data - self.session.meta_data["validators"] = self.validation_results - self.session.meta_data["name"] = step.name - self.meta_datas.append(self.session.meta_data) return self
fix: log request & response meta data when test failed
HttpRunner_HttpRunner
train
py
73a2a6b9dcfecd1f5219460a4050a7903d6106c1
diff --git a/tests/amd/middleware.spec.js b/tests/amd/middleware.spec.js index <HASH>..<HASH> 100644 --- a/tests/amd/middleware.spec.js +++ b/tests/amd/middleware.spec.js @@ -261,6 +261,33 @@ define([ server.respond(); }); + + it('should not break everything if a middleware breaks', function (done) { + // configure response + server.respondWith('GET', + 'http://example.tld/bar', + [200, {'Content-Type': 'application/json'}, '{"result": "ok"}'] + ); + var spyMiddleware = sinon.spy(function (req) { + throw new Error('boo!'); + }); + + var thenSpy = sinon.spy(function () {}); + + api.register('spy', spyMiddleware); + + api.api.foo() + .then(thenSpy) + .catch(function (err, res) { + err.message.should.eql('boo!'); + + thenSpy.should.not.have.been.called; + spyMiddleware.should.been.called; + done(); + }); + + server.respond(); + }); }); describe('multiple middlewares', function () {
test(middlewares): add test about middleware throwing error
stephanebachelier_superapi
train
js
f5c30fbfc1eece67b37f8301f327fbd14f037787
diff --git a/gosu-core/src/main/java/gw/internal/gosu/parser/ClassJavaClassInfo.java b/gosu-core/src/main/java/gw/internal/gosu/parser/ClassJavaClassInfo.java index <HASH>..<HASH> 100644 --- a/gosu-core/src/main/java/gw/internal/gosu/parser/ClassJavaClassInfo.java +++ b/gosu-core/src/main/java/gw/internal/gosu/parser/ClassJavaClassInfo.java @@ -68,6 +68,7 @@ public class ClassJavaClassInfo extends TypeJavaClassType implements IClassJavaC private String _namespace; private volatile Integer _modifiers; private Boolean _bArray; + private Boolean _bEnum; private Boolean _bInterface; private LocklessLazyVar<IType> _enclosingClass = new LocklessLazyVar<IType>() { protected IType init() { @@ -369,7 +370,7 @@ public class ClassJavaClassInfo extends TypeJavaClassType implements IClassJavaC @Override public boolean isEnum() { - return _class.isEnum(); + return _bEnum == null ? _bEnum = _class.isEnum() : _bEnum; } @Override
perf: cache "enum" modifier, otherwise expensive making native call to Class#isEnum()
gosu-lang_gosu-lang
train
java
96f9311afbf190f80d4248c8152a9391f51ade1a
diff --git a/lib/featuresLoader.js b/lib/featuresLoader.js index <HASH>..<HASH> 100644 --- a/lib/featuresLoader.js +++ b/lib/featuresLoader.js @@ -59,7 +59,7 @@ const createCucumber = ( .join("\n")} `; -module.exports = function(_, filePath) { +module.exports = function(_, filePath = this.resourcePath) { log("compiling", filePath); const features = glob.sync(`${path.dirname(filePath)}/**/*.feature`);
feat(featuresloader): allow to use featuresLoader with Webpack
TheBrainFamily_cypress-cucumber-preprocessor
train
js
65d78e05cb5b4ddb04ef93e85a95efe92ae09988
diff --git a/src/core/services/gesture/gesture.js b/src/core/services/gesture/gesture.js index <HASH>..<HASH> 100644 --- a/src/core/services/gesture/gesture.js +++ b/src/core/services/gesture/gesture.js @@ -5,7 +5,8 @@ var HANDLERS = {}; * It contains normalized x and y coordinates from DOM events, * as well as other information abstracted from the DOM. */ -var pointer, lastPointer, forceSkipClickHijack = false, maxClickDistance = 6; +var pointer, lastPointer, maxClickDistance = 6; +var forceSkipClickHijack = false, disableAllGestures = false; /** * The position of the most recent click if that click was on a label element. @@ -57,6 +58,18 @@ function MdGestureProvider() { } MdGestureProvider.prototype = { + /** + * @ngdoc method + * @name $mdGestureProvider#disableAll + * + * @description + * Disable all gesture detection. This can be beneficial to application performance + * and memory usage. + */ + disableAll: function () { + disableAllGestures = true; + }, + // Publish access to setter to configure a variable BEFORE the // $mdGesture service is instantiated... /** @@ -531,6 +544,9 @@ function MdGestureHandler() { * @ngInject */ function attachToDocument( $mdGesture, $$MdGestureHandler ) { + if (disableAllGestures) { + return; + } // Polyfill document.contains for IE11. // TODO: move to util
feat(gestures): add ability to disable all gestures for perf (#<I>) Fixes #<I>. Relates to #<I>.
angular_material
train
js
199f2001a68dc7c8050ef47137de197cb18685b3
diff --git a/models/points.go b/models/points.go index <HASH>..<HASH> 100644 --- a/models/points.go +++ b/models/points.go @@ -186,6 +186,8 @@ func (t FieldType) String() string { return "String" case Empty: return "Empty" + case Unsigned: + return "Unsigned" default: return "<unknown>" }
fix(storage): add string representation of the Unsigned FieldType
influxdata_influxdb
train
go
5353cb7f409aa07ccd84c9384d25c5f7248c9426
diff --git a/lib/all.js b/lib/all.js index <HASH>..<HASH> 100644 --- a/lib/all.js +++ b/lib/all.js @@ -1,33 +1,36 @@ 'use strict'; -const { forEach } = require('./internal/util'); const { InnerReceiver } = require('./internal/receiver'); const { internal } = require('./internal/util'); module.exports = function(Promise, callResolve, callReject) { return function all(array) { - let size = array.length; + const size = array.length; const result = Array(size); if (size === 0) { return Promise.resolve(result); } const promise = new Promise(internal); - let called = false; + let called = 0; const _callResolve = (value, index) => { result[index] = value; - if (--size === 0) { + if (++called === size) { callResolve(promise, result); } }; + let err; const _callReject = reason => { - if (called) { + if (err) { return; } - called = true; + err = reason; callReject(promise, reason); }; - forEach(array, iterator); + let index = -1; + while (++index < size) { + iterator(array[index], index); + } return promise; function iterator(p, index) {
refactor(all): fix not to use `forEach`
suguru03_aigle
train
js
e073df8007572ba26b175c0fb1153ba988b3c059
diff --git a/packages/ringcentral-integration/modules/Conversations/index.js b/packages/ringcentral-integration/modules/Conversations/index.js index <HASH>..<HASH> 100644 --- a/packages/ringcentral-integration/modules/Conversations/index.js +++ b/packages/ringcentral-integration/modules/Conversations/index.js @@ -160,10 +160,12 @@ export default class Conversations extends RcModule { this._contactMatcher.triggerMatch(); } } else if (this._lastConversaionList.length > this._messageStore.allConversations.length) { - this.store.dispatch({ - type: this.actionTypes.cleanOldConversatioans - }); this._lastConversaionList = this._messageStore.allConversations; + if (this.oldConversations.length) { + this.store.dispatch({ + type: this.actionTypes.cleanOldConversatioans + }); + } } } @@ -205,6 +207,7 @@ export default class Conversations extends RcModule { this.store.dispatch({ type: this.actionTypes.initSuccess, }); + this._lastConversaionList = this._messageStore.allConversations; if ( this.allConversations.length <= this._perPage && this._enableLoadOldMessages &&
fix: clean oldconversation (#<I>)
ringcentral_ringcentral-js-widgets
train
js
2ad6128890da3a4664f0543e8857b4b8549ac76e
diff --git a/lib/partialruby.rb b/lib/partialruby.rb index <HASH>..<HASH> 100644 --- a/lib/partialruby.rb +++ b/lib/partialruby.rb @@ -113,7 +113,7 @@ module PartialRuby return (" class #{classname} - #{object_ref self}.run(#{object_ref subtree}, Frame.new(binding,self) ) + #{emul subtree, frame} end ") end
refactor: implemented recursive emul call in ruby_emul_class method
tario_partialruby
train
rb
82f578d3691b5c39ae412503d1195b2c7776e3f7
diff --git a/ladybug/monthlychart.py b/ladybug/monthlychart.py index <HASH>..<HASH> 100644 --- a/ladybug/monthlychart.py +++ b/ladybug/monthlychart.py @@ -999,6 +999,8 @@ class MonthlyChart(object): if unit in UNITS[key]: data_types.append(TYPESDICT[key]()) break + else: + data_types.append(GenericType) # convert hourly data collections into monthly-per-hour collections if self._time_interval == 'Hourly':
style(monthlychart): Ensure MonthlyChart still works with GenericType
ladybug-tools_ladybug
train
py
886f84b2edaff4733469a8f2cd130775b4ab1439
diff --git a/src/index.js b/src/index.js index <HASH>..<HASH> 100644 --- a/src/index.js +++ b/src/index.js @@ -171,6 +171,8 @@ const _translators = [ // runtime req only supports module in user space switchToUserSpace(); (new Function(text))(); + // could be anonymous + userSpace.nameAnonymousModule(parsedId.cleanId); }); } ]; @@ -219,12 +221,10 @@ function runtimeReq(id) { throw new Error(`no runtime translator to handle ${parsed.cleanId}`); }) .then(() => { - // could be anonymous - userSpace.nameAnonymousModule(parsed.cleanId); if (userSpace.has(parsed.cleanId)) { return userSpace.req(parsed.cleanId); } else { - throw new Error(`module "${id}" is missing from url "${JSON.stringify(urlsForId(id))}"`); + throw new Error(`module "${parsed.cleanId}" is missing from url "${JSON.stringify(urlsForId(id))}"`); } }); }
fix: fix timing issue on anonymous module
dumberjs_dumber-module-loader
train
js
995dc496d4887508362c32b0ccd2484acfe3684b
diff --git a/src/components/toast/toast.js b/src/components/toast/toast.js index <HASH>..<HASH> 100644 --- a/src/components/toast/toast.js +++ b/src/components/toast/toast.js @@ -354,8 +354,9 @@ function MdToastProvider($$interimElementProvider) { } } - - return templateRoot.outerHTML; + // We have to return the innerHTMl, because we do not want to have the `md-template` element to be + // the root element of our interimElement. + return templateRoot.innerHTML; } return template || '';
fix(toast): apply theming correctly to custom toasts * Custom configurations for `md-toast` didn't receive any theming, because the interimElement service was applying the theming on the the `md-template` element, which was accidentally used as our template root element. Fixes #<I>. Closes #<I>
angular_material
train
js
d96f2ee58e7d7947da1d4ecbe3fd88db1c4ea4bb
diff --git a/src/locales/index.js b/src/locales/index.js index <HASH>..<HASH> 100644 --- a/src/locales/index.js +++ b/src/locales/index.js @@ -1,8 +1,10 @@ // Parent import en_US from './en_US' import ru_RU from './ru_RU' +import zh_CN form './zh_CN' module.exports = { en_US, - ru_RU + ru_RU, + zh_CN }
fix: export zh_CN locale
transloadit_uppy
train
js
b65a0553b903c8db1bf8b9661824d202cda6f04c
diff --git a/public/js/render/live.js b/public/js/render/live.js index <HASH>..<HASH> 100644 --- a/public/js/render/live.js +++ b/public/js/render/live.js @@ -323,7 +323,7 @@ var renderLivePreview = (function () { if (!$live.find('iframe').length) { iframe = document.createElement('iframe'); iframe.setAttribute('class', 'stretch'); - iframe.setAttribute('sandbox', 'allow-forms allow-pointer-lock allow-popups allow-same-origin allow-scripts'); + iframe.setAttribute('sandbox', 'allow-modals allow-forms allow-pointer-lock allow-popups allow-same-origin allow-scripts'); iframe.setAttribute('frameBorder', '0'); iframe.setAttribute('name', '<proxy>'); $live.prepend(iframe);
fix: allow alerts in the iframe again Fixes #<I> Props to @mikewest ❤
jsbin_jsbin
train
js
fc70fd1108d951dd0d74cb92267f95a13a44dd81
diff --git a/test/index.js b/test/index.js index <HASH>..<HASH> 100644 --- a/test/index.js +++ b/test/index.js @@ -150,3 +150,18 @@ describe('disabled history', function () { assert.strictEqual(logged3Msgs.length, 11); }); }); + +describe('enabled throwErrors', function () { + + var log4 = new Log('NameSpace4', { + throwErrors: true + }); + + it ('should throw errors when occurs', function () { + assert.throws(function () { + log4.warn('A warning message 1'); + log4.warn('A warning message 2'); + log4.error('An error message 1'); + }, null, 'ERROR NameSpace4: An error message 1'); + }); +});
test: throwErrors case
romelperez_prhone-log
train
js
f848a66e24971359c89f295d2e1095f558a88312
diff --git a/packages/ui/app.js b/packages/ui/app.js index <HASH>..<HASH> 100644 --- a/packages/ui/app.js +++ b/packages/ui/app.js @@ -8,6 +8,7 @@ const _ = require('lodash') const bodyParser = require('body-parser') const qs = require('querystring') +const { version } = require('botpress/package.json') const { HttpProxy } = require('@botpress/xx-util') const BASE_PATH = '/api/v1' @@ -140,7 +141,7 @@ app.get('/js/env.js', (req, res) => { window.AUTH_TOKEN_DURATION = 21600000; window.OPT_OUT_STATS = false; window.SHOW_GUIDED_TOUR = false; - window.BOTPRESS_VERSION = "10.22.3"; + window.BOTPRESS_VERSION = "${version}"; window.APP_NAME = "Botpress"; window.GHOST_ENABLED = false; window.BOTPRESS_FLOW_EDITOR_DISABLED = null;
feat(ui): report the proper bp version
botpress_botpress
train
js
7e1b926503022f29a6cf36d557180212b6e389cf
diff --git a/src/elements/Icon/Icon.js b/src/elements/Icon/Icon.js index <HASH>..<HASH> 100644 --- a/src/elements/Icon/Icon.js +++ b/src/elements/Icon/Icon.js @@ -45,7 +45,7 @@ function Icon(props) { const ElementType = getElementType(Icon, props) return ( - <ElementType {...rest} className={classes} /> + <ElementType {...rest} aria-hidden='true' className={classes} /> ) } diff --git a/test/specs/elements/Icon/Icon-test.js b/test/specs/elements/Icon/Icon-test.js index <HASH>..<HASH> 100644 --- a/test/specs/elements/Icon/Icon-test.js +++ b/test/specs/elements/Icon/Icon-test.js @@ -28,4 +28,12 @@ describe('Icon', () => { shallow(<Icon />) .should.have.tagName('i') }) + + describe('aria', () => { + it('should add aria-hidden to icon', () => { + const wrapper = shallow(<Icon />) + + wrapper.should.have.prop('aria-hidden', 'true') + }) + }) })
fix(Icon): added aria-hidden attribute to icon (#<I>)
Semantic-Org_Semantic-UI-React
train
js,js
8e30474b81d99e16570de68dbcb064ad42b97afe
diff --git a/app/actions.js b/app/actions.js index <HASH>..<HASH> 100644 --- a/app/actions.js +++ b/app/actions.js @@ -412,3 +412,22 @@ export const moveFolder = (changes) => ({ parentId: changes.parentId, }, }); + +export const openTab = (patchId) => ({ + type: ActionType.TAB_OPEN, + payload: { + patchId, + }, +}); + +export const closeTab = (id) => ({ + type: ActionType.TAB_CLOSE, + payload: { + id, + }, +}); + +export const sortTabs = (newOrderObject) => ({ + type: ActionType.TAB_SORT, + payload: newOrderObject, +});
feat(tabs): add actions for open/close/sort tabs
xodio_xod
train
js
b123be5612b73052da26e44044e6a63141d135b4
diff --git a/cmd/web-handlers.go b/cmd/web-handlers.go index <HASH>..<HASH> 100644 --- a/cmd/web-handlers.go +++ b/cmd/web-handlers.go @@ -306,7 +306,7 @@ func (web *webAPIHandlers) ListBuckets(r *http.Request, args *WebGenericArgs, re r.Header.Set("delimiter", SlashSeparator) // If etcd, dns federation configured list buckets from etcd. - if globalDNSConfig != nil { + if globalDNSConfig != nil && globalBucketFederation { dnsBuckets, err := globalDNSConfig.List() if err != nil && err != dns.ErrNoEntriesFound { return toJSONError(ctx, err)
fix: browser should listBuckets from etcd in global federation (#<I>)
minio_minio
train
go
9673e1162a581bc1c39ac94f62ce3cd2b66e78fe
diff --git a/auth_jwt.go b/auth_jwt.go index <HASH>..<HASH> 100644 --- a/auth_jwt.go +++ b/auth_jwt.go @@ -121,6 +121,9 @@ func (mw *JWTMiddleware) middlewareImpl(c *gin.Context) { // Reply will be of the form {"token": "TOKEN"}. func (mw *JWTMiddleware) LoginHandler(c *gin.Context) { + // Initial middleware default setting. + mw.MiddlewareInit() + var loginVals Login if c.BindJSON(&loginVals) != nil { diff --git a/auth_jwt_test.go b/auth_jwt_test.go index <HASH>..<HASH> 100644 --- a/auth_jwt_test.go +++ b/auth_jwt_test.go @@ -43,7 +43,6 @@ func TestLoginHandler(t *testing.T) { return true }, } - authMiddleware.MiddlewareInit() gin.SetMode(gin.TestMode) r := gin.New()
fix: Initial middleware default setting on login handle.
appleboy_gin-jwt
train
go,go
9ace604b63045ebbb066cab5e8508b51d0900a05
diff --git a/staging/src/k8s.io/client-go/tools/cache/reflector.go b/staging/src/k8s.io/client-go/tools/cache/reflector.go index <HASH>..<HASH> 100644 --- a/staging/src/k8s.io/client-go/tools/cache/reflector.go +++ b/staging/src/k8s.io/client-go/tools/cache/reflector.go @@ -322,7 +322,7 @@ func (r *Reflector) ListAndWatch(stopCh <-chan struct{}) error { initTrace.Step("Objects listed", trace.Field{Key: "error", Value: err}) if err != nil { klog.Warningf("%s: failed to list %v: %v", r.name, r.expectedTypeName, err) - return fmt.Errorf("failed to list %v: %v", r.expectedTypeName, err) + return fmt.Errorf("failed to list %v: %w", r.expectedTypeName, err) } // We check if the list was paginated and if so set the paginatedResult based on that.
fix: reflector to return wrapped list errors This fix allows Reflector/Informer callers to detect API errors using the standard Go errors.As unwrapping methods used by the apimachinery helper methods. Combined with a custom WatchErrorHandler, this can be used to stop an informer that encounters specific errors, like resource not found or forbidden.
kubernetes_kubernetes
train
go
6ce253000391fdefca01676b5b877b3d192b98de
diff --git a/write/batcher.go b/write/batcher.go index <HASH>..<HASH> 100644 --- a/write/batcher.go +++ b/write/batcher.go @@ -99,6 +99,7 @@ func (b *Batcher) write(ctx context.Context, org, bucket platform.ID, lines <-ch } buf := make([]byte, 0, maxBytes) + r := bytes.NewReader(buf) var line []byte var more = true @@ -111,7 +112,7 @@ func (b *Batcher) write(ctx context.Context, org, bucket platform.ID, lines <-ch } // write if we exceed the max lines OR read routine has finished if len(buf) >= maxBytes || (!more && len(buf) > 0) { - r := bytes.NewReader(buf) + r.Reset(buf) if err := b.Service.Write(ctx, org, bucket, r); err != nil { errC <- err return @@ -121,7 +122,7 @@ func (b *Batcher) write(ctx context.Context, org, bucket platform.ID, lines <-ch case <-time.After(flushInterval): // TODO: worry about timer garbage collection if len(buf) > 0 { - r := bytes.NewReader(buf) + r.Reset(buf) if err := b.Service.Write(ctx, org, bucket, r); err != nil { errC <- err return
refactor(write): reuse bytes readers
influxdata_influxdb
train
go
2844c7ddcda3b9d40fa42f72b69a658be41aa58b
diff --git a/modules/browser.js b/modules/browser.js index <HASH>..<HASH> 100644 --- a/modules/browser.js +++ b/modules/browser.js @@ -9,7 +9,7 @@ let noop = () => {} /** * Browser detection */ -let isBrowser = typeof window !== undefined +let isBrowser = typeof window !== 'undefined' /** * Browser functions needed by router5
refactor: fix issue with detecting client/server
router5_router5
train
js
6ebda87d3fdf9d27cf51011e200ec19e994fc5e2
diff --git a/test/ext/promise/_array.js b/test/ext/promise/_array.js index <HASH>..<HASH> 100644 --- a/test/ext/promise/_array.js +++ b/test/ext/promise/_array.js @@ -30,7 +30,9 @@ module.exports = function (t) { Error: function (a) { t("reduce", require("../../../ext/array/reduce")); deferred([]) - .reduce(function () {})(a.never, function (err) { + .reduce(function () { + return null; + })(a.never, function (err) { a(isError(err), true, "Error"); }) .done();
refactor: lint
medikoo_deferred
train
js
1fbf04766f5f1e51a9227d2ab6aca2569ed0acfc
diff --git a/packages/nitro-webpack/webpack-config/webpack.config.dev.js b/packages/nitro-webpack/webpack-config/webpack.config.dev.js index <HASH>..<HASH> 100644 --- a/packages/nitro-webpack/webpack-config/webpack.config.dev.js +++ b/packages/nitro-webpack/webpack-config/webpack.config.dev.js @@ -16,6 +16,7 @@ const includePath = path.join(appDirectory, 'src'); module.exports = (options = { rules: {}, features: {} }) => { const webpackConfig = { + mode: 'development', devtool: 'eval-source-map', context: appDirectory, entry: { diff --git a/packages/nitro-webpack/webpack-config/webpack.config.prod.js b/packages/nitro-webpack/webpack-config/webpack.config.prod.js index <HASH>..<HASH> 100644 --- a/packages/nitro-webpack/webpack-config/webpack.config.prod.js +++ b/packages/nitro-webpack/webpack-config/webpack.config.prod.js @@ -37,6 +37,7 @@ module.exports = (options = { rules: {}, features: {} }) => { } const webpackConfig = { + mode: 'production', devtool: 'source-map', context: appDirectory, entry: {
chore(webpack): add webpack mode
namics_generator-nitro
train
js,js
547c14b0c1d58ff2ba5e252ee2e6c98ec8bc5e12
diff --git a/build/build-docs.js b/build/build-docs.js index <HASH>..<HASH> 100644 --- a/build/build-docs.js +++ b/build/build-docs.js @@ -534,13 +534,13 @@ function getComponentInfo(one, lang, docs, name) { if (one.events) { // slot title docs += `\n<span class="vux-props-title">Events</span>\n` - docs += `\n| ${t('名字')} | ${t('参数')} | ${t('说明')} | -|-------|-------|-------| + docs += `\n| ${t('名字')} | ${t('参数')} | ${t('说明')} | ${t('版本')} | +|-------|-------|-------|-------| ` for (let i in one.events) { let intro = one.events[i][lang] let params = one.events[i]['params'] - docs += `| ${getKeyHTML(i)} | ${params || '&nbsp;'} | ${intro} |\n` + docs += `| ${getKeyHTML(i)} | ${params || '&nbsp;'} | ${intro} | ${getVersion(one.events[i].version)} |\n` } }
docs: add version for events
airyland_vux
train
js
5dd455fdc727371ace36e4d3f9ab7a52d96fac45
diff --git a/templates/react/es6/grid/grid-editing/files/client/components/__path__/index.js b/templates/react/es6/grid/grid-editing/files/client/components/__path__/index.js index <HASH>..<HASH> 100644 --- a/templates/react/es6/grid/grid-editing/files/client/components/__path__/index.js +++ b/templates/react/es6/grid/grid-editing/files/client/components/__path__/index.js @@ -31,6 +31,7 @@ export default class $(ClassName) extends Component { id="grid-editing" primaryKey="ProductID" width="700px" + autoCommit={true} dataSource={this.state.products} features={$(gridfeatures)} />
fix: Set autoCommit so FIltering works with newly added records.
IgniteUI_igniteui-cli
train
js
316333d40aee04958eae2e1798094887cf3577f1
diff --git a/graphitesend/__init__.py b/graphitesend/__init__.py index <HASH>..<HASH> 100644 --- a/graphitesend/__init__.py +++ b/graphitesend/__init__.py @@ -1 +1 @@ -from graphitesend import * # noqa +from .graphitesend import * # noqa
fix: Init can use relative imports (#<I>) Using a relative import solves a discrepancy between Python <I> and <I>. For some reason, <I> brings all the module objects down to the expected `graphitesend.*` level using an absolute import, while <I> leaves the objects at the `graphitesend.graphitesend.*` level. The relative import will bring everything down to `graphitesend.*` for <I> and <I>.
daniellawrence_graphitesend
train
py
a127198a4b1f46f6b9bf07449fb0bf33319c71dd
diff --git a/lib/utils.js b/lib/utils.js index <HASH>..<HASH> 100644 --- a/lib/utils.js +++ b/lib/utils.js @@ -4,7 +4,7 @@ var _ = require("lodash"); var devIp = require("dev-ip")(); var Immutable = require("immutable"); var portScanner = require("portscanner"); -var filePath = require("path"); +var path = require("path"); var UAParser = require("ua-parser-js"); var parser = new UAParser(); @@ -225,7 +225,7 @@ var utils = { */ willCauseReload: function (needles, haystack) { return needles.some(function (needle) { - return !_.contains(haystack, filePath.extname(needle).replace(".", "")); + return !_.contains(haystack, path.extname(needle).replace(".", "")); }); }, isList: Immutable.List.isList,
fix(utils): rename the confusing variable name `filePath` is used in L<I> - L<I>. And other files are using `path` as a variable name of path module.
BrowserSync_browser-sync
train
js
11072ba940d4351ce6ed0c9ea1dfd432e29565a3
diff --git a/scripts/build-dev-server-client.js b/scripts/build-dev-server-client.js index <HASH>..<HASH> 100644 --- a/scripts/build-dev-server-client.js +++ b/scripts/build-dev-server-client.js @@ -29,7 +29,7 @@ async function bundleDevServerClient() { banner: [ '<meta charset="utf-8">', '💎 Stencil Dev Server', - '<script type="module">', + '<script>', '/* Dev Server Client */' ].join('\n'),
fix(hmr): main script needs to be sync
ionic-team_stencil
train
js
917fbfaf368f2274f0928f8703b15a85a0c7bd6b
diff --git a/lib/fetch/index.js b/lib/fetch/index.js index <HASH>..<HASH> 100644 --- a/lib/fetch/index.js +++ b/lib/fetch/index.js @@ -1597,13 +1597,10 @@ function httpNetworkFetch ( // 2. If aborted, then: function onResponseAborted () { - // 1. Finalize response for fetchParams and response. - finalizeResponse(fetchParams, response) - - // 2. Let aborted be the termination’s aborted flag. + // 1. Let aborted be the termination’s aborted flag. const aborted = this.terminated.aborted - // 3. If aborted is set, then: + // 2. If aborted is set, then: if (aborted) { // 1. Set response’s aborted flag. response.aborted = true @@ -1613,14 +1610,14 @@ function httpNetworkFetch ( this.controller.error(new AbortError()) } } else { - // 4. Otherwise, if stream is readable, error stream with a TypeError. + // 3. Otherwise, if stream is readable, error stream with a TypeError. if (isReadable(stream)) { this.controller.error(new TypeError('terminated')) } } - // 5. If connection uses HTTP/2, then transmit an RST_STREAM frame. - // 6. Otherwise, the user agent should close connection unless it would be bad for performance to do so. + // 4. If connection uses HTTP/2, then transmit an RST_STREAM frame. + // 5. Otherwise, the user agent should close connection unless it would be bad for performance to do so. this.connection.destroy() }
fix: fetch don't finalize on abort
mcollina_undici
train
js
151ac861ed7c49d82ca5eae03ccd627123861853
diff --git a/src/Keboola/Syrup/Controller/ApiController.php b/src/Keboola/Syrup/Controller/ApiController.php index <HASH>..<HASH> 100644 --- a/src/Keboola/Syrup/Controller/ApiController.php +++ b/src/Keboola/Syrup/Controller/ApiController.php @@ -49,10 +49,7 @@ class ApiController extends BaseController $this->checkMappingParams($params); // Create new job - /** @var JobFactory $jobFactory */ - $jobFactory = $this->container->get('syrup.job_factory'); - $jobFactory->setStorageApiClient($this->storageApi); - $job = $jobFactory->create('run', $params); + $job = $this->createJob('run', $params); // Add job to Elasticsearch try { @@ -131,7 +128,6 @@ class ApiController extends BaseController } /** - * @deprecated * @param string $command * @param array $params * @return JobInterface
fix: wrongly deprecated method
keboola_syrup
train
php
bd57e867657469b97bd29913478b7fcb082cfb4d
diff --git a/packages/vaex-core/vaex/groupby.py b/packages/vaex-core/vaex/groupby.py index <HASH>..<HASH> 100644 --- a/packages/vaex-core/vaex/groupby.py +++ b/packages/vaex-core/vaex/groupby.py @@ -170,7 +170,8 @@ class GroupByBase(object): grids[column_name] = values if isinstance(aggregate, vaex.agg.AggregatorDescriptorBasic)\ and aggregate.name == 'AggCount'\ - and aggregate.expression == "*": + and aggregate.expression == "*"\ + and (aggregate.selection is None or aggregate.selection is False): self.counts = values for item in actions:
fix(core): wrong count was reused when using selection, introduced in #<I>
vaexio_vaex
train
py
f1b5640323c9fd420b85198be5177894ab569a46
diff --git a/src/jsonapi.js b/src/jsonapi.js index <HASH>..<HASH> 100644 --- a/src/jsonapi.js +++ b/src/jsonapi.js @@ -46,21 +46,23 @@ function resource({document, model, included}) { const data = document[key] const relationshipModel = model.associations[key].target if (_.isArray(data)) { - relationships[key] = _.map(data, document => { - const id = getId({ - document, - model: relationshipModel - }) - included[id] = resource({ - document, - model: relationshipModel, - included - }) - return resourceIdentifier({ - document, - model: relationshipModel + relationships[key] = { + data: _.map(data, document => { + const id = getId({ + document, + model: relationshipModel + }) + included[id] = resource({ + document, + model: relationshipModel, + included + }) + return resourceIdentifier({ + document, + model: relationshipModel + }) }) - }) + } } else { const id = getId({ document: data, @@ -71,10 +73,12 @@ function resource({document, model, included}) { model: relationshipModel, included }) - return resourceIdentifier({ - document: data, - model: relationshipModel - }) + relationships[key] = { + data: resourceIdentifier({ + document: data, + model: relationshipModel + }) + } } })
fix: single fetch did not return any results
netiam_contrib-rest
train
js
5eae46d8bd3c4cc3531e32814fe487acc97820e4
diff --git a/components/serverless-apollo-service/serverless.js b/components/serverless-apollo-service/serverless.js index <HASH>..<HASH> 100644 --- a/components/serverless-apollo-service/serverless.js +++ b/components/serverless-apollo-service/serverless.js @@ -1,13 +1,13 @@ const { join } = require("path"); const fs = require("fs-extra"); -const { transform } = require("@babel/core"); const prettier = require("prettier"); -const { Component } = require("@serverless/core"); const webpack = require("webpack"); const execa = require("execa"); -const { trackComponent } = require("@webiny/tracking"); const loadJson = require("load-json-file"); const writeJson = require("write-json-file"); +const { transform } = require("@babel/core"); +const { Component } = require("@serverless/core"); +const { trackComponent } = require("@webiny/tracking"); const defaultDependencies = ["date-fns", "mongodb", "@webiny/api", "@webiny/api-security", "babel-loader"]; @@ -30,7 +30,7 @@ class ApolloService extends Component { plugins = [], env = {}, database, - memory = 128, + memory = 512, timeout = 10, description, endpointTypes = ["REGIONAL"],
fix: increase default memory to <I>
Webiny_webiny-js
train
js
3c7d8ab20f9c716652e92065767a5a44ffb21c13
diff --git a/src/util/scroll.js b/src/util/scroll.js index <HASH>..<HASH> 100644 --- a/src/util/scroll.js +++ b/src/util/scroll.js @@ -8,7 +8,8 @@ const positionStore = Object.create(null) export function setupScroll () { // Fix for #1585 for Firefox - window.history.replaceState({ key: getStateKey() }, '') + // Fix for #2195 Add optional third attribute to workaround a bug in safari https://bugs.webkit.org/show_bug.cgi?id=182678 + window.history.replaceState({ key: getStateKey() }, '', window.location.href.replace(window.location.origin, '')) window.addEventListener('popstate', e => { saveScrollPosition() if (e.state && e.state.key) {
fix: workaround replaceState bug in Safari (#<I>) Fix #<I> <!-- Please make sure to read the Pull Request Guidelines: <URL>
vuejs_vue-router
train
js
32dc3e221e364daf0e1638747857590aad1fc302
diff --git a/sample/src/about/about.js b/sample/src/about/about.js index <HASH>..<HASH> 100644 --- a/sample/src/about/about.js +++ b/sample/src/about/about.js @@ -21,7 +21,7 @@ export class About { attached() { // let bridge = System.get(System.normalizeSync('aurelia-materialize-bridge')); // this.version = bridge.version; - this.version = '0.20.6'; + this.version = '0.21.0'; } onSelectionChanged(e) {
chore(sample): bump darn version in about -.-
aurelia-ui-toolkits_aurelia-materialize-bridge
train
js
934723f9fe0f0a44ad161a2f394307d51d5b0aa2
diff --git a/scripts/setupProject.js b/scripts/setupProject.js index <HASH>..<HASH> 100644 --- a/scripts/setupProject.js +++ b/scripts/setupProject.js @@ -12,7 +12,7 @@ const execa = require("execa"); // Build all packages in the "packages" workspace. console.log(`🏗 Building packages...`); try { - await execa("yarn", ["webiny", "workspaces", "run", "build", "--env", "dev"], { + await execa("yarn", ["webiny", "workspaces", "run", "build", "--folder", "packages", "--env", "dev"], { stdio: "inherit" }); console.log(`✅️ Packages were built successfully!`);
fix: build only the packages folder during setup-project
Webiny_webiny-js
train
js
58df3fa435230c7f8d218f23580b6a45454c297d
diff --git a/lib/plugins/index.js b/lib/plugins/index.js index <HASH>..<HASH> 100644 --- a/lib/plugins/index.js +++ b/lib/plugins/index.js @@ -935,8 +935,6 @@ pluginMgr.getResRules = function(req, res, callback) { getRulesMgr('resRules', req, res, function(pluginRulesMgr) { if (!pluginRulesMgr && resScriptRules) { pluginRulesMgr = parseRulesList(req, resScriptRules, true); - req.curUrl = req.fullUrl; - util.mergeRules(req, pluginRulesMgr.resolveRules(req), true); } req.resScriptRules = resScriptRules = null; callback(pluginRulesMgr);
fix: repetitive injection res rules
avwo_whistle
train
js
905b82d97b603c463b2ade300e8f07e0d172253b
diff --git a/src/org/nutz/dao/impl/NutDao.java b/src/org/nutz/dao/impl/NutDao.java index <HASH>..<HASH> 100644 --- a/src/org/nutz/dao/impl/NutDao.java +++ b/src/org/nutz/dao/impl/NutDao.java @@ -1186,11 +1186,6 @@ public class NutDao extends DaoSupport implements Dao { .setAfter(_pojo_fetchInt); expert.formatQuery(pojo); _exec(pojo); - List<T> list = pojo.getList(classOfT); - if (list != null && list.size() > 0) - for (T t : list) { - _fetchLinks(t, regex, false, true, true, null); - } return pojo.getInt(0); }
fix: countByJoin没做对
nutzam_nutz
train
java