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
cc4311e7ab46807feda235c35121f6bfaf28ed67
diff --git a/lib/client-stream.js b/lib/client-stream.js index <HASH>..<HASH> 100644 --- a/lib/client-stream.js +++ b/lib/client-stream.js @@ -102,7 +102,7 @@ class StreamRequest extends Request { _onBody (chunk, offset, length) { return this.res ? this.res.write(chunk.slice(offset, offset + length)) - : true + : null } _onComplete (trailers) {
fix: stream without dst is aborted payload
mcollina_undici
train
js
85b692310655dbeb4f1c185189a734894556c552
diff --git a/qa/integration-tests-engine/src/test/java/org/camunda/bpm/integrationtest/deployment/jar/TestJarDeployment.java b/qa/integration-tests-engine/src/test/java/org/camunda/bpm/integrationtest/deployment/jar/TestJarDeployment.java index <HASH>..<HASH> 100644 --- a/qa/integration-tests-engine/src/test/java/org/camunda/bpm/integrationtest/deployment/jar/TestJarDeployment.java +++ b/qa/integration-tests-engine/src/test/java/org/camunda/bpm/integrationtest/deployment/jar/TestJarDeployment.java @@ -62,6 +62,7 @@ public class TestJarDeployment extends AbstractFoxPlatformIntegrationTest { .addAsWebInfResource(EmptyAsset.INSTANCE, "beans.xml") .addAsLibraries(DeploymentHelper.getEngineCdi()) .addClass(TestJarDeployment.class) + .addClass(AbstractFoxPlatformIntegrationTest.class) .addAsLibraries(purgeDatabaseServlet()); DEPLOYMENT_NAMES.add("purge");
fix(qa): add abstract class to war related to #CAM-<I>
camunda_camunda-bpm-platform
train
java
fd97e877cec6397cccf0e2bb2d1bfb5d71bdd798
diff --git a/lib/Serverless.js b/lib/Serverless.js index <HASH>..<HASH> 100644 --- a/lib/Serverless.js +++ b/lib/Serverless.js @@ -87,7 +87,10 @@ class Serverless { this._shouldReportMissingServiceDeprecation = true; } const commands = ensureArray(configObject.commands, { isOptional: true }); - const options = ensurePlainObject(configObject.options, { isOptional: true }); + let options = ensurePlainObject(configObject.options, { isOptional: true }); + // This is a temporary workaround to ensure that original `options` are not mutated + // Should be removed after addressing: https://github.com/serverless/serverless/issues/2582 + if (options) options = { ...options }; if (!commands || !options) { this._shouldReportCommandsDeprecation = true; this.processedInput = resolveCliInput();
refactor: Ensure that `options` are copied in Serverless constructor
serverless_serverless
train
js
d8c56c46fd46ae39c2a940c44fef7b1e271f3225
diff --git a/lib/templates/plugin.js b/lib/templates/plugin.js index <HASH>..<HASH> 100644 --- a/lib/templates/plugin.js +++ b/lib/templates/plugin.js @@ -79,6 +79,23 @@ const Client = { Vue.prototype.$storybridge.proxy = window.storyblok cb() }) + }, + resolveRelations: function (relationsToResolve, cb) { + var options = options || {} + options.accessToken = '<%= options.accessToken %>' + <% if (options.customParent) { %>options.customParent = '<%= options.customParent %>'<% } %> + + this.load(() => { + const sb = window.storyblok + sb.init(options) + sb.on('input', (data) => { + sb.addComments(data.story.content, data.story.id) + + sb.resolveRelations(data.story, relationsToResolve, (event) => { + cb(data) + }) + }) + }) } } }
feat: add resolveRelations method in $storybridge
storyblok_storyblok-nuxt
train
js
b215f9594579a70f8e25807b40c22d3ccc25255d
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 @@ -594,7 +594,7 @@ function requestRules(options, callback, retryCount) { if (err && retryCount < 5) { return requestRules(options, callback, ++retryCount); } - if (res.statusCode == 304) { + if (res && res.statusCode == 304) { return callback(false, null, null, null, res); } body = body && body.trim(); diff --git a/lib/util/http-mgr.js b/lib/util/http-mgr.js index <HASH>..<HASH> 100644 --- a/lib/util/http-mgr.js +++ b/lib/util/http-mgr.js @@ -62,7 +62,7 @@ function request(options, callback) { err && client.abort(); if (!done) { done = true; - callback(err, body, res); + callback(err, body, res || ''); } }; var addTimeout = function() {
refactor: http-mgr
avwo_whistle
train
js,js
c818e94a082887b5ae66080dedb6364595981c3b
diff --git a/packages/components-react/stories/BaseButton.js b/packages/components-react/stories/BaseButton.js index <HASH>..<HASH> 100644 --- a/packages/components-react/stories/BaseButton.js +++ b/packages/components-react/stories/BaseButton.js @@ -1,6 +1,6 @@ import React from 'react'; import { action, storiesOf } from '@storybook/react'; -import BaseButton from '../src/components/Button/BaseButton'; +import { BaseButton } from '../src'; storiesOf('BaseButton', module) .addWithInfo( diff --git a/packages/components-react/stories/Gallery.js b/packages/components-react/stories/Gallery.js index <HASH>..<HASH> 100644 --- a/packages/components-react/stories/Gallery.js +++ b/packages/components-react/stories/Gallery.js @@ -1,6 +1,6 @@ import React from 'react'; import { storiesOf } from '@storybook/react'; -import Gallery from '../src/components/Gallery/Gallery'; +import { Gallery } from '../src'; const galleryImages = [ {
fix(storybook): adjust imports to match new exports
mcmakler_components
train
js,js
6add1d880687ef847d0117bafcbc0c4daba13c10
diff --git a/src/updater.js b/src/updater.js index <HASH>..<HASH> 100644 --- a/src/updater.js +++ b/src/updater.js @@ -38,7 +38,11 @@ const initialState: OfflineState = { receipts: [], retryToken: 0, retryCount: 0, - retryScheduled: false + retryScheduled: false, + netInfo: { + isConnectionExpensive: null, + reach: 'NONE' + } }; // @TODO: the typing of this is all kinds of wack
fix: includes netInfo in initialState
redux-offline_redux-offline
train
js
d51597d1c109782310a4f1f35f8da44bd62d5b86
diff --git a/packages/site/pages/components/dropdown.js b/packages/site/pages/components/dropdown.js index <HASH>..<HASH> 100644 --- a/packages/site/pages/components/dropdown.js +++ b/packages/site/pages/components/dropdown.js @@ -63,7 +63,7 @@ class InAppExample extends React.Component { >{`class InAppExample extends React.Component { constructor() { super() - this.state = { value: null } + this.state = { value: 'int' } } render() { const options = [ @@ -75,7 +75,10 @@ class InAppExample extends React.Component { <div> <Dropdown label="Level" - placeholder="Select" + placeholder={ + options.find(opt => opt.value === this.state.value).label || + 'Select' + } menu={ <ActionMenu> {options.map(opt => (
fix(site): match code to working example of dropdown
pluralsight_design-system
train
js
2fc7e399340707c2153db814b2bd0dd8bb13e0fc
diff --git a/go/vt/vtgate/planbuilder/plancontext/vschema.go b/go/vt/vtgate/planbuilder/plancontext/vschema.go index <HASH>..<HASH> 100644 --- a/go/vt/vtgate/planbuilder/plancontext/vschema.go +++ b/go/vt/vtgate/planbuilder/plancontext/vschema.go @@ -65,7 +65,7 @@ func PlannerNameToVersion(s string) (PlannerVersion, bool) { case "gen4fallback": return querypb.ExecuteOptions_Gen4WithFallback, true case "gen4comparev3": - return querypb.ExecuteOptions_V3, true + return querypb.ExecuteOptions_Gen4CompareV3, true } return 0, false }
feat: return the correct planner version for the string gen4comparev3
vitessio_vitess
train
go
9a0bb35b9e3e6fdccb4ad604e241063e8fbb036a
diff --git a/src/lib/matches.js b/src/lib/matches.js index <HASH>..<HASH> 100644 --- a/src/lib/matches.js +++ b/src/lib/matches.js @@ -5,5 +5,5 @@ export default function matches(str, pattern, modifiers) { if (Object.prototype.toString.call(pattern) !== '[object RegExp]') { pattern = new RegExp(pattern, modifiers); } - return pattern.test(str); + return !!str.match(pattern); }
fix(matches): prevent regex state from breaking following validations (#<I>)
chriso_validator.js
train
js
e7d0d3421e59d9964c8dde5fe01e08c2f58b5e6a
diff --git a/src/index.js b/src/index.js index <HASH>..<HASH> 100644 --- a/src/index.js +++ b/src/index.js @@ -126,10 +126,10 @@ export function getLogger(id : string) : Logger{ } interface Appender { - debug(logger : Logger, ...rest : any[]) : void; - info(logger : Logger, ...rest : any[]) : void; - warn(logger : Logger, ...rest : any[]) : void; - error(logger : Logger, ...rest : any[]) : void; + //debug(logger : Logger, ...rest : any[]) : void; + //info(logger : Logger, ...rest : any[]) : void; + //warn(logger : Logger, ...rest : any[]) : void; + //error(logger : Logger, ...rest : any[]) : void; } /**
fix(index): remove methods from interfaces
aurelia_logging
train
js
d7ed1627e270a8267f1d516f43f8fa3236e9a618
diff --git a/lib/commands/gesture.js b/lib/commands/gesture.js index <HASH>..<HASH> 100644 --- a/lib/commands/gesture.js +++ b/lib/commands/gesture.js @@ -130,6 +130,10 @@ commands.performActions = async function performActions (actions) { return await this.proxyCommand('/actions', 'POST', {actions: preprocessedActions}); }; +commands.releaseActions = function releaseActions () { + log.warn('On this platform, releaseActions is a no-op'); +}; + commands.performTouch = async function performTouch (gestures) { log.debug(`Received the following touch action: ${gesturesChainToString(gestures)}`); try { diff --git a/test/unit/commands/gesture-specs.js b/test/unit/commands/gesture-specs.js index <HASH>..<HASH> 100644 --- a/test/unit/commands/gesture-specs.js +++ b/test/unit/commands/gesture-specs.js @@ -400,3 +400,10 @@ describe('gesture commands', function () { }); }); }); + +describe('W3C actions', function () { + const driver = new XCUITestDriver(); + it('releaseActions should exist and do nothing', async function () { + await driver.releaseActions(); + }); +});
feat: add release actions as a no-op command
appium_appium-xcuitest-driver
train
js,js
ee7c8c624ff5a8cdc3a260f6c98d176dac62b174
diff --git a/packages/xgplayer/src/player.js b/packages/xgplayer/src/player.js index <HASH>..<HASH> 100755 --- a/packages/xgplayer/src/player.js +++ b/packages/xgplayer/src/player.js @@ -6,6 +6,7 @@ import Errors from './error' import Draggabilly from 'draggabilly' import {getAbsoluteURL} from './utils/url' import downloadUtil from 'downloadjs' +import allOff from 'event-emitter/all-off' import { version @@ -326,7 +327,7 @@ class Player extends Proxy { delete this[k] // } } - this.off('pause', destroyFunc) + allOff(this) } if (!this.paused) { @@ -459,6 +460,8 @@ class Player extends Proxy { if (['pc', 'tablet', 'mobile'].some(type => type === name)) { if (name === sniffer.device) { setTimeout(() => { + // if destroyed, skip + if (!self.video) return; descriptor.call(self, self) }, 0) }
fix: cleanup all listeners and skip some call if destroyed
bytedance_xgplayer
train
js
259231ed682694bc50f3757144789d898d06acdb
diff --git a/lib/sdam/topology.js b/lib/sdam/topology.js index <HASH>..<HASH> 100644 --- a/lib/sdam/topology.js +++ b/lib/sdam/topology.js @@ -291,7 +291,16 @@ class Topology extends EventEmitter { * @return {Server} An instance of a `Server` meeting the criteria of the predicate provided */ selectServer(selector, options, callback) { - if (typeof options === 'function') (callback = options), (options = {}); + if (typeof options === 'function') { + callback = options; + if (typeof selector !== 'function') { + options = selector; + selector = readPreferenceServerSelector(options.readPreference); + } else { + options = {}; + } + } + options = Object.assign( {}, { serverSelectionTimeoutMS: this.s.serverSelectionTimeoutMS },
fix(topology): correctly pick up command options for cursors The cursor code also uses `selectServers` but passes its options in as the first parameter, rather than a server selector.
mongodb-js_mongodb-core
train
js
e3df9157b9975ae527499ff3800660b45dcc1670
diff --git a/core/src/elements/ons-toast/ascend-animator.js b/core/src/elements/ons-toast/ascend-animator.js index <HASH>..<HASH> 100644 --- a/core/src/elements/ons-toast/ascend-animator.js +++ b/core/src/elements/ons-toast/ascend-animator.js @@ -154,6 +154,6 @@ export default class AscendToastAnimator extends ToastAnimator { _findSiblingControlComponent(toast) { const query = e => /(ons-page|ons-navigator|ons-tabbar|ons-splitter)/i.test(e.tagName); - return util.findChild(toast.parentNode, query); + return util.findChild(toast.parentNode, query) || util.findChild(document.body.children[0], query); } }
fix(ons-toast): Added Ascend animator fix for some bindings.
OnsenUI_OnsenUI
train
js
143fed72dc2b50668ec01df7a52c6c51e68bd400
diff --git a/lib/options.js b/lib/options.js index <HASH>..<HASH> 100644 --- a/lib/options.js +++ b/lib/options.js @@ -48,9 +48,9 @@ function defaultOptions() { sessionAge: TWO_DAYS, adminAuthentication: process.env.ADMIN_AUTHENTICATION || 'unsecure', ui: {}, - importFile: undefined, - importKeepExisting: false, - dropBeforeImport: false, + importFile: process.env.IMPORT_FILE, + importKeepExisting: process.env.IMPORT_KEEP_EXISTING || false, + dropBeforeImport: process.env.IMPORT_DROP_BEFORE_IMPORT || false, getLogger: defaultLogProvider, customContextFields: [], disableDBMigration: false,
fix: add import options as part of environment variables closes <URL>
Unleash_unleash
train
js
3b72deccf56af00028027d264e05696abdfe654d
diff --git a/src/server.js b/src/server.js index <HASH>..<HASH> 100644 --- a/src/server.js +++ b/src/server.js @@ -107,7 +107,7 @@ class Server { } use(...args) { - if (args.length === 1 && args[0] instanceof Resource) { + if (args[0] instanceof Resource) { this._resources.push(args[0]); return; }
fix(core): remove args length check, because it will get mistake in map function.
TossShinHwa_node-odata
train
js
a61bc461751871653b3a631f1785eaf8907b1b8e
diff --git a/pyexcelerate/Writer.py b/pyexcelerate/Writer.py index <HASH>..<HASH> 100644 --- a/pyexcelerate/Writer.py +++ b/pyexcelerate/Writer.py @@ -77,10 +77,11 @@ class Writer(object): for index, sheet in self.workbook.get_xml_data(): sheetStream = self._worksheet_template.generate({"worksheet": sheet}) try: - with zf.open("xl/worksheets/sheet%s.xml" % (index), mode="w") as f: + with zf.open("xl/worksheets/sheet%s.xml" % (index), mode="w", force_zip64=True) as f: for s in sheetStream: f.write(s.encode("utf-8")) - except RuntimeError: + except RuntimeError as e: + print("received error when writing zip file", e) tfd, tfn = tempfile.mkstemp() tf = os.fdopen(tfd, "wb") for s in sheetStream:
fix: add force_zip<I>=True and some debugging (#<I>)
kz26_PyExcelerate
train
py
9d9726fccde064a2d9e400ff356e31813a69b8f6
diff --git a/src/qtism/data/storage/xml/Utils.php b/src/qtism/data/storage/xml/Utils.php index <HASH>..<HASH> 100644 --- a/src/qtism/data/storage/xml/Utils.php +++ b/src/qtism/data/storage/xml/Utils.php @@ -208,14 +208,12 @@ class Utils public static function escapeXmlSpecialChars($string, $isAttribute = false) { if ($isAttribute === false) { - $fullSearch = ['"', "'", '<', '>']; - $fullReplace = ['&quot;', '&apos;', '&lt;', '&gt;']; - $string = str_replace('&', '&amp;', $string); + $fullSearch = ['&', '"', "'", '<', '>']; + $fullReplace = ['&amp;', '&quot;', '&apos;', '&lt;', '&gt;']; $string = str_replace($fullSearch, $fullReplace, $string); return $string; } else { - $string = str_replace('&', '&amp;', $string); - $string = str_replace('"', '&quot;', $string); + $string = str_replace(['&', '"'], ['&amp;', '&quot;'], $string); return $string; } }
chore: merge multiple `str_replace()` invocations into a single one in `qtism\data\storage\xml\Utils::escapeXmlSpecialChars()`
oat-sa_qti-sdk
train
php
b4ad53b2f4596bc8cc75dc41179b14619043512d
diff --git a/test/functional/ft_5_on_error.rb b/test/functional/ft_5_on_error.rb index <HASH>..<HASH> 100644 --- a/test/functional/ft_5_on_error.rb +++ b/test/functional/ft_5_on_error.rb @@ -380,5 +380,30 @@ class FtOnErrorTest < Test::Unit::TestCase assert_equal 1, logger.log.select { |e| e['action'] == 'fail' }.size end + + # Only to show what's behind :on_error + # + def test_on_error_multi + + pdef = Ruote.process_definition do + sequence :on_error => [ + [ /unknown participant/, 'alpha' ], + [ nil, 'bravo' ] + ] do + nada + end + end + + @engine.register_participant /alpha|bravo/ do |workitem| + @tracer << workitem.participant_name + end + + #@engine.noisy = true + + wfid = @engine.launch(pdef) + @engine.wait_for(wfid) + + assert_equal 'alpha', @tracer.to_s + end end
test: :on_error and multi handlers
jmettraux_ruote
train
rb
233be83ee11862111f60dbf63d9756f0844fc302
diff --git a/commitlint.config.js b/commitlint.config.js index <HASH>..<HASH> 100644 --- a/commitlint.config.js +++ b/commitlint.config.js @@ -1,3 +1,21 @@ module.exports = { extends: ['@commitlint/config-conventional'], + rules: { + 'scope-enum': [ + 2, + 'always', + [ + 'aens', + 'aepp', + 'chain', + 'channel', + 'compiler', + 'contract', + 'node', + 'oracle', + 'tx-builder', + 'wallet', + ], + ], + }, };
chore: limit scopes that can be used in commit messages
aeternity_aepp-sdk-js
train
js
11cc4ead4b4719a68b1ec9b17d19ecefd8101dca
diff --git a/ruby/server/lib/roma/romad.rb b/ruby/server/lib/roma/romad.rb index <HASH>..<HASH> 100644 --- a/ruby/server/lib/roma/romad.rb +++ b/ruby/server/lib/roma/romad.rb @@ -511,6 +511,8 @@ module Roma @stats.run_storage_clean_up stop_clean_up end + rescue Exception =>e + @log.error("#{e}\n#{$@}") end def timer_event_10sec
fix:add rescue in timer_event_1sec
roma_roma
train
rb
06398a3adacee5aebe3992806da1ddc7ec4db653
diff --git a/test/functional/find_tests.js b/test/functional/find_tests.js index <HASH>..<HASH> 100644 --- a/test/functional/find_tests.js +++ b/test/functional/find_tests.js @@ -1951,7 +1951,7 @@ describe('Find', function() { function(err) { test.equal(null, err); - col.find({}, { skip: 1, limit: 1, fields: { _id: 1, b: 0 } }).toArray(function(err) { + col.find({}, { skip: 1, limit: 1, fields: { a: 1, b: 0 } }).toArray(function(err) { test.ok(err instanceof Error); client.close(done); });
test: use a universally supported invalid query MongoDB <I>+ supports projecting an `_id` inverted from another field in a find, like it has previously for aggegate. This changes the query to one that is guaranteed to not be supported
mongodb_node-mongodb-native
train
js
9a64708ed3d4320c7a7e71eac0747428fc3c18f6
diff --git a/packages/@vue/cli-service/lib/commands/serve.js b/packages/@vue/cli-service/lib/commands/serve.js index <HASH>..<HASH> 100644 --- a/packages/@vue/cli-service/lib/commands/serve.js +++ b/packages/@vue/cli-service/lib/commands/serve.js @@ -297,7 +297,7 @@ function checkInContainer () { const fs = require('fs') if (fs.existsSync(`/proc/1/cgroup`)) { const content = fs.readFileSync(`/proc/1/cgroup`, 'utf-8') - return /:\/(lxc|docker)\//.test(content) + return /:\/(lxc|docker|kubepods)\//.test(content) } }
fix(serve): also detect kubernetes containers (#<I>)
vuejs_vue-cli
train
js
ce65339bee64d255088c56d8682f7808b02747a1
diff --git a/src/components/Tile/Tile-story.js b/src/components/Tile/Tile-story.js index <HASH>..<HASH> 100644 --- a/src/components/Tile/Tile-story.js +++ b/src/components/Tile/Tile-story.js @@ -82,7 +82,7 @@ storiesOf('Tile', module) 'Clickable', () => ( <ClickableTile - href={text('Href for clicable UI (href)', 'javascript:void(0)')}> + href={text('Href for clickable UI (href)', 'javascript:void(0)')}> Clickable Tile </ClickableTile> ),
fix(tile): typo in clickable variation knob desc (#<I>)
carbon-design-system_carbon-components-react
train
js
0374228c2761201cf9895d30b34ea869cbc773ea
diff --git a/src/vue/get-children.js b/src/vue/get-children.js index <HASH>..<HASH> 100644 --- a/src/vue/get-children.js +++ b/src/vue/get-children.js @@ -29,6 +29,7 @@ function getChildren(originalSlots = {}, slidesRef, oldSlidesRef) { }; Object.keys(originalSlots).forEach((slotName) => { + if (typeof originalSlots[slotName] !== 'function') return; const els = originalSlots[slotName](); getSlidesFromElements(els, slotName); });
fix(vue): HMR error (#<I>) * fix HMR error in vue this fixes `TypeError: originalSlots[slotName] is not a function` error during HMR in vue by ensuring the function exists. * Update get-children.js
nolimits4web_swiper
train
js
d28a5e207a8213705bb568e838f3f010cbecd917
diff --git a/lib/to-be-skipped.js b/lib/to-be-skipped.js index <HASH>..<HASH> 100644 --- a/lib/to-be-skipped.js +++ b/lib/to-be-skipped.js @@ -41,9 +41,7 @@ function isLeftHandSideOfAssignment(types, nodePath) { } function isChildOfObjectLiteral (types, parentNode) { - return types.isObjectProperty(parentNode) || - types.isObjectMethod(parentNode) || - types.isSpreadProperty(parentNode); + return types.isObjectProperty(parentNode) || types.isObjectMethod(parentNode); } function isObjectLiteralKey (types, parentNode, currentKey) {
refactor(babel7): SpreadProperty is deprecated and removed from Babel7 and does not appear in direct child of Object Literal
power-assert-js_babel-plugin-espower
train
js
f2feca8c08e6b6a46daa2dc9dc7b018571c8db3d
diff --git a/packages/select/src/Select.js b/packages/select/src/Select.js index <HASH>..<HASH> 100644 --- a/packages/select/src/Select.js +++ b/packages/select/src/Select.js @@ -22,12 +22,19 @@ const components = { <span className="sr-only">Toggle Select Options</span> </DropdownIndicator> ), - ClearIndicator: (props) => ( - <ClearIndicator {...props}> +ClearIndicator: (props) => { + const innerProps = { + ...props.innerProps, + role: 'button', + 'aria-hidden': false, + }; + console.log(props); + return ( + <ClearIndicator {...props} innerProps={innerProps} > <CrossIcon /> <span className="sr-only">Clear all selections</span> </ClearIndicator> - ), + )}, Option: (props) => { const innerProps = { ...props.innerProps,
feat(select): added role and aria attributes to clear indicator of select
Availity_availity-react
train
js
9b237b18bc33d3f7c3c5ec59f87d7d0d58bf5696
diff --git a/tests/test_configuration.py b/tests/test_configuration.py index <HASH>..<HASH> 100644 --- a/tests/test_configuration.py +++ b/tests/test_configuration.py @@ -180,6 +180,21 @@ def test_tox_environments_are_ordered(): assert offsets == sorted(offsets, key=lambda key: key[0]) +def test_tox_settings_are_ordered(): + """Tox settings definition should follow common order.""" + tox_ini = open("tox.ini").read() + sections = [] + for l in lines(tox_ini): + if l.startswith("["): + section = [] + sections.append(section) + elif re.match(r"\S", l): + section.append(l.split("=")[0].strip()) + for section in sections: + ordered = Settings().sort(section) + assert section == ordered + + def test_tox_deps_are_ordered(): """Dependencies of tox environments should be in order.""" for deps in tox_config_values("deps"): @@ -320,6 +335,12 @@ class Settings: if kind.is_text: yield name + def sort(self, section): + """Sort list of settings name according to common order.""" + keys = [k[0] for k in self.keys] + offsets = [(keys.index(k), k) for k in section] + return [e[1] for e in sorted(offsets, key=lambda e: e[0])] + def tox_envlist(): """List tox environments using CLI tool."""
test: ensure tox settings are ordered #<I>
dry-python_dependencies
train
py
9b3fadb069fc692176a39c6b9a7556cf8720ee6c
diff --git a/src/main/java/com/bugsnag/Configuration.java b/src/main/java/com/bugsnag/Configuration.java index <HASH>..<HASH> 100644 --- a/src/main/java/com/bugsnag/Configuration.java +++ b/src/main/java/com/bugsnag/Configuration.java @@ -120,7 +120,7 @@ public class Configuration { * @throws IllegalArgumentException if the notify endpoint is empty or null */ public void setEndpoints(String notify, String sessions) throws IllegalArgumentException { - if (notify == null || notify.length() == 0) { + if (notify == null || notify.isEmpty()) { throw new IllegalArgumentException("Notify endpoint cannot be empty or null."); } else { if (delivery instanceof HttpDelivery) { @@ -130,7 +130,7 @@ public class Configuration { } } - boolean invalidSessionsEndpoint = sessions == null || sessions.length() == 0; + boolean invalidSessionsEndpoint = sessions == null || sessions.isEmpty(); String sessionEndpoint = null; if (invalidSessionsEndpoint) {
refactor: use isEmpty rather than length == 0
bugsnag_bugsnag-java
train
java
940fcf2c50beefa82b6af04acf1e70cc29ac154a
diff --git a/src/index.js b/src/index.js index <HASH>..<HASH> 100644 --- a/src/index.js +++ b/src/index.js @@ -189,6 +189,8 @@ function reloadTests(path) { if (loadFile(file)) { // Replace the old test group. top.tests.splice(index, 1, file.group) + } else { + return false } }) } @@ -204,7 +206,9 @@ function reloadAllTests() { top = createContext('', null) top.files = files for (const path in files) { - loadFile(files[path]) + if (!loadFile(files[path])) { + return false + } } }) } @@ -395,6 +399,7 @@ function onFileChange(event, path) { return false } +// Returns false when the file throws an error. function loadFile(file) { toggleCallsites(true) file.group = createContext('', top, file)
fix: prevent rerun if file cannot be loaded
aleclarson_testpass
train
js
c17ac12c2a213a7b6f8c236e81ba5cb2db542fd0
diff --git a/lib/cli.js b/lib/cli.js index <HASH>..<HASH> 100644 --- a/lib/cli.js +++ b/lib/cli.js @@ -251,7 +251,11 @@ while(args.length) { } } -merge(config, require(configPath).config); +if (configPath) { + merge(config, require(configPath).config); +} else { + configDir = "./"; +} merge(config, commandLineConfig); var sauceAccount;
fix(cli): allow running from command line without a config file If all necessary fields are specified (e.g. seleniumAddress and at least one spec), a config file shouldn't be necessary.
angular_protractor
train
js
30fd0eaf9b4abbca6686b07d2f5142c1b6ce55ea
diff --git a/taskqueue/file_queue_api.py b/taskqueue/file_queue_api.py index <HASH>..<HASH> 100644 --- a/taskqueue/file_queue_api.py +++ b/taskqueue/file_queue_api.py @@ -418,7 +418,13 @@ class FileQueueAPI(object): with open(path, 'rt') as f: return f.read() - return ( read(f.path) for f in os.scandir(self.queue_path) ) + for f in os.scandir(self.queue_path): + try: + yield read(f.path) + # It's possible for a task to have been + # deleted in between scanning and reading. + except FileNotFoundError: + continue def __len__(self): return functools.reduce(operator.add, ( 1 for f in os.scandir(self.queue_path) ), 0)
fix(fq): iter dies if file deleted between scan and read
seung-lab_python-task-queue
train
py
0244dd91d93e864a99218c6cce35308447703e95
diff --git a/src/main/java/dtest/actions/ExecuteRegex.java b/src/main/java/dtest/actions/ExecuteRegex.java index <HASH>..<HASH> 100644 --- a/src/main/java/dtest/actions/ExecuteRegex.java +++ b/src/main/java/dtest/actions/ExecuteRegex.java @@ -37,6 +37,8 @@ public class ExecuteRegex extends TestAction { for (int groupNumber = 0; groupNumber <= matcher.groupCount(); groupNumber++) { this.writeOutput(String.format("group%d", groupNumber), matcher.group(groupNumber)); } + } else { + throw new RuntimeException("The regular expression didn't match the specified text."); } } }
fix(ExecuteRegex): properly handle failed match
mcdcorp_opentest
train
java
14308407c5c42d00667f8f535c561589e3e76a5c
diff --git a/src/__tests__/store.js b/src/__tests__/store.js index <HASH>..<HASH> 100644 --- a/src/__tests__/store.js +++ b/src/__tests__/store.js @@ -456,7 +456,7 @@ describe('Store', () => { }); describe('getFacetStats', () => { - test('exepect to return the stats object when last results is set', () => { + test('expect to return the stats object when last results is set', () => { const attributeName = 'price'; const store = createStore(); @@ -478,7 +478,7 @@ describe('Store', () => { ); }); - test('exepect to return an empty object when last results is not set', () => { + test('expect to return an empty object when last results is not set', () => { const attributeName = 'price'; const store = createStore(); @@ -490,7 +490,7 @@ describe('Store', () => { expect(actual).toEqual(expectation); }); - test("exepect to return an empty object when stats don't exist for this attribute", () => { + test("expect to return an empty object when stats don't exist for this attribute", () => { const attributeName = 'price'; const store = createStore();
fix(store): update typo in test
algolia_vue-instantsearch
train
js
adf5b0d13aa8cc8da9b920a773b5067a37ac7fa7
diff --git a/lib/workers/repository/onboarding/pr/index.js b/lib/workers/repository/onboarding/pr/index.js index <HASH>..<HASH> 100644 --- a/lib/workers/repository/onboarding/pr/index.js +++ b/lib/workers/repository/onboarding/pr/index.js @@ -62,6 +62,8 @@ You can post questions in [our Config Help repository](https://github.com/renova } logger.trace('prBody:\n' + prBody); + prBody = platform.getPrBody(prBody); + // Check if existing PR exists const existingPr = await platform.getBranchPr(`renovate/configure`); if (existingPr) {
fix(onboarding): use platform getPrBody
renovatebot_renovate
train
js
fb02ed6b97380ce8308b0edc8a05a6e2830b5043
diff --git a/bin/c8.js b/bin/c8.js index <HASH>..<HASH> 100755 --- a/bin/c8.js +++ b/bin/c8.js @@ -15,7 +15,7 @@ const { const instrumenterArgs = hideInstrumenteeArgs() let argv = buildYargs().parse(instrumenterArgs) -;(async function run () { +async function run () { if ([ 'check-coverage', 'report' ].indexOf(argv._[0]) !== -1) { @@ -33,4 +33,9 @@ let argv = buildYargs().parse(instrumenterArgs) done() }) } -})() +} + +run().catch((err) => { + console.error(err.stack) + process.exitCode = 1 +})
fix: we were not exiting with 1 if mkdir failed (#<I>)
bcoe_c8
train
js
a2c9bd560efea8329df3e1e34966e21271f9334d
diff --git a/test/integration/Encryption.test.js b/test/integration/Encryption.test.js index <HASH>..<HASH> 100644 --- a/test/integration/Encryption.test.js +++ b/test/integration/Encryption.test.js @@ -89,6 +89,7 @@ describe('decryption', () => { const openSockets = Connection.getOpen() if (openSockets !== 0) { + await Connection.closeOpen() throw new Error(`sockets not closed: ${openSockets}`) } })
test: Don't fail subsequent Encryption tests if previous test's sockets not closed.
streamr-dev_streamr-client-javascript
train
js
0c5eb5baafe5f075d4f2a6ba1442bbe20a6372ba
diff --git a/build/config.js b/build/config.js index <HASH>..<HASH> 100644 --- a/build/config.js +++ b/build/config.js @@ -77,7 +77,8 @@ function genConfig (opts) { cssProcessor: require('cssnano'), cssProcessorOptions: { discardComments: { removeAll: true }, - postcssZindex: false + postcssZindex: false, + reduceIdents: false }, canPrint: false })
fix: don't reduce animation keyframes (#<I>)
vuetifyjs_vuetify
train
js
bb3b766946311848c707abc0fc7e749393f4527c
diff --git a/lib/configuration/variables/sources/file.js b/lib/configuration/variables/sources/file.js index <HASH>..<HASH> 100644 --- a/lib/configuration/variables/sources/file.js +++ b/lib/configuration/variables/sources/file.js @@ -169,8 +169,9 @@ module.exports = { throw new ServerlessError( `Cannot resolve "${address}" out of "${path.basename( filePath - )}": Resolved a JS function not confirmed to work with a new parser, ` + - 'falling back to old resolver', + )}": Approached a JS function resolver, confirm it's updated to work with a ` + + 'new parser by setting "variablesResolutionMode: 20210326" in service config. ' + + 'Falling back to old resolver', 'FILE_CONTENT_RESOLUTION_ERROR' ); }
fix(Variables): Unify error messaging for function resolvers
serverless_serverless
train
js
0380df5a843a7fad25fa5ecba73d8c90a9d1b5d2
diff --git a/src/game/creeps.js b/src/game/creeps.js index <HASH>..<HASH> 100644 --- a/src/game/creeps.js +++ b/src/game/creeps.js @@ -1013,7 +1013,7 @@ exports.make = function(_runtimeData, _intents, _register, _globals) { } if(!target || !target.id || !register.structures[target.id] || !(target instanceof globals.Structure) && !(target instanceof globals.StructureSpawn) || - (target instanceof globals.StructurePowerBank)) { + !C.CONSTRUCTION_COST[target.structureType]) { register.assertTargetObject(target); return C.ERR_INVALID_TARGET; }
fix(runtime): Creep.dismantle return code
screeps_engine
train
js
742da8810c36ffbc9a4a872811597c68cd4f77a9
diff --git a/algolia/search/generate_secured_api_key.go b/algolia/search/generate_secured_api_key.go index <HASH>..<HASH> 100644 --- a/algolia/search/generate_secured_api_key.go +++ b/algolia/search/generate_secured_api_key.go @@ -40,7 +40,7 @@ func GenerateSecuredAPIKey(apiKey string, opts ...interface{}) (string, error) { } type securedAPIKeyParams struct { - Filters *opt.FiltersOption `json:"filters,omitempty"` + // Filters is already available through the composition with QueryParams. Referers *opt.ReferersOption `json:"referers,omitempty"` RestrictIndices *opt.RestrictIndicesOption `json:"restrictIndices,omitempty"` RestrictSources *opt.RestrictSourcesOption `json:"restrictSources,omitempty"` @@ -55,7 +55,6 @@ func newSecuredAPIKeyParams(opts ...interface{}) securedAPIKeyParams { validUntilInt = validUntil.Get().Unix() } return securedAPIKeyParams{ - Filters: iopt.ExtractFilters(opts...), Referers: iopt.ExtractReferers(opts...), RestrictIndices: iopt.ExtractRestrictIndices(opts...), RestrictSources: iopt.ExtractRestrictSources(opts...),
fix: remove duplicated Filters field in secured API key
algolia_algoliasearch-client-go
train
go
8167e3c8610b1509dea6fdf6888f3222f7210dd1
diff --git a/src/devtools/index.js b/src/devtools/index.js index <HASH>..<HASH> 100644 --- a/src/devtools/index.js +++ b/src/devtools/index.js @@ -147,7 +147,7 @@ function initApp (shell) { if (index === -1) { store.commit('vuex/UPDATE_BASE_STATE', snapshot) - } else if (store.state.vuex.inspectedIndex === index) { + } else if (store.getters['vuex/absoluteInspectedIndex'] === index) { store.commit('vuex/UPDATE_INSPECTED_STATE', snapshot) } diff --git a/src/devtools/views/vuex/module.js b/src/devtools/views/vuex/module.js index <HASH>..<HASH> 100644 --- a/src/devtools/views/vuex/module.js +++ b/src/devtools/views/vuex/module.js @@ -138,6 +138,14 @@ const getters = { filteredHistory ({ history, filterRegex }) { return history.filter(entry => filterRegex.test(entry.mutation.type)) + }, + + absoluteInspectedIndex ({ history, inspectedIndex }, { filteredHistory }) { + const entry = filteredHistory[inspectedIndex] + if (entry) { + return history.indexOf(entry) + } + return -1 } }
fix(vuex): inspect state not working when history is filtered
vuejs_vue-devtools
train
js,js
84f8f8d88c23590c4b4cc7b8129dc81d8728b667
diff --git a/cmd/influx/task.go b/cmd/influx/task.go index <HASH>..<HASH> 100644 --- a/cmd/influx/task.go +++ b/cmd/influx/task.go @@ -598,7 +598,7 @@ func init() { cmd.MarkFlagRequired("task-id") cmd.MarkFlagRequired("run-id") - taskCmd.AddCommand(cmd) + runCmd.AddCommand(cmd) } func runRetryF(cmd *cobra.Command, args []string) error {
chore(task): move 'task retry' command to 'task run retry' Runs are retried; tasks aren't. Closes #<I>.
influxdata_influxdb
train
go
e1af07bf0c6a1c8f2791a8ecbd1aa0c2001e179c
diff --git a/lib/upgrade.js b/lib/upgrade.js index <HASH>..<HASH> 100644 --- a/lib/upgrade.js +++ b/lib/upgrade.js @@ -82,7 +82,7 @@ function upgradeHandler(req, socket) { // format headers socket.fullUrl = util.getFullUrl(socket).replace('http', 'ws'); var isWs = WS_RE.test(headers.upgrade); - getPluginNameByReq(isWs ? null : req, function(err, uiPort) { + getPluginNameByReq(isWs ? req : null, function(err, uiPort) { if (err) { return socket.write(err); }
feat: support for using websocket to connect plugin ui server
avwo_whistle
train
js
5c4b28adbbbfecbad8db241789a1e72287abf765
diff --git a/src/elements/chips/Chips.js b/src/elements/chips/Chips.js index <HASH>..<HASH> 100644 --- a/src/elements/chips/Chips.js +++ b/src/elements/chips/Chips.js @@ -142,7 +142,16 @@ export class NovoChipsElement extends OutsideClick { } if (noLabels.length > 0 && this.source && this.source.getLabels && typeof this.source.getLabels === 'function') { this.source.getLabels(noLabels).then(result => { - this.items = this.items.concat(result); + for (let value of result) { + if (value.hasOwnProperty('label')) { + this.items.push({ + value, + label: value.label + }); + } else { + this.items.push(value); + } + } this._items.next(this.items); }); }
fix(chips): Fixing Placement
bullhorn_novo-elements
train
js
0b5840e855397af3957914824d36f49d03e3e1fd
diff --git a/gridsome/lib/app/PluginsRunner.js b/gridsome/lib/app/PluginsRunner.js index <HASH>..<HASH> 100644 --- a/gridsome/lib/app/PluginsRunner.js +++ b/gridsome/lib/app/PluginsRunner.js @@ -20,7 +20,11 @@ class Plugins extends EventEmitter { const transformers = mapValues(app.config.transformers, entry => { return new entry.TransformerClass(entry.options, { - queue, cache, nodeCache, localOptions: options[entry.name] || {} + localOptions: options[entry.name] || {}, + context, + queue, + cache, + nodeCache }) })
fix: send context to transofmers
gridsome_gridsome
train
js
aa31434bf90aa398911d27cf8c002429145d88af
diff --git a/src/lib/isIBAN.js b/src/lib/isIBAN.js index <HASH>..<HASH> 100644 --- a/src/lib/isIBAN.js +++ b/src/lib/isIBAN.js @@ -40,6 +40,7 @@ const ibanRegexThroughCountryCode = { IE: /^(IE[0-9]{2})[A-Z0-9]{4}\d{14}$/, IL: /^(IL[0-9]{2})\d{19}$/, IQ: /^(IQ[0-9]{2})[A-Z]{4}\d{15}$/, + IR: /^(IR[0-9]{2})0\d{2}0\d{18}$/, IS: /^(IS[0-9]{2})\d{22}$/, IT: /^(IT[0-9]{2})[A-Z]{1}\d{10}[A-Z0-9]{12}$/, JO: /^(JO[0-9]{2})[A-Z]{4}\d{22}$/, diff --git a/test/validators.js b/test/validators.js index <HASH>..<HASH> 100755 --- a/test/validators.js +++ b/test/validators.js @@ -3825,6 +3825,7 @@ describe('Validators', () => { 'TR320010009999901234567890', 'BR1500000000000010932840814P2', 'LB92000700000000123123456123', + 'IR200170000000339545727003', ], invalid: [ 'XX22YYY1234567890123',
feat(isIBAN): add Iran locale (#<I>)
chriso_validator.js
train
js,js
97748c5e257b158b61e7eab1ae737180d0238301
diff --git a/index.js b/index.js index <HASH>..<HASH> 100644 --- a/index.js +++ b/index.js @@ -106,9 +106,13 @@ async function run(context, plugins) { const commits = await getCommits({...context, lastRelease, nextRelease}); nextRelease.notes = await plugins.generateNotes({...context, commits, lastRelease, nextRelease}); - await tag(nextRelease.gitTag, nextRelease.gitHead, {cwd, env}); - await push(options.repositoryUrl, {cwd, env}); - logger.success(`Created tag ${nextRelease.gitTag}`); + if (options.dryRun) { + logger.warn(`Skip ${nextRelease.gitTag} tag creation in dry-run mode`); + } else { + await tag(nextRelease.gitTag, nextRelease.gitHead, {cwd, env}); + await push(options.repositoryUrl, {cwd, env}); + logger.success(`Created tag ${nextRelease.gitTag}`); + } context.branch.tags.push({ version: nextRelease.version,
fix: do not create tags in dry-run mode for released to add to a channel
semantic-release_semantic-release
train
js
689780a7879c19c92c6c30d56115e418f4b03247
diff --git a/packages/ui-drawer-layout/src/DrawerLayout/index.js b/packages/ui-drawer-layout/src/DrawerLayout/index.js index <HASH>..<HASH> 100644 --- a/packages/ui-drawer-layout/src/DrawerLayout/index.js +++ b/packages/ui-drawer-layout/src/DrawerLayout/index.js @@ -47,7 +47,7 @@ category: components **/ @testable() @bidirectional() -@themeable(styles) +@themeable(null, styles) class DrawerLayout extends Component { static locatorAttribute = 'data-drawer-layout' static propTypes = { diff --git a/packages/ui-layout/src/DrawerLayout/index.js b/packages/ui-layout/src/DrawerLayout/index.js index <HASH>..<HASH> 100644 --- a/packages/ui-layout/src/DrawerLayout/index.js +++ b/packages/ui-layout/src/DrawerLayout/index.js @@ -49,7 +49,7 @@ id: DeprecatedDrawerLayout @deprecated('7.0.0', null, 'Use DrawerLayout from ui-drawer-layout instead.') @testable() @bidirectional() -@themeable(styles) +@themeable(null, styles) class DrawerLayout extends Component { static locatorAttribute = 'data-drawer-layout' static propTypes = {
fix(ui-drawer-layout): Fix no styles applied on root Test plan: - DrawerLayout and DeprecatedDrawerLayout should have the .root class applied to their outermost container again, and scrolling should work. Change-Id: I<I>d<I>e1b<I>d<I>eefbd<I>cf1bce3a<I>d Reviewed-on: <URL>
instructure_instructure-ui
train
js,js
76de33cc4f7dde9e1b930be773add3736851a95e
diff --git a/packages/workbox/index.js b/packages/workbox/index.js index <HASH>..<HASH> 100755 --- a/packages/workbox/index.js +++ b/packages/workbox/index.js @@ -57,17 +57,13 @@ function getOptions (moduleOptions) { modifyUrlPrefix: { '': fixUrl(publicPath) }, + offline: true, _runtimeCaching: [ // Cache all _nuxt resources at runtime // They are hashed by webpack so are safe to loaded by cacheFirst handler { urlPattern: fixUrl(publicPath + '/.*'), handler: 'cacheFirst' - }, - // Cache other routes if offline - { - urlPattern: fixUrl(routerBase + '/.*'), - handler: 'networkFirst' } ], runtimeCaching: [] @@ -75,6 +71,14 @@ function getOptions (moduleOptions) { const options = defaultsDeep({}, this.options.workbox, moduleOptions, defaults) + // Optionally cache other routes for offline + if (options.offline) { + defaults._runtimeCaching.push({ + urlPattern: fixUrl(routerBase + '/.*'), + handler: 'networkFirst' + }) + } + return options }
feat(worbox): add offline option for making it optional (#<I>) Make all-inclusive NetworkFirst route registration optional. Fixes #<I>.
nuxt-community_pwa-module
train
js
bba80ac7b4261b0863dd96e4ed362c93ffba6070
diff --git a/packages/router5/modules/plugins/logger/index.js b/packages/router5/modules/plugins/logger/index.js index <HASH>..<HASH> 100644 --- a/packages/router5/modules/plugins/logger/index.js +++ b/packages/router5/modules/plugins/logger/index.js @@ -1,9 +1,15 @@ /* istanbul ignore next */ /*eslint no-console: 0*/ +const noop = () => {}; function loggerPlugin() { - const startGroup = () => console.group('Router transition'); - const endGroup = () => console.groupEnd('Router transition'); + const supportsGroups = console.group && console.groupEnd; + const startGroup = supportsGroups + ? () => console.group('Router transition') + : noop; + const endGroup = supportsGroups + ? () => console.groupEnd('Router transition') + : noop; console.info('Router started');
fix: only use console groups in logger if available
router5_router5
train
js
e98fa79943ad2e72e2f5d462f2b2ae625d9f24cc
diff --git a/src/foremast/awslambda/api_gateway_event/api_gateway_event.py b/src/foremast/awslambda/api_gateway_event/api_gateway_event.py index <HASH>..<HASH> 100644 --- a/src/foremast/awslambda/api_gateway_event/api_gateway_event.py +++ b/src/foremast/awslambda/api_gateway_event/api_gateway_event.py @@ -79,7 +79,6 @@ class APIGateway: if resource['path'] == self.trigger_settings['resource']: resource_id = resource['id'] self.log.info("Found Resource ID for: %s", resource['path']) - self.attach_method(resource_id) return resource_id, parent_id def add_lambda_integration(self):
refactor: removed redunant call to attach_method
foremast_foremast
train
py
262b57b68554cb467c81b20d1ff72dfec8818c2a
diff --git a/lib/util/index.js b/lib/util/index.js index <HASH>..<HASH> 100644 --- a/lib/util/index.js +++ b/lib/util/index.js @@ -804,7 +804,7 @@ exports.getQueryValue = function(value) { return value || ''; }; -var KV_RE = /^([^:=&]+):([^=&]+)$/; +var KV_RE = /^([^:=&]+):([^=&]*)$/; function parseInlineJSON(text, isValue) { if (/\s/.test(text) || (!isValue && (/\\|\//.test(text) && !/^&/.test(text)))) {
refactor: parse json
avwo_whistle
train
js
cebff83d0ca0b6f556fd761ec43f58415cff8ddb
diff --git a/superset-frontend/jest.config.js b/superset-frontend/jest.config.js index <HASH>..<HASH> 100644 --- a/superset-frontend/jest.config.js +++ b/superset-frontend/jest.config.js @@ -18,7 +18,8 @@ */ module.exports = { - testRegex: '\\/(spec|src|plugins|packages)\\/.*(_spec|\\.test)\\.[jt]sx?$', + testRegex: + '\\/superset-frontend\\/(spec|src|plugins|packages)\\/.*(_spec|\\.test)\\.[jt]sx?$', moduleNameMapper: { '\\.(css|less|geojson)$': '<rootDir>/spec/__mocks__/mockExportObject.js', '\\.(gif|ttf|eot|png|jpg)$': '<rootDir>/spec/__mocks__/mockExportString.js',
fix(jest): add superset-frontend to testRegex (#<I>)
apache_incubator-superset
train
js
9acca4c8bcf9130e4d6da985e383840d62c4fca6
diff --git a/packages/cli-plugin-deploy-components/aws/index.js b/packages/cli-plugin-deploy-components/aws/index.js index <HASH>..<HASH> 100644 --- a/packages/cli-plugin-deploy-components/aws/index.js +++ b/packages/cli-plugin-deploy-components/aws/index.js @@ -13,9 +13,13 @@ module.exports = { .promise() .then((result, err) => { if (err) { - console.log(err); + console.err(`The following error occured: ${err}.`); + console.log(`Please to refer to the following link for setting up credentials: + Please to refer to the following link for setting up aws credentials: + https://docs.webiny.com/docs/guides/aws-credentials/ + `); } else { - console.log("PROMISE RESULT::::::"); + console.log("Your AWS data is set!"); console.log(result); } });
fix: setting error message with like to webiny aws set up page
Webiny_webiny-js
train
js
ad9fe09e70cbf506ec7689858dbba1baba22fc6e
diff --git a/dsl/pact.go b/dsl/pact.go index <HASH>..<HASH> 100644 --- a/dsl/pact.go +++ b/dsl/pact.go @@ -412,9 +412,16 @@ func (p *Pact) VerifyProvider(t *testing.T, request types.VerifyRequest) (types. for _, example := range res.Examples { t.Run(example.Description, func(st *testing.T) { st.Log(example.FullDescription) + if example.Status != "passed" { - t.Errorf("%s\n%s\n", example.FullDescription, example.Exception.Message) + if strings.Contains(example.FullDescription, "[PENDING]") { + t.Logf("NOTICE: This interaction is in a pending state because it has not yet been successfully verified by %s. If this verification fails, it will not cause the overall build to fail. Read more at https://pact.io/pending", p.Provider) + t.Logf("%s\n%s\n", example.FullDescription, example.Exception.Message) + } else { + t.Errorf("%s\n%s\n", example.FullDescription, example.Exception.Message) + } } + }) }
feat(pending): support initial pending pacts implementation
pact-foundation_pact-go
train
go
99dc3cd95b4b9d03277c78c3ff02b0446414f907
diff --git a/aioboto3/session.py b/aioboto3/session.py index <HASH>..<HASH> 100644 --- a/aioboto3/session.py +++ b/aioboto3/session.py @@ -124,7 +124,7 @@ class Session(boto3.session.Session): config = AioConfig(user_agent_extra='Resource') # client = blah part has been moved into a dodgy context class - return ResourceCreaterContext(self, service_name, region_name, api_version, + return ResourceCreatorContext(self, service_name, region_name, api_version, use_ssl, verify, endpoint_url, aws_access_key_id, aws_secret_access_key, aws_session_token, config, resource_model) @@ -175,7 +175,7 @@ class Session(boto3.session.Session): event_emitter=self.events)) -class ResourceCreaterContext(object): +class ResourceCreatorContext(object): def __init__(self, session, service_name, region_name, api_version, use_ssl, verify, endpoint_url, aws_access_key_id, aws_secret_access_key, aws_session_token, config, resource_model):
fix: grammatical error in class name
terrycain_aioboto3
train
py
79f0ce6f8f2ec51e9cca947f6cc05437154feba4
diff --git a/wordOverlap.js b/wordOverlap.js index <HASH>..<HASH> 100644 --- a/wordOverlap.js +++ b/wordOverlap.js @@ -27,9 +27,7 @@ function removeCommonWords(words) { } function getWordsWithMinLen(minLen, word) { - if (word.length >= minLen) { - return true; - } + return word.length >= minLen; } if (process.env.NODE_ENV === 'test') {
refactor: simpler conditional #5
sayanee_word-overlap
train
js
78408bb05fe09d7882017753d813dfb11b48262d
diff --git a/demos/ready.js b/demos/ready.js index <HASH>..<HASH> 100644 --- a/demos/ready.js +++ b/demos/ready.js @@ -79,7 +79,7 @@ window.demoReady = (function(root) { return; } - const elapsedTimeMs = Date.now() - startTimeMs; + var elapsedTimeMs = Date.now() - startTimeMs; if (elapsedTimeMs > POLL_MAX_WAIT_MS) { clearInterval(pollTimer); removeDetectionDom();
fix: Use `var` instead of `const` in demos/ready.js (#<I>) Safari 9.x and IE <I> do not support `const`, and `ready.js` is not transpiled to ES5.
material-components_material-components-web
train
js
5082ff51e67a12233465d1069c60171aae6205d4
diff --git a/packages/midway-bin/lib/cmd/dev.js b/packages/midway-bin/lib/cmd/dev.js index <HASH>..<HASH> 100644 --- a/packages/midway-bin/lib/cmd/dev.js +++ b/packages/midway-bin/lib/cmd/dev.js @@ -9,14 +9,20 @@ class DevCommand extends require('egg-bin/lib/cmd/dev') { * run(context) { if (!context.argv.framework) { - if (require.resolve('midway')) { - context.argv.framework = 'midway'; - } else if (require.resolve('midway-mirror')) { - context.argv.framework = 'midway-mirror'; - } + context.argv.framework = this.findFramework('midway') || this.findFramework('midway-mirror'); } yield super.run(context); } + + findFramework(module) { + try { + if (require.resolve(module)) { + return module; + } + } catch (err) { + console.log(`Not found framework ${module} and skip.`); + } + } } module.exports = DevCommand;
chore: refactor for find framework code
midwayjs_midway
train
js
ba4d2d470805d8bbd41bd43bf83f5480ed395c98
diff --git a/authz.go b/authz.go index <HASH>..<HASH> 100644 --- a/authz.go +++ b/authz.go @@ -4,7 +4,7 @@ import ( "errors" "fmt" "os" - "path/filepath" + "path" "github.com/influxdata/influxdb/v2/kit/platform" errors2 "github.com/influxdata/influxdb/v2/kit/platform/errors" @@ -84,15 +84,15 @@ type Resource struct { // String stringifies a resource func (r Resource) String() string { if r.OrgID != nil && r.ID != nil { - return filepath.Join(string(OrgsResourceType), r.OrgID.String(), string(r.Type), r.ID.String()) + return path.Join(string(OrgsResourceType), r.OrgID.String(), string(r.Type), r.ID.String()) } if r.OrgID != nil { - return filepath.Join(string(OrgsResourceType), r.OrgID.String(), string(r.Type)) + return path.Join(string(OrgsResourceType), r.OrgID.String(), string(r.Type)) } if r.ID != nil { - return filepath.Join(string(r.Type), r.ID.String()) + return path.Join(string(r.Type), r.ID.String()) } return string(r.Type)
fix: use consistent path separator in permission string representation (#<I>)
influxdata_influxdb
train
go
120780605bf919ebdd1a8f877d9e4b345b53b143
diff --git a/internal/pipe/nfpm/nfpm.go b/internal/pipe/nfpm/nfpm.go index <HASH>..<HASH> 100644 --- a/internal/pipe/nfpm/nfpm.go +++ b/internal/pipe/nfpm/nfpm.go @@ -197,6 +197,9 @@ func create(ctx *context.Context, fpm config.NFPM, format string, binaries []*ar contents = append(contents, &files.Content{ Source: filepath.ToSlash(src), Destination: filepath.ToSlash(dst), + FileInfo: &files.ContentFileInfo{ + Mode: 0o755, + }, }) } }
fix: nfpm binaries should have <I> instead of <I> perms (#<I>)
goreleaser_goreleaser
train
go
b2328f0ccd3b48d28af622330d053485a9a5ffe2
diff --git a/packages/site/pages/roadmap.js b/packages/site/pages/roadmap.js index <HASH>..<HASH> 100644 --- a/packages/site/pages/roadmap.js +++ b/packages/site/pages/roadmap.js @@ -47,6 +47,10 @@ const work = { ], future: [ { + title: 'Drawer', + tags: ['Component'] + }, + { title: 'Tooltip / Popover', tags: ['Component'] },
refactor(site): update roadmap
pluralsight_design-system
train
js
ef1a609f7c801ec0cb1adccc161ed11029af3e00
diff --git a/src/View/Helper/CrudViewHelper.php b/src/View/Helper/CrudViewHelper.php index <HASH>..<HASH> 100644 --- a/src/View/Helper/CrudViewHelper.php +++ b/src/View/Helper/CrudViewHelper.php @@ -95,12 +95,8 @@ class CrudViewHelper extends Helper * @param string $field The field to extract, if null, the field from the entity context is used. * @return mixed */ - public function fieldValue(Entity $data = null, $field = null) + public function fieldValue(Entity $data, $field) { - if (empty($field)) { - $field = $this->field(); - } - if (empty($data)) { $data = $this->getContext(); }
fix: remove broken ability to omit the field or entity
FriendsOfCake_crud-view
train
php
1fb4044b4484a269ddfd7e60bb78ac65fda53d92
diff --git a/system/CodeIgniter.php b/system/CodeIgniter.php index <HASH>..<HASH> 100644 --- a/system/CodeIgniter.php +++ b/system/CodeIgniter.php @@ -326,6 +326,7 @@ class CodeIgniter $this->response->pretend($this->useSafeOutput)->send(); $this->callExit(EXIT_SUCCESS); + return; } try @@ -343,6 +344,7 @@ class CodeIgniter $this->sendResponse(); $this->callExit(EXIT_SUCCESS); + return; } catch (PageNotFoundException $e) {
refactor: add return not to run code below when testing
codeigniter4_CodeIgniter4
train
php
ac5e522abb4e4b4c0e706a33a95410fd9c702848
diff --git a/packages/bin-sauce-connect/src/start.js b/packages/bin-sauce-connect/src/start.js index <HASH>..<HASH> 100644 --- a/packages/bin-sauce-connect/src/start.js +++ b/packages/bin-sauce-connect/src/start.js @@ -8,7 +8,7 @@ import rm from './lib/rm'; const mkdirp = denodeify(_mkdirp); -const SAUCE_CONNECT_VERSION = `4.3.16`; +const SAUCE_CONNECT_VERSION = `4.4.1`; (async function run() { try {
chore(tooling): use latest sauce connect
webex_spark-js-sdk
train
js
6dd29494e3240b51fbb05c1e83a6551a15c929d6
diff --git a/src/nodes/Time.js b/src/nodes/Time.js index <HASH>..<HASH> 100644 --- a/src/nodes/Time.js +++ b/src/nodes/Time.js @@ -187,7 +187,7 @@ class Time extends EventsHaNode { } createCronjob(crontab) { - const node = this; + const node = this.node; this.cronjob = new CronJob({ cronTime: crontab, onTick: () => {
refactor(time): use correct node reference
zachowj_node-red-contrib-home-assistant-websocket
train
js
0cd22a3aee0b0e5fc13ab660c3ef99712c99c23b
diff --git a/test/conditions.js b/test/conditions.js index <HASH>..<HASH> 100644 --- a/test/conditions.js +++ b/test/conditions.js @@ -479,7 +479,7 @@ describe("Download conditions", function() { crawler.addDownloadCondition(function(queueItem, response, callback) { setTimeout(function() { - callback(false); + callback(null, false); }, 10); }); @@ -512,7 +512,7 @@ describe("Download conditions", function() { var crawler = makeCrawler("http://127.0.0.1:3000"); crawler.addDownloadCondition(function(queueItem, response, callback) { - callback(false); + callback(null, false); }); crawler.on("downloadprevented", function(queueItem, response) {
test: fix tests for async 3.x
simplecrawler_simplecrawler
train
js
269f4295f725c67f6d4c804e2245ded904b85156
diff --git a/packages/icon-build-helpers/src/builders/vue/utils.js b/packages/icon-build-helpers/src/builders/vue/utils.js index <HASH>..<HASH> 100644 --- a/packages/icon-build-helpers/src/builders/vue/utils.js +++ b/packages/icon-build-helpers/src/builders/vue/utils.js @@ -16,6 +16,7 @@ function getVueExport(key) { } const h = getVueExport('h'); +const createApp = getVueExport('createApp'); const getSvgAttrs = (title, svgAttrs, componentAttrs) => { return getAttributes({ @@ -59,7 +60,7 @@ const createSVGComponent = (name, svgAttrs, svgContent) => ({ // as it is not a valid attribute for an SVG HTML element props: { title: String }, name: name, - ...(h + ...(createApp ? { // Vue 3 component setup({ title }, { attrs: componentAttrs, slots }) {
fix(icons): update condition for vue2/vue3 exports (#<I>)
carbon-design-system_carbon-components
train
js
770c6ed64f8be3edc4175d431fc67ba140bf5b97
diff --git a/src/platforms/web/runtime/modules/dom-props.js b/src/platforms/web/runtime/modules/dom-props.js index <HASH>..<HASH> 100644 --- a/src/platforms/web/runtime/modules/dom-props.js +++ b/src/platforms/web/runtime/modules/dom-props.js @@ -38,14 +38,11 @@ function updateDOMProps (oldVnode: VNodeWithData, vnode: VNodeWithData) { } } - // #4521: if a click event triggers update before the change event is - // dispatched on a checkbox/radio input, the input's checked state will - // be reset and fail to trigger another update. - // The root cause here is that browsers may fire microtasks in between click/change. - // In Chrome / Firefox, click event fires before change, thus having this problem. - // In Safari / Edge, the order is opposite. - // Note: in Edge, if you click too fast, only the click event would fire twice. - if (key === 'checked' && cur === oldProps[key]) { + // skip the update if old and new VDOM state is the same. + // the only exception is `value` where the DOM value may be temporarily + // out of sync with VDOM state due to focus, composition and modifiers. + // This also covers #4521 by skipping the unnecesarry `checked` update. + if (key !== 'value' && cur === oldProps[key]) { continue }
refactor: extend dom-props update skip to more all keys except value
kaola-fed_megalo
train
js
5f853661bf3f1a46b3a967aa036e3f7662ee2113
diff --git a/vyper/context/namespace.py b/vyper/context/namespace.py index <HASH>..<HASH> 100644 --- a/vyper/context/namespace.py +++ b/vyper/context/namespace.py @@ -31,6 +31,8 @@ class Namespace(dict): def __setitem__(self, attr, obj): if attr in self: + if attr not in [x for i in self._scopes for x in i]: + raise NamespaceCollision(f"Cannot assign to '{attr}', it is a builtin") obj = super().__getitem__(attr) raise NamespaceCollision(f"'{attr}' has already been declared as a {obj}") diff --git a/vyper/exceptions.py b/vyper/exceptions.py index <HASH>..<HASH> 100644 --- a/vyper/exceptions.py +++ b/vyper/exceptions.py @@ -120,7 +120,6 @@ class SyntaxException(VyperException): item.lineno = lineno item.col_offset = col_offset item.full_source_code = source_code - print("got this far") super().__init__(message, item)
fix: improve exception message when attempting to assign to a builtin
ethereum_vyper
train
py,py
7ce13a7a83120b18331c7ff8603d0e34f7a8b059
diff --git a/lib/rack/app/request_stream.rb b/lib/rack/app/request_stream.rb index <HASH>..<HASH> 100644 --- a/lib/rack/app/request_stream.rb +++ b/lib/rack/app/request_stream.rb @@ -1,4 +1,3 @@ -require "fiber" require "enumerator" class Rack::App::RequestStream include Enumerable
fix: remove fiber dependency in RequestStream class
rack-app_rack-app
train
rb
b1a401c02f124f71b3c01d8842350612375a6c18
diff --git a/internal_api.go b/internal_api.go index <HASH>..<HASH> 100644 --- a/internal_api.go +++ b/internal_api.go @@ -330,6 +330,12 @@ func (e *Enforcer) updateFilteredPolicies(sec string, ptype string, newRules [][ return false, err } } + // For compatibility, because some adapters return oldRules containing ptype, see https://github.com/casbin/xorm-adapter/issues/49 + for i, oldRule := range oldRules { + if len(oldRules[i]) == len(newRules[i])+1 { + oldRules[i] = oldRule[1:] + } + } } if e.dispatcher != nil && e.autoNotifyDispatcher {
fix: Compatible adapter UpdateFilteredPolicies returns the oldPolicy containing ptype (#<I>)
casbin_casbin
train
go
bad20d7950d1ed96a0448aedfac5ae8f909a7960
diff --git a/packages-serverless/egg-layer/framework/config/config.default.js b/packages-serverless/egg-layer/framework/config/config.default.js index <HASH>..<HASH> 100644 --- a/packages-serverless/egg-layer/framework/config/config.default.js +++ b/packages-serverless/egg-layer/framework/config/config.default.js @@ -1,6 +1,7 @@ const os = require('os'); exports.logger = { dir: os.tmpdir(), + disableConsoleAfterReady: false, }; exports.rundir = os.tmpdir();
fix: ouput console in serverless environment (#<I>)
midwayjs_midway
train
js
e867ca1f2c9865e65448c3a5f8074d2711cfe991
diff --git a/src/index.js b/src/index.js index <HASH>..<HASH> 100644 --- a/src/index.js +++ b/src/index.js @@ -190,8 +190,6 @@ function handleApp(appHost){ aurelia = new Aurelia(loader); aurelia.host = appHost; return configureAurelia(aurelia).then(() => { return m.configure(aurelia); }); - }).catch(e => { - setTimeout(function(){ throw e; }, 0); }); }else{ aurelia = new Aurelia(); @@ -205,8 +203,6 @@ function handleApp(appHost){ aurelia.use.standardConfiguration(); return aurelia.start().then(a => a.setRoot()); - }).catch(e => { - setTimeout(function(){ throw e; }, 0); }); } }
fix(bootstrapper): remove catch handlers that kill stack traces during startup
aurelia_bootstrapper
train
js
cfe602627bb847cf41bf382a5abd3646c07e1a17
diff --git a/src/compiler/parsing/wasm/decoder.js b/src/compiler/parsing/wasm/decoder.js index <HASH>..<HASH> 100644 --- a/src/compiler/parsing/wasm/decoder.js +++ b/src/compiler/parsing/wasm/decoder.js @@ -383,13 +383,15 @@ export function decode(ab: ArrayBuffer, printDump: boolean = false): Program { const typeindex = indexU32.value; eatBytes(indexU32.nextIndex); + dump([typeindex], 'type index'); + const signature = state.typesInModule[typeindex]; if (typeof signature === 'undefined') { throw new CompileError('function signature not found'); } - const id = t.identifier('func_' + typeindex); + const id = t.identifier(getUniqueName('func')); state.functionsInModule.push({ id,
fix(wasm): decouple function identifier from type index
xtuc_webassemblyjs
train
js
3afa1b7d9765aebb5fddf668ecb11b824397d959
diff --git a/cmsplugin_cascade/link/forms.py b/cmsplugin_cascade/link/forms.py index <HASH>..<HASH> 100644 --- a/cmsplugin_cascade/link/forms.py +++ b/cmsplugin_cascade/link/forms.py @@ -181,7 +181,8 @@ class LinkForm(EntangledModelFormMixin): try: cascade_page = get_related_object(instance.glossary, 'cms_page').cascadepage for key, val in cascade_page.glossary.get('element_ids', {}).items(): - self.base_fields['section'].choices.append((key, val)) + if val: + self.base_fields['section'].choices.append((key, val)) except (AttributeError, ObjectDoesNotExist): pass
fix: Editor for LinkPlugin doe not offer anchors to empty id-attributes
jrief_djangocms-cascade
train
py
3f4fefb11b0dfd3bd6dcd8f1bab1079a997d4f35
diff --git a/master/buildbot/test/util/integration.py b/master/buildbot/test/util/integration.py index <HASH>..<HASH> 100644 --- a/master/buildbot/test/util/integration.py +++ b/master/buildbot/test/util/integration.py @@ -14,6 +14,7 @@ # Copyright Buildbot Team Members import os +import re import sys from io import StringIO @@ -291,15 +292,19 @@ class RunMasterBase(unittest.TestCase): self.printLog(log, out) @defer.inlineCallbacks - def checkBuildStepLogExist(self, build, expectedLog, onlyStdout=False): + def checkBuildStepLogExist(self, build, expectedLog, onlyStdout=False, regex=False): yield self.enrichBuild(build, wantSteps=True, wantProperties=True, wantLogs=True) for step in build['steps']: for log in step['logs']: for line in log['contents']['content'].splitlines(): if onlyStdout and line[0] != 'o': continue - if expectedLog in line: - return True + if regex: + if re.search(expectedLog, line): + return True + else: + if expectedLog in line: + return True return False def printLog(self, log, out):
test: Support regex in checkBuildStepLogExist
buildbot_buildbot
train
py
77b9c57fe71b2061ea7fbce47fb06305e80546a0
diff --git a/packages/node_modules/@webex/webex-core/src/lib/services/services.js b/packages/node_modules/@webex/webex-core/src/lib/services/services.js index <HASH>..<HASH> 100644 --- a/packages/node_modules/@webex/webex-core/src/lib/services/services.js +++ b/packages/node_modules/@webex/webex-core/src/lib/services/services.js @@ -8,6 +8,7 @@ import ServiceCatalog from './service-catalog'; import ServiceRegistry from './service-registry'; import ServiceState from './service-state'; + const trailingSlashes = /(?:^\/)|(?:\/$)/; /* eslint-disable no-underscore-dangle */ @@ -188,7 +189,7 @@ const Services = WebexPlugin.extend({ formattedQuery = {}; - if (queryKey === 'email') { + if (queryKey === 'email' && query.email) { formattedQuery.emailhash = sha256(query.email.toLowerCase()).toString(); } else {
fix(authorization): add additional email query check
webex_spark-js-sdk
train
js
ebe21ef2014b9b6c6d77c1254a87546d5096642f
diff --git a/src/foremast/app/aws.py b/src/foremast/app/aws.py index <HASH>..<HASH> 100644 --- a/src/foremast/app/aws.py +++ b/src/foremast/app/aws.py @@ -1,10 +1,11 @@ """AWS Spinnaker Application.""" from pprint import pformat -from foremast.app.base import BaseApp + +from foremast.app import base from foremast.utils import wait_for_task -class SpinnakerApp(BaseApp): +class SpinnakerApp(base.BaseApp): """Create AWS Spinnaker Application.""" def create(self):
fix: Use different import for better testing
foremast_foremast
train
py
126f2124a206b298708652c176087cbd433d3dbc
diff --git a/src/field/index.js b/src/field/index.js index <HASH>..<HASH> 100644 --- a/src/field/index.js +++ b/src/field/index.js @@ -37,7 +37,6 @@ export default createComponent({ ...cellProps, name: String, rules: Array, - error: Boolean, disabled: Boolean, readonly: Boolean, autosize: [Boolean, Object], @@ -58,6 +57,10 @@ export default createComponent({ type: String, default: 'text', }, + error: { + type: Boolean, + default: null, + }, colon: { type: Boolean, default: null, @@ -106,10 +109,12 @@ export default createComponent({ }, showError() { + if (this.error !== null) { + return this.error; + } if (this.vanForm && this.vanForm.showError && this.validateMessage) { return true; } - return this.error; }, listeners() {
fix(Field): can not disable error in form (#<I>)
youzan_vant
train
js
f9a99199009bccf8b3e6b429a975e56a0459d15f
diff --git a/lib/chromedriver.js b/lib/chromedriver.js index <HASH>..<HASH> 100644 --- a/lib/chromedriver.js +++ b/lib/chromedriver.js @@ -403,7 +403,12 @@ class Chromedriver extends events.EventEmitter { `Defaulting to ${BaseDriver.DRIVER_PROTOCOL.MJSONWP}`); return; } - + const chromeOptions = getCapValue(this.capabilities, 'chromeOptions', {}); + if (chromeOptions.w3c === false) { + log.info(`Chromedriver v. ${cdVersion} supports ${BaseDriver.DRIVER_PROTOCOL.W3C} protocol, ` + + `but ${BaseDriver.DRIVER_PROTOCOL.MJSONWP} one has been explicitly requested`); + return; + } this.desiredProtocol = BaseDriver.DRIVER_PROTOCOL.W3C; // given caps might not be properly prefixed // so we try to fix them in order to properly init
fix: Properly set the protocol if w3c chrome option is set to false (#<I>)
appium_appium-chromedriver
train
js
fdcc3a588fa9df48a00d1a2d08e5d9a9da2e1a9a
diff --git a/test/hccrawler.test.js b/test/hccrawler.test.js index <HASH>..<HASH> 100644 --- a/test/hccrawler.test.js +++ b/test/hccrawler.test.js @@ -1012,7 +1012,7 @@ describe('HCCrawler', () => { assert.equal(crawler.pendingQueueSize(), 0); assert.equal(crawler.requestedCount(), 1); assert.equal(onError.callCount, 1); - assert.equal(onError.firstCall.args[0].message, 'net::ERR_CONNECTION_REFUSED'); + assert.ok(includes(onError.firstCall.args[0].message, 'net::ERR_CONNECTION_REFUSED')); }); }); });
chore(package): fix test after updating puppetter to version <I>
yujiosaka_headless-chrome-crawler
train
js
6ed64039b5f72c5bf4b40e0b25673edbb3ceb0d6
diff --git a/lib/adhearsion/initializer.rb b/lib/adhearsion/initializer.rb index <HASH>..<HASH> 100644 --- a/lib/adhearsion/initializer.rb +++ b/lib/adhearsion/initializer.rb @@ -337,8 +337,8 @@ Adhearsion will abort until you fix this. Sorry for the incovenience. Logging::DefaultAdhearsionLogger.redefine_outputters end - def create_pid_file(file = pid_file) - if file + def create_pid_file + if pid_file File.open pid_file, 'w' do |file| file.puts Process.pid end
fix: pid_file gets written again
adhearsion_adhearsion
train
rb
7a805548c4a23785fca6f64dff7de69f19a0995f
diff --git a/packages/core-php/src/TwigFunctions.php b/packages/core-php/src/TwigFunctions.php index <HASH>..<HASH> 100644 --- a/packages/core-php/src/TwigFunctions.php +++ b/packages/core-php/src/TwigFunctions.php @@ -268,7 +268,7 @@ class TwigFunctions { // Loops through _context, returns props that are in schema public static function initialize_props() { return new Twig_SimpleFunction('initialize_props', function($items, $schema) { - return Utils::build_props_array($items, $schema); + return Utils::buildPropsArray($items, $schema); }); } diff --git a/packages/core-php/src/Utils.php b/packages/core-php/src/Utils.php index <HASH>..<HASH> 100644 --- a/packages/core-php/src/Utils.php +++ b/packages/core-php/src/Utils.php @@ -122,7 +122,7 @@ class Utils { * @param array $schema - The schema object for a particular component * @return array - An associative array of props */ - public static function build_props_array($items, $schema) { + public static function buildPropsArray($items, $schema) { $props = array(); // If schema has properties to check against
refactor: camelCase build array props function
bolt-design-system_bolt
train
php,php
3e1a8947b822d7c181b4746926e50e73301a61c6
diff --git a/scenarios/api.github.com/release-assets/record.js b/scenarios/api.github.com/release-assets/record.js index <HASH>..<HASH> 100644 --- a/scenarios/api.github.com/release-assets/record.js +++ b/scenarios/api.github.com/release-assets/record.js @@ -137,7 +137,7 @@ async function releaseAssets (state) { error = _error } - // await temporaryRepository.delete() + await temporaryRepository.delete() if (error) { return Promise.reject(error)
chore(scenario): delete temporary release-assets repository after recording
octokit_fixtures
train
js
db87202cea00372867dfb17ca7a151e0b07cd54f
diff --git a/tests/integration/__init__.py b/tests/integration/__init__.py index <HASH>..<HASH> 100644 --- a/tests/integration/__init__.py +++ b/tests/integration/__init__.py @@ -59,7 +59,7 @@ def get_server_versions(): if cass_version is not None: return (cass_version, cql_version) - c = Cluster(protocol_version=1) + c = Cluster() s = c.connect() row = s.execute('SELECT cql_version, release_version FROM system.local')[0]
test: use Cluster proto downgrade in get_server_versions Can no longer connect to C* <I> using protocol < 3
datastax_python-driver
train
py
370f9cf3b9f9898d2b22ea709e7441772f1039af
diff --git a/tests/functional/tester/cluster.go b/tests/functional/tester/cluster.go index <HASH>..<HASH> 100644 --- a/tests/functional/tester/cluster.go +++ b/tests/functional/tester/cluster.go @@ -113,8 +113,6 @@ func NewCluster(lg *zap.Logger, fpath string) (*Cluster, error) { } go clus.serveTesterServer() - clus.updateCases() - clus.rateLimiter = rate.NewLimiter( rate.Limit(int(clus.Tester.StressQPS)), int(clus.Tester.StressQPS), diff --git a/tests/functional/tester/cluster_run.go b/tests/functional/tester/cluster_run.go index <HASH>..<HASH> 100644 --- a/tests/functional/tester/cluster_run.go +++ b/tests/functional/tester/cluster_run.go @@ -33,6 +33,10 @@ const compactQPS = 50000 func (clus *Cluster) Run() { defer printReport() + // updateCases must be executed after etcd is started, because the FAILPOINTS case + // needs to obtain all the failpoints from the etcd member. + clus.updateCases() + if err := fileutil.TouchDirAll(clus.Tester.DataDir); err != nil { clus.lg.Panic( "failed to create test data directory",
fix: failed to get failpoints from member
etcd-io_etcd
train
go,go
856a736040b2a455064fdaca31c2490939bee051
diff --git a/actions/class.Runner.php b/actions/class.Runner.php index <HASH>..<HASH> 100644 --- a/actions/class.Runner.php +++ b/actions/class.Runner.php @@ -666,7 +666,7 @@ class taoQtiTest_actions_Runner extends tao_actions_ServiceModule { try { $this->validateSecurityToken(); - $this->checkDeliveryExecutionInteractionAccessibility(); + $this->validateDeliveryExecutionInteractionAccessibility(); $command = new TimeoutCommand( $this->getServiceContext(), @@ -952,7 +952,7 @@ class taoQtiTest_actions_Runner extends tao_actions_ServiceModule * @throws QtiRunnerClosedException * @throws common_exception_NotFound */ - private function checkDeliveryExecutionInteractionAccessibility(): void + private function validateDeliveryExecutionInteractionAccessibility(): void { $executionId = $this->getSessionId(); $deliveryExecution = $this->getDeliveryExecutionService()->getDeliveryExecution($executionId);
refactor: rename private delivery execution accessibility validation method
oat-sa_extension-tao-testqti
train
php
da9bf8f4d7b39c00d9962d1c318be0fca92c5531
diff --git a/scripts/cz-adapter/index.js b/scripts/cz-adapter/index.js index <HASH>..<HASH> 100644 --- a/scripts/cz-adapter/index.js +++ b/scripts/cz-adapter/index.js @@ -75,7 +75,7 @@ module.exports = { answers.subject = commitTypes[answers.type].emoji + " " + answers.subject; // Build commit message - const message = buildCommit(answers); + const message = buildCommit(answers, { breaklineChar: "\n" }); console.log("\n\nCommit message:"); console.log(chalk.blue(`\n\n${message}\n`)); commitCb(message);
fix: 🐛update buildCommit in commitizen adapter (#<I>)
Webiny_webiny-js
train
js
7aa5507503ec119a4b34875c0fe88acd50db90ce
diff --git a/lib/artillery-global.js b/lib/artillery-global.js index <HASH>..<HASH> 100644 --- a/lib/artillery-global.js +++ b/lib/artillery-global.js @@ -1,6 +1,11 @@ const version = require('../package.json').version; const chalk = require('chalk'); +const createReporter = require('./console-reporter'); +const util = require('./util'); +const { SSMS } = require('../core/lib/ssms'); +const EventEmitter = require('events'); + async function createGlobalObject(opts) { if (typeof global.artillery === 'object') { return; @@ -50,6 +55,13 @@ async function createGlobalObject(opts) { process.exit(artillery.suggestedExitCode); } }; + + global.artillery.globalEvents = new EventEmitter(); + + // TODO: Refactor + global.artillery.__createReporter = createReporter; + global.artillery.__util = util; + global.artillery.__SSMS = SSMS; } module.exports = {
feat: expose console-reporter, util and SSMS via global object
artilleryio_artillery
train
js
9456fd1da85c10ed09f8bdaa50c3e297bf3562e2
diff --git a/lib/player.js b/lib/player.js index <HASH>..<HASH> 100644 --- a/lib/player.js +++ b/lib/player.js @@ -5355,7 +5355,7 @@ shaka.Player.TYPICAL_BUFFERING_THRESHOLD_ = 0.5; * @define {string} A version number taken from git at compile time. * @export */ -shaka.Player.version = 'v3.0.0-uncompiled'; +shaka.Player.version = 'v3.1.0-pre-uncompiled'; // Initialize the deprecation system using the version string we just set // on the player.
chore: Bump master branch version to avoid confusion To keep people from thinking that the master branch contains <I>, bump the master branch version number in player.js to <I>-pre Change-Id: I<I>d1e<I>b6b<I>f2e<I>bcba8b5e<I>fb<I>
google_shaka-player
train
js
e639aa516b5d48ebba02aa0b75767936c1c1239c
diff --git a/registry/job.go b/registry/job.go index <HASH>..<HASH> 100644 --- a/registry/job.go +++ b/registry/job.go @@ -29,8 +29,17 @@ func (r *Registry) GetAllJobs() []job.Job { return jobs } - for _, node := range resp.Node.Nodes { - if j := r.GetJob(path.Base(node.Key)); j != nil { + for _, dir := range resp.Node.Nodes { + for _, node := range dir.Nodes { + if !strings.HasSuffix(node.Key, "object") { + continue + } + + j := r.getJobFromJSON(node.Value) + if j == nil { + continue + } + jobs = append(jobs, *j) } } @@ -67,9 +76,13 @@ func (r *Registry) GetJob(jobName string) *job.Job { return nil } + return r.getJobFromJSON(resp.Node.Value) +} + +func (r *Registry) getJobFromJSON(val string) *job.Job { var jm jobModel //TODO: Handle the error generated by unmarshal - unmarshal(resp.Node.Value, &jm) + unmarshal(val, &jm) // TODO: This is temporary. It will be removed once we switch over to // hashed payloads.
refactor(registry): Drop unnecessary requests in GetAllJobs
coreos_fleet
train
go
83ef39b719cab4c7c015aa8041348bf7341085be
diff --git a/lib/generators/my_zipcode_gem/models_generator.rb b/lib/generators/my_zipcode_gem/models_generator.rb index <HASH>..<HASH> 100644 --- a/lib/generators/my_zipcode_gem/models_generator.rb +++ b/lib/generators/my_zipcode_gem/models_generator.rb @@ -33,9 +33,9 @@ module MyZipcodeGem end end - # def create_migration - # migration_template 'migration.rb', "db/migrate/create_my_zipcode_gem_models.rb" - # end + def create_zipcode_migration + migration_template 'migration.rb', "db/migrate/create_my_zipcode_gem_models.rb" + end def create_rakefile template 'zipcodes.rake', "lib/tasks/zipcodes.rake"
fix(rails3): create_migration fix Uncomment `create_migration` code but rename method for Rails 4 compatibility since `create_migration` is reserved
midwire_my_zipcode_gem
train
rb
8167f22e25c91b3e81206570fefc263851ceaa46
diff --git a/test/Tracing.js b/test/Tracing.js index <HASH>..<HASH> 100644 --- a/test/Tracing.js +++ b/test/Tracing.js @@ -49,6 +49,9 @@ it('basic', function(done) { tracing.end(); tracing.instant('instant', 'finishTest', 'g'); + + expect(() => tracing.end()).to.throw(); + expect(() => tracing.asyncEnd()).to.throw(); }); it('category', function() { @@ -74,7 +77,5 @@ it('not start', function() { const traceId = tracing.asyncBegin('pause', 'do nothing'); tracing.asyncEnd(traceId); tracing.instant('pause', 'do nothing'); - expect(function() { - tracing.stop(); - }).to.throw(); + expect(() => tracing.stop()).to.throw(); });
test(Tracing): increase coverage
liriliri_licia
train
js
0825a92714666b68fb6e7533a112e76fa274ec82
diff --git a/packages/file-collections/src/common/FileRecord/FileRecord.js b/packages/file-collections/src/common/FileRecord/FileRecord.js index <HASH>..<HASH> 100644 --- a/packages/file-collections/src/common/FileRecord/FileRecord.js +++ b/packages/file-collections/src/common/FileRecord/FileRecord.js @@ -264,7 +264,13 @@ export default class FileRecord extends EventEmitter { this.tusUploadInstance.start(); } - async clone(newMetaData) { + /** + * @method fullClone + * @param {Object} [newMetaData] Object to be extended on top of existing metadata object + * @returns {FileRecord} A clone of this file record, already saved to database. All file + * data is also copied in the attached stores. + */ + async fullClone(newMetaData) { const fileCollection = this.collection; if (!fileCollection) throw new Error("Cannot clone a file that is not associated with a collection");
fix: Rename clone method to fullClone Prevents it from being called by object cloning libraries
reactioncommerce_reaction-file-collections
train
js
6caedb6fa88f278569ddb00312540dd2d33d6b8a
diff --git a/cq-websocket.d.ts b/cq-websocket.d.ts index <HASH>..<HASH> 100644 --- a/cq-websocket.d.ts +++ b/cq-websocket.d.ts @@ -15,7 +15,7 @@ export interface CQRequestOptions { } type WebSocketProtocol = "http:" | "https:" | "ws:" | "wss:" export interface CQWebSocketOption { - access_token: string + accessToken: string enableAPI: boolean enableEvent: boolean protocol: WebSocketProtocol diff --git a/demo/echobot.js b/demo/echobot.js index <HASH>..<HASH> 100644 --- a/demo/echobot.js +++ b/demo/echobot.js @@ -26,7 +26,7 @@ if (options.help) { port: options.port, baseUrl: options.url, qq: options.qq, - access_token: options.token + accessToken: options.token }) // 設定訊息監聽 diff --git a/src/index.js b/src/index.js index <HASH>..<HASH> 100644 --- a/src/index.js +++ b/src/index.js @@ -29,7 +29,7 @@ class CQWebSocket extends $Callable { protocol = 'ws:', host = '127.0.0.1', port = 6700, - access_token: accessToken = '', + accessToken = '', baseUrl, // application aware configs
refactor: rename constructor option "access_token" to "accessToken" BREAKING CHANGE: Option renaming from "access_token" to "accessToken" #<I>
momocow_node-cq-websocket
train
ts,js,js
3dcb1c0271f471991271b5e5f45264ee5706cefd
diff --git a/src/main/java/com/bugsnag/Bugsnag.java b/src/main/java/com/bugsnag/Bugsnag.java index <HASH>..<HASH> 100644 --- a/src/main/java/com/bugsnag/Bugsnag.java +++ b/src/main/java/com/bugsnag/Bugsnag.java @@ -472,6 +472,10 @@ public class Bugsnag { /** * Manually starts tracking a new session. * + * Note: sessions are currently tracked on a per-thread basis. Therefore, if this method were called + * from Thread A then Thread B, two sessions would be considered 'active'. Any custom strategy used + * to track sessions should take this into account. + * * Automatic session tracking can be enabled via * {@link Bugsnag#setAutoCaptureSessions(boolean)}, which will automatically create a new * session for each request
docs: document that sessions are tracked on a per-thread basis
bugsnag_bugsnag-java
train
java
e8b52ed726089100526b4afb770542d8d36eb367
diff --git a/src/Leevel/Validate/Helper/date.php b/src/Leevel/Validate/Helper/date.php index <HASH>..<HASH> 100644 --- a/src/Leevel/Validate/Helper/date.php +++ b/src/Leevel/Validate/Helper/date.php @@ -37,12 +37,12 @@ function date($value): bool return false; } - if (false === strtotime((string) ($value))) { + $value = (string) $value; + if (false === strtotime(($value))) { return false; } $value = date_parse($value); - if (false === $value['year'] || false === $value['month'] || false === $value['day']) {
fix(validate): fix for phpstan level 7
hunzhiwange_framework
train
php