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
3415ba326a2892b26bfc89307967651e5403f32c
diff --git a/src/InfoViz/Native/MutualInformationDiagram/index.js b/src/InfoViz/Native/MutualInformationDiagram/index.js index <HASH>..<HASH> 100644 --- a/src/InfoViz/Native/MutualInformationDiagram/index.js +++ b/src/InfoViz/Native/MutualInformationDiagram/index.js @@ -780,7 +780,7 @@ function informationDiagram(publicAPI, model) { // mutualInformationData.vmap[d.source.index].autoInfo/mutualInformationData.matrix[d.source.index][d.source.index]); svg - .selectAll('g.group path[id^=\'group\']') + .selectAll(`g.group path[id^=\'${model.instanceID}-group\']`) .on('click', (d, i) => { pmiChordMode.mode = PMI_CHORD_MODE_NONE; pmiChordMode.srcParam = null;
fix(MutualInfoDiagram): Fix a query that missed using instance id to generate element id
Kitware_paraviewweb
train
js
42fbe66029cf52f788f086e0a909e7ebbe36b262
diff --git a/EventListener/LimitEventListener.php b/EventListener/LimitEventListener.php index <HASH>..<HASH> 100644 --- a/EventListener/LimitEventListener.php +++ b/EventListener/LimitEventListener.php @@ -40,12 +40,14 @@ class LimitEventListener $table = $event->getTable(); if ($table->getRequest()->query->getInt('limit') === -1) { - $table->getQueryBuilder()->setMaxResults(-1); + $table->setLimit(-1); + $table->getQueryBuilder()->setMaxResults(null); $table->getQueryBuilder()->setFirstResult(0); return; } - $table->getQueryBuilder()->setMaxResults($table->getRequest()->query->getInt('limit', 25)); + $table->setLimit($table->getRequest()->query->getInt('limit', 25)); + $table->getQueryBuilder()->setMaxResults($table->getLimit()); $table->getQueryBuilder()->setFirstResult(($table->getCurrentPage() - 1) * $table->getLimit()); }
fix(limit): fixing a problem limiting bug
whatwedo_TableBundle
train
php
eac5cb22c92d837a2406c289492b894d6fbcb775
diff --git a/leancloud/push.py b/leancloud/push.py index <HASH>..<HASH> 100644 --- a/leancloud/push.py +++ b/leancloud/push.py @@ -8,6 +8,7 @@ import arrow import dateutil.tz as tz from leancloud.object_ import Object +from leancloud.errors import LeanCloudError from leancloud import client @@ -27,6 +28,9 @@ class Notification(Object): self._update_data(response.json()) + def save(self): + raise LeanCloudError(code=1, error='Notification does not support modify') + def send(data, channels=None, push_time=None, expiration_time=None, expiration_interval=None, where=None, cql=None): """ 发送推送消息。返回结果为此条推送对应的 _Notification 表中的对象,但是如果需要使用其中的数据,需要调用 fetch() 方法将数据同步至本地。 diff --git a/tests/test_push.py b/tests/test_push.py index <HASH>..<HASH> 100644 --- a/tests/test_push.py +++ b/tests/test_push.py @@ -44,3 +44,10 @@ def test_basic_push(): # type: () -> None notification = push.send(data, where=query, push_time=datetime.now()) notification.fetch() assert(notification.id) + + try: + notification.save() + except leancloud.LeanCloudError as e: + assert e.code == 1 + else: + raise Exception()
fix: disable leancloud.Notification#save (#<I>)
leancloud_python-sdk
train
py,py
4d65ec2de4d924fba720afb0bb97d708fc7fece6
diff --git a/intranet/utils/html.py b/intranet/utils/html.py index <HASH>..<HASH> 100644 --- a/intranet/utils/html.py +++ b/intranet/utils/html.py @@ -69,4 +69,6 @@ def safe_fcps_emerg_html(text: str, base_url: str) -> str: return attrs - return bleach.linkify(bleach.clean(text, tags=ALLOWED_TAGS, attributes=ALLOWED_ATTRIBUTES, styles=ALLOWED_STYLES), [translate_link_attr]) + return bleach.linkify( + bleach.clean(text, strip=True, tags=ALLOWED_TAGS, attributes=ALLOWED_ATTRIBUTES, styles=ALLOWED_STYLES), [translate_link_attr] + )
fix(emerg): strip bad tags in FCPS emergency announcements
tjcsl_ion
train
py
9384459015b37e1671aebadc4b8c25dc9e1e033f
diff --git a/google-http-client/src/main/java/com/google/api/client/util/escape/PercentEscaper.java b/google-http-client/src/main/java/com/google/api/client/util/escape/PercentEscaper.java index <HASH>..<HASH> 100644 --- a/google-http-client/src/main/java/com/google/api/client/util/escape/PercentEscaper.java +++ b/google-http-client/src/main/java/com/google/api/client/util/escape/PercentEscaper.java @@ -65,10 +65,10 @@ public class PercentEscaper extends UnicodeEscaper { public static final String SAFEPATHCHARS_URLENCODER = "-_.!~*'()@:$&,;=+"; /** - * Contains the save characters plus all reserved characters. This happens to be the safe path - * characters plus those characters which are reserved for URI segments, namely '+', '/', and '?'. + * Contains the safe characters plus all reserved characters. This happens to be the safe path + * characters plus those characters which are reserved for URI segments, namely '/' and '?'. */ - public static final String SAFE_PLUS_RESERVED_CHARS_URLENCODER = SAFEPATHCHARS_URLENCODER + "+/?"; + public static final String SAFE_PLUS_RESERVED_CHARS_URLENCODER = SAFEPATHCHARS_URLENCODER + "/?"; /** * A string of characters that do not need to be encoded when used in URI user info part, as
fix: include '+' in SAFEPATHCHARS_URLENCODER (#<I>)
googleapis_google-http-java-client
train
java
df19c70c913cd0a8882670c5188042f13a605226
diff --git a/packages/orbit-components/src/InputStepper/InputStepperStateless/index.js b/packages/orbit-components/src/InputStepper/InputStepperStateless/index.js index <HASH>..<HASH> 100644 --- a/packages/orbit-components/src/InputStepper/InputStepperStateless/index.js +++ b/packages/orbit-components/src/InputStepper/InputStepperStateless/index.js @@ -14,6 +14,7 @@ import type { StateLessProps } from "./index.js.flow"; const StyledInputStepper = styled.div` width: 100%; margin-bottom: ${getSpacingToken}; + font-family: ${({ theme }) => theme.orbit.fontFamily}; ${Input} { text-align: center;
fix(InputStepper): missing font-family (#<I>)
kiwicom_orbit-components
train
js
5d8c570e8ce22b56d34b1cfd1b88f6439cbf4c5c
diff --git a/tests/test_networkmanager.py b/tests/test_networkmanager.py index <HASH>..<HASH> 100644 --- a/tests/test_networkmanager.py +++ b/tests/test_networkmanager.py @@ -538,7 +538,7 @@ class TestNetworkManager(dbusmock.DBusTestCase): self.assertEqual(self.settings.GetConnectionByUuid(uuid), connectionPath) fakeuuid = '123123123213213' - with self.assertRaisesRegexp(dbus.exceptions.DBusException, ".*uuid.*%s$" % fakeuuid): + with self.assertRaisesRegex(dbus.exceptions.DBusException, ".*uuid.*%s$" % fakeuuid): self.settings.GetConnectionByUuid(fakeuuid)
test: Fix deprecated assertRaisesRegexp() call
martinpitt_python-dbusmock
train
py
b8d173789b772c6a443c69376967f027c3bed916
diff --git a/lib/Schema.js b/lib/Schema.js index <HASH>..<HASH> 100644 --- a/lib/Schema.js +++ b/lib/Schema.js @@ -219,7 +219,7 @@ Schema.prototype.parseDynamo = async function (model, dynamoObj) { attrVal = await attr.parseDynamo(dynamoObj[name]); } if (attrVal !== undefined && attrVal !== null) { - model[name] = attrVal; + model[attr.name] = attrVal; } } else { debug('parseDynamo: received an attribute name (%s) that is not defined in the schema', name);
feat(schema): change the way attributes are set by parseDynamo function This does not change parseDynamo result <I>% of the time, because `name` and `attr.name` are usually identical, but makes it possible to manually add hidden attributes to a schema by calling Attribute.create() with `name` set to Symbol(), which can be useful to plugin authors.
dynamoosejs_dynamoose
train
js
de6376141292061cd59093fe2043936941232b2a
diff --git a/nx-dev/nx-dev/tailwind.config.js b/nx-dev/nx-dev/tailwind.config.js index <HASH>..<HASH> 100644 --- a/nx-dev/nx-dev/tailwind.config.js +++ b/nx-dev/nx-dev/tailwind.config.js @@ -52,6 +52,12 @@ module.exports = { 'code::after': { content: '', }, + 'blockquote p:first-of-type::before': { + content: '', + }, + 'blockquote p:last-of-type::after': { + content: '', + }, }, }, },
docs(core): remove extra quotes for blockquote (#<I>)
nrwl_nx
train
js
628734bface78cc8b85a0ffa6359032902e14785
diff --git a/src/android/io/branch/BranchSDK.java b/src/android/io/branch/BranchSDK.java index <HASH>..<HASH> 100644 --- a/src/android/io/branch/BranchSDK.java +++ b/src/android/io/branch/BranchSDK.java @@ -1029,7 +1029,7 @@ public class BranchSDK extends CordovaPlugin { JSONObject response = new JSONObject(); - if (error == null) { + if (error == null || url != null) { try { response.put("url", url);
fix: corrected android long url with no tracking
BranchMetrics_cordova-ionic-phonegap-branch-deep-linking
train
java
30dd336889e03f7c8405fdf95cdcc29824bf08a7
diff --git a/packages/posts/sources/cachePosts.js b/packages/posts/sources/cachePosts.js index <HASH>..<HASH> 100644 --- a/packages/posts/sources/cachePosts.js +++ b/packages/posts/sources/cachePosts.js @@ -2,13 +2,14 @@ import logger from "../lib/logger"; import initializedSources from "./"; const cachePosts = searchParams => { - return Promise.all(initializedSources.map(postSource => { - return postSource.getAllServicePosts(searchParams) - .catch(error => { - logger.error(error); - return []; - }); - })); + return initializedSources + .then(initializedSources => Promise.all(initializedSources.map(postSource => { + return postSource.getAllServicePosts(searchParams) + .catch(error => { + logger.error(error); + return []; + }); + }))); }; export default cachePosts;
fix(posts): `initializedSources` is actually a Promised array.
randytarampi_me
train
js
00420a83c0283e7b02a5385d78d0ec984120a852
diff --git a/lib/branches/get-tags.js b/lib/branches/get-tags.js index <HASH>..<HASH> 100644 --- a/lib/branches/get-tags.js +++ b/lib/branches/get-tags.js @@ -14,15 +14,10 @@ module.exports = async ({cwd, env, options: {tagFormat}}, branches) => { return pReduce( branches, async (branches, branch) => { - const branchTags = await Promise.all( - (await getTags(branch.name, {cwd, env})) - .map(tag => { - const [, version, channel] = tag.match(tagRegexp) || []; - return {gitTag: tag, version, channel}; - }) - .filter(({version}) => version && semver.valid(semver.clean(version))) - .map(async ({gitTag, ...rest}) => ({gitTag, ...rest})) - ); + const branchTags = (await getTags(branch.name, {cwd, env})).reduce((tags, tag) => { + const [, version, channel] = tag.match(tagRegexp) || []; + return version && semver.valid(semver.clean(version)) ? [...tags, {gitTag: tag, version, channel}] : tags; + }, []); debug('found tags for branch %s: %o', branch.name, branchTags); return [...branches, {...branch, tags: branchTags}];
fix: simplify `get-tags` algorithm
semantic-release_semantic-release
train
js
e4fc1a606b1f05b5368f6fc85f96e9f7154bc642
diff --git a/lib/DirectEditing.js b/lib/DirectEditing.js index <HASH>..<HASH> 100644 --- a/lib/DirectEditing.js +++ b/lib/DirectEditing.js @@ -16,7 +16,7 @@ function DirectEditing(eventBus, canvas) { this._providers = []; this._textbox = new TextBox({ container: canvas.getPaper().node.parentNode, - keyHandler: this._handleKey.bind(this) + keyHandler: _.bind(this._handleKey, this) }); }
fix(plug-in): use _.bind instead of Function#bind Function#bind is not supported in older webkit browsers.
bpmn-io_diagram-js-direct-editing
train
js
8b4f509234544279180a4201dc1868faaf88e6c6
diff --git a/lib/boot/load/tymly-loader/load-dir.js b/lib/boot/load/tymly-loader/load-dir.js index <HASH>..<HASH> 100644 --- a/lib/boot/load/tymly-loader/load-dir.js +++ b/lib/boot/load/tymly-loader/load-dir.js @@ -28,7 +28,6 @@ module.exports = function loadDir (rootDir, allComponents, options) { }) const rootComponents = {} - let componentDir componentDirs.forEach( function (componentTypeDir) { @@ -37,7 +36,7 @@ module.exports = function loadDir (rootDir, allComponents, options) { rootComponents[componentTypeName] = {} } if (componentTypeDir[0] !== '.' && COMPONENT_DIR_BLACKLIST.indexOf(componentTypeName) === -1) { - componentDir = path.join(rootDir, componentTypeDir) + const componentDir = path.join(rootDir, componentTypeDir) const dirContent = fs.readdirSync(componentDir) dirContent.forEach( function (filename) {
refactor: Move componentDir declaration into the loop
wmfs_tymly-core
train
js
5bcc8e23aea0d639261f29d4195805bdb026587a
diff --git a/admin_media.php b/admin_media.php index <HASH>..<HASH> 100644 --- a/admin_media.php +++ b/admin_media.php @@ -1276,12 +1276,11 @@ echo WT_JS_START; ?> echo '<br />'; } } - echo "</td></tr>"; break; } } - if ($passCount==1 && $printDone) echo "<tr><td class=\"\" colspan=\"3\">&nbsp;</td></tr>"; + if ($passCount==1 && !$isExternal && $printDone) echo "<tr><td class=\"\" colspan=\"3\">&nbsp;</td></tr>"; } ?> </tbody>
fix: error when the jquery table don't appear
fisharebest_webtrees
train
php
7bbb9be53dfab8393ec2093c19a7235e5c18bf5c
diff --git a/tasks/config.js b/tasks/config.js index <HASH>..<HASH> 100644 --- a/tasks/config.js +++ b/tasks/config.js @@ -17,6 +17,15 @@ const shared = { module: { loaders: [{ test: /\.js$/, + exclude: /node_modules/, + loader: 'babel', + query: { + presets: ['es2015'], + plugins: ['transform-runtime'] + } + }, { + test: /\.js$/, + include: /node_modules\/(hoek|qs|wreck|boom)/, loader: 'babel', query: { presets: ['es2015'],
fix(build): Do not run all deps through babel
ipfs_js-ipfs
train
js
9f0f815e6e7b8eb2d3daa011a5baf61411c7a830
diff --git a/samples/update-intent.js b/samples/update-intent.js index <HASH>..<HASH> 100644 --- a/samples/update-intent.js +++ b/samples/update-intent.js @@ -17,6 +17,7 @@ process.env.DEBUG = 'dialogflow:debug'; // enables lib debugging statements async function main(projectId, intentId, displayName) { + // [START dialogflow_update_intent_sample] const {IntentsClient} = require('@google-cloud/dialogflow'); const intentClient = new IntentsClient(); @@ -39,6 +40,7 @@ async function main(projectId, intentId, displayName) { //Send the request for update the intent. const result = await intentClient.updateIntent(updateIntentRequest); console.log(result); + // [END dialogflow_update_intent_sample] } process.on('unhandledRejection', err => {
docs: added region tags (#<I>)
googleapis_nodejs-dialogflow
train
js
e01dc8e3f07bf19540364b5fc1ab8304ebd46388
diff --git a/providers/providers_manager.go b/providers/providers_manager.go index <HASH>..<HASH> 100644 --- a/providers/providers_manager.go +++ b/providers/providers_manager.go @@ -102,17 +102,17 @@ type getProv struct { // NewProviderManager constructor func NewProviderManager(ctx context.Context, local peer.ID, dstore ds.Batching, opts ...Option) (*ProviderManager, error) { - var options options - if err := options.apply(append([]Option{defaults}, opts...)...); err != nil { + var cfg options + if err := cfg.apply(append([]Option{defaults}, opts...)...); err != nil { return nil, err } pm := new(ProviderManager) pm.getprovs = make(chan *getProv) pm.newprovs = make(chan *addProv) pm.dstore = autobatch.NewAutoBatching(dstore, batchBufferSize) - pm.cache = options.cache + pm.cache = cfg.cache pm.proc = goprocessctx.WithContext(ctx) - pm.cleanupInterval = options.cleanupInterval + pm.cleanupInterval = cfg.cleanupInterval pm.proc.Go(pm.run) return pm, nil }
refactor: rename to cfg
libp2p_go-libp2p-kad-dht
train
go
1734eee07f4fbe9110432762acd320a861412baa
diff --git a/src/main/java/org/getopentest/base/TestActor.java b/src/main/java/org/getopentest/base/TestActor.java index <HASH>..<HASH> 100644 --- a/src/main/java/org/getopentest/base/TestActor.java +++ b/src/main/java/org/getopentest/base/TestActor.java @@ -1354,6 +1354,8 @@ public class TestActor extends Observable implements ITestActor { description = actionDef.action.trim(); } else if (actionDef.script != null) { description = ScriptAction.class.getName(); + } else if (actionDef.macro != null) { + description = actionDef.macro.trim(); } else { description = "(No description provided)"; } @@ -1951,7 +1953,7 @@ public class TestActor extends Observable implements ITestActor { boolean scriptWasAlreadyIncluded = includedScripts.stream() .parallel().anyMatch(normalizedPartialPath::equalsIgnoreCase); - + if (scriptWasAlreadyIncluded) { Logger.trace(String.format( "Skipping inclusion of script file \"%s\" since it was already "
fix(TestActor): provide proper description for macros in test results
mcdcorp_opentest
train
java
d98108019735edc667fa4b000ec8efca2ce0eb93
diff --git a/lib/rack/app/params.rb b/lib/rack/app/params.rb index <HASH>..<HASH> 100644 --- a/lib/rack/app/params.rb +++ b/lib/rack/app/params.rb @@ -49,13 +49,9 @@ class Rack::App::Params ::Rack::Utils.parse_nested_query(query_string).merge!(params_that_presented_multiple_times) end - ARRAY_FORM = /^\w+\[\]$/ - HASH_FORM = /^\w+(\[\w+\])+$/ def params_that_presented_multiple_times cgi_params = CGI.parse(query_string) - cgi_params.reject! { |_k, v| v.length == 1 } - cgi_params.reject! { |k, _v| k =~ ARRAY_FORM } - cgi_params.reject! { |k, _v| k =~ HASH_FORM } + cgi_params.reject! { |k, v| v.length == 1 && k !~ /^\w+$/ } cgi_params.reduce({}) do |result, (key, value)| result[key] = formatted_value(key, value) result
refactor: use explicit use case search instead of define everything that can't be for legacy array form based query string parsing support
rack-app_rack-app
train
rb
c4aa2e838410f159d4f0dc1111de8400fb961e5d
diff --git a/src/util/vdom.js b/src/util/vdom.js index <HASH>..<HASH> 100644 --- a/src/util/vdom.js +++ b/src/util/vdom.js @@ -62,10 +62,11 @@ const createElement = function(type, val, props, meta, children) { const createFunctionalComponent = function(props, children, functionalComponent) { const options = functionalComponent.options; const attrs = props.attrs; - let data = options.data; + let data = {}; + let getData = options.data; - if(data === undefined) { - data = {}; + if(getData !== undefined) { + data = getData(); } // Merge data with provided props @@ -73,7 +74,7 @@ const createFunctionalComponent = function(props, children, functionalComponent) if(propNames === undefined) { data = attrs; } else { - for(var i = 0; i < propNames.length; i++) { + for(let i = 0; i < propNames.length; i++) { const prop = propNames[i]; data[prop] = attrs[prop]; }
fix: require data to be a function for functional components
kbrsh_moon
train
js
af4d6f7bfe16a16b78a9d00ff198673f83104856
diff --git a/src/http/write.js b/src/http/write.js index <HASH>..<HASH> 100644 --- a/src/http/write.js +++ b/src/http/write.js @@ -30,23 +30,14 @@ const mfsWrite = { const fileStream = await new Promise((resolve, reject) => { const parser = multipart.reqParser(request.payload) - let fileStream parser.on('file', (_, stream) => { - if (fileStream) { - return reject(Boom.badRequest('Please only send one file')) - } - - fileStream = stream + resolve(stream) }) parser.on('error', (error) => { reject(error) }) - - parser.on('end', () => { - resolve(fileStream) - }) }) await ipfs.files.write(arg, fileStream, {
fix: parser does not end until file data is consumed License: MIT
ipfs_js-ipfs-mfs
train
js
cc7c7b332123b10eba471a4a7de49c5e5e999afb
diff --git a/gulpfile.js b/gulpfile.js index <HASH>..<HASH> 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -220,7 +220,7 @@ var CONFIG = { }, dart: { src: ['LICENSE'], - exclude: ['rtts_assert/'], + exclude: ['rtts_assert'], pipes: {} } },
fix(build): Don't include rtts in the dart build. The module name actually does not include a trailing slash, so the folder would show up and be included in the dart pubbuild.
angular_angular
train
js
d0c3961aef41f17773fb14d06213df3fcb7fc8d2
diff --git a/src/managers/GuildMemberManager.js b/src/managers/GuildMemberManager.js index <HASH>..<HASH> 100644 --- a/src/managers/GuildMemberManager.js +++ b/src/managers/GuildMemberManager.js @@ -268,7 +268,7 @@ class GuildMemberManager extends CachedManager { let endpoint = this.client.api.guilds(this.guild.id); if (id === this.client.user.id) { - const keys = Object.keys(_data); + const keys = Object.keys(data); if (keys.length === 1 && keys[0] === 'nick') endpoint = endpoint.members('@me'); else endpoint = endpoint.members(id); } else {
fix(GuildMemberManager): nick endpoint (#<I>)
discordjs_discord.js
train
js
7095ad3388d503f4a752403530c2e7c24b385248
diff --git a/packages/pob/lib/generators/common/babel/CommonBabelGenerator.js b/packages/pob/lib/generators/common/babel/CommonBabelGenerator.js index <HASH>..<HASH> 100644 --- a/packages/pob/lib/generators/common/babel/CommonBabelGenerator.js +++ b/packages/pob/lib/generators/common/babel/CommonBabelGenerator.js @@ -401,13 +401,8 @@ export default class CommonBabelGenerator extends Generator { } else { packageUtils.removeDependencies(pkg, ['@types/node']); packageUtils.removeDevDependencies(pkg, ['@types/node']); - if (pkg.engines && useBabel) { - delete pkg.engines.node; - if (Object.keys(pkg.engines).length === 0) delete pkg.engines; - } else { - // Supported LTS versions of node, that supports ESM modules. - pkg.engines.node = '^14.13.1 || >=16.0.0'; - } + // Supported LTS versions of node, that supports ESM modules. + pkg.engines.node = '^14.13.1 || >=16.0.0'; } /* browserslist */
fix(pob): always add engines
christophehurpeau_pob-lerna
train
js
b594bcea7d26930cb8bf3459344602b060ea4379
diff --git a/src/index.js b/src/index.js index <HASH>..<HASH> 100644 --- a/src/index.js +++ b/src/index.js @@ -8,7 +8,15 @@ import {ensureHTMLTemplateElement} from './html-template-element'; import {ensureElementMatches} from './element-matches'; import {ensureClassList} from './class-list'; +let isInitialized = false; + export function initialize(): void { + if (isInitialized) { + return; + } + + isInitialized = true; + ensureCustomEvent(); ensureFunctionName(); ensureHTMLTemplateElement();
fix(all): ensure initialization happens only once
aurelia_pal-browser
train
js
edf87ad9d9a63f9539dba312aa7bd0ea7e9b8667
diff --git a/src/navigation-plan.js b/src/navigation-plan.js index <HASH>..<HASH> 100644 --- a/src/navigation-plan.js +++ b/src/navigation-plan.js @@ -41,6 +41,8 @@ export function buildNavigationPlan(navigationContext, forceLifecycleMinimum) { //TODO: should we tell them if the parent had a lifecycle min change? viewPortPlan.strategy = prevViewPortInstruction.component.executionContext .determineActivationStrategy(...next.lifecycleArgs); + } else if(next.config.activationStrategy){ + viewPortPlan.strategy = next.config.activationStrategy; } else if (newParams || forceLifecycleMinimum) { viewPortPlan.strategy = activationStrategy.invokeLifecycle; } else { @@ -55,7 +57,7 @@ export function buildNavigationPlan(navigationContext, forceLifecycleMinimum) { .createNavigationContext(childInstruction); return buildNavigationPlan( - viewPortPlan.childNavigationContext, + viewPortPlan.childNavigationContext, viewPortPlan.strategy == activationStrategy.invokeLifecycle) .then(childPlan => { viewPortPlan.childNavigationContext.plan = childPlan;
feat(navigation-plan): enable configuring the activationStrategy on the route config instead of the view model
aurelia_router
train
js
05f07a4d9afb6ff22ec676d89c3f5655a4070ebf
diff --git a/internal/pipeline/pipeline.go b/internal/pipeline/pipeline.go index <HASH>..<HASH> 100644 --- a/internal/pipeline/pipeline.go +++ b/internal/pipeline/pipeline.go @@ -37,10 +37,10 @@ type Piper interface { // BuildPipeline contains all build-related pipe implementations in order // nolint:gochecknoglobals var BuildPipeline = []Piper{ - before.Pipe{}, // run global hooks before build env.Pipe{}, // load and validate environment variables git.Pipe{}, // get and validate git repo state semver.Pipe{}, // parse current tag to a semver + before.Pipe{}, // run global hooks before build defaults.Pipe{}, // load default configs snapshot.Pipe{}, // snapshot version handling dist.Pipe{}, // ensure ./dist is clean
feat(pipeline): change the pipeline order to support additional template variables in the before pipe (#<I>) This change allows us to use all the template variables in the named templates in the before hook. Issue: GH-<I>
goreleaser_goreleaser
train
go
e78508ae06f668a3f48b8cb63eee13d4349bb699
diff --git a/test/test_list.rb b/test/test_list.rb index <HASH>..<HASH> 100644 --- a/test/test_list.rb +++ b/test/test_list.rb @@ -3,8 +3,17 @@ require "minitest/autorun" require "dreck" +# Tests for list results. class DreckListTest < Minitest::Test - # Tests for list results. + def test_list_bad_count + # requesting a non-positive sized list throws a bad count error + assert_raises Dreck::BadCountError do + Dreck.parse [] do + list :string, :stuff, count: -1 + end + end + end + def test_list_absorb_empty # parsing an empty list into a greedy list throws a greedy absorption error assert_raises Dreck::GreedyAbsorptionError do
test: Add test for BadCountError
woodruffw_dreck
train
rb
83b668122cad377cb0d3f98bb51067f81c8b75a8
diff --git a/packages/openneuro-server/src/graphql/resolvers/dataset-search.js b/packages/openneuro-server/src/graphql/resolvers/dataset-search.js index <HASH>..<HASH> 100644 --- a/packages/openneuro-server/src/graphql/resolvers/dataset-search.js +++ b/packages/openneuro-server/src/graphql/resolvers/dataset-search.js @@ -81,7 +81,7 @@ export const datasetSearchConnection = async ( { q, after, first = 25 }, ) => { const requestBody = { - sort: [{ _score: 'asc', id: 'desc' }], + sort: [{ _score: 'asc', 'id.keyword': 'desc' }], } if (after) { try { @@ -93,7 +93,7 @@ export const datasetSearchConnection = async ( const result = await elasticClient.search({ index: elasticIndex, size: first, - q, + q: `${q} AND public:true`, body: requestBody, }) return elasticRelayConnection(result)
fix(search): Limit the basic search to public datasets
OpenNeuroOrg_openneuro
train
js
6101f8927ebc68c18ddf40183c925ab09058cc3c
diff --git a/core/common/webpack_rules.js b/core/common/webpack_rules.js index <HASH>..<HASH> 100644 --- a/core/common/webpack_rules.js +++ b/core/common/webpack_rules.js @@ -402,8 +402,8 @@ module.exports = ( config ) => { include: [ path.resolve( inlineNodeModules, 'ansi-regex'), path.resolve( inlineNodeModules, 'strip-ansi'), - path.resolve( nodeModulesPath, 'ansi-regex' ), - path.resolve( nodeModulesPath, 'strip-ansi' ), + path.resolve( yarnModulesPath, 'ansi-regex' ), + path.resolve( yarnModulesPath, 'strip-ansi' ), ], use: [ {
fix: android 4x & ie9 + compatibility for yarn
legoflow_engine
train
js
e40d25473a039fcd6b69dbebf6839ea3a8ae57d2
diff --git a/lib/index.js b/lib/index.js index <HASH>..<HASH> 100644 --- a/lib/index.js +++ b/lib/index.js @@ -38,7 +38,7 @@ function tunnelProxy(server, proxy) { process.env['NODE_TLS_REJECT_UNAUTHORIZED'] = '0'; server.on('connect', function(req, reqSocket, head) {//ws, wss, https proxy - var tunnelUrl = req.fullUrl = util.setProtocol(/^[^:\/]+:\d+$/ ? req.url : req.headers.host, true); + var tunnelUrl = req.fullUrl = util.setProtocol(/^[^:\/]+:\d+$/.test(req.url) ? req.url : req.headers.host, true); var options = parseUrl(); var tunnelUrl = req.fullUrl = 'tunnel://' + options.host; var resSocket, proxySocket, responsed;
refactor: Priority handling req.url
avwo_whistle
train
js
1ab780b4221d6b14b214a518261604c2930ea079
diff --git a/engine-rest/engine-rest/src/test/java/org/camunda/bpm/engine/rest/ProcessDefinitionRestServiceInteractionTest.java b/engine-rest/engine-rest/src/test/java/org/camunda/bpm/engine/rest/ProcessDefinitionRestServiceInteractionTest.java index <HASH>..<HASH> 100644 --- a/engine-rest/engine-rest/src/test/java/org/camunda/bpm/engine/rest/ProcessDefinitionRestServiceInteractionTest.java +++ b/engine-rest/engine-rest/src/test/java/org/camunda/bpm/engine/rest/ProcessDefinitionRestServiceInteractionTest.java @@ -2810,6 +2810,16 @@ public class ProcessDefinitionRestServiceInteractionTest extends AbstractRestSer } @Test + public void testSimpleProcessInstantiationWithoutBody_ByKey() { + given().pathParam("key", MockProvider.EXAMPLE_PROCESS_DEFINITION_KEY) + .contentType(POST_JSON_CONTENT_TYPE) + .then().expect() + .statusCode(Status.OK.getStatusCode()) + .body("id", equalTo(MockProvider.EXAMPLE_PROCESS_INSTANCE_ID)) + .when().post(START_PROCESS_INSTANCE_BY_KEY_URL); + } + + @Test public void testProcessInstantiationWithParameters_ByKey() throws IOException { Map<String, Object> parameters = VariablesBuilder.create() .variable("aBoolean", Boolean.TRUE)
test(engine-rest): start a process instance on post with an empty body related to #CAM-<I>
camunda_camunda-bpm-platform
train
java
6736d4ef296b960b5157155515ef949a1c3524be
diff --git a/lib/renderer/web-view/web-view.js b/lib/renderer/web-view/web-view.js index <HASH>..<HASH> 100644 --- a/lib/renderer/web-view/web-view.js +++ b/lib/renderer/web-view/web-view.js @@ -131,7 +131,7 @@ class WebViewImpl { } onElementResize () { - const resizeEvent = new Event('resize', { bubbles: true }) + const resizeEvent = new Event('resize') resizeEvent.newWidth = this.webviewNode.clientWidth resizeEvent.newHeight = this.webviewNode.clientHeight this.dispatchEvent(resizeEvent)
fix: do not bubble up resize event from webview (#<I>)
electron_electron
train
js
d6f2f6726a154784189cb3a8259c8fa31b465ae3
diff --git a/src/lib/async-command.js b/src/lib/async-command.js index <HASH>..<HASH> 100644 --- a/src/lib/async-command.js +++ b/src/lib/async-command.js @@ -1,5 +1,6 @@ -/* eslint-disable unicorn/no-process-exit */ +/* eslint-disable unicorn/no-process-exit */ +/* eslint-disable promise/prefer-await-to-then */ const done = (err, result) => { return err ? diff --git a/src/lib/which.js b/src/lib/which.js index <HASH>..<HASH> 100644 --- a/src/lib/which.js +++ b/src/lib/which.js @@ -3,4 +3,7 @@ import which from 'which'; const pWhich = promisify(which); -export default program => pWhich(program).then(res => Boolean(res)); +export default async program => { + const res = await pWhich(program); + return Boolean(res); +};
chore: fix async await missing
PolymerX_polymerx-cli
train
js,js
2833e051570a35c6f20d3e0873e0a8b6bdc1b9b9
diff --git a/cursor.js b/cursor.js index <HASH>..<HASH> 100644 --- a/cursor.js +++ b/cursor.js @@ -575,6 +575,12 @@ var nextFunction = function(self, callback) { // Topology was destroyed, so don't try to wait for it to reconnect return callback(new MongoError('Topology was destroyed')); } + + if (!self.s.topologyOptions.reconnect) { + // Reconnect is disabled, so we'll never reconnect + return callback(new MongoError('no connection available')); + } + return self.disconnectHandler.addObjectAndMethod( 'cursor', self,
fix(cursor): avoid waiting for reconnect if reconnect disabled
mongodb_node-mongodb-native
train
js
f492c5db4fe4f9aa0175925d27f44fc65df7c620
diff --git a/get-supported-locale.js b/get-supported-locale.js index <HASH>..<HASH> 100644 --- a/get-supported-locale.js +++ b/get-supported-locale.js @@ -1,14 +1,14 @@ -const supportedLocales = ['en', 'de']; +const supportedLanguages = ['en', 'de']; // This function is reponsible of passing the fallback language "en" // in case the given language is not supported by the application yet -export function getSupportedLocale(locale) { - return supportedLocales.includes(locale) ? locale : 'en'; +export function getSupportedLanguage(language) { + return supportedLanguages.includes(language) ? language : 'en'; } -/* This function is needed in order to parse the locale + region that we allow in the user -* settings. Because we only have messages for `en` and `de`, we need to always get just the -* first part of the locale (`en-GB` would be `en`) so the app does not break. +/* This function is needed in order to parse the locale (<language-code>-<country-code>) that we allow in the user +* we allow in the user settings. Because we only have messages for `en` and `de`, we need to always get just the +* first part of the locale, the language, (`en-GB` would be `en`) so the app does not break. */ export function extractLanguageFromLocale(locale) { return locale.includes('-') ? locale.split('-')[0] : locale;
refactor(locale): rename variables and functions to be consistent with the difference between language vs locale
commercetools_merchant-center-application-kit
train
js
eaa92114888733678f02c40b572201f971423732
diff --git a/lib/util/data-server.js b/lib/util/data-server.js index <HASH>..<HASH> 100644 --- a/lib/util/data-server.js +++ b/lib/util/data-server.js @@ -154,30 +154,16 @@ function getFrames(curReqId, lastFrameId) { } var result = []; var count = 16; - var len = frames.length; - var i, frame; - if (!lastFrameId) { - for (i = 0; i < len; i++) { - frame = frames[i]; - if (frame.reqId === curReqId) { - result.push(decodeData(frame)); - if (--count <= 0) { - return result; - } - } - } - return result; - } - for (i = len - 1; i >= 0; i--) { - frame = frames[i]; - if (frame.reqId === curReqId && frame.frameId > lastFrameId) { + for (var i = 0, len = frames.length; i < len; i++) { + var frame = frames[i]; + if (frame.reqId === curReqId && (lastFrameId ? frame.frameId > lastFrameId : count > 0)) { result.push(decodeData(frame)); if (--count <= 0) { break; } } } - return result.reverse(); + return result; } function getLastFrameId(curReqId) {
fix: loss frames when open for first time
avwo_whistle
train
js
79d0d4cac404d4c3218b635c143921fcf2293f58
diff --git a/src/Leevel/Support/Fn.php b/src/Leevel/Support/Fn.php index <HASH>..<HASH> 100644 --- a/src/Leevel/Support/Fn.php +++ b/src/Leevel/Support/Fn.php @@ -49,7 +49,7 @@ class Fn try { return $fn(...$args); } catch (Error $th) { - $fnName = is_string($fn) ? $fn : $this->normalizeFn($th); + $fnName = $this->normalizeFn($fn, $th); if ($this->match($fnName)) { return $fn(...$args); @@ -94,22 +94,25 @@ class Fn /** * 整理函数名字. * + * @param string $fn * @param \Error $th * * @return string */ - protected function normalizeFn(Error $th): string + protected function normalizeFn(string $fn, Error $th): string { $message = $th->getMessage(); - $fnMessage = 'Call to undefined function '; + $undefinedFn = 'Call to undefined function '; - if (0 !== strpos($message, $fnMessage)) { + if (0 !== strpos($message, $undefinedFn)) { throw $th; } - $fn = substr($message, strlen($fnMessage), -2); + if (is_string($fn)) { + return $fn; + } - return $fn; + return substr($message, strlen($undefinedFn), -2); } /**
fix: fix Leevel\Support\Fn
hunzhiwange_framework
train
php
2743e0bbee29cb86362d23dc822ce48d5b3d830e
diff --git a/test/mp/runtime/directives/class.spec.js b/test/mp/runtime/directives/class.spec.js index <HASH>..<HASH> 100644 --- a/test/mp/runtime/directives/class.spec.js +++ b/test/mp/runtime/directives/class.spec.js @@ -254,4 +254,25 @@ describe(':class', () => { expectRootClass('foo a') }).then(done) }) + + it('class merge between parent and child and only static class on parent', () => { + function expectRootClass (expected) { + expect(page.data.$root['0v0'].h[0].rcl).toBe(expected) + } + + const pageOptions = { + mpType: 'page', + template: '<child class="a" ></child>', + data: { value: 'b' }, + components: { + child: { + template: '<div class="c"></div>' + } + } + } + + const { page } = createPage(pageOptions) + + expectRootClass('a') + }) })
test: add test for merging only static parent class
kaola-fed_megalo
train
js
7381a4d287c6194433e91b304a5c7dff409cb6bf
diff --git a/lib/js/app/components/explorer/EmbedHTML.js b/lib/js/app/components/explorer/EmbedHTML.js index <HASH>..<HASH> 100644 --- a/lib/js/app/components/explorer/EmbedHTML.js +++ b/lib/js/app/components/explorer/EmbedHTML.js @@ -65,6 +65,7 @@ class EmbedHTML extends Component { propertyNames, latest, percentile, + chartType, steps, stepLabels = '', } = this.props.ui; @@ -109,7 +110,7 @@ class EmbedHTML extends Component { params.push(` steps: [ ${stepsParams.join(',\n ')} ]\n`); - + if (stepLabels.length) { stepLabelsString = `,\n labels: ${JSON.stringify(stepLabels)}`; } @@ -135,21 +136,22 @@ class EmbedHTML extends Component { min-height: 300px; } </style> - + <script> const chart = new KeenDataviz({ container: '#demo_container', // querySelector + type: '${chartType}', title: false ${ stepLabels && stepLabelsString ? stepLabelsString : '' } }); - + // Use keen-analysis.js to run a query const client = new KeenAnalysis({ projectId: '${projectId}', readKey: '${readKey}' }); - + client .query({ ${params.join('')} })
fix: 🐛 embed code add chart type to embed code feature
keen_explorer
train
js
5900a671160aaf8e2c606d98ae4439899fd1d6e6
diff --git a/lib/negroku/modes/app.rb b/lib/negroku/modes/app.rb index <HASH>..<HASH> 100644 --- a/lib/negroku/modes/app.rb +++ b/lib/negroku/modes/app.rb @@ -15,6 +15,7 @@ module Negroku::Modes ask_features custom_capify data + install_binstubs end @@ -37,6 +38,10 @@ module Negroku::Modes end + def install_binstubs + `bundle binstub capistrano negroku` + end + # This code was exatracted from capistrano to be used with our own templates # https://github.com/capistrano/capistrano/blob/68e7632c5f16823a09c324d556a208e096abee62/lib/capistrano/tasks/install.rake def custom_capify(data={}, config=nil)
feat(app): run bundle binstub on app creation
platanus_negroku
train
rb
be281ccecd95fa72e28d78537857f4ae47dba481
diff --git a/src/utils/types.js b/src/utils/types.js index <HASH>..<HASH> 100644 --- a/src/utils/types.js +++ b/src/utils/types.js @@ -59,6 +59,8 @@ const types = { enableQueryRules: bool, enableSearchRelevancy: bool, recordAnalytics: bool, + emptyQuery: bool, + suggestionAnalytics: bool, userId: string, useCache: bool, customEvents: object, // eslint-disable-line
fix: revert wrongly removed properties
appbaseio_reactivecore
train
js
f344973938ea8643e387a6e98957833875290e98
diff --git a/index.js b/index.js index <HASH>..<HASH> 100644 --- a/index.js +++ b/index.js @@ -43,6 +43,9 @@ let request = module.exports._requestDefaults(); query.limit = query.limit || 50; query.sort = query.sort || '_id'; + const __no_skip__ = !!query.__no_skip__; + delete query.__no_skip__; + module.exports[type](query, function typeCb(typeErr, res, body) { if (typeErr) { return done(typeErr); } @@ -53,7 +56,7 @@ let request = module.exports._requestDefaults(); return done(null); } - if (!query.__no_skip__) { + if (!__no_skip__) { query.skip += query.limit; }
fix(api): prevent `__no_skip__` being sent as query parameter
Turbasen_turbasen.js
train
js
97bc5b260d52f26915b60bf9d583081c9ac57c8e
diff --git a/server/peer_server.go b/server/peer_server.go index <HASH>..<HASH> 100644 --- a/server/peer_server.go +++ b/server/peer_server.go @@ -122,6 +122,8 @@ func NewPeerServer(name string, path string, url string, bindAddr string, tlsCon s.raftServer.AddEventListener(raft.HeartbeatTimeoutEventType, s.raftEventLogger) s.raftServer.AddEventListener(raft.ElectionTimeoutThresholdEventType, s.raftEventLogger) + s.raftServer.AddEventListener(raft.HeartbeatEventType, s.recordMetricEvent) + return s } @@ -499,6 +501,12 @@ func (s *PeerServer) raftEventLogger(event raft.Event) { } } +func (s *PeerServer) recordMetricEvent(event raft.Event) { + name := fmt.Sprintf("raft.event.%s", event.Type()) + value := event.Value().(time.Duration) + (*s.metrics).Timer(name).Update(value) +} + func (s *PeerServer) monitorSnapshot() { for { time.Sleep(s.snapConf.checkingInterval)
feat(metrics): Publish peer heartbeat events as metrics
etcd-io_etcd
train
go
5287dae10b04bcb96a83a23494a70cd40c494f30
diff --git a/Documentation/conf.py b/Documentation/conf.py index <HASH>..<HASH> 100644 --- a/Documentation/conf.py +++ b/Documentation/conf.py @@ -130,6 +130,7 @@ extlinks = { 'jenkins-branch': (jenkins_branch + "/%s", ''), 'github-project': (project_link + '%s', ''), 'github-backport': (backport_format, ''), + 'gh-issue': (github_repo + 'issues/%s', 'GitHub issue '), } # The language for content autogenerated by Sphinx. Refer to documentation
docs: conf.py: add :gh-issue: role to reference GitHub issues Use the extlink Sphinx extension to add a role for referencing GitHub issues in a uniform fashion. Writing :gh-issue:`<I>` will automatically convert into "GitHub issue <I>", with a link to the relevant issue.
cilium_cilium
train
py
e87e9c4e7fa56d8fb4738e5eec97af2abd9a8fcb
diff --git a/test/cluster/cluster-registry-clusterSpec.js b/test/cluster/cluster-registry-clusterSpec.js index <HASH>..<HASH> 100644 --- a/test/cluster/cluster-registry-clusterSpec.js +++ b/test/cluster/cluster-registry-clusterSpec.js @@ -9,7 +9,7 @@ const connectionEndpointMock = { getConnectionCount() { return 8 } } -describe('distributed-state-registry adds and removes names', () => { +xdescribe('distributed-state-registry adds and removes names', () => { const createClusterRegistry = function (serverName, externalUrl) { const options = { serverName, diff --git a/test/cluster/cluster-registrySpec.js b/test/cluster/cluster-registrySpec.js index <HASH>..<HASH> 100644 --- a/test/cluster/cluster-registrySpec.js +++ b/test/cluster/cluster-registrySpec.js @@ -12,7 +12,7 @@ const EventEmitter = require('events').EventEmitter let realProcess let emitter -describe('cluster registry adds and removes names', () => { +xdescribe('cluster registry adds and removes names', () => { let clusterRegistry const addSpy = jasmine.createSpy('add')
test: disabling cluster registry tests
deepstreamIO_deepstream.io
train
js,js
8ef0b7b60f304cbc166fc9dc4b5055ba8efc8698
diff --git a/src/main/java/com/conveyal/gtfs/graphql/GraphQLGtfsSchema.java b/src/main/java/com/conveyal/gtfs/graphql/GraphQLGtfsSchema.java index <HASH>..<HASH> 100644 --- a/src/main/java/com/conveyal/gtfs/graphql/GraphQLGtfsSchema.java +++ b/src/main/java/com/conveyal/gtfs/graphql/GraphQLGtfsSchema.java @@ -119,6 +119,7 @@ public class GraphQLGtfsSchema { public static final GraphQLObjectType fareType = newObject().name("fare_attributes") .description("A GTFS agency object") .field(MapFetcher.field("id", GraphQLInt)) + .field(MapFetcher.field("agency_id")) .field(MapFetcher.field("fare_id")) .field(MapFetcher.field("price", GraphQLFloat)) .field(MapFetcher.field("currency_type"))
fix(graphql): add missing Fare#agency_id field to GraphQL spec refs catalogueglobal/datatools-ui#<I>
conveyal_gtfs-lib
train
java
aeed43d4df0bc9a2baadb5e29854a6df31aa14f9
diff --git a/packages/xod-client-browser/test-func/pageObjects/PromptPopup.js b/packages/xod-client-browser/test-func/pageObjects/PromptPopup.js index <HASH>..<HASH> 100644 --- a/packages/xod-client-browser/test-func/pageObjects/PromptPopup.js +++ b/packages/xod-client-browser/test-func/pageObjects/PromptPopup.js @@ -15,7 +15,7 @@ PromptPopup.findOnPage = async page => { }; PromptPopup.waitOnPage = async page => { - await page.waitFor('.PopupPrompt', { timeout: 2000 }); + await page.waitFor('.PopupPrompt', { timeout: 5000 }); return PromptPopup.findOnPage(page); };
chore(xod-client-browser): enlarge timeout for mostly failed by timeout selector
xodio_xod
train
js
24bf62bf4c21816962fc20aa129d0b8350b347e7
diff --git a/lib/interceptor.js b/lib/interceptor.js index <HASH>..<HASH> 100644 --- a/lib/interceptor.js +++ b/lib/interceptor.js @@ -10,7 +10,7 @@ const parserFactory = require('./data-processor-row'); */ class RowProcessorInterceptor extends Interceptor { - constructor(endpoint, config) { + constructor(config, endpoint) { super(endpoint, config); // just validate the config once
fix(constructor): Changed the order of config, and endpoint
Kronos-Integration_kronos-interceptor-object-data-processor-row
train
js
28fb571ccd3b8451741c806428bef23726d87e92
diff --git a/sendbeacon.js b/sendbeacon.js index <HASH>..<HASH> 100755 --- a/sendbeacon.js +++ b/sendbeacon.js @@ -12,7 +12,7 @@ function polyfill() { }; function sendBeacon(url, data) { - const event = this.event && this.event.type; + const event = this.event && this.event.type ? this.event.type : this.event; const sync = event === 'unload' || event === 'beforeunload'; const xhr = ('XMLHttpRequest' in this) ? new XMLHttpRequest() : new ActiveXObject('Microsoft.XMLHTTP');
fix: so that sync will not always be false the old state makes sync always false because the value for event will always be true/false not 'unload' or 'beforeunload'
miguelmota_Navigator.sendBeacon
train
js
207b0062f8c56f1d9f6498b0787868c04ef23e78
diff --git a/src/spec.js b/src/spec.js index <HASH>..<HASH> 100644 --- a/src/spec.js +++ b/src/spec.js @@ -14,5 +14,5 @@ * limitations under the License. */ -var testContext = require.context('.', true, /\.spec\.ts/); +var testContext = require.context('.', true, /\.spec\.ts$/); testContext.keys().map(testContext);
chore: use better regular expression for unit test paths
google_neuroglancer
train
js
acdde576d0b2fed464243f2209fd2b11dcad65aa
diff --git a/index.js b/index.js index <HASH>..<HASH> 100644 --- a/index.js +++ b/index.js @@ -37,12 +37,13 @@ Deployor.defaults = { Deployor.verbose = false; +sh.config.silent = !Deployor.verbose; var e = Deployor.exec = function (cmd) { if (Deployor.verbose) { console.log('$ ', cmd); } - return sh.exec(cmd + Deployor.verbose ? '' : ' &> /dev/null'); + return sh.exec(cmd); }; Deployor.cloneRepoBranch = function cloneRepoBranch(options) { @@ -131,7 +132,7 @@ Deployor.prototype = { if (res && res.code > 0) console.log('Can\'t tag failed, continuing !'); }, push: function () { - var res = e('git push --tags origin $BRANCH' + Deployor.verbose ? '' : ' &> /dev/null'); + var res = e('git push --tags origin $BRANCH'); if (res && res.code > 0) throw new Error(res.output); } };
feat(deploy): silent with shelljs.config
douglasduteil_node-git-deployor
train
js
0ec8ceae4fda740c6a3d990636491f6df0008728
diff --git a/samples/system-test/sample.test.js b/samples/system-test/sample.test.js index <HASH>..<HASH> 100644 --- a/samples/system-test/sample.test.js +++ b/samples/system-test/sample.test.js @@ -16,7 +16,9 @@ 'use strict'; const {assert} = require('chai'); -const {execSync} = require('child_process'); +const cp = require('child_process'); + +const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); describe('container samples', () => { it('should run the quickstart', async () => {
refactor: wrap execSync with encoding: utf-8 (#<I>)
googleapis_nodejs-cloud-container
train
js
9c22fc33121d4b4fdd6ae6decd366b31a901b0e4
diff --git a/ehforwarderbot/__version__.py b/ehforwarderbot/__version__.py index <HASH>..<HASH> 100644 --- a/ehforwarderbot/__version__.py +++ b/ehforwarderbot/__version__.py @@ -1,3 +1,3 @@ # coding=utf-8 -__version__ = "2.0.1.dev1" +__version__ = "2.0.0"
fix: revert version number bump
blueset_ehForwarderBot
train
py
cc539a71dcfd6777fa75f8de5c3ef4fcae59e954
diff --git a/framework/core/js/src/forum/components/Post.js b/framework/core/js/src/forum/components/Post.js index <HASH>..<HASH> 100644 --- a/framework/core/js/src/forum/components/Post.js +++ b/framework/core/js/src/forum/components/Post.js @@ -120,7 +120,7 @@ export default class Post extends Component { /** * Get the post's classes. * - * @param string classes + * @param existing string * @returns {string[]} */ classes(existing) { @@ -137,7 +137,7 @@ export default class Post extends Component { classes.push('Post--by-actor'); } - if (user && user === discussion.user()) { + if (user && user.id() === discussion.attribute('startUserId')) { classes.push('Post--by-start-user'); }
fix: `Post--by-actor` not showing when comparing user instances as `discussion.user()` is not loaded (#<I>)
flarum_core
train
js
025b94c7814b8461d75d0a02ca60af79e4e82b1a
diff --git a/src/Application.php b/src/Application.php index <HASH>..<HASH> 100644 --- a/src/Application.php +++ b/src/Application.php @@ -19,12 +19,14 @@ use Symfony\Component\Console\Output\OutputInterface; use Symfony\Component\DependencyInjection\ContainerInterface; use Symfony\Component\DependencyInjection\ContainerAwareInterface; use Symfony\Component\DependencyInjection\ContainerBuilder; +use Symfony\Component\EventDispatcher\EventDispatcherInterface; use Symfony\Component\Finder\Finder; use Throwable; use TJM\Component\Console\DependencyInjection\ConsoleExtension; use TJM\Component\DependencyInjection\Loader\MultiPathLoader; class Application extends Base implements ContainerAwareInterface{ + protected $dispatcher; public function __construct($config = null){ parent::__construct(); @@ -33,6 +35,11 @@ class Application extends Base implements ContainerAwareInterface{ } } + //--override to support use in `doRun` + public function setDispatcher(EventDispatcherInterface $dispatcher){ + $this->dispatcher = $dispatcher; + } + //--override to remove built in `-n` and `-q` short options protected function configureIO(InputInterface $input, OutputInterface $output){ //--determine decoration
fix: we must override dispatcher because it is private upstream
tobymackenzie_sy-console
train
php
6cb6e26e2ca8b170d0918dc5be1c9ae94a0d942e
diff --git a/library/src/main/java/com/liulishuo/magicprogresswidget/MagicProgressCircle.java b/library/src/main/java/com/liulishuo/magicprogresswidget/MagicProgressCircle.java index <HASH>..<HASH> 100644 --- a/library/src/main/java/com/liulishuo/magicprogresswidget/MagicProgressCircle.java +++ b/library/src/main/java/com/liulishuo/magicprogresswidget/MagicProgressCircle.java @@ -291,8 +291,10 @@ public class MagicProgressCircle extends View implements ISmoothTarget { * @param footOverHead Boolean */ public void setFootOverHead(boolean footOverHead) { - this.isFootOverHead = footOverHead; - invalidate(); + if (this.isFootOverHead != footOverHead) { + this.isFootOverHead = footOverHead; + invalidate(); + } } public boolean isFootOverHead() {
refactor(MagicProgressCircle): effective invalidate when update footOverHead
lingochamp_MagicProgressWidget
train
java
9b525e178922b8a2e6d91edcd4690aecbdbea064
diff --git a/lib/server.js b/lib/server.js index <HASH>..<HASH> 100755 --- a/lib/server.js +++ b/lib/server.js @@ -390,7 +390,7 @@ vantageServer.auth = function(middleware, options) { throw new Error("Invalid middleware string passed into Vantage.auth: " + middleware); } else { var fn = middleware.call(this.parent, this, options); - this._authFn = fn; + this.parent._authFn = fn; } };
fix(auth): Fix auth registration to the parent vantage, not the server
dthree_vantage
train
js
3549e29c381ba8381ad1009c01bd363c689d7cf2
diff --git a/packages/pob/lib/generators/common/babel/index.js b/packages/pob/lib/generators/common/babel/index.js index <HASH>..<HASH> 100644 --- a/packages/pob/lib/generators/common/babel/index.js +++ b/packages/pob/lib/generators/common/babel/index.js @@ -569,7 +569,9 @@ module.exports = class BabelGenerator extends Generator { /* webpack 5 and node with ESM support */ if (useBabel) { - pkg.exports = {}; + pkg.exports = { + './package.json': './package.json', + }; this.entries.forEach((entry) => { const isBrowserOnly =
feat: exports package.json by default
christophehurpeau_pob-lerna
train
js
104fda5667b87019f9ead73c34f3ffa4d1bf03e9
diff --git a/src/dna-template-component.js b/src/dna-template-component.js index <HASH>..<HASH> 100644 --- a/src/dna-template-component.js +++ b/src/dna-template-component.js @@ -30,7 +30,7 @@ export const TemplateMixin = (SuperClass) => class extends SuperClass { constructor() { super(); let template = this.constructor.template; - if (template) { + if (template && !this.hasOwnProperty('template')) { if (typeof template === 'string') { template = new Template(template); Object.defineProperty(this.constructor, 'template', { @@ -42,9 +42,13 @@ export const TemplateMixin = (SuperClass) => class extends SuperClass { value: template.clone().setScope(this), }); } - this.observeProperties(() => { - this.render(); - }); + } + if (this.hasOwnProperty('template')) { + if (this.observeProperties) { + this.observeProperties(() => { + this.render(); + }); + } this.render(); } }
refactor: improve template property handling
chialab_dna
train
js
fb0674145d8a6a2ade48ca6003ea28cd80214228
diff --git a/examples/docgen/docs/.vuepress/config.js b/examples/docgen/docs/.vuepress/config.js index <HASH>..<HASH> 100644 --- a/examples/docgen/docs/.vuepress/config.js +++ b/examples/docgen/docs/.vuepress/config.js @@ -15,6 +15,7 @@ module.exports = async () => { ) return { + base: "/docgen/", dest: path.join(__dirname, '../../dist'), title: 'VuePress DocGen Live', themeConfig: {
docs: repair docgen example
vue-styleguidist_vue-styleguidist
train
js
84af7b1286ce3813fce18a6d7068a09f9b48eed5
diff --git a/javascript/node/selenium-webdriver/http/index.js b/javascript/node/selenium-webdriver/http/index.js index <HASH>..<HASH> 100644 --- a/javascript/node/selenium-webdriver/http/index.js +++ b/javascript/node/selenium-webdriver/http/index.js @@ -213,6 +213,7 @@ function sendRequest(options, onOk, onError, opt_data, opt_proxy, opt_retries) { if (!location.hostname) { location.hostname = hostname; location.port = port; + location.auth = options.auth; } request.abort(); @@ -222,6 +223,7 @@ function sendRequest(options, onOk, onError, opt_data, opt_proxy, opt_retries) { hostname: location.hostname, port: location.port, path: location.path, + auth: location.auth, pathname: location.pathname, search: location.search, hash: location.hash,
fix(nodejs): include auth in same domain redirects (#<I>)
SeleniumHQ_selenium
train
js
434de23e9ad5123b0b19ad5ac4339715ec954d3e
diff --git a/frigg_worker/fetcher.py b/frigg_worker/fetcher.py index <HASH>..<HASH> 100644 --- a/frigg_worker/fetcher.py +++ b/frigg_worker/fetcher.py @@ -123,5 +123,5 @@ def upgrade(): pip.main(['install', '-U', 'frigg-worker']) pip.main(['install', '-U', 'frigg-settings']) pip.main(['install', '-U', 'frigg-test-discovery']) - pip.main(['install', '-U', 'docker-wrapper-py']) + pip.main(['install', '-U', 'docker-wrapper']) sys.exit(1) diff --git a/tests/test_fetcher.py b/tests/test_fetcher.py index <HASH>..<HASH> 100644 --- a/tests/test_fetcher.py +++ b/tests/test_fetcher.py @@ -109,5 +109,5 @@ class FetcherTests(TestCase): call(['install', '-U', 'frigg-worker']), call(['install', '-U', 'frigg-settings']), call(['install', '-U', 'frigg-test-discovery']), - call(['install', '-U', 'docker-wrapper-py']) + call(['install', '-U', 'docker-wrapper']) ])
fix(deps): Set correct ref to docker-wrapper in fetcher
frigg_frigg-worker
train
py,py
56781cbcfd0e8768958654489fe5c4ac75a2ae34
diff --git a/system/Router/Router.php b/system/Router/Router.php index <HASH>..<HASH> 100644 --- a/system/Router/Router.php +++ b/system/Router/Router.php @@ -125,6 +125,8 @@ class Router implements RouterInterface $this->method = $this->collection->getDefaultMethod(); $this->collection->setHTTPVerb($request->getMethod() ?? strtolower($_SERVER['REQUEST_METHOD'])); + + $this->translateURIDashes = $this->collection->shouldTranslateURIDashes(); } /** @@ -135,8 +137,6 @@ class Router implements RouterInterface */ public function handle(?string $uri = null) { - $this->translateURIDashes = $this->collection->shouldTranslateURIDashes(); - // If we cannot find a URI to match against, then // everything runs off of its default settings. if ($uri === null || $uri === '') {
refactor: move property initialization to constructor
codeigniter4_CodeIgniter4
train
php
408ef69c6c65141b8d11d8513c34c9d2795fd67b
diff --git a/packages/pob/lib/generators/monorepo/index.js b/packages/pob/lib/generators/monorepo/index.js index <HASH>..<HASH> 100644 --- a/packages/pob/lib/generators/monorepo/index.js +++ b/packages/pob/lib/generators/monorepo/index.js @@ -18,6 +18,12 @@ const getAppTypes = (configs) => { return [...appTypes]; }; +const hasDist = (configs) => { + return configs.some( + (config) => config && config.project && config.project.type === 'lib', + ); +}; + module.exports = class PobMonorepoGenerator extends Generator { constructor(args, opts) { super(args, opts); @@ -162,7 +168,10 @@ module.exports = class PobMonorepoGenerator extends Generator { testing: this.pobLernaConfig.testing, useYarn2: this.options.useYarn2, appTypes: JSON.stringify(getAppTypes(this.packageConfigs)), - ignorePaths: '', + ignorePaths: + this.pobLernaConfig.typescript && hasDist(this.packageConfigs) + ? '/dist' + : '', }); this.composeWith(require.resolve('../lib/doc'), {
fix: missing dist prettierignore monorepo with lib
christophehurpeau_pob-lerna
train
js
9f2224faf1830f70a96e42ec0fecd7bd2cc38269
diff --git a/packages/tree-view/src/TreeItem.js b/packages/tree-view/src/TreeItem.js index <HASH>..<HASH> 100644 --- a/packages/tree-view/src/TreeItem.js +++ b/packages/tree-view/src/TreeItem.js @@ -10,11 +10,9 @@ const TreeItem = props => { collapsed, defaultCollapsed, expandByDoubleClick, - getKeyboardOpenId, icon, id, label, - setKeyboardOpenId, stylesheet, ...otherProps } = props; @@ -22,9 +20,11 @@ const TreeItem = props => { defaultSelected, getActiveTreeItemId, getCurrentItemClicked, + getKeyboardOpenId, isControlled, onFocus, - selected + selected, + setKeyboardOpenId } = otherProps; const getActiveId = () => { if (isControlled()) {
refactor: switch internal props to ...otherProps
Autodesk_hig
train
js
3ca6d0ef9ad6d7c21f252c390674907952f653ee
diff --git a/views/js/qtiCreator/helper/xincludeRenderer.js b/views/js/qtiCreator/helper/xincludeRenderer.js index <HASH>..<HASH> 100644 --- a/views/js/qtiCreator/helper/xincludeRenderer.js +++ b/views/js/qtiCreator/helper/xincludeRenderer.js @@ -74,7 +74,7 @@ define([ //reload the wiget to rfresh the rendering with the new href xincludeWidget.refresh(); }, loadedClasses); - _.each(xincludeHandlers, handler => handler(xinclude.attr('href'), className)); + _.each(xincludeHandlers, handler => handler(xinclude.attr('href'), className, xi.serial)); } else { //loading failure : xinclude.removeAttr('href');
fix: fix passage css format on Items
oat-sa_extension-tao-itemqti
train
js
2c186cd02ecc4360489748d8cf203f16c36bd4e2
diff --git a/lib/components/form/settings-selector-panel.js b/lib/components/form/settings-selector-panel.js index <HASH>..<HASH> 100644 --- a/lib/components/form/settings-selector-panel.js +++ b/lib/components/form/settings-selector-panel.js @@ -208,13 +208,13 @@ class SettingsSelectorPanel extends Component { {/* The transit mode selected */} {hasTransit(mode) && (<div style={{ marginBottom: 16 }}> <div className='setting-label'>Use</div> - <div style={{ textAlign: 'right' }}> + <div style={{ textAlign: 'left' }}> {transitModes.map((mode, k) => { let classNames = ['select-button'] if (this._modeIsActive(mode)) classNames.push('active') return <Button key={mode.mode} className={classNames.join(' ')} - style={{ marginTop: 3, marginBottom: 3 }} + style={{ marginTop: 3, marginBottom: 3, marginLeft: 0, marginRight: 5 }} onClick={() => this._toggleTransitMode(mode)} > <div
feat(form): Change styling/alignment of mode selection buttons
opentripplanner_otp-react-redux
train
js
11eef251b2348d1c895e70911ff4ad9d58e8cd19
diff --git a/superset/db_engine_specs/base.py b/superset/db_engine_specs/base.py index <HASH>..<HASH> 100644 --- a/superset/db_engine_specs/base.py +++ b/superset/db_engine_specs/base.py @@ -1255,6 +1255,14 @@ class BaseEngineSpec: # pylint: disable=too-many-public-methods ) @classmethod + def is_select_query(cls, parsed_query: ParsedQuery) -> bool: + """ + Determine if the statement should be considered as SELECT statement. + Some query dialects do not contain "SELECT" word in queries (eg. Kusto) + """ + return parsed_query.is_select() + + @classmethod @utils.memoized def get_column_spec( cls, diff --git a/superset/sql_lab.py b/superset/sql_lab.py index <HASH>..<HASH> 100644 --- a/superset/sql_lab.py +++ b/superset/sql_lab.py @@ -217,7 +217,7 @@ def execute_sql_statement( query.select_as_cta_used = True # Do not apply limit to the CTA queries when SQLLAB_CTAS_NO_LIMIT is set to true - if parsed_query.is_select() and not ( + if db_engine_spec.is_select_query(parsed_query) and not ( query.select_as_cta_used and SQLLAB_CTAS_NO_LIMIT ): if SQL_MAX_ROW and (not query.limit or query.limit > SQL_MAX_ROW):
feat: Add "is_select_query" method to base engine spec to make it possible to override it (#<I>)
apache_incubator-superset
train
py,py
ba86f518847c50fb689450691f52d180883af3a9
diff --git a/routing.go b/routing.go index <HASH>..<HASH> 100644 --- a/routing.go +++ b/routing.go @@ -509,12 +509,13 @@ func (dht *IpfsDHT) FindProviders(ctx context.Context, c cid.Cid) ([]peer.AddrIn // Peers will be returned on the channel as soon as they are found, even before // the search query completes. func (dht *IpfsDHT) FindProvidersAsync(ctx context.Context, key cid.Cid, count int) <-chan peer.AddrInfo { + peerOut := make(chan peer.AddrInfo, count) if !dht.enableProviders { - return nil + close(peerOut) + return peerOut } logger.Event(ctx, "findProviders", key) - peerOut := make(chan peer.AddrInfo, count) go dht.findProvidersAsyncRoutine(ctx, key, count, peerOut) return peerOut
fix: return a closed channel from FindProvidersAsync when providers are disabled.
libp2p_go-libp2p-kad-dht
train
go
68e1c7f58a32587f67130bd336dfd20bf78b6ae4
diff --git a/lib/https/index.js b/lib/https/index.js index <HASH>..<HASH> 100644 --- a/lib/https/index.js +++ b/lib/https/index.js @@ -105,6 +105,12 @@ function handleWebsocket(socket, clientIp, callback) { if (filter.rule) { plugin = null; } + if (!_rules.host) { + var _pluginRules = rulesMgr.resolveRules(fullUrl); + if (_pluginRules.host) { + _rules.host = _pluginRules.host; + } + } Object.keys(filter).forEach(function(name) { delete _rules[name]; }); diff --git a/lib/index.js b/lib/index.js index <HASH>..<HASH> 100644 --- a/lib/index.js +++ b/lib/index.js @@ -51,6 +51,12 @@ function tunnelProxy(server, proxy) { if (rulesMgr) { extend(filter, rulesMgr.resolveFilter(tunnelUrl)); extend(disable, rulesMgr.resolveDisable(tunnelUrl)); + if (!_rules.host) { + var _pluginRules = rulesMgr.resolveRules(fullUrl); + if (_pluginRules.host) { + _rules.host = _pluginRules.host; + } + } Object.keys(filter).forEach(function(name) { delete _rules[name]; });
refactor: show plugins rules in overview
avwo_whistle
train
js,js
1a99e7b7f4b7f220c515a2db41145129f4e8393f
diff --git a/packages/puppeteer-extra-plugin-stealth/evasions/user-agent-override/index.test.js b/packages/puppeteer-extra-plugin-stealth/evasions/user-agent-override/index.test.js index <HASH>..<HASH> 100644 --- a/packages/puppeteer-extra-plugin-stealth/evasions/user-agent-override/index.test.js +++ b/packages/puppeteer-extra-plugin-stealth/evasions/user-agent-override/index.test.js @@ -37,7 +37,7 @@ test('vanilla: navigator.platform set to host platform', async t => { const platform = await page.evaluate(() => navigator.platform) switch (process.platform) { case 'linux': - t.true(platform === 'Linux') + t.true(platform.includes('Linux')) // TravisCI break case 'darwin': t.true(platform === 'MacIntel')
chore(plugin-stealth): Fix tests for TravisCI
berstend_puppeteer-extra
train
js
07a03e6fcc69916f8ba447f3adba1d243048de62
diff --git a/packages/xod-fs/src/utils.js b/packages/xod-fs/src/utils.js index <HASH>..<HASH> 100644 --- a/packages/xod-fs/src/utils.js +++ b/packages/xod-fs/src/utils.js @@ -10,25 +10,21 @@ export const resolvePath = R.compose( ); // :: string -> boolean -export const isDirectoryExists = R.compose( - R.tryCatch( - R.compose( - R.invoker(0, 'isDirectory'), - fs.statSync - ), - R.F +export const isDirectoryExists = R.tryCatch( + R.compose( + R.invoker(0, 'isDirectory'), + fs.statSync, + resolvePath ), - resolvePath + R.F ); // :: string -> boolean -export const isFileExists = R.compose( - R.tryCatch( - R.compose( - R.invoker(0, 'isFile'), - fs.statSync - ), - R.F +export const isFileExists = R.tryCatch( + R.compose( + R.invoker(0, 'isFile'), + fs.statSync, + resolvePath ), - resolvePath + R.F );
refactor(xod-fs): refactor `isFileExists` and `isDirectoryExists` functions
xodio_xod
train
js
cbc65c7f311a366aa3618a18c1a439a72f482218
diff --git a/scripts/partialBuild.js b/scripts/partialBuild.js index <HASH>..<HASH> 100644 --- a/scripts/partialBuild.js +++ b/scripts/partialBuild.js @@ -12,7 +12,7 @@ rollupConfig.plugins.push(partialBuildPlugin); rollup.rollup(rollupConfig).then(function(bundle) { return bundle.generate(rollupConfig.output); }).then(function(result) { - process.stdout.write(result.code); + result.output.forEach(x => process.stdout.write(x.code)) }); function partialBuild(options) {
fix: partial build (#<I>) * fixed partial build output * write multiple chunks
ramda_ramda
train
js
0530d5909e9ca420ac668fde858c7c56a85bdfe4
diff --git a/src/Lucid/QueryBuilder/methods.js b/src/Lucid/QueryBuilder/methods.js index <HASH>..<HASH> 100644 --- a/src/Lucid/QueryBuilder/methods.js +++ b/src/Lucid/QueryBuilder/methods.js @@ -451,6 +451,8 @@ methods.scope = function (target) { */ methods.ids = function (target) { return function () { + const serializer = new target.HostModel.QuerySerializer(target, this) + serializer._decorateQuery() return target.modelQueryBuilder.select(target.HostModel.primaryKey).pluck(target.HostModel.primaryKey) } } @@ -465,6 +467,8 @@ methods.ids = function (target) { */ methods.pair = function (target) { return function (lhs, rhs) { + const serializer = new target.HostModel.QuerySerializer(target, this) + serializer._decorateQuery() return target.modelQueryBuilder.select(lhs, rhs).reduce(function (result, row) { result[row[lhs]] = row[rhs] return result
fix(soft-deletes): pairs and ids ignore soft deleted Closes #<I>
adonisjs_adonis-lucid
train
js
312d0b5b357c70be3ffcc91c13a0b8b78a12821f
diff --git a/test.js b/test.js index <HASH>..<HASH> 100644 --- a/test.js +++ b/test.js @@ -7,9 +7,20 @@ var sut = require("./index"); var lib = require("./lib"); var quick_check = function (describe_string, it_string, it_func) { return describe(describe_string, function () { - return _.times(500, function (n) { + var times = 500; + var counter; + before(function () { + counter = 0; + }); + after(function () { + assert.strictEqual(counter, times); + }); + return _.times(times, function (n) { n = n + 1; - return it(it_string + " (try #" + n + ")", function () { return it_func; }); + return it(it_string + " (try #" + n + ")", function () { + it_func(); + counter = counter + 1; + }); }); }); };
test(quick_check): add sanity check on number of tests executed
janraasch_javascript-commitment
train
js
e188020a7f484dc10ebbad76ab2defd2da56a6e2
diff --git a/testRunner.js b/testRunner.js index <HASH>..<HASH> 100755 --- a/testRunner.js +++ b/testRunner.js @@ -139,6 +139,7 @@ async function check(file) { result = result.split(' - undefined').join('x'); result = result.split(' `undefined`').join('x'); result = result.split('_undefined').join('x'); + result = result.split('undefined error').join('x'); if (ok && result.indexOf('undefined')>=0) { message = 'Ok except for undefined references'; ok = false;
fix: more undefined in text fields
Mermade_widdershins
train
js
61f63bd9e8f576c4b7b673171dc7262bd3c26ae8
diff --git a/test/integration.js b/test/integration.js index <HASH>..<HASH> 100644 --- a/test/integration.js +++ b/test/integration.js @@ -35,20 +35,20 @@ test('should work with a single pid', async t => { test('should work with an array of pids', async t => { const child = spawn( 'node', - ['-e', 'console.log(123); var c = 0; while(true) {c = Math.pow(c, c);}'], + ['-e', 'console.log(`123`); setInterval(() => {}, 1000)'], { windowsHide: true } ) const ppid = process.pid const pid = child.pid - await t.notThrows(() => + await t.notThrowsAsync( new Promise((resolve, reject) => { child.stdout.on('data', d => resolve(d.toString())) child.stderr.on('data', d => reject(d.toString())) child.on('error', reject) - child.on('exit', reject) + child.on('exit', code => reject(new Error('script exited with code ' + code))) }), - 'script not executed' + 'script not executed' ) const pids = [ppid, pid]
test: os x deterministic
soyuka_pidusage
train
js
b54dfe5052226ad5c353208b039b06adf4da51f5
diff --git a/packages/plugin-phone/src/call.js b/packages/plugin-phone/src/call.js index <HASH>..<HASH> 100644 --- a/packages/plugin-phone/src/call.js +++ b/packages/plugin-phone/src/call.js @@ -832,11 +832,14 @@ const Call = SparkPlugin.extend({ offerToReceiveAudio: recvOnly || !!options.constraints.audio, offerToReceiveVideo: recvOnly || !!options.constraints.video }); + + this.media.set({ + audio: options.constraints.audio, + video: options.constraints.video + }); } this.media.set({ - audio: options.constraints.audio, - video: options.constraints.video, offerToReceiveAudio: options.offerOptions.offerToReceiveAudio, offerToReceiveVideo: options.offerOptions.offerToReceiveVideo });
fix(plugin-phone): Fix options setting for _join
webex_spark-js-sdk
train
js
09637a30fa00f86fe81a3191069304effb44cbd5
diff --git a/test/test.js b/test/test.js index <HASH>..<HASH> 100644 --- a/test/test.js +++ b/test/test.js @@ -96,15 +96,23 @@ describe('node-serialize', function () { '', 'http://www.w3.org/1999/xhtml' ); - - // Some older browsers require the DOCTYPE to be within a Document, - // otherwise the "serialize" custom event is considered "cancelled". - // See: https://travis-ci.org/webmodules/dom-serialize/builds/47307749 - var doc = document.implementation.createDocument('http://www.w3.org/1999/xhtml', 'root-element', node); + document.implementation.createDocument('http://www.w3.org/1999/xhtml', 'root-element', node); assert.equal('<!DOCTYPE root-element SYSTEM "http://www.w3.org/1999/xhtml">', serialize(node)); }); + + it('should serialize an HTML5 Doctype node', function () { + node = document.implementation.createDocumentType( + 'html', + '', + '' + ); + document.implementation.createDocument('http://www.w3.org/1999/xhtml', 'node', node); + + assert.equal('<!DOCTYPE html>', serialize(node)); + }); + it('should serialize a DocumentFragment node', function () { node = document.createDocumentFragment(); node.appendChild(document.createElement('b'));
test: add HTML5 Doctype test, for <I>% test code coverage!
webmodules_dom-serialize
train
js
c65bf5bbc6f8829849b58fbdd18704672b20b51b
diff --git a/core/src/elements/ons-fab.js b/core/src/elements/ons-fab.js index <HASH>..<HASH> 100755 --- a/core/src/elements/ons-fab.js +++ b/core/src/elements/ons-fab.js @@ -72,6 +72,13 @@ export default class FabElement extends BaseElement { */ init() { + // The following statements can be executed before contentReady + // since these do not access the children + { + this.show(); + this.classList.add(defaultClassName); + } + contentReady(this, () => { this._compile(); }); @@ -80,8 +87,6 @@ export default class FabElement extends BaseElement { _compile() { autoStyle.prepare(this); - this.classList.add(defaultClassName); - if (!util.findChild(this, '.fab__icon')) { const content = document.createElement('span'); content.classList.add('fab__icon'); @@ -99,8 +104,6 @@ export default class FabElement extends BaseElement { ModifierUtil.initModifier(this, scheme); this._updatePosition(); - - this.show(); } static get observedAttributes() {
fix(ons-fab): Execute this.show() and some statements before contentReady.
OnsenUI_OnsenUI
train
js
f7a8564c52f39e57c335ca1c522ca64f835f9080
diff --git a/packages/cli/utils/PluginsContainer.js b/packages/cli/utils/PluginsContainer.js index <HASH>..<HASH> 100644 --- a/packages/cli/utils/PluginsContainer.js +++ b/packages/cli/utils/PluginsContainer.js @@ -35,6 +35,10 @@ module.exports = class PluginsContainer { return Array.from(plugins); } + findByType(type) { + return Object.values(this.plugins).filter(pl => pl.type === type); + } + register(...args) { assign(...args, this.plugins); }
fix: add missing findByType method
Webiny_webiny-js
train
js
d0b48fd6fbbe141f9872c5c1686a27b8e84c75c8
diff --git a/src/main/java/se/bjurr/gitchangelog/api/GitChangelogApiConstants.java b/src/main/java/se/bjurr/gitchangelog/api/GitChangelogApiConstants.java index <HASH>..<HASH> 100644 --- a/src/main/java/se/bjurr/gitchangelog/api/GitChangelogApiConstants.java +++ b/src/main/java/se/bjurr/gitchangelog/api/GitChangelogApiConstants.java @@ -4,7 +4,7 @@ public final class GitChangelogApiConstants { public static final String ZERO_COMMIT = "0000000000000000000000000000000000000000"; public static final String REF_MASTER = "master"; - public static final boolean DEFAULT_REMOVE_ISSUE = true; + public static final boolean DEFAULT_REMOVE_ISSUE = false; public static final String DEFAULT_TIMEZONE = "UTC"; public static final String DEFAULT_DATEFORMAT = "yyyy-MM-dd HH:mm:ss"; public static final String DEFAULT_IGNORE_COMMITS_REGEXP = "";
fix: not removing issue from message by default
tomasbjerre_git-changelog-lib
train
java
602de65e07c64143f768567430b050be6c41a151
diff --git a/src/Matcher.php b/src/Matcher.php index <HASH>..<HASH> 100644 --- a/src/Matcher.php +++ b/src/Matcher.php @@ -7,7 +7,7 @@ class Matcher private static $rules = [ "/^(true|false)$/i" => '_parseBooleanConstant', "/^(['\"])(?:(?!\\1).)*\\1$/" => '_parseStringConstant', - "/^[a-zA-Z+]$/" => '_parseIdentifier', + "/^[a-zA-Z]+$/" => '_parseIdentifier', "/^_$/" => '_parseWildcard', "/^\\[.*\\]$/" => '_parseArray', ]; diff --git a/tests/PHPFunctional/PatternMatching/Matcher.php b/tests/PHPFunctional/PatternMatching/Matcher.php index <HASH>..<HASH> 100644 --- a/tests/PHPFunctional/PatternMatching/Matcher.php +++ b/tests/PHPFunctional/PatternMatching/Matcher.php @@ -72,6 +72,7 @@ class Matcher extends atoum $function = function($a) { return $a; }; $this->variable(M::match($value, ['a' => $function]))->isEqualTo($value); + $this->variable(M::match($value, ['longIdentifier' => $function]))->isEqualTo($value); } public function identifierDataProvider()
fix: identifiers can be more than one char long
functional-php_pattern-matching
train
php,php
5cb32f8241e57614a89fb5ab06afeb43a824c62f
diff --git a/views/js/layout/actions.js b/views/js/layout/actions.js index <HASH>..<HASH> 100644 --- a/views/js/layout/actions.js +++ b/views/js/layout/actions.js @@ -311,6 +311,14 @@ define([ action = _.find(actions, {name : actionName}); } return action; + }, + + /** + * Returns the current ResourceContext so can be used outside + * the context of common actions executions + */ + getResourceContext: function() { + return resourceContext; } });
chore(action-manager): add method to get resourceContext
oat-sa_tao-core
train
js
2996273ade4eface95ecdce8a2fee36c14dfe8e6
diff --git a/app/models/has_vcards/concerns/has_vcards.rb b/app/models/has_vcards/concerns/has_vcards.rb index <HASH>..<HASH> 100644 --- a/app/models/has_vcards/concerns/has_vcards.rb +++ b/app/models/has_vcards/concerns/has_vcards.rb @@ -27,7 +27,8 @@ module HasVcards def vcard_with_autobuild vcard_without_autobuild || build_vcard end - alias_method_chain :vcard, :autobuild + alias_method :vcard_without_autobuild, :vcard + alias_method :vcard, :vcard_with_autobuild # Access restrictions if defined?(ActiveModel::MassAssignmentSecurity) diff --git a/app/models/has_vcards/vcard.rb b/app/models/has_vcards/vcard.rb index <HASH>..<HASH> 100644 --- a/app/models/has_vcards/vcard.rb +++ b/app/models/has_vcards/vcard.rb @@ -28,7 +28,9 @@ module HasVcards def address_with_autobuild address_without_autobuild || build_address end - alias_method_chain :address, :autobuild + alias_method :address_without_autobuild, :address + alias_method :address, :address_with_autobuild + # Contacts has_many :contacts, class_name: 'PhoneNumber', inverse_of: :vcard do
fix: alias_method_chain is deprecated, replaced with alias_method
huerlisi_has_vcards
train
rb,rb
d06a7bd6f5ff04a16f84780a611ec46bb68a16fc
diff --git a/platform/nativescript/runtime/components/frame.js b/platform/nativescript/runtime/components/frame.js index <HASH>..<HASH> 100644 --- a/platform/nativescript/runtime/components/frame.js +++ b/platform/nativescript/runtime/components/frame.js @@ -22,6 +22,16 @@ export default { required: false, default: null }, + clearHistory: { + type: Boolean, + required: false, + default: false + }, + backstackVisible: { + type: Boolean, + required: false, + default: true + }, // injected by the template compiler hasRouterView: { default: false @@ -88,6 +98,8 @@ export default { notifyPageMounted(pageVm) { let options = { + backstackVisible: this.backstackVisible, + clearHistory: this.clearHistory, create: () => pageVm.$el.nativeView }
feat(frame): allow setting clearHistory and backstackVisible options for default pages. (#<I>)
nativescript-vue_nativescript-vue
train
js
9bf60f26b45577de80e5ba7652f52e9238640795
diff --git a/detox/src/index.js b/detox/src/index.js index <HASH>..<HASH> 100644 --- a/detox/src/index.js +++ b/detox/src/index.js @@ -6,7 +6,7 @@ const argparse = require('./utils/argparse'); const InvocationManager = require('./invoke').InvocationManager; const configuration = require('./configuration'); -log.level = loglevel = argparse.getArgValue('loglevel') || 'info'; +log.level = argparse.getArgValue('loglevel') || 'info'; log.heading = 'detox'; let websocket;
fix: ReferenceError: loglevel is not defined
wix_Detox
train
js
047b745110ff445ca1bd2caf9b721320cea245f3
diff --git a/packages/webiny-app-cms/src/editor/plugins/defaultBar/components/PublishPageButton.js b/packages/webiny-app-cms/src/editor/plugins/defaultBar/components/PublishPageButton.js index <HASH>..<HASH> 100644 --- a/packages/webiny-app-cms/src/editor/plugins/defaultBar/components/PublishPageButton.js +++ b/packages/webiny-app-cms/src/editor/plugins/defaultBar/components/PublishPageButton.js @@ -46,7 +46,7 @@ const PublishPageButton = ({ page, showSnackbar, router }) => { }); }} > - Publish + {page.version > 1 ? "Publish changes" : "Publish"} </ButtonPrimary> )} </Mutation>
fix: show "publish changes" instead of just "publish" when editing a new revision (#<I>)
Webiny_webiny-js
train
js
4c995d3bc9bfe9c5c01777ba760762d6fb3c4db6
diff --git a/apps/actor-web/src/app/components/common/MessageItem.react.js b/apps/actor-web/src/app/components/common/MessageItem.react.js index <HASH>..<HASH> 100644 --- a/apps/actor-web/src/app/components/common/MessageItem.react.js +++ b/apps/actor-web/src/app/components/common/MessageItem.react.js @@ -112,9 +112,7 @@ const markedOptions = { const processText = function(text) { var markedText = marked(text, markedOptions); // need hack with replace because of https://github.com/Ranks/emojify.js/issues/127 - console.log(markedText); var emojifiedText = emojify.replace(markedText.replace(/<p>/g, '<p> ')); - console.log(emojifiedText); return emojifiedText; };
fix(web): removed unnessesary console.log
actorapp_actor-platform
train
js
036346b604db75f2936ee6571031b88f68b52493
diff --git a/reposerver/repository/repository.go b/reposerver/repository/repository.go index <HASH>..<HASH> 100644 --- a/reposerver/repository/repository.go +++ b/reposerver/repository/repository.go @@ -1117,7 +1117,8 @@ func (s *Service) GetAppDetails(ctx context.Context, q *apiclient.RepoServerAppD continue } fName := f.Name() - if strings.Contains(fName, "values") && (filepath.Ext(fName) == ".yaml" || filepath.Ext(fName) == ".yml") { + fileNameExt := strings.ToLower(filepath.Ext(fName)) + if strings.Contains(fName, "values") && (fileNameExt == ".yaml" || fileNameExt == ".yml") { res.Helm.ValueFiles = append(res.Helm.ValueFiles, fName) } }
fix: file exention comparisons are case sensitive (#<I>)
argoproj_argo-cd
train
go
25ec3f3c3add7964570383cd3c9592946152baf5
diff --git a/tests/selenium_test.go b/tests/selenium_test.go index <HASH>..<HASH> 100644 --- a/tests/selenium_test.go +++ b/tests/selenium_test.go @@ -1,3 +1,5 @@ +// +build selenium + /* * Copyright (C) 2017 Red Hat, Inc. *
test: restrict selenium tests runs only in selenium ci job Change-Id: I<I>aa<I>ab<I>a<I>a<I>a<I>c5ce7bbc<I> Reviewed-on: <URL>
skydive-project_skydive
train
go
1da7699321468efda4b8002530e711f99015c7df
diff --git a/src/components/DatePicker/index.js b/src/components/DatePicker/index.js index <HASH>..<HASH> 100644 --- a/src/components/DatePicker/index.js +++ b/src/components/DatePicker/index.js @@ -165,13 +165,11 @@ class DatePickerComponent extends Component { } } -function DatePicker({ locale, ...rest }) { - return ( - <Consumer> - {values => <DatePickerComponent locale={getLocale(values, locale)} {...rest} />} - </Consumer> - ); -} +const DatePicker = React.forwardRef(({ locale, ...rest }, ref) => ( + <Consumer> + {values => <DatePickerComponent ref={ref} locale={getLocale(values, locale)} {...rest} />} + </Consumer> +)); DatePicker.propTypes = { /** Sets the date for the DatePicker programmatically. */
fix: warning 'Function components cannot be given refs' on DatePicker component (#<I>)
90milesbridge_react-rainbow
train
js
aeeb94e04f41a4632e566139d51f075a6938d4da
diff --git a/src/utils/clean-cid.js b/src/utils/clean-cid.js index <HASH>..<HASH> 100644 --- a/src/utils/clean-cid.js +++ b/src/utils/clean-cid.js @@ -7,6 +7,9 @@ module.exports = function (cid) { if (Buffer.isBuffer(cid)) { cid = bs58.encode(cid) } + if (CID.isCID(cid)) { + cid = cid.toBaseEncodedString() + } if (typeof cid !== 'string') { throw new Error('unexpected cid type: ' + typeof cid) }
feat: add ability to files.cat with a cid instance License: MIT
ipfs_js-ipfs
train
js
4775b223d35dc896534b6b767b026977722c6e5a
diff --git a/src/components/Picklist/index.js b/src/components/Picklist/index.js index <HASH>..<HASH> 100644 --- a/src/components/Picklist/index.js +++ b/src/components/Picklist/index.js @@ -76,6 +76,7 @@ class Picklist extends Component { this.outsideClick.startListening(this.containerRef.current, (_, event) => { if (this.eventTarget !== event.target) { this.closeMenu(); + this.handleBlur(); } }); this.windowScrolling.startListening(this.handleWindowScroll); @@ -153,6 +154,8 @@ class Picklist extends Component { } handleBlur() { + const { isOpen } = this.state; + if (isOpen) return; const { onBlur, value } = this.props; const eventValue = value || null; onBlur(eventValue);
fix: `onBlur` event on Picklist fires on click (#<I>) * fix: `onBlur` event on Picklist fires on click * fix: fire onBlur event on outside click
90milesbridge_react-rainbow
train
js
2f56d4260d67d5ba7529b06dbbb9b005d0b6d2bd
diff --git a/hardware/opentrons_hardware/hardware_control/constants.py b/hardware/opentrons_hardware/hardware_control/constants.py index <HASH>..<HASH> 100644 --- a/hardware/opentrons_hardware/hardware_control/constants.py +++ b/hardware/opentrons_hardware/hardware_control/constants.py @@ -2,5 +2,5 @@ from typing_extensions import Final -interrupts_per_sec: Final = 170000 +interrupts_per_sec: Final = 100000 """The number of motor interrupts per second."""
refactor(CAN): <I>khz is the frequency of the interrupt. And the frequency of the interrupt is <I>khz. (#<I>)
Opentrons_opentrons
train
py
9d2e6aa85a93e56113157a2cb9ef729b497b54d6
diff --git a/src/Http/Routes/Squads/Routes.php b/src/Http/Routes/Squads/Routes.php index <HASH>..<HASH> 100644 --- a/src/Http/Routes/Squads/Routes.php +++ b/src/Http/Routes/Squads/Routes.php @@ -56,7 +56,7 @@ Route::prefix('/{squad}') // update a squad Route::put('/') ->name('squads.update') - ->uses('SquadsController@udpate') + ->uses('SquadsController@update') ->middleware('can:squads.edit,squad'); // remove a squad
fix(squads): address a typo in update route
eveseat_web
train
php
6b7fd29a344b1ddaa02ebd5319a3bb6877ed14e7
diff --git a/ui/src/components/img/QImg.js b/ui/src/components/img/QImg.js index <HASH>..<HASH> 100644 --- a/ui/src/components/img/QImg.js +++ b/ui/src/components/img/QImg.js @@ -64,6 +64,14 @@ export default Vue.extend({ url () { return this.currentSrc || this.placeholderSrc || void 0 + }, + + attrs () { + const att = { role: 'img' } + if (this.alt !== void 0) { + att['aria-label'] = this.alt + } + return att } }, @@ -221,10 +229,7 @@ export default Vue.extend({ render (h) { return h('div', { staticClass: 'q-img overflow-hidden', - attrs: this.alt !== void 0 ? { - role: 'img', - 'aria-label': this.alt - } : null, + attrs: this.attrs, on: this.$listeners }, [ h('div', {
fix(QImg): always render "role" attribute
quasarframework_quasar
train
js
98406fbe52f6f2998d17b1096ef8f28e982b1521
diff --git a/src/store.js b/src/store.js index <HASH>..<HASH> 100644 --- a/src/store.js +++ b/src/store.js @@ -53,6 +53,8 @@ export class Store { this._highlightPreTag = '<em>'; this._highlightPostTag = '</em>'; + this._cacheEnabled = true; + this.algoliaHelper = helper; } @@ -355,11 +357,25 @@ export class Store { }; } - // Todo: find a better name for this function. refresh() { + if (this._cacheEnabled === false) { + this.clearCache(); + } this._helper.search(); } + enableCache() { + this._cacheEnabled = true; + } + + disableCache() { + this._cacheEnabled = false; + } + + clearCache() { + this.algoliaClient.clearCache(); + } + waitUntilInSync() { return new Promise((resolve, reject) => { if (this._helper.hasPendingRequests() === false) {
feat(store): add methods to interact with cache Closes: #<I>
algolia_vue-instantsearch
train
js