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
98e65ff33c109e289a36400e5739da33f5cfd605
diff --git a/tests/src/Functional/InstallationTest.php b/tests/src/Functional/InstallationTest.php index <HASH>..<HASH> 100644 --- a/tests/src/Functional/InstallationTest.php +++ b/tests/src/Functional/InstallationTest.php @@ -93,15 +93,4 @@ class InstallationTest extends TestCase { $this->assertEquals('/api', $output['result']['openApi']['basePath']); } - public function testGraphQLQuery() { - $query = '{"query":"query{nodeQuery{entities{entityLabel ... on NodeRecipe { fieldIngredients }}}}","variables":null}'; - $response = $this->httpClient->post($this->baseUrl . '/graphql', [ - 'body' => $query, - ]); - $this->assertEquals(200, $response->getStatusCode()); - $body = $response->getBody()->getContents(); - $output = Json::decode($body); - $entities = $output['data']['nodeQuery']['entities']; - $this->assertFalse(empty($entities)); - } }
fix: remove GraphQL tests
contentacms_contenta_jsonapi
train
php
9aa515a0396b865a2b57265852a3c6d1a181713d
diff --git a/packages/eslint-config-4catalyzer-react/rules.js b/packages/eslint-config-4catalyzer-react/rules.js index <HASH>..<HASH> 100644 --- a/packages/eslint-config-4catalyzer-react/rules.js +++ b/packages/eslint-config-4catalyzer-react/rules.js @@ -11,16 +11,17 @@ module.exports = { aspects: ['noHref', 'invalidHref', 'preferButton'], }, ], - 'jsx-a11y/label-has-for': [ + 'jsx-a11y/label-has-associated-control': [ 'error', { - components: [], - required: { - some: ['nesting', 'id'], - }, - allowChildren: false, + labelComponents: [], + labelAttributes: [], + controlComponents: [], + assert: 'either', + depth: 25, }, ], + 'jsx-a11y/label-has-for': 'off', 'react-hooks/rules-of-hooks': 'error', 'react-hooks/exhaustive-deps': 'warn', // It's clearer to use required even on props with defaults to indicate
fix: Update jsx-a<I>y overrides (#<I>)
4Catalyzer_javascript
train
js
a4581766cc9a23cd213bdc8054bbc0db00fc860a
diff --git a/packages/webiny-api/src/graphql/crudResolvers.js b/packages/webiny-api/src/graphql/crudResolvers.js index <HASH>..<HASH> 100644 --- a/packages/webiny-api/src/graphql/crudResolvers.js +++ b/packages/webiny-api/src/graphql/crudResolvers.js @@ -5,7 +5,7 @@ import parseBoolean from "./parseBoolean"; import InvalidAttributesError from "./InvalidAttributesError"; import { ListResponse, ErrorResponse, NotFoundResponse, Response } from "./responses"; -type EntityFetcher = (context: Object) => Class<Entity>; +type EntityFetcher = string | (context: Object) => Class<Entity>; const notFound = (id?: string) => { return new NotFoundResponse(id ? `Record "${id}" not found!` : "Record not found!");
fix: entityFetcher can also be a string
Webiny_webiny-js
train
js
3b5d3e2192ce0cdc97854a1d70d5e382e454275c
diff --git a/google/oauth2/_client.py b/google/oauth2/_client.py index <HASH>..<HASH> 100644 --- a/google/oauth2/_client.py +++ b/google/oauth2/_client.py @@ -103,7 +103,11 @@ def _token_endpoint_request(request, token_uri, body): # occurs. while True: response = request(method="POST", url=token_uri, headers=headers, body=body) - response_body = response.data.decode("utf-8") + response_body = ( + response.data.decode("utf-8") + if hasattr(response.data, "decode") + else response.data + ) response_data = json.loads(response_body) if response.status == http_client.OK:
fix: in token endpoint request, do not decode the response data if it is not encoded (#<I>) * fix: in token endpoint request, do not decode the response data if it is not encoded The interface of the underlying transport 'google.auth.transport.Request' that makes the token request does not guarantee the response is encoded. In Python 3, the non-encoded strings do not have 'decode' attribute. Blindly decoding all the response could have the token refresh throw here.
googleapis_google-auth-library-python
train
py
e272983110424f7160849448c61415a8cab66cce
diff --git a/packages/provider-queries/src/article-fragment.js b/packages/provider-queries/src/article-fragment.js index <HASH>..<HASH> 100644 --- a/packages/provider-queries/src/article-fragment.js +++ b/packages/provider-queries/src/article-fragment.js @@ -33,6 +33,7 @@ export default gql` } keywords leadAsset { + __typename ... on Video { brightcoveAccountId brightcovePolicyKey @@ -47,6 +48,7 @@ export default gql` } } relatedArticleSlice { + __typename ... on StandardSlice { items { ...relatedProps @@ -144,6 +146,7 @@ export default gql` fragment relatedProps on Tile { leadAsset { + __typename ... on Image { crop169: crop(ratio: "16:9") { url @@ -169,6 +172,7 @@ export default gql` } article { leadAsset { + __typename ... on Image { crop169: crop(ratio: "16:9") { url
chore: Add typename to article fragment (#<I>) * Add typename to article fragment * Update provider snap * Update snaps
newsuk_times-components
train
js
f22d3574bc43201856f77a1da04f9156b3466236
diff --git a/packages/channels/botpress-channel-web/src/api.js b/packages/channels/botpress-channel-web/src/api.js index <HASH>..<HASH> 100755 --- a/packages/channels/botpress-channel-web/src/api.js +++ b/packages/channels/botpress-channel-web/src/api.js @@ -16,6 +16,7 @@ import users from './users' const ERR_USER_ID_REQ = '`userId` is required and must be valid' const ERR_MSG_TYPE = '`type` is required and must be valid' const ERR_CONV_ID_REQ = '`conversationId` is required and must be valid' +const VALID_USER_ID_RE = /^[a-z0-9-_]+$/i module.exports = async (bp, config) => { const diskStorage = multer.diskStorage({ @@ -209,9 +210,7 @@ module.exports = async (bp, config) => { }) }) - function validateUserId(userId) { - return /^[a-z0-9-_]+$/i.test(userId) - } + const validateUserId = userId => VALID_USER_ID_RE.test(userId) async function sendNewMessage(userId, conversationId, payload) { if (!payload.text || !_.isString(payload.text) || payload.text.length > 360) {
fix(channel-web): extract frequently used regex
botpress_botpress
train
js
7d0423425a857ccc98c6a84c8e0d093bb3b360d0
diff --git a/src/components/Avatar/Avatar.react.js b/src/components/Avatar/Avatar.react.js index <HASH>..<HASH> 100644 --- a/src/components/Avatar/Avatar.react.js +++ b/src/components/Avatar/Avatar.react.js @@ -5,7 +5,11 @@ import { Icon } from "../"; import cn from "classnames"; import AvatarList from "./AvatarList.react"; +import type { MouseEvents, PointerEvents } from "../../"; + export type Props = {| + ...MouseEvents, + ...PointerEvents, +children?: React.Node, +className?: string, /** @@ -45,6 +49,11 @@ function Avatar({ placeholder, icon, color = "", + onClick, + onMouseEnter, + onMouseLeave, + onPointerEnter, + onPointerLeave, }: Props): React.Node { const classes = cn( { @@ -68,6 +77,11 @@ function Avatar({ ) : style } + onClick={onClick} + onMouseEnter={onMouseEnter} + onMouseLeave={onMouseLeave} + onPointerEnter={onPointerEnter} + onPointerLeave={onPointerLeave} > {icon && <Icon name={icon} />} {status && <span className={`avatar-status bg-${status}`} />}
feat(Avatar): Add mouse and pointer event props
tabler_tabler-react
train
js
677df72dda2d3373ba8f59ca8d9c9fab36d3ff9a
diff --git a/cmd/helm/doctor.go b/cmd/helm/doctor.go index <HASH>..<HASH> 100644 --- a/cmd/helm/doctor.go +++ b/cmd/helm/doctor.go @@ -42,7 +42,7 @@ func doctor(c *cli.Context) error { if client.IsInstalled(runner) { format.Success("You have everything you need. Go forth my friend!") } else { - format.Warning("Looks like you don't have DM installed.\nRun: `helm install`") + format.Warning("Looks like you don't have DM installed.\nRun: `helm server install`") } return nil diff --git a/pkg/kubectl/get.go b/pkg/kubectl/get.go index <HASH>..<HASH> 100644 --- a/pkg/kubectl/get.go +++ b/pkg/kubectl/get.go @@ -34,7 +34,7 @@ func (r RealRunner) GetByKind(kind, name, ns string) (string, error) { args := []string{"get", kind} if name != "" { - args = append([]string{name}, args...) + args = append(args, name) } if ns != "" {
fix(cli): fix 'helm doctor' Rather than remove 'helm doctor' for MVP, I just fixed the one small bug that was preventing it from working.
helm_helm
train
go,go
eddeeafff4ab430e4ec49d6306646f91ba7a3eb7
diff --git a/docs/gatsby-config.js b/docs/gatsby-config.js index <HASH>..<HASH> 100644 --- a/docs/gatsby-config.js +++ b/docs/gatsby-config.js @@ -30,7 +30,8 @@ module.exports = { root: __dirname, subtitle: 'SDK Resources', description: 'Documentation for Resources', - gitRepo: 'availity/sdk-js', + gitRepo: 'github.com/availity/sdk-js', + gitType: 'github', contentDir: 'docs/source', sidebarCategories: { null: ['index', 'contributing'],
fix: edit on github button working now
Availity_sdk-js
train
js
2bd9f42b81c89cfa8a709517a9b7375794dbe6e6
diff --git a/addon/services/notification.js b/addon/services/notification.js index <HASH>..<HASH> 100644 --- a/addon/services/notification.js +++ b/addon/services/notification.js @@ -15,7 +15,9 @@ function notification(status) { export default class NotificationService extends Service { _notification(message, options) { const n = UIkit.notification( - Object.assign(config["ember-uikit"]?.notification, options, { message }) + Object.assign(config["ember-uikit"]?.notification ?? {}, options, { + message, + }) ); return n?.$el
fix(notification): fix notification options if app doesn't configure anything
adfinis-sygroup_ember-uikit
train
js
33ccca315b5b542d3b8fddea3c6566b5ee0087dd
diff --git a/src/hmr/hotModuleReplacement.js b/src/hmr/hotModuleReplacement.js index <HASH>..<HASH> 100644 --- a/src/hmr/hotModuleReplacement.js +++ b/src/hmr/hotModuleReplacement.js @@ -174,17 +174,12 @@ function reloadAll() { function isUrlRequest(url) { // An URL is not an request if - // 1. It's an absolute url - if (/^[a-z][a-z0-9+.-]*:/i.test(url)) { - return false; - } - - // 2. It's a protocol-relative + // 1. It's a protocol-relative if (/^\/\//.test(url)) { return false; } - // 3. Its a `#` link + // 2. Its a `#` link if (/^#/.test(url)) { return false; }
fix: Remove absolute URL condition from HMR request checker. (#<I>)
faceyspacey_extract-css-chunks-webpack-plugin
train
js
6c2ea3d852f63fe44a6da215f7bd04250a978556
diff --git a/lib/index.js b/lib/index.js index <HASH>..<HASH> 100644 --- a/lib/index.js +++ b/lib/index.js @@ -26,7 +26,6 @@ import { setAutoPlan, setMapCenter } from './actions/config' import { getCurrentPosition } from './actions/location' import { setLocationToCurrent } from './actions/map' import { findNearbyStops } from './actions/api' -import { setShowExtendedSettings } from './actions/ui' import createOtpReducer from './reducers/create-otp-reducer' @@ -76,7 +75,6 @@ export { setAutoPlan, setLocationToCurrent, setMapCenter, - setShowExtendedSettings, // redux utilities createOtpReducer,
fix(api): Remove obselete include from index.js
opentripplanner_otp-react-redux
train
js
89b67e7c590b281e4f338a4f74d8605cf3531563
diff --git a/src/Writer.php b/src/Writer.php index <HASH>..<HASH> 100644 --- a/src/Writer.php +++ b/src/Writer.php @@ -15,6 +15,14 @@ class Writer /** @var string Write method to be relayed to Colorizer */ protected $method; + /** @var Color */ + protected $colorizer; + + public function __construct() + { + $this->colorizer = new Color; + } + /** * Magically set methods. * @@ -22,7 +30,7 @@ class Writer * * @return self */ - public function __get($name) + public function __get(string $name): self { if (\strpos($this->method, $name) === false) { $this->method .= $this->method ? \ucfirst($name) : $name; @@ -39,12 +47,12 @@ class Writer * * @return void */ - public function write($text, $eol = false) + public function write(string $text, bool $eol = false) { list($method, $this->method) = [$this->method ?: 'line', '']; $stream = \stripos($method, 'error') !== false ? \STDERR : \STDOUT; - \fwrite($stream, Color::{$method}($text, [], $eol)); + \fwrite($stream, $this->colorizer->{$method}($text, [], $eol)); } }
refactor(writer): colorizer is no longer static, add typehints
adhocore_php-cli
train
php
106671ebdf0f77f283876c2c972da4114b7fc689
diff --git a/test/test-integration-sftp.js b/test/test-integration-sftp.js index <HASH>..<HASH> 100644 --- a/test/test-integration-sftp.js +++ b/test/test-integration-sftp.js @@ -1693,13 +1693,8 @@ function cleanupTemp() { } function next() { - if (t === tests.length - 1) { - cleanup(function() { - if (fs.existsSync(join(fixturesdir, 'testfile'))) - fs.unlinkSync(join(fixturesdir, 'testfile')); - }); - return; - } + if (t === tests.length - 1) + return cleanup(); //cleanupTemp(); var v = tests[++t]; v.run.call(v); @@ -1723,12 +1718,14 @@ function waitForSshd(cb) { waitForSshd(cb); }, 50); } - cb(); + cb && cb(); }); } function cleanup(cb) { cleanupTemp(); + if (fs.existsSync(join(fixturesdir, 'testfile'))) + fs.unlinkSync(join(fixturesdir, 'testfile')); cpexec('lsof -Fp -a -u ' + USER + ' -c sshd -i tcp@localhost:' @@ -1741,7 +1738,7 @@ function cleanup(cb) { } catch (ex) {} } } - cb(); + cb && cb(); }); }
test: make sure big testfile is removed on error or normal exit
mscdex_ssh2
train
js
0838754145316ca685a3af821c457be78e82028a
diff --git a/src/Security/Auth0Service.php b/src/Security/Auth0Service.php index <HASH>..<HASH> 100644 --- a/src/Security/Auth0Service.php +++ b/src/Security/Auth0Service.php @@ -116,6 +116,12 @@ class Auth0Service */ public function getUserProfileByA0UID(string $jwt): ?array { + // The /userinfo endpoint is only accessible with RS256. + // Return details from JWT instead, in this case. + if ('HS256' === $this->algorithm) { + return (array) $this->tokenInfo; + } + return $this->a0->userinfo($jwt); }
fix: HS<I> does not support /userinfo; return profile based on JWT data in this case.
auth0_jwt-auth-bundle
train
php
e2ec298912f096ebdbca4950dfde8b72ec399bc2
diff --git a/src/Viewable.php b/src/Viewable.php index <HASH>..<HASH> 100644 --- a/src/Viewable.php +++ b/src/Viewable.php @@ -90,16 +90,6 @@ trait Viewable } /** - * Get the total number of views. - * - * @return void - */ - public function removeViews() - { - app(ViewableService::class)->removeModelViews($this); - } - - /** * Retrieve records sorted by views. * * @param \Illuminate\Database\Eloquent\Builder $query
refactor: remove removeViews method from Viewable trait
cyrildewit_eloquent-viewable
train
php
cda4a7080e236b837383d1ffb8c13b46dae87e2c
diff --git a/tasks/bump.js b/tasks/bump.js index <HASH>..<HASH> 100644 --- a/tasks/bump.js +++ b/tasks/bump.js @@ -1,11 +1,3 @@ -/* - * grunt-contrib-bump - * http://gruntjs.com/ - * - * Copyright (c) 2013 "Cowboy" Ben Alman, contributors - * Licensed under the MIT license. - */ - 'use strict'; var semver = require('semver'); @@ -47,7 +39,7 @@ module.exports = function(grunt) { tagName: 'v{%= version %}', tagMessage: 'Version {%= version %}', tagPrerelease: false, - updateDate: true, + updateDate: true }); // Normalize filepaths to array. var filepaths = Array.isArray(options.filepaths) ? options.filepaths : [options.filepaths]; @@ -130,7 +122,7 @@ module.exports = function(grunt) { function processTemplate(message, data) { return grunt.template.process(message, { delimiters: 'bump', - data: data, + data: data }); }
chore: Remove old boilerplate headers New headers coming soon!
iVantage_grunt-svn-bump
train
js
cf9d7c0e62c4c50148c38a9c9a1fa9e81fab577b
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 @@ -538,8 +538,8 @@ var interfaceData = [hostname, os.platform(), os.release(), })(); var clientId = crypto.createHmac('sha256', 'x-whistle-client-id') - .update(interfaceData.join('\r\n')).digest('hex') - + Math.floor(Math.random() * 1000000).toString(16); + .update(interfaceData.join('\r\n')).digest('hex'); + exports.setClientId = function(headers, enable) { if (enable && (enable.clientId || enable.clientID || enable.clientid)) { headers['x-whistle-client-id'] = clientId;
refactor: generate client id by os.networkInterfaces()
avwo_whistle
train
js
aa48ae2296069ee13f6efa6290c682e88fd4c17c
diff --git a/test/root-no-tests.js b/test/root-no-tests.js index <HASH>..<HASH> 100644 --- a/test/root-no-tests.js +++ b/test/root-no-tests.js @@ -1,6 +1,6 @@ // verify that just loading tap doesn't cause it to // print out some TAP stuff, unless an actual thing happens. -var t = require('tap') +var t = require('../') var spawn = require('child_process').spawn switch (process.argv[2]) {
test: don't require('tap'), require('../') For CI
tapjs_node-tap
train
js
82f541a25b69eee668573bea11de0095c32f330d
diff --git a/src/CornerstoneViewport/CornerstoneViewport.js b/src/CornerstoneViewport/CornerstoneViewport.js index <HASH>..<HASH> 100644 --- a/src/CornerstoneViewport/CornerstoneViewport.js +++ b/src/CornerstoneViewport/CornerstoneViewport.js @@ -232,9 +232,9 @@ class CornerstoneViewport extends Component { // Handle the case where the imageId isn't loaded correctly and the // imagePromise returns undefined // To test, uncomment the next line - let imageId = 'AfileThatDoesntWork'; // For testing only! + //let imageId = 'AfileThatDoesntWork'; // For testing only! - //const { imageId } = this.state; + const { imageId } = this.state; let imagePromise; try { imagePromise = cornerstone.loadAndCacheImage(imageId);
fix(error-handling): Fix code commented while testing
cornerstonejs_react-cornerstone-viewport
train
js
1e1706d741eece66e8ff0ea8ae6781aaeb52d11d
diff --git a/superset/migrations/versions/301362411006_add_execution_id_to_report_execution_.py b/superset/migrations/versions/301362411006_add_execution_id_to_report_execution_.py index <HASH>..<HASH> 100644 --- a/superset/migrations/versions/301362411006_add_execution_id_to_report_execution_.py +++ b/superset/migrations/versions/301362411006_add_execution_id_to_report_execution_.py @@ -36,4 +36,4 @@ def upgrade(): def downgrade(): - op.drop_column("report_execution_log", "execution_id") + op.drop_column("report_execution_log", "uuid")
fix: migration downgrade references wrong column (#<I>)
apache_incubator-superset
train
py
aaad9f877d26b1a44a3a23d4b1a58e26c1d97b9e
diff --git a/api/src/opentrons/protocol_api/instrument_context.py b/api/src/opentrons/protocol_api/instrument_context.py index <HASH>..<HASH> 100644 --- a/api/src/opentrons/protocol_api/instrument_context.py +++ b/api/src/opentrons/protocol_api/instrument_context.py @@ -234,8 +234,8 @@ class InstrumentContext(CommandPublisher): aspirated into the pipette will be dispensed (this volume is accessible through :py:attr:`current_volume`). - :param volume: The volume of liquid to dispense, in microliters. If not - specified, defaults to :py:attr:`current_volume`. + :param volume: The volume of liquid to dispense, in microliters. If 0 + or unspecified, defaults to :py:attr:`current_volume`. :type volume: int or float :param location: Where to dispense into. If `location` is a
docs(api): Explain dispense(volume=0) dispenses the entire current volume (#<I>)
Opentrons_opentrons
train
py
7ad001c9744f8270ac9d30dc3a7ab00bd552ef4c
diff --git a/packages/xod-func-tools/test/index.spec.js b/packages/xod-func-tools/test/index.spec.js index <HASH>..<HASH> 100644 --- a/packages/xod-func-tools/test/index.spec.js +++ b/packages/xod-func-tools/test/index.spec.js @@ -61,7 +61,7 @@ describe('tapP', () => { Promise.resolve(1) .then(tapP(promiseFn)); }); - it('should return Promise.reject if inside function return Promise.reject', () => { + it('should return Promise.reject if inner function return Promise.reject', () => { const promiseFn = () => Promise.reject('reject'); Promise.resolve(1)
chore(xod-func-tools): fix a mistake in test case label
xodio_xod
train
js
3ff37bf2b2964efb2e2186dc7f630810ed94bba2
diff --git a/test/stateSpec.js b/test/stateSpec.js index <HASH>..<HASH> 100644 --- a/test/stateSpec.js +++ b/test/stateSpec.js @@ -34,10 +34,6 @@ describe('Initial state', () => { const patchId = Object.keys(initialState.project.patches)[0]; chai.expect(initialState.project.patches[patchId]).to.have.any.keys(['nodes']); }); - it('pins', () => { - const patchId = Object.keys(initialState.project.patches)[0]; - chai.expect(initialState.project.patches[patchId]).to.have.any.keys(['pins']); - }); it('links', () => { const patchId = Object.keys(initialState.project.patches)[0]; chai.expect(initialState.project.patches[patchId]).to.have.any.keys(['links']);
fix(test): fix a simplest test, that checks a state shape for existing of pins inside patches
xodio_xod
train
js
92120437b1dd063d71231a0d831c0350c4fc3049
diff --git a/src/Server.js b/src/Server.js index <HASH>..<HASH> 100644 --- a/src/Server.js +++ b/src/Server.js @@ -134,7 +134,7 @@ class Server extends EventEmitter { * @param {code} [code=1000] Code as per WebSocket spec. * @returns {Promise<undefined>} Promise. */ - close (code = 1000) : Promise<void> { + close (code: number = 1000) : Promise<void> { for (let [, client] of this.clients) { client.close(code) }
refactor: add missing flow type
an-sh_ws-messaging
train
js
a147979b84549a6f8a66f52487c05a8e8c7ebca0
diff --git a/service.js b/service.js index <HASH>..<HASH> 100755 --- a/service.js +++ b/service.js @@ -220,12 +220,7 @@ class ServiceConsul extends service.Service { }; } - const modified = super._configure(config); - - // TODO where does baseUrl come from ? - delete this.consulOptions.baseUrl; - - return modified; + return super._configure(config); } get consul() { diff --git a/tests/service_test.js b/tests/service_test.js index <HASH>..<HASH> 100644 --- a/tests/service_test.js +++ b/tests/service_test.js @@ -20,7 +20,6 @@ describe('consul service', function () { }, { logLevel: 'trace', name: 'consul', - //port: 4713, checkInterval: 100 }], [ServiceConsul, require('kronos-service-health-check'), require('kronos-service-koa')]).then( manager => {
fix: no longer needed to delete this.consulOptions.baseUrl
Kronos-Integration_kronos-service-consul
train
js,js
41381691ac83c308d0a4352f4ffbdd15e75d5e9b
diff --git a/src/Draggable/tests/Draggable.test.js b/src/Draggable/tests/Draggable.test.js index <HASH>..<HASH> 100644 --- a/src/Draggable/tests/Draggable.test.js +++ b/src/Draggable/tests/Draggable.test.js @@ -414,6 +414,28 @@ describe('Draggable', () => { .toBeInstanceOf(DragStartEvent); }); + test('sets dragging to false when `drag:start` event is canceled', () => { + const newInstance = new Draggable(containers, { + draggable: 'li', + }); + const draggableElement = sandbox.querySelector('li'); + document.elementFromPoint = () => draggableElement; + + const callback = jest.fn((event) => { + event.cancel(); + }); + newInstance.on('drag:start', callback); + + triggerEvent(draggableElement, 'mousedown', {button: 0}); + + // Wait for delay + jest.runTimersToTime(100); + + triggerEvent(draggableElement, 'dragstart', {button: 0}); + + expect(newInstance.dragging).toBeFalsy(); + }); + test('triggers `drag:move` drag event on mousedown', () => { const newInstance = new Draggable(containers, { draggable: 'li',
test(dragging): dragging false on drag:start cancel
Shopify_draggable
train
js
3a604ba0bf113563b0666f06744a749a3c3b769b
diff --git a/aio/scripts/test-pwa-score.js b/aio/scripts/test-pwa-score.js index <HASH>..<HASH> 100644 --- a/aio/scripts/test-pwa-score.js +++ b/aio/scripts/test-pwa-score.js @@ -79,6 +79,9 @@ function launchChromeAndRunLighthouse(url, flags, config) { return launcher.run(). then(() => lighthouse(url, flags, config)). + // Avoid race condition by adding a delay before killing Chrome. + // (See also https://github.com/paulirish/pwmetrics/issues/63#issuecomment-282721068.) + then(results => new Promise(resolve => setTimeout(() => resolve(results), 1000))). then(results => launcher.kill().then(() => results)). catch(err => launcher.kill().then(() => { throw err; }, () => { throw err; })); }
fix(aio): fix PWA testing on Windows (and reduce flaky-ness) Adding a delay after Lighthouse has run and before killing the Chrome process avoids `ECONNREFUSED` errors on Windows and will hopefully prevent such errors occasionally appearing on CI. Based on info in: <URL>
angular_angular
train
js
746ecf1839ee93eacf9d4d4f77587bef3b5a8060
diff --git a/src/Keboola/Syrup/Command/JobCommand.php b/src/Keboola/Syrup/Command/JobCommand.php index <HASH>..<HASH> 100644 --- a/src/Keboola/Syrup/Command/JobCommand.php +++ b/src/Keboola/Syrup/Command/JobCommand.php @@ -170,6 +170,7 @@ class JobCommand extends ContainerAwareCommand $status = self::STATUS_RETRY; } catch (MaintenanceException $e) { + $jobResult = []; $jobStatus = Job::STATUS_WAITING; $status = self::STATUS_LOCK; } catch (UserException $e) {
fix: return job status to waiting when maintenance occurs
keboola_syrup
train
php
734d1e747c126c2824b3c8a2c07e5d0955b5e60a
diff --git a/code/dataobjects/CustomMenuBlock.php b/code/dataobjects/CustomMenuBlock.php index <HASH>..<HASH> 100644 --- a/code/dataobjects/CustomMenuBlock.php +++ b/code/dataobjects/CustomMenuBlock.php @@ -1,4 +1,9 @@ <?php + +if (!class_exists('Block')) { + return; +} + /** * A block that allows end users to manually build a custom (flat or nested) menu * @author Shea Dawson <shea@silverstripe.com.au>
fix(CustomMenuBlock): If not using Shea's Block module and you want to iterate over classes/get configs in an abstract way, you'll cause SS to load this class and throw an error.
symbiote_silverstripe-seed
train
php
7d36f6346ef6021d544744c5ae9c6b63a5241cbf
diff --git a/packages/types/src/core/records.js b/packages/types/src/core/records.js index <HASH>..<HASH> 100644 --- a/packages/types/src/core/records.js +++ b/packages/types/src/core/records.js @@ -10,7 +10,8 @@ import type { import { List, Map, Record, Set } from "immutable"; -export { makeLocalKernelRecord, makeDesktopHostRecord } from "./hosts"; +export { HostRef, makeLocalKernelRecord, makeDesktopHostRecord } from "./hosts"; +export { KernelspecsRef } from "./kernelspecs"; /*
refactor: export refs from `records`. Didn't realize we could only import from `records` here. In the future, it might make more sense to rename `records` to `index` or something? I feel like that's the purpose of that file.
nteract_nteract
train
js
cc29518cce7f546ca6d4e129ab05b1485be583a1
diff --git a/lib/plugins/module-paths.js b/lib/plugins/module-paths.js index <HASH>..<HASH> 100644 --- a/lib/plugins/module-paths.js +++ b/lib/plugins/module-paths.js @@ -54,6 +54,14 @@ if (config.debugMode) { addDebugPlugins(paths); } +var nvmBin = env.NVM_BIN; +if (nvmBin && typeof nvmBin === 'string') { + nvmBin = formatPath(path.join(nvmBin, '../lib')); + if (paths.indexOf(nvmBin) == -1) { + paths.push(nvmBin); + } +} + if (appDataDir && paths.indexOf(appDataDir) == -1) { paths.push(appDataDir); }
refactor: load plugins from nvm path
avwo_whistle
train
js
e1103a0bfe9d1942db89525e3a1e84ef8c330655
diff --git a/packages/components/bolt-image/src/image.js b/packages/components/bolt-image/src/image.js index <HASH>..<HASH> 100644 --- a/packages/components/bolt-image/src/image.js +++ b/packages/components/bolt-image/src/image.js @@ -15,7 +15,7 @@ import { ifDefined } from 'lit-html/directives/if-defined'; import Ajv from 'ajv'; import imageStyles from './image.scss'; -import ratioStyles from '../../bolt-ratio/src/ratio.scss'; +import ratioStyles from '@bolt/components-ratio/src/ratio.scss'; import schema from '../image.schema.yml';
refactor: update path to ratio styles
bolt-design-system_bolt
train
js
d1641db702da0d487661a1393f6936f35fd824c0
diff --git a/packages/metascraper-audio/index.js b/packages/metascraper-audio/index.js index <HASH>..<HASH> 100644 --- a/packages/metascraper-audio/index.js +++ b/packages/metascraper-audio/index.js @@ -62,6 +62,7 @@ module.exports = () => ({ // Duplicated logic to the rule above //TODO: figure out a way to apply ALL audio rules to an iframe instead of // duplicating the rules in an iframe variant + if ($('iframe').length === 0) return const dom = await loadIframe(url, $.html()) const $2 = cheerio.load(dom.document.body.innerHTML) return $filter($2, $2('a'), el => audio(el.attr('href')))
fix: don't wait when there are no iframes
microlinkhq_metascraper
train
js
9b354fd9aa9c5a15ec9b23c80dad677bb6430820
diff --git a/packages/vuetify/src/components/VTextField/VTextField.js b/packages/vuetify/src/components/VTextField/VTextField.js index <HASH>..<HASH> 100644 --- a/packages/vuetify/src/components/VTextField/VTextField.js +++ b/packages/vuetify/src/components/VTextField/VTextField.js @@ -110,7 +110,7 @@ export default VInput.extend({ return this.lazyValue }, set (val) { - if (this.mask) { + if (this.mask && val !== this.lazyValue) { this.lazyValue = this.unmaskText(this.maskText(this.unmaskText(val))) this.setSelectionRange() } else {
fix(vtextfield): check input change before mask logic (#<I>) In IE <I> input elements with placeholders triggers unnecessary "input" events. It causes bugs when using mask property. This commit checks if there is an actual change in input before calling other methods implementing mask logic. Example: See Fixes #<I>, Fixes #<I>
vuetifyjs_vuetify
train
js
23d65d31f2f877c5fb8ef1ef87f7bb55086a13a1
diff --git a/cursor.js b/cursor.js index <HASH>..<HASH> 100644 --- a/cursor.js +++ b/cursor.js @@ -539,6 +539,10 @@ var nextFunction = function(self, callback) { // Topology is not connected, save the call in the provided store to be // Executed at some point when the handler deems it's reconnected if(!self.topology.isConnected(self.options) && self.disconnectHandler != null) { + if (self.topology.isDestroyed()) { + // Topology was destroyed, so don't try to wait for it to reconnect + return callback(new MongoError('Topology was destroyed')); + } return self.disconnectHandler.addObjectAndMethod('cursor', self, 'next', [callback], callback); }
fix: fire callback when topology was destroyed
mongodb_node-mongodb-native
train
js
92106d0f70664ee2ae129d962df343577ad3931d
diff --git a/packages/vaex-core/vaex/remote.py b/packages/vaex-core/vaex/remote.py index <HASH>..<HASH> 100644 --- a/packages/vaex-core/vaex/remote.py +++ b/packages/vaex-core/vaex/remote.py @@ -120,7 +120,7 @@ class ServerRest(object): self.io_loop.make_current() # if async: self.http_client_async = AsyncHTTPClient() - self.http_client = HTTPClient() + # self.http_client = HTTPClient() self.user_id = vaex.settings.webclient.get("cookie.user_id") self.use_websocket = websocket self.websocket = None @@ -135,7 +135,7 @@ class ServerRest(object): def close(self): # self.http_client_async. - self.http_client.close() + # self.http_client.close() if self.use_websocket: if self.websocket: self.websocket.close()
fix(remote): only use async websocket/http, since sync conflicts with kernel ioloop
vaexio_vaex
train
py
6c2775aad92b709958389b3144b48ca1f0d47f80
diff --git a/src/components/Header/HeaderView.js b/src/components/Header/HeaderView.js index <HASH>..<HASH> 100644 --- a/src/components/Header/HeaderView.js +++ b/src/components/Header/HeaderView.js @@ -26,8 +26,8 @@ const HeaderView = ({ href={githubLink} > On Github - </div> -</nav>); + </a> +</div>); HeaderView.propTypes = { items: PropTypes.arrayOf(PropTypes.shape({
fix: Fix syntax errors made in previous commit
finom_github-embed
train
js
ca65875063451b0688b54f826b9ff21a4c354c00
diff --git a/src/svg/graphic.js b/src/svg/graphic.js index <HASH>..<HASH> 100644 --- a/src/svg/graphic.js +++ b/src/svg/graphic.js @@ -159,7 +159,7 @@ function pathDataToString(path) { var clockwise = data[i++]; var dThetaPositive = Math.abs(dTheta); - var isCircle = isAroundZero(dThetaPositive % PI2) + var isCircle = isAroundZero(dThetaPositive - PI2) && !isAroundZero(dThetaPositive); var large = false;
fix(svg): rendering circle bug due to svg arc fix and close ecomfe/echarts#<I>
ecomfe_zrender
train
js
069d5eae2dc9e9eb0f96f1e63926968bb52a260d
diff --git a/code/model/TrackedManyManyList.php b/code/model/TrackedManyManyList.php index <HASH>..<HASH> 100644 --- a/code/model/TrackedManyManyList.php +++ b/code/model/TrackedManyManyList.php @@ -34,7 +34,7 @@ class TrackedManyManyList extends ManyManyList if (class_exists($addingToClass)) { $onItem = $addingToClass::get()->byID($addingTo); if ($onItem) { - if ($item && !$item instanceof DataObject) { + if ($item && !($item instanceof DataObject)) { $class = $this->dataClass; $item = $class::get()->byID($item); }
style(TrackedManyManyList): Add brackets around instanceof check
symbiote_silverstripe-datachange-tracker
train
php
b9663cef21e16d9e49cb5d05baccf5a96b1e831a
diff --git a/enforcer_synced.go b/enforcer_synced.go index <HASH>..<HASH> 100644 --- a/enforcer_synced.go +++ b/enforcer_synced.go @@ -92,6 +92,13 @@ func (e *SyncedEnforcer) SetWatcher(watcher persist.Watcher) error { return watcher.SetUpdateCallback(func(string) { _ = e.LoadPolicy() }) } +// LoadModel reloads the model from the model CONF file. +func (e *SyncedEnforcer) LoadModel() error { + e.m.Lock() + defer e.m.Unlock() + return e.Enforcer.LoadModel() +} + // ClearPolicy clears all policy. func (e *SyncedEnforcer) ClearPolicy() { e.m.Lock()
fix: LoadModel is not synchronized (#<I>)
casbin_casbin
train
go
d316649247aa82dccfa4a601fb61a9ae6b9d5021
diff --git a/src/Components.php b/src/Components.php index <HASH>..<HASH> 100644 --- a/src/Components.php +++ b/src/Components.php @@ -219,6 +219,13 @@ final class Components // -------------------------------------------------------------------------- + /** + * Returns an instance of the app as a component + * + * @param bool $bUseCache Whether to use the cache or not + * + * @return Component + */ public static function getApp($bUseCache = true) { // If we have already fetched this data then don't get it again
chore: Added docbloc
nails_common
train
php
03dd051b9cae2b00b101c5e6ad89c618493572fc
diff --git a/src/Model/User.php b/src/Model/User.php index <HASH>..<HASH> 100644 --- a/src/Model/User.php +++ b/src/Model/User.php @@ -9,7 +9,6 @@ use Phwoolcon\Model; * @package Phwoolcon\Model * * @property Di $_dependencyInjector - * @property Di $_dependencyInjector * @method UserProfile|false getUserProfile() * @method $this setUserProfile(UserProfile $profile) */
docs: remove duplicated ide helper property in user model
phwoolcon_phwoolcon
train
php
3fee22c15bb8dd5e5fd304ac76bd66c44b1f36fe
diff --git a/tests/gui/widget/test_history.py b/tests/gui/widget/test_history.py index <HASH>..<HASH> 100644 --- a/tests/gui/widget/test_history.py +++ b/tests/gui/widget/test_history.py @@ -181,6 +181,7 @@ def create_sm_model(with_gui=False, add_state_machine=False): # TODO introduce test_add_remove_history with_gui=True to have a more reliable unit-test def test_add_remove_history(caplog): + testing_utils.dummy_gui(None) ################## # Root_state elements
fix(test_history): Add missing call to dummy_gui in test_add_remove_hist
DLR-RM_RAFCON
train
py
72b5290182611d0900d194cb14ffc75951c64f16
diff --git a/classes/Tools/Storage/StorageTool.php b/classes/Tools/Storage/StorageTool.php index <HASH>..<HASH> 100755 --- a/classes/Tools/Storage/StorageTool.php +++ b/classes/Tools/Storage/StorageTool.php @@ -3011,7 +3011,11 @@ class StorageTool extends Tool public function handleSmushImageOptimizer( $postId, $stats ) { - $this->handleImageOptimizer( $postId ); + // wp_smush_image_optimised runs inside of a wp_update_attachment_metadata + // filter hook, so any metadata written by processImport will be overwritten. + // We'll use the standard handleUpdateAttachmentMetadata() method to handle + // the upload instead. + $this->processingOptimized = true; } public function handleImagifyImageOptimizer( $postId, $data )
fix: Media Cloud metadata is not saved when Smush is active fixes #<I>
Interfacelab_ilab-media-tools
train
php
ca0f57fb1074d2da401fbd145dfa4931a152279a
diff --git a/resources/assets/js/helpers.js b/resources/assets/js/helpers.js index <HASH>..<HASH> 100644 --- a/resources/assets/js/helpers.js +++ b/resources/assets/js/helpers.js @@ -526,7 +526,7 @@ $.extend(true, laravelValidation, { * @returns {*|string} */ allElementValues: function (validator, element) { - if (element.name.indexOf('[') !== -1 && element.name.indexOf(']') !== -1) { + if (element.name.indexOf('[]') !== -1) { return validator.findByName(element.name).map(function (i, e) { return validator.elementValue(e); }).get();
fix: min / max array rules (#<I>)
proengsoft_laravel-jsvalidation
train
js
15de6ecac0b4bbe28629c4c8cfd2dc50216b4d49
diff --git a/test/worker.py b/test/worker.py index <HASH>..<HASH> 100755 --- a/test/worker.py +++ b/test/worker.py @@ -496,9 +496,9 @@ class TestBaseSplitCloneResiliency(TestBaseSplitClone): # for each destination shard ("finding targets" state). utils.poll_for_vars( 'vtworker', worker_port, - 'WorkerState == cloning the data (offline)', + 'WorkerState == cloning the data (online)', condition_fn=lambda v: v.get('WorkerState') == 'cloning the' - ' data (offline)') + ' data (online)') logging.debug('Worker is in copy state, starting reparent now') utils.run_vtctl(
test: worker.py: Wait for online instead of the offline phase to run the reparent.
vitessio_vitess
train
py
606457488f77e9cf5cac2c82e94bb4ce35d50e2a
diff --git a/build/generateExterns.js b/build/generateExterns.js index <HASH>..<HASH> 100755 --- a/build/generateExterns.js +++ b/build/generateExterns.js @@ -846,8 +846,12 @@ function main(args) { // Get externs. const externs = sorted.map((x) => x.externs).join(''); + // Get license header. + const licenseHeader = fs.readFileSync(__dirname + '/license-header', 'utf-8'); + // Output generated externs, with an appropriate header. fs.writeFileSync(outputPath, + licenseHeader + '/**\n' + ' * @fileoverview Generated externs. DO NOT EDIT!\n' + ' * @externs\n' +
fix: Add license header to generated externs To comply with internal regulations, even our generated externs should have a license header. This prepends the header to all generated externs. Closes #<I> Change-Id: Idef8e7bff<I>aefa<I>a8f<I>e<I>fa
google_shaka-player
train
js
5c38668c5cd986740547e760b52826b267a07d5a
diff --git a/packages/testing/testing-utils/test-utils.js b/packages/testing/testing-utils/test-utils.js index <HASH>..<HASH> 100755 --- a/packages/testing/testing-utils/test-utils.js +++ b/packages/testing/testing-utils/test-utils.js @@ -168,6 +168,7 @@ function getPkgsChanged({ from = 'HEAD', base = 'master' } = {}) { 'generator-bolt', '@bolt/drupal-twig-extensions', '@bolt/uikit-workshop', + '@bolt/bolt-starter', ]; // will contain package names and keep them unique
fix: ignore Drupal Lab package.json from getting picked up by testing utils
bolt-design-system_bolt
train
js
a7083c5688e1f0da883c4d5a98a68e1c96fafdef
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 @@ -61,7 +61,7 @@ async function processBranch(branchConfig) { }). You will still receive a PR once a newer version is released, so if you wish to permanently ignore this dependency, please add it to the \`ignoreDeps\` array of your renovate config.`; } content += - '\n\nIf this PR was closed by mistake or you changed your mind, you can simply reopen or rename it to reactivate Renovate for this dependency version.'; + '\n\nIf this PR was closed by mistake or you changed your mind, you can simply rename this PR and you will soon get a fresh replacement PR opened.'; await platform.ensureComment(pr.number, subject, content); if (branchExists) { await platform.deleteBranch(config.branchName);
refactor: Recommend blocking PRs be renamed and not reopened
renovatebot_renovate
train
js
940f1acb9897eb73ad6d57959c8de895afecbba9
diff --git a/anyconfig/mergeabledict.py b/anyconfig/mergeabledict.py index <HASH>..<HASH> 100644 --- a/anyconfig/mergeabledict.py +++ b/anyconfig/mergeabledict.py @@ -8,6 +8,9 @@ .. versionadded: 0.3.1 Added naive and partial implementation of JSON Pointer support +.. versionchanged: 0.5.0 + Convert collections.namedtuple objects to dicts recursively + .. note:: JSON Pointer: http://tools.ietf.org/html/rfc6901 """
fix: add a note about collections.namedtuple conversion
ssato_python-anyconfig
train
py
8c2ed05df5be6b48f5b93cc81410a3ed7fa6dd86
diff --git a/lib/read_concern.js b/lib/read_concern.js index <HASH>..<HASH> 100644 --- a/lib/read_concern.js +++ b/lib/read_concern.js @@ -29,10 +29,16 @@ class ReadConcern { } if (options.readConcern) { + if (options.readConcern instanceof ReadConcern) { + return options.readConcern; + } + return new ReadConcern(options.readConcern.level); } - return new ReadConcern(options.level); + if (options.level) { + return new ReadConcern(options.level); + } } static get MAJORITY() {
refactor: improve robustness of `ReadConcern.fromOptions` We made some assumptions in this method about the existence of keys, as well as that no `readConcern` passed in would ever already be of the type we were looking to cast to.
mongodb_node-mongodb-native
train
js
0647ceee2f11b1817f93f6020bfcc929528eedcb
diff --git a/packages/input-select/src/Select.js b/packages/input-select/src/Select.js index <HASH>..<HASH> 100644 --- a/packages/input-select/src/Select.js +++ b/packages/input-select/src/Select.js @@ -148,7 +148,7 @@ class Select extends React.Component { ) : ( <Item label={item.label} - id={this.props.id && `${this.props.id}-item-${item.label}`} + id={this.props.id && `${this.props.id}-item-${item.value}`} image={item.image} selected={selected} />
feat(Select): Use value to compose Item id
CraveFood_farmblocks
train
js
23b9b4815677c1b4912de61c8289c7a0ec0d183e
diff --git a/scripts/deploy-gh-pages.js b/scripts/deploy-gh-pages.js index <HASH>..<HASH> 100644 --- a/scripts/deploy-gh-pages.js +++ b/scripts/deploy-gh-pages.js @@ -1,6 +1,6 @@ var path = require('path'); var ghpages = require('gh-pages'); -var basePath = path.join(__dirname, '../dist'); +var basePath = path.join(__dirname, '../docs/dist'); var repoUrl = require('../package.json').repository.url; var GH_PAGES_TOKEN = process.env.GH_PAGES_TOKEN;
docs(site): Fix GitHub Pages deployment (#<I>)
seek-oss_seek-style-guide
train
js
36097a57efb7b1339b33af4aa8ee508b395a6037
diff --git a/session.go b/session.go index <HASH>..<HASH> 100644 --- a/session.go +++ b/session.go @@ -944,7 +944,7 @@ func (q *Query) DefaultTimestamp(enable bool) *Query { // WithTimestamp will enable the with default timestamp flag on the query // like DefaultTimestamp does. But also allows to define value for timestamp. // It works the same way as USING TIMESTAMP in the query itself, but -// should not break prepared query optimization +// should not break prepared query optimization. // // Only available on protocol >= 3 func (q *Query) WithTimestamp(timestamp int64) *Query { @@ -1722,7 +1722,7 @@ func (b *Batch) DefaultTimestamp(enable bool) *Batch { // WithTimestamp will enable the with default timestamp flag on the query // like DefaultTimestamp does. But also allows to define value for timestamp. // It works the same way as USING TIMESTAMP in the query itself, but -// should not break prepared query optimization +// should not break prepared query optimization. // // Only available on protocol >= 3 func (b *Batch) WithTimestamp(timestamp int64) *Batch {
docs(session): add missing full stop (#<I>) ...for full sentence comment. This makes the comment consistent with the rest of the documentation.
gocql_gocql
train
go
f0f45a262153dffe023101bf9e284130722ac881
diff --git a/scripts/release/steps/post-publish-steps.js b/scripts/release/steps/post-publish-steps.js index <HASH>..<HASH> 100644 --- a/scripts/release/steps/post-publish-steps.js +++ b/scripts/release/steps/post-publish-steps.js @@ -14,7 +14,7 @@ const EDIT_URL = `https://github.com/${SCHEMA_REPO}/edit/master/${SCHEMA_PATH}`; // Any optional or manual step can be warned in this script. async function checkSchema() { - const schema = await execa.stdout("node scripts/generate-schema.js"); + const schema = await execa.stdout("node", ["scripts/generate-schema.js"]); const remoteSchema = await logPromise( "Checking current schema in SchemaStore", fetch(RAW_URL)
chore(scripts): fix checkSchema command
josephfrazier_prettier_d
train
js
f7743435e17f6625b7cc2da38119a0483d1eda9c
diff --git a/packages/micro-journeys/src/micro-journeys-dropdown.schema.js b/packages/micro-journeys/src/micro-journeys-dropdown.schema.js index <HASH>..<HASH> 100644 --- a/packages/micro-journeys/src/micro-journeys-dropdown.schema.js +++ b/packages/micro-journeys/src/micro-journeys-dropdown.schema.js @@ -20,7 +20,8 @@ module.exports = { }, content: { type: 'any', - description: '**All of the items in the dropdown** -- generally works by including `@bolt-components-nav/nav.twig` with `links` array of objects containing `text` & `url`', + description: + '**All of the items in the dropdown** -- generally works by including `@bolt-components-nav/nav.twig` with `links` array of objects containing `text` & `url`', }, iconBackgroundColor: { type: 'string',
style(micro-journeys): eslinting
bolt-design-system_bolt
train
js
c6d6926116bff6acbdddda098a1e97ec745e9d1c
diff --git a/src/database/migrations/2019_11_12_220840_drop_groups_table.php b/src/database/migrations/2019_11_12_220840_drop_groups_table.php index <HASH>..<HASH> 100644 --- a/src/database/migrations/2019_11_12_220840_drop_groups_table.php +++ b/src/database/migrations/2019_11_12_220840_drop_groups_table.php @@ -215,14 +215,15 @@ class DropGroupsTable extends Migration 'updated_at' => carbon(), ]); - $id = 0; - DB::table('users')->get()->each(function ($user) use (&$id) { - //$id++; - DB::table('users') - ->where('main_character_id', $user->main_character_id) - ->update([ - 'id' => ++$id, - ]); + DB::table('users') + ->whereNull('id') + ->get() + ->each(function ($user, $key) { + DB::table('users') + ->where('main_character_id', $user->main_character_id) + ->update([ + 'id' => ($key + 2), + ]); }); // switch id field from simple integer to auto-increment field
fix: ensure users table is starting with ID 2
eveseat_web
train
php
5628032034beffa1f5a8761c69cd05c4e0bd5c39
diff --git a/src/Moip.php b/src/Moip.php index <HASH>..<HASH> 100644 --- a/src/Moip.php +++ b/src/Moip.php @@ -44,7 +44,7 @@ class Moip * * @const string */ - const CLIENT_VERSION = '1.3.0'; + const CLIENT_VERSION = '1.3.1'; /** * Authentication that will be added to the header of request.
chore: bumped version to <I>
wirecardBrasil_moip-sdk-php
train
php
27f0e796afae671a29b6e361637502d82150a272
diff --git a/jobs/create-version-branch.js b/jobs/create-version-branch.js index <HASH>..<HASH> 100644 --- a/jobs/create-version-branch.js +++ b/jobs/create-version-branch.js @@ -169,7 +169,7 @@ module.exports = async function ( if (!satisfies && openPR) { const dependencyNameAndVersion = `${depName}-${latestDependencyVersion}` - if (!openPR.comments.includes(dependencyNameAndVersion)) { + if (!openPR.comments || !openPR.comments.includes(dependencyNameAndVersion)) { hasNewUpdates = true await upsert(repositories, openPR._id, { comments: [...(openPR.comments || []), dependencyNameAndVersion]
fix(create-version-branch): comments on PR docs might not exist yet
greenkeeperio_greenkeeper
train
js
f3b60a190b4c0e876448590020d65e634d6bab37
diff --git a/lib/push.js b/lib/push.js index <HASH>..<HASH> 100644 --- a/lib/push.js +++ b/lib/push.js @@ -32,7 +32,7 @@ module.exports = function push (options, docsOrIds) { }) replication.on('error', defer.reject) replication.on('change', function (change) { - if(change.docs.length > 1) { + if (change.docs.length > 1) { pushedObjects = pushedObjects.concat(change.docs) } pushedObjects.push(change.docs)
feat(push): fixed undefined object in pushedObj
hoodiehq_pouchdb-hoodie-sync
train
js
1ef865cc00d55116c4027d759a72c7c2f57a1a3b
diff --git a/src/runner.js b/src/runner.js index <HASH>..<HASH> 100644 --- a/src/runner.js +++ b/src/runner.js @@ -16,23 +16,24 @@ var regexLog = /^\[([^\]]*)\]\(([^\)]*) ([^\)]*)\):([^\n]*)/gm; function Runner () { Emitter.call(this); + this.initialize(); +} +// Extend Event.Emitter. +util.inherits(Runner, Emitter); + +Runner.prototype.initialize = function () { this.uuid = uuid(); this.folder = path.join(__dirname, './bots/files/', this.uuid); this.captures = path.join(this.folder, 'captures'); this.log = path.join(this.folder, 'log.txt'); this.cookie = path.join(this.folder, 'cookies.txt'); - this.logs = {}; - this.tasks = {}; this.children = {}; this.createFiles(); this.bindings(); -} - -// Extend Event.Emitter. -util.inherits(Runner, Emitter); +}; Runner.prototype.createFiles = function createFiles () { // Create its captures folder.
feat: add an initialize function to the runner
damonjs_damon
train
js
a81613070cebd545043cdeab97e9000ecaaae1a7
diff --git a/lib/reporters/html.js b/lib/reporters/html.js index <HASH>..<HASH> 100644 --- a/lib/reporters/html.js +++ b/lib/reporters/html.js @@ -181,7 +181,7 @@ function HTML(runner, options) { if (indexOfMessage === -1) { stackString = test.err.stack; } else { - stackString = test.err.stack.substr( + stackString = test.err.stack.slice( test.err.message.length + indexOfMessage ); }
refactor: replace deprecated 'String.prototype.substr()' (#<I>) 'substr()' is deprecated, so we replace it with 'slice()' which works similarily.
mochajs_mocha
train
js
8aa50c59f58b1d719a15c3fc29b650ff9ae11c77
diff --git a/modules/dropdown/js/dropdown_directive.js b/modules/dropdown/js/dropdown_directive.js index <HASH>..<HASH> 100644 --- a/modules/dropdown/js/dropdown_directive.js +++ b/modules/dropdown/js/dropdown_directive.js @@ -383,7 +383,7 @@ function onDocumentClick() { $timeout(function nextDigest() { LxDropdownService.close(lxDropdown.uuid, true); - }) + }, 250) } function openDropdownMenu()
fix(dropdown): add timeout for ios
lumapps_lumX
train
js
d6f5acb407ddf2d6f7afbe3e380eda5a2908dcbd
diff --git a/workflow/controller/controller_test.go b/workflow/controller/controller_test.go index <HASH>..<HASH> 100644 --- a/workflow/controller/controller_test.go +++ b/workflow/controller/controller_test.go @@ -281,9 +281,7 @@ func withAnnotation(key, val string) with { // createRunningPods creates the pods that are marked as running in a given test so that they can be accessed by the // pod assessor -// This function is called `createRunningPods`, but since it is currently not used and should not be removed it has been -// renamed to `_` until a use is found. -func _(ctx context.Context, woc *wfOperationCtx) { +func createRunningPods(ctx context.Context, woc *wfOperationCtx) { podcs := woc.controller.kubeclientset.CoreV1().Pods(woc.wf.GetNamespace()) for _, node := range woc.wf.Status.Nodes { if node.Type == wfv1.NodeTypePod && node.Phase == wfv1.NodeRunning {
fix: Fix unit test with missing createRunningPods() (#<I>)
argoproj_argo
train
go
8168c6457fb51f5d5df1119dde202956b0a5ac8e
diff --git a/src/core/Skeleton.js b/src/core/Skeleton.js index <HASH>..<HASH> 100644 --- a/src/core/Skeleton.js +++ b/src/core/Skeleton.js @@ -127,7 +127,7 @@ const Skeleton = Class.create(/** @lends Skeleton.prototype */ { */ copy(skeleton, rootNode) { this.inverseBindMatrices = skeleton.inverseBindMatrices; - this.jointNames = skeleton.jointNames; + this.jointNames = skeleton.jointNames.slice(); if (rootNode === undefined) { rootNode = skeleton.rootNode; }
fix: skeleton.clone should also clone jointNames
hiloteam_Hilo3d
train
js
50b6a5790d218f57963bc63b3c6daea01edb4f11
diff --git a/frontend/src/store/feature-tags/index.js b/frontend/src/store/feature-tags/index.js index <HASH>..<HASH> 100644 --- a/frontend/src/store/feature-tags/index.js +++ b/frontend/src/store/feature-tags/index.js @@ -16,7 +16,7 @@ const featureTags = (state = getInitState(), action) => { case TAG_FEATURE_TOGGLE: return state.push(new $MAP(action.tag)); case UNTAG_FEATURE_TOGGLE: - return state.remove(state.indexOf(t => t.id === action.value.tagId)); + return state.remove(state.indexOf(t => t.value === action.tag.value && t.type === action.tag.type)); default: return state; }
fix: Use type and value from action to remove tag (#<I>) fixes: #<I>
Unleash_unleash
train
js
cf0b219c65b02103ef3d3d78a15c7f5b364173ad
diff --git a/components.js b/components.js index <HASH>..<HASH> 100644 --- a/components.js +++ b/components.js @@ -1 +1,2 @@ -exports.EasyFormsComponent = require('./lib/easy-forms.component').EasyFormsComponent; \ No newline at end of file +exports.EasyFormsComponent = require('./lib/easy-forms.component').EasyFormsComponent; +exports.EasyFormData = require('./lib/data.interface').EasyFormData; \ No newline at end of file
fix: added EasyFormData interface to d.ts
flauc_angular2-easy-forms
train
js
542cc42538d8f75f58442f0d4b45a0dcbda5ad4b
diff --git a/framework/core/js/src/forum/compat.js b/framework/core/js/src/forum/compat.js index <HASH>..<HASH> 100644 --- a/framework/core/js/src/forum/compat.js +++ b/framework/core/js/src/forum/compat.js @@ -72,6 +72,7 @@ import DiscussionPageResolver from './resolvers/DiscussionPageResolver'; import BasicEditorDriver from '../common/utils/BasicEditorDriver'; import routes from './routes'; import ForumApplication from './ForumApplication'; +import isSafariMobile from './utils/isSafariMobile'; export default Object.assign(compat, { 'utils/PostControls': PostControls, @@ -83,6 +84,7 @@ export default Object.assign(compat, { 'utils/UserControls': UserControls, 'utils/Pane': Pane, 'utils/BasicEditorDriver': BasicEditorDriver, + 'utils/isSafariMobile': isSafariMobile, 'states/ComposerState': ComposerState, 'states/DiscussionListState': DiscussionListState, 'states/GlobalSearchState': GlobalSearchState,
feat: export `utils/isSafariMobile` (#<I>)
flarum_core
train
js
2053bde9fac91697a5270746126cf92346cc517e
diff --git a/src/generator/custom/CustomGenerator.js b/src/generator/custom/CustomGenerator.js index <HASH>..<HASH> 100644 --- a/src/generator/custom/CustomGenerator.js +++ b/src/generator/custom/CustomGenerator.js @@ -49,7 +49,7 @@ module.exports = function(PluginResolver) { // TODO: this should be in the HtmlWriterFile, but i dont want to create // one every time var ECT = require("ect"); - this.renderer = ECT({ root : this.settings.templateDir }); + this.renderer = ECT({ root : generatorSettings.templateDir }); }; // Extend from the base generator
fix(generator): Fix reference in customGenerator
hrajchert_mddoc
train
js
b883c44eda13c62ad35a2d21c591d4d3cbfd453c
diff --git a/lib/config.js b/lib/config.js index <HASH>..<HASH> 100644 --- a/lib/config.js +++ b/lib/config.js @@ -195,6 +195,10 @@ function config (opts) { }) transport.on('error', err => { + agent.logger.error('APM Server transport error:', err.stack) + }) + + transport.on('request-error', err => { const haveAccepted = Number.isFinite(err.accepted) const haveErrors = Array.isArray(err.errors) let msg
fix: log APM Server API errors correctly (#<I>) APM Server API errors are emitted by the HTTP client as 'request-error' events. In case of more serious errors, the 'error' event is still used, but indicates that the client could not recover from the error.
elastic_apm-agent-nodejs
train
js
bb681c5a024fc2e9b552eecbd4ee614cdef266f3
diff --git a/packages/resume/index.js b/packages/resume/index.js index <HASH>..<HASH> 100644 --- a/packages/resume/index.js +++ b/packages/resume/index.js @@ -1,8 +1,5 @@ require("../../babel.register.js"); -const path = require("path"); -process.env.NODE_CONFIG_DIR = path.join(__dirname, "../../config"); - const render = require("./lib/renderHtml").default; module.exports = {
chore(resume): Remove unnecessary reference to `NODE_CONFIG_DIR`. To actually kick a patch release of `cea4edfabd<I>e1c<I>ac<I>c0e<I>b6b8add<I>c7`. Should actually find a way of doing this in #<I> without having to do this. Not the first or second or third time I've had to find something to "fix" to push a release out...
randytarampi_me
train
js
de1a059c72f02814a50e00dbc353bc19a5b0a37c
diff --git a/lib/plugin.template.js b/lib/plugin.template.js index <HASH>..<HASH> 100755 --- a/lib/plugin.template.js +++ b/lib/plugin.template.js @@ -19,8 +19,9 @@ const adsbygoogle = { 'data-analytics-uacct': this.analyticsUacct ? this.analyticsUacct : null, 'data-analytics-domain-name': this.analyticsDomainName ? this.analyticsDomainName : null, 'data-adtest': <%= options.test ? '\'on\'' : 'null' %>, - 'data-adsbygoogle-status': this.show ? null : '' - }, + 'data-adsbygoogle-status': this.show ? null : '', + 'data-full-width-responsive': this.fullWidthResponsive || null, + }, domProps: { innerHTML: this.show ? '' : ' ' }, @@ -68,6 +69,10 @@ const adsbygoogle = { includeQuery: { type: Boolean, default: <%= options.includeQuery %> + }, + fullWidthResponsive: { + type: Boolean, + default: false } }, data () {
feat: Add support for full width responsive prop (#<I>)
nuxt-community_google-adsense-module
train
js
12d198bd3f9c3eb9d6aa2beaeec35e38b5d8d56d
diff --git a/src/invariant.js b/src/invariant.js index <HASH>..<HASH> 100644 --- a/src/invariant.js +++ b/src/invariant.js @@ -5,22 +5,17 @@ * @param {boolean} condition * @param {string} message */ -const NODE_ENV = process.env.NODE_ENV -let invariant = function() {} - -if (NODE_ENV !== 'production') { - invariant = function(condition, message) { - if (message === undefined) { - throw new Error('invariant requires an error message argument') - } +function invariant(condition, message) { + if (message === undefined) { + throw new Error('invariant requires an error message argument') + } - let error + let error - if (!condition) { - error = new Error(message) - error.name = 'Invariant Violation' - throw error - } + if (!condition) { + error = new Error(message) + error.name = 'Invariant Violation' + throw error } }
refactor: remove node env branch
chikara-chan_invincible
train
js
8b27e0d771838449148cd901e5f1e1c5dd15f9de
diff --git a/source/rafcon/utils/installation.py b/source/rafcon/utils/installation.py index <HASH>..<HASH> 100644 --- a/source/rafcon/utils/installation.py +++ b/source/rafcon/utils/installation.py @@ -78,7 +78,7 @@ def install_fonts(restart=False): if font_installed: logger.info("Running font detection ...") if not update_font_cache(user_otf_fonts_folder): - logger.warn("Could not run font detection. RAFCON might not find the correct fonts.") + logger.warn("Could not run font detection using 'fc-cache'. RAFCON might not find the correct fonts.") if restart: python = sys.executable environ = dict(**os.environ)
docs(installation): update log output when trying to find fonts
DLR-RM_RAFCON
train
py
5bb67e0065a47015399478395404524174ca4d49
diff --git a/anyconfig/mergeabledict.py b/anyconfig/mergeabledict.py index <HASH>..<HASH> 100644 --- a/anyconfig/mergeabledict.py +++ b/anyconfig/mergeabledict.py @@ -538,6 +538,9 @@ def create_from(obj=None, ac_ordered=False, if ac_merge not in MERGE_STRATEGIES: raise ValueError("Wrong merge strategy: %r" % ac_merge) + if getattr(options, "ac_namedtuple", False): + ac_ordered = True # To keep the order of items. + cls = _get_mdict_class(ac_merge=ac_merge, ac_ordered=ac_ordered) if obj is None: return cls()
fix: keep order of items if ac_namedtuple in .mergeabledict.create_from
ssato_python-anyconfig
train
py
af6a294bde2ba519c9f51e1cd334144bd7a559c0
diff --git a/packages/xod-fs/src/unpack.js b/packages/xod-fs/src/unpack.js index <HASH>..<HASH> 100644 --- a/packages/xod-fs/src/unpack.js +++ b/packages/xod-fs/src/unpack.js @@ -4,19 +4,13 @@ import * as XP from 'xod-project'; import { IMPL_FILENAMES } from './loadLibs'; -// "-- Awesome name --" -> "awesome-name" -export const fsSafeName = R.compose( - R.replace(/-$/g, ''), - R.replace(/^-/g, ''), - R.replace(/(-)\1+/g, '-'), - R.replace(/[^a-z0-9]/gi, '-'), - R.toLower -); +export const fsSafeName = XP.toIdentifier; const getLibNames = R.compose( - R.reject(R.equals('xod/built-in')), // TODO: hardcoded magic name R.uniq, - R.map(R.pipe(XP.getPatchPath, XP.getLibraryName)), + R.map(XP.getLibraryName), + R.reject(XP.isPathBuiltIn), + R.map(XP.getPatchPath), XP.listLibraryPatches );
refactor(xod-fs): reuse some functions from xod-project
xodio_xod
train
js
198cf3691b1eef78fcca610c7a43863428744f46
diff --git a/tests/parser/features/test_gas.py b/tests/parser/features/test_gas.py index <HASH>..<HASH> 100644 --- a/tests/parser/features/test_gas.py +++ b/tests/parser/features/test_gas.py @@ -1,7 +1,3 @@ -from vyper.parser import parser_utils -from vyper.parser.parser import parse_to_lll - - def test_gas_call(get_contract_with_gas_estimation): gas_call = """ @external @@ -13,19 +9,3 @@ def foo() -> uint256: assert c.foo(call={"gas": 50000}) < 50000 assert c.foo(call={"gas": 50000}) > 25000 - - print("Passed gas test") - - -def test_gas_estimate_repr(): - code = """ -x: int128 - -@external -def __init__(): - self.x = 1 - """ - parser_utils.LLLnode.repr_show_gas = True - out = parse_to_lll(code) - assert "35261" in str(out)[:28] - parser_utils.LLLnode.repr_show_gas = False
test: remove test that brings me no joy
ethereum_vyper
train
py
6a2d8b1a1b511ce0b826686fe01e79fc8d2dc986
diff --git a/system/Commands/Utilities/Routes/ControllerMethodReader.php b/system/Commands/Utilities/Routes/ControllerMethodReader.php index <HASH>..<HASH> 100644 --- a/system/Commands/Utilities/Routes/ControllerMethodReader.php +++ b/system/Commands/Utilities/Routes/ControllerMethodReader.php @@ -156,7 +156,7 @@ final class ControllerMethodReader if ($classShortname === $defaultController) { $pattern = '#' . preg_quote(lcfirst($defaultController), '#') . '\z#'; - $routeWithoutController = preg_replace($pattern, '', $uriByClass); + $routeWithoutController = rtrim(preg_replace($pattern, '', $uriByClass), '/'); $routeWithoutController = $routeWithoutController ?: '/'; $output[] = [
fix: remove / after sub-directory
codeigniter4_CodeIgniter4
train
php
0ed367762c03adfcdd555513a3e7ba78a803eb16
diff --git a/lib/ditty/controllers/main.rb b/lib/ditty/controllers/main.rb index <HASH>..<HASH> 100644 --- a/lib/ditty/controllers/main.rb +++ b/lib/ditty/controllers/main.rb @@ -133,8 +133,8 @@ module Ditty broadcast(:user_logout, target: self, details: "IP: #{request.ip}") logout flash[:info] = 'Logged Out' - - redirect "#{settings.map_path}/" + halt 200 if request.xhr? + redirect("#{settings.map_path}/") end post '/auth/identity/callback' do @@ -143,6 +143,7 @@ module Ditty user = User.find(email: env['omniauth.auth']['info']['email']) self.current_user = user broadcast(:user_login, target: self, details: "IP: #{request.ip}") + halt 200 if request.xhr? flash[:success] = 'Logged In' redirect redirect_path else @@ -165,6 +166,7 @@ module Ditty end self.current_user = user broadcast(:user_login, target: self, details: "IP: #{request.ip}") + halt 200 if request.xhr? flash[:success] = 'Logged In' redirect redirect_path else
chore: Return <I>s on successful XHR logins
EagerELK_ditty
train
rb
2b65338b01caa68629429411be568c250068c97f
diff --git a/lib/create-runner.js b/lib/create-runner.js index <HASH>..<HASH> 100644 --- a/lib/create-runner.js +++ b/lib/create-runner.js @@ -104,8 +104,8 @@ export default function createRunner(options = {}, configFunc) { const atomHome = temp.mkdirSync({ prefix: "atom-test-home-" }); if (options.testPackages.length > 0) { let { testPackages } = options; - if (typeof options.testPackages === "string") { - testPackages = options.testPackage.split(/\s+/); + if (typeof testPackages === "string") { + testPackages = testPackages.split(/\s+/); } // eslint-disable-next-line no-sync fs.makeTreeSync(path.join(atomHome, "packages"));
fix(testPackages): Fix `testPackages` as string
UziTech_atom-jasmine3-test-runner
train
js
e87328204484a75bb9c451533d487a52e36daa9d
diff --git a/vyper/ast/nodes.py b/vyper/ast/nodes.py index <HASH>..<HASH> 100644 --- a/vyper/ast/nodes.py +++ b/vyper/ast/nodes.py @@ -802,10 +802,7 @@ class NameConstant(Constant): class Name(VyperNode): - __slots__ = ( - "id", - "_type", - ) + __slots__ = ("id",) class Expr(VyperNode): diff --git a/vyper/parser/stmt.py b/vyper/parser/stmt.py index <HASH>..<HASH> 100644 --- a/vyper/parser/stmt.py +++ b/vyper/parser/stmt.py @@ -234,7 +234,9 @@ class Stmt: # attempt to use the type specified by type checking, fall back to `int128` # this is a stopgap solution to allow uint256 - it will be properly solved # once we refactor `vyper.parser` - iter_typ = self.stmt.target.get("_type") or "int128" + iter_typ = "int128" + if "type" in self.stmt.target._metadata: + iter_typ = self.stmt.target._metadata["type"]._id # Get arg0 arg0 = self.stmt.iter.args[0]
refactor: use metadata for iterator type
ethereum_vyper
train
py,py
71ea6cff9939a1d113d83d5ae3ed4751635e2fff
diff --git a/packages/cozy-jobs-cli/src/manifest.js b/packages/cozy-jobs-cli/src/manifest.js index <HASH>..<HASH> 100644 --- a/packages/cozy-jobs-cli/src/manifest.js +++ b/packages/cozy-jobs-cli/src/manifest.js @@ -21,5 +21,13 @@ module.exports = { } function getManifest (manifestPath) { - return JSON.parse(fs.readFileSync(manifestPath)) + let manifest + try { + manifest = JSON.parse(fs.readFileSync(manifestPath)) + } catch (err) { + log('error', `Error while parsing ${manifestPath}`) + log('error', err.message) + process.exit() + } + return manifest }
fix: handle manifest parsing errors
konnectors_libs
train
js
dabf6a9928478560d9b2bdda7e83faaf9ba31a0e
diff --git a/src/geshi/powershell.php b/src/geshi/powershell.php index <HASH>..<HASH> 100644 --- a/src/geshi/powershell.php +++ b/src/geshi/powershell.php @@ -47,7 +47,7 @@ ************************************************************************************/ $language_data = array ( - 'LANG_NAME' => 'posh', + 'LANG_NAME' => 'PowerShell', 'COMMENT_SINGLE' => array(1 => '#'), 'COMMENT_MULTI' => array(), 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
fix: Internally renameed language powershell from 'posh' to 'PowerShell'
GeSHi_geshi-1.0
train
php
e1f65a063a2e2a7f3f9552f12fe8b2136c466184
diff --git a/tests/check-rules.js b/tests/check-rules.js index <HASH>..<HASH> 100644 --- a/tests/check-rules.js +++ b/tests/check-rules.js @@ -16,4 +16,15 @@ describe('smoke tests', () => { const files = new Set(fs.readdirSync('./lib/configs').map(f => path.basename(f, path.extname(f)))) assert.deepEqual(files, exportedConfigs) }) + + it('exports valid rules in each config', () => { + const exportedRules = new Set(Object.keys(config.rules)) + for (const flavour in config.configs) { + for (const rule in config.configs[flavour].rules) { + if (rule.startsWith('github/')) { + assert(exportedRules.has(rule.replace(/^github\//, '')), `rule ${rule} is not a valid rule`) + } + } + } + }) })
test: add smoke test ensuring every config rule is one that is exported
github_eslint-plugin-github
train
js
476e16ff2d22a5da3ab8b57a6c7789610b008e22
diff --git a/src/dialog/index.js b/src/dialog/index.js index <HASH>..<HASH> 100644 --- a/src/dialog/index.js +++ b/src/dialog/index.js @@ -96,7 +96,7 @@ Dialog.confirm = (options) => Dialog.close = () => { if (instance) { - instance.value = false; + instance.toggle(false); } };
fix(Dialog): Dialog.close not work
youzan_vant
train
js
56cc58d05ac39f06d214329ed4565e7f9313fddd
diff --git a/src/google-maps.js b/src/google-maps.js index <HASH>..<HASH> 100644 --- a/src/google-maps.js +++ b/src/google-maps.js @@ -39,13 +39,20 @@ export class GoogleMaps { }); this._scriptPromise.then(() => { + let latLng = new google.maps.LatLng(parseFloat(this.latitude), parseFloat(this.longitude)); + let options = { - center: {lat: this.latitude, lng: this.longitude}, + center: latLng, zoom: parseInt(this.zoom, 10), disableDefaultUI: this.disableDefaultUI } this.map = new google.maps.Map(this.element, options); + + this.createMarker({ + map: this.map, + position: latLng + }); }); }
feat(maps): when coordinates are supplied, convert them to a well-formed object and then create a marker
Vheissu_aurelia-google-maps
train
js
a9c9f5fa363fc29f019821a260f9704ce2ed50b1
diff --git a/packages/upgrade/src/migrations/carbon-icons-react/10.3.0/update-icon-import-path.js b/packages/upgrade/src/migrations/carbon-icons-react/10.3.0/update-icon-import-path.js index <HASH>..<HASH> 100644 --- a/packages/upgrade/src/migrations/carbon-icons-react/10.3.0/update-icon-import-path.js +++ b/packages/upgrade/src/migrations/carbon-icons-react/10.3.0/update-icon-import-path.js @@ -51,6 +51,17 @@ module.exports = (file, api) => { // then capture all the icon-specific data. Depending on the length of // this data, we assign name, size, and prefix values. const { node } = path; + + // Ignore imports if they already directly reference the package or one of + // its entrypoints that support tree-shaking + if ( + node.source.value === '@carbon/icons-react' || + node.source.value === '@carbon/icons-react/es' || + node.source.value === '@carbon/icons-react/lib' + ) { + return; + } + const [ _scope, _packageName,
fix(upgrade): ignore files that have correct import path (#<I>)
carbon-design-system_carbon-components
train
js
a4780cd5d47140ef8ca66b03dd44597c3594c6b8
diff --git a/config.js b/config.js index <HASH>..<HASH> 100644 --- a/config.js +++ b/config.js @@ -67,7 +67,7 @@ config = Object.assign({}, config, { compiler_hash_type: __PROD__ ? 'chunkhash' : 'hash', compiler_fail_on_warning: __TEST__ || __PROD__, compiler_output_path: paths.base(config.dir_docs_dist), - compiler_public_path: __PROD__ ? '//cdn.rawgit.com/Semantic-Org/Semantic-UI-React/gh-pages/' : '/', + compiler_public_path: __PROD__ ? '//raw.github.com/Semantic-Org/Semantic-UI-React/gh-pages/' : '/', compiler_stats: { hash: false, // the hash of the compilation version: false, // webpack version info
chore(webpack): switch rawgit to github (#<I>)
Semantic-Org_Semantic-UI-React
train
js
591d59595600b2cc88ac92dd55ca09597565be53
diff --git a/src/Common/BaseRepository.php b/src/Common/BaseRepository.php index <HASH>..<HASH> 100755 --- a/src/Common/BaseRepository.php +++ b/src/Common/BaseRepository.php @@ -60,7 +60,7 @@ abstract class BaseRepository extends \Prettus\Repository\Eloquent\BaseRepositor $model->$key()->sync(array_values($new_values)); break; case 'Illuminate\Database\Eloquent\Relations\BelongsTo': - $model_key = $model->$key()->getQualifiedForeignKey(); + $model_key = $model->$key()->getQualifiedForeignKeyName(); $new_value = array_get($attributes, $key, null); $new_value = $new_value == '' ? null : $new_value; $model->$model_key = $new_value;
fix(relationships): getQualifiedForeignKey -> getQualifiedForeignKeyName (#<I>) In Laravel <I> the getForeignKey and getQualifiedForeignKey methods of the BelongsTo relationship have been renamed to getForeignKeyName and getQualifiedForeignKeyName respectively.
InfyOmLabs_laravel-generator
train
php
8a3bc76f93ec7f9807aa69e871fdffe7c66f982b
diff --git a/engine/src/main/java/org/camunda/bpm/engine/task/IdentityLink.java b/engine/src/main/java/org/camunda/bpm/engine/task/IdentityLink.java index <HASH>..<HASH> 100644 --- a/engine/src/main/java/org/camunda/bpm/engine/task/IdentityLink.java +++ b/engine/src/main/java/org/camunda/bpm/engine/task/IdentityLink.java @@ -61,7 +61,10 @@ public interface IdentityLink { public String getProcessDefId(); /** - * Get the tenand id + * The id of the tenant associated with this identity link. + * + * @since 7.5 + * */ public String getTenantId();
fix(engine): Added version number to tenantId in IdentityLink related to #CAM-<I>
camunda_camunda-bpm-platform
train
java
eb56c5b63eed75804f9610bf95cffe4e49ca0b91
diff --git a/packages/okam-build/example/base/scripts/swan.config.js b/packages/okam-build/example/base/scripts/swan.config.js index <HASH>..<HASH> 100644 --- a/packages/okam-build/example/base/scripts/swan.config.js +++ b/packages/okam-build/example/base/scripts/swan.config.js @@ -7,7 +7,7 @@ const merge = require('../../../').merge; module.exports = merge({}, require('./base.config'), { - polyfill: ['async'], + localPolyfill: ['async'], wx2swan: true, framework: ['filter'], processors: { diff --git a/packages/okam-cli/templates/base/scripts/swan.config.js b/packages/okam-cli/templates/base/scripts/swan.config.js index <HASH>..<HASH> 100644 --- a/packages/okam-cli/templates/base/scripts/swan.config.js +++ b/packages/okam-cli/templates/base/scripts/swan.config.js @@ -9,7 +9,7 @@ const merge = require('okam-build').merge; module.exports = merge({}, require('./base.config'), { <% if: ${async} %> - polyfill: ['async'], + localPolyfill: ['async'], <% /if %> // wx2swan: true, rules: []
fix(okam-cli): change swan.config.js polyfill to localPoly due to smarty app breackchange
ecomfe_okam
train
js,js
576b869fdad14549847adc15c3c4c2d27e6cf0ad
diff --git a/src/app-router.js b/src/app-router.js index <HASH>..<HASH> 100644 --- a/src/app-router.js +++ b/src/app-router.js @@ -75,7 +75,12 @@ export class AppRouter extends Router { super.registerViewPort(viewPort, name); if (!this.isActive) { - this.activate(); + if('configureRouter' in this.container.viewModel){ + var result = this.container.viewModel.configureRouter() || Promise.resolve(); + return result.then(() => this.activate()); + }else{ + this.activate(); + } } else { this.dequeueInstruction(); }
fix(router): enable async configureRouter for app-level router
aurelia_router
train
js
d6597faba2898c2469ea175e16f0175b8bf00b6f
diff --git a/packages/cli-plugin-deploy-components/execute/Status.js b/packages/cli-plugin-deploy-components/execute/Status.js index <HASH>..<HASH> 100644 --- a/packages/cli-plugin-deploy-components/execute/Status.js +++ b/packages/cli-plugin-deploy-components/execute/Status.js @@ -20,6 +20,10 @@ class Status { } start() { + if (process.env.CI) { + return; + } + // Hide cursor always, to keep it clean process.stdout.write(ansiEscapes.cursorHide); this.status.running = true; @@ -65,6 +69,10 @@ class Status { } async render(status) { + if (process.env.CI) { + return; + } + // Start Status engine, if it isn't running yet if (!this.isRunning()) { this.start();
fix(cli-plugin-deploy-components): disable status messages in CI
Webiny_webiny-js
train
js
ad72ef35707529058c7c680f334c285746b2f690
diff --git a/gitlab/base.py b/gitlab/base.py index <HASH>..<HASH> 100644 --- a/gitlab/base.py +++ b/gitlab/base.py @@ -16,6 +16,7 @@ # along with this program. If not, see <http://www.gnu.org/licenses/>. import importlib +from types import ModuleType from typing import Any, Dict, Optional, Type from .client import Gitlab, GitlabList @@ -38,7 +39,12 @@ class RESTObject(object): without ID in the url. """ - _id_attr = "id" + _id_attr: Optional[str] = "id" + _attrs: Dict[str, Any] + _module: ModuleType + _parent_attrs: Dict[str, Any] + _updated_attrs: Dict[str, Any] + manager: "RESTManager" def __init__(self, manager: "RESTManager", attrs: Dict[str, Any]) -> None: self.__dict__.update(
chore: add additional type-hints for gitlab/base.py Add type-hints for the variables which are set via self.__dict__ mypy doesn't see them when they are assigned via self.__dict__. So declare them in the class definition.
python-gitlab_python-gitlab
train
py
215631d870f5fdc81b3a87ac2ef4bc9e51709a42
diff --git a/index.js b/index.js index <HASH>..<HASH> 100644 --- a/index.js +++ b/index.js @@ -76,6 +76,7 @@ function attachVirtuals(schema, res) { function attachVirtualsToDoc(schema, doc, virtuals) { const numVirtuals = virtuals.length; + if (doc == null) return; if (Array.isArray(doc)) { for (let i = 0; i < doc.length; ++i) { attachVirtualsToDoc(schema, doc[i], virtuals);
fix: avoid undefined doc from being virtualized
vkarpov15_mongoose-lean-virtuals
train
js
dab80e34b1e9010a45c9e11a22367fbba5651234
diff --git a/lib/rules/click-events-have-key-events.js b/lib/rules/click-events-have-key-events.js index <HASH>..<HASH> 100644 --- a/lib/rules/click-events-have-key-events.js +++ b/lib/rules/click-events-have-key-events.js @@ -18,7 +18,7 @@ module.exports = { }, create (context) { return VueUtils.defineTemplateBodyVisitor(context, { - "VAttribute[directive=true][key.name='on'][key.argument='click']" (node) { + "VAttribute[directive=true][key.name.name='on'][key.argument.name='click']" (node) { const requiredEvents = ['keydown', 'keyup', 'keypress']; const element = node.parent.parent; if (VueUtils.isCustomComponent(element)) { @@ -42,4 +42,4 @@ module.exports = { } }, JsxRule.create(context)) } -} \ No newline at end of file +}
fix: patch click-events-have-key-events rule
maranran_eslint-plugin-vue-a11y
train
js
77957d9e2cd1aeab30ac8b03de515748074983b4
diff --git a/scripts/release/releaseNotesTemplate.js b/scripts/release/releaseNotesTemplate.js index <HASH>..<HASH> 100644 --- a/scripts/release/releaseNotesTemplate.js +++ b/scripts/release/releaseNotesTemplate.js @@ -54,10 +54,36 @@ ${feat.map(Package).join('\n')} ` } +function writeDocs(docs) { + if (!docs.length) { + return '' + } + + return ` +## documentation +${docs.map(Package).join('\n')} +--- +` +} + +function writeChore(chore) { + if (!chore.length) { + return '' + } + + return ` +## ${chore.length} ${chore.length === 1 ? 'chore' : 'chores'} +${chore.map(Package).join('\n')} +--- +` +} + export default release => { - return `${writeBreaks(release.breaks)} -${writeFixes(release.fix)} -${writeFeat(release.feat)} + return `${writeBreaks(release.summary.breaks)} +${writeFixes(release.summary.fix)} +${writeFeat(release.summary.feat)} +${writeDocs(release.summary.docs)} +${writeChore(release.summary.chore)} With :heart: from the Cerebral Team! `
chore(release): update release template to show docs and chore
cerebral_cerebral
train
js
6caa9076d989cb0ff173c53ac08fce9028d7d984
diff --git a/test/func/add.spec.js b/test/func/add.spec.js index <HASH>..<HASH> 100644 --- a/test/func/add.spec.js +++ b/test/func/add.spec.js @@ -56,7 +56,7 @@ describe('Functional: add()', function () { const seven = add(archive, source) seven.on('end', function () { const size = statSync(archive).size - expect(size).to.greaterThan(398) + expect(size).to.greaterThan(350) expect(existsSync(archive)).to.equal(true) done() })
test: Lower min size threshold cause 7-Zip is better on Windows
quentinrossetti_node-7z
train
js
94920203582be308d8586ceca2d46a37efa29006
diff --git a/src/cartesian/Area.js b/src/cartesian/Area.js index <HASH>..<HASH> 100644 --- a/src/cartesian/Area.js +++ b/src/cartesian/Area.js @@ -50,7 +50,6 @@ class Area extends Component { PropTypes.func, PropTypes.element, PropTypes.object, PropTypes.bool, ]), hide: PropTypes.bool, - // have curve configuration layout: PropTypes.oneOf(['horizontal', 'vertical']), baseLine: PropTypes.oneOfType([ diff --git a/src/chart/LineChart.js b/src/chart/LineChart.js index <HASH>..<HASH> 100644 --- a/src/chart/LineChart.js +++ b/src/chart/LineChart.js @@ -5,4 +5,3 @@ import generateCategoricalChart from './generateCategoricalChart'; import Line from '../cartesian/Line'; export default generateCategoricalChart('LineChart', Line); -
feat: add props `hide` for each graphic Component
recharts_recharts
train
js,js