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 |
|---|---|---|---|---|---|
7add9fb1da5a00669ac870917820a8c8b1fe643c
|
diff --git a/core/lib/engine_util.js b/core/lib/engine_util.js
index <HASH>..<HASH> 100644
--- a/core/lib/engine_util.js
+++ b/core/lib/engine_util.js
@@ -644,6 +644,6 @@ function randomInt (low, high) {
}
function sanitiseValue (value) {
- if (value === 0 || value === false) return value;
+ if (value === 0 || value === false || value === null || value === undefined) return value;
return value ? value : '';
}
|
fix: prevent sanitize form converting null/undefined to ''
|
artilleryio_artillery
|
train
|
js
|
a210d8fa5f5a744412f43d422f7cddf7b12d1211
|
diff --git a/src/ducks/connections/index.js b/src/ducks/connections/index.js
index <HASH>..<HASH> 100644
--- a/src/ducks/connections/index.js
+++ b/src/ducks/connections/index.js
@@ -50,12 +50,11 @@ export const updateConnectionRunningStatus = (konnector, account, isRunning = fa
// selectors
const getKonnectorIconURL = (registry, slug) => {
- const url = `assets/icons/konnectors/${slug}.svg`
let icon = null
try {
- icon = require(url)
+ icon = require(`../../assets/icons/konnectors/${slug}.svg`)
} catch (error) {
- console.warn(`Cannot get icon ${url}: ${error.message}`)
+ console.warn(`Cannot get icon ${slug}: ${error.message}`)
}
return icon
}
|
fix: konnector icons in queue :ambulance::lipstick:
|
cozy_cozy-home
|
train
|
js
|
31e5e3b99b1ffb790fcb70a98165f365cd1d424c
|
diff --git a/webapps/client/scripts/tasklist/directives/cam-tasklist-sorting-choices.js b/webapps/client/scripts/tasklist/directives/cam-tasklist-sorting-choices.js
index <HASH>..<HASH> 100644
--- a/webapps/client/scripts/tasklist/directives/cam-tasklist-sorting-choices.js
+++ b/webapps/client/scripts/tasklist/directives/cam-tasklist-sorting-choices.js
@@ -113,7 +113,7 @@ define([
var by = scope.sortings[index].by;
if (scope.uniqueProps[by]) {
- return scope.uniqueProps[by].toLowerCase();
+ return scope.uniqueProps[by];
}
if (!scope.sortings[index] || !scope.sortings[index].parameters) {
|
fix(sorting): do not lowercase label
related to CAM-<I>
|
camunda_camunda-bpm-platform
|
train
|
js
|
765c6cd1cbef5df518129396713a09c2d347a51f
|
diff --git a/tests/system/CommonFunctionsTest.php b/tests/system/CommonFunctionsTest.php
index <HASH>..<HASH> 100644
--- a/tests/system/CommonFunctionsTest.php
+++ b/tests/system/CommonFunctionsTest.php
@@ -606,4 +606,15 @@ final class CommonFunctionsTest extends CIUnitTestCase
$this->assertStringStartsWith('nonce="', csp_script_nonce());
}
+
+ public function testLangOnCLI()
+ {
+ Services::createRequest(new App(), true);
+
+ $message = lang('CLI.generator.fileCreate', ['TestController.php']);
+
+ $this->assertSame('File created: TestController.php', $message);
+
+ $this->resetServices();
+ }
}
|
test: add test for lang() error on CLI
|
codeigniter4_CodeIgniter4
|
train
|
php
|
8e267a7b3f2cb0bf41d84b4646d5d4fa9fafec91
|
diff --git a/browser/browser.js b/browser/browser.js
index <HASH>..<HASH> 100644
--- a/browser/browser.js
+++ b/browser/browser.js
@@ -40,7 +40,7 @@ var browser = {
version: 0
};
-if (window && window.navigator) {
+if (typeof window !== 'undefined' && window.navigator) {
detectBrowser();
}
|
fix: prevent access to the window object in the node (fix #<I>) (#<I>)
|
nhn_tui.code-snippet
|
train
|
js
|
eda2b65f5cdcc44644ef88147ca8245f462bfbc9
|
diff --git a/system/Commands/Database/ShowTableInfo.php b/system/Commands/Database/ShowTableInfo.php
index <HASH>..<HASH> 100644
--- a/system/Commands/Database/ShowTableInfo.php
+++ b/system/Commands/Database/ShowTableInfo.php
@@ -82,7 +82,7 @@ class ShowTableInfo extends BaseCommand
/**
* @var bool Sort the table rows in DESC order or not.
*/
- private bool $sortIsDESC = false;
+ private bool $sortDesc = false;
public function run(array $params)
{
@@ -91,7 +91,7 @@ class ShowTableInfo extends BaseCommand
$tables = $this->db->listTables();
if (CLI::getOption('desc') === true) {
- $this->sortIsDESC = true;
+ $this->sortDesc = true;
}
if ($tables === []) {
@@ -164,7 +164,7 @@ class ShowTableInfo extends BaseCommand
];
}
- if ($this->sortIsDESC) {
+ if ($this->sortDesc) {
krsort($this->tbody);
}
@@ -201,7 +201,7 @@ class ShowTableInfo extends BaseCommand
$this->tbody[] = $row;
}
- if ($this->sortIsDESC) {
+ if ($this->sortDesc) {
krsort($this->tbody);
}
@@ -229,7 +229,7 @@ class ShowTableInfo extends BaseCommand
];
}
- if ($this->sortIsDESC) {
+ if ($this->sortDesc) {
krsort($this->tbody);
}
|
refactor: rename property name
|
codeigniter4_CodeIgniter4
|
train
|
php
|
a48327672d6c70d9db793b48459ac682319b7a2d
|
diff --git a/src/Checkbox.js b/src/Checkbox.js
index <HASH>..<HASH> 100644
--- a/src/Checkbox.js
+++ b/src/Checkbox.js
@@ -25,6 +25,7 @@ const Checkbox = ({
useEffect(() => {
setChecked(props.checked);
+ _input.current.checked = props.checked;
}, [props.checked]);
return (
|
fix: make sure that checked property equals checked state
|
react-materialize_react-materialize
|
train
|
js
|
f8f45d00bc8edc355f2e7bf572959dfa4195ef2e
|
diff --git a/packages/ringcentral-widgets-test/test/integration-test/LogBasicInfo/LogBasicInfo.spec.js b/packages/ringcentral-widgets-test/test/integration-test/LogBasicInfo/LogBasicInfo.spec.js
index <HASH>..<HASH> 100644
--- a/packages/ringcentral-widgets-test/test/integration-test/LogBasicInfo/LogBasicInfo.spec.js
+++ b/packages/ringcentral-widgets-test/test/integration-test/LogBasicInfo/LogBasicInfo.spec.js
@@ -1,4 +1,4 @@
-import { shallow } from 'enzyme';
+import { mount } from 'enzyme';
import React from 'react';
import callDirections from 'ringcentral-integration/enums/callDirections';
import callResults from 'ringcentral-integration/enums/callResults';
@@ -12,7 +12,7 @@ const setup = (props) => {
const currentLog = {
call
};
- const wrapper = shallow(<LogBasicInfo
+ const wrapper = mount(<LogBasicInfo
currentLog={currentLog}
{...props}
/>);
|
fix: test case (#<I>)
|
ringcentral_ringcentral-js-widgets
|
train
|
js
|
f18f193f9e930b59d5f6461c93d3e69a1a076d88
|
diff --git a/packages/site/src/install/index.js b/packages/site/src/install/index.js
index <HASH>..<HASH> 100644
--- a/packages/site/src/install/index.js
+++ b/packages/site/src/install/index.js
@@ -8,20 +8,6 @@ export default _ =>
<h1>Install FTW!</h1>
</Heading>
<Doc>{`
-## Recommended Usage
-
-Use npm. Follow these streamlined install instructions. Fun. Profit.
-
-## Use Components
-
-Each component is installed separately. JavaScript is prebuilt as Node modules. Assets are inlined. Find and use what you need. For example:
-
-\`\`\`bash
-npm install @pluralsight/ps-design-system-button --save-dev
-\`\`\`
-
-See individual reference pages for usage examples.
-
## Use Core
First install the dependency:
@@ -36,6 +22,16 @@ For build support, consult the [CSS Build docs](/install/css).
For usage details, see the [Core Usage docs](/core/usage).
+## Use Components
+
+Each component is installed separately. JavaScript is prebuilt as Node modules. Assets are inlined. Find and use what you need. For example:
+
+\`\`\`bash
+npm install @pluralsight/ps-design-system-button --save-dev
+\`\`\`
+
+See individual reference pages for usage examples.
+
For full, working project examples, see the [examples on github](https://github.com/pluralsight/design-system/tree/master/examples).
`}</Doc>
</Chrome>
|
refactor(site): remove recommended paragraph
|
pluralsight_design-system
|
train
|
js
|
28b79a76a874d329c53068976ecf2d69e7536c1d
|
diff --git a/test/pubsub/operation.node.js b/test/pubsub/operation.node.js
index <HASH>..<HASH> 100644
--- a/test/pubsub/operation.node.js
+++ b/test/pubsub/operation.node.js
@@ -311,7 +311,11 @@ describe('Pubsub subsystem operates correctly', () => {
expect(handlerSpy.args.map(([message]) => uint8ArrayToString(message.data))).to.include.members(['message1', 'message2'])
// Disconnect the first connection (this acts as a delayed reconnect)
+ const libp2pConnUpdateSpy = sinon.spy(libp2p.connectionManager.connections, 'set')
+ const remoteLibp2pConnUpdateSpy = sinon.spy(remoteLibp2p.connectionManager.connections, 'set')
+
await originalConnection.close()
+ await pWaitFor(() => libp2pConnUpdateSpy.callCount === 1 && remoteLibp2pConnUpdateSpy.callCount === 1)
// Verify messages go both ways after the disconnect
handlerSpy.resetHistory()
|
test: fix pubsub intermittent test (#<I>)
|
libp2p_js-libp2p
|
train
|
js
|
aec176d53df28a7f0e7d768f1893b19d2057276a
|
diff --git a/django_tenants/management/commands/migrate_schemas.py b/django_tenants/management/commands/migrate_schemas.py
index <HASH>..<HASH> 100644
--- a/django_tenants/management/commands/migrate_schemas.py
+++ b/django_tenants/management/commands/migrate_schemas.py
@@ -35,6 +35,8 @@ class MigrateSchemasCommand(SyncCommon):
)
parser.add_argument('--run-syncdb', action='store_true', dest='run_syncdb',
help='Creates tables for apps without migrations.')
+ parser.add_argument('--check', action='store_true', dest='check_unapplied',
+ help='Exits with a non-zero status if unapplied migrations exist.')
def handle(self, *args, **options):
super().handle(*args, **options)
|
fix(migrations): Fix migrate_schemas not working on Django <I>
|
tomturner_django-tenants
|
train
|
py
|
afc0b1bce1d0f91f61e81b2888f569bf62a2db40
|
diff --git a/src/notebook/components/transforms/image.js b/src/notebook/components/transforms/image.js
index <HASH>..<HASH> 100644
--- a/src/notebook/components/transforms/image.js
+++ b/src/notebook/components/transforms/image.js
@@ -6,8 +6,14 @@ export default class ImageDisplay extends React.Component {
}
render() {
+ let size = {};
+
+ if (this.props.metadata) {
+ size = { width, height } = this.props.metadata;
+ }
+
return (
- <img role="presentation" src={`data:${this.props.mimetype};base64,${this.props.data}`} />
+ <img role="presentation" src={`data:${this.props.mimetype};base64,${this.props.data}`} {...size} />
);
}
}
@@ -15,6 +21,7 @@ export default class ImageDisplay extends React.Component {
ImageDisplay.propTypes = {
data: React.PropTypes.string.isRequired,
mimetype: React.PropTypes.string.isRequired,
+ metadata: React.PropTypes.any,
};
export function PNGDisplay(props) {
|
fix(display): pass width and height through to img component
|
nteract_nteract
|
train
|
js
|
a5193c3f04c2c2f53fbe5184ba25fc6324fda3f0
|
diff --git a/stories/examples/react-autosuggest.js b/stories/examples/react-autosuggest.js
index <HASH>..<HASH> 100644
--- a/stories/examples/react-autosuggest.js
+++ b/stories/examples/react-autosuggest.js
@@ -23,7 +23,7 @@ class Examples extends Component {
changes.type === Downshift.stateChangeTypes.keyDownEscape &&
!isClosingMenu
) {
- selectedColor = null
+ selectedColor = ''
}
if (changes.hasOwnProperty('inputValue')) {
if (changes.type === Downshift.stateChangeTypes.keyDownEscape) {
|
docs(example): reset selected as empty str, not null (#<I>)
|
downshift-js_downshift
|
train
|
js
|
39223d1e78f649b2c638885107fb742b70834110
|
diff --git a/packages/docs/build/pug-to-json.js b/packages/docs/build/pug-to-json.js
index <HASH>..<HASH> 100644
--- a/packages/docs/build/pug-to-json.js
+++ b/packages/docs/build/pug-to-json.js
@@ -46,10 +46,10 @@ module.exports = function (content) {
} else if (node.name === 'code') {
const lang = eval(node.attrs.find(attr => attr.name === 'lang').val)
const src = eval(node.attrs.find(attr => attr.name === 'src').val)
- // TODO: inline code
+
pageSection.children.push({
type: 'markup',
- val: `${lang}_${src}`
+ value: `${lang}_${src}`
})
} else {
// Pug doesn't deal with attrs in a way that I like, so we're going
|
docs(pug-to-json): fix json generation of snippets
resolves #<I>
|
vuetifyjs_vuetify
|
train
|
js
|
8831db31e7d5de03cb9744f811ffd256494f97f6
|
diff --git a/src/lib/isTaxID.js b/src/lib/isTaxID.js
index <HASH>..<HASH> 100644
--- a/src/lib/isTaxID.js
+++ b/src/lib/isTaxID.js
@@ -280,7 +280,7 @@ function elGrCheck(tin) {
for (let i = 0; i < 8; i++) {
checksum += digits[i] * (2 ** (8 - i));
}
- return checksum % 11 === digits[8];
+ return ((checksum % 11) % 10) === digits[8];
}
/*
diff --git a/test/validators.js b/test/validators.js
index <HASH>..<HASH> 100644
--- a/test/validators.js
+++ b/test/validators.js
@@ -9615,6 +9615,7 @@ describe('Validators', () => {
args: ['el-GR'],
valid: [
'758426713',
+ '032792320',
'054100004'],
invalid: [
'054100005',
|
fix(isTaxID): fix el-GR locale when checksum is <I> (#<I>)
Add correct tax identifier to demonstrate issue and fix.
Thanks to: Panos Papadopoulos
|
chriso_validator.js
|
train
|
js,js
|
42a90c70c36c714ac291a8c406eec3d7d4f947b7
|
diff --git a/packages/ui-time-select/src/TimeSelect/__tests__/TimeSelect.test.js b/packages/ui-time-select/src/TimeSelect/__tests__/TimeSelect.test.js
index <HASH>..<HASH> 100644
--- a/packages/ui-time-select/src/TimeSelect/__tests__/TimeSelect.test.js
+++ b/packages/ui-time-select/src/TimeSelect/__tests__/TimeSelect.test.js
@@ -71,7 +71,7 @@ describe('<TimeSelect />', async () => {
const options = await list.findAll('[role="option"]')
await options[1].click()
- expect(lastCall(onChange)[1].value).to.include('05:30')
+ expect(lastCall(onChange)[1].value).to.exist()
})
it('should fire onFocus when input gains focus' , async () => {
|
fix(ui-time-select): make TimeSelect test less brittle
This commit prevents a test from failing during DST
TEST PLAN:
- automated tests should pass
Change-Id: I3db<I>d6d0d1f<I>e<I>f<I>e7f<I>b<I>d
Reviewed-on: <URL>
|
instructure_instructure-ui
|
train
|
js
|
32cc5aac15de0f62687863074e85b12a60f26da6
|
diff --git a/packages/taro-weapp/src/component.js b/packages/taro-weapp/src/component.js
index <HASH>..<HASH> 100644
--- a/packages/taro-weapp/src/component.js
+++ b/packages/taro-weapp/src/component.js
@@ -1,4 +1,5 @@
import { enqueueRender } from './render-queue'
+import { updateComponent } from './lifecycle'
import {
internal_safe_get as safeGet
} from '@tarojs/taro'
@@ -64,6 +65,13 @@ class BaseComponent {
})
return stateClone
}
+
+ forceUpdate (callback) {
+ if (typeof callback === 'function') {
+ (this._pendingCallbacks = this._pendingCallbacks || []).push(callback)
+ }
+ }
+
// 会被匿名函数调用
__triggerPropsFn (key, args) {
const keyChain = key.split('.')
|
feat(weapp): 补充forceUpdate
|
NervJS_taro
|
train
|
js
|
ae5c6c5a2cc0c76c6fc9ce5e5e56e3f17b752b1e
|
diff --git a/index.js b/index.js
index <HASH>..<HASH> 100644
--- a/index.js
+++ b/index.js
@@ -31,9 +31,11 @@ module.exports = async function (packagePath) {
dirFilter: subdirPath => basename(subdirPath).startsWith("_")
});
if (testDirnameFilenames && testDirnameFilenames.length) {
- testFilenames = testDirnameFilenames.map(testDirnameFilename =>
- join(testDirname, testDirnameFilename)
- );
+ testFilenames = testDirnameFilenames
+ .filter(
+ testDirnameFilename => !basename(testDirnameFilename).startsWith("_")
+ )
+ .map(testDirnameFilename => join(testDirname, testDirnameFilename));
}
}
return { filename, testFilenames };
|
feat: ignore '_' prefixed files in tests
|
medikoo_tape-index
|
train
|
js
|
ce89cdaf91ca7d0215fe5b5f5ca4ca064257f439
|
diff --git a/lib/inspectors/data.js b/lib/inspectors/data.js
index <HASH>..<HASH> 100644
--- a/lib/inspectors/data.js
+++ b/lib/inspectors/data.js
@@ -228,6 +228,9 @@ function addTimeout(req, res, timeout) {
if (!(timeout > 0) || req.disable.timeout) {
return;
}
+ if (util.isMultipart(req)) {
+ timeout *= 2;
+ }
var timeoutId, responsed;
var preReq = new Transform();
var endReq = new Transform();
|
fix: The timeout of post request
|
avwo_whistle
|
train
|
js
|
88cbea3325d7414a1ea60d2bcde3e71e9f5dfd7b
|
diff --git a/workflow/util/util.go b/workflow/util/util.go
index <HASH>..<HASH> 100644
--- a/workflow/util/util.go
+++ b/workflow/util/util.go
@@ -810,8 +810,8 @@ func retryWorkflow(ctx context.Context, kubeClient kubernetes.Interface, hydrato
return nil, errors.InternalErrorf("Workflow cannot be retried with node %s in %s phase", node.Name, node.Phase)
}
if node.Type == wfv1.NodeTypePod {
- log.Infof("Deleting pod: %s", node.ID)
podName := PodName(wf.Name, node.Name, node.TemplateName, node.ID)
+ log.Infof("Deleting pod: %s", podName)
err := podIf.Delete(ctx, podName, metav1.DeleteOptions{})
if err != nil && !apierr.IsNotFound(err) {
return nil, errors.InternalWrapError(err)
|
fix: pod name shown in log when pod deletion (#<I>)
|
argoproj_argo
|
train
|
go
|
322ca4de82e5e89f34c2a1096c4602e71880bb59
|
diff --git a/packages/cli/src/git.js b/packages/cli/src/git.js
index <HASH>..<HASH> 100644
--- a/packages/cli/src/git.js
+++ b/packages/cli/src/git.js
@@ -30,7 +30,7 @@ async function fetchLatestFromUpstream() {
'git@github.com:carbon-design-system/carbon.git',
]);
}
- await execa('git', ['fetch', 'upstream', 'master', '--tags']);
+ await execa('git', ['fetch', 'upstream', 'main', '--tags']);
}
module.exports = {
|
fix(carbon-cli): change MASTER reference to MAIN (#<I>)
|
carbon-design-system_carbon-components
|
train
|
js
|
0079e3f45e7a777fddcbe3e2f2ed37346903381e
|
diff --git a/src/js/mixin/modal.js b/src/js/mixin/modal.js
index <HASH>..<HASH> 100644
--- a/src/js/mixin/modal.js
+++ b/src/js/mixin/modal.js
@@ -42,7 +42,7 @@ export default {
},
beforeDisconnect() {
- if (this.isToggled()) {
+ if (includes(active, this)) {
this.toggleElement(this.$el, false, false);
}
},
|
fix: ensure modal is fully hidden, if removed from DOM while hide transition is in progress
Resolves #<I>
|
uikit_uikit
|
train
|
js
|
7f964ff45bd02c4e76a5f49f666c513842f00fd8
|
diff --git a/test/unit/index.spec.js b/test/unit/index.spec.js
index <HASH>..<HASH> 100644
--- a/test/unit/index.spec.js
+++ b/test/unit/index.spec.js
@@ -20,6 +20,7 @@ const preprocessor = require('../../dist/index')
describe('webpack preprocessor', function () {
beforeEach(function () {
+ webpack.reset()
sinon.restore()
this.watchApi = {
|
chore: always reset webpack stub
|
cypress-io_cypress
|
train
|
js
|
2dea36c4169a0fb038ecceb48eb99ddfa98e45db
|
diff --git a/test/runner/runner.go b/test/runner/runner.go
index <HASH>..<HASH> 100644
--- a/test/runner/runner.go
+++ b/test/runner/runner.go
@@ -319,6 +319,7 @@ func (r *Runner) build(b *Build) (err error) {
fmt.Fprintln(mainLog, "DUMPING LOGS")
c.DumpLogs(buildLog)
}
+ c.Shutdown()
buildLog.Close()
url := r.uploadToS3(logFile, b, buildLog.Boundary())
logFile.Close()
@@ -347,7 +348,6 @@ func (r *Runner) build(b *Build) (err error) {
r.clusters[c.ID] = c
defer func() {
delete(r.clusters, c.ID)
- c.Shutdown()
}()
rootFS, err := c.BuildFlynn(r.rootFS, b.Commit, b.Merge, true)
|
test: Don't shutdown cluster before dumping logs
|
flynn_flynn
|
train
|
go
|
b95a66e055d596976c08be8320eba507a9a24d78
|
diff --git a/testng/container/src/main/java/org/jboss/arquillian/testng/container/TestNGTestRunner.java b/testng/container/src/main/java/org/jboss/arquillian/testng/container/TestNGTestRunner.java
index <HASH>..<HASH> 100644
--- a/testng/container/src/main/java/org/jboss/arquillian/testng/container/TestNGTestRunner.java
+++ b/testng/container/src/main/java/org/jboss/arquillian/testng/container/TestNGTestRunner.java
@@ -46,7 +46,12 @@ public class TestNGTestRunner implements TestRunner {
runner.setXmlSuites(
Collections.singletonList(createSuite(testClass, methodName)));
- runner.run();
+ //we catch problems in executing run method, e.g. ClassDefNotFoundError and wrap it in TestResult
+ try {
+ runner.run();
+ } catch (Throwable ex) {
+ return TestResult.failed(ex);
+ }
return resultListener.getTestResult();
}
|
fix: propagates exception from running runner.run() method (#<I>)
If someone omits required runtime class in a deployment archive there will be ClassDefNotFoundError when executing run() method in TestNGRunner. Arquillian servlet will return HTTP code <I> which is ignored in servlet protocol runner and consequently returned as a test which passed. But in reality the test did not even run and should be marked as failed.
|
arquillian_arquillian-core
|
train
|
java
|
3fee633565464054103f959609f500be86acc5dd
|
diff --git a/tests/integration/routes/profile/get-profile-test.js b/tests/integration/routes/profile/get-profile-test.js
index <HASH>..<HASH> 100644
--- a/tests/integration/routes/profile/get-profile-test.js
+++ b/tests/integration/routes/profile/get-profile-test.js
@@ -95,9 +95,9 @@ getServer(function (error, server) {
server.inject(requestOptions, function (response) {
delete response.result.meta
- t.is(response.statusCode, 403, 'returns 403 status')
+ t.is(response.statusCode, 404, 'returns 404 status')
- t.deepEqual(response.result.errors[0].detail, 'Admins have no account', 'returns "Admins have no account" error')
+ t.deepEqual(response.result.errors[0].detail, 'Admins have no profiles', 'returns "Admins have no profiles" error')
t.end()
})
})
|
test(routes): GET /session/account/profile error for admins
|
hoodiehq_hoodie-account-server
|
train
|
js
|
98087c7a948721ec1c5181986edec74656c943fa
|
diff --git a/ngTranslate/directive/translate.js b/ngTranslate/directive/translate.js
index <HASH>..<HASH> 100644
--- a/ngTranslate/directive/translate.js
+++ b/ngTranslate/directive/translate.js
@@ -25,8 +25,10 @@ angular.module('ngTranslate')
element.html(translate(scope.translationId, scope.interpolateParams));
});
- scope.$watch('translationId + interpolateParams', function () {
- element.html(translate(scope.translationId, scope.interpolateParams));
+ scope.$watch('translationId + interpolateParams', function (nValue) {
+ if (nValue) {
+ element.html(translate(scope.translationId, scope.interpolateParams));
+ }
});
}
};
|
fix(translateDirective): check for truthy value in watch callback
- check if the watched value is truthy
- only replace contents with translation if truthy
Closes #<I>
|
angular-translate_angular-translate
|
train
|
js
|
18ea5faecdb599ce5d28eadeb7a4a00fcff93d1d
|
diff --git a/src/connection.js b/src/connection.js
index <HASH>..<HASH> 100644
--- a/src/connection.js
+++ b/src/connection.js
@@ -1927,6 +1927,8 @@ Connection.prototype.STATE = {
this.debug.payload(function() {
return payload.toString(' ');
});
+
+ this.ntlmpacket = undefined;
} else {
if (this.loggedIn) {
this.transitionTo(this.STATE.LOGGED_IN_SENDING_INITIAL_SQL);
|
fix: clear the ntlm packet after sending an ntlm response
|
tediousjs_tedious
|
train
|
js
|
e54ddc2ab93455c6bf231a0f8032387407561334
|
diff --git a/src/Ufo/Cache/CacheRedisStorage.php b/src/Ufo/Cache/CacheRedisStorage.php
index <HASH>..<HASH> 100644
--- a/src/Ufo/Cache/CacheRedisStorage.php
+++ b/src/Ufo/Cache/CacheRedisStorage.php
@@ -42,7 +42,7 @@ class CacheRedisStorage implements CacheStorageInterface
/**
* @var string
*/
- protected $host = '127.0.0.1';
+ protected $host = 'localhost';
/**
* @var int
|
fix: changed redis cache storage host
|
enikeishik_ufoframework
|
train
|
php
|
94a6122c9e3ddd3066e7bb652cd420e90be27a45
|
diff --git a/lib/grape-active_model_serializers/formatter.rb b/lib/grape-active_model_serializers/formatter.rb
index <HASH>..<HASH> 100644
--- a/lib/grape-active_model_serializers/formatter.rb
+++ b/lib/grape-active_model_serializers/formatter.rb
@@ -18,10 +18,8 @@ module Grape
if serializer = options.fetch(:serializer, ActiveModel::Serializer.serializer_for(resource))
options[:scope] = serialization_scope unless options.has_key?(:scope)
- if resource.respond_to?(:to_ary) && !resource.empty?
- # ensure we have an root to fallback on
- options[:resource_name] = default_root(endpoint)
- end
+ # ensure we have an root to fallback on
+ options[:resource_name] = default_root(endpoint) if resource.respond_to?(:to_ary)
serializer.new(resource, options.merge(other_options))
end
end
|
fix: when resource is empty, keep json resource root
|
ruby-grape_grape-active_model_serializers
|
train
|
rb
|
aa0d25e8ebf22d3cf5ee12300917f9f38e896e70
|
diff --git a/packages/node_modules/@webex/webex-core/src/lib/services/services.js b/packages/node_modules/@webex/webex-core/src/lib/services/services.js
index <HASH>..<HASH> 100644
--- a/packages/node_modules/@webex/webex-core/src/lib/services/services.js
+++ b/packages/node_modules/@webex/webex-core/src/lib/services/services.js
@@ -323,7 +323,7 @@ const Services = WebexPlugin.extend({
.catch((error) => {
const response = {
statusCode: error.statusCode,
- responseText: error.body.message,
+ responseText: error.body && error.body.message,
body: error.body
};
|
fix(webex-core): services error cannot read message
|
webex_spark-js-sdk
|
train
|
js
|
7637d44fbc31af7f786f150259408371c8b88ff4
|
diff --git a/packages/webpack-config/plugins/config/extractCssChunks.js b/packages/webpack-config/plugins/config/extractCssChunks.js
index <HASH>..<HASH> 100644
--- a/packages/webpack-config/plugins/config/extractCssChunks.js
+++ b/packages/webpack-config/plugins/config/extractCssChunks.js
@@ -1,7 +1,8 @@
const ExtractCssChunks = require('extract-css-chunks-webpack-plugin');
+const { target } = require('../../webpackPkgConfig');
const generateName = require('../../utils/generateName');
-module.exports = new ExtractCssChunks({
+module.exports = target === 'web' && new ExtractCssChunks({
filename: generateName('.css'),
chunkFilename: generateName('.chunk.css'),
hot: process.env.NODE_ENV === 'development',
|
fix(webpack-config): do not run extract-css-chunks-webpack-plugin when target is not web
affects: @goldwasserexchange/webpack-config
|
goldwasserexchange_public
|
train
|
js
|
2f08337ccd0b22619344d8a357faa8f8a018fab3
|
diff --git a/networktest.go b/networktest.go
index <HASH>..<HASH> 100644
--- a/networktest.go
+++ b/networktest.go
@@ -397,7 +397,11 @@ func (l *lightningNode) lightningNetworkWatcher() {
panic(fmt.Errorf("unable read update ntfn: %v", err))
}
- graphUpdates <- update
+ select {
+ case graphUpdates <- update:
+ case <-l.quit:
+ return
+ }
}
}()
|
test: allow lightningNetworkWatcher to gracefully exit when ntfn pending
|
lightningnetwork_lnd
|
train
|
go
|
0e49dd67768a728ec3c9e5d1137e22a993119994
|
diff --git a/packages/text/src/react/p.js b/packages/text/src/react/p.js
index <HASH>..<HASH> 100644
--- a/packages/text/src/react/p.js
+++ b/packages/text/src/react/p.js
@@ -1,7 +1,7 @@
import * as glamor from 'glamor'
import PropTypes from 'prop-types'
import React from 'react'
-import { names as themeNames } from '@pluralsight/ps-design-system-theme/react'
+import { defaultName as themeDefaultName } from '@pluralsight/ps-design-system-theme/react'
import css from '../css'
@@ -11,11 +11,15 @@ const style = ({ themeName }) =>
...css[`.psds-text__p.psds-theme--${themeName}`]
})
-const P = (props, context) => (
- <p {...props} {...style({ ...props, themeName: context.themeName })}>
- {props.children}
- </p>
-)
+const P = (props, context) => {
+ const themeName = context.themeName || themeDefaultName
+
+ return (
+ <p {...props} {...style({ ...props, themeName })}>
+ {props.children}
+ </p>
+ )
+}
P.contextTypes = {
themeName: PropTypes.string
|
fix(text): Text.P should have a default theme
|
pluralsight_design-system
|
train
|
js
|
cce89d9518cbca348eca2503bd7377168b2efa1d
|
diff --git a/test/core/test_tasks_notification.py b/test/core/test_tasks_notification.py
index <HASH>..<HASH> 100644
--- a/test/core/test_tasks_notification.py
+++ b/test/core/test_tasks_notification.py
@@ -245,6 +245,7 @@ class TestNotificationTasksRaceCondition(TransactionTestCase):
self.assertEqual(1, notification_timeout_apply_async.call_count)
+ @tag('skip_sqlite')
@patch("squad.core.tasks.notification.notify_patch_build_finished.delay")
def test_maybe_notify_project_status_notify_patch_build_finished_do_not_send_dup_race_condition(self, notify_patch_build_finished):
group = Group.objects.create(slug='mygroup')
|
test: core: test_tasks_notification: skip test for sqlite
This skips the race condition test for sqlite, as it does not handle
multi-thread well
|
Linaro_squad
|
train
|
py
|
f7347526978f08803887467133c993df53575e35
|
diff --git a/src/scripts/directives/fa-index.js b/src/scripts/directives/fa-index.js
index <HASH>..<HASH> 100644
--- a/src/scripts/directives/fa-index.js
+++ b/src/scripts/directives/fa-index.js
@@ -76,19 +76,19 @@ angular.module('famous.angular')
restrict: 'A',
scope: false,
priority: 16,
- compile: function() {
- return {
- post: function(scope, element, attrs) {
+ compile: function () {
+ return {
+ post: function (scope, element, attrs) {
var isolate = $famousDecorator.ensureIsolate(scope);
isolate.index = scope.$eval(attrs.faIndex);
- scope.$watch(function(){
- return scope.$eval(attrs.faIndex)
- }, function(){
- isolate.index = scope.$eval(attrs.faIndex)
+ scope.$watch(function () {
+ return scope.$eval(attrs.faIndex);
+ }, function () {
+ isolate.index = scope.$eval(attrs.faIndex);
});
}
- }
+ };
}
};
}]);
\ No newline at end of file
|
refactor: satisfy jslint
just semicolons and styling
|
Famous_famous-angular
|
train
|
js
|
9b0c1e093c23770f673e4929301e3e58b4e50564
|
diff --git a/src/color/adjustHue.js b/src/color/adjustHue.js
index <HASH>..<HASH> 100644
--- a/src/color/adjustHue.js
+++ b/src/color/adjustHue.js
@@ -32,7 +32,7 @@ function adjustHue(degree: number | string, color: string): string {
const hslColor = parseToHsl(color)
return toColorString({
...hslColor,
- hue: (hslColor.hue + parseFloat(degree)) % 360,
+ hue: hslColor.hue + parseFloat(degree),
})
}
|
refactor(adjustHue): remove redundant %
Since the % operation is already performed inside `hslToRgb()` in `src/internalHelpers/_hslToRgb.js`
(which `adjustHue()` eventually calls through `toColorString()`), this % is completely redundant.
refactor #<I>
|
styled-components_polished
|
train
|
js
|
9c25b5c0b21a48df30394f7f24af0840de9d8368
|
diff --git a/index.js b/index.js
index <HASH>..<HASH> 100644
--- a/index.js
+++ b/index.js
@@ -96,14 +96,10 @@ var SauceLabsBrowser = function(id, args, sauceConnect, /* config.sauceLabs */ c
'record-screenshots': args.recordScreenshots || config.recordScreenshots || true,
'build': args.build || config.build || process.env.TRAVIS_BUILD_NUMBER ||
process.env.BUILD_NUMBER || process.env.BUILD_TAG ||
- process.env.CIRCLE_BUILD_NUM || null
-
+ process.env.CIRCLE_BUILD_NUM || null,
+ 'device-orientation': args.deviceOrientation || null
};
- if (args.deviceOrientation) {
- options['device-orientation'] = args.deviceOrientation;
- }
-
url = url + '?id=' + id;
driver = wd.remote('ondemand.saucelabs.com', 80, username, accessKey);
|
refactor: just make it the same style
|
karma-runner_karma-sauce-launcher
|
train
|
js
|
dd9b3b4ed0675c682759bb9a2b6dc1e37f78057a
|
diff --git a/docs/typescript-definition-package/processors/code_gen.js b/docs/typescript-definition-package/processors/code_gen.js
index <HASH>..<HASH> 100644
--- a/docs/typescript-definition-package/processors/code_gen.js
+++ b/docs/typescript-definition-package/processors/code_gen.js
@@ -49,6 +49,8 @@ DtsSerializer.prototype = {
},
member: function(buffer, ast) {
+ if (ast.private) return;
+
buffer.push('\n');
this.comment(buffer, ast.content);
|
docs(typings): don't emit @private members during the d.ts generation
Some of our class/interface members are "package private". Typescript doesn't have this concept, so we need to hide them
via the @private doc annotation.
Closes #<I>
Closes #<I>
|
angular_angular
|
train
|
js
|
a5200b161c1ccb17dde810afa8c8ce53fd173236
|
diff --git a/android/src/main/java/com/reactlibrary/utils/FileUtils.java b/android/src/main/java/com/reactlibrary/utils/FileUtils.java
index <HASH>..<HASH> 100644
--- a/android/src/main/java/com/reactlibrary/utils/FileUtils.java
+++ b/android/src/main/java/com/reactlibrary/utils/FileUtils.java
@@ -24,10 +24,14 @@ public class FileUtils {
InputStream is = context.getContentResolver().openInputStream(srcUri);
if (is == null) return;
OutputStream fos = new FileOutputStream(dstFile);
- int ch = 0;
+
+ byte[] bytes = new byte[1024];
+
+ int count = is.read(bytes, 0, 1024);
try {
- while((ch=is.read()) != -1){
- fos.write(ch);
+ while (count > 0){
+ fos.write(bytes, 0, count);
+ count = is.read(bytes, 0, 1024);
}
} catch (IOException e1) {
e1.printStackTrace();
|
fix: improve copy method to prevent lagging
|
aliyun_aliyun-oss-react-native
|
train
|
java
|
4b2fbf8bc002449e89c48b6496a0a2d4c8e60aca
|
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
@@ -116,11 +116,6 @@ npm install --save-dev webpack-dev-server
WebpackDevServer.addDevServerEntrypoints(webpackOptions, opts);
- if (opts.inline && (opts.hotOnly || opts.hot)) {
- webpackOptions.plugins = webpackOptions.plugins || [];
- webpackOptions.plugins.push(new webpack.HotModuleReplacementPlugin());
- }
-
const compiler = webpack(webpackOptions);
if (opts.progress)
|
fix: remove adding of HMR plugin, since addDevServerEntrypoints already does it
BREAKING CHANGE: Requires webpack-dev-server <I> or newer
|
webpack-contrib_grunt-webpack
|
train
|
js
|
63386b9b4009912346d234c842681c7caa2e93c2
|
diff --git a/lib/enterprise-setup.js b/lib/enterprise-setup.js
index <HASH>..<HASH> 100644
--- a/lib/enterprise-setup.js
+++ b/lib/enterprise-setup.js
@@ -1,11 +1,13 @@
+const { resolve } = require('url')
const PouchDB = require('pouchdb-http')
const env = require('./env')
module.exports = async function () {
// create /_users if not exists
- const host = env.COUCHDB_URL
+ const host = env.COUCH_URL
const dbName = '_users'
- const users = new PouchDB(`${host}/${dbName}`)
+ const dbUrl = resolve(host, dbName)
+ const users = new PouchDB(dbUrl)
return users.info()
}
|
fix: more reliable db instantiation
|
greenkeeperio_greenkeeper
|
train
|
js
|
7027900f4993dcd00745a4db045ed1c0e3255f8a
|
diff --git a/src/renderer/ForeignObjectRenderer.js b/src/renderer/ForeignObjectRenderer.js
index <HASH>..<HASH> 100644
--- a/src/renderer/ForeignObjectRenderer.js
+++ b/src/renderer/ForeignObjectRenderer.js
@@ -16,6 +16,7 @@ export default class ForeignObjectRenderer {
this.canvas.height = Math.floor(options.height) * options.scale;
this.canvas.style.width = `${options.width}px`;
this.canvas.style.height = `${options.height}px`;
+ this.ctx.scale(options.scale, options.scale);
options.logger.log(
`ForeignObject renderer initialized (${options.width}x${options.height} at ${options.x},${options.y}) with scale ${options.scale}`
|
fix: context scale for high resolution displays with foreignobjectrendering (#<I>)
|
niklasvh_html2canvas
|
train
|
js
|
449f908b1752e04a6b5189d9da739908b030a5f0
|
diff --git a/test/browser/browser.test.js b/test/browser/browser.test.js
index <HASH>..<HASH> 100644
--- a/test/browser/browser.test.js
+++ b/test/browser/browser.test.js
@@ -948,7 +948,7 @@ describe('browser', () => {
});
describe('multipartUpload()', () => {
- it.skip('should initMultipartUpload with x-oss-server-side-encryption', async () => {
+ it('should initMultipartUpload with x-oss-server-side-encryption', async () => {
// wait server bucket cors on line, this case need set cors exposed header x-oss-server-side-encryption with bucket
const name = 'multipart-x-oss-server-side-encryption';
const result = await store.initMultipartUpload(name, {
|
fix: add CORS for server-side-encryption
|
ali-sdk_ali-oss
|
train
|
js
|
ae48e274de37408dc8504d3092ba11d0fc1b1e23
|
diff --git a/app/src/components/nav-bar/NavButton.js b/app/src/components/nav-bar/NavButton.js
index <HASH>..<HASH> 100644
--- a/app/src/components/nav-bar/NavButton.js
+++ b/app/src/components/nav-bar/NavButton.js
@@ -11,6 +11,7 @@ import {
constants as robotConstants
} from '../../robot'
import {getAnyRobotUpdateAvailable} from '../../http-api-client'
+import {getShellUpdate} from '../../shell'
import type {IconName} from '@opentrons/components'
import {NavButton} from '@opentrons/components'
@@ -39,6 +40,7 @@ function mapStateToProps (state: State, ownProps: OwnProps): StateProps {
robotSelectors.getConnectionStatus(state) === robotConstants.CONNECTED
)
const robotNotification = getAnyRobotUpdateAvailable(state)
+ const moreNotification = getShellUpdate(state).available != null
// TODO(mc, 2018-03-08): move this logic to the Calibrate page
let calibrateUrl
@@ -83,7 +85,8 @@ function mapStateToProps (state: State, ownProps: OwnProps): StateProps {
iconName: 'dots-horizontal',
isBottom: true,
title: 'more',
- url: '/menu/app'
+ url: '/menu/app',
+ notification: moreNotification
}
}
|
feat(app): Add notification to "More" icon if app update available
|
Opentrons_opentrons
|
train
|
js
|
da7ad5b3426cc66df40d4a6bb7b375739d4ad4aa
|
diff --git a/lib/platform/github/gh-got-wrapper.js b/lib/platform/github/gh-got-wrapper.js
index <HASH>..<HASH> 100644
--- a/lib/platform/github/gh-got-wrapper.js
+++ b/lib/platform/github/gh-got-wrapper.js
@@ -13,7 +13,7 @@ async function get(path, opts, retries = 5) {
const method = opts && opts.method ? opts.method : 'get';
logger.debug(`${method.toUpperCase()} ${path} [retries=${retries}]`);
if (method === 'get' && cache[path]) {
- logger.debug({ path }, 'Returning cached result');
+ logger.trace({ path }, 'Returning cached result');
return cache[path];
}
try {
|
chore: downgrade cached result log to trace
|
renovatebot_renovate
|
train
|
js
|
928dbc77ed11a61985f5161b5772763c1567afaa
|
diff --git a/camunda-bpm-osgi/src/test/java/org/camunda/bpm/extension/osgi/application/BlueprintBundleLocalELResolverIntegrationTest.java b/camunda-bpm-osgi/src/test/java/org/camunda/bpm/extension/osgi/application/BlueprintBundleLocalELResolverIntegrationTest.java
index <HASH>..<HASH> 100644
--- a/camunda-bpm-osgi/src/test/java/org/camunda/bpm/extension/osgi/application/BlueprintBundleLocalELResolverIntegrationTest.java
+++ b/camunda-bpm-osgi/src/test/java/org/camunda/bpm/extension/osgi/application/BlueprintBundleLocalELResolverIntegrationTest.java
@@ -94,7 +94,7 @@ public class BlueprintBundleLocalELResolverIntegrationTest extends OSGiTestCase
}
}
- @Test(timeout = 20000L)
+ @Test(timeout = 30000L)
public void shouldBeAbleToResolveBean() throws InterruptedException {
RepositoryService repositoryService = engine.getRepositoryService();
ProcessDefinition processDefinition = null;
|
chore(test): increase timeout for CI some more
|
camunda_camunda-bpm-platform-osgi
|
train
|
java
|
603c7228dea92d4fb964d815473313e5e4d8fe89
|
diff --git a/packages/app-frontend/src/features/timeline/index.js b/packages/app-frontend/src/features/timeline/index.js
index <HASH>..<HASH> 100644
--- a/packages/app-frontend/src/features/timeline/index.js
+++ b/packages/app-frontend/src/features/timeline/index.js
@@ -149,7 +149,7 @@ function addEvent (appId, event, layer) {
function stackEvent (event) {
const roundedTime = Math.round(event.time / STACK_DURATION)
- const wasStacked = !!_stackEvent(event, roundedTime)
+ const wasStacked = _stackEvent(event, roundedTime)
if (!wasStacked) {
event.layer.eventTimeMap[roundedTime] = event
event.layer.displayedEvents.push(event)
@@ -163,8 +163,9 @@ function _stackEvent (event, roundedTime) {
if (existingEvent && existingEvent.groupId === event.groupId) {
existingEvent.stackedEvents.push(event)
event.stackParent = existingEvent
+ return true
}
- return existingEvent
+ return false
}
export function useTime () {
|
fix(timeline): event that were not stacked but ignored anyway
|
vuejs_vue-devtools
|
train
|
js
|
28239f420460bdb9dd3b71f8088a0dfc1277dca6
|
diff --git a/lib/server.js b/lib/server.js
index <HASH>..<HASH> 100644
--- a/lib/server.js
+++ b/lib/server.js
@@ -197,7 +197,11 @@ var start = function(injector, config, launcher, globalEmitter, preprocess, file
// TODO(vojta): change the client to not send the event (if disconnected by purpose)
var sockets = socketServer.sockets.sockets;
Object.getOwnPropertyNames(sockets).forEach(function(key) {
- sockets[key].removeAllListeners('disconnect');
+ var socket = sockets[key];
+ socket.removeAllListeners('disconnect');
+ if (!socket.disconnected) {
+ socket.disconnect();
+ }
});
var removeAllListenersDone = false;
|
fix(server): Force clients disconnect on Windows
It occurs that only on Windows, socket.io clients are not properly disconnected, which causes Karma to not exit immediately when everything is done. We have to wait for some internal disconnection socket.io event timeout.
This PR basically check if all sockets are disconnected. If not we manually force the disconnection.
Fixes #<I>
|
karma-runner_karma
|
train
|
js
|
69f3eecc1f47a97b57a0e36e4156df1ac76e0be5
|
diff --git a/src/module.js b/src/module.js
index <HASH>..<HASH> 100644
--- a/src/module.js
+++ b/src/module.js
@@ -61,6 +61,7 @@ export default function NetlifyCmsModule(moduleOptions) {
netlifyCompiler.plugin("done", async stats => {
// Don't reload failed builds
if (stats.hasErrors()) {
+ /* istanbul ignore next */
return;
}
debug(`Bundle built!`);
diff --git a/src/utils/yaml.js b/src/utils/yaml.js
index <HASH>..<HASH> 100644
--- a/src/utils/yaml.js
+++ b/src/utils/yaml.js
@@ -12,6 +12,7 @@ const toYAML = function(object) {
const yaml = safeDump(object);
return yaml;
} catch (e) {
+ /* istanbul ignore next */
debug(e.message, e.name);
return false;
}
@@ -26,6 +27,7 @@ const loadYAMLFile = function(configFile) {
});
return contents;
} catch (e) {
+ /* istanbul ignore next */
if (e.code !== "ENOENT") {
debug(e.message, e.name);
}
|
chore(ci): skip error conditions, improve coverage
|
medfreeman_nuxt-netlify-cms-module
|
train
|
js,js
|
9293914b557c46a60bbb9eabfcea501e6d73d9e2
|
diff --git a/scripts/update-rules.js b/scripts/update-rules.js
index <HASH>..<HASH> 100755
--- a/scripts/update-rules.js
+++ b/scripts/update-rules.js
@@ -99,5 +99,5 @@ internals.parse = new Transform({
//
Request(internals.src)
.pipe(internals.parse)
- .pipe(JSONStream.stringify('[', ',', ']'))
+ .pipe(JSONStream.stringify('[\n', ',\n', '\n]'))
.pipe(Fs.createWriteStream(internals.dest));
|
chore(scripts): Add line breaks in rules.json to better asses changes/updates
|
wrangr_psl
|
train
|
js
|
707db97a3f74baabc57bc581dc0e403e00e2f351
|
diff --git a/lib/rules/index.js b/lib/rules/index.js
index <HASH>..<HASH> 100644
--- a/lib/rules/index.js
+++ b/lib/rules/index.js
@@ -88,7 +88,7 @@ function getProxy(url, req, callback) {
var hostname = util.removeProtocol(host.matcher, true);
if (!net.isIP(hostname)) {
return rules.lookupHost(hostname || url, function(err, ip) {
- callback(null, ip, host.port, host);
+ callback(err, ip, host.port, host);
});
}
return callback(null, hostname, host.port, host);
|
refactor: getProxy
|
avwo_whistle
|
train
|
js
|
81458601e86a3edc896599c5afaaadf53d2a17ee
|
diff --git a/app/src/main/java/io/appium/uiautomator2/utils/w3c/ActionsTokenizer.java b/app/src/main/java/io/appium/uiautomator2/utils/w3c/ActionsTokenizer.java
index <HASH>..<HASH> 100644
--- a/app/src/main/java/io/appium/uiautomator2/utils/w3c/ActionsTokenizer.java
+++ b/app/src/main/java/io/appium/uiautomator2/utils/w3c/ActionsTokenizer.java
@@ -403,11 +403,8 @@ public class ActionsTokenizer {
}
break;
case ACTION_ITEM_TYPE_POINTER_UP: {
- if (!isPointerDown) {
- throw new ActionsParseException(String.format(
- "You cannot perform '%s' action without performing '%s' first at " +
- "%sms in '%s' chain", gesture.type, ACTION_ITEM_TYPE_POINTER_DOWN, timeDelta, actionId));
- }
+ // Due to issue #470, removed restriction to demand PointerDown before PointerUp
+
if (recentUpDelta == timeDelta) {
throw new ActionsParseException(String.format(
"You cannot perform two or more '%s' actions without a pause between them at " +
|
fix: Remove restriction of PointerDown before PointerUp (#<I>)
|
appium_appium-uiautomator2-server
|
train
|
java
|
ba95c45dd42dda268248daa7451d564a5cedb389
|
diff --git a/treetime/seqgen.py b/treetime/seqgen.py
index <HASH>..<HASH> 100644
--- a/treetime/seqgen.py
+++ b/treetime/seqgen.py
@@ -86,7 +86,7 @@ class SeqGen(TreeAnc):
from Bio.Align import MultipleSeqAlignment
tmp = []
- for n in self.tree.get_terminals():
+ for n in self.tree.find_clades():
if n.is_terminal() or internal:
tmp.append(SeqRecord.SeqRecord(id=n.name, name=n.name, description='', seq=Seq.Seq(''.join(n.ancestral_sequence.astype('U')))))
|
fix: loop over all nodes when gathering alignment
|
neherlab_treetime
|
train
|
py
|
eddf1308457e496c900ef1dd79f74b11224209e0
|
diff --git a/src/components/navbar/navbar.js b/src/components/navbar/navbar.js
index <HASH>..<HASH> 100644
--- a/src/components/navbar/navbar.js
+++ b/src/components/navbar/navbar.js
@@ -254,12 +254,9 @@ export class DataMenu extends React.PureComponent {
: null;
}
- componentDidUpdate(prevProps, prevState) {
- // menu was just opened
- if (!prevState.isMenuOpen && this.state.isMenuOpen)
- document.body.classList.add('body__menu-open');
- // menu was just closed
- if (prevState.isMenuOpen && !this.state.isMenuOpen)
+ componentDidUpdate() {
+ if (this.state.isMenuOpen) document.body.classList.add('body__menu-open');
+ if (!this.state.isMenuOpen)
document.body.classList.remove('body__menu-open');
}
|
fix(navbar): do not make body-css-class dependent on state-transition, but just on state
|
commercetools_merchant-center-application-kit
|
train
|
js
|
4ff5d1e6d11403d40a139e24a6daea4ff1f930ed
|
diff --git a/index.js b/index.js
index <HASH>..<HASH> 100644
--- a/index.js
+++ b/index.js
@@ -95,8 +95,6 @@ function getInternetExplorerExe() {
return prefix + suffix;
}
}
-
- throw new Error('Internet Explorer not found');
}
IEBrowser.prototype = {
|
fix: fail when launcher is called if IE is not found
instead of failing as soon as the plug-in is loaded
closes #<I>
|
karma-runner_karma-ie-launcher
|
train
|
js
|
af6cfca5f0af265274f1c0f098df9130400ac266
|
diff --git a/epab/linters/_sort.py b/epab/linters/_sort.py
index <HASH>..<HASH> 100644
--- a/epab/linters/_sort.py
+++ b/epab/linters/_sort.py
@@ -21,7 +21,7 @@ def _sort_file(file_path: Path):
content = file_path.read_bytes()
content = content.replace(b'\r\n', b'\n')
- file_path.write_text(content.decode('cp1252'))
+ file_path.write_text(content.decode('utf8'))
SETTINGS = {
|
fix: fix isort encoding (#<I>)
|
etcher-be_epab
|
train
|
py
|
1813d835dca5a4ae10da81bcb37c3982f49b54ff
|
diff --git a/test/calling.js b/test/calling.js
index <HASH>..<HASH> 100644
--- a/test/calling.js
+++ b/test/calling.js
@@ -9,7 +9,7 @@ describe('calling', function() {
httpinvoke('./', done);
});
it('does not throw if relativeURLs flag is false and url is protocol-relative', function(done) {
- httpinvoke('//' + cfg.host + '/', done);
+ httpinvoke(cfg.url.substr(0, cfg.url.indexOf(':') + 1), done);
});
} else {
it('throws error #26 if relativeURLs flag is false and url is relative', function(done) {
|
test: calling: fix 'does not throw if relativeURLs flag is false and url is protocol-relative' test
|
jakutis_httpinvoke
|
train
|
js
|
ebff5a4106742654bfa27d4b18529084c090e85a
|
diff --git a/public/js/render/live.js b/public/js/render/live.js
index <HASH>..<HASH> 100644
--- a/public/js/render/live.js
+++ b/public/js/render/live.js
@@ -350,11 +350,7 @@ var renderLivePreview = (function () {
iframe.setAttribute('frameBorder', '0');
iframe.setAttribute('name', '<proxy>');
$live.prepend(iframe);
- var src = jsbin.runner;
- if (jsbin.user.pro) {
- src += '?pro=1';
- }
- iframe.src = src;
+ iframe.src = jsbin.runner;
try {
iframe.contentWindow.name = '/' + jsbin.state.code + '/' + jsbin.state.revision;
} catch (e) {
|
fix: embeds rendering again
Fixes #<I>
For some reason, the live.js renderLivePreview function doesn't have
access to the "real" (and full) jsbin object, so it was missing the user
which I added an arb check for. It wasn't needed, so I reverted the
change but it's still odd that it's not available at that time.
|
jsbin_jsbin
|
train
|
js
|
468e125c0330b7ea49dd4b2b601679ecd5ee3c04
|
diff --git a/index.js b/index.js
index <HASH>..<HASH> 100644
--- a/index.js
+++ b/index.js
@@ -4,9 +4,10 @@ import Acl from 'browser-acl'
* VueAcl constructor function
*
* ```javascript
- * import VueAcl from 'vue-browser-acl'
+ * import Vue from 'vue'
+ * import Acl from 'vue-browser-acl'
*
- * VueAcl(() => user, (acl) => {
+ * Vue.use(Acl, user, (acl) => {
* acl.rule(view, Post)
* acl.rule([edit, delete], Post, (user, post) => post.userId === user.id)
* acl.rule('moderate', Post, (user) => user.isModerator())
|
docs: Updates doc to recent changes
|
mblarsen_vue-browser-acl
|
train
|
js
|
21d333c8f7921a4fa7b11acbc6a556661c3d5000
|
diff --git a/helpers/form.php b/helpers/form.php
index <HASH>..<HASH> 100644
--- a/helpers/form.php
+++ b/helpers/form.php
@@ -1247,6 +1247,7 @@ EOT;
}
$sFieldAttr .= ' data-defaults="' . htmlentities(json_encode($aValues)) . '"';
+ $sFieldAttr .= ' data-label-key="' . $sFieldLabelKey . '"';
// --------------------------------------------------------------------------
|
fix: Poor support for custom keys in multi cdn picker
|
nails_common
|
train
|
php
|
35eaffe3b0c9c5c819801526286255a9c6d0749a
|
diff --git a/src/shared.js b/src/shared.js
index <HASH>..<HASH> 100644
--- a/src/shared.js
+++ b/src/shared.js
@@ -33,7 +33,7 @@ export function resolvePackagePath(packageName) {
} catch (e) {
// try from app's local folder, this is necessary to support lerna
// hoisting where dumber is out of app's local node_modules folder.
- metaPath = resolve(packageJson, {basedir: process.cwd()});
+ metaPath = resolve.sync(packageJson, {basedir: process.cwd()});
}
} catch (e) {
throw new Error('cannot find npm package: ' + packageName);
|
fix: sync mode for fallback resolve
|
dumberjs_dumber
|
train
|
js
|
114b98a0685bb9a3f8a641bc37fffced51f21960
|
diff --git a/scripts/generate-base-colors.js b/scripts/generate-base-colors.js
index <HASH>..<HASH> 100644
--- a/scripts/generate-base-colors.js
+++ b/scripts/generate-base-colors.js
@@ -107,4 +107,4 @@ const AST = {
};
// Generates the file
-fs.writeFileSync(path.join(__dirname, exportPath), css.stringify(AST), 'utf-8');
+fs.writeFileSync(path.join(__dirname, exportPath), css.stringify(AST));
diff --git a/scripts/generate-colors-for-story.js b/scripts/generate-colors-for-story.js
index <HASH>..<HASH> 100644
--- a/scripts/generate-colors-for-story.js
+++ b/scripts/generate-colors-for-story.js
@@ -102,4 +102,4 @@ const AST = {
};
// Generates the file
-fs.writeFileSync(path.join(__dirname, exportPath), css.stringify(AST), 'utf-8');
+fs.writeFileSync(path.join(__dirname, exportPath), css.stringify(AST));
|
fix(sripts): removes utf8
|
commercetools_ui-kit
|
train
|
js,js
|
bcbce6aed72f4a0c6d6bbd28e187afe66617f6c2
|
diff --git a/src/components/DatePicker.js b/src/components/DatePicker.js
index <HASH>..<HASH> 100644
--- a/src/components/DatePicker.js
+++ b/src/components/DatePicker.js
@@ -299,7 +299,13 @@ export default class DatePicker extends Component {
isFocused: true,
};
if (!this.state.focusedDay) {
- newState.focusedDay = this.state.month + 1 + '/' + CURRENT_DATE + '/' + CURRENT_YEAR;
+ if (this.state.dateValue && this.state.dateValue.getMonth() === this.state.month && this.state.dateValue.getFullYear() === this.state.year) {
+ newState.focusedDay = this.state.dateValue.getMonth() + 1 + '/' + this.state.dateValue.getDate() + '/' + this.state.dateValue.getFullYear();
+ } else if (this.state.month === CURRENT_MONTH && this.state.year === CURRENT_YEAR) {
+ newState.focusedDay = CURRENT_MONTH + 1 + '/' + CURRENT_DATE + '/' + CURRENT_YEAR;
+ } else {
+ newState.focusedDay = this.state.month + 1 + '/' + 1 + '/' + this.state.year;
+ }
}
this.setState(newState);
|
fix(DatePicker): setting focus to correct day when date-picker is focused
|
nikgraf_belle
|
train
|
js
|
71a1be6cccdb55d24e0c2f5d4c00743f5de53a8b
|
diff --git a/src/packages/database/model/utils/initialize.js b/src/packages/database/model/utils/initialize.js
index <HASH>..<HASH> 100644
--- a/src/packages/database/model/utils/initialize.js
+++ b/src/packages/database/model/utils/initialize.js
@@ -93,8 +93,10 @@ function initializeProps(prototype, attributes, relationships) {
if (nextValue !== currentValue) {
const { initialized, initialValues } = this;
- if (type === 'tinyint') {
+ if (/^(boolean|tinyint)$/.test(type)) {
nextValue = Boolean(nextValue);
+ } else if (type === 'datetime' && typeof nextValue === 'number') {
+ nextValue = new Date(nextValue);
} else if (!nextValue && !nullable) {
return;
}
|
fix: column data not consistent across all dbms (#<I>)
fix: regexp in model attr set function
|
postlight_lux
|
train
|
js
|
5e4e0cc3f231e1f022cd8a8209ad94280764f79c
|
diff --git a/src/html/behaviors/DefaultBehaviors.js b/src/html/behaviors/DefaultBehaviors.js
index <HASH>..<HASH> 100644
--- a/src/html/behaviors/DefaultBehaviors.js
+++ b/src/html/behaviors/DefaultBehaviors.js
@@ -56,7 +56,7 @@ Mixin(Base =>
// if not an array, then it's an object.
if (! ( defaultBehaviors instanceof Array ) ) defaultBehaviors = Object.keys( defaultBehaviors )
- this.setAttribute( 'has', this.getAttribute( 'has' ) + ` ${defaultBehaviors.join(' ')}`)
+ this.setAttribute( 'has', `${this.getAttribute( 'has' ) || ''} ${defaultBehaviors.join(' ')}` )
}
// otherwise detect which default behavior(s) to add
|
fix: stop DefaultBehaviors from adding an extra "null" behavior on elements with no initial behaviors.
|
trusktr_infamous
|
train
|
js
|
4368b85b323a1c8a7143088459e54caf36bcfba5
|
diff --git a/utils/starters.js b/utils/starters.js
index <HASH>..<HASH> 100644
--- a/utils/starters.js
+++ b/utils/starters.js
@@ -21,9 +21,9 @@ module.exports = {
repo: 'ionic-pets-seed'
},
{
- name: 'User Tutorial',
+ name: 'User Intro',
user: 'diegonetto',
- repo: 'ionic-user-tutorial'
+ repo: 'ionic-user-intro'
}
]
};
|
fix(gen): Renamed User Tutorial to User Intro
|
diegonetto_generator-ionic
|
train
|
js
|
287375a12e8eb70ad0b8bce9b51ffda203a669dc
|
diff --git a/p2p/host/autonat/autonat.go b/p2p/host/autonat/autonat.go
index <HASH>..<HASH> 100644
--- a/p2p/host/autonat/autonat.go
+++ b/p2p/host/autonat/autonat.go
@@ -13,7 +13,7 @@ import (
"github.com/libp2p/go-libp2p-core/network"
"github.com/libp2p/go-libp2p-core/peer"
- logging "github.com/ipfs/go-log"
+ logging "github.com/ipfs/go-log/v2"
ma "github.com/multiformats/go-multiaddr"
manet "github.com/multiformats/go-multiaddr/net"
)
|
chore: update go-log to v2 (#<I>)
|
libp2p_go-libp2p
|
train
|
go
|
c43845620a3fde7d6dc7bd736b038f947a0f39f2
|
diff --git a/src/components/notification/notification.spec.js b/src/components/notification/notification.spec.js
index <HASH>..<HASH> 100644
--- a/src/components/notification/notification.spec.js
+++ b/src/components/notification/notification.spec.js
@@ -1,6 +1,5 @@
import React from 'react';
import { shallow } from 'enzyme';
-import { intlMock } from '@commercetools-local/test-utils';
import { Notification } from './notification';
const TestComponent = () => <div />;
@@ -10,7 +9,9 @@ const createTestProps = props => ({
domain: 'side',
type: 'warning',
fixed: true,
- intl: intlMock,
+ intl: {
+ formatMessage: jest.fn(message => message.id),
+ },
...props,
});
|
chore: add local eslint rule to forbid import from local packages
|
commercetools_merchant-center-application-kit
|
train
|
js
|
bb5af267a0d899792a52f9022af73f72693a304e
|
diff --git a/lib/util/index.js b/lib/util/index.js
index <HASH>..<HASH> 100644
--- a/lib/util/index.js
+++ b/lib/util/index.js
@@ -1175,11 +1175,6 @@ function getCharset(str) {
return _getCharset(str);
}
-function getMetaCharset(str) {
-
- return _getCharset(str, true);
-}
-
function _getCharset(str, isMeta) {
var charset;
if ((isMeta ? META_CHARSET_RE : CHARSET_RE).test(str)) {
@@ -1193,7 +1188,6 @@ function _getCharset(str, isMeta) {
}
exports.getCharset = getCharset;
-exports.getMetaCharset = getMetaCharset;
function getForwardedFor(headers) {
var val = headers[config.CLIENT_IP_HEAD];
|
refactor: use isUtf8 instead of detecting encoding of stream
|
avwo_whistle
|
train
|
js
|
16c5e4eb2d8b0a87325f4af246fbd7e2ee20804e
|
diff --git a/src/data-fetcher.js b/src/data-fetcher.js
index <HASH>..<HASH> 100644
--- a/src/data-fetcher.js
+++ b/src/data-fetcher.js
@@ -1,9 +1,12 @@
import {trigger} from 'redial';
export default function ({renderProps, store}) {
+ const {getState} = store;
+
return trigger('fetch', renderProps.components, {
params: renderProps.params,
dispatch: store.dispatch,
- state: store.getState()
+ state: getState(),
+ getState
});
}
diff --git a/test/unit/data-fetcher-test.js b/test/unit/data-fetcher-test.js
index <HASH>..<HASH> 100644
--- a/test/unit/data-fetcher-test.js
+++ b/test/unit/data-fetcher-test.js
@@ -23,7 +23,7 @@ suite('data fetcher', () => {
const getState = sinon.stub().returns(state);
const renderProps = {...any.simpleObject(), components, params};
const store = {...any.simpleObject(), dispatch, getState};
- redial.trigger.withArgs('fetch', components, {params, dispatch, state}).resolves();
+ redial.trigger.withArgs('fetch', components, {params, dispatch, state, getState}).resolves();
return assert.isFulfilled(fetchData({renderProps, store}));
});
|
feat(get-state): passed getState to data-fetchers
so that the fetching context isnt limited to a stale state
|
travi_hapi-react-router
|
train
|
js,js
|
8be6e5a5564c1b4d175a9fe4192f12798569740e
|
diff --git a/vyper/functions/functions.py b/vyper/functions/functions.py
index <HASH>..<HASH> 100644
--- a/vyper/functions/functions.py
+++ b/vyper/functions/functions.py
@@ -218,9 +218,15 @@ class Slice:
)
-@signature(('bytes', 'string'))
-def _len(expr, args, kwargs, context):
- return get_length(args[0])
+class Len:
+
+ _id = "len"
+ _inputs = [("b", ("bytes", "string"))]
+ _return_type = "int128"
+
+ @validate_inputs
+ def build_LLL(self, expr, args, kwargs, context):
+ return get_length(args[0])
def concat(expr, context):
@@ -1061,7 +1067,7 @@ DISPATCH_TABLE = {
'ceil': Ceil().build_LLL,
'convert': _convert,
'slice': Slice().build_LLL,
- 'len': _len,
+ 'len': Len().build_LLL,
'concat': concat,
'sha3': _sha3,
'sha256': sha256,
|
refactor: convert len to a class
|
ethereum_vyper
|
train
|
py
|
9d405f7630eef164dee8ec7cd56f5ab1ea26fd3e
|
diff --git a/lib/utility.js b/lib/utility.js
index <HASH>..<HASH> 100644
--- a/lib/utility.js
+++ b/lib/utility.js
@@ -5,7 +5,7 @@ Utility.split = function(input, isMarkdown, splitBlockquote, splitCode) {
return [];
}
- var matchers = [isMarkdown ? '\\[.*?\\]\\(.*?\\)' : '<a\s[\\s\\S]*?</a>(?=<[^>]+>)?'];
+ var matchers = [isMarkdown ? '\\[.*?\\]\\(.*?\\)' : '<a\\s[\\s\\S]*?</a>(?=<[^>]+>)?'];
if (splitBlockquote) {
matchers.push(isMarkdown ? '^>.*$' : '^<blockquote>.*?</blockquote>');
}
|
fix: double-backslash escape for #<I>
|
julianlam_nodebb-plugin-mentions
|
train
|
js
|
10936e5e13970b93079d7409aec336894a1bc730
|
diff --git a/ui/src/components/time/QTime.js b/ui/src/components/time/QTime.js
index <HASH>..<HASH> 100644
--- a/ui/src/components/time/QTime.js
+++ b/ui/src/components/time/QTime.js
@@ -272,6 +272,10 @@ export default Vue.extend({
},
__click (evt) {
+ if (this._isBeingDestroyed === true || this._isDestroyed === true) {
+ return
+ }
+
// __activate() has already updated the offset
// (on desktop only, through mousedown event)
if (this.$q.platform.is.desktop !== true) {
@@ -282,7 +286,9 @@ export default Vue.extend({
},
__activate (evt) {
- this.__updateClock(evt, this.__getClockRect())
+ if (this._isBeingDestroyed !== true && this._isDestroyed !== true) {
+ this.__updateClock(evt, this.__getClockRect())
+ }
},
__getClockRect () {
|
fix(QTime): add some missing checks for component being destroyed #<I> (#<I>)
|
quasarframework_quasar
|
train
|
js
|
ab9ac8da06f8366c5f367f2be0e4050758f511d1
|
diff --git a/src/login7-payload.js b/src/login7-payload.js
index <HASH>..<HASH> 100644
--- a/src/login7-payload.js
+++ b/src/login7-payload.js
@@ -296,7 +296,10 @@ module.exports = class Login7Payload {
}
// ClientID: 6-byte
- offset += this.clientId.copy(fixedData, offset);
+ if (this.clientId) {
+ this.clientId.copy(fixedData, offset, 0, 6);
+ }
+ offset += 6;
// ibSSPI: 2-byte
offset = fixedData.writeUInt16LE(dataOffset, offset);
|
refactor: ensure copying `clientId` does not lead to offset issues
|
tediousjs_tedious
|
train
|
js
|
57f82e39805835f7da32d456d1e4b8a257f3709d
|
diff --git a/test/file.js b/test/file.js
index <HASH>..<HASH> 100644
--- a/test/file.js
+++ b/test/file.js
@@ -1740,7 +1740,7 @@ describe('File', function() {
writable.on('error', function(err) {
assert.equal(err.code, 'FILE_NO_UPLOAD_DELETE');
- assert(err.message.indexOf(deleteErrorMessage > -1));
+ assert(err.message.indexOf(deleteErrorMessage) > -1);
done();
});
});
|
fix: test meant to assert err msg exists (#<I>)
|
googleapis_nodejs-storage
|
train
|
js
|
a033d6a732c13b2d15ba073f582a994d174e299c
|
diff --git a/cmd/token_user.go b/cmd/token_user.go
index <HASH>..<HASH> 100644
--- a/cmd/token_user.go
+++ b/cmd/token_user.go
@@ -115,12 +115,12 @@ and success, unless if the --no-shutdown flag is provided.`,
noShutdown := flagx.MustGetBool(cmd, "no-shutdown")
clientID := flagx.MustGetString(cmd, "client-id")
- clientSecret := flagx.MustGetString(cmd, "client-secret")
- if clientID == "" || clientSecret == "" {
+ if clientID == "" {
fmt.Print(cmd.UsageString())
- fmt.Println("Please provide a Client ID and Client Secret using flags --client-id and --client-secret, or environment variables OAUTH2_CLIENT_ID and OAUTH2_CLIENT_SECRET.")
+ fmt.Println("Please provide a Client ID using --client-id flag, or OAUTH2_CLIENT_ID environment variable.")
return
}
+ clientSecret := flagx.MustGetString(cmd, "client-secret")
proto := "http"
if isSSL {
|
fix: make token user command work with public clients (#<I>)
|
ory_hydra
|
train
|
go
|
e8a867d507e4c952e3e35268239c6d63b14aec89
|
diff --git a/test/frontend/test_basics.py b/test/frontend/test_basics.py
index <HASH>..<HASH> 100644
--- a/test/frontend/test_basics.py
+++ b/test/frontend/test_basics.py
@@ -206,12 +206,12 @@ class FrontendTest(TestCase):
def test_metrics(self):
response = self.hit('/mygroup/myproject/build/1.0/testrun/%s/suite/%s/test/%s/metrics' % (self.test_run.id, self.suite.slug, self.test.name))
self.assertEqual('application/json', response['Content-Type'])
- self.assertEqual(b'{}', response.content)
+ self.assertEqual(b'{"mysuite/mymetric": 1}', response.content)
def test_metadata(self):
response = self.hit('/mygroup/myproject/build/1.0/testrun/%s/suite/%s/test/%s/metadata' % (self.test_run.id, self.suite.slug, self.test.name))
self.assertEqual('application/json', response['Content-Type'])
- self.assertEqual(b'{ "job_id" : "1" }', response.content)
+ self.assertEqual(b'{"job_id": "1"}', response.content)
class FrontendTestAnonymousUser(TestCase):
|
test: test_basics: fix missing test
Honestly it's weird that this worked before.
It's fixed now.
|
Linaro_squad
|
train
|
py
|
39aa87b1cb87d382ead44d9089e58112e1c30607
|
diff --git a/annotations/builder/src/main/java/io/sundr/builder/internal/functions/ToMethod.java b/annotations/builder/src/main/java/io/sundr/builder/internal/functions/ToMethod.java
index <HASH>..<HASH> 100644
--- a/annotations/builder/src/main/java/io/sundr/builder/internal/functions/ToMethod.java
+++ b/annotations/builder/src/main/java/io/sundr/builder/internal/functions/ToMethod.java
@@ -971,7 +971,7 @@ public class ToMethod {
TypeRef returnType = property.hasAttribute(GENERIC_TYPE_REF) ? property.getAttribute(GENERIC_TYPE_REF) : T_REF;
Set<Method> result = new LinkedHashSet<Method>();
TypeRef unwrappedType = TypeAs.combine(UNWRAP_COLLECTION_OF, UNWRAP_ARRAY_OF).apply(property.getTypeRef());
- TypeDef baseType = BuilderContextManager.getContext().getBuildableRepository().getBuildable(unwrappedType);
+ TypeDef baseType = BuilderContextManager.getContext().getDefinitionRepository().getDefinition(unwrappedType);
for (Method constructor : getInlineableConstructors(property)) {
boolean isCollection = IS_COLLECTION.apply(property.getTypeRef());
|
fix: NPE in handling of base type
|
sundrio_sundrio
|
train
|
java
|
d3dddd8e626ca49619dbe42c24dffd51be2e2529
|
diff --git a/src/components/VSelect/VSelect.js b/src/components/VSelect/VSelect.js
index <HASH>..<HASH> 100644
--- a/src/components/VSelect/VSelect.js
+++ b/src/components/VSelect/VSelect.js
@@ -418,8 +418,8 @@ export default {
return true
},
filterDuplicates (arr) {
- const val = this.returnObject ? this.getValue : el => el
- return arr.filter((el, i, self) => i === self.findIndex(e => val(e) === val(el)))
+ const values = arr.map(this.getValue)
+ return arr.filter((el, i) => i === values.indexOf(values[i]))
},
focus () {
this.isActive = true
|
fix: duplicated entries when using cache-items with return-object (#<I>)
|
vuetifyjs_vuetify
|
train
|
js
|
8b354b4b6999e5a2474fb94ffab6b8428c4d4e6e
|
diff --git a/superset/dashboards/filters.py b/superset/dashboards/filters.py
index <HASH>..<HASH> 100644
--- a/superset/dashboards/filters.py
+++ b/superset/dashboards/filters.py
@@ -111,7 +111,7 @@ class DashboardAccessFilter(BaseFilter): # pylint: disable=too-few-public-metho
datasource_perm_query = (
db.session.query(Dashboard.id)
- .join(Dashboard.slices)
+ .join(Dashboard.slices, isouter=True)
.filter(
and_(
Dashboard.published.is_(True),
diff --git a/superset/sql_parse.py b/superset/sql_parse.py
index <HASH>..<HASH> 100644
--- a/superset/sql_parse.py
+++ b/superset/sql_parse.py
@@ -494,7 +494,7 @@ class InsertRLSState(str, Enum):
def has_table_query(token_list: TokenList) -> bool:
"""
- Return if a stament has a query reading from a table.
+ Return if a statement has a query reading from a table.
>>> has_table_query(sqlparse.parse("COUNT(*)")[0])
False
|
fix: Published Dashboard without charts don't show up for non admin users (#<I>)
|
apache_incubator-superset
|
train
|
py,py
|
d5ba74d93b9dcedd653a2942aec109d47e388551
|
diff --git a/webpack.config.js b/webpack.config.js
index <HASH>..<HASH> 100644
--- a/webpack.config.js
+++ b/webpack.config.js
@@ -6,6 +6,9 @@ module.exports = {
path: path.resolve(__dirname, 'dist'),
libraryTarget: 'umd',
library: 'feather',
+ // Prevents webpack from referencing `window` in the UMD build
+ // Source: https://git.io/vppgU
+ globalObject: 'typeof self !== \'undefined\' ? self : this',
},
devtool: 'source-map',
module: {
|
fix: Fix UMD build for node
Prevents webpack from referencing `window` in the UMD build which was causing an error in node.
|
feathericons_feather
|
train
|
js
|
ad258875cfa8ea59ed2c391a896e67559ad63e1e
|
diff --git a/allauth/account/utils.py b/allauth/account/utils.py
index <HASH>..<HASH> 100644
--- a/allauth/account/utils.py
+++ b/allauth/account/utils.py
@@ -379,8 +379,9 @@ def sync_user_email_addresses(user):
):
# Bail out
return
- EmailAddress.objects.create(
- user=user, email=email, primary=False, verified=False
+ # get_or_create() to gracefully handle races
+ EmailAddress.objects.get_or_create(
+ user=user, email=email, defaults={"primary": False, "verified": False}
)
|
chore(account): gracefully handle race in sync
|
pennersr_django-allauth
|
train
|
py
|
9db6071cffe5505bac57cf097d1fc146fefbc9e5
|
diff --git a/src/React/Properties/CellProperty/layouts.js b/src/React/Properties/CellProperty/layouts.js
index <HASH>..<HASH> 100644
--- a/src/React/Properties/CellProperty/layouts.js
+++ b/src/React/Properties/CellProperty/layouts.js
@@ -84,6 +84,18 @@ const layouts = {
</tr>
</tbody>);
},
+ n: (data, ui, callback) => {
+ ui.componentLabels = arrayFill(ui.componentLabels, ui.size);
+ data.value = arrayFill(data.value, ui.size, null);
+ return (
+ <tbody>
+ <tr className={ style.inputRow }>
+ {data.value.map((value, idx) =>
+ <InputCell idx={idx} key={idx} label={ui.componentLabels[idx]} type={ui.type} value={value} name={data.name} domain={ui.domain} onChange={callback}/>)
+ }
+ </tr>
+ </tbody>);
+ },
m6: (data, ui, callback) => {
ui.componentLabels = arrayFill(ui.componentLabels, 6);
data.value = arrayFill(data.value, 6, null);
|
fix(CellProperty): Add layout for any number of cells in one line
|
Kitware_paraviewweb
|
train
|
js
|
ffcf371316db63dcb986dfad42df32f9a5b103e5
|
diff --git a/src/constants.js b/src/constants.js
index <HASH>..<HASH> 100644
--- a/src/constants.js
+++ b/src/constants.js
@@ -25,14 +25,14 @@ constants.branch = {
constants.NETWORK = {
'11': {
NAME: 'MAINNET',
- RPC: 'https://api.metadium.com/dev',
+ RPC: 'https://api.metadium.com/prod',
BRANCH: constants.branch.MAINNET,
TESTNET: false,
EXPLORER: 'https://explorer.metadium.com'
},
'12': {
NAME: 'TESTNET',
- RPC: 'https://api.metadium.com/prod',
+ RPC: 'https://api.metadium.com/dev',
BRANCH: constants.branch.TESTNET,
TESTNET: true,
EXPLORER: 'https://testnetexplorer.metadium.com'
|
fix: RPC address for mainnet and testnet
|
hexoul_meta-web3
|
train
|
js
|
1d0fab088c3c34ffce0ccdd5b1906b6e56b0107b
|
diff --git a/src/scrapy_redis/stats.py b/src/scrapy_redis/stats.py
index <HASH>..<HASH> 100644
--- a/src/scrapy_redis/stats.py
+++ b/src/scrapy_redis/stats.py
@@ -70,7 +70,7 @@ class RedisStatsCollector(StatsCollector):
self.set_value(key, min(self.get_value(key, value), value))
def clear_stats(self, spider=None):
- """Clarn all the hash stats"""
+ """Clear all the hash stats"""
self.server.delete(self._get_key(spider))
def open_spider(self, spider):
|
style: correction of wrongly written characters. (#<I>)
|
rmax_scrapy-redis
|
train
|
py
|
290ef09581c4513ce20c56580b19584a75fc3901
|
diff --git a/packages/cerebral-todomvc/src/modules/app/actions/toggleAllChecked.js b/packages/cerebral-todomvc/src/modules/app/actions/toggleAllChecked.js
index <HASH>..<HASH> 100644
--- a/packages/cerebral-todomvc/src/modules/app/actions/toggleAllChecked.js
+++ b/packages/cerebral-todomvc/src/modules/app/actions/toggleAllChecked.js
@@ -1,9 +1,9 @@
import isAllChecked from '../../../computed/isAllChecked'
import visibleTodosRefs from '../../../computed/visibleTodosRefs'
-function toggleAllChecked ({controller, state}) {
- const isCompleted = !isAllChecked().getValue(controller)
- const currentTodosKeys = visibleTodosRefs().getValue(controller)
+function toggleAllChecked ({state}) {
+ const isCompleted = !state.compute(isAllChecked())
+ const currentTodosKeys = state.compute(visibleTodosRefs())
currentTodosKeys.forEach((ref) => {
state.set(`app.todos.${ref}.completed`, isCompleted)
|
refactor(todomvc): use new state.compute syntax
|
cerebral_cerebral
|
train
|
js
|
99d28c0fc826f2572fdfec7a4cb69d4bc25011d9
|
diff --git a/packages/simplebar/src/simplebar.js b/packages/simplebar/src/simplebar.js
index <HASH>..<HASH> 100755
--- a/packages/simplebar/src/simplebar.js
+++ b/packages/simplebar/src/simplebar.js
@@ -428,15 +428,15 @@ export default class SimpleBar {
// Determine placeholder size
this.placeholderEl.style.width = isWidthAuto
- ? `${this.contentEl.clientWidth}px`
+ ? `${this.contentEl.offsetWidth}px`
: 'auto';
this.placeholderEl.style.height = `${this.contentEl.scrollHeight}px`;
// Set isOverflowing to false if scrollbar is not necessary (content is shorter than offset)
this.axis.x.isOverflowing =
- this.contentWrapperEl.scrollWidth > this.contentWrapperEl.clientWidth;
+ this.contentWrapperEl.scrollWidth > this.contentWrapperEl.offsetWidth;
this.axis.y.isOverflowing =
- this.contentWrapperEl.scrollHeight > this.contentWrapperEl.clientHeight;
+ this.contentWrapperEl.scrollHeight > this.contentWrapperEl.offsetHeight;
// Set isOverflowing to false if user explicitely set hidden overflow
this.axis.x.isOverflowing =
|
fix: fix a case where scrollbar position was wrong on init
|
Grsmto_simplebar
|
train
|
js
|
a0aeeece0d2355e0eb9f7dc91a4ebf2881a29ef2
|
diff --git a/src/pivotal-ui-react/iconography/iconography.js b/src/pivotal-ui-react/iconography/iconography.js
index <HASH>..<HASH> 100644
--- a/src/pivotal-ui-react/iconography/iconography.js
+++ b/src/pivotal-ui-react/iconography/iconography.js
@@ -1,6 +1,6 @@
const React = require('react');
const {PropTypes} = React;
-const ReactFaIcon = require('react-fa/lib/icon');
+const ReactFaIcon = require('react-fa/lib/Icon');
const objectAssign = require('object-assign');
class Icon extends React.Component {
|
chore(ci): could it be....
|
pivotal-cf_pivotal-ui
|
train
|
js
|
7ce51351c9abc6f3e71061964718ea653964f0fe
|
diff --git a/npm/design-system/rollup.config.js b/npm/design-system/rollup.config.js
index <HASH>..<HASH> 100644
--- a/npm/design-system/rollup.config.js
+++ b/npm/design-system/rollup.config.js
@@ -35,6 +35,7 @@ function createEntry () {
declaration: true,
sourceMap: true,
inlineSources: true,
+ exclude: ['**/*.spec.tsx', '**/*.stories.tsx'],
}),
resolve(),
json(),
|
chore: exlcude stories from the rollup build too
|
cypress-io_cypress
|
train
|
js
|
6fb6fccb66a9e22c41649f8dc4a1b9a47dcdbeaf
|
diff --git a/test/combined.test.js b/test/combined.test.js
index <HASH>..<HASH> 100644
--- a/test/combined.test.js
+++ b/test/combined.test.js
@@ -102,6 +102,24 @@ describe('Intents', function() {
});
});
+ it('Partial (with skippable): orders Test', function() {
+ return intents.match('orders Test', { partial: true })
+ .then(results => {
+ expect(results.matches.length).to.equal(1);
+ expect(results.best.intent).to.equal('customer:orders');
+ expect(results.best.values.customer).to.equal('Test');
+ });
+ });
+
+ it('Partial and fuzzy: orders for Test', function() {
+ return intents.match('o Test', { partial: true, fuzzy: true })
+ .then(results => {
+ expect(results.matches.length).to.equal(1);
+ expect(results.best.intent).to.equal('customer:orders');
+ expect(results.best.values.customer).to.equal('Test');
+ });
+ });
+
it('Partial: assign', function() {
return intents.match('assign', { partial: true })
.then(results => {
|
feat(matching): Test for skipping and fuzzy partial matching
|
aholstenson_ecolect-js
|
train
|
js
|
ada4599ffcfa4e684cb74b77e9db9e781f99bf58
|
diff --git a/test/test_scheduler.go b/test/test_scheduler.go
index <HASH>..<HASH> 100644
--- a/test/test_scheduler.go
+++ b/test/test_scheduler.go
@@ -219,6 +219,7 @@ func (s *SchedulerSuite) TestJobStatus(t *c.C) {
}
func (s *SchedulerSuite) TestOmniJobs(t *c.C) {
+ t.Skip("skipping due to router startup hang: https://github.com/flynn/flynn/issues/1855")
if testCluster == nil {
t.Skip("cannot boot new hosts")
}
|
test: Skip SchedulerSuite.TestOmniJobs
|
flynn_flynn
|
train
|
go
|
439af760155a5c4506a2739050237af73ea2917a
|
diff --git a/core/poi/lib/WebpackUtils.js b/core/poi/lib/WebpackUtils.js
index <HASH>..<HASH> 100644
--- a/core/poi/lib/WebpackUtils.js
+++ b/core/poi/lib/WebpackUtils.js
@@ -4,7 +4,10 @@ module.exports = class WebpackUtils {
}
get envs() {
- const envs = {}
+ const envs = {
+ NODE_ENV: this.api.mode === 'production' ? 'production' : 'development'
+ }
+
// Collect variables starting with `POI_APP_` from `process.env`
for (const name of Object.keys(process.env)) {
if (name.startsWith('POI_APP_')) {
@@ -13,7 +16,6 @@ module.exports = class WebpackUtils {
}
Object.assign(envs, this.api.config.envs, {
- NODE_ENV: this.api.mode === 'production' ? 'production' : 'development',
PUBLIC_URL: this.api.config.output.publicUrl
})
|
fix(webpack): do not override process.env.NODE_ENV, closes #<I>
|
egoist_poi
|
train
|
js
|
173d60e5324c19c2323d2b8a731e201bf26845ce
|
diff --git a/authorize_request.go b/authorize_request.go
index <HASH>..<HASH> 100644
--- a/authorize_request.go
+++ b/authorize_request.go
@@ -49,10 +49,11 @@ type AuthorizeRequest struct {
func NewAuthorizeRequest() *AuthorizeRequest {
return &AuthorizeRequest{
ResponseTypes: Arguments{},
- RedirectURI: &url.URL{},
HandledResponseTypes: Arguments{},
Request: *NewRequest(),
ResponseMode: ResponseModeDefault,
+ // The redirect URL must be unset / nil for redirect detection to work properly:
+ // RedirectURI: &url.URL{},
}
}
diff --git a/authorize_request_test.go b/authorize_request_test.go
index <HASH>..<HASH> 100644
--- a/authorize_request_test.go
+++ b/authorize_request_test.go
@@ -22,6 +22,7 @@
package fosite
import (
+ "github.com/stretchr/testify/require"
"net/url"
"testing"
"time"
@@ -29,6 +30,10 @@ import (
"github.com/stretchr/testify/assert"
)
+func TestAuthorizeRequestURLRegression(t *testing.T) {
+ require.Nil(t, NewAuthorizeRequest().RedirectURI)
+}
+
func TestAuthorizeRequest(t *testing.T) {
var urlparse = func(rawurl string) *url.URL {
u, _ := url.Parse(rawurl)
|
fix: resolve regression (#<I>)
|
ory_fosite
|
train
|
go,go
|
0af8a2eb477059d631d4a142890dcc0b8aeb30c8
|
diff --git a/packages/app-frontend/src/features/timeline/index.js b/packages/app-frontend/src/features/timeline/index.js
index <HASH>..<HASH> 100644
--- a/packages/app-frontend/src/features/timeline/index.js
+++ b/packages/app-frontend/src/features/timeline/index.js
@@ -105,12 +105,23 @@ function addEvent (appId, event, layer) {
function stackEvent (event) {
const roundedTime = Math.round(event.time / 10)
- const existingEvent = event.layer.eventTimeMap[roundedTime]
- if (!existingEvent) {
+ // Try neighbors too
+ const times = [roundedTime, roundedTime - 10, roundedTime + 10]
+ let wasStacked = false
+ for (const k in times) {
+ wasStacked = !!_stackEvent(event, times[k])
+ if (wasStacked) break
+ }
+ if (!wasStacked) {
event.layer.eventTimeMap[roundedTime] = event
event.layer.displayedEvents.push(event)
event.stackedEvents = [event]
- } else {
+ }
+}
+
+function _stackEvent (event, roundedTime) {
+ const existingEvent = event.layer.eventTimeMap[roundedTime]
+ if (existingEvent) {
existingEvent.stackedEvents.push(event)
event.stackParent = existingEvent
}
|
feat(timeline): improves stacking
|
vuejs_vue-devtools
|
train
|
js
|
b4b432406ebc08ef2fc3a1922c64cde7c9060cae
|
diff --git a/src/metrics/tracked-map.js b/src/metrics/tracked-map.js
index <HASH>..<HASH> 100644
--- a/src/metrics/tracked-map.js
+++ b/src/metrics/tracked-map.js
@@ -38,6 +38,12 @@ class TrackedMap extends Map {
this._metrics.updateComponentMetric(this._component, this._name, this.size)
return deleted
}
+
+ clear () {
+ super.clear()
+
+ this._metrics.updateComponentMetric(this._component, this._name, this.size)
+ }
}
/**
|
fix: record tracked map clears (#<I>)
Record the size of a map after we `.clear()` it.
|
libp2p_js-libp2p
|
train
|
js
|
99f9f5ec89568a025e50ce583ff660b2b03b4c45
|
diff --git a/spec/ciConf.js b/spec/ciConf.js
index <HASH>..<HASH> 100644
--- a/spec/ciConf.js
+++ b/spec/ciConf.js
@@ -36,7 +36,8 @@ exports.config = {
jasmineNodeOpts: {
isVerbose: true,
- showTiming: true
+ showTiming: true,
+ defaultTimeoutInterval: 60000
},
params: {
diff --git a/spec/smokeConf.js b/spec/smokeConf.js
index <HASH>..<HASH> 100644
--- a/spec/smokeConf.js
+++ b/spec/smokeConf.js
@@ -57,7 +57,8 @@ exports.config = {
params: {
login: {
user: 'Jane',
- password: '1234'
+ password: '1234',
+ defaultTimeoutInterval: 60000
}
}
};
|
chore(ci): increasing default Jasmine timeout interval
Some long tests, which perform many actions, are legitimately going over the <I> second
limit. Upping to <I> seconds. Example failure: <URL>
|
angular_protractor
|
train
|
js,js
|
42a5703ce2431ffd471b1c5fdffac2806a6dbd00
|
diff --git a/src/login7-payload.js b/src/login7-payload.js
index <HASH>..<HASH> 100644
--- a/src/login7-payload.js
+++ b/src/login7-payload.js
@@ -210,9 +210,7 @@ module.exports = class Login7Payload {
createVariableData(offset: number) {
this.variableLengthsLength = (9 * 4) + 6 + (3 * 4) + 4;
- if (this.loginData.tdsVersion === '7_1') {
- this.variableLengthsLength = (9 * 4) + 6 + (2 * 4);
- }
+
const variableData = {
offsetsAndLengths: new WritableTrackingBuffer(200),
data: new WritableTrackingBuffer(200, 'ucs2'),
@@ -265,10 +263,8 @@ module.exports = class Login7Payload {
}
this.addVariableDataString(variableData, this.attachDbFile);
- if (this.loginData.tdsVersion > '7_1') {
- this.addVariableDataString(variableData, this.changePassword);
- variableData.offsetsAndLengths.writeUInt32LE(this.sspiLong);
- }
+ this.addVariableDataString(variableData, this.changePassword);
+ variableData.offsetsAndLengths.writeUInt32LE(this.sspiLong);
return Buffer.concat([variableData.offsetsAndLengths.data, variableData.data.data]);
}
|
refactor: send the same Login7Payload structure for all TDS versions
The Login7 payload is defined in a backwards and forwards compatible
way, so we can always send data based on the latest version of the TDS
specification, without having to account for older versions.
|
tediousjs_tedious
|
train
|
js
|
2ad42f1d39b0c59ab62a336bc07f39007dc86af7
|
diff --git a/src/Fuse.php b/src/Fuse.php
index <HASH>..<HASH> 100644
--- a/src/Fuse.php
+++ b/src/Fuse.php
@@ -114,7 +114,7 @@ class Fuse
$limit = $options['limit'] ?? -1;
$results = is_string($query)
- ? (is_string($this->docs[0])
+ ? (is_string($this->docs[0] ?? null)
? $this->searchStringList($query)
: $this->searchObjectList($query))
: $this->searchLogical($query);
|
fix: don't print a notice for empty docs list
|
Loilo_Fuse
|
train
|
php
|
70c49b78ae209f6314e0a2283181b51259e73f98
|
diff --git a/lib/renderer/inspector.js b/lib/renderer/inspector.js
index <HASH>..<HASH> 100644
--- a/lib/renderer/inspector.js
+++ b/lib/renderer/inspector.js
@@ -5,8 +5,7 @@ window.onload = function () {
window.InspectorFrontendHost.showContextMenuAtPoint = createMenu
// Use dialog API to override file chooser dialog.
- // Note: It will be moved to UI after Chrome 57.
- window.Bindings.createFileSelectorElement = createFileSelectorElement
+ window.UI.createFileSelectorElement = createFileSelectorElement
}
window.confirm = function (message, title) {
|
fix: Memory > Profiles > Load in DevTools (#<I>)
|
electron_electron
|
train
|
js
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.