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
4ed662984e006d889436dec4e6432e5a2355cdce
diff --git a/test/runTest/runtime/ActionPlayback.js b/test/runTest/runtime/ActionPlayback.js index <HASH>..<HASH> 100644 --- a/test/runTest/runtime/ActionPlayback.js +++ b/test/runTest/runtime/ActionPlayback.js @@ -186,7 +186,10 @@ export class ActionPlayback { screenshotTaken = true; break; case 'valuechange': - document.querySelector(op.selector).value = op.value; + const selector = document.querySelector(op.selector); + selector.value = op.value; + // changing value via js won't trigger `change` event, so trigger it manually + selector.dispatchEvent(new Event('change')); break; } @@ -213,4 +216,4 @@ export class ActionPlayback { return true; } -}; \ No newline at end of file +};
test(vrt): fix changing value of select via js doesn't trigger `change` event.
apache_incubator-echarts
train
js
0801ee76ab5a6ecb32044b5317419fec3b18ce36
diff --git a/src/geshi/ocaml-brief.php b/src/geshi/ocaml-brief.php index <HASH>..<HASH> 100644 --- a/src/geshi/ocaml-brief.php +++ b/src/geshi/ocaml-brief.php @@ -38,7 +38,7 @@ ************************************************************************************/ $language_data = array ( - 'LANG_NAME' => 'OCaml', + 'LANG_NAME' => 'OCaml (brief)', 'COMMENT_SINGLE' => array(), 'COMMENT_MULTI' => array('(*' => '*)'), 'CASE_KEYWORDS' => 0, diff --git a/src/geshi/php-brief.php b/src/geshi/php-brief.php index <HASH>..<HASH> 100644 --- a/src/geshi/php-brief.php +++ b/src/geshi/php-brief.php @@ -48,7 +48,7 @@ ************************************************************************************/ $language_data = array ( - 'LANG_NAME' => 'PHP', + 'LANG_NAME' => 'PHP (brief)', 'COMMENT_SINGLE' => array(1 => '//', 2 => '#'), 'COMMENT_MULTI' => array('/*' => '*/'), //Heredoc and Nowdoc syntax
fix: SF#<I>: Fixed ambigious naming of OCaml and PHP brief language file versions
GeSHi_geshi-1.0
train
php,php
551eb06b9983b9d790ed7ce85a8d2af657b4e86e
diff --git a/app/lib/quasar-config.js b/app/lib/quasar-config.js index <HASH>..<HASH> 100644 --- a/app/lib/quasar-config.js +++ b/app/lib/quasar-config.js @@ -15,6 +15,7 @@ const cssVariables = require('./helpers/css-variables') const getDevlandFile = require('./helpers/get-devland-file') const transformAssetUrls = getDevlandFile('quasar/dist/transform-asset-urls.json') +const urlRegex = /^http(s)?:\/\// function encode (obj) { return JSON.stringify(obj, (_, value) => { @@ -33,7 +34,7 @@ function formatPublicPath (path) { path = `${path}/` } - if (path.startsWith('http://') || path.startsWith('https://')) { + if (urlRegex.test(path) === true) { return path } @@ -740,7 +741,7 @@ class QuasarConfig { } cfg.pwa.manifest.icons = cfg.pwa.manifest.icons.map(icon => { - if (icon.src.startsWith('http') !== true) { + if (urlRegex.test(icon.src) === false) { icon.src = `${cfg.build.publicPath}${icon.src}` } return icon
refactor(app): better PWA manifest icons URL management
quasarframework_quasar
train
js
6594395f8aef5dd9adbcbb6112486bacd22aedce
diff --git a/src/Popover/components/ContentWrapper.js b/src/Popover/components/ContentWrapper.js index <HASH>..<HASH> 100644 --- a/src/Popover/components/ContentWrapper.js +++ b/src/Popover/components/ContentWrapper.js @@ -39,6 +39,7 @@ const StyledContentWrapper = styled.div` border-top-right-radius: 12px; ${media.largeMobile(css` max-height: 100%; + border-radius: 3px; `)} `; @@ -138,7 +139,6 @@ StyledOverlay.defaultProps = { const StyledPopoverClose = styled.div` padding: ${({ theme }) => popoverPadding(theme)}; - padding-top: 0; ${media.largeMobile(css` display: none;
fix(popover): Border radius on desktop and close button padding (#<I>)
kiwicom_orbit-components
train
js
413905a1b4a71d923212e0e167495c5e21988ee0
diff --git a/packages/pobpack-utils/src/webpack/createResolveConfig.js b/packages/pobpack-utils/src/webpack/createResolveConfig.js index <HASH>..<HASH> 100644 --- a/packages/pobpack-utils/src/webpack/createResolveConfig.js +++ b/packages/pobpack-utils/src/webpack/createResolveConfig.js @@ -4,7 +4,7 @@ import { type OptionsType } from '../createOptions'; export default (modulePrefixPackageFields: Array<string>, options: OptionsType) => ({ cacheWithContext: false, - modules: ['node_modules'], + modules: ['node_modules', 'src'], extensions: ['.js', '.jsx'], mainFields: [
feat: resolve src modules too
christophehurpeau_pobpack
train
js
79a037de8030c0b110e959900e934ef0549d89f6
diff --git a/lib/delete.js b/lib/delete.js index <HASH>..<HASH> 100644 --- a/lib/delete.js +++ b/lib/delete.js @@ -1,5 +1,5 @@ // Require Packages -const unset = require('lodash.unset'); +const unset = require('lodash/unset'); module.exports = function(db, params, options) { @@ -22,4 +22,4 @@ module.exports = function(db, params, options) { // Resolve return true; -} \ No newline at end of file +}
feat: switch to lodash singular package
TrueXPixels_quick.db
train
js
b5cdaee1eef73cc29f1d4751690e0edb9bbedab0
diff --git a/src/GoogleAPI/GoogleAPIClient.php b/src/GoogleAPI/GoogleAPIClient.php index <HASH>..<HASH> 100644 --- a/src/GoogleAPI/GoogleAPIClient.php +++ b/src/GoogleAPI/GoogleAPIClient.php @@ -90,6 +90,7 @@ class GoogleAPIClient $this->client->setApplicationName('Forikal Tools'); $this->client->setScopes($scopes); $this->client->setAccessType('offline'); + $this->client->setRedirectUri('urn:ietf:wg:oauth:2.0:oob'); $this->logger->info('Getting the Google API client secret from the `'.$clientSecretFile.'` file'); $this->client->setAuthConfig($this->loadCredentialJSON($clientSecretFile)); diff --git a/tests/GoogleAPI/GoogleAPIClientTest.php b/tests/GoogleAPI/GoogleAPIClientTest.php index <HASH>..<HASH> 100644 --- a/tests/GoogleAPI/GoogleAPIClientTest.php +++ b/tests/GoogleAPI/GoogleAPIClientTest.php @@ -48,6 +48,7 @@ class GoogleAPIClientTest extends TestCase ->getMock(); $this->googleClientMock->method('setApplicationName')->with('Forikal Tools'); $this->googleClientMock->method('setAccessType')->with('offline'); + $this->googleClientMock->method('setRedirectUri'); $this->loggerMock = $this->createMock(LoggerInterface::class); }
fix: Google authentication doesn’t work if the client secret file doesn’t have a redirect URL
xmlsquad_xml-authoring-library
train
php,php
67dfa4f83a9290228945c0d8bf858ce14807d6a0
diff --git a/packages/article-main-comment/src/article-header/article-header.js b/packages/article-main-comment/src/article-header/article-header.js index <HASH>..<HASH> 100644 --- a/packages/article-main-comment/src/article-header/article-header.js +++ b/packages/article-main-comment/src/article-header/article-header.js @@ -23,7 +23,8 @@ const ArticleHeader = ({ onAuthorPress, publicationName, publishedTime, - standfirst + standfirst, + onImagePress }) => ( <ResponsiveContext.Consumer> {({ isTablet }) => ( @@ -33,6 +34,7 @@ const ArticleHeader = ({ aspectRatio={1} style={styles.authorImage} uri={authorImage} + onImagePress={onImagePress ? () => onImagePress(0) : undefined} rounded /> <Label isVideo={hasVideo} label={label} />
fix: REPLAT-<I> use native modal for author images (#<I>)
newsuk_times-components
train
js
e9a34e9f658ac06d5769e48224129712ba4cda4f
diff --git a/src/index.js b/src/index.js index <HASH>..<HASH> 100644 --- a/src/index.js +++ b/src/index.js @@ -34,29 +34,29 @@ export { /* All methods in alphabetical order - clean - clone - del - each - empty + / clean + / clone + / del + / each + / empty every filter find - flattenKeys + / flattenKeys flip - get - has + / get + / has includes - is + / is keyOf - keys + / keys map - merge + / merge prepend - set - size + / set + / size slice some sort - values + / values */
style(index): check functions when they are done
hammy2899_o
train
js
aecfeb947775a660e449f75bc602cb23bd36d341
diff --git a/field-label/field-label.js b/field-label/field-label.js index <HASH>..<HASH> 100644 --- a/field-label/field-label.js +++ b/field-label/field-label.js @@ -74,7 +74,7 @@ FieldLabel.propTypes = { props => props.hintIcon ), description: PropTypes.oneOfType([PropTypes.string, PropTypes.node]), - onInfoButtonClick: PropTypes.function, + onInfoButtonClick: PropTypes.func, hintIcon: PropTypes.node, badge: PropTypes.node, hasRequiredIndicator: PropTypes.bool,
fix(field-label): fixes prop validation from function to func
commercetools_ui-kit
train
js
5d250fc7321589168e4079c3110dc6ddcdeb8440
diff --git a/website/data/alert-banner.js b/website/data/alert-banner.js index <HASH>..<HASH> 100644 --- a/website/data/alert-banner.js +++ b/website/data/alert-banner.js @@ -2,12 +2,12 @@ export const ALERT_BANNER_ACTIVE = true // https://github.com/hashicorp/web-components/tree/master/packages/alert-banner export default { - linkText: 'Register now', - url: 'https://www.hashicorp.com/events/webinars/introducing-nomad-1-0', + linkText: 'Learn more!', + url: 'https://www.hashicorp.com/blog/announcing-general-availability-of-hashicorp-nomad-1-0', tag: 'ANNOUNCEMENT', text: - 'Join us on Oct 27th for the Nomad 1.0 Product Announcement with Armon Dadgar', + 'Nomad 1.0.0 is now generally available, which includes 5 major new features and many improvements.', // Set the `expirationDate prop with a datetime string (e.g. `2020-01-31T12:00:00-07:00`) // if you'd like the component to stop showing at or after a certain date - expirationDate: '2020-10-27T09:00:00-07:00', + expirationDate: '2021-02-08T09:00:00-07:00', }
docs: add an announcement for <I>
hashicorp_nomad
train
js
f50e5e040d3d641b7ad4104c111247df7a1f00cd
diff --git a/src/Commands/Serve/index.js b/src/Commands/Serve/index.js index <HASH>..<HASH> 100644 --- a/src/Commands/Serve/index.js +++ b/src/Commands/Serve/index.js @@ -58,7 +58,7 @@ class Serve extends Command { started (dev, debug) { const message = `Started server Watcher: ${dev ? this.chalk.green('On') : this.chalk.red('Off')} -Debbuger: ${debug ? 'Visit ' + this.chalk.yellow('chrome://inspect') + ' to open devtools' : this.chalk.red('Off')}` +Debugger: ${debug ? 'Visit ' + this.chalk.yellow('chrome://inspect') + ' to open devtools' : this.chalk.red('Off')}` console.log(require('boxen')(message, { dimBorder: true,
style(log): fix wrong debugger spelling
adonisjs_adonis-cli
train
js
6c896a5ffdfc067ffded0791a34a943c89ea6136
diff --git a/lib/classes/Service.js b/lib/classes/Service.js index <HASH>..<HASH> 100644 --- a/lib/classes/Service.js +++ b/lib/classes/Service.js @@ -53,6 +53,9 @@ class Service { loadServiceFileParam() { const serverlessFileParam = this.serverless.configurationInput; + // Not used internally, left set to not break plugins which depend on it + // TOOD: Remove with next major + this.serviceFilename = this.serverless.configurationFilename; const serverlessFile = serverlessFileParam; // basic service level validation
fix(API): Bring back legacy `service.serviceFilename` for plugins
serverless_serverless
train
js
0068a676e5b8588d14106e0d405f0b3bd50cedb1
diff --git a/docs/js/main.js b/docs/js/main.js index <HASH>..<HASH> 100644 --- a/docs/js/main.js +++ b/docs/js/main.js @@ -49,6 +49,7 @@ window.onload = function () { var cropper = new Cropper(image, options); var originalImageURL = image.src; var uploadedImageType = 'image/jpeg'; + var uploadedImageName = 'cropped.jpg'; var uploadedImageURL; // Tooltip @@ -206,6 +207,7 @@ window.onload = function () { $('#getCroppedCanvasModal').modal().find('.modal-body').html(result); if (!download.disabled) { + download.download = uploadedImageName; download.href = result.toDataURL(uploadedImageType); } } @@ -277,6 +279,7 @@ window.onload = function () { if (/^image\/\w+/.test(file.type)) { uploadedImageType = file.type; + uploadedImageName = file.name; if (uploadedImageURL) { URL.revokeObjectURL(uploadedImageURL);
docs: keep the same image name when download
fengyuanchen_cropperjs
train
js
e1c6c6cf632befa905a90c5f79661373bfe89183
diff --git a/schedula/utils/drw/__init__.py b/schedula/utils/drw/__init__.py index <HASH>..<HASH> 100644 --- a/schedula/utils/drw/__init__.py +++ b/schedula/utils/drw/__init__.py @@ -1520,7 +1520,10 @@ class SiteMap(collections.OrderedDict): ) for node in itertools.chain(folder.nodes, folder.edges): links, node_id, node_title = node._links, node.node_id, node.title - only_site_node = depth == 0 or node.type == 'data' + only_site_node = depth == 0 or ( + node.type == 'data' and not node.attr.get( + 'force_plot', False + )) for k, item in node.items(): try: if only_site_node:
feat(drw): Add `force_plot` option to data node to plot Solution results.
vinci1it2000_schedula
train
py
89812f41f6bf55c406754bef2efd215ab53e662b
diff --git a/lib/dashboard/public/dashboard.js b/lib/dashboard/public/dashboard.js index <HASH>..<HASH> 100644 --- a/lib/dashboard/public/dashboard.js +++ b/lib/dashboard/public/dashboard.js @@ -296,4 +296,20 @@ window.onload = function () { panelsEl.addEventListener('click', () => { window.applyPackery(); }, false); + + let currentRoute = '/'; + const debouncedPackeryFix = function () { + if (currentRoute === '/') { + window.applyPackery(); + console.log('applying packery'); + } + }.debounce(10); + + const selector = document.querySelector('more-route-selector'); + selector.$.selection.addEventListener('selected-route-changed', e => { + currentRoute = e.detail.value.path; + if (currentRoute === '/') { + debouncedPackeryFix(); + } + }); };
fix(dashboard): fix panels all being moved to top left corner when window is resized while a non-Dashboard tab is selected Closes #<I>
nodecg_nodecg
train
js
bc7f01bcf563eb27175ef1b02c128761945a043b
diff --git a/src/library/styles/createStyledComponent.js b/src/library/styles/createStyledComponent.js index <HASH>..<HASH> 100644 --- a/src/library/styles/createStyledComponent.js +++ b/src/library/styles/createStyledComponent.js @@ -39,10 +39,6 @@ const createStyledComponent: CreateStyledComponent = ( return componentStyles; }; - if (displayName && typeof element !== 'string') { - element.displayName = displayName; - } - const styledComponent = styled(element, { ...(process.env.NODE_ENV !== 'production' && displayName ? { label: displayName }
fix(styles): Fix component displayNames when using createStyledComponent * Stop setting displayName on element passed to createStyledComponent. DisplayName is a static property and this was incorrectly overwriting values when the element was a component. This should have been set on the returned component rather than the element. As the call to Emotion/styled already does this for us, we actually don’t need to do anything at all.
mineral-ui_mineral-ui
train
js
15da1922632ee48a078c6385a6147e0464917751
diff --git a/logger.js b/logger.js index <HASH>..<HASH> 100644 --- a/logger.js +++ b/logger.js @@ -1,3 +1,3 @@ -module.exports = function log (type, message) { - console.log(JSON.stringify({ type, message })) +module.exports = function log (type, message, label) { + console.log(JSON.stringify({ type, message, label })) }
feat: added labelization of logs
konnectors_libs
train
js
f150476835744a6e70fc5f3bbc538ffeef53eb91
diff --git a/rules/derived-inputs-outputs.js b/rules/derived-inputs-outputs.js index <HASH>..<HASH> 100644 --- a/rules/derived-inputs-outputs.js +++ b/rules/derived-inputs-outputs.js @@ -18,9 +18,9 @@ module.exports = { const check = (sources, values) => { sources.forEach((input, idx) => { const expected = `$${input.name}`; - const actual = values[idx].name; + const actual = values[idx] ? values[idx].name : null; - if(expected === actual) { + if(actual === null || expected === actual) { return; } @@ -79,7 +79,7 @@ module.exports = { const values = []; for(const output of callback.params[0].elements) { - if(output.type !== "Identifier") { + if(output && output.type !== "Identifier") { return; }
chore: add some bomb-proofing
tivac_eslint-plugin-svelte
train
js
2051b433f696129c10d6351381fd9fe9f643201a
diff --git a/src/utils/dom.js b/src/utils/dom.js index <HASH>..<HASH> 100644 --- a/src/utils/dom.js +++ b/src/utils/dom.js @@ -30,6 +30,10 @@ export function css (element, css) { }) } +export function cssBatch (elements, style) { + elements.forEach(el => css(el, style)) +} + export function ready (fn) { if (typeof fn !== 'function') { return @@ -48,5 +52,6 @@ export default { height, width, css, + cssBatch, ready }
feat: [Request] Apply CSS Properties in Batch to an element array #<I> Credits go to @imdanielpiva on Github
quasarframework_quasar
train
js
81ccf76b05a23244df17c9f42881961c45b68787
diff --git a/src/transform/object.js b/src/transform/object.js index <HASH>..<HASH> 100644 --- a/src/transform/object.js +++ b/src/transform/object.js @@ -46,13 +46,13 @@ function maxDepth(data, depth) { } if (depth < 1) { - if (data.map) return '[array]'; - if (typeof data === 'object') return '[object]'; + if (isArray(data)) return '[array]'; + if (typeof data === 'object' && data) return '[object]'; return data; } - if (typeof data.map === 'function') { + if (isArray(data)) { return data.map(function (child) { return maxDepth(child, depth - 1); }); @@ -141,3 +141,7 @@ function toStringFactory(depth) { return util.format.apply(util, simplifiedData); }; } + +function isArray(value) { + return Object.prototype.toString.call(value) === '[object Array]'; +}
fix(transform): #<I> map function defined can cause errors
megahertz_electron-log
train
js
792ef8d0de5b0f398b3191f57cb15dc84c0d7084
diff --git a/commons-types/src/main/java/se/l4/commons/types/reflect/Annotated.java b/commons-types/src/main/java/se/l4/commons/types/reflect/Annotated.java index <HASH>..<HASH> 100644 --- a/commons-types/src/main/java/se/l4/commons/types/reflect/Annotated.java +++ b/commons-types/src/main/java/se/l4/commons/types/reflect/Annotated.java @@ -50,7 +50,7 @@ public interface Annotated { for(Annotation a : getAnnotations()) { - if(annotationClass.isAssignableFrom(a.getClass())) + if(a.annotationType() == annotationClass) { return Optional.of((T) a); }
fix(types): Use annotationType in Annotated when finding annotations
LevelFourAB_commons
train
java
b56ba09af2ee8adfee593de56f5e532a19665b78
diff --git a/test/android-platform.js b/test/android-platform.js index <HASH>..<HASH> 100644 --- a/test/android-platform.js +++ b/test/android-platform.js @@ -53,5 +53,27 @@ exports.tests = { Util.deleteTmpApplication(application); test.done(); }); + }, + + invalid: function(test) { + + test.expect(2); + + var application = Util.createTmpApplication("com.example.foo"); + var platformData = { + application: application, + platformId: "android" + }; + + var android = new AndroidPlatform(PlatformBase, platformData); + android.findCrosswalkVersion("0.0.0.0", null, + function(version, channel, errormsg) { + + test.equal(version, null); + test.equal(channel, null); + + Util.deleteTmpApplication(application); + test.done(); + }); } };
test: Add failing testcase in android-platform.js Look for inexistant version <I> to exercise error paths.
crosswalk-project_crosswalk-app-tools
train
js
d1dc22f702abaac60feeb0f04dbc7e4005e66483
diff --git a/src/helpers/invert.js b/src/helpers/invert.js index <HASH>..<HASH> 100644 --- a/src/helpers/invert.js +++ b/src/helpers/invert.js @@ -1,7 +1,6 @@ // @flow import parseColorString from '../internalHelpers/_parseColorString' -import rgb from './rgb' import rgba from './rgba' /** @@ -10,9 +9,13 @@ import rgba from './rgba' function invert(color: string): string { // parse color string to hsl const value = parseColorString(color) - return value.alpha === undefined || value.alpha >= 1 - ? rgb(255 - value.red, 255 - value.green, 255 - value.blue) - : rgba(255 - value.red, 255 - value.green, 255 - value.blue, value.alpha) + const invertedColor = { + ...value, + red: 255 - value.red, + green: 255 - value.green, + blue: 255 - value.blue, + } + return rgba(invertedColor) } export default invert
chore(color): fix flow issue
styled-components_polished
train
js
5725f651015da14262e851c937194f9c55733d27
diff --git a/src/Button.js b/src/Button.js index <HASH>..<HASH> 100644 --- a/src/Button.js +++ b/src/Button.js @@ -90,10 +90,16 @@ const Button = React.forwardRef( ); } - const Component = as || 'button'; - if (ref) props.ref = ref; + if (ref) { + props.ref = ref; + } - return <Component {...props} type={type} className={classes} />; + if (!as) { + props.type = type; + } + + const Component = as || 'button'; + return <Component {...props} className={classes} />; }, );
fix(Button): not pass type prop to custom comp (fix: #<I>) (#<I>) * fix(Button): not pass type prop to custom comp (fix: #<I>) * fix: simplified
react-bootstrap_react-bootstrap
train
js
2b981fa0ea6e71a87bc45dbda61fe92a79929d50
diff --git a/webpack.config.development.js b/webpack.config.development.js index <HASH>..<HASH> 100644 --- a/webpack.config.development.js +++ b/webpack.config.development.js @@ -36,7 +36,6 @@ const config = { plugins: [ ...baseConfig.plugins, new webpack.HotModuleReplacementPlugin(), - new webpack.NoErrorsPlugin(), new webpack.DefinePlugin({ __DEV__: true, "process.env": { @@ -45,6 +44,10 @@ const config = { }), ], + optimization: { + noEmitOnErrors: true, + }, + target: "electron-renderer", }
chore(dev): Fix the ability to run the app in dev mode
infinitered_reactotron
train
js
701be45f84abe10486afc285f15f1e77af61089a
diff --git a/docs/.vuepress/config.js b/docs/.vuepress/config.js index <HASH>..<HASH> 100644 --- a/docs/.vuepress/config.js +++ b/docs/.vuepress/config.js @@ -12,7 +12,6 @@ module.exports = { editLinkText: 'Help us improve this page!', docsDir: 'docs', docsBranch: 'master', - base: '/vue-chartjs/', serviceWorker: true, locales: { '/': {
chore(docs): Fix base path
apertureless_vue-chartjs
train
js
10df2e5300e04ec9d00ebd343d9d8fe30c96afa7
diff --git a/lib/plugins/aws/deployFunction.js b/lib/plugins/aws/deployFunction.js index <HASH>..<HASH> 100644 --- a/lib/plugins/aws/deployFunction.js +++ b/lib/plugins/aws/deployFunction.js @@ -37,6 +37,7 @@ class AwsDeployFunction { .getProvider('aws') .getStage()} ${style.aside(`(${this.serverless.getProvider('aws').getRegion()})`)}` ); + log.info(); }, 'before:deploy:function:initialize': () => mainProgress.notice('Validating', { isMainEvent: true }),
feat(CLI): Modern verbose logs for `deploy function` command
serverless_serverless
train
js
50ccd86c2879f223bb3c65dd89f491a5a3c6f312
diff --git a/spec/fluent/plugin/out_prometheus_spec.rb b/spec/fluent/plugin/out_prometheus_spec.rb index <HASH>..<HASH> 100644 --- a/spec/fluent/plugin/out_prometheus_spec.rb +++ b/spec/fluent/plugin/out_prometheus_spec.rb @@ -40,4 +40,29 @@ describe Fluent::Plugin::PrometheusOutput do it_behaves_like 'instruments record' end + + describe '#run with symbolized keys' do + let(:message) { {:foo => 100, :bar => 100, :baz => 100, :qux => 10} } + + context 'simple config' do + let(:config) { + BASE_CONFIG + %( + <metric> + name simple + type counter + desc Something foo. + key foo + </metric> + ) + } + + it 'adds a new counter metric' do + expect(registry.metrics.map(&:name)).not_to eq([:simple]) + driver.run(default_tag: tag) { driver.feed(event_time, message) } + expect(registry.metrics.map(&:name)).to eq([:simple]) + end + end + + it_behaves_like 'instruments record' + end end
test: Add testcase for symbolized keys
fluent_fluent-plugin-prometheus
train
rb
24565e37a01fdd73ff70730b832f7d4020ed2d46
diff --git a/content/timeout-issue.js b/content/timeout-issue.js index <HASH>..<HASH> 100644 --- a/content/timeout-issue.js +++ b/content/timeout-issue.js @@ -10,6 +10,8 @@ Since we did not receive a CI status on the ${branchLink(fullName)} branch, we a If you have already set up a CI for this repository, you might need to check your configuration. Make sure it will run on all new branches. If you don’t want it to run on every branch, you can whitelist branches starting with ${md.code('greenkeeper/')}. We recommend using [Travis CI](https://travis-ci.org), but Greenkeeper will work with every other CI service as well. + +Once you have installed CI on your repository, please delete the \`greenkeeper/initial\` branch in your repository and reinstall the Greenkeeper app. ` function branchLink (fullName) { return md.link(
feat(timeout-issue): improve wording on the no CI issue
greenkeeperio_greenkeeper
train
js
a30353d7fe9facf2344b504a096195ca97f549a8
diff --git a/exp/bitwise_test.go b/exp/bitwise_test.go index <HASH>..<HASH> 100644 --- a/exp/bitwise_test.go +++ b/exp/bitwise_test.go @@ -43,7 +43,7 @@ func (bes *bitwiseExpressionSuite) TestDesc() { func (bes *bitwiseExpressionSuite) TestAllOthers() { be := exp.NewBitwiseExpression(exp.BitwiseRightShiftOp, exp.NewIdentifierExpression("", "", "col"), 1) rv := exp.NewRangeVal(1, 2) - pattern := "cast like%" + pattern := "bitwiseExp like%" inVals := []interface{}{1, 2} testCases := []struct { Ex exp.Expression
chore: fix linting issues
doug-martin_goqu
train
go
9eab168f4f3a76fdec578b0fd93998616390a7cb
diff --git a/libtmux/common.py b/libtmux/common.py index <HASH>..<HASH> 100644 --- a/libtmux/common.py +++ b/libtmux/common.py @@ -270,16 +270,21 @@ class tmux_cmd: stdout_str = console_to_str(stdout) stdout_split = stdout_str.split("\n") - stdout_filtered = list(filter(None, stdout_split)) # filter empty values + # remove trailing newlines from stdout + for v in reversed(stdout_split): + if v == '': + stdout_split.pop() + else: + break stderr_str = console_to_str(stderr) stderr_split = stderr_str.split("\n") self.stderr = list(filter(None, stderr_split)) # filter empty values - if "has-session" in cmd and len(self.stderr) and not stdout_filtered: + if "has-session" in cmd and len(self.stderr) and not stdout_split: self.stdout = [self.stderr[0]] else: - self.stdout = stdout_filtered + self.stdout = stdout_split logger.debug("self.stdout for {}: \n{}".format(" ".join(cmd), self.stdout))
fix(tmux_cmd): remove only trailing new lines in stdout
tmux-python_libtmux
train
py
b6565c1a56555cd097965cab54f64cf26296f5d0
diff --git a/src/dav.js b/src/dav.js index <HASH>..<HASH> 100644 --- a/src/dav.js +++ b/src/dav.js @@ -58,7 +58,7 @@ function davJS(davId) { const generateMissionUpdateFunction = function (mission, davContext) { return function ({ status, latitude, longitude }) { - axios.put(`${davContext.missionControlURL}/missions/${mission.mission_id}`, { status, latitude, longitude }) + axios.put(`${davContext.missionControlURL}/missions/${mission.mission_id}`, { status, latitude, longitude, dav_id: davContext.davId }) .then((response) => { davContext.missions[mission.bid_id].onNext(response.data); });
fix: send dav_id in mission update request body
DAVFoundation_dav-js
train
js
68c2a4919eb840152ac20b5dfb107f9ebe767fb9
diff --git a/lib/commands/general.js b/lib/commands/general.js index <HASH>..<HASH> 100644 --- a/lib/commands/general.js +++ b/lib/commands/general.js @@ -110,6 +110,7 @@ extensions.executeMobile = async function (mobileCommand, opts = {}) { scrollBackTo: 'mobileScrollBackTo', scroll: 'mobileScroll', viewportScreenshot: 'mobileViewportScreenshot', + viewportRect: 'mobileViewPortRect', deepLink: 'mobileDeepLink', @@ -234,6 +235,22 @@ commands.mobileViewportScreenshot = async function () { return await this.getViewportScreenshot(); }; +/** + * @typedef {object} Rectangle + * @property {number} left - The left coordinate of the Rectangle. + * @property {number} top - The top coordinate of the Rectangle. + * @property {number} width - The width of Rectangle. + * @property {number} height - The height of Rectangle. + */ + +/** + * Returns the viewport coordinates. + * @returns {Rectangle} The viewport coordinates. + */ +commands.mobileViewPortRect = async function mobileViewPortRect () { + return await this.getViewPortRect(); +}; + commands.setUrl = async function (url) { await this.adb.startUri(url, this.opts.appPackage); };
feat: Expose ViewPortRect mobile command. (#<I>)
appium_appium-uiautomator2-driver
train
js
8513d37c725509c9e9ec1dbbc431f20d32632cf3
diff --git a/lib/shared/types.js b/lib/shared/types.js index <HASH>..<HASH> 100644 --- a/lib/shared/types.js +++ b/lib/shared/types.js @@ -136,7 +136,6 @@ module.exports = {}; /** * @typedef {Object} RuleMetaDocs - * @property {string} category The category of the rule. * @property {string} description The description of the rule. * @property {boolean} recommended If `true` then the rule is included in `eslint:recommended` preset. * @property {string} url The URL of the rule documentation. @@ -147,6 +146,7 @@ module.exports = {}; * @property {boolean} [deprecated] If `true` then the rule has been deprecated. * @property {RuleMetaDocs} docs The document information of the rule. * @property {"code"|"whitespace"} [fixable] The autofix type. + * @property {boolean} [hasSuggestions] If `true` then the rule provides suggestions. * @property {Record<string,string>} [messages] The messages the rule reports. * @property {string[]} [replacedBy] The IDs of the alternative rules. * @property {Array|Object} schema The option schema of the rule.
chore: update Rule typedefs (#<I>)
eslint_eslint
train
js
77ecac27ff79aeff0ae2456b2cc11de2e7bdcfa1
diff --git a/Controller/Api/v2.php b/Controller/Api/v2.php index <HASH>..<HASH> 100644 --- a/Controller/Api/v2.php +++ b/Controller/Api/v2.php @@ -204,7 +204,10 @@ class V2 extends \Magento\Framework\App\Action\Action if ($is3ds) { $this->result['redirect_url'] = $response->_links['redirect']['href']; + } elseif ($this->data->success_url) { + $this->result['redirect_url'] = $this->data->success_url; } + // Get the payment details $paymentDetails = $this->api->getPaymentDetails($response->id); @@ -231,6 +234,10 @@ class V2 extends \Magento\Framework\App\Action\Action $response->getErrors() ); } + + if ($this->data->failure_url) { + $this->result['redirect_url'] = $this->data->failure_url; + } } // Update the order id
chore: use custom redirect urls in api v2
checkout_checkout-magento2-plugin
train
php
e7caf725c85a9f6fab5c5b1883067cc627996944
diff --git a/index.js b/index.js index <HASH>..<HASH> 100644 --- a/index.js +++ b/index.js @@ -33,8 +33,8 @@ module.exports = function(api) { // Stage 3 '@babel/plugin-syntax-dynamic-import', '@babel/plugin-syntax-import-meta', - ['@babel/plugin-proposal-class-properties', { 'loose': false }], - '@babel/plugin-proposal-json-strings' + ['@babel/plugin-proposal-class-properties', { 'loose': true }], + '@babel/plugin-proposal-json-strings', ] }; };
fix: when using the `legacy: true` option of @babel/plugin-proposal-decorators, @babel/plugin-proposal-class-properties must be used in `loose: true` mode
trendmicro-frontend_babel-config
train
js
d3c2fa8078466ac199d27d6eeb1ce46639712ceb
diff --git a/sdk/dist/cc.js b/sdk/dist/cc.js index <HASH>..<HASH> 100644 --- a/sdk/dist/cc.js +++ b/sdk/dist/cc.js @@ -750,6 +750,9 @@ cc.define('cc.CheckoutService', function($http, $q, basketService, loggingServic if ( data.response.redirect ) { redirect = data.response.redirect; } + else { + redirect = null; + } return data; }); diff --git a/sdk/src/core/cc.checkoutService.js b/sdk/src/core/cc.checkoutService.js index <HASH>..<HASH> 100644 --- a/sdk/src/core/cc.checkoutService.js +++ b/sdk/src/core/cc.checkoutService.js @@ -326,6 +326,9 @@ cc.define('cc.CheckoutService', function($http, $q, basketService, loggingServic if ( data.response.redirect ) { redirect = data.response.redirect; } + else { + redirect = null; + } return data; });
fix(checkout): unset the redirect incase the user cancels checkout
sofa_sofa-couch-service
train
js,js
6e66b62c6b96b2a9b02b7cf86dc1ded963bd8022
diff --git a/src/collection.js b/src/collection.js index <HASH>..<HASH> 100644 --- a/src/collection.js +++ b/src/collection.js @@ -446,6 +446,8 @@ Collection.prototype.onDestroyed = function(evt, nipple) { if (self.idles.indexOf(nipple) >= 0) { self.idles.splice(self.idles.indexOf(nipple), 1); } + // We unbind move and end. + self.manager.unbindDocument(); }; // Cleanly destroy the manager @@ -467,6 +469,8 @@ Collection.prototype.destroy = function () { // Notify the manager passing the instance self.trigger('destroyed', self.nipples); + // We unbind move and end. + self.manager.unbindDocument(); // Unbind everything. self.off(); };
fix: unbind document when collection is manually destroyed
yoannmoinet_nipplejs
train
js
e7f44e28e59be1906378e6d14d164b8911df945c
diff --git a/test/test.treasure.tracking.js b/test/test.treasure.tracking.js index <HASH>..<HASH> 100644 --- a/test/test.treasure.tracking.js +++ b/test/test.treasure.tracking.js @@ -90,7 +90,7 @@ describe('Treasure Tracking', function() { expect(callbacks[1].calledOnce).not.to.be.ok; expect(callbacks[0].calledWith(JSON.parse(treasureHelper.responses.success))).to.be.ok; done(); - }, 500); + }, 300); }); it('should call error callback if unsuccessful', function (done) { @@ -100,7 +100,7 @@ describe('Treasure Tracking', function() { expect(callbacks[0].calledOnce).not.to.be.ok; expect(callbacks[1].calledOnce).to.be.ok; done(); - }, 500); + }, 300); }); });
refactor(tracking): test should only wait <I>ms
treasure-data_td-js-sdk
train
js
e14292aa43c2fa0f48afad1e7df11f1231d307b0
diff --git a/icons/fontawesome.js b/icons/fontawesome.js index <HASH>..<HASH> 100644 --- a/icons/fontawesome.js +++ b/icons/fontawesome.js @@ -97,6 +97,8 @@ export default { input: { showPass: 'fa-eye', hidePass: 'fa-eye-slash', + showNumber: 'keyboard', // TODO + hideNumber: 'keyboard_hide', // TODO clear: 'fa-times' }, pagination: { diff --git a/icons/ionicons.js b/icons/ionicons.js index <HASH>..<HASH> 100644 --- a/icons/ionicons.js +++ b/icons/ionicons.js @@ -97,6 +97,8 @@ export default { input: { showPass: 'ion-eye', hidePass: 'ion-eye-disabled', + showNumber: 'keyboard', // TODO + hideNumber: 'keyboard_hide', // TODO clear: 'ion-backspace-outline' }, pagination: {
chore(icons): placeholder for show/hideNumber in icon sets (WIP)
quasarframework_quasar
train
js,js
5eddcc8663b7a79e9cbb1ca388c74deeb767074f
diff --git a/noxfile.py b/noxfile.py index <HASH>..<HASH> 100644 --- a/noxfile.py +++ b/noxfile.py @@ -170,9 +170,7 @@ def docfx(session): """Build the docfx yaml files for this library.""" session.install("-e", ".") - # sphinx-docfx-yaml supports up to sphinx version 1.5.5. - # https://github.com/docascode/sphinx-docfx-yaml/issues/97 - session.install("sphinx==1.5.5", "alabaster", "recommonmark", "sphinx-docfx-yaml") + session.install("sphinx", "alabaster", "recommonmark", "gcp-sphinx-docfx-yaml") shutil.rmtree(os.path.join("docs", "_build"), ignore_errors=True) session.run(
chore: use `gcp-sphinx-docfx-yaml` (#<I>) makes use of the updated plugin for generating DocFX YAMLs
googleapis_google-auth-library-python-oauthlib
train
py
2049a70b8e572869fa05d1c1c2fc36a247d2e0c7
diff --git a/packages/components/bolt-image/src/image.js b/packages/components/bolt-image/src/image.js index <HASH>..<HASH> 100644 --- a/packages/components/bolt-image/src/image.js +++ b/packages/components/bolt-image/src/image.js @@ -172,7 +172,8 @@ class BoltImage extends withLitHtml() { // Include <noscript> for server-side rendered components const fallbackImageElement = () => { - if (lazyload && src) { + // this.is_ssr is undefined at the moment, placeholder for future server-side rendering + if (lazyload && src && this.is_ssr) { return html` <noscript> <img
fix: add 'is_ssr' flag to noscript, wait until SSR is in place before using
bolt-design-system_bolt
train
js
ac185052a5d33dbdfcda89903685e929535a2754
diff --git a/scripts/create-stubs.js b/scripts/create-stubs.js index <HASH>..<HASH> 100644 --- a/scripts/create-stubs.js +++ b/scripts/create-stubs.js @@ -8,5 +8,5 @@ fs.readdirSync('src/runtime') module: './index.mjs' }, null, ' ')); - fs.writeFileSync(`${dir}/index.d.ts`, `export * from '../types/runtime/${dir}/index.d.ts';`); - }); \ No newline at end of file + fs.writeFileSync(`${dir}/index.d.ts`, `export * from '../types/runtime/${dir}/index';`); + });
fix(create-stubs): Fix import '.d.ts'
sveltejs_svelte
train
js
b151d4b4843e4f15a0ab754c7a41bd7d9498dfc2
diff --git a/system/Common.php b/system/Common.php index <HASH>..<HASH> 100644 --- a/system/Common.php +++ b/system/Common.php @@ -901,17 +901,17 @@ if (! function_exists('redirect')) * * If more control is needed, you must use $response->redirect explicitly. * - * @param string $uri + * @param string $route * * @return RedirectResponse */ - function redirect(string $uri = null): RedirectResponse + function redirect(string $route = null): RedirectResponse { $response = Services::redirectResponse(null, true); - if (! empty($uri)) + if (! empty($route)) { - return $response->route($uri); + return $response->route($route); } return $response;
refactor: fix param name
codeigniter4_CodeIgniter4
train
php
f7536a863c1ef3aff080645f736567f209078662
diff --git a/lib/wireprotocol/3_2_support.js b/lib/wireprotocol/3_2_support.js index <HASH>..<HASH> 100644 --- a/lib/wireprotocol/3_2_support.js +++ b/lib/wireprotocol/3_2_support.js @@ -49,7 +49,7 @@ class WireProtocol { const response = result.message; // If we have a timed out query, or a cursor that was killed - if (response.cursorNotFounds) { + if (response.cursorNotFound) { if (typeof callback !== 'function') return; return callback(new MongoNetworkError('cursor killed or timed out'), null); }
chore(wire-protocol): correct typo introduced in previous commit
mongodb-js_mongodb-core
train
js
da0b95ee5798d9d30bb3c87816a3cee2d603d999
diff --git a/tests/system/ControllerTest.php b/tests/system/ControllerTest.php index <HASH>..<HASH> 100644 --- a/tests/system/ControllerTest.php +++ b/tests/system/ControllerTest.php @@ -57,7 +57,7 @@ final class ControllerTest extends CIUnitTestCase $this->config = new App(); $this->request = new IncomingRequest($this->config, new URI('https://somwhere.com'), null, new UserAgent()); $this->response = new Response($this->config); - $this->logger = \Config\Services::logger(); + $this->logger = Services::logger(); } public function testConstructor()
refactor: run rector
codeigniter4_CodeIgniter4
train
php
663ff0cff9fed90c9ed5c75d4d82b9bc1dac712a
diff --git a/test.js b/test.js index <HASH>..<HASH> 100644 --- a/test.js +++ b/test.js @@ -593,3 +593,24 @@ test('clone function test', function(t) { var clone = mixinable.clone(instance, arg2); t.is(clone.foo(), arg1 + arg2, 'clone returns expected value'); }); + +test('internal mixin method test', function(t) { + t.plan(2); + var create = mixinable({ + foo: mixinable.override, + bar: mixinable.override, + })( + { + foo: function() { + t.pass('first method is being called directly'); + this.bar(); + }, + }, + { + bar: function() { + t.pass('second method is being called indirectly'); + }, + } + ); + create().foo(); +});
test: add test for calling mixinable methods
untool_mixinable
train
js
a90a47ceb6f4365927d6ba42acd4570b9a928c9b
diff --git a/src/ToastMessage/jQueryMixin.js b/src/ToastMessage/jQueryMixin.js index <HASH>..<HASH> 100644 --- a/src/ToastMessage/jQueryMixin.js +++ b/src/ToastMessage/jQueryMixin.js @@ -3,7 +3,38 @@ module.exports = { return { style: { display: "none" // effective $.hide() - } + }, + showMethod: "fadeIn", //, slideDown, and show are built into jQuery + showDuration: 300, + showEasing: "swing", // and linear are built into jQuery + hideMethod: "fadeOut", + hideDuration: 1000, + hideEasing: "swing", + // + timeOut: 5000, }; + }, + + getInitialState () { + return { + intervalId: null + }; + }, + + _get$Node () { + return $(this.getDOMNode()); + }, + + componentDidMount () { + var {props} = this; + this._get$Node()[props.showMethod]({ + duration: props.showDuration, + easing: props.showEasing + }); + // if (props.timeOut > 0) { + // this.setState({ + // intervalId: setTimeout('hideToast', props.timeOut); + // }); + // } } };
feat(jQueryMixin): add show props and hook to componentDidMount
tomchentw_react-toastr
train
js
5b8be69d6feb1a1a9f7fc4e225b06b839e31c85e
diff --git a/src/select/Select.js b/src/select/Select.js index <HASH>..<HASH> 100644 --- a/src/select/Select.js +++ b/src/select/Select.js @@ -340,7 +340,7 @@ export default class Select extends Component { onChange={this.onInputChangeValue.bind(this)} onKeyUp={this.onInputChange.bind(this)} /> - <Transition in={visible && children && children.length > 0} sequence="fadeIn"> + <Transition in={!!(visible && children)} sequence="fadeIn"> <Popper className={this.classNames(`${prefixCls}-popper`)} clickOutside={this.handleClickOutside.bind(this)}
fix(Select): Select couldn't pop subview when only one directly option element
uiwjs_uiw
train
js
44820ce9247dbdf9c6b13347f3dddfc5f5c0b5e0
diff --git a/gather/scheduler_test.go b/gather/scheduler_test.go index <HASH>..<HASH> 100644 --- a/gather/scheduler_test.go +++ b/gather/scheduler_test.go @@ -11,6 +11,7 @@ import ( "github.com/influxdata/platform" influxlogger "github.com/influxdata/platform/logger" "github.com/influxdata/platform/mock" + platformtesting "github.com/influxdata/platform/testing" ) func TestScheduler(t *testing.T) { @@ -31,6 +32,7 @@ func TestScheduler(t *testing.T) { Metrics: make(map[int64]Metrics), Targets: []platform.ScraperTarget{ { + ID: platformtesting.MustIDFromString("3a0d0a6365646120"), Type: platform.PrometheusScraperType, URL: ts.URL + "/metrics", },
fix(gather): missing ID for ScraperTarget
influxdata_influxdb
train
go
618e58432b9370ee0a2c12b02993805df3108ed3
diff --git a/samtranslator/__init__.py b/samtranslator/__init__.py index <HASH>..<HASH> 100644 --- a/samtranslator/__init__.py +++ b/samtranslator/__init__.py @@ -1 +1 @@ -__version__ = '1.7.0' +__version__ = '1.8.0'
chore: update version to <I> (#<I>)
awslabs_serverless-application-model
train
py
afab21c05020807298e1bdf1ba368b353420f696
diff --git a/package/rules/node_modules.js b/package/rules/node_modules.js index <HASH>..<HASH> 100644 --- a/package/rules/node_modules.js +++ b/package/rules/node_modules.js @@ -3,10 +3,11 @@ const { cache_path: cachePath } = require('../config') const { nodeEnv } = require('../env') // Compile standard ES features for JS in node_modules with Babel. +// Regex details for exclude: https://regex101.com/r/CglKdg/3/ module.exports = { test: /\.(js|mjs)$/, include: /node_modules/, - exclude: /@babel(?:\/|\\{1,2})runtime|core-js/, + exclude: /(?:@?babel(?:\/|\\{1,2}|-).+)|regenerator-runtime|core-js/, use: [ { loader: 'babel-loader',
fix: Don't let babel & core-js transpile each other (#<I>) Fixes #<I> Error on fresh app
rails_webpacker
train
js
02c4dcb8cb1ad917cb9291bd82842656d2f52d3a
diff --git a/functional/server_tests.js b/functional/server_tests.js index <HASH>..<HASH> 100644 --- a/functional/server_tests.js +++ b/functional/server_tests.js @@ -1077,4 +1077,27 @@ describe('Server tests', function() { } }); }); + + it('Should not try to reconnect forever if reconnectTries = 0', { + metadata: { requires: { topology: 'single' } }, + + test: function(done) { + // Attempt to connect + let server = new Server({ + host: 'doesntexist', + bson: new Bson(), + reconnectTries: 0 + }); + + // Add event listeners + server.on('error', function() {}); + + // Start connection + server.connect(); + + server.s.pool.on('reconnectFailed', function() { + done(); + }); + } + }); });
fix(connection): make pool not try to reconnect forever when reconnectTries = 0 (#<I>) * fix(connection): make pool not try to reconnect forever when reconnectTries = 0 * test(server): add test coverage for #<I> Re: Automattic/mongoose#<I>
mongodb_node-mongodb-native
train
js
ce10fe92b228adb0857a975b47c93e0388810337
diff --git a/browser-providers.conf.js b/browser-providers.conf.js index <HASH>..<HASH> 100644 --- a/browser-providers.conf.js +++ b/browser-providers.conf.js @@ -4,7 +4,6 @@ var CIconfiguration = { 'Chrome': { unitTest: {target: 'SL', required: true}, e2e: {target: null, required: true}}, 'Firefox': { unitTest: {target: 'SL', required: true}, e2e: {target: null, required: true}}, - 'ChromeBeta': { unitTest: {target: 'SL', required: true}, e2e: {target: null, required: true}}, 'FirefoxBeta': { unitTest: {target: 'SL', required: true}, e2e: {target: null, required: true}}, 'ChromeDev': { unitTest: {target: null, required: true}, e2e: {target: null, required: true}}, 'FirefoxDev': { unitTest: {target: null, required: true}, e2e: {target: null, required: true}},
chore(travis): remove problematic chromebeta target for now
angular_angular
train
js
9fe0a51bfca39b4e41f8a8a0f688711ce982cd17
diff --git a/functional/rs_mocks/read_preferences_tests.js b/functional/rs_mocks/read_preferences_tests.js index <HASH>..<HASH> 100644 --- a/functional/rs_mocks/read_preferences_tests.js +++ b/functional/rs_mocks/read_preferences_tests.js @@ -1379,7 +1379,7 @@ describe('ReplSet Read Preferences (mocks)', function() { // Finished up if (count === 0) { // Should not contain the primary - expect(portsSeen['32000']).to.not.exist; + expect(portsSeen).to.not.have.key('32000'); // Shut down mocks primaryServer.destroy();
test(rs_mocks): fix expectation in read preferences test
mongodb_node-mongodb-native
train
js
e4bab27f94f6279c5bb620bca94298ad2f7e5a5c
diff --git a/nodes.go b/nodes.go index <HASH>..<HASH> 100644 --- a/nodes.go +++ b/nodes.go @@ -294,8 +294,8 @@ func (d *disjunction) Parse(ctx *parseContext, parent reflect.Value) (out []refl deepestError = branch.Cursor() } } else if value != nil { - bt := branch.Peek() - ct := ctx.Peek() + bt := branch.RawPeek() + ct := ctx.RawPeek() if bt == ct && bt.Type != lexer.EOF { panic(Errorf(bt.Pos, "branch %s was accepted but did not progress the lexer at %s (%q)", a, bt.Pos, bt.Value)) }
fix: use RawPeek() for progress check Now that it's possible to consume elided tokens, using normal peek does not make sense.
alecthomas_participle
train
go
43e0a646c25aca3ae494da2b4571d96c854cecb3
diff --git a/packages/@vue/cli-ui/src/graphql-api/connectors/locales.js b/packages/@vue/cli-ui/src/graphql-api/connectors/locales.js index <HASH>..<HASH> 100644 --- a/packages/@vue/cli-ui/src/graphql-api/connectors/locales.js +++ b/packages/@vue/cli-ui/src/graphql-api/connectors/locales.js @@ -51,7 +51,7 @@ function _loadFolder (root, context) { } function loadFolder (root, context) { - if (process.env.NODE_ENV !== 'production' && !watchedTrees.get(root)) { + if (process.env.NODE_ENV !== 'production' && process.env.NODE_ENV !== 'test' && !watchedTrees.get(root)) { watchedTrees.set(root, true) const watch = require('watch') watch.watchTree(root, () => {
test(ui): disable locale watching for tests
vuejs_vue-cli
train
js
a47170729ae2ade10e207eaa2a2782821d965d44
diff --git a/lib/core/sdam/server.js b/lib/core/sdam/server.js index <HASH>..<HASH> 100644 --- a/lib/core/sdam/server.js +++ b/lib/core/sdam/server.js @@ -467,6 +467,8 @@ function connectEventHandler(server) { return function(err, conn) { if (err) { server.emit('error', new MongoNetworkError(err)); + + stateTransition(this, STATE_CLOSED); server.emit('close'); return; }
fix(server): ensure state is transitioned to closed on connect fail
mongodb_node-mongodb-native
train
js
2352ba49c9939efc1f6e12d59c836ff67b3d0c33
diff --git a/test/screenshot/infra/lib/cbt-api.js b/test/screenshot/infra/lib/cbt-api.js index <HASH>..<HASH> 100644 --- a/test/screenshot/infra/lib/cbt-api.js +++ b/test/screenshot/infra/lib/cbt-api.js @@ -203,6 +203,7 @@ https://crossbrowsertesting.com/account // TODO(acdvorak): Expose these as CLI flags record_video: true, record_network: true, + max_duration: 3600, // in seconds }; /** @type {!selenium.proto.RawCapabilities} */
chore: Bump up the max_duration for CBT screenshot tests (#<I>)
material-components_material-components-web
train
js
126cec70b4637968d4ea5e3a7722a272227cee11
diff --git a/src/index.js b/src/index.js index <HASH>..<HASH> 100644 --- a/src/index.js +++ b/src/index.js @@ -36,7 +36,7 @@ export function toBeDeepCloseTo(received, expected, decimals) { */ function recursiveCheck(actual, expected, decimals) { if (typeof actual === 'number') { - if ((Math.abs(actual - expected) <= 10 ** -decimals)) { + if ((Math.abs(actual - expected) <= Math.pow(10, -decimals))) { return false; } else { return {
fix: ** operator not supported before v8
maasencioh_jest-matcher-deep-close-to
train
js
a7fff34653d3f64b80f15b6376ac7c0a0309c20b
diff --git a/test/unit/make-test.spec.js b/test/unit/make-test.spec.js index <HASH>..<HASH> 100644 --- a/test/unit/make-test.spec.js +++ b/test/unit/make-test.spec.js @@ -20,14 +20,14 @@ test.group('Make test', (group) => { test('create a test file', async (assert) => { const make = new MakeTest() await make.handle({ name: 'Foo' }, { unit: true }) - const exists = await make.pathExists(path.join(__dirname, './sample/test/unit/Foo.spec.js')) + const exists = await make.pathExists(path.join(__dirname, './sample/test/unit/foo.spec.js')) assert.isTrue(exists) }) test('create a functional test file', async (assert) => { const make = new MakeTest() await make.handle({ name: 'Bar' }, { functional: true, unit: true }) - const exists = await make.pathExists(path.join(__dirname, './sample/test/functional/Bar.spec.js')) + const exists = await make.pathExists(path.join(__dirname, './sample/test/functional/bar.spec.js')) assert.isTrue(exists) })
fix(command): fix failing tests
adonisjs_adonis-vow
train
js
01d893033c69a2e9c7f317d9f7082ca50079f1c8
diff --git a/lib/negroku/helpers/templates.rb b/lib/negroku/helpers/templates.rb index <HASH>..<HASH> 100644 --- a/lib/negroku/helpers/templates.rb +++ b/lib/negroku/helpers/templates.rb @@ -1,7 +1,8 @@ require "erb" -def buildTemplate(filename, destination, binding) - template_file = getTemplateFile(filename) +# Build the template +def buildTemplate(template, destination, binding) + template_file = getTemplateFile(template) result = ERB.new(template_file, nil, '-').result(binding) @@ -16,11 +17,19 @@ def buildTemplate(filename, destination, binding) end end +# Render one nested error partial def partial(filename, binding) template_file = getTemplateFile(filename) ERB.new(template_file, nil, '-', '_erbout2').result(binding) end +# Get the template file from the project and fallback to the gem def getTemplateFile(filename) - File.read(File.expand_path("../../templates/#{filename}", __FILE__)) + if File.exists?(filename) + templateFile = filename + else + templateFile = File.expand_path("../../templates/#{filename}", __FILE__) + end + + File.read(templateFile) end
feat(templates): enhance templates with local and project location
platanus_negroku
train
rb
7641b45b8123aaca423b2c588b7d200dfeb0c3da
diff --git a/gatsby-node.js b/gatsby-node.js index <HASH>..<HASH> 100644 --- a/gatsby-node.js +++ b/gatsby-node.js @@ -43,7 +43,7 @@ exports.onPostBuild = async function ({ graphql }, config) { return; } - const client = algoliasearch(appId, apiKey); + const client = algoliasearch(appId, apiKey, { timeout: 30_000 }); setStatus(activity, `${queries.length} queries to index`);
fix(performance): allow a slower response to avoid timeouts
algolia_gatsby-plugin-algolia
train
js
3df4850418118ac1bf4945a59fca6f345b53c4d7
diff --git a/util/git/client.go b/util/git/client.go index <HASH>..<HASH> 100644 --- a/util/git/client.go +++ b/util/git/client.go @@ -147,6 +147,7 @@ func GetRepoHTTPClient(repoURL string, insecure bool, creds Creds) *http.Client InsecureSkipVerify: true, GetClientCertificate: clientCertFunc, }, + DisableKeepAlives: true, } } else { parsedURL, err := url.Parse(repoURL) @@ -164,6 +165,7 @@ func GetRepoHTTPClient(repoURL string, insecure bool, creds Creds) *http.Client RootCAs: certPool, GetClientCertificate: clientCertFunc, }, + DisableKeepAlives: true, } } else { // else no custom certificate stored. @@ -172,6 +174,7 @@ func GetRepoHTTPClient(repoURL string, insecure bool, creds Creds) *http.Client TLSClientConfig: &tls.Config{ GetClientCertificate: clientCertFunc, }, + DisableKeepAlives: true, } } }
fix: Disable keep-alive for HTTPS connection to Git (#<I>)
argoproj_argo-cd
train
go
7650bad9d592948546095905b7e7469acd6ce98d
diff --git a/master-technology.js b/master-technology.js index <HASH>..<HASH> 100644 --- a/master-technology.js +++ b/master-technology.js @@ -226,9 +226,10 @@ if (typeof global.console.keys === 'undefined') { console.log("=========[ Keys ]=========="); for(var key in data) { if (data.hasOwnProperty(key)) { - console.log(key); if (printValue) { - console.log(data[key]); + console.log(key + ': ', data[key]); + } else { + console.log(key); } } }
feat: console.keys enhanced option to print value as well
NathanaelA_nativescript-master-technology
train
js
db23718f1484b8cd2047774edd67fcd1c3bce8b1
diff --git a/plugins/inputs/rabbitmq/rabbitmq.go b/plugins/inputs/rabbitmq/rabbitmq.go index <HASH>..<HASH> 100644 --- a/plugins/inputs/rabbitmq/rabbitmq.go +++ b/plugins/inputs/rabbitmq/rabbitmq.go @@ -405,7 +405,7 @@ func gatherOverview(r *RabbitMQ, acc telegraf.Accumulator) { return } - if overview.QueueTotals == nil || overview.ObjectTotals == nil || overview.MessageStats == nil || overview.Listeners == nil { + if overview.QueueTotals == nil || overview.ObjectTotals == nil || overview.MessageStats == nil { acc.AddError(fmt.Errorf("Wrong answer from rabbitmq. Probably auth issue")) return }
fix: don't require listeners to be present in overview (#<I>)
influxdata_telegraf
train
go
f567c6cf26f57993ff552119dc8e2db2fcee14ac
diff --git a/src/generic-provider-views/index.js b/src/generic-provider-views/index.js index <HASH>..<HASH> 100644 --- a/src/generic-provider-views/index.js +++ b/src/generic-provider-views/index.js @@ -378,7 +378,12 @@ module.exports = class View { if (folder.loading) { return } - for (let fileId of folder.files) { + // deepcopy the files before iteration because the + // original array constantly gets mutated during + // the iteration by updateFolderState as each file + // is removed and 'core:file-removed' is emitted. + const files = folder.files.concat([]) + for (const fileId of files) { if (fileId in this.plugin.core.getState().files) { this.plugin.core.removeFile(fileId) }
fix: folder deselection did not remove all files
transloadit_uppy
train
js
4ed1d45ff883fb12b807a3c69e6b588393ff5184
diff --git a/packages/taro-weapp/src/util.js b/packages/taro-weapp/src/util.js index <HASH>..<HASH> 100644 --- a/packages/taro-weapp/src/util.js +++ b/packages/taro-weapp/src/util.js @@ -166,7 +166,7 @@ export function diffObjToPath (to, from, res = {}, keyPrev = '') { } } else { // null - if (!toItem || !fromItem || keyList(toItem).length < keyList(fromItem).length) { + if (!toItem || !fromItem) { res[targetKey] = toItem } else { // 对象
fix(taro-weapp): 修复 json diff
NervJS_taro
train
js
08d9d0e82bb876b543ad58941e3faedd7beb9473
diff --git a/framework/directives/dialog.js b/framework/directives/dialog.js index <HASH>..<HASH> 100644 --- a/framework/directives/dialog.js +++ b/framework/directives/dialog.js @@ -5,7 +5,7 @@ * @category dialog * @modifier material * [en]Display a Material Design dialog.[/en] - * [ja][/ja] + * [ja]マテリアルデザインのダイアログを表示します。[/ja] * @description * [en]Dialog that is displayed on top of current screen.[/en] * [ja]現在のスクリーンにダイアログを表示します。[/ja]
docs(ons-dialog): Added Japanese translation comments.
OnsenUI_OnsenUI
train
js
bff749ada867255880dee5aee54550c26fe44e15
diff --git a/lib/monorepo.js b/lib/monorepo.js index <HASH>..<HASH> 100644 --- a/lib/monorepo.js +++ b/lib/monorepo.js @@ -92,9 +92,9 @@ async function deleteMonorepoReleaseInfo (dependency, version) { const { npm } = await dbs() const monorepoGroupname = await getMonorepoGroupNameForPackage(dependency) try { - await npm.upsert(`monorepo:${monorepoGroupname}:${version}`, (oldDoc) => { - return Object.assign({_deleted: true}, updatedAt(oldDoc)) - }) + const docId = `monorepo:${monorepoGroupname}:${version}` + const doc = await npm.get(docId) + await npm.remove(doc) } catch (e) { if (e.name !== 'not_found') { throw e
fix: don’t use upsert to delete documents. upsert’s implementation produces an infinite lopp, if you pass `_deleted: true`. We don’t want that.
greenkeeperio_greenkeeper
train
js
4f9902043486510480d2e09b6fcadf431a4c324e
diff --git a/lib/reader.js b/lib/reader.js index <HASH>..<HASH> 100644 --- a/lib/reader.js +++ b/lib/reader.js @@ -694,6 +694,11 @@ XMLReader.prototype.fromXML = function(xml, options, done) { var attrs = obj.attrs; + // saxen may return attrs=true if no attributes were parsed :-( + if (attrs === true) { + attrs = {}; + } + var decodedAttrs = Object.keys(attrs).reduce(function(d, key) { var value = decodeStr(attrs[key]);
fix(reader): workaround saxen no attributes handling
bpmn-io_moddle-xml
train
js
afcc74e7c7b46b4455338d5602b50cceddd40569
diff --git a/utils/testrunner/Matchers.js b/utils/testrunner/Matchers.js index <HASH>..<HASH> 100644 --- a/utils/testrunner/Matchers.js +++ b/utils/testrunner/Matchers.js @@ -96,8 +96,10 @@ const DefaultMatchers = { }, toEqual: function(value, other, message) { - message = message || `${JSON.stringify(value)} ≈ ${JSON.stringify(other)}`; - return { pass: JSON.stringify(value) === JSON.stringify(other), message }; + const valueJson = stringify(value); + const otherJson = stringify(other); + message = message || `${valueJson} ≈ ${otherJson}`; + return { pass: valueJson === otherJson, message }; }, toBeCloseTo: function(value, other, precision, message) { @@ -107,3 +109,16 @@ const DefaultMatchers = { }; } }; + +function stringify(value) { + function stabilize(key, object) { + if (typeof object !== 'object' || object === undefined || object === null) + return object; + const result = {}; + for (const key of Object.keys(object).sort()) + result[key] = object[key]; + return result; + } + + return JSON.stringify(stabilize(null, value), stabilize); +}
test: fix Matcher.toEqual to not depend on key insertion order (#<I>) Objects `{foo: 1, bar: 2}` and `{bar: 2, foo: 1}` should be considered equal.
GoogleChrome_puppeteer
train
js
c068ae77b33862f633e09baaca110544a2863801
diff --git a/src/Helper/InflectsString.php b/src/Helper/InflectsString.php index <HASH>..<HASH> 100644 --- a/src/Helper/InflectsString.php +++ b/src/Helper/InflectsString.php @@ -12,6 +12,13 @@ namespace Ahc\Cli\Helper; */ trait InflectsString { + /** + * Convert a string to camel case. + * + * @param string $string + * + * @return string + */ public function toCamelCase(string $string): string { $words = \str_replace(['-', '_'], ' ', $string); diff --git a/src/Helper/OutputHelper.php b/src/Helper/OutputHelper.php index <HASH>..<HASH> 100644 --- a/src/Helper/OutputHelper.php +++ b/src/Helper/OutputHelper.php @@ -93,7 +93,8 @@ class OutputHelper */ protected function sortItems(array $items, &$max = 0): array { - $max = 0; + $first = reset($items); + $max = \strlen($first->name()); \uasort($items, function ($a, $b) use (&$max) { $max = \max(\strlen($a->name()), \strlen($b->name()), $max); @@ -106,6 +107,10 @@ class OutputHelper /** * Prepare name for different items. + * + * @param Parameter|Command $item + * + * @return string */ protected function getName($item): string {
refactor(helpers): add docblocks, fix padlength for single item
adhocore_php-cli
train
php,php
f25b62549955039eb711d651b8c08e92f39ae006
diff --git a/message.go b/message.go index <HASH>..<HASH> 100644 --- a/message.go +++ b/message.go @@ -317,14 +317,15 @@ type MessageAllowedMentions struct { // A MessageAttachment stores data for message attachments. type MessageAttachment struct { - ID string `json:"id"` - URL string `json:"url"` - ProxyURL string `json:"proxy_url"` - Filename string `json:"filename"` - Width int `json:"width"` - Height int `json:"height"` - Size int `json:"size"` - Ephemeral bool `json:"ephemeral"` + ID string `json:"id"` + URL string `json:"url"` + ProxyURL string `json:"proxy_url"` + Filename string `json:"filename"` + ContentType string `json:"content_type"` + Width int `json:"width"` + Height int `json:"height"` + Size int `json:"size"` + Ephemeral bool `json:"ephemeral"` } // MessageEmbedFooter is a part of a MessageEmbed struct.
feat(message): added content_type to MessageAttachment
bwmarrin_discordgo
train
go
b0db7c0b940cb57f720f6ac91ba53f06646f1cf3
diff --git a/test/agent.js b/test/agent.js index <HASH>..<HASH> 100644 --- a/test/agent.js +++ b/test/agent.js @@ -185,7 +185,7 @@ test('#captureError()', function (t) { setTimeout(function () { scope.done() t.end() - }, 25) + }, 50) }) t.test('should attach an Error object when emitting error', function (t) {
test: increase timeout for captureError test
opbeat_opbeat-node
train
js
3c7866816b490bf136a837efb0efc17362d574e5
diff --git a/src/Exscript/protocols/telnetlib.py b/src/Exscript/protocols/telnetlib.py index <HASH>..<HASH> 100644 --- a/src/Exscript/protocols/telnetlib.py +++ b/src/Exscript/protocols/telnetlib.py @@ -492,7 +492,7 @@ class Telnet: else: self.sock.send(IAC + DONT + opt) else: - self.msg('IAC %d not recognized' % ord(opt)) + self.msg('IAC %d not recognized' % ord(command)) except EOFError: # raised by self.rawq_getchar() pass self.cookedq += buf
fix: telnet would fail on unrecognized IAC commands.
knipknap_exscript
train
py
218f46b7e334ef8c00104559be11c8ee220c91bd
diff --git a/tasks/webpack-dev-server.js b/tasks/webpack-dev-server.js index <HASH>..<HASH> 100644 --- a/tasks/webpack-dev-server.js +++ b/tasks/webpack-dev-server.js @@ -45,7 +45,13 @@ npm install --save-dev webpack-dev-server grunt.fail.fatal('webpack-dev-server is outdated. Please ensure you have at least version 2.4.0 installed.'); } - const createDomain = require('webpack-dev-server/lib/util/createDomain'); + let createDomain; + try { + createDomain = require('webpack-dev-server/lib/utils/createDomain'); + } catch (err) { + createDomain = require('webpack-dev-server/lib/util/createDomain'); + } + const processPluginFactory = new ProgressPluginFactory(grunt); grunt.registerTask('webpack-dev-server', 'Start a webpack-dev-server.', function webpackDevServerTask(cliTarget) {
fix(dev-server): compatibility with webpack-dev-server <I>+ (#<I>) * Update webpack-dev-server utils path * Try both paths
webpack-contrib_grunt-webpack
train
js
290561f84618f99f489f7b519c51753752d4d612
diff --git a/packages/ringcentral-integration/modules/ConferenceCall/index.js b/packages/ringcentral-integration/modules/ConferenceCall/index.js index <HASH>..<HASH> 100644 --- a/packages/ringcentral-integration/modules/ConferenceCall/index.js +++ b/packages/ringcentral-integration/modules/ConferenceCall/index.js @@ -35,6 +35,7 @@ function ascendSortParties(parties) { 'Alert', 'Call', 'CallingSettings', + 'ConnectivityMonitor', 'Client', 'Webphone', 'RolesAndPermissions', @@ -42,7 +43,14 @@ function ascendSortParties(parties) { dep: 'ContactMatcher', optional: true }, +<<<<<<< HEAD { dep: 'ConnectivityMonitor', optional: true }, +======= + { + dep: 'Webphone', + optional: true + }, +>>>>>>> refactor(ConnectivityMonitor): make ConnectivityMonitor as necessary dependency { dep: 'ConferenceCallOptions', optional: true
refactor(ConnectivityMonitor): make ConnectivityMonitor as necessary dependency Because when the api limitaion is strong tighted to the telephony apis thus strong tighted to the module, so we need to make it as neccesary dependency
ringcentral_ringcentral-js-widgets
train
js
3f09257484599ff85efa4b62fcb539c9fa73623c
diff --git a/addons/docs/src/mdx/mdx-compiler-plugin.js b/addons/docs/src/mdx/mdx-compiler-plugin.js index <HASH>..<HASH> 100644 --- a/addons/docs/src/mdx/mdx-compiler-plugin.js +++ b/addons/docs/src/mdx/mdx-compiler-plugin.js @@ -112,7 +112,6 @@ function genStoryExport(ast, context) { } if (storyAttr) { - // NOTE: Maybe we should merge parameters for imported story return genImportStory(ast, storyAttr, storyName, context); }
chore(addon-docs): remove comment
storybooks_storybook
train
js
d3fe902261f66f05ae116fd70ae037cbbe3673d3
diff --git a/lib/apidox/index.js b/lib/apidox/index.js index <HASH>..<HASH> 100644 --- a/lib/apidox/index.js +++ b/lib/apidox/index.js @@ -597,6 +597,9 @@ ApiDox.prototype.convertThrows = function(comment) { self.newline(); strings.forEach(function(string, idx) { var th = self.throws[method][string]; + if (!th) { + console.log('th falsey, method=', method, 'self.throws: %j', self.throws); + } th.string = th.string.replace(/(\{[^}]+\})/, '`$1`'); self.lines.push(self.escape(th.string ? self.linkMethodNames(th.string, comment) : ''));
chore(travis): Add console.log to debug TravisCI build
codeactual_apidox
train
js
bcb650029a3a90033aaa58bbd37da363e288cc14
diff --git a/src/Transactions/Transaction.php b/src/Transactions/Transaction.php index <HASH>..<HASH> 100644 --- a/src/Transactions/Transaction.php +++ b/src/Transactions/Transaction.php @@ -259,10 +259,10 @@ class Transaction { return array_filter([ 'amount' => $this->amount, - 'asset' => $this->asset ?? [], + 'asset' => $this->asset ?? null, 'fee' => $this->fee, 'id' => $this->id, - 'network' => $this->network ?: Network::get()->version(), + 'network' => $this->network ?? Network::get()->version(), 'recipientId' => $this->recipientId ?? null, 'secondSignature' => $this->secondSignature ?? null, 'senderPublicKey' => $this->senderPublicKey, @@ -272,12 +272,8 @@ class Transaction 'timestamp' => $this->timestamp, 'type' => $this->type, 'vendorField' => $this->vendorField ?? null, - 'version' => $this->version ?: 1, + 'version' => $this->version ?? 1, ], function ($element) { - if ($element === []) { - return false; - } - if (null !== $element) { return true; }
refactor: use null as asset default to reduce duplication
ArkEcosystem_php-crypto
train
php
822675209820518ca534cbb30c4abde28171ab9a
diff --git a/src/client/websocket/packets/handlers/VoiceStateUpdate.js b/src/client/websocket/packets/handlers/VoiceStateUpdate.js index <HASH>..<HASH> 100644 --- a/src/client/websocket/packets/handlers/VoiceStateUpdate.js +++ b/src/client/websocket/packets/handlers/VoiceStateUpdate.js @@ -25,7 +25,10 @@ class VoiceStateUpdateHandler extends AbstractHandler { } const newChannel = client.channels.get(data.channel_id); - if (newChannel) newChannel.members.set(member.user.id, member); + if (newChannel) { + newChannel.members.set(member.id, member); + member.guild.channels.set(data.channel_id, newChannel); + } member.serverMute = data.mute; member.serverDeaf = data.deaf;
fix(voiceStateUpdate): incorrect members.size (#<I>)
discordjs_discord.js
train
js
10e1ad0c9793e662469dd30172adf38b02a1f984
diff --git a/test/config.js b/test/config.js index <HASH>..<HASH> 100644 --- a/test/config.js +++ b/test/config.js @@ -353,7 +353,8 @@ test('disableInstrumentations', function (t) { var agent = Agent() agent.start({ serviceName: 'service', - disableInstrumentations: selection + disableInstrumentations: selection, + captureExceptions: false }) var found = new Set()
test: don't capture exceptions in disableInstrumentations test (#<I>)
elastic_apm-agent-nodejs
train
js
ccb56e4bc59f52f85241eb52f1c9c6a9af66caa5
diff --git a/cloudvolume/chunks.py b/cloudvolume/chunks.py index <HASH>..<HASH> 100644 --- a/cloudvolume/chunks.py +++ b/cloudvolume/chunks.py @@ -155,7 +155,7 @@ def decode_jpeg(bytestring, shape, dtype): return data.reshape(shape, order='F') def decode_raw(bytestring, shape, dtype): - return np.frombuffer(bytestring, dtype=dtype).reshape(shape, order='F') + return np.frombuffer(bytearray(bytestring), dtype=dtype).reshape(shape, order='F') def decode_compressed_segmentation(bytestring, shape, dtype, block_size, accelerated=ACCELERATED_CSEG): assert block_size is not None
fix: numpy <I> disallows write=True on string buffers Convert the immutable string to a bytearray. This incurs an an additional copy of the chunk. No big deal if the chunk size is small (e.g. <I>x<I>x<I>), but if it's large it can be substantial (e.g. <I>x<I>x<I>). Resolves #<I> (partially)
seung-lab_cloud-volume
train
py
3ce7605ddf7bbe4df692d6359fc92079af3e00cf
diff --git a/ui/src/components/input/QInput.js b/ui/src/components/input/QInput.js index <HASH>..<HASH> 100644 --- a/ui/src/components/input/QInput.js +++ b/ui/src/components/input/QInput.js @@ -206,13 +206,15 @@ export default Vue.extend({ this.__emitValue(val) if (['text', 'search', 'url', 'tel', 'password'].includes(this.type) && e.target === document.activeElement) { - const index = e.target.selectionEnd - - index !== void 0 && this.$nextTick(() => { - if (e.target === document.activeElement && val.indexOf(e.target.value) === 0) { - e.target.setSelectionRange(index, index) - } - }) + const { selectionStart, selectionEnd } = e.target + + if (selectionStart !== void 0 && selectionEnd !== void 0) { + this.$nextTick(() => { + if (e.target === document.activeElement && val.indexOf(e.target.value) === 0) { + e.target.setSelectionRange(selectionStart, selectionEnd) + } + }) + } } }
fix(QInput): issue using Chinese on safari/ios #<I>
quasarframework_quasar
train
js
6638eccb6b217657632084a834ac70c8c7b7732b
diff --git a/wikitextparser/_wikitext.py b/wikitextparser/_wikitext.py index <HASH>..<HASH> 100644 --- a/wikitextparser/_wikitext.py +++ b/wikitextparser/_wikitext.py @@ -954,9 +954,6 @@ class WikiText: - Use `\*+` as a pattern and nested unordered lists will be treated as flat. - Use `\*\s*` as pattern to rtstrip `items` of the list. - - Although the pattern parameter is optional, but specifying it - can improve the performance. """ lists = [] lists_append = lists.append
docs(get_list): remove the tip about unimportant internal detail matter
5j9_wikitextparser
train
py
8aa092ea5645dd8b29a69577bb64c22e442ed86b
diff --git a/packages/metascraper-audio/index.js b/packages/metascraper-audio/index.js index <HASH>..<HASH> 100644 --- a/packages/metascraper-audio/index.js +++ b/packages/metascraper-audio/index.js @@ -59,6 +59,9 @@ module.exports = () => ({ toAudio($ => $('audio > source').attr('src')), ({ htmlDom: $ }) => $filter($, $('a'), el => audio(el.attr('href'))), toAudio(async ($, url) => { + // Duplicated logic to the rule above + //TODO: figure out a way to apply ALL audio rules to an iframe instead of + // duplicating the rules in an iframe variant const dom = await loadIframe(url, $.html()) const $2 = cheerio.load(dom.document.body.innerHTML) return $filter($2, $2('a'), el => audio(el.attr('href')))
docs: add comment about rule duplication
microlinkhq_metascraper
train
js
ed256d34ace760076473c58fd01a1d0288f11ee3
diff --git a/muffin/plugins.py b/muffin/plugins.py index <HASH>..<HASH> 100644 --- a/muffin/plugins.py +++ b/muffin/plugins.py @@ -51,8 +51,9 @@ class BasePlugin(ABC): """Check the plugin is installed to an app.""" return bool(self.app) - def setup(self, app: Application, **options): + def setup(self, app: Application, *, name: str = None, **options): """Bind app and update the plugin's configuration.""" + self.name = name or self.name self.app = app self.app.plugins[self.name] = self diff --git a/tests/test_plugin.py b/tests/test_plugin.py index <HASH>..<HASH> 100644 --- a/tests/test_plugin.py +++ b/tests/test_plugin.py @@ -99,3 +99,22 @@ async def test_plugin(app, client): assert await res.text() == 'OK' assert finish.called + + +def test_multi_plugins(app): + from muffin.plugins import BasePlugin + + class Plugin(BasePlugin): + + name = 'plugin' + + p1 = Plugin(app, name='plugin1') + p2 = Plugin(app, name='plugin2') + + assert p1.name == 'plugin1' + assert p2.name == 'plugin2' + + assert app.plugins == { + 'plugin1': p1, + 'plugin2': p2, + }
feat: allow multiplugins with same type
klen_muffin
train
py,py
b3511a49da68dfbb6121700bab1991a7bc40b11f
diff --git a/src/index.mocha.js b/src/index.mocha.js index <HASH>..<HASH> 100644 --- a/src/index.mocha.js +++ b/src/index.mocha.js @@ -48,7 +48,7 @@ describe('Knifecycle', () => { it('should fail with dependencies since it makes no sense', () => { assert.throws(() => { $.constant('time', inject(['hash3'], time)); - }, 'E_CONSTANT_INJECTION'); + }, /E_CONSTANT_INJECTION/); }); });
fix(Tests): Fix tests for Node<I>
nfroidure_knifecycle
train
js
5d361d163bda7656a44cc1875d8ee534c5271e4d
diff --git a/structr-ui/src/main/resources/structr/js/structr-edit.js b/structr-ui/src/main/resources/structr/js/structr-edit.js index <HASH>..<HASH> 100644 --- a/structr-ui/src/main/resources/structr/js/structr-edit.js +++ b/structr-ui/src/main/resources/structr/js/structr-edit.js @@ -410,11 +410,6 @@ function StructrPage(baseUrl) { //console.log(f, b); var obj = {}; - if (f.val === '') { - this.delete(f.id); - return; - } - obj[f.key] = f.val; if (b) { b.html('<img src="/structr/img/al.gif"> Saving');
fix: enable setting empty content in field
structr_structr
train
js
516844b2d34da22a4ad567ba25f900e1f747327c
diff --git a/Logging/synth.py b/Logging/synth.py index <HASH>..<HASH> 100644 --- a/Logging/synth.py +++ b/Logging/synth.py @@ -34,11 +34,18 @@ library = gapic.php_library( s.move(library / 'src') # copy proto files to src also -s.move(library / 'proto/src/Google/Cloud/Logging', 'src/') +s.move( + library / 'proto/src/Google/Cloud/Logging', + 'src/', + [library / 'proto/src/Google/Cloud/Logging/Type']) + s.move(library / 'tests/') # copy GPBMetadata file to metadata -s.move(library / 'proto/src/GPBMetadata/Google/Logging', 'metadata/') +s.move( + library / 'proto/src/GPBMetadata/Google/Logging', + 'metadata/', + [library / 'proto/src/GPBMetadata/Google/Logging/Type']) # document and utilize apiEndpoint instead of serviceAddress s.replace(
chore: exclude unversioned protos (#<I>)
googleapis_google-cloud-php
train
py
deb340e4dd2f23214ff8d6cd8da2dafa5c8518db
diff --git a/test/units/path_test.rb b/test/units/path_test.rb index <HASH>..<HASH> 100644 --- a/test/units/path_test.rb +++ b/test/units/path_test.rb @@ -85,6 +85,11 @@ class PathTest < Imgix::Test assert_equal "https://demo.imgix.net/demo.png?hello_world=%2Ffoo%22%3E%20%3Cscript%3Ealert%28%22hacked%22%29%3C%2Fscript%3E%3C", ix_url end + def test_unicode_path_variants_are_utf8_encoded + ix_url = unsigned_client.path("I cannøt belîév∑ it wors! 😱").to_url + + assert_equal "https://demo.imgix.net/I%20cann%C3%B8t%20bel%C3%AE%C3%A9v%E2%88%91%20it%20wor%EF%A3%BFs%21%20%F0%9F%98%B1", ix_url + end def test_base64_param_variants_are_base64_encoded ix_url = unsigned_client.path("~text").to_url({txt64: "I cannøt belîév∑ it wors! 😱"})
test(unicode): ensure unicode chars are encoded
imgix_imgix-rb
train
rb
956e3965f008351458038acdfb00939f7bcd7937
diff --git a/buku.py b/buku.py index <HASH>..<HASH> 100755 --- a/buku.py +++ b/buku.py @@ -2615,7 +2615,7 @@ def is_bad_url(url): try: netloc = parse_url(url).netloc except LocationParseError as e: - logerr('%s, URL: %s', (e, url)) + logerr('%s, URL: %s', e, url) return True if not netloc: # Try of prepend '//' and get netloc
fix: test: logerr args (#<I>) Thank you!
jarun_Buku
train
py
993fd3a2b909460de9e5aa24e2d67945cb22325a
diff --git a/src/Identifier/IdentifierCollection.php b/src/Identifier/IdentifierCollection.php index <HASH>..<HASH> 100644 --- a/src/Identifier/IdentifierCollection.php +++ b/src/Identifier/IdentifierCollection.php @@ -85,7 +85,11 @@ class IdentifierCollection extends AbstractCollection */ protected function _resolveClassName($class) { - return (string)App::className($class, 'Identifier', 'Identifier') ?: null; + $className = App::className($class, 'Identifier', 'Identifier') ?: null; + if (is_bool($className)) { + $className = null; + } + return $className; } /**
fix: check if className is bool before returning it
cakephp_authentication
train
php
208c770e877df36393598954a45290e551dcf312
diff --git a/src/tools/ScaleOverlayTool.js b/src/tools/ScaleOverlayTool.js index <HASH>..<HASH> 100644 --- a/src/tools/ScaleOverlayTool.js +++ b/src/tools/ScaleOverlayTool.js @@ -143,8 +143,8 @@ export default class ScaleOverlayTool extends BaseTool { imageAttributes.verticalLine.start, imageAttributes.verticalLine.end, { - color, - lineWidth, + color: imageAttributes.color, + lineWidth: imageAttributes.lineWidth, }, 'canvas' ); @@ -157,8 +157,8 @@ export default class ScaleOverlayTool extends BaseTool { imageAttributes.horizontalLine.start, imageAttributes.horizontalLine.end, { - color, - lineWidth, + color: imageAttributes.color, + lineWidth: imageAttributes.lineWidth, }, 'canvas' );
fix: 🐛 Use correct configuration options for ScaleOverlayTool (#<I>) Fix override of custom line width and color for main horizontal and vertical lines of the ScaleOverlayTool.
cornerstonejs_cornerstoneTools
train
js
58ba7f5772d3256ec06be1fd453a4b8cb8bb302c
diff --git a/packages/link/src/components/Link.Neutral.story.js b/packages/link/src/components/Link.Neutral.story.js index <HASH>..<HASH> 100644 --- a/packages/link/src/components/Link.Neutral.story.js +++ b/packages/link/src/components/Link.Neutral.story.js @@ -33,6 +33,14 @@ storiesOf("Link/Neutral", module) )) ) .add( + "with right icon", + withInfo()(() => ( + <Link href="#" type={linkTypes.NEUTRAL} rightIcon="wg-place"> + Awesome Link + </Link> + )) + ) + .add( "disabled", withInfo()(() => ( <Link diff --git a/packages/link/src/components/Link.Normal.story.js b/packages/link/src/components/Link.Normal.story.js index <HASH>..<HASH> 100644 --- a/packages/link/src/components/Link.Normal.story.js +++ b/packages/link/src/components/Link.Normal.story.js @@ -33,6 +33,14 @@ storiesOf("Link/Normal", module) )) ) .add( + "with right icon", + withInfo()(() => ( + <Link href="#" type={linkTypes.NORMAL} rightIcon="wg-place"> + Awesome Link + </Link> + )) + ) + .add( "disabled", withInfo()(() => ( <Link
docs(Link): add right icon stories for neutral and normal links affects: @crave/farmblocks-link
CraveFood_farmblocks
train
js,js
61d581ff728734bc73913638a64e884ff02e54ba
diff --git a/lib/yodatra/models_controller.rb b/lib/yodatra/models_controller.rb index <HASH>..<HASH> 100644 --- a/lib/yodatra/models_controller.rb +++ b/lib/yodatra/models_controller.rb @@ -184,7 +184,14 @@ module Yodatra unless parent_model.nil? parent = parent_model.find params[:captures].second - resources = parent.send(involved.to_sym) unless parent.reflections[involved.to_sym].nil? + if parent.respond_to? :reflections + # This is AR 4.0.x compatibility + has_association = !parent.reflections[involved.to_sym].nil? + else + # This is AR 4.1.x compatibility + has_association = !parent._reflections[involved.to_sym].nil? + end + resources = parent.send(involved.to_sym) if has_association end resources rescue ActiveRecord::RecordNotFound
fix(models_controller): ActiveRecord <I> compatibility
squareteam_yodatra
train
rb
75e15bd76e30124d21396d4837398f0133d80917
diff --git a/index.js b/index.js index <HASH>..<HASH> 100644 --- a/index.js +++ b/index.js @@ -108,7 +108,7 @@ function applyVirtualsToChildren(doc, schema, res, virtuals) { } } - applyVirtualsToResult.call(doc, _schema, _doc, virtualsForChild); + attachVirtuals.call(doc, _schema, _doc, virtualsForChild); } }
fix: apply virtuals in doubly nested document arrays Fix #<I>
vkarpov15_mongoose-lean-virtuals
train
js
8cfeed7b9ac77f9db4d1cc4deb73fcc2cc70d7c4
diff --git a/samcli/lib/build/app_builder.py b/samcli/lib/build/app_builder.py index <HASH>..<HASH> 100644 --- a/samcli/lib/build/app_builder.py +++ b/samcli/lib/build/app_builder.py @@ -448,13 +448,15 @@ class ApplicationBuilder: # By default prefer to build in-process for speed build_runtime = specified_workflow options = ApplicationBuilder._get_build_options(layer_name, config.language, None) - if config.language == "provided": - LOG.warning("First compatible runtime has been chosen as build runtime") - # Only set to this value if specified workflow is makefile - # which will result in config language as provided - build_runtime = compatible_runtimes[0] if self._container_manager: # None key represents the global build image for all functions/layers + if config.language == "provided": + LOG.warning( + "For container layer build, first compatible runtime is chosen as build target for container." + ) + # Only set to this value if specified workflow is makefile + # which will result in config language as provided + build_runtime = compatible_runtimes[0] global_image = self._build_images.get(None) image = self._build_images.get(layer_name, global_image) self._build_function_on_container(
fix: Building a provided layer outside a container #<I> (#<I>) * fix: #<I> * fix: Get back old message too * Fix line length
awslabs_aws-sam-cli
train
py