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
714e4e28ab90fb5dfeca4375a68469ef609e2722
diff --git a/lib/protractor.js b/lib/protractor.js index <HASH>..<HASH> 100644 --- a/lib/protractor.js +++ b/lib/protractor.js @@ -181,7 +181,7 @@ var buildElementHelper = function(ptor) { // This is the first time we are looking for an element return ptor.waitForAngular().then(function() { if (locator.findElementsOverride) { - return locator.findElementsOverride(ptor.driver); + return locator.findElementsOverride(ptor.driver, null, ptor.rootEl); } else { return ptor.driver.findElements(locator); } @@ -193,7 +193,7 @@ var buildElementHelper = function(ptor) { // list of Promise<List<child_web_element>> parentWebElements.forEach(function(parentWebElement) { var childrenPromise = locator.findElementsOverride ? - locator.findElementsOverride(ptor.driver, parentWebElement) : + locator.findElementsOverride(ptor.driver, parentWebElement, ptor.rootEl) : parentWebElement.findElements(locator); childrenPromiseList.push(childrenPromise); });
fix(locators): fix regression passing root element to locator scripts Closes #<I>
angular_protractor
train
js
56865e7b55d637f46aa109b95f5cee4152cfef8d
diff --git a/java-datacatalog/synth.py b/java-datacatalog/synth.py index <HASH>..<HASH> 100644 --- a/java-datacatalog/synth.py +++ b/java-datacatalog/synth.py @@ -16,6 +16,8 @@ import synthtool.languages.java as java +AUTOSYNTH_MULTIPLE_COMMITS = True + versions = ['v1beta1'] service = 'datacatalog'
chore: enable context aware commits (#<I>)
googleapis_google-cloud-java
train
py
44310921b5252ba6e86d58092e5e56ae7c02ac24
diff --git a/pkg/services/sqlstore/alerting_test.go b/pkg/services/sqlstore/alerting_test.go index <HASH>..<HASH> 100644 --- a/pkg/services/sqlstore/alerting_test.go +++ b/pkg/services/sqlstore/alerting_test.go @@ -154,13 +154,15 @@ func TestAlertingDataAccess(t *testing.T) { SaveAlerts(&cmd) - DeleteDashboard(&m.DeleteDashboardCommand{ + err = DeleteDashboard(&m.DeleteDashboardCommand{ OrgId: 1, Slug: testDash.Slug, }) /* Uncomment this once we know why inTransaction2 is failing in unit tests + So(err, ShouldBeNil) + Convey("Alerts should be removed", func() { alerts, err2 := GetAlertsByDashboardId(testDash.Id)
test(alerting): add commented failed test
grafana_grafana
train
go
dd2930fbf7cc2d8000709edc870b8f101e5f33a3
diff --git a/src/library/Button/Button.js b/src/library/Button/Button.js index <HASH>..<HASH> 100644 --- a/src/library/Button/Button.js +++ b/src/library/Button/Button.js @@ -28,6 +28,7 @@ export default class Button extends Component<ButtonProps> { render() { const { children, + disabled, iconStart, iconEnd, size = Button.defaultProps.size, @@ -37,7 +38,9 @@ export default class Button extends Component<ButtonProps> { } = this.props; const rootProps = { + disabled, size, + tabIndex: disabled ? -1 : undefined, text: children, type, variant, diff --git a/src/library/Button/styled.js b/src/library/Button/styled.js index <HASH>..<HASH> 100644 --- a/src/library/Button/styled.js +++ b/src/library/Button/styled.js @@ -169,7 +169,7 @@ export const createButtonRootNode: CreateRootNode< textDecoration: 'none', verticalAlign: 'middle', width: fullWidth && '100%', - '&:focus': { + '&:focus': !disabled && { backgroundColor: (() => { if (primary) { return theme.Button_backgroundColor_primary_focus;
fix(button): Prevent disabled non-`button` elements from being focused
mineral-ui_mineral-ui
train
js,js
e6c603ad2127618828444cbc167dc8ea3420d306
diff --git a/src/index.js b/src/index.js index <HASH>..<HASH> 100644 --- a/src/index.js +++ b/src/index.js @@ -10,14 +10,7 @@ export default function install (Vue, options) { const defaultOptions = { clearConsoleOnUpdate: false, delay: 0, - config: { - checks: [{ - id: 'color-contrast', - options: { - noScroll: true - } - }] - }, + config: {}, runOptions: { reporter: 'v2', resultTypes: ['violations']
refactor: removing initial config checks
vue-a11y_vue-axe
train
js
232ead0434df9117da5c72bf0da3cb9e82e3d358
diff --git a/test/backend-connection.test.js b/test/backend-connection.test.js index <HASH>..<HASH> 100644 --- a/test/backend-connection.test.js +++ b/test/backend-connection.test.js @@ -390,8 +390,10 @@ suite('Connection', function() { suite('to backend', function() { var connection; var backend; + var restartedBackend; setup(function(done) { + restartedBackend = undefined; utils.createBackend() .next(function(newBackend) { backend = newBackend; @@ -411,6 +413,10 @@ suite('Connection', function() { backend.close(); backend = undefined; } + if (restartedBackend) { + restartedBackend.close(); + restartedBackend = undefined; + } if (connection) { connection.close(); connection = undefined; @@ -442,7 +448,6 @@ suite('Connection', function() { test('disconnected suddenly', function(done) { var errorHandler; - var restartedBackend; Deferred .next(function() { var deferred = new Deferred();
test: ensure restarted backend closed
droonga_express-droonga
train
js
cbe0386aa3ea786d09cde1b95a8a9703f0156754
diff --git a/gulpfile.js b/gulpfile.js index <HASH>..<HASH> 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -11,7 +11,6 @@ var gulpFormat = require('gulp-clang-format'); var runSequence = require('run-sequence'); var tslint = require('gulp-tslint'); var webpack = require('webpack'); -var typescript = require('typescript'); var exec = require('child_process').exec; var path = require('path'); var os = require('os'); @@ -184,10 +183,10 @@ gulp.task('tdd', ['clean:tests'], (cb) => { cb(e && e.signal !== 'SIGINT' ? e : undefined); }).stdout.on('data', function(data) { - console.log(data); + console.log(data.replace('\x1Bc', '').trim()); // starting karma in tdd as soon as 'tsc -w' finishes first compilation - if (!startedKarma) { + if (!startedKarma && data.includes('Compilation complete')) { startedKarma = true; startKarmaServer(true, false, function(err) { process.exit(err ? 1 : 0); }); }
chore: make karma wait for TS compilation in TDD mode
ng-bootstrap_ng-bootstrap
train
js
2b8372764bbc8f5d9b5bc3e9b1e7f5529310f33d
diff --git a/src/Types/AbortIfFunctionTypeSpecifyingExtension.php b/src/Types/AbortIfFunctionTypeSpecifyingExtension.php index <HASH>..<HASH> 100644 --- a/src/Types/AbortIfFunctionTypeSpecifyingExtension.php +++ b/src/Types/AbortIfFunctionTypeSpecifyingExtension.php @@ -4,15 +4,6 @@ declare(strict_types=1); namespace NunoMaduro\Larastan\Types; -/* - * This file is part of Larastan. - * - * (c) Nuno Maduro <enunomaduro@gmail.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - use PhpParser\Node\Expr\FuncCall; use PHPStan\Analyser\Scope; use PHPStan\Analyser\SpecifiedTypes;
refactor: removes license header
nunomaduro_larastan
train
php
3d1a715d2bfe98657cefe80ef522c96d6bf21272
diff --git a/lib/datasource/npm.js b/lib/datasource/npm.js index <HASH>..<HASH> 100644 --- a/lib/datasource/npm.js +++ b/lib/datasource/npm.js @@ -163,6 +163,16 @@ async function getDependency(name, retries = 5) { headers.authorization = `Bearer ${process.env.NPM_TOKEN}`; } + if ( + pkgUrl.startsWith('https://registry.npmjs.org') && + !pkgUrl.startsWith('https://registry.npmjs.org/@') + ) { + // Delete the authorization header for non-scoped public packages to improve http caching + // Otherwise, authenticated requests are not cacheable until the registry adds "public" to Cache-Control + // Ref: https://greenbytes.de/tech/webdav/rfc7234.html#caching.authenticated.responses + delete headers.authorization; + } + // Retrieve from API if not cached try { const raw = await got(pkgUrl, {
fix(npm): don’t authorize public non-scoped packages The authorization header can interfere with caching because npmjs doesn’t return “public” in the “Cache-Control” header.
renovatebot_renovate
train
js
2e2c04e2c7f90bd3d24d4305a458162b8189293d
diff --git a/dist/cc.angular.js b/dist/cc.angular.js index <HASH>..<HASH> 100644 --- a/dist/cc.angular.js +++ b/dist/cc.angular.js @@ -4410,7 +4410,7 @@ angular return function(val){ - var currency = CURRENCY_SIGN || '&euro;'; + var currency = (CURRENCY_SIGN || '&euro;').trim(); var currencyKey = cc.Util.findKey(currencyMap, function(item){ return item.synonyms.indexOf(currency) > -1; diff --git a/src/filter/currency/currencyFilter.js b/src/filter/currency/currencyFilter.js index <HASH>..<HASH> 100644 --- a/src/filter/currency/currencyFilter.js +++ b/src/filter/currency/currencyFilter.js @@ -32,7 +32,7 @@ angular return function(val){ - var currency = CURRENCY_SIGN || '&euro;'; + var currency = (CURRENCY_SIGN || '&euro;').trim(); var currencyKey = cc.Util.findKey(currencyMap, function(item){ return item.synonyms.indexOf(currency) > -1;
fix(currencyFilter): trim config value
sofa_sofa-couch-service
train
js,js
550bc8ccfb9391858db4ce346c08b41697edf903
diff --git a/engine/src/test/java/org/camunda/bpm/engine/test/api/multitenancy/MultiTenancyExecutionPropagationTest.java b/engine/src/test/java/org/camunda/bpm/engine/test/api/multitenancy/MultiTenancyExecutionPropagationTest.java index <HASH>..<HASH> 100644 --- a/engine/src/test/java/org/camunda/bpm/engine/test/api/multitenancy/MultiTenancyExecutionPropagationTest.java +++ b/engine/src/test/java/org/camunda/bpm/engine/test/api/multitenancy/MultiTenancyExecutionPropagationTest.java @@ -385,6 +385,10 @@ public class MultiTenancyExecutionPropagationTest extends PluggableProcessEngine assertThat(externalTask, is(notNullValue())); // inherit the tenant id from execution assertThat(externalTask.getTenantId(), is(TENANT_ID)); + + List<LockedExternalTask> externalTasks = externalTaskService.fetchAndLock(1, "test").topic("test", 1000).execute(); + assertThat(externalTasks.size(), is(1)); + assertThat(externalTasks.get(0).getTenantId(), is(TENANT_ID)); } public static class SetVariableTask implements JavaDelegate {
test(engine): query External Tasks by Tenant-Id related to #CAM-<I>
camunda_camunda-bpm-platform
train
java
f40e2f0a0b173e9e18442a8c3ed14766ca9ede6b
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -24,7 +24,7 @@ dev_require = [ "mypy==0.740", "pylint==2.4.3", "pytest==5.2.2", - "black==19.3b0", + "black==19.10b0", "coverage==4.5.4", "pytest-cov==2.8.1", "hypothesis==4.42.0",
chore(deps): Update black to <I>b0 This updates the black formatter to the latest version
malramsay64_experi
train
py
a1948d1b978be099a897737feaa6391ec49e1730
diff --git a/packages/site/pages/components/badge.js b/packages/site/pages/components/badge.js index <HASH>..<HASH> 100644 --- a/packages/site/pages/components/badge.js +++ b/packages/site/pages/components/badge.js @@ -1,5 +1,6 @@ import React from 'react' import Badge from '@pluralsight/ps-design-system-badge/react' +import Text from '@pluralsight/ps-design-system-text/react' import { Chrome, @@ -59,6 +60,7 @@ export default withServerProps(_ => ( </P> <Example.React includes={{ Badge }} + themeToggle codes={Object.values(Badge.appearances).map( a => `<Badge appearance={Badge.appearances.${a}}>Badge</Badge>` )} @@ -66,6 +68,10 @@ export default withServerProps(_ => ( <SectionHeading>Colors</SectionHeading> <P>Colors come from the Design System. Semantics come from your heart.</P> + <P> + To get the light colors, <Text.Code>Badge.appearances.subtle</Text.Code>{' '} + must be used. + </P> <Example.React includes={{ Badge }} themeToggle
refactor(site): try to expose the multiple options for badge a bit more
pluralsight_design-system
train
js
eb604529c62e9954305889122f34499ad75b3b45
diff --git a/src/compiler/helpers.js b/src/compiler/helpers.js index <HASH>..<HASH> 100644 --- a/src/compiler/helpers.js +++ b/src/compiler/helpers.js @@ -65,6 +65,18 @@ export function addHandler ( ) } + // normalize click.right and click.middle since they don't actually fire + // this is technically browser-specific, but at least for now browsers are + // the only target envs that have right/middle clicks. + if (name === 'click') { + if (modifiers.right) { + name = 'contextmenu' + delete modifiers.right + } else if (modifiers.middle) { + name = 'mouseup' + } + } + // check capture modifier if (modifiers.capture) { delete modifiers.capture @@ -80,18 +92,6 @@ export function addHandler ( name = '&' + name // mark the event as passive } - // normalize click.right and click.middle since they don't actually fire - // this is technically browser-specific, but at least for now browsers are - // the only target envs that have right/middle clicks. - if (name === 'click') { - if (modifiers.right) { - name = 'contextmenu' - delete modifiers.right - } else if (modifiers.middle) { - name = 'mouseup' - } - } - let events if (modifiers.native) { delete modifiers.native
fix: support modifier combination of click.right + .once (#<I>)
kaola-fed_megalo
train
js
f45acb85204da65cd4cb2102a09a0483d5bd6fc0
diff --git a/src/config.js b/src/config.js index <HASH>..<HASH> 100644 --- a/src/config.js +++ b/src/config.js @@ -1,4 +1,4 @@ -import { merge } from './helpers' +import { merge, noop } from './helpers' let config = { id: null, @@ -6,19 +6,22 @@ let config = { fields: {}, ignoreRoutes: [], linkers: [], + autoTracking: { exception: false, page: true, pageviewOnLoad: true, pageviewTemplate: null }, + debug: { enabled: false, trace: false, sendHitTask: true }, - beforeFirstHit: () => {}, - ready: () => {}, + + beforeFirstHit: noop, + ready: noop, __untracked: [] }
style(config): add noop and separate based on context
MatteoGabriele_vue-analytics
train
js
d5739cd466f77a60425bd2860895799f7c9359d9
diff --git a/git/test/test_git.py b/git/test/test_git.py index <HASH>..<HASH> 100644 --- a/git/test/test_git.py +++ b/git/test/test_git.py @@ -210,7 +210,6 @@ class TestGit(TestBase): assert err.status == 128 else: assert 'FOO' in str(err) - assert err.status == 2 # end # end # end if select.poll exists
fix(cmd): allow any kind of status message I see no need in verifying the status code. It's enough to just get the error.
gitpython-developers_GitPython
train
py
f8b1a7ee99e6c16c02b956ba8a8121171b418855
diff --git a/src/Registrar/index.js b/src/Registrar/index.js index <HASH>..<HASH> 100644 --- a/src/Registrar/index.js +++ b/src/Registrar/index.js @@ -178,6 +178,7 @@ class Registrar { */ register () { this._registerProviders(this._providers) + this.Ioc.executeExtendCalls() emitter.emit(this.PROVIDERS_REGISTERED) } @@ -191,7 +192,6 @@ class Registrar { */ async boot () { await Promise.all(this._bootProviders(this._providers)) - this.Ioc.executeExtendCalls() emitter.emit(this.PROVIDERS_BOOTED) }
fix(registrar): execute extend calls after register it's quite possible to use providers inside the boot method and invoking extend calls after the boot method will break the flow, if a provider is used inside boot
adonisjs_adonis-framework
train
js
dcbbcaa5867f69ed16da69eac2ce2a662d4cb162
diff --git a/packages/create-webiny-project/index.js b/packages/create-webiny-project/index.js index <HASH>..<HASH> 100644 --- a/packages/create-webiny-project/index.js +++ b/packages/create-webiny-project/index.js @@ -13,6 +13,7 @@ const findUp = require("find-up"); const loadJsonFile = require("load-json-file"); const { sendEvent } = require("@webiny/tracking"); const writeJsonFile = require("write-json-file"); +const rimraf = require("rimraf"); const packageJson = require("./package.json"); const { getPackageVersion } = require("./utils"); @@ -417,9 +418,9 @@ async function createApp({ projectName, template, tag, log }) { console.log(`\nWriting log to ${green(path.resolve(logPath))}...`); fs.writeFileSync(path.resolve(logPath), err.toString()); console.log("No cleanup."); - // console.log("Cleaning up project..."); - // rimraf.sync(root); - // console.log("Project cleaned!"); + console.log("Cleaning up project..."); + rimraf.sync(root); + console.log("Project cleaned!"); process.exit(1); });
fix: bring back project-cleanup
Webiny_webiny-js
train
js
aa4c0d1b9043bdb62caedb6da36e1dbf05622f7c
diff --git a/exchange/bitswap/decision/engine.go b/exchange/bitswap/decision/engine.go index <HASH>..<HASH> 100644 --- a/exchange/bitswap/decision/engine.go +++ b/exchange/bitswap/decision/engine.go @@ -160,6 +160,9 @@ func (e *Engine) Peers() []peer.ID { // MessageReceived performs book-keeping. Returns error if passed invalid // arguments. func (e *Engine) MessageReceived(p peer.ID, m bsmsg.BitSwapMessage) error { + e.lock.Lock() + defer e.lock.Unlock() + log := log.Prefix("bitswap.Engine.MessageReceived(%s)", p) log.Debugf("enter. %d entries %d blocks", len(m.Wantlist()), len(m.Blocks())) defer log.Debugf("exit") @@ -175,9 +178,6 @@ func (e *Engine) MessageReceived(p peer.ID, m bsmsg.BitSwapMessage) error { } }() - e.lock.Lock() - defer e.lock.Unlock() - l := e.findOrCreate(p) if m.Full() { l.wantList = wl.New()
fix(bitswap): release the lock last The area above the lock was getting big. Moving this up to avoid mistakes down the road.
ipfs_go-ipfs
train
go
926f4628e1f7e83229a1dd1608e946e9e9322088
diff --git a/src/uiSelectController.js b/src/uiSelectController.js index <HASH>..<HASH> 100644 --- a/src/uiSelectController.js +++ b/src/uiSelectController.js @@ -128,14 +128,14 @@ uis.controller('uiSelectCtrl', var animateHandler = function(elem, phase) { if (phase === 'start' && ctrl.items.length === 0) { // Only focus input after the animation has finished + ctrl.$animate.off('removeClass', searchInput[0], animateHandler); $timeout(function () { - ctrl.$animate.off('removeClass', searchInput[0], animateHandler); ctrl.focusSearchInput(initSearchValue); }); } else if (phase === 'close') { // Only focus input after the animation has finished + ctrl.$animate.off('enter', container[0], animateHandler); $timeout(function () { - ctrl.$animate.off('enter', container[0], animateHandler); ctrl.focusSearchInput(initSearchValue); }); }
perf(uiSelectCtrl): moving activate events out of $timeout Moved the removal of activate events out of the $timeout. This removes additional unneccessary calls to the event handler once the $timeout has been initiated.
angular-ui_ui-select
train
js
1c923d86f70eef8c85d662e72beaf81098a2bb38
diff --git a/packages/fractal/src/cli/commands/new.js b/packages/fractal/src/cli/commands/new.js index <HASH>..<HASH> 100644 --- a/packages/fractal/src/cli/commands/new.js +++ b/packages/fractal/src/cli/commands/new.js @@ -86,6 +86,10 @@ module.exports = { dependencies: { '@frctl/fractal': `^${fractal.get('version')}`, }, + scripts: { + 'fractal:start': 'fractal start --sync', + 'fractal:build': 'fractal build', + }, }; const fractalContents = Handlebars.compile(fs.readFileSync(fractalFileTpl, 'utf8'))(answers);
feat(CLI): add start/build npm scripts to package.json for new projects (#<I>)
frctl_fractal
train
js
ca3b86e8596b3679f9ffa4140ca804f782acccd8
diff --git a/shinken/modules/livestatus_broker/livestatus_broker.py b/shinken/modules/livestatus_broker/livestatus_broker.py index <HASH>..<HASH> 100644 --- a/shinken/modules/livestatus_broker/livestatus_broker.py +++ b/shinken/modules/livestatus_broker/livestatus_broker.py @@ -943,6 +943,7 @@ class Livestatus_broker(BaseModule): # before we open the socket pass + self.do_stop() def livestatus_factory(cursor, row): return Logline(row)
fix: livestatus_broker: restored do_stop() on exit.
Alignak-monitoring_alignak
train
py
a915706e34089a6bda1edeae84b026c5a3c04b0a
diff --git a/packages/form/src/Input.js b/packages/form/src/Input.js index <HASH>..<HASH> 100644 --- a/packages/form/src/Input.js +++ b/packages/form/src/Input.js @@ -4,8 +4,11 @@ import classNames from 'classnames'; import { Input as RsInput } from 'reactstrap'; import { useField } from 'formik'; -const Input = ({ tag: Tag, className, name, ...rest }) => { - const [field, metadata] = useField(name); +const Input = ({ tag: Tag, className, name, validate, ...rest }) => { + const [field, metadata] = useField({ + name, + validate, + }); const classes = classNames( className, @@ -33,6 +36,7 @@ Input.propTypes = { tag: PropTypes.oneOfType([PropTypes.func, PropTypes.string]), className: PropTypes.string, name: PropTypes.string.isRequired, + validate: PropTypes.func, }; Input.defaultProps = {
refactor(form): allow validate method to be passed to input
Availity_availity-react
train
js
3bac35eda9011a19b387859218f5ec5bdce64853
diff --git a/registry/private.py b/registry/private.py index <HASH>..<HASH> 100644 --- a/registry/private.py +++ b/registry/private.py @@ -53,7 +53,9 @@ def publish_release(source, config, target): # construct the new image image['parent'] = image['id'] image['id'] = _new_id() - image['config']['Env'] = _construct_env(image['config']['Env'], config, target_image, target_tag) + config['DEIS_APP'] = target_image + config['DEIS_RELEASE'] = target_tag + image['config']['Env'] = _construct_env(image['config']['Env'], config) # update and tag the new image _commit(target_image, image, _empty_tar_archive(), target_tag) @@ -157,11 +159,9 @@ def _put_tag(image_id, repository_path, tag): # utility functions -def _construct_env(env, config, target_image, target_tag): +def _construct_env(env, config): "Update current environment with latest config" new_env = [] - new_env.append("{}={}".format('DEIS_APP', target_image)) - new_env.append("{}={}".format('DEIS_RELEASE', target_tag)) # see if we need to update existing ENV vars for e in env: k, v = e.split('=', 1)
feat(controller): inject tag version value in environment.
deis_controller-sdk-go
train
py
1d176547ed5aed3e0c9a85dc70dbdd7e033d5e59
diff --git a/src/components/ColorInput/__test__/colorInput.spec.js b/src/components/ColorInput/__test__/colorInput.spec.js index <HASH>..<HASH> 100644 --- a/src/components/ColorInput/__test__/colorInput.spec.js +++ b/src/components/ColorInput/__test__/colorInput.spec.js @@ -115,12 +115,14 @@ describe('<ColorInput />', () => { it('should update the color sample on change', () => { const value = { hex: '#ccc', alpha: 1, isValid: true }; const component = mount(<ColorInput value={value} />); + const div = component.find('ColorSample').find('div'); + expect(getComputedStyle(div.getDOMNode()).getPropertyValue('background-color')).toBe( + 'rgb(204, 204, 204)', + ); component.find('input[type="text"]').simulate('change', { target: { value: '#fff' } }); - expect(component.find('ColorSample').prop('value')).toEqual({ - hex: '#fff', - alpha: 1, - isValid: true, - }); + expect(getComputedStyle(div.getDOMNode()).getPropertyValue('background-color')).toBe( + 'rgb(255, 255, 255)', + ); }); it('should not update the color sample on change when value is invalid', () => {
test: improve test case on ColorInput component (#<I>)
90milesbridge_react-rainbow
train
js
d3b891f3b351c4bfe708f35819e4f21ae45c58e3
diff --git a/src/main/java/com/twilio/http/TwilioRestClient.java b/src/main/java/com/twilio/http/TwilioRestClient.java index <HASH>..<HASH> 100644 --- a/src/main/java/com/twilio/http/TwilioRestClient.java +++ b/src/main/java/com/twilio/http/TwilioRestClient.java @@ -26,7 +26,7 @@ public class TwilioRestClient { private final HttpClient httpClient; private static final Logger logger = LoggerFactory.getLogger(TwilioRestClient.class); - private TwilioRestClient(Builder b) { + protected TwilioRestClient(Builder b) { this.username = b.username; this.password = b.password; this.accountSid = b.accountSid;
chore: protected TwilioRestClient constructor (#<I>) Allows for extending the class.
twilio_twilio-java
train
java
5b9ce0b47495ca0ba4bbfe8fc76c0c9df2d0ba6c
diff --git a/packages/cozy-pouch-link/src/PouchManager.spec.js b/packages/cozy-pouch-link/src/PouchManager.spec.js index <HASH>..<HASH> 100644 --- a/packages/cozy-pouch-link/src/PouchManager.spec.js +++ b/packages/cozy-pouch-link/src/PouchManager.spec.js @@ -333,23 +333,6 @@ describe('PouchManager', () => { }) }) - describe('warmupQueries', () => { - /* it('Should add the doctype to synced doctypes', () => { - const manager = new PouchManager(['io.cozy.todos'], managerOptions) - manager.addSyncedDoctype('io.cozy.todos') - - expect(manager.syncedDoctypes).toEqual(['io.cozy.todos']) - }) - - it('Should persist the new synced doctypes list', () => { - const manager = new PouchManager(['io.cozy.todos'], managerOptions) - manager.persistSyncedDoctypes = jest.fn() - manager.addSyncedDoctype('io.cozy.todos') - - expect(manager.persistSyncedDoctypes).toHaveBeenCalledTimes(1) - }) */ - }) - describe('areQueriesWarmedUp', () => { let manager
fix: Remove old and not wanted tests
cozy_cozy-client
train
js
3c4b38d3df0179b25cdb6c53be1fba2a07623434
diff --git a/packages/commitizen-adapter/lib/commitizen-adapter.js b/packages/commitizen-adapter/lib/commitizen-adapter.js index <HASH>..<HASH> 100644 --- a/packages/commitizen-adapter/lib/commitizen-adapter.js +++ b/packages/commitizen-adapter/lib/commitizen-adapter.js @@ -60,7 +60,7 @@ module.exports = { */ function loadScopes() { return readPkg() - .then(fp.getOr('packageJson.config.scopes', [])) + .then(fp.getOr([], 'packageJson.config.scopes')) .then(scopes => (Array.isArray(scopes) ? scopes : [])) .catch(() => []) }
fix(commitizen-adapter): Better scopes inference
MechanicalHuman_hnp-utilities
train
js
89ad9b45e7a50dc00a1e28125c9a6a4d609b9844
diff --git a/views/js/qtiCreator/editor/mathInput/mathInput.js b/views/js/qtiCreator/editor/mathInput/mathInput.js index <HASH>..<HASH> 100644 --- a/views/js/qtiCreator/editor/mathInput/mathInput.js +++ b/views/js/qtiCreator/editor/mathInput/mathInput.js @@ -13,7 +13,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * Copyright (c) 2017 (original work) Open Assessment Technologies SA; + * Copyright (c) 2017-2022 (original work) Open Assessment Technologies SA; */ /** * This component present a MathQuill (Latex Wysiwyg) input with a toolbar that allows to add some predefined symbols @@ -216,11 +216,6 @@ define([ this._initMathQuill($inputField); createToolbar($toolbar, this.mathField); - - // prevent dragging when the field is rendered in a draggable component - $inputField.on('mousedown' + eventNs, function preventDrag(e) { - e.stopPropagation(); - }); }) .on('destroy', function() { var $component = this.getElement(),
refactor: remove redundant mousedown event handler
oat-sa_extension-tao-itemqti
train
js
cad3ecf528f847e751590268fd5136a85ea6534d
diff --git a/test/units/tunnel.test.js b/test/units/tunnel.test.js index <HASH>..<HASH> 100644 --- a/test/units/tunnel.test.js +++ b/test/units/tunnel.test.js @@ -2,7 +2,5 @@ var util = require('../util.test'); var config = require('../config.test'); module.exports = function() { - util.proxy('http://127.0.0.1:' + config.serverPort, function(res) { - - }); + util.proxy('http://test.whistlejs.com'); }; \ No newline at end of file
test: x-whistle-policy
avwo_whistle
train
js
09d3783c1ce084c31fe0b64d61ec59c91242b364
diff --git a/test/link-cache.test.js b/test/link-cache.test.js index <HASH>..<HASH> 100644 --- a/test/link-cache.test.js +++ b/test/link-cache.test.js @@ -1,6 +1,7 @@ 'use strict'; -var LinkCache = require('../'), +var Promise = require('bluebird'), + LinkCache = require('../'), AMQPClient = require('amqp10').Client, config = require('./config'), expect = require('chai').expect;
fix(test): include Promise in the test for node <I>.x
mbroadst_amqp10-link-cache
train
js
1305bab3035d83cee014bbaf2aa2a14093cd84cc
diff --git a/test/helpers/constants/images.go b/test/helpers/constants/images.go index <HASH>..<HASH> 100644 --- a/test/helpers/constants/images.go +++ b/test/helpers/constants/images.go @@ -22,7 +22,7 @@ const ( KafkaClientImage = "docker.io/cilium/kafkaclient2:1.0" // Zookeeper image is the image used for running Zookeeper. - ZookeeperImage = "docker.io/digitalwonderland/zookeeper:latest" + ZookeeperImage = "docker.io/cilium/zookeeper:1.0" // BuxyboxImage is a space efficient-image used for basic testing. BusyboxImage = "docker.io/library/busybox:1.31.1"
test: use stable zookeeper image Commit f<I>c<I> ("test: Use stable tags instead of :latest") switched most use of image tags to stable tags, but omitted one occurrence of the zookeeper image in the runtime kafka tests. Switch it to the stable docker.io/cilium/zookeeper:<I> as well. Fixes: f<I>c<I> ("test: Use stable tags instead of :latest")
cilium_cilium
train
go
38095a95fd64da862045a215b99d4297a0076506
diff --git a/packages/dockyard/src/dockyard.js b/packages/dockyard/src/dockyard.js index <HASH>..<HASH> 100644 --- a/packages/dockyard/src/dockyard.js +++ b/packages/dockyard/src/dockyard.js @@ -101,7 +101,7 @@ const buildRules = (fields, head = '', options) => const subFieldHead = addDelimiter(head, key); const subRules = buildRules(value.fields, subFieldHead, options); set(obj, subFieldHead, { ...get(obj, subFieldHead), ...get(subRules, subFieldHead) }); - if (options.compileRequiredFields) { + if (options.compileRequiredFields && subRules.requiredFields) { set( obj, 'requiredFields', @@ -114,7 +114,7 @@ const buildRules = (fields, head = '', options) => const innerFieldHead = addDelimiter(head, key); const innerRules = buildRules(value.innerType.fields, innerFieldHead, options); set(obj, innerFieldHead, { ...get(obj, innerFieldHead), ...get(innerRules, innerFieldHead) }); - if (options.compileRequiredFields) { + if (options.compileRequiredFields && innerRules.requiredFields) { set( obj, 'requiredFields',
fix(dockyard): handle undefined required subfields
Availity_sdk-js
train
js
5d07c2f7aa6ce6d1b27695885a7acf5e55df02ea
diff --git a/test/.eslintrc.js b/test/.eslintrc.js index <HASH>..<HASH> 100644 --- a/test/.eslintrc.js +++ b/test/.eslintrc.js @@ -7,6 +7,8 @@ module.exports = { mocha: true }, rules: { - 'no-unused-expressions': 0 + 'func-names': 0, + 'no-unused-expressions': 0, + 'prefer-arrow-callback': 0 } };
style: allow anon functions in tests This is the style expressly promoted by mocha - see: <URL>
bookbrainz_bookbrainz-data-js
train
js
ff57a52a443043d21584af6fae9f81ec9b36c742
diff --git a/test/lib/adapters.js b/test/lib/adapters.js index <HASH>..<HASH> 100644 --- a/test/lib/adapters.js +++ b/test/lib/adapters.js @@ -28,8 +28,7 @@ describe('adapter for', function() { beforeEach(function() { var commander = require('commander'); commander.option('--foo <#>', '', Number).option('--bar <#>', '', Number); - commander.parse(process.argv); - this.provider = commander; + this.provider = commander.parse(process.argv); this.adapter = require('../../lib/adapter/commander'); });
test(adapter): Remove step
codeactual_impulse-bin
train
js
5db943cba03bf23f10e73aee63f883ed0b307bfe
diff --git a/webapps/grunt/config/copy.js b/webapps/grunt/config/copy.js index <HASH>..<HASH> 100644 --- a/webapps/grunt/config/copy.js +++ b/webapps/grunt/config/copy.js @@ -1,5 +1,5 @@ 'use strict'; - +/* jshint node: true */ var commentLineExp = /^[\s]*<!-- (\/|#) (CE|EE)/; var requireConfExp = /require-conf.js$/; @@ -21,7 +21,7 @@ function distFileProcessing(content, srcpath) { function devFileProcessing(content, srcpath) { /* jshint validthis: true */ - var liveReloadPort = this.config.get('app.liveReloadPort'); + var liveReloadPort = this.config.get('pkg.gruntConfig.livereloadPort'); /* jshint validthis: false */ if (requireConfExp.test(srcpath)) {
fix(build): correct the var name of livereload port
camunda_camunda-bpm-platform
train
js
e48a05dc88879dabb29a52448a57a94035e3a8e1
diff --git a/dynamic-queue.js b/dynamic-queue.js index <HASH>..<HASH> 100644 --- a/dynamic-queue.js +++ b/dynamic-queue.js @@ -21,9 +21,10 @@ module.exports = DynamicQueue = function (list) { list.every(this.add, this); if (!this.waiting) { this.resolve(); - return; + return null; } this.initialized = true; + return null; }; DynamicQueue.prototype = { @@ -46,7 +47,7 @@ DynamicQueue.prototype = { return this._processValue(); }, _processValue: function () { - if (this.promise.resolved) return; + if (this.promise.resolved) return null; if (!--this.waiting && this.initialized) this.resolve(); return true; }
refactor: lint
medikoo_deferred
train
js
014ec67437bc977facfd1c1b536dcd33525aed5b
diff --git a/eventbus/acceptance_testing.go b/eventbus/acceptance_testing.go index <HASH>..<HASH> 100644 --- a/eventbus/acceptance_testing.go +++ b/eventbus/acceptance_testing.go @@ -211,6 +211,10 @@ func AcceptanceTest(t *testing.T, bus1, bus2 eh.EventBus, timeout time.Duration) t.Error("the context should be correct:", observerBus2.Context) } + // Check and clear all errors before the error tests. + checkBusErrors(t, bus1) + checkBusErrors(t, bus2) + // Test async errors from handlers. errorHandler := mocks.NewEventHandler("error_handler") errorHandler.Err = errors.New("handler error") @@ -243,6 +247,20 @@ func AcceptanceTest(t *testing.T, bus1, bus2 eh.EventBus, timeout time.Duration) bus2.Wait() } +func checkBusErrors(t *testing.T, bus eh.EventBus) { + t.Helper() + for { + select { + case err := <-bus.Errors(): + if err.Err != nil { + t.Error("there should be no previous error:", err) + } + default: + return + } + } +} + // LoadTest is a load test for an event bus implementation. func LoadTest(t *testing.T, bus eh.EventBus) { ctx, cancel := context.WithCancel(context.Background())
test: Pre-empty error chan in event bus tests
looplab_eventhorizon
train
go
2402486b4db10c90a5789eaeb7ee0605e2bed1e1
diff --git a/packages/theme-data/src/colorSchemes/darkBlue/system/colorScheme.js b/packages/theme-data/src/colorSchemes/darkBlue/system/colorScheme.js index <HASH>..<HASH> 100644 --- a/packages/theme-data/src/colorSchemes/darkBlue/system/colorScheme.js +++ b/packages/theme-data/src/colorSchemes/darkBlue/system/colorScheme.js @@ -291,7 +291,7 @@ export default { }, "border.accent": { value: { - ref: "basics.colors.primary.autodeskBlue.500" + ref: "basics.colors.primary.autodeskBlue.400" } }, "icon.focus": { diff --git a/packages/theme-data/src/colorSchemes/darkGray/components/tag.js b/packages/theme-data/src/colorSchemes/darkGray/components/tag.js index <HASH>..<HASH> 100644 --- a/packages/theme-data/src/colorSchemes/darkGray/components/tag.js +++ b/packages/theme-data/src/colorSchemes/darkGray/components/tag.js @@ -2,9 +2,6 @@ export default { "tag.closeButton.iconColor": { value: { ref: "basics.colors.primary.charcoal.300" - }, - transform: { - alpha: 1 } } };
refactor: update colorScheme role value
Autodesk_hig
train
js,js
e9c77a1aa17af49a840044b67a34a3e4f8caae0b
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -1,7 +1,5 @@ from setuptools import setup, find_packages -from pip.req import parse_requirements import os -from setuptools import Command import sys import json
refactor: rm useless import
Trim21_sdu_bkjws
train
py
e970134865509a1b7c10ffb0b7f0f7db3a7ee439
diff --git a/src/object.js b/src/object.js index <HASH>..<HASH> 100644 --- a/src/object.js +++ b/src/object.js @@ -104,7 +104,7 @@ inherits(ObjectSchema, MixedSchema, { field = field.resolve(innerOptions); if (field._strip === true) { - isChanged = true; + isChanged = isChanged || prop in value; return; } diff --git a/test/object.js b/test/object.js index <HASH>..<HASH> 100644 --- a/test/object.js +++ b/test/object.js @@ -23,6 +23,7 @@ describe('Object types', () => { dte: date(), nested: object().shape({ str: string() }), arrNested: array().of(object().shape({ num: number() })), + stripped: string().strip(), }); });
fix: cast() does not work well if scheme has stripped field. (#<I>)
jquense_yup
train
js,js
d84a98d30b9bb3a04325b8cb33e6cc3cd175e030
diff --git a/src/index.js b/src/index.js index <HASH>..<HASH> 100644 --- a/src/index.js +++ b/src/index.js @@ -78,7 +78,7 @@ function createRollupPreprocessor(args, config, logger, server) { const stopWatching = []; for (let i = 0, {length} = bundle.modules; i < length; i++) { - if (bundle.modules[i].id !== fullPath) { + if (bundle.modules[i].id !== fullPath && !bundle.modules[i].id.startsWith('\u0000')) { includedFiles.push(bundle.modules[i].id); if (!dependencies[bundle.modules[i].id]) { startWatching.push(bundle.modules[i].id);
fix: ignore rollup modules starting with \u<I>
pvdlg_karma-rollup-preprocessor
train
js
941184a95454df6259d45485ee49db70dd33b65f
diff --git a/index.js b/index.js index <HASH>..<HASH> 100644 --- a/index.js +++ b/index.js @@ -23,7 +23,7 @@ function _generateFrom (file, fname) { Object.assign(acc, info) } return acc - }, {[fname]: Object.assign({isDir: true}, stat)}) + }, {}) }) } else if (!stat.isFile()) { // ignored. We don't do things like symlinks rn @@ -46,7 +46,6 @@ function check (dirname, dirIntegrity) { dirname = path.resolve(dirname) return pEvery(Object.keys(dirIntegrity), f => { const fstat = dirIntegrity[f] - if (fstat.isDir) return true const filename = path.join(dirname, f) if (fstat.size > MAX_BULK_SIZE) {
feat: don't return directories BREAKING CHANGE: Directories are not returned in the index object
zkochan_dint
train
js
7bcaa1a99e9833acebc006258f934fd699d8bf6a
diff --git a/console.go b/console.go index <HASH>..<HASH> 100644 --- a/console.go +++ b/console.go @@ -292,13 +292,16 @@ func colorize(s interface{}, c int, disabled bool) string { var ( consoleDefaultFormatTimestamp = func(i interface{}) string { t := "<nil>" - if tt, ok := i.(string); ok { + switch tt := i.(type) { + case string: ts, err := time.Parse(time.RFC3339, tt) if err != nil { t = tt } else { t = ts.Format(consoleTimeFormat) } + case json.Number: + t = tt.String() } return colorize(t, colorFaint, consoleNoColor) }
fix: console ts with json number (#<I>)
rs_zerolog
train
go
fa7b3b5643118ac2485aa4a98c12efba93fe85af
diff --git a/lib/workers/pr/index.js b/lib/workers/pr/index.js index <HASH>..<HASH> 100644 --- a/lib/workers/pr/index.js +++ b/lib/workers/pr/index.js @@ -296,8 +296,11 @@ async function ensurePr(prConfig) { return pr; } catch (err) { // istanbul ignore if - if (err.message === 'rate-limit-exceeded') { - logger.debug('Passing rate-limit-exceeded error up'); + if ( + err.message === 'rate-limit-exceeded' || + err.message === 'platform-failure' + ) { + logger.debug('Passing error up'); throw err; } logger.error({ err }, 'Failed to ensure PR:', err);
fix: pass platform-failure errors up from ensure pr
renovatebot_renovate
train
js
b06c364f5d584812684d7f3cd54abbc9c709ab30
diff --git a/packages/scaffold/src/templates/componentStory.js b/packages/scaffold/src/templates/componentStory.js index <HASH>..<HASH> 100644 --- a/packages/scaffold/src/templates/componentStory.js +++ b/packages/scaffold/src/templates/componentStory.js @@ -5,7 +5,6 @@ const storyTemplate = ({ componentName, fullName }) => ` import React from "react"; import { storiesOf } from "@storybook/react"; -import { withInfo } from "@storybook/addon-info"; import ${componentName} from ".";
chore(Scaffold): remove withInfo import from story template affects: @crave/farmblocks-dev-scaffold
CraveFood_farmblocks
train
js
9e9e7e6d6099963fdb3e13b68570d5bef11e1a45
diff --git a/lib/middleware/source_files.js b/lib/middleware/source_files.js index <HASH>..<HASH> 100644 --- a/lib/middleware/source_files.js +++ b/lib/middleware/source_files.js @@ -3,7 +3,7 @@ var querystring = require('querystring') var common = require('./common') var _ = require('../helper')._ var logger = require('../logger') -var log = logger.create('middlware:source-files') +var log = logger.create('middleware:source-files') // Files is a Set var findByPath = function (files, path) {
fix(middleware): Correct spelling of middleware logger name The `middleware:source-files` logger was spelled incorrectly.
karma-runner_karma
train
js
d495c5a38da94bdaecedd272602847edad198e84
diff --git a/lib/constants.js b/lib/constants.js index <HASH>..<HASH> 100644 --- a/lib/constants.js +++ b/lib/constants.js @@ -827,6 +827,9 @@ Object.assign(exports, { PWR_OPERATE_CONTROLLER: 18, PWR_OPERATE_FACTORY: 19, + EFFECT_INVULNERABILITY: 1001, + EFFECT_COLLAPSE_TIMER: 1002, + INVADER_CORE_HITS: 1000000, INVADER_CORE_CREEP_SPAWN_TIME: { 0: 0, 1: 0, 2: 6, 3: 3, 4: 2, 5: 1
feat: add effects DEV-<I>
screeps_common
train
js
9c40049f9ae616f386fa29c0825429383c0b648c
diff --git a/decode.go b/decode.go index <HASH>..<HASH> 100644 --- a/decode.go +++ b/decode.go @@ -154,7 +154,7 @@ func readToWithErrorHandler(decoder Decoder, errHandler ErrorHandler, out interf } outInnerStructInfo := getStructInfo(outInnerType) // Get the inner struct info to get CSV annotations if len(outInnerStructInfo.Fields) == 0 { - return ErrEmptyCSVFile + return ErrNoStructTags } headers := normalizeHeaders(csvRows[0])
fix: Wrong Error Thrown When No Fields In Struct Little mistake on previous PR that sum up the errors into errors objects
gocarina_gocsv
train
go
597ef0dc510169982f3b442afdd84f810d6c1e12
diff --git a/tests/gui/debugging/notifications.py b/tests/gui/debugging/notifications.py index <HASH>..<HASH> 100644 --- a/tests/gui/debugging/notifications.py +++ b/tests/gui/debugging/notifications.py @@ -81,7 +81,6 @@ def show_debug_graph(print_to_console=False, open_text_file=True, render_graph=T signal_name = edge_info['info']['prop_name'] arg = edge_info['info']['arg'] change = "{signal}({arg})".format(signal=signal_name, arg=arg) - print "signal:", edge_info['info'] text_file.write("{number}: {source_node}.{prop_name}[{change}] => {target_node}.{callback}".format( number=sequence_number, source_node=source_node_name,
chore(notifications): Remove print
DLR-RM_RAFCON
train
py
d3b3eb8e3e801848424dbfb4eb9e90382fa4fb20
diff --git a/abilian/core/commands/base.py b/abilian/core/commands/base.py index <HASH>..<HASH> 100644 --- a/abilian/core/commands/base.py +++ b/abilian/core/commands/base.py @@ -3,7 +3,6 @@ from __future__ import absolute_import, division, print_function, \ unicode_literals import logging -import os import runpy from pprint import pformat @@ -76,15 +75,6 @@ def _log_config(config): lines.append("{}{}: {}".format(prefix, k, v)) logger.info('\n'.join(lines)) - from abilian.services import conversion - unoconv = conversion._unoconv_handler.unoconv - logger.info("Unoconv: {configured_path} ({abspath})\n" - "Version: {version}".format( - configured_path=unoconv, - abspath=os.path.abspath(unoconv), - version=conversion._unoconv_handler.unoconv_version, - )) - def log_config(config): original_level = logger.level
fix: must delete this code since we removed unoconv.
abilian_abilian-core
train
py
867ec0107db9efbe4eb06d2cac01cf8e6d4645f0
diff --git a/packages/react-enty/src/EntitySelector.js b/packages/react-enty/src/EntitySelector.js index <HASH>..<HASH> 100644 --- a/packages/react-enty/src/EntitySelector.js +++ b/packages/react-enty/src/EntitySelector.js @@ -1,10 +1,13 @@ //@flow -import {Iterable} from 'immutable'; import ArraySchema from 'enty/lib/ArraySchema'; import getIn from 'unmutable/lib/getIn'; import get from 'unmutable/lib/get'; import keyArray from 'unmutable/lib/keyArray'; +import toArray from 'unmutable/lib/toArray'; +import toObject from 'unmutable/lib/toObject'; import pipeWith from 'unmutable/lib/util/pipeWith'; +import isIndexed from 'unmutable/lib/util/isIndexed'; +import doIf from 'unmutable/lib/doIf'; import KeyedMemo from './util/KeyedMemo'; /** @@ -39,10 +42,10 @@ export function selectEntityByResult(state: Object, resultKey: string, options: () => schema.denormalize({result, entities}) ); - if(Iterable.isIndexed(data)) { - return data.toArray ? data.toArray() : data; - } - return data.toObject ? data.toObject() : data; + return pipeWith( + data, + doIf(isIndexed, toArray(), toObject()) + ); } /**
refactor: replace iterable check with unmutable
blueflag_enty
train
js
aad3e6a3051a4cfcd34553ad5326ffaf50d1395c
diff --git a/src/index.js b/src/index.js index <HASH>..<HASH> 100644 --- a/src/index.js +++ b/src/index.js @@ -84,7 +84,9 @@ const checkVisible = function checkVisible(component) { } const parent = scrollParent(node); - const isOverflow = parent !== (node.ownerDocument || document); + const isOverflow = parent !== node.ownerDocument && + parent !== document && + parent !== document.documentElement; const visible = isOverflow ? checkOverflowVisible(component, parent) :
fix: ignore `html` as scroll parent
twobin_react-lazyload
train
js
3cc3caece50b3a22a782bebf736beaaacf44192e
diff --git a/packages/bonde-admin/src/mobilizations/widgets/__plugins__/donation/action-creators/async-donation-transaction-create.js b/packages/bonde-admin/src/mobilizations/widgets/__plugins__/donation/action-creators/async-donation-transaction-create.js index <HASH>..<HASH> 100644 --- a/packages/bonde-admin/src/mobilizations/widgets/__plugins__/donation/action-creators/async-donation-transaction-create.js +++ b/packages/bonde-admin/src/mobilizations/widgets/__plugins__/donation/action-creators/async-donation-transaction-create.js @@ -1,11 +1,12 @@ /* eslint-disable prefer-promise-reject-errors */ // import { addNotification } from 'reapop' +import { toast } from 'react-toastify' import * as notifications from 'utils/notifications' import { createAction } from './create-action' import AnalyticsEvents from 'mobilizations/widgets/utils/analytics-events' import * as t from '../action-types' import { setDonationCustomerData } from '.' -import { notify } from 'reapop/lib/store/notifications'; +// import { notify } from 'reapop/lib/store/notifications'; const asyncDonationTransactionCreate = params => (dispatch, getState, { api, intl }) => { const state = getState()
feat(admin): refactor notification async-donation-transaction-create
nossas_bonde-client
train
js
0af3abbc751f817e497728cfda4e670243b14cf1
diff --git a/test/cases/array.js b/test/cases/array.js index <HASH>..<HASH> 100644 --- a/test/cases/array.js +++ b/test/cases/array.js @@ -29,11 +29,16 @@ module.exports = [ output: '\n - []\n - []' }, { - name: 'array with object with empty property object', + name: 'array with object with empty object property', input: [{ empty: {} }], output: '\n - empty: {}' }, { + name: 'array with object with empty array property', + input: [{ empty: [] }], + output: '\n - empty: []' + }, + { name: 'array with number', input: [638], output: '\n - 638'
test: array with object with empty array property
eugeny-dementev_yamlify-object
train
js
23e183a9ac7aaa3bca2bc4eb8634d1738ec34a26
diff --git a/packages/discord.js/src/client/websocket/WebSocketShard.js b/packages/discord.js/src/client/websocket/WebSocketShard.js index <HASH>..<HASH> 100644 --- a/packages/discord.js/src/client/websocket/WebSocketShard.js +++ b/packages/discord.js/src/client/websocket/WebSocketShard.js @@ -368,7 +368,7 @@ class WebSocketShard extends EventEmitter { this.setWsCloseTimeout(-1); // If we still have a connection object, clean up its listeners if (this.connection) this._cleanupConnection(); - this.status = Status.DISCONNECTED; + this.status = Status.Disconnected; this.emitClose(event); } @@ -833,8 +833,8 @@ class WebSocketShard extends EventEmitter { // Step 2: Null the connection object this.connection = null; - // Step 3: Set the shard status to DISCONNECTED - this.status = Status.DISCONNECTED; + // Step 3: Set the shard status to disconnected + this.status = Status.Disconnected; // Step 4: Cache the old sequence (use to attempt a resume) if (this.sequence !== -1) this.closeSequence = this.sequence;
fix(WebSocketShard): Disconnected casing (#<I>)
discordjs_discord.js
train
js
e056312d0c20f51c4d0b7bb64be66883d27b457b
diff --git a/system/Security/Security.php b/system/Security/Security.php index <HASH>..<HASH> 100644 --- a/system/Security/Security.php +++ b/system/Security/Security.php @@ -503,6 +503,21 @@ class Security implements SecurityInterface } /** + * Restore hash from Session or Cookie + */ + private function restoreHash(): void + { + if ($this->isCSRFCookie()) { + if ($this->isHashInCookie()) { + $this->hash = $this->hashInCookie; + } + } elseif ($this->session->has($this->tokenName)) { + // Session based CSRF protection + $this->hash = $this->session->get($this->tokenName); + } + } + + /** * Generates the CSRF Hash. */ protected function generateHash(): string @@ -511,13 +526,10 @@ class Security implements SecurityInterface // We don't necessarily want to regenerate it with // each page load since a page could contain embedded // sub-pages causing this feature to fail - if ($this->isCSRFCookie()) { - if ($this->isHashInCookie()) { - return $this->hash = $this->hashInCookie; - } - } elseif ($this->session->has($this->tokenName)) { - // Session based CSRF protection - return $this->hash = $this->session->get($this->tokenName); + $this->restoreHash(); + + if ($this->hash !== null) { + return $this->hash; } $this->hash = bin2hex(random_bytes(static::CSRF_HASH_BYTES));
refactor: extract restoreHash() method
codeigniter4_CodeIgniter4
train
php
6a8d0fb9558bc671a4039b0acd402a1383b4f151
diff --git a/cmd/api-router.go b/cmd/api-router.go index <HASH>..<HASH> 100644 --- a/cmd/api-router.go +++ b/cmd/api-router.go @@ -241,7 +241,7 @@ func registerAPIRouter(router *mux.Router) { collectAPIStats("listobjectparts", maxClients(gz(httpTraceAll(api.ListObjectPartsHandler))))).Queries("uploadId", "{uploadId:.*}") // CompleteMultipartUpload router.Methods(http.MethodPost).Path("/{object:.+}").HandlerFunc( - collectAPIStats("completemutipartupload", maxClients(gz(httpTraceAll(api.CompleteMultipartUploadHandler))))).Queries("uploadId", "{uploadId:.*}") + collectAPIStats("completemultipartupload", maxClients(gz(httpTraceAll(api.CompleteMultipartUploadHandler))))).Queries("uploadId", "{uploadId:.*}") // NewMultipartUpload router.Methods(http.MethodPost).Path("/{object:.+}").HandlerFunc( collectAPIStats("newmultipartupload", maxClients(gz(httpTraceAll(api.NewMultipartUploadHandler))))).Queries("uploads", "")
fix(Router): typo: completemutipartupload to completemultipartupload (#<I>)
minio_minio
train
go
177ff1f65aeed3b31204230511baa7bc7fcdb746
diff --git a/src/index.js b/src/index.js index <HASH>..<HASH> 100644 --- a/src/index.js +++ b/src/index.js @@ -3,7 +3,8 @@ import shimmer from 'trail-shimmer' module.exports = { - wrap(agent, redis = require('redis')) { + target: 'redis', + wrap(agent, redis) { // TODO: how to proper indent multiline arguments? shimmer.wrap(redis.RedisClient.prototype, 'redis.RedisClient.prototype', 'send_command', function (original) { // eslint-disable-line return function (...args) {
refactor: define target rather than explicit require
open-trail_node-trail-instrument-redis
train
js
112378fc70818d45ef41a6acc909be1934dc99fb
diff --git a/workflow/controller/operator.go b/workflow/controller/operator.go index <HASH>..<HASH> 100644 --- a/workflow/controller/operator.go +++ b/workflow/controller/operator.go @@ -3187,7 +3187,10 @@ func (woc *wfOperationCtx) setStoredWfSpec() error { if wfDefault == nil { wfDefault = &wfv1.Workflow{} } - if woc.wf.Status.StoredWorkflowSpec == nil { + // woc.wf.Status.StoredWorkflowSpec.Entrypoint == "" check is mainly to support backward compatible with 2.11.x workflow to 2.12.x + // Need to recalculate StoredWorkflowSpec in 2.12.x format. + // This check can be removed once all user migrated from 2.11.x to 2.12.x + if woc.wf.Status.StoredWorkflowSpec == nil || woc.wf.Status.StoredWorkflowSpec.Entrypoint == "" { wftHolder, err := woc.fetchWorkflowSpec() if err != nil { return err
fix: Backward compatible workflowTemplateRef from <I>.x to <I>.x (#<I>)
argoproj_argo
train
go
6755565ce63bc11f67d7d6e3fbe945f70e92bd13
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -11,7 +11,8 @@ with open('HISTORY.rst') as history_file: long_discription = readme + '\n\n' + history install_requires = [ - 'PyLD>=0.7.1' + 'attrs>=16.2.0', + 'PyLD>=0.7.1', ] tests_require = [
chore: add attrs to dependencies For future use in refactoring the models
COALAIP_pycoalaip
train
py
3c2afd1676c15442380be152c68e6bada8369f11
diff --git a/decidim-elections/app/assets/config/decidim_elections_manifest.js b/decidim-elections/app/assets/config/decidim_elections_manifest.js index <HASH>..<HASH> 100644 --- a/decidim-elections/app/assets/config/decidim_elections_manifest.js +++ b/decidim-elections/app/assets/config/decidim_elections_manifest.js @@ -3,7 +3,6 @@ //= link decidim/elections/trustee/key_ceremony.js //= link decidim/elections/trustee/tally.js //= link decidim/elections/trustee/trustee_zone.js -//= link decidim/elections/voter/vote.js //= link decidim/elections/voter/casting-vote.js //= link decidim/elections/voter/new-vote.js //= link decidim/elections/voter/setup-preview.js
fix: remove vote.js from elections manifest (#<I>)
decidim_decidim
train
js
add7b8de4c34da1266a2b7b43eb8e9c8bbdf5350
diff --git a/src/trumbowyg.js b/src/trumbowyg.js index <HASH>..<HASH> 100644 --- a/src/trumbowyg.js +++ b/src/trumbowyg.js @@ -1002,7 +1002,7 @@ jQuery.trumbowyg = { // Wrap groups of inline elements in paragraphs (recursive) var wrapInlinesInParagraphsFrom = function ($from) { if ($from.length !== 0) { - var $finalParagraph = $from.nextUntil(blockElementsSelector).andSelf().wrapAll('<p/>').parent(), + var $finalParagraph = $from.nextUntil(blockElementsSelector).addBack().wrapAll('<p/>').parent(), $nextElement = $finalParagraph.nextAll(inlineElementsSelector).first(); $finalParagraph.next('br').remove(); wrapInlinesInParagraphsFrom($nextElement);
refactor: switch from andSelf to addBack to be jQuery 3 compatible
Alex-D_Trumbowyg
train
js
576a0f9c3392bbdf01765b8595f28f57bd644f49
diff --git a/src/mousetracker.js b/src/mousetracker.js index <HASH>..<HASH> 100644 --- a/src/mousetracker.js +++ b/src/mousetracker.js @@ -1400,8 +1400,10 @@ * @function */ removeContact: function() { - if ( this.contacts > 0 ) { - --this.contacts; + --this.contacts; + + if (this.contacts < 0) { + this.contacts = 0; } } };
fix: setting contacts to 0 if below 0
openseadragon_openseadragon
train
js
f65dae9279b5cc2895a78905e353cc03f62dfd6c
diff --git a/packages/node_modules/@webex/webex-core/src/lib/services/service-catalog.js b/packages/node_modules/@webex/webex-core/src/lib/services/service-catalog.js index <HASH>..<HASH> 100644 --- a/packages/node_modules/@webex/webex-core/src/lib/services/service-catalog.js +++ b/packages/node_modules/@webex/webex-core/src/lib/services/service-catalog.js @@ -53,10 +53,10 @@ const ServiceCatalog = AmpState.extend({ const serviceUrls = (typeof serviceGroup === 'string') ? this.serviceGroups[serviceGroup] || [] : [ - ...this.serviceGroups.discovery, - ...this.serviceGroups.preauth, + ...this.serviceGroups.postauth, ...this.serviceGroups.signin, - ...this.serviceGroups.postauth + ...this.serviceGroups.preauth, + ...this.serviceGroups.discovery ]; return serviceUrls.find((serviceUrl) => serviceUrl.name === name);
fix(webex-core): reverse service catalog array order Reverse the service catalog array order to allow the Array.find method to prioritize post auth service urls and sort downwards to discovery.
webex_spark-js-sdk
train
js
70bb834e3f39a6f4f1e297773d8661d6f85072e3
diff --git a/src/index.js b/src/index.js index <HASH>..<HASH> 100644 --- a/src/index.js +++ b/src/index.js @@ -62,12 +62,10 @@ function logFactory(level) { } function connectLoggers() { - Object.assign(Logger.prototype, { - debug: logFactory('debug'), - info: logFactory('info'), - warn: logFactory('warn'), - error: logFactory('error') - }); + Logger.prototype.debug = logFactory('debug') + Logger.prototype.info = logFactory('info') + Logger.prototype.warn = logFactory('warn') + Logger.prototype.error = logFactory('error') } /**
fix(logging): restore ES5 compatibility Factor out the Object.assign() without compromising anything else.
aurelia_logging
train
js
216109cfba033a110d7ce59e72894972155297c3
diff --git a/src/Service/Model.php b/src/Service/Model.php index <HASH>..<HASH> 100644 --- a/src/Service/Model.php +++ b/src/Service/Model.php @@ -220,7 +220,7 @@ class Model extends QueryBuilder implements \ArrayAccess, \IteratorAggregate, \C */ public static function new($data = [], array $options = []) { - return static::newInstance($options + ['data' => $data]); + return static::createNewInstance($options + ['data' => $data]); } /** @@ -230,7 +230,7 @@ class Model extends QueryBuilder implements \ArrayAccess, \IteratorAggregate, \C */ public static function newColl($data = []) { - return static::newInstance()->beColl()->fromArray($data); + return static::createNewInstance()->beColl()->fromArray($data); } /**
chore: newInstance => createNewInstance
miaoxing_plugin
train
php
c5cbf67bc856f77e5035b9ccec4334b9b96b6a3f
diff --git a/package.js b/package.js index <HASH>..<HASH> 100644 --- a/package.js +++ b/package.js @@ -30,7 +30,7 @@ Package.on_use(function (api) { api.versionsFrom('METEOR@0.9.0.1'); api.use('angular:angular@1.4.4', 'client'); - api.use('check'); + api.use('check', 'client'); api.use('minimongo'); // Since commit b3096e93661bc79bab73a63bae0e14643030a9a3, MongoId and // diff-sequence are separate packages from minimongo.
fix(dependency): Limit the dependency of `check` package to client, only there we use it. Fixes #<I>
Urigo_angular-meteor
train
js
af1389e034f2db664f33b4123c8a22dcf1ca2d32
diff --git a/salt/returners/slack_webhook_return.py b/salt/returners/slack_webhook_return.py index <HASH>..<HASH> 100644 --- a/salt/returners/slack_webhook_return.py +++ b/salt/returners/slack_webhook_return.py @@ -350,7 +350,8 @@ def _post_message(webhook, author_icon, title, report): webhook_url = _urljoin('https://hooks.slack.com/services/', webhook) query_result = salt.utils.http.query(webhook_url, 'POST', data=data) - if query_result.get('body', 'failed') == 'ok' and query_result.get('status', 0) == 200: + # Sometimes the status is not available, so status 200 is assumed when it is not present + if query_result.get('body', 'failed') == 'ok' and query_result.get('status', 200) == 200: return True else: log.error('Slack incoming webhook message post result: %s', query_result)
feat: Improve slack response management
saltstack_salt
train
py
9874ba2922d1347abc4ea919bac94536c8783494
diff --git a/test/shutdown-services-spec.js b/test/shutdown-services-spec.js index <HASH>..<HASH> 100644 --- a/test/shutdown-services-spec.js +++ b/test/shutdown-services-spec.js @@ -40,6 +40,7 @@ describe('Shutdown services tests', function () { 'registry', 'categories', 'statebox', + 'logger', 'testService1', 'testService2', 'probe'
test: update shutdown tests to include new logger service
wmfs_tymly-core
train
js
5e9c238fcc077ff0b042a87e95bb963e5397930c
diff --git a/tests/test_logs/test_logs.py b/tests/test_logs/test_logs.py index <HASH>..<HASH> 100644 --- a/tests/test_logs/test_logs.py +++ b/tests/test_logs/test_logs.py @@ -661,6 +661,18 @@ def test_put_retention_policy(): @mock_logs +def test_delete_log_stream(): + logs = boto3.client("logs", TEST_REGION) + logs.create_log_group(logGroupName="logGroup") + logs.create_log_stream(logGroupName="logGroup", logStreamName="logStream") + resp = logs.describe_log_streams(logGroupName="logGroup") + assert resp["logStreams"][0]["logStreamName"] == "logStream" + logs.delete_log_stream(logGroupName="logGroup", logStreamName="logStream") + resp = logs.describe_log_streams(logGroupName="logGroup") + assert resp["logStreams"] == [] + + +@mock_logs def test_delete_retention_policy(): conn = boto3.client("logs", TEST_REGION) log_group_name = "dummy"
test: add missing test for delete_log_stream (#<I>)
spulec_moto
train
py
1b6b59cba602e8e1f84f3b0784fee76309aaae16
diff --git a/annotations/builder/src/main/java/io/sundr/builder/internal/BuilderContext.java b/annotations/builder/src/main/java/io/sundr/builder/internal/BuilderContext.java index <HASH>..<HASH> 100644 --- a/annotations/builder/src/main/java/io/sundr/builder/internal/BuilderContext.java +++ b/annotations/builder/src/main/java/io/sundr/builder/internal/BuilderContext.java @@ -147,6 +147,9 @@ public class BuilderContext { .withPackageName("io.sundr.builder") .withName("Builder") .withParameters(T) + .addNewAnnotation() + .withClassRef(ClassRef.forName(FunctionalInterface.class.getName())) + .endAnnotation() .addNewMethod() .withName("build") .withReturnType(T.toReference()) diff --git a/core/src/main/java/io/sundr/builder/Builder.java b/core/src/main/java/io/sundr/builder/Builder.java index <HASH>..<HASH> 100644 --- a/core/src/main/java/io/sundr/builder/Builder.java +++ b/core/src/main/java/io/sundr/builder/Builder.java @@ -21,6 +21,7 @@ package io.sundr.builder; * * @param <T> The type of objects this Builder builds. */ +@FunctionalInterface public interface Builder<T> { /**
chore: Builder is now a FunctionalInterface
sundrio_sundrio
train
java,java
2fc7747751082456310cf2827763e5ad5bfa98d2
diff --git a/tasks/run.js b/tasks/run.js index <HASH>..<HASH> 100644 --- a/tasks/run.js +++ b/tasks/run.js @@ -171,9 +171,12 @@ function makeTask(grunt) { function trackBackgroundProc() { runningProcs.push(proc); proc.on('close', function () { - _.pull(runningProcs, proc); - clearPid(name); - grunt.log.debug('Process ' + name + ' closed.'); + // only clear pid if process is still in the list + if (runningProcs.indexOf(proc) !== -1) { + _.pull(runningProcs, proc); + clearPid(name); + grunt.log.debug('Process ' + name + ' closed.'); + } }); } @@ -230,6 +233,11 @@ function makeTask(grunt) { var procs = _.where(runningProcs, { pid: pid }); clearPid(name); if (procs.length) { + // remove process from running list so pid doesn't get + // cleared by close event in case the process runs again shortly + procs.forEach(function(proc) { + _.pull(runningProcs, proc); + }); _.invoke(procs, 'kill'); grunt.log.ok(name + ' stopped'); } else {
fix: skip process close handler if stop task is executed
spalger_grunt-run
train
js
464b9993bdb8e35c4f2fcd920ed146f4f1e80aff
diff --git a/lib/backend.js b/lib/backend.js index <HASH>..<HASH> 100644 --- a/lib/backend.js +++ b/lib/backend.js @@ -106,26 +106,6 @@ class Backend { } } -async function loadSourceMap(sourceMapURL, compiledURL) { - try { - let payload; - if (sourceMapURL.startsWith('data:')) { - const [metadata, ...other] = sourceMapURL.split(','); - const urlPayload = other.join(','); - const isBase64 = metadata.endsWith(';base64'); - payload = JSON.parse(Buffer.from(isBase64 ? urlPayload : querystring.unescape(urlPayload), isBase64 ? 'base64' : 'utf8').toString('utf8')); - } else { - const fileURL = new URL(sourceMapURL); - const content = await fsReadFile(fileURL, 'utf8'); - payload = JSON.parse(content); - } - await removeSourceContentIfMatch(sourceMapURL, compiledURL, payload); - return {payload}; - } catch (e) { - return {error: e.stack}; - } -} - class StringStream extends Readable { constructor(str) { super();
fix(backend): removed loadSourceMap duplicate
GoogleChromeLabs_ndb
train
js
49579d417878f3c7a25fff5b962537573b3736f7
diff --git a/lib/api-client/resources/deployment.js b/lib/api-client/resources/deployment.js index <HASH>..<HASH> 100644 --- a/lib/api-client/resources/deployment.js +++ b/lib/api-client/resources/deployment.js @@ -126,6 +126,15 @@ Deployment.list = function () { }; /** + * Returns information about a deployment resources for the given deployment. + */ +Deployment.get = function(id, done) { + return this.http.get(this.path + '/' + id, { + done: done + }); +}; + +/** * Returns a list of deployment resources for the given deployment. */ Deployment.getResources = function(id, done) {
feat(deployments): add deployment get to the API client related to CAM-<I>
camunda_camunda-bpm-sdk-js
train
js
bef4e58f0ec6943c223a818d4e31c607db5106e1
diff --git a/ui/src/composables/private/use-portal.js b/ui/src/composables/private/use-portal.js index <HASH>..<HASH> 100644 --- a/ui/src/composables/private/use-portal.js +++ b/ui/src/composables/private/use-portal.js @@ -1,5 +1,6 @@ import { h, ref, onUnmounted, Teleport } from 'vue' +import { noop } from '../../utils/event.js' import { createGlobalNode, removeGlobalNode } from '../../utils/private/global-nodes.js' import { portalList } from '../../utils/private/portal.js' @@ -25,8 +26,13 @@ function isOnGlobalDialog (vm) { export default function (vm, innerRef, renderPortalContent, checkGlobalDialog) { if (__QUASAR_SSR_SERVER__) { - // TODO vue3 - return + return { + portalIsActive: ref(false), + + showPortal: noop, + hidePortal: noop, + renderPortal: noop + } } let portalEl = null
feat(app): SSR support for Quasar Portal
quasarframework_quasar
train
js
f837550dbccd1a53961c531d366e9e383d0c73d1
diff --git a/src/components/dialog/QDialog.js b/src/components/dialog/QDialog.js index <HASH>..<HASH> 100644 --- a/src/components/dialog/QDialog.js +++ b/src/components/dialog/QDialog.js @@ -109,7 +109,7 @@ export default { return } - node = this.$refs.modal.$el.getElementsByTagName('INPUT') + node = this.$refs.modal.$el.getElementsByTagName('BUTTON') if (node.length) { node[node.length - 1].focus() }
fix: autofocus on button for QDialog
quasarframework_quasar
train
js
d53e30855e0ee50106ea16b8d96d22df5319ce0c
diff --git a/tests/test_core.py b/tests/test_core.py index <HASH>..<HASH> 100644 --- a/tests/test_core.py +++ b/tests/test_core.py @@ -20,7 +20,7 @@ class OAuth1Test(unittest.TestCase): generate_timestamp.return_value = '1' oauth = requests_oauthlib.OAuth1('client_key') headers = {'Content-type': 'application/x-www-form-urlencoded'} - r = requests.Request(method='GET', url='http://a.b/path?query=retain', + r = requests.Request(method='POST', url='http://a.b/path?query=retain', auth=oauth, data='this=really&is=&+form=encoded', headers=headers) a = r.prepare() @@ -29,7 +29,7 @@ class OAuth1Test(unittest.TestCase): self.assertEqual(a.headers.get('Content-Type'), 'application/x-www-form-urlencoded') # guess content-type - r = requests.Request(method='GET', url='http://a.b/path?query=retain', + r = requests.Request(method='POST', url='http://a.b/path?query=retain', auth=oauth, data='this=really&is=&+form=encoded') b = r.prepare() self.assertEqual(b.url, 'http://a.b/path?query=retain')
fix: ValueError: GET/HEAD requests should not include body.
requests_requests-oauthlib
train
py
75885689d9c48395205c65d7cf5a66011d8cb75e
diff --git a/test/units/url_test.rb b/test/units/url_test.rb index <HASH>..<HASH> 100644 --- a/test/units/url_test.rb +++ b/test/units/url_test.rb @@ -26,6 +26,22 @@ class UrlTest < Imgix::Test assert_equal expected, path.to_url(h: 200, w: 200) end + def test_calling_to_url_many_times + path = client.path(DEMO_IMAGE_PATH) + expected = ["https://demo.imgix.net/images/demo.png?h=200&w=200&s=d570a1ecd765470f7b34a69b56718a7a"] + result = [] + + 10.times do + expected << expected[0] + end + + expected.length.times do + result << path.to_url(h: 200, w: 200) + end + + assert_equal expected, result + end + private def client
test(to_url): consecutive calls have same result
imgix_imgix-rb
train
rb
67fe6cb823ef83283fb82904e9e9074428da1454
diff --git a/test/unit/karma.sauce.config.js b/test/unit/karma.sauce.config.js index <HASH>..<HASH> 100644 --- a/test/unit/karma.sauce.config.js +++ b/test/unit/karma.sauce.config.js @@ -65,25 +65,15 @@ var batches = [ }, // mobile { - sl_ios_safari_8: { - base: 'SauceLabs', - browserName: 'iphone', - version: '8.4' - }, sl_ios_safari_9: { base: 'SauceLabs', browserName: 'iphone', - version: '9.3' - }, - sl_android_4_4: { - base: 'SauceLabs', - browserName: 'android', - version: '4.4' + version: '10.3' }, - sl_android_5_1: { + sl_android_6_0: { base: 'SauceLabs', browserName: 'android', - version: '5.1' + version: '6.0' } } ]
test: use latest mobile browsers on saucelabs
IOriens_wxml-transpiler
train
js
3c94c9dbae6eaaa1c45a4d10ac03730954785bc8
diff --git a/packages/project-utils/bundling/function/webpack.config.js b/packages/project-utils/bundling/function/webpack.config.js index <HASH>..<HASH> 100644 --- a/packages/project-utils/bundling/function/webpack.config.js +++ b/packages/project-utils/bundling/function/webpack.config.js @@ -8,7 +8,9 @@ const generatePackageVersionDefinitions = () => { return Object.keys(pkgJSON.dependencies || []).reduce((acc, item) => { if (item.startsWith("@webiny/")) { - const { version } = require(path.join(item, "package.json")); + const { version } = require(require.resolve(path.join(item, "package.json"), { + paths: [process.cwd()] + })); acc[`${constantCase(item)}_VERSION`] = JSON.stringify(version); } return acc;
fix(project-utils): resolve package.json using cwd
Webiny_webiny-js
train
js
3f5ae92491155feecf5c5798c548e8223669ec3f
diff --git a/index.js b/index.js index <HASH>..<HASH> 100644 --- a/index.js +++ b/index.js @@ -118,8 +118,7 @@ quest.fetch = function(url, headers) { } quest.json = function(url, headers) { - const res = typeof url == 'string' ? - quest.stream(url, headers) : url + const res = url.readable ? url : quest.stream(url, headers) return new Promise((resolve, reject) => { res.on('error', reject) concat(res, (body) => {
fix: passing ClientRequest to `quest.json`
aleclarson_quest
train
js
4c3314d1e7d72c861b1f75a42d3592a111b37479
diff --git a/tsconfig-upgrader.js b/tsconfig-upgrader.js index <HASH>..<HASH> 100644 --- a/tsconfig-upgrader.js +++ b/tsconfig-upgrader.js @@ -5,6 +5,7 @@ var __migrations = [ inlineSourceMapMigration, addDomLibs, addIterableToAngularProjects, + addTnsCoreModulesPathMappings, ]; function migrateProject(tsConfig, tsconfigPath, projectDir) { @@ -80,6 +81,19 @@ function addTsLib(existingConfig, libName) { } } +function addTnsCoreModulesPathMappings(existingConfig, displayableTsconfigPath, projectDir) { + console.log("Adding tns-core-modules path mappings lib to tsconfig.json..."); + existingConfig["compilerOptions"] = existingConfig["compilerOptions"] || {}; + var compilerOptions = existingConfig["compilerOptions"]; + compilerOptions["baseUrl"] = "."; + compilerOptions["paths"] = compilerOptions["paths"] || {}; + + const appPath = getAppPath(projectDir); + compilerOptions["paths"]["~/*"] = compilerOptions["paths"]["~/*"] || [ + `${appPath}/*` + ]; +} + function getAppPath(projectDir) { const DEFAULT_PATH = "app"; const nsConfigPath = path.join(projectDir, "nsconfig.json");
chore: revert the tilde resolution as it was removed by mistake
NativeScript_nativescript-dev-typescript
train
js
df5e4232f59e6fea08911eddd0adc965d1b59c15
diff --git a/src/transformers/tokenization_utils_fast.py b/src/transformers/tokenization_utils_fast.py index <HASH>..<HASH> 100644 --- a/src/transformers/tokenization_utils_fast.py +++ b/src/transformers/tokenization_utils_fast.py @@ -16,6 +16,7 @@ Tokenization classes for fast tokenizers (provided by HuggingFace's tokenizers library). For slow (python) tokenizers see tokenization_utils.py """ +import copy import json import os from collections import defaultdict @@ -104,7 +105,7 @@ class PreTrainedTokenizerFast(PreTrainedTokenizerBase): ) if tokenizer_object is not None: - fast_tokenizer = tokenizer_object + fast_tokenizer = copy.deepcopy(tokenizer_object) elif fast_tokenizer_file is not None and not from_slow: # We have a serialization from tokenizers which let us directly build the backend fast_tokenizer = TokenizerFast.from_file(fast_tokenizer_file)
fix: create a copy for tokenizer object (#<I>)
huggingface_pytorch-pretrained-BERT
train
py
ef85c30c5b2713e791e956ad408aa0d46bde53ef
diff --git a/packages/resume/src/index.js b/packages/resume/src/index.js index <HASH>..<HASH> 100644 --- a/packages/resume/src/index.js +++ b/packages/resume/src/index.js @@ -1,3 +1,5 @@ +require("@babel/polyfill"); + let config; try {
fix(resume): Include `@babel/polyfill` in the `resume-cli` index. Since I don't know anything about the environment of `jsonresume/theme-manager`.
randytarampi_me
train
js
9394956481fde0d69778be5f5f37d36ec920d5c2
diff --git a/test.js b/test.js index <HASH>..<HASH> 100644 --- a/test.js +++ b/test.js @@ -72,6 +72,12 @@ describe('gitlab urls', function () { var parsed = parse(url) assert.deepEqual(['user', 'test1', ''], parsed) }) + + it('parses git gitlab url', function () { + var url = 'git@gitlab.team.com:user/test1.git' + var parsed = parse(url) + assert.deepEqual(['user', 'test1', ''], parsed) + }) }) describe('git @ syntax', function () { @@ -94,4 +100,4 @@ describe('github enterprise urls', function () { var parsed = parse(url) assert.deepEqual(['user', 'test1', ''], parsed) }) -}) \ No newline at end of file +})
chore(test): confirmed that private gitlab urls with git protocol work
repo-utils_parse-github-repo-url
train
js
2a9ecd2900ce705504d504b266a33adfd13b278e
diff --git a/lib/helper.js b/lib/helper.js index <HASH>..<HASH> 100644 --- a/lib/helper.js +++ b/lib/helper.js @@ -112,9 +112,10 @@ class Helper { let count = array.length; while (count > 0) { const step = (count / 2) | 0; - const it = first + step; + let it = first + step; if (comp(array[it], value) <= 0) { - first += it; + it += 1; + first = it; count -= step + 1; } else { count = step; diff --git a/test/helper.test.js b/test/helper.test.js index <HASH>..<HASH> 100644 --- a/test/helper.test.js +++ b/test/helper.test.js @@ -216,6 +216,22 @@ describe('Helper', () => { const expected = 2; assert.equal(actual, expected); }); + + it('returns the first index when queue is long', () => { + const queue = [ + { priority: 4 }, + { priority: 3 }, + { priority: 1 }, + { priority: 0 }, + { priority: -1 }, + { priority: -2 }, + { priority: -4 }, + ]; + const item = { priority: -5 }; + const actual = lowerBound(queue, item, (a, b) => b.priority - a.priority); + const expected = 7; + assert.equal(actual, expected); + }); }); describe('Helper.checkDomainMatch', () => {
fix(helper): fix a bug of causing error for session cache
yujiosaka_headless-chrome-crawler
train
js,js
6a6e1244857c44528fd3f8924d64866551b93a75
diff --git a/definitions/npm/commander_v2.x.x/flow_v0.28.x-/commander_v2.x.x.js b/definitions/npm/commander_v2.x.x/flow_v0.28.x-/commander_v2.x.x.js index <HASH>..<HASH> 100644 --- a/definitions/npm/commander_v2.x.x/flow_v0.28.x-/commander_v2.x.x.js +++ b/definitions/npm/commander_v2.x.x/flow_v0.28.x-/commander_v2.x.x.js @@ -272,7 +272,7 @@ declare module "commander" { } declare module.exports: Command & { - Command: Command, - Option: Option + Command: (name?: string) => Command; + Options: (flags: string, description?: string) => Option; }; } diff --git a/definitions/npm/commander_v2.x.x/test_commander_v2.x.x.js b/definitions/npm/commander_v2.x.x/test_commander_v2.x.x.js index <HASH>..<HASH> 100644 --- a/definitions/npm/commander_v2.x.x/test_commander_v2.x.x.js +++ b/definitions/npm/commander_v2.x.x/test_commander_v2.x.x.js @@ -1,5 +1,7 @@ import program from 'commander'; +new program.Command('support to use class'); + program .version('1.0.0') .arguments('<cmd> [env]')
fix(definitions): fix commander can use as class (#<I>)
flow-typed_flow-typed
train
js,js
d59911127b74304add7e720765a34f3739f118d1
diff --git a/lib/workers/branch/index.js b/lib/workers/branch/index.js index <HASH>..<HASH> 100644 --- a/lib/workers/branch/index.js +++ b/lib/workers/branch/index.js @@ -170,7 +170,7 @@ async function ensureBranch(config) { } else { logger.debug(`No files to commit`); } - if (!api.branchExists(branchName)) { + if ((await api.branchExists(branchName)) === false) { // Return now if no branch exists return false; }
fix(lockFileMaintenance): Add missing await to branchExists A call to api.branchExists() was missing an await, as a result we were causing errors when yarn lock maintenance had no files to commit.
renovatebot_renovate
train
js
e1e2b9f55e8ae73ac44ac66b26e852a6224b1ab0
diff --git a/lib/sync.js b/lib/sync.js index <HASH>..<HASH> 100644 --- a/lib/sync.js +++ b/lib/sync.js @@ -24,6 +24,7 @@ module.exports = function sync(options = {}) { let files const metal = Metalsmith(process.cwd()) + .source('src') .destination('pages/css') .clean(false) .frontmatter(false)
chore: be explicit about the src/ dir
primer_css
train
js
980676ef0cf07758b3e033a509cfe459f09efe0e
diff --git a/lib/generators/activeadmin_addons/install/install_generator.rb b/lib/generators/activeadmin_addons/install/install_generator.rb index <HASH>..<HASH> 100644 --- a/lib/generators/activeadmin_addons/install/install_generator.rb +++ b/lib/generators/activeadmin_addons/install/install_generator.rb @@ -8,12 +8,20 @@ module ActiveadminAddons end def setup_assets - if ActiveAdmin.application.use_webpacker + if use_webpacker? generate "activeadmin_addons:webpacker" else generate "activeadmin_addons:assets" end end + + private + + def use_webpacker? + ActiveAdmin.application.use_webpacker + rescue NoMethodError + false + end end end end
fix(generators): install generator assuming webpack related method
platanus_activeadmin_addons
train
rb
f1fe6aebf8ceff80d7c17efe01d4103515bb36cc
diff --git a/packages/ui-toggle-details/src/components/Expandable/index.js b/packages/ui-toggle-details/src/components/Expandable/index.js index <HASH>..<HASH> 100644 --- a/packages/ui-toggle-details/src/components/Expandable/index.js +++ b/packages/ui-toggle-details/src/components/Expandable/index.js @@ -31,6 +31,11 @@ import createChainedFunction from '@instructure/ui-utils/lib/createChainedFuncti const toggleExpanded = ({ expanded }) => ({ expanded: !expanded }) +/** +--- +category: components/utilities +--- +*/ class Expandable extends Component { static propTypes = { /**
docs(ui-toggle-details): Give Expandable a category Test plan: - Expandable should now appear under the Components/Utilities category in the docs Change-Id: Ie<I>da<I>beae<I>cdc<I>e<I>aaa0aa<I>ca<I>a<I> Reviewed-on: <URL>
instructure_instructure-ui
train
js
02eea2544652a44812c92fb339fbe85394f54091
diff --git a/actor-sdk/sdk-core/runtime/runtime-generic/src/main/java/im/actor/runtime/generic/network/AsyncTcpConnection.java b/actor-sdk/sdk-core/runtime/runtime-generic/src/main/java/im/actor/runtime/generic/network/AsyncTcpConnection.java index <HASH>..<HASH> 100644 --- a/actor-sdk/sdk-core/runtime/runtime-generic/src/main/java/im/actor/runtime/generic/network/AsyncTcpConnection.java +++ b/actor-sdk/sdk-core/runtime/runtime-generic/src/main/java/im/actor/runtime/generic/network/AsyncTcpConnection.java @@ -220,7 +220,7 @@ public class AsyncTcpConnection extends AsyncConnection { outputStream.write(p); outputStream.flush(); } - } catch (IOException e) { + } catch (IOException | NullPointerException e) { e.printStackTrace(); crashConnection(); }
fix(runtime): catch null in AsyncTcpConnection
actorapp_actor-platform
train
java
67a962067405eaaaf1d0a97e5265495e8327e25d
diff --git a/src/constructors/createGlobalStyle.js b/src/constructors/createGlobalStyle.js index <HASH>..<HASH> 100644 --- a/src/constructors/createGlobalStyle.js +++ b/src/constructors/createGlobalStyle.js @@ -43,7 +43,7 @@ export default function createGlobalStyle( } /** - * This fixes HMR compatiblility. Don't ask me why, but this combination of + * This fixes HMR compatibility. Don't ask me why, but this combination of * caching the closure variables via statics and then persisting the statics in * state works across HMR where no other combination did. ¯\_(ツ)_/¯ */
fix(createGlobalStyle): typo in the comment
styled-components_styled-components
train
js
0c311f57cfb9adb5f2b3d3382a8eecf1400977f5
diff --git a/middleware/middleware.js b/middleware/middleware.js index <HASH>..<HASH> 100644 --- a/middleware/middleware.js +++ b/middleware/middleware.js @@ -4,6 +4,7 @@ import { HIDE_LOADING, SET_TOKEN, STORAGE_KEYS as CORE_STORAGE_KEYS, + STATUS_CODES, } from '@commercetools-local/constants'; import * as storage from '@commercetools-local/utils/storage'; import toGlobal from '@commercetools-local/utils/to-global'; @@ -131,7 +132,10 @@ export default ({ dispatch, getState }) => next => action => { .catch(error => { // in case of 401 error, try again with a new token // https://github.com/commercetools/merchant-center-backend/blob/master/docs/AUTHENTICATION.md#problems-due-to-oauth-token-caching - if (error.statusCode && error.statusCode === 401) { + if ( + error.statusCode && + error.statusCode === STATUS_CODES.UNAUTHORIZED + ) { return sendRequest({ shouldRenewToken: true }); } throw error;
refactor(oauth): use constants for unauthorized ...bit useless but be consistent
commercetools_merchant-center-application-kit
train
js
468c73312737f874e7135fa0affa232c6d0fa3ea
diff --git a/test/test.index.js b/test/test.index.js index <HASH>..<HASH> 100644 --- a/test/test.index.js +++ b/test/test.index.js @@ -182,3 +182,13 @@ test('register() actions and views with invalid schema', function(t) { t.ok(err); }); }); + +test('express() a view that does not exist', function(t) { + var api = new Api(); + + t.plan(1); + + api.express(null, null); + + t.pass(); +});
test: add coverage for express()-ing a view that does not exist
eq8_eq8js-api
train
js
ac9c4e996bfff5a07801817291e8214e2da23113
diff --git a/spec/Subject-spec.js b/spec/Subject-spec.js index <HASH>..<HASH> 100644 --- a/spec/Subject-spec.js +++ b/spec/Subject-spec.js @@ -492,4 +492,20 @@ describe('Subject', function () { source.subscribe(subject); }); + + it('should be usable as an Observer of a finite delayed Observable', function (done) { + var source = Rx.Observable.of(1, 2, 3).delay(50); + var subject = new Rx.Subject(); + + var expected = [1, 2, 3]; + + subject.subscribe( + function (x) { + expect(x).toBe(expected.shift()); + }, + done.fail, + done); + + source.subscribe(subject); + }); });
test(Subject): add a test for Subject as an Observer Add a test for Subject being used as an Observer of a finite delayed Observable, to verify that the bug related to the old shared Subscription architecture does not occur. Related to bug #<I>.
ReactiveX_rxjs
train
js
f83e00b61680f882aeb7da906500d82065466ed3
diff --git a/packages/api-core/src/resources/slotmachine.js b/packages/api-core/src/resources/slotmachine.js index <HASH>..<HASH> 100644 --- a/packages/api-core/src/resources/slotmachine.js +++ b/packages/api-core/src/resources/slotmachine.js @@ -16,7 +16,7 @@ export default class AvSlotMachine extends AvMicroservice { }); } - query(data) { - return this.create({ query: data }); + query(data, variables) { + return this.create({ query: data, variables }); } }
feat(api-core): add ability to send in variables in AvSlotMachine.query
Availity_sdk-js
train
js
6db729b1365ebbb34cba2285bc113e85f64d2697
diff --git a/vendor/github.com/huandu/xstrings/convert.go b/vendor/github.com/huandu/xstrings/convert.go index <HASH>..<HASH> 100644 --- a/vendor/github.com/huandu/xstrings/convert.go +++ b/vendor/github.com/huandu/xstrings/convert.go @@ -44,18 +44,25 @@ func ToCamelCase(str string) string { return buf.String() } - buf.WriteRune(unicode.ToUpper(r0)) - r0, size = utf8.DecodeRuneInString(str) - str = str[size:] + r0 = unicode.ToUpper(r0) for len(str) > 0 { r1 = r0 r0, size = utf8.DecodeRuneInString(str) str = str[size:] - if r1 == '_' && r0 != '_' { + if r1 == '_' && r0 == '_' { + buf.WriteRune(r1) + continue + } + + if r1 == '_' { r0 = unicode.ToUpper(r0) } else { + r0 = unicode.ToLower(r0) + } + + if r1 != '_' { buf.WriteRune(r1) } }
fix: upgrade huandu/xtrings to handle capital word with func ToCamelCase
moul_protoc-gen-gotemplate
train
go
fbda9b983d16c548216dd6877f6e890b0abb3931
diff --git a/src/cobra/io/web/biomodels_repository.py b/src/cobra/io/web/biomodels_repository.py index <HASH>..<HASH> 100644 --- a/src/cobra/io/web/biomodels_repository.py +++ b/src/cobra/io/web/biomodels_repository.py @@ -80,13 +80,11 @@ class BioModels(AbstractModelRepository): ) response.raise_for_status() files = BioModelsFilesResponse.parse_obj(response.json()) - is_found = False for model in files.main: if model.name.endswith("xml"): - is_found = True break - if not is_found: - RuntimeError(f"'{model_id}' does not seem to contain an SBML document.") + else: + RuntimeError(f"Could not find an SBML document for '{model_id}'.") with self._progress, httpx.stream( method="GET", url=self._url.join(f"download/{model_id}"),
refactor: use `for`... `else` construct
opencobra_cobrapy
train
py