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
b8ed88022f3137201a3295ea5d6bdc7934b6feca
diff --git a/src/components/radioButton/demoMultiColumn/script.js b/src/components/radioButton/demoMultiColumn/script.js index <HASH>..<HASH> 100644 --- a/src/components/radioButton/demoMultiColumn/script.js +++ b/src/components/radioButton/demoMultiColumn/script.js @@ -5,13 +5,13 @@ angular self.contacts = [{ 'id': 1, - 'fullName': 'Maria Guadalupe', + 'fullName': 'María Guadalupe', 'lastName': 'Guadalupe', 'title': "CEO, Found" }, { 'id': 2, - 'fullName': 'Gabriel García Marquéz', - 'lastName': 'Marquéz', + 'fullName': 'Gabriel García Márquez', + 'lastName': 'Márquez', 'title': "VP Sales & Marketing" }, { 'id': 3,
docs(radiobutton): correct two misspellings on demo (#<I>)
angular_material
train
js
9344e63a47a1553f0353e7b63c7d5056da8c6105
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -12,7 +12,7 @@ def read(fname): setup( name="qds_sdk", - version="1.9.0", + version="unreleased", author="Qubole", author_email="dev@qubole.com", description=("Python SDK for coding to the Qubole Data Service API"),
fix: usr: setup.py should indicate unreleased branch as version==unreleased when using qds-sdk as a dependency - pip and setuptools look at the version in setup() to find the stable version. if this does not match with the one specified by install_requires then pip/setuptools fail and install the stable version instead
qubole_qds-sdk-py
train
py
42525ffbdcb21d4ea47ad3a9b1457bf9ab47ff60
diff --git a/components/menu/__tests__/index.test.js b/components/menu/__tests__/index.test.js index <HASH>..<HASH> 100644 --- a/components/menu/__tests__/index.test.js +++ b/components/menu/__tests__/index.test.js @@ -940,14 +940,16 @@ describe('Menu', () => { it('should support ref', async () => { const ref = React.createRef(); - const wrapper = mount( + const { container } = render( <Menu ref={ref}> <SubMenu key="sub1" title="Navigation One"> <Menu.Item key="1">Option 1</Menu.Item> </SubMenu> </Menu>, ); - expect(ref.current?.menu?.list).toBe(wrapper.find('ul').first().getDOMNode()); + expect(ref.current?.menu?.list).toBe(container.querySelector('ul')); + ref.current?.focus(); + expect(document.activeElement).toBe(container.querySelector('ul')); }); it('expandIcon', () => {
test: add menu focus test (#<I>)
ant-design_ant-design
train
js
831cf10ea0cf55ae6e8104fe528737441bb1bdc1
diff --git a/intranet/utils/helpers.py b/intranet/utils/helpers.py index <HASH>..<HASH> 100644 --- a/intranet/utils/helpers.py +++ b/intranet/utils/helpers.py @@ -66,7 +66,7 @@ def get_current_commit_long_hash(workdir): def get_current_commit_info(): - cmd = ["git", "show", "-s", "--format=Commit %h\n%ad", "HEAD"] + cmd = ["git", "show", "-s", "--format='Commit %h\n%ad'", "HEAD"] return subprocess.check_output(cmd, universal_newlines=True).strip()
fix(utils): fix current commit info invocation
tjcsl_ion
train
py
4c1bc7e1776f65b8023dead49a18bb4bbe949c5c
diff --git a/src/connection.js b/src/connection.js index <HASH>..<HASH> 100644 --- a/src/connection.js +++ b/src/connection.js @@ -27,11 +27,8 @@ class Connection { */ async setClient (skipListeners) { let sioConfig = this.auth.access_token ? { - query: 'bearer=' + this.auth.access_token, - reconnection: false - } : { - reconnection: false - } + query: 'bearer=' + this.auth.access_token + } : {} // Connect to parent namespace this.client = io.connect(this.options.api_url + this.options.namespace, sioConfig)
fix: Keep original reconnect behaviour alive, so long-term disconnects won't cause issues.
cubic-js_cubic
train
js
df8457b9df803583df810aaa8707f9c46f9a3a18
diff --git a/test/python_client_test.py b/test/python_client_test.py index <HASH>..<HASH> 100755 --- a/test/python_client_test.py +++ b/test/python_client_test.py @@ -29,6 +29,8 @@ def setUpModule(): global vtgateclienttest_port global vtgateclienttest_grpc_port + environment.topo_server().setup() + vtgateclienttest_port = environment.reserve_ports(1) args = environment.binary_args('vtgateclienttest') + [ '-log_dir', environment.vtlogroot, @@ -49,6 +51,8 @@ def tearDownModule(): utils.kill_sub_process(vtgateclienttest_process, soft=True) vtgateclienttest_process.wait() + environment.topo_server().teardown() + class TestPythonClient(unittest.TestCase): CONNECT_TIMEOUT = 10.0
test: Re-adding topo server setup. I accidentally removed it here: <URL>
vitessio_vitess
train
py
76f875bfea94aec46148a6100622c2cc45df68f4
diff --git a/src/index.js b/src/index.js index <HASH>..<HASH> 100644 --- a/src/index.js +++ b/src/index.js @@ -9,6 +9,7 @@ export {OrmMetadata} from './orm-metadata'; export {EntityManager} from './entity-manager'; export {association} from './decorator/association'; export {resource} from './decorator/resource'; +export {name} from './decorator/name'; export {repository} from './decorator/repository'; export {validation} from './decorator/validation'; export {validatedResource} from './decorator/validated-resource';
chore(project): Expose @name decorator
SpoonX_aurelia-orm
train
js
2ebc4a2b88fffebbfff3ab8a73b36976c5bcc32e
diff --git a/src/router-directive.es5.js b/src/router-directive.es5.js index <HASH>..<HASH> 100644 --- a/src/router-directive.es5.js +++ b/src/router-directive.es5.js @@ -1,9 +1,6 @@ 'use strict'; -/** - * @name ngFuturisticRouter - * - * @description +/* * A module for adding new a routing system Angular 1. */ angular.module('ngFuturisticRouter', ['ngFuturisticRouter.generated']).
docs(router): remove jsdoc for module For now, the docs will explain the module at the root level
angular_router
train
js
a5352e41c195ea34b3b5856403ef68370db58438
diff --git a/website/src/components/charts/sankey/Sankey.js b/website/src/components/charts/sankey/Sankey.js index <HASH>..<HASH> 100644 --- a/website/src/components/charts/sankey/Sankey.js +++ b/website/src/components/charts/sankey/Sankey.js @@ -28,7 +28,7 @@ const initialSettings = { left: 50, }, - layout: 'vertical', + layout: 'horizontal', align: 'justify', sort: 'auto', colors: 'category10',
feat(website): change sankey default layout
plouc_nivo
train
js
94c8196a7fbb33a6aeedebebcd97d3ea30d60127
diff --git a/src/position.js b/src/position.js index <HASH>..<HASH> 100644 --- a/src/position.js +++ b/src/position.js @@ -75,9 +75,10 @@ var Position = Class(null, /** @lends Position.prototype */ { * Position parent nodes of the NOI */ _positionParents: function() { + const top = this.noi.parentStack.length - 1; this.noi.parentStack.forEach((node, index) => { node.x = this.noi.x; - node.y = index; + node.y = top - index; }); },
fix: positioning of parent nodes Before this fix parent nodes were positioned in reverse order, i.e. the NOI's parent was the top most node, under them was his parent and so on.
valerii-zinchenko_inheritance-diagram
train
js
1c187a5f78cc658550248ac4a832c90be73a904f
diff --git a/lib/events-ha-node.js b/lib/events-ha-node.js index <HASH>..<HASH> 100644 --- a/lib/events-ha-node.js +++ b/lib/events-ha-node.js @@ -230,6 +230,8 @@ class EventsHaNode extends EventsNode { triggerNode() {} updateHomeAssistant() { + if (!this.isIntegrationLoaded) return; + const message = { type: 'nodered/entity', server_id: this.nodeConfig.server.id,
fix(trigger-state): Only update HA when integration is loaded Fixes: #<I>
zachowj_node-red-contrib-home-assistant-websocket
train
js
5ff754756f48bde24e8a8a727a0f4aa21d562386
diff --git a/src/Models/Corporation/CorporationMemberTracking.php b/src/Models/Corporation/CorporationMemberTracking.php index <HASH>..<HASH> 100644 --- a/src/Models/Corporation/CorporationMemberTracking.php +++ b/src/Models/Corporation/CorporationMemberTracking.php @@ -23,12 +23,12 @@ namespace Seat\Eveapi\Models\Corporation; use Illuminate\Database\Eloquent\Model; +use Seat\Eveapi\Models\RefreshToken; use Seat\Eveapi\Models\Sde\InvType; use Seat\Eveapi\Models\Sde\MapDenormalize; use Seat\Eveapi\Models\Sde\StaStation; use Seat\Eveapi\Models\Universe\UniverseName; use Seat\Eveapi\Models\Universe\UniverseStructure; -use Seat\Web\Models\User; /** * Class CorporationMemberTracking. @@ -196,10 +196,10 @@ class CorporationMemberTracking extends Model * @return \Illuminate\Database\Eloquent\Relations\BelongsTo * @deprecated */ - public function user() + public function refresh_token() { - return $this->belongsTo(User::class, 'character_id', 'id'); + return $this->belongsTo(RefreshToken::class, 'character_id', 'character_id'); } /**
fix(relations): Update relation for CorporationMemberTracking model from User to RefreshToken
eveseat_eveapi
train
php
9c43d7416260d05d1a5f8039dc2c87c57d68cb94
diff --git a/lib/workers/pr/index.js b/lib/workers/pr/index.js index <HASH>..<HASH> 100644 --- a/lib/workers/pr/index.js +++ b/lib/workers/pr/index.js @@ -129,8 +129,7 @@ async function ensurePr(prConfig) { let prBody; async function trimPrBody() { let prBodyMarkdown = handlebars.compile(config.prBody)(config); - const atUserRe = /[^`]@([a-z]+\/[a-z]+)/g; - prBodyMarkdown = prBodyMarkdown.replace(atUserRe, '@&#8203;$1'); + prBodyMarkdown = prBodyMarkdown.replace('@', '@&#8203;'); prBody = converter.makeHtml(prBodyMarkdown); // Public GitHub repos need links prevented - see #489 prBody = prBody.replace(issueRe, '$1#&#8203;$2$3');
fix: escape every @ in pr body with zero width space (#<I>)
renovatebot_renovate
train
js
e7dfb91055a758e68aaea8a6da63ba6699e9f08d
diff --git a/datastore.go b/datastore.go index <HASH>..<HASH> 100644 --- a/datastore.go +++ b/datastore.go @@ -73,6 +73,7 @@ func (d *datastore) QueryNew(q dsq.Query) (dsq.Results, error) { return d.QueryOrig(q) } + prefix := []byte(q.Prefix) opt := badger.DefaultIteratorOptions opt.FetchValues = !q.KeysOnly it := d.DB.NewIterator(opt) @@ -82,7 +83,7 @@ func (d *datastore) QueryNew(q dsq.Query) (dsq.Results, error) { return dsq.ResultsFromIterator(q, dsq.Iterator{ Next: func() (dsq.Result, bool) { - if !it.ValidForPrefix(q.Prefix) { + if !it.ValidForPrefix(prefix) { return dsq.Result{}, false } item := it.Item()
fix: cast prefix to bytes
ipfs_go-ds-badger
train
go
4319774383cd9284bc7ceee4e026f180293673d0
diff --git a/src/rasterstats/io.py b/src/rasterstats/io.py index <HASH>..<HASH> 100644 --- a/src/rasterstats/io.py +++ b/src/rasterstats/io.py @@ -154,8 +154,8 @@ def bounds_window(bounds, affine): def window_bounds(window, affine): (row_start, row_stop), (col_start, col_stop) = window - w, s = (col_start, row_stop) * affine - e, n = (col_stop, row_start) * affine + w, s = affine * (col_start, row_stop) + e, n = affine * (col_stop, row_start) return w, s, e, n
chore: left multiplication for rasterio
perrygeo_python-rasterstats
train
py
ba82e4f0c4984d26febbfb156f78f1125159e623
diff --git a/lib/spark/worker/master.rb b/lib/spark/worker/master.rb index <HASH>..<HASH> 100755 --- a/lib/spark/worker/master.rb +++ b/lib/spark/worker/master.rb @@ -129,7 +129,8 @@ module Master ::Thread.abort_on_exception = true # For synchronous access to socket IO - $mutex = Mutex.new + $mutex_for_command = Mutex.new + $mutex_for_iterator = Mutex.new super end diff --git a/lib/spark/worker/worker.rb b/lib/spark/worker/worker.rb index <HASH>..<HASH> 100644 --- a/lib/spark/worker/worker.rb +++ b/lib/spark/worker/worker.rb @@ -134,6 +134,10 @@ module Worker private + def load_command + $mutex_for_command.synchronize { super } + end + # Threads changing for reading is very slow # Faster way is do it one by one def load_iterator @@ -144,7 +148,7 @@ module Worker client_socket.wait_readable end - $mutex.synchronize { super } + $mutex_for_iterator.synchronize { super } end end
fix: thread worker for mri
ondra-m_ruby-spark
train
rb,rb
a3278448391b074eab1df31040a55841f9c2f729
diff --git a/lib/request.js b/lib/request.js index <HASH>..<HASH> 100644 --- a/lib/request.js +++ b/lib/request.js @@ -250,14 +250,13 @@ class Request extends AsyncResource { assert(!this.upgrade && this.method !== 'CONNECT') if (this.aborted) { - return null + return } try { return this.runInAsyncScope(this._onData, this, chunk.slice(offset, offset + length)) } catch (err) { this.onError(err) - return null } }
refactor: undefined is nully
mcollina_undici
train
js
978541d8c3a66236249b4c94da9fbd6c5946ae02
diff --git a/packages/react/src/components/FileUploader/FileUploaderButton.js b/packages/react/src/components/FileUploader/FileUploaderButton.js index <HASH>..<HASH> 100644 --- a/packages/react/src/components/FileUploader/FileUploaderButton.js +++ b/packages/react/src/components/FileUploader/FileUploaderButton.js @@ -79,12 +79,13 @@ function FileUploaderButton({ {/* eslint-disable-next-line jsx-a11y/no-noninteractive-element-interactions */} <label tabIndex={disabled ? -1 : tabIndex || 0} - aria-disabled={disabled} className={classes} onKeyDown={onKeyDown} htmlFor={inputId} {...other}> - <span role={role}>{labelText}</span> + <span role={role} aria-disabled={disabled}> + {labelText} + </span> </label> <input className={`${prefix}--visually-hidden`}
fix(FileUploader): aria disabled placed on button instead of label (#<I>) * fix(FileUploader): button aria disabled * fix: htmlfor placement
carbon-design-system_carbon-components
train
js
eb52701396702a5fb722151acf0258801264cbfb
diff --git a/test/backend-connection.test.js b/test/backend-connection.test.js index <HASH>..<HASH> 100644 --- a/test/backend-connection.test.js +++ b/test/backend-connection.test.js @@ -301,20 +301,14 @@ suite('Connection, basic features', function() { callback.takes(Connection.ERROR_GATEWAY_TIMEOUT, null); message = connection.emitMessage('testRequest', { command: 'foobar' }, callback, { timeout: 1, - delay: 1000 + delay: 10 }); assert.envelopeEqual(message, createExpectedEnvelope('testRequest', { command: 'foobar' })); }) - .wait(0.01) - .next(function() { - assert.equal(backend.received.length, 1); - assert.deepEqual(backend.received[0][2], message); - assert.equal(connection.listeners('inReplyTo:' + message.id).length, 1); - - }) - .wait(0.01) + .wait(0.05) .next(function() { + assert.equal(backend.received.length, 0); assert.equal(connection.listeners('inReplyTo:' + message.id).length, 0); callback.assert(); done();
test: When the connection is timed out, no message should be sent
droonga_express-droonga
train
js
480ff91e59c6f5c21e03c5d767dd32f2c3325ad7
diff --git a/packages/cozy-client/src/CozyClient.js b/packages/cozy-client/src/CozyClient.js index <HASH>..<HASH> 100644 --- a/packages/cozy-client/src/CozyClient.js +++ b/packages/cozy-client/src/CozyClient.js @@ -278,8 +278,7 @@ export default class CozyClient { const definitions = pickBy( mapValues(assocByName, assoc => this.queryDocumentAssociation(document, assoc) - ), - x => x + ) ) const requests = mapValues(definitions, definition =>
refactor: pickBy's default predicate is identity
cozy_cozy-client
train
js
2e3b94857bdecb58e768c5e8c8b6522ab2a0cc30
diff --git a/scripts/install.js b/scripts/install.js index <HASH>..<HASH> 100755 --- a/scripts/install.js +++ b/scripts/install.js @@ -165,6 +165,7 @@ if (process.env.SENTRYCLI_LOCAL_CDNURL) { const contents = fs.readFileSync(path.join(__dirname, '../js/__mocks__/sentry-cli')); response.writeHead(200, { 'Content-Type': 'application/octet-stream', + 'Content-Encoding': 'gzip', 'Content-Length': String(contents.byteLength), }); response.end(contents);
fix: Add gzip header to mocked CDN server
getsentry_sentry-cli
train
js
f326fe67b1dec620c718e08ad8028abd0a577620
diff --git a/src/rest/APIRouter.js b/src/rest/APIRouter.js index <HASH>..<HASH> 100644 --- a/src/rest/APIRouter.js +++ b/src/rest/APIRouter.js @@ -22,6 +22,7 @@ function buildRoute(manager) { versioned: manager.versioned, route: route.map((r, i) => { if (/\d{16,19}/g.test(r)) return /channels|guilds/.test(route[i - 1]) ? r : ':id'; + if (route[i - 1] === 'reactions') return ':reaction'; return r; }).join('/'), }, options)).catch(error => { diff --git a/src/rest/RequestHandler.js b/src/rest/RequestHandler.js index <HASH>..<HASH> 100644 --- a/src/rest/RequestHandler.js +++ b/src/rest/RequestHandler.js @@ -131,7 +131,7 @@ class RequestHandler { // https://github.com/discordapp/discord-api-docs/issues/182 if (item.request.route.includes('reactions')) { - this.reset = Date.now() + getAPIOffset(serverDate) + 250; + this.reset = new Date(serverDate).getTime() - getAPIOffset(serverDate) + 250; } }
fix: reactions ratelimits (#<I>) * each reaction doesn't have it's own ratelimit * fix hard-coded reset for reacting
discordjs_discord.js
train
js,js
fad88bc11337c6517a99db28154a668b2e506caa
diff --git a/teslajsonpy/controller.py b/teslajsonpy/controller.py index <HASH>..<HASH> 100644 --- a/teslajsonpy/controller.py +++ b/teslajsonpy/controller.py @@ -256,7 +256,7 @@ class Controller: ) if not result: if retries < 5: - await asyncio.sleep(sleep_delay ** (retries + 2)) + await asyncio.sleep(15 + sleep_delay ** (retries + 2)) retries += 1 continue inst.car_online[inst._id_to_vin(car_id)] = False @@ -272,7 +272,7 @@ class Controller: kwargs, ) while not valid_result(result): - await asyncio.sleep(sleep_delay ** (retries + 1)) + await asyncio.sleep(15 + sleep_delay ** (retries + 1)) try: result = await func(*args, **kwargs) _LOGGER.debug(
fix: increase minimum retry delay to <I> seconds
zabuldon_teslajsonpy
train
py
37ebd76eda9b0ae80b3596f60141bc72df5b1f50
diff --git a/packages/ad/src/utils/ad-init.js b/packages/ad/src/utils/ad-init.js index <HASH>..<HASH> 100644 --- a/packages/ad/src/utils/ad-init.js +++ b/packages/ad/src/utils/ad-init.js @@ -38,7 +38,7 @@ export default ({ el, data, platform, eventCallback, window }) => { localInitCalled = true; window.initCalled = true; - if (!data.bidInitialiser) { + if ((!data.bidInitialiser && isWeb) || !isWeb) { this.loadScripts(); }
fix: ad native (#<I>)
newsuk_times-components
train
js
3ca63d8fce752a1adb3638cf5df6a896fd780323
diff --git a/src/compiler/parsing/wasm/decoder.js b/src/compiler/parsing/wasm/decoder.js index <HASH>..<HASH> 100644 --- a/src/compiler/parsing/wasm/decoder.js +++ b/src/compiler/parsing/wasm/decoder.js @@ -500,6 +500,9 @@ export function decode(ab: ArrayBuffer, printDump: boolean = false): Program { id = func.id; signature = func.signature; + } else if (exportTypes[typeIndex] === "Table") { + console.warn("Unsupported export type table"); + return; } else if (exportTypes[typeIndex] === "Mem") { const memNode = state.memoriesInModule[index]; @@ -517,7 +520,8 @@ export function decode(ab: ArrayBuffer, printDump: boolean = false): Program { signature = null; } else { - throw new CompileError("Unsupported export type: " + toHex(typeIndex)); + console.warn("Unsupported export type: " + toHex(typeIndex)); + return; } state.elementsInExportSection.push({
fix(wasm): don't panic for unsupported table export
xtuc_webassemblyjs
train
js
962015f7e73a4ffcec4f77fa670b47682edf53b0
diff --git a/packages/babel-traverse/src/path/ancestry.js b/packages/babel-traverse/src/path/ancestry.js index <HASH>..<HASH> 100644 --- a/packages/babel-traverse/src/path/ancestry.js +++ b/packages/babel-traverse/src/path/ancestry.js @@ -4,8 +4,10 @@ import * as t from "@babel/types"; import NodePath from "./index"; /** - * Call the provided `callback` with the `NodePath`s of all the parents. - * When the `callback` returns a truthy value, we return that node path. + * Starting at the parent path of the current `NodePath` and going up the + * tree, return the first `NodePath` that causes the provided `callback` + * to return a truthy value, or `null` if the `callback` never returns a + * truthy value. */ export function findParent(callback): ?NodePath { @@ -18,7 +20,8 @@ export function findParent(callback): ?NodePath { /** * Starting at current `NodePath` and going up the tree, return the first - * `NodePath` that causes the provided `callback` to return a truthy value. + * `NodePath` that causes the provided `callback` to return a truthy value, + * or `null` if the `callback` never returns a truthy value. */ export function find(callback): ?NodePath {
docs: updates docs of `findParent` and `find` (#<I>) [skip ci] Makes the documentation of `findParent` and `find` consistent and documents their `null` cases.
babel_babel
train
js
c8dd6fe75138442f9c6be1c63bc72c301e8dc835
diff --git a/src/React/Widgets/AnnotationEditorWidget/index.js b/src/React/Widgets/AnnotationEditorWidget/index.js index <HASH>..<HASH> 100644 --- a/src/React/Widgets/AnnotationEditorWidget/index.js +++ b/src/React/Widgets/AnnotationEditorWidget/index.js @@ -47,7 +47,7 @@ export default function annotationEditorWidget(props) { }; const onAnnotationChange = (event) => { - const value = event.target.value; + const value = (event.target.type === 'number') ? +event.target.value : event.target.value; const name = event.target.name; const type = event.type;
fix(AnnotationEditorWidget): convert 'weight' to number Make sure the 'weight' parameter is coverted to a number, by checking for input type==='number'.
Kitware_paraviewweb
train
js
03730458b861459f3c0a2fd85401085fccee7894
diff --git a/src/migrations/config-server.js b/src/migrations/config-server.js index <HASH>..<HASH> 100644 --- a/src/migrations/config-server.js +++ b/src/migrations/config-server.js @@ -15,10 +15,10 @@ const migrations = [ const newSchema = { ...schema, version: 1, - ha_boolean: 'y|yes|true|on|home|open', - rejectUnauthorizedCerts: true, - connectionDelay: true, - cacheJson: true, + ha_boolean: schema.ha_boolean || 'y|yes|true|on|home|open', + rejectUnauthorizedCerts: schema.rejectUnauthorizedCerts || true, + connectionDelay: schema.connectionDelay || true, + cacheJson: schema.cacheJson || true, }; return newSchema; },
refactor: Use existing values for config-server during version 1 migration
zachowj_node-red-contrib-home-assistant-websocket
train
js
de3d0622bb36a9b379fe6c82458914e58d0d4f22
diff --git a/packages/@vue/cli-service/lib/commands/serve.js b/packages/@vue/cli-service/lib/commands/serve.js index <HASH>..<HASH> 100644 --- a/packages/@vue/cli-service/lib/commands/serve.js +++ b/packages/@vue/cli-service/lib/commands/serve.js @@ -51,7 +51,7 @@ module.exports = (api, options) => { api.chainWebpack(webpackConfig => { if (process.env.NODE_ENV !== 'production' && process.env.NODE_ENV !== 'test') { webpackConfig - .devtool('cheap-module-eval-source-map') + .devtool('eval-cheap-module-source-map') webpackConfig .plugin('hmr')
refactor(cli-service): webpack `devtool` option (#<I>) Close: #<I>
vuejs_vue-cli
train
js
e88aafef920ad8eb23ab3a63df78a5a7e29be3fc
diff --git a/cookies.py b/cookies.py index <HASH>..<HASH> 100644 --- a/cookies.py +++ b/cookies.py @@ -750,6 +750,11 @@ class Cookie(object): if key in ('name', 'value'): continue parser = cls.attribute_parsers.get(key) if not parser: + # Don't let totally unknown attributes pass silently + if not ignore_bad_attributes: + raise InvalidCookieAttributeError(key, value, + "unknown cookie attribute '%s'" % key) + _report_unknown_attribute(key) continue parsed[key] = parse(key)
fix: don't let totally unknown attributes pass silently in from_dict for example, if a dict supposedly representing a Cookie has an attribute 'duh' that is likely to indicate an error. if the user set ignore_bad_attributes=False they want an exception. even if it's true, the typical behavior elsewhere is to log unknown attribute.
sashahart_cookies
train
py
da06b790d811d263b96a12de2d5d089e342626c7
diff --git a/sendgrid-ruby.gemspec b/sendgrid-ruby.gemspec index <HASH>..<HASH> 100644 --- a/sendgrid-ruby.gemspec +++ b/sendgrid-ruby.gemspec @@ -28,4 +28,5 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'rubocop' spec.add_development_dependency 'minitest', '~> 5.9' spec.add_development_dependency 'rack' + spec.add_development_dependency 'simplecov' end diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index <HASH>..<HASH> 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -1,3 +1,5 @@ +require 'simplecov' +SimpleCov.start require 'rubygems' require 'bundler/setup' require 'pry' diff --git a/test/sendgrid/test_sendgrid-ruby.rb b/test/sendgrid/test_sendgrid-ruby.rb index <HASH>..<HASH> 100644 --- a/test/sendgrid/test_sendgrid-ruby.rb +++ b/test/sendgrid/test_sendgrid-ruby.rb @@ -1,3 +1,5 @@ +require 'simplecov' +SimpleCov.start require_relative '../../lib/sendgrid-ruby.rb' require 'ruby_http_client' require 'minitest/autorun'
test: add Simplecov Local Enhancements (#<I>) As a contributor, I'd like to know what baseline code coverage is and how my enhancements affect it. It was actually fairly difficult to find a good location to insert the SimpleCov.start and keep the results consistent. But after several hours, the final state of this PR seems to be the best. No documentation was updated because code coverage is now part of the default rake run, with no further action required.
sendgrid_sendgrid-ruby
train
gemspec,rb,rb
8fb0e63a5553346cd30fd4060858d1e727cef74f
diff --git a/packages/modal/src/presenters/ModalPresenter.js b/packages/modal/src/presenters/ModalPresenter.js index <HASH>..<HASH> 100644 --- a/packages/modal/src/presenters/ModalPresenter.js +++ b/packages/modal/src/presenters/ModalPresenter.js @@ -7,6 +7,11 @@ import { types } from "../types"; import "./ModalPresenter.scss"; export default class ModalPresenter extends Component { + static modifiersByType = { + [types.STANDARD]: "hig__modal-V1__window--standard", + [types.ALTERNATE]: "hig__modal-V1__window--alternate" + }; + static propTypes = { /** * Supports adding any dom content to the body of the modal @@ -68,10 +73,10 @@ export default class ModalPresenter extends Component { type } = this.props; - const windowClasses = cx([ + const windowClasses = cx( "hig__modal-V1__window", - `hig__modal-V1__window--${type}` - ]); + ModalPresenter.modifiersByType[type] + ); const wrapperClasses = cx([ "hig__modal-V1",
refactor: Use dictionary for variant style modifiers
Autodesk_hig
train
js
79d2c344f9ee9945b09434b35cbe63a3816410ad
diff --git a/src/calendar/index.js b/src/calendar/index.js index <HASH>..<HASH> 100644 --- a/src/calendar/index.js +++ b/src/calendar/index.js @@ -281,9 +281,11 @@ export default createComponent({ }, onConfirm() { - if (this.checkRange()) { - this.$emit('confirm', this.currentDate); + if (this.range && !this.checkRange()) { + return; } + + this.$emit('confirm', this.currentDate); }, genMonth(date, index) {
fix(Calendar): should not check range in single mode
youzan_vant
train
js
d7c30e0822a8453e6396eae1976263ea74ac20e9
diff --git a/packages/wpcom.js/test/util.js b/packages/wpcom.js/test/util.js index <HASH>..<HASH> 100644 --- a/packages/wpcom.js/test/util.js +++ b/packages/wpcom.js/test/util.js @@ -5,6 +5,7 @@ var test = require('./data'); var WPCOM = require('../'); +var fs = require('fs'); /** * `Util` module @@ -61,7 +62,7 @@ Util.addPost = function(fn){ Util.addMedia = function(fn){ var site = Util.private_site(); - site.addMediaFiles(test.new_media_data.files[0], fn); + site.addMediaFiles(fs.createReadStream(test.new_media_data.files[0]), fn); }; /**
test: fix add media before the test start
Automattic_wp-calypso
train
js
a349b90ea6016ec8fbe91583f2bbd9832b41a368
diff --git a/gitlab/__init__.py b/gitlab/__init__.py index <HASH>..<HASH> 100644 --- a/gitlab/__init__.py +++ b/gitlab/__init__.py @@ -779,10 +779,7 @@ class GitlabList(object): self._gl = gl # Preserve kwargs for subsequent queries - if kwargs is None: - self._kwargs = {} - else: - self._kwargs = kwargs.copy() + self._kwargs = kwargs.copy() self._query(url, query_data, **self._kwargs) self._get_next = get_next
fix: do not check if kwargs is none
python-gitlab_python-gitlab
train
py
7b401d1fa3d2c97c0a2b3589527ec6999df0be2f
diff --git a/packages/node_modules/samples/browser-single-party-call-with-mute/test/wdio/spec/normal-dialing.js b/packages/node_modules/samples/browser-single-party-call-with-mute/test/wdio/spec/normal-dialing.js index <HASH>..<HASH> 100644 --- a/packages/node_modules/samples/browser-single-party-call-with-mute/test/wdio/spec/normal-dialing.js +++ b/packages/node_modules/samples/browser-single-party-call-with-mute/test/wdio/spec/normal-dialing.js @@ -55,7 +55,7 @@ describe('samples/browser-single-party-call-with-mute', () => { it('turns the local camera back on', () => { browserSpock.assertText('#outgoing-video-stats', noStreamText); browserSpock.click('[title="start sending video"]'); - browserSpock.waitForSpecificText('#camera-state', 'on', true); + browserSpock.waitForSpecificText('#camera-state', 'on'); }); it('ends the call', () => {
test(samples): fix failing mute test
webex_spark-js-sdk
train
js
3e95e6f9e4affc2c89961cdf621624c44865aebd
diff --git a/src/index.js b/src/index.js index <HASH>..<HASH> 100644 --- a/src/index.js +++ b/src/index.js @@ -187,13 +187,6 @@ class Libp2p extends EventEmitter { }) this._peerDiscovered = this._peerDiscovered.bind(this) - - // promisify all instance methods - ;['start', 'stop', 'dial', 'dialProtocol', 'dialFSM', 'hangUp', 'ping'].forEach(method => { - this[method] = promisify(this[method], { - context: this - }) - }) } /** @@ -557,6 +550,11 @@ class Libp2p extends EventEmitter { } } +// promisify all instance methods +['start', 'stop', 'dial', 'dialProtocol', 'dialFSM', 'hangUp', 'ping'].forEach(method => { + Libp2p[method] = promisify(Libp2p[method]) +}) + module.exports = Libp2p /** * Like `new Libp2p(options)` except it will create a `PeerInfo`
fix: dont override methods of created instance (#<I>) * fix: dont override methods of created instance * chore: fix lint
libp2p_js-libp2p
train
js
52798b83a680e9a3696b5e4348946470e0f959b9
diff --git a/lib/block.js b/lib/block.js index <HASH>..<HASH> 100644 --- a/lib/block.js +++ b/lib/block.js @@ -36,11 +36,11 @@ function Block() { Block.getDescription = function( type ) { switch( type ) { case UDIF.BLOCK.ZEROFILL: return 'ZEROFILL'; break - case UDIF.BLOCK.RAW: return 'UDRW (UDIF read/write) / UDRO (UDIF read-only)'; break - case UDIF.BLOCK.FREE: return 'FREE (Unallocated)'; break - case UDIF.BLOCK.UDCO: return 'UDCO (UDIF ADC-compressed)'; break - case UDIF.BLOCK.UDZO: return 'UDZO (UDIF zlib-compressed)'; break - case UDIF.BLOCK.UDBZ: return 'UDBZ (UDIF bzip2-compressed)'; break + case UDIF.BLOCK.RAW: return 'UDRW (raw)'; break + case UDIF.BLOCK.FREE: return 'FREE (unallocated)'; break + case UDIF.BLOCK.UDCO: return 'UDCO (adc-compressed)'; break + case UDIF.BLOCK.UDZO: return 'UDZO (zlib-compressed)'; break + case UDIF.BLOCK.UDBZ: return 'UDBZ (bzip2-compressed)'; break case UDIF.BLOCK.COMMENT: return 'COMMENT'; break case UDIF.BLOCK.TERMINATOR: return 'TERMINATOR'; break default: return 'UNKNOWN'; break
feat(block): Improve block type descriptions
jhermsmeier_node-udif
train
js
cc6a8176dc735869f900185d0a116c972f45476d
diff --git a/index.js b/index.js index <HASH>..<HASH> 100644 --- a/index.js +++ b/index.js @@ -276,7 +276,7 @@ async function exec(options = {}) { } if (errorLines.length) { let error = errorLines.join('\n'); - error = error.replace(/===*.*====*\nLicense acceptance recorded. Continuing.\n?/, ''); + error = error.replace(/===*.*====*\\nLicense acceptance recorded. Continuing.\n?/, ''); const acceptLicenseMessage = /To accept the message please run speedtest interactively or use the following:[\s\S]*speedtest --accept-license/; const acceptGdprMessage = /To accept the message please run speedtest interactively or use the following:[\s\S]*speedtest --accept-gdpr/; if (acceptLicenseMessage.test(error)) {
fix: fix regex issue in error check escaped \n in the regex check, as the string to test is using \n as string. this fixes an issue where the "license accepted" info message would throw an error.
ddsol_speedtest.net
train
js
240f27de29f981798b0b308be96ca7b8ad855a3e
diff --git a/src/Leevel/Kernel/App.php b/src/Leevel/Kernel/App.php index <HASH>..<HASH> 100644 --- a/src/Leevel/Kernel/App.php +++ b/src/Leevel/Kernel/App.php @@ -164,7 +164,10 @@ class App implements IApp return \PHP_SAPI === 'cli'; } - return $this->container->make('request')->isConsole(); + /** @var \Leevel\Http\Request $request */ + $request = $this->container->make('request'); + + return $request->isConsole(); } /** diff --git a/src/Leevel/Kernel/ExceptionRuntime.php b/src/Leevel/Kernel/ExceptionRuntime.php index <HASH>..<HASH> 100644 --- a/src/Leevel/Kernel/ExceptionRuntime.php +++ b/src/Leevel/Kernel/ExceptionRuntime.php @@ -328,7 +328,7 @@ abstract class ExceptionRuntime implements IExceptionRuntime extract($vars); ob_start(); require $filepath; - $content = ob_get_contents(); + $content = ob_get_contents() ?: ''; ob_end_clean(); return $content;
fix(kernel): fix for phpstan level 7
hunzhiwange_framework
train
php,php
9b80c24388473567bb28783d5d4afbf135ae34e6
diff --git a/lib/core/error.js b/lib/core/error.js index <HASH>..<HASH> 100644 --- a/lib/core/error.js +++ b/lib/core/error.js @@ -55,7 +55,11 @@ class MongoError extends Error { * @returns {boolean} returns true if the error has the provided error label */ hasErrorLabel(label) { - return this[kErrorLabels] && this[kErrorLabels].has(label); + if (this[kErrorLabels] == null) { + return false; + } + + return this[kErrorLabels].has(label); } addErrorLabel(label) {
refactor: explicitly return a boolean for errorLabel presence
mongodb_node-mongodb-native
train
js
2048476cd061113bf6199e5cbec1012439d8d9e4
diff --git a/docs/icons.stories.js b/docs/icons.stories.js index <HASH>..<HASH> 100644 --- a/docs/icons.stories.js +++ b/docs/icons.stories.js @@ -11,6 +11,7 @@ stories.add('icon', () => { 'icon twitter': 'icon twitter', 'icon facebook': 'icon facebook', 'icon github': 'icon github', + 'icon google': 'icon google', 'icon youtube': 'icon youtube', 'icon close': 'icon close', 'octocat animate': 'octocat animate',
feat: add google icon to storybook's icon story
nostalgic-css_NES.css
train
js
6ca3f72b62c8e0b6d2a2e3354e313687e2c4181e
diff --git a/p2p/host/peerstore/pstoremem/peerstore.go b/p2p/host/peerstore/pstoremem/peerstore.go index <HASH>..<HASH> 100644 --- a/p2p/host/peerstore/pstoremem/peerstore.go +++ b/p2p/host/peerstore/pstoremem/peerstore.go @@ -11,20 +11,20 @@ import ( type pstoremem struct { peerstore.Metrics - memoryKeyBook - memoryAddrBook - memoryProtoBook - memoryPeerMetadata + *memoryKeyBook + *memoryAddrBook + *memoryProtoBook + *memoryPeerMetadata } // NewPeerstore creates an in-memory threadsafe collection of peers. func NewPeerstore() *pstoremem { return &pstoremem{ Metrics: pstore.NewMetrics(), - memoryKeyBook: *NewKeyBook(), - memoryAddrBook: *NewAddrBook(), - memoryProtoBook: *NewProtoBook(), - memoryPeerMetadata: *NewPeerMetadata(), + memoryKeyBook: NewKeyBook(), + memoryAddrBook: NewAddrBook(), + memoryProtoBook: NewProtoBook(), + memoryPeerMetadata: NewPeerMetadata(), } }
fix: make close work again Reference pstoremem components by pointer to: 1. Avoid copying locks around on construction. 2. Avoid copying these around when calling `weakClose`. 3. Ensures that they all implement the `io.Closer` interface (it's implemented on the pointer, not the value). Technically, we could have just taken a reference when calling `weakClose`, but this is cleaner.
libp2p_go-libp2p
train
go
d52f46c356cc53e648492771809f09d38d4719e9
diff --git a/packages/mip/src/components/mip-fixed.js b/packages/mip/src/components/mip-fixed.js index <HASH>..<HASH> 100644 --- a/packages/mip/src/components/mip-fixed.js +++ b/packages/mip/src/components/mip-fixed.js @@ -10,6 +10,12 @@ class MipFixed extends CustomElement { const viewer = window.MIP.viewer const platform = window.MIP.util.platform + // Hack: mip1 站点强制重写 mip-layout-container display,导致无法隐藏 loading + // 针对 mip-fixed 先把 mip-layout-container 去掉,这个不会对现有样式造成影响 + // TODO: 1. 考虑针对 mip-fixed 统一不使用 layout 处理 2. 推动下游去掉这个 class 的重写 + // 站点 http://mip.cntrades.com/15995352952/sell/itemid-170607633.html + this.element.classList.remove('mip-layout-container') + if (this.element.getAttribute('mipdata-fixedidx')) { return }
fix: hide loading in mip1 site (#<I>)
mipengine_mip2
train
js
0b703d4bc1dad74dbdd6cbc4d714a90bbf3b0866
diff --git a/gulpfile.js b/gulpfile.js index <HASH>..<HASH> 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -181,15 +181,6 @@ gulp.task("lint", () => { .pipe(jshint.reporter("default")); }); -gulp.task("webserver", () => { - gulp.src("publish/") - .pipe(webserver({ - port: 8000, - livereload: true, - directoryListing: true - })); -}); - gulp.task("clean-jsdoc", (done) => { return del([ "publish/jsdoc/" ], done); }); @@ -212,6 +203,15 @@ gulp.task("build-demo", [ "clean-demo", "copy-demo" ], () => { return bower({ cwd: 'publish/demo/' }); }); +gulp.task("webserver", [ "build-demo", "jsdoc" ], () => { + gulp.src("publish/") + .pipe(webserver({ + port: 8000, + livereload: true, + directoryListing: true + })); +}); + gulp.task("deploy", [ "build-demo", "jsdoc" ], () => { return gulp.src('publish/**/*') .pipe(ghPages());
chore(gulp): kick "build-demo" and "jsdoc" task before starting "webserver" task
takuyaa_kuromoji.js
train
js
c7cd4ce8f479ded63d85dd2c75e6f9ebe3c1bc45
diff --git a/library/src/main/java/com/liulishuo/filedownloader/event/DownloadEventPoolImpl.java b/library/src/main/java/com/liulishuo/filedownloader/event/DownloadEventPoolImpl.java index <HASH>..<HASH> 100644 --- a/library/src/main/java/com/liulishuo/filedownloader/event/DownloadEventPoolImpl.java +++ b/library/src/main/java/com/liulishuo/filedownloader/event/DownloadEventPoolImpl.java @@ -127,6 +127,8 @@ public class DownloadEventPoolImpl implements IDownloadEventPool { final Object[] lists = listeners.toArray(); for (Object o : lists) { + if (o == null) continue; // it has been removed while before listeners.toArray(). + if (((IDownloadListener) o).callback(event)) { break; }
fix(npe): fix the small probability npe crash when publish event when it has been removed on other thread Closes #<I>
lingochamp_FileDownloader
train
java
3b5ed4ff516d6b691b71abc07f0d45ac8d79e676
diff --git a/lib/node.js b/lib/node.js index <HASH>..<HASH> 100644 --- a/lib/node.js +++ b/lib/node.js @@ -24,14 +24,7 @@ var appendChild = function (parent, child) { } }; -var getIsCurrent = function () { - var node = this.tree.current; - while (node) { - if (node === this) return true; - node = node.parent; - } - return false; -}; +var getIsCurrent = function () { return this.isCurrent; }; var SiteNode = module.exports = function (conf, context, parent) { this.conf = conf; @@ -45,6 +38,14 @@ var SiteNode = module.exports = function (conf, context, parent) { Object.defineProperties(SiteNode.prototype, assign({ parent: d(null), + isCurrent: d.gs(function () { + var node = this.tree.current; + while (node) { + if (node === this) return true; + node = node.parent; + } + return false; + }), // Switches between parent and this node view, or other way _switch: d(function (after) {
refactor: expose isCurrent on view node
medikoo_site-tree
train
js
fd000b720c6b29b8f8da63c34871d67fbd1ce9ea
diff --git a/lib/components/viewers/stop-schedule-table.js b/lib/components/viewers/stop-schedule-table.js index <HASH>..<HASH> 100644 --- a/lib/components/viewers/stop-schedule-table.js +++ b/lib/components/viewers/stop-schedule-table.js @@ -6,6 +6,7 @@ import styled from 'styled-components' import { isBlank } from '../../util/ui' import { excludeLastStop, + getRouteIdForPattern, getSecondsUntilDeparture, getStopTimesByPattern, stopTimeComparator @@ -75,6 +76,16 @@ class StopScheduleTable extends Component { // Merge stop times, so that we can sort them across all route patterns. let mergedStopTimes = [] Object.values(stopTimesByPattern).forEach(({ pattern, route, times }) => { + // TODO: refactor the IF block below (copied fromn StopViewer). + // Only add pattern if route is found. + // FIXME: there is currently a bug with the alernative transit index + // where routes are not associated with the stop if the only stoptimes + // for the stop are drop off only. See https://github.com/ibi-group/trimet-mod-otp/issues/217 + if (!route) { + console.warn(`Cannot render stop times for missing route ID: ${getRouteIdForPattern(pattern)}`) + return + } + const filteredTimes = times .filter(excludeLastStop) .map(stopTime => {
refactor(StopScheduleTable): Do not render times for pattern without route object.
opentripplanner_otp-react-redux
train
js
35a9a703643c01d7eda90662c0ca094b0e33345e
diff --git a/src/__mocks__/mongooseCommon.js b/src/__mocks__/mongooseCommon.js index <HASH>..<HASH> 100644 --- a/src/__mocks__/mongooseCommon.js +++ b/src/__mocks__/mongooseCommon.js @@ -14,7 +14,7 @@ mongoose.connect = async () => { const mongoUri = await mongoServer.getConnectionString(); - originalConnect.bind(mongoose)(mongoUri); + originalConnect.bind(mongoose)(mongoUri, { useMongoClient: true }); mongoose.connection.on('error', e => { if (e.message.code === 'ETIMEDOUT') {
test: Fix deprecation warning with mongoose `open()` method
graphql-compose_graphql-compose-mongoose
train
js
bc143ca0857ea4df089a504fffbf99b4620043fe
diff --git a/anyconfig/compat.py b/anyconfig/compat.py index <HASH>..<HASH> 100644 --- a/anyconfig/compat.py +++ b/anyconfig/compat.py @@ -89,7 +89,7 @@ if IS_PYTHON_3: STR_TYPES = (str, ) else: import ConfigParser as configparser # flake8: noqa - from UserDict import UserDict # flake8: noqa + from UserDict import UserDict # flake8: noqa try: from cStringIO import StringIO # flake8: noqa except ImportError:
fix: ensure enough spaces before inline comment
ssato_python-anyconfig
train
py
0dff9cce1bddea0c076b0861b692647b7c1d5c8f
diff --git a/src/resources/views/character/includes/menu.blade.php b/src/resources/views/character/includes/menu.blade.php index <HASH>..<HASH> 100644 --- a/src/resources/views/character/includes/menu.blade.php +++ b/src/resources/views/character/includes/menu.blade.php @@ -4,9 +4,9 @@ @foreach($menu as $menu_entry) - <li role="presentation" class="@if ($viewname == $menu_entry['highlight_view']) active @endif"> + <li role="presentation" class="nav-item"> - <a href="{{ route($menu_entry['route'], $summary->character_id) }}"> + <a href="{{ route($menu_entry['route'], $summary->character_id) }}" class="nav-link @if ($viewname == $menu_entry['highlight_view']) active @endif"> @if (array_key_exists('label', $menu_entry)) @if(array_key_exists('plural', $menu_entry)) {{ trans_choice($menu_entry['label'], 2) }}
feat(deps): upgrade character menu
eveseat_web
train
php
b3ab693c7a3992494b28eba26078886ffe49f276
diff --git a/src/SearchParameters/index.js b/src/SearchParameters/index.js index <HASH>..<HASH> 100644 --- a/src/SearchParameters/index.js +++ b/src/SearchParameters/index.js @@ -52,7 +52,7 @@ var RefinementList = require('./RefinementList'); * for the properties of a new SearchParameters * @see SearchParameters.make * @example <caption>SearchParameters of the first query in - * <a href="http://demos.algolia.com/instant-search-demo">the instant search demo</a></caption> + * <a href="http://demos.algolia.com/instant-search-demo/">the instant search demo</a></caption> { "query": "", "disjunctiveFacets": [
docs(SearchParameters): fix broken link
algolia_algoliasearch-helper-js
train
js
a20150c458c45456e40ef73d91f0fa1561b85a1e
diff --git a/util/tls/tls.go b/util/tls/tls.go index <HASH>..<HASH> 100644 --- a/util/tls/tls.go +++ b/util/tls/tls.go @@ -122,8 +122,9 @@ func GenerateX509KeyPairTLSConfig(tlsMinVersion uint16) (*tls.Config, error) { } return &tls.Config{ - Certificates: []tls.Certificate{*cer}, - MinVersion: uint16(tlsMinVersion), + Certificates: []tls.Certificate{*cer}, + MinVersion: uint16(tlsMinVersion), + InsecureSkipVerify: true, }, nil }
fix: insecureSkipVerify needed. Fixes #<I> (#<I>)
argoproj_argo
train
go
6b7404cbbbda8f5533055584a2309988b0784de6
diff --git a/docs/conf.py b/docs/conf.py index <HASH>..<HASH> 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -333,7 +333,7 @@ epub_copyright = copyright # The format is a list of tuples containing the path and title. #epub_pre_files = [] -# HTML files shat should be inserted after the pages created by sphinx. +# HTML files that should be inserted after the pages created by sphinx. # The format is a list of tuples containing the path and title. #epub_post_files = []
docs: Fix simple typo, shat -> that There is a small typo in docs/conf.py. Should read `that` rather than `shat`.
tetframework_Tonnikala
train
py
3193b0dc3b5445656a8b94425345e3c8475f7533
diff --git a/packages/@vue/cli-service/lib/Service.js b/packages/@vue/cli-service/lib/Service.js index <HASH>..<HASH> 100644 --- a/packages/@vue/cli-service/lib/Service.js +++ b/packages/@vue/cli-service/lib/Service.js @@ -29,7 +29,7 @@ module.exports = class Service { // for testing. this.plugins = this.resolvePlugins(plugins, useBuiltIn) // resolve the default mode to use for each command - // this is provided by plugins as module.exports.defaulModes + // this is provided by plugins as module.exports.defaultModes // so we can get the information without actually applying the plugin. this.modes = this.plugins.reduce((modes, { apply: { defaultModes }}) => { return Object.assign(modes, defaultModes) @@ -146,7 +146,7 @@ module.exports = class Service { // resolve mode // prioritize inline --mode // fallback to resolved default modes from plugins - const mode = args.mode || this.modes[name] + const mode = name === 'build' && args.watch ? 'development' : args.mode || this.modes[name] // load env variables, load user config, apply plugins this.init(mode)
fix(build): default to development mode in build --watch (#<I>)
vuejs_vue-cli
train
js
7f749cd68df844a235bc7c40df56ad852801e1f1
diff --git a/packages/@keynote/cli/bin/keynote.js b/packages/@keynote/cli/bin/keynote.js index <HASH>..<HASH> 100755 --- a/packages/@keynote/cli/bin/keynote.js +++ b/packages/@keynote/cli/bin/keynote.js @@ -24,7 +24,7 @@ program .option('-p, --theme <theme>', 'use specified theme (default: @keynote/theme-default)') .option('--debug', 'build in development mode for debugging') .action((file = 'keynote.vue', { debug, dest, theme }) => { - const outDir = dest ? path.resolve(dest) : null + const outDir = dest ? require('path').resolve(dest) : null wrapCommand(require('./build'))({ file, debug, outDir, theme }) })
fix: Add missing import for path package
znck_vue-slides
train
js
3b568cd74b1f4a02c77e47f366c4c363eb7a2d8d
diff --git a/src/webui/src/components/Footer/index.js b/src/webui/src/components/Footer/index.js index <HASH>..<HASH> 100644 --- a/src/webui/src/components/Footer/index.js +++ b/src/webui/src/components/Footer/index.js @@ -49,7 +49,10 @@ export default class Footer extends React.Component { <div className={classes.right}> Powered by&nbsp; - <img className={classes.logo} src={logo} alt="Verdaccio" title="Verdaccio"/> + { /* Can't switch to HTTPS due it hosted on GitHub Pages */ } + <a href="http://www.verdaccio.org/"> + <img className={classes.logo} src={logo} alt="Verdaccio" title="Verdaccio"/> + </a> &nbsp;/&nbsp; {__APP_VERSION__} </div>
refactor: add links to verdaccio official website
verdaccio_verdaccio
train
js
2440bab3f8ff427b60819cf0f81bd97131da681d
diff --git a/lib/draw/Renderer.js b/lib/draw/Renderer.js index <HASH>..<HASH> 100644 --- a/lib/draw/Renderer.js +++ b/lib/draw/Renderer.js @@ -64,6 +64,8 @@ Renderer.prototype.drawCell = function drawCell(gfx, data) { } else if(!!data.content.tagName) { gfx.childNodes[0].appendChild(data.content); } + } else { + gfx.childNodes[0].textContent = ''; } this._eventBus.fire('cell.render', {
fix(renderer): update empty cells related to CAM-<I>, CAM-<I>
bpmn-io_table-js
train
js
ecd238e91846f3197ec7a441fa6a1f18eeb438b4
diff --git a/test/specs/modules/Search/Search-test.js b/test/specs/modules/Search/Search-test.js index <HASH>..<HASH> 100644 --- a/test/specs/modules/Search/Search-test.js +++ b/test/specs/modules/Search/Search-test.js @@ -462,7 +462,7 @@ describe('Search', () => { searchResultsIsOpen() // click outside - domEvent.click(document) + domEvent.click(document.body) searchResultsIsClosed() })
test(Search): fix tests on second run (#<I>)
Semantic-Org_Semantic-UI-React
train
js
bf39fba083ff71430ac6a204b4edf3ade1b92194
diff --git a/src/component/entity-form.js b/src/component/entity-form.js index <HASH>..<HASH> 100644 --- a/src/component/entity-form.js +++ b/src/component/entity-form.js @@ -1,5 +1,6 @@ -import {customElement, bindable} from 'aurelia-framework'; +import {customElement, bindable, computedFrom} from 'aurelia-framework'; import {resolvedView} from 'aurelia-view-manager'; +import {Metadata} from '../Metadata'; @resolvedView('spoonx/form', 'entity-form') @customElement('entity-form') @@ -11,18 +12,21 @@ export class EntityForm { @bindable skip = []; - attached() { - let types = this.entity.getMeta().metadata.types; + @computedFrom('entity') + get elements() { + let types = this.entity.getMeta().metadata.types; + let fields = Metadata.forTarget(this.entity).fetch('fields'); - this.elements = Object.keys(types).map(field => { + return Object.keys(types).map(field => { return { element: types[field], - field : field + field : field, + meta : fields[field] } }); } - isVisible (fieldName) { + isVisible(fieldName) { return this.skip.indexOf(fieldName) === -1; } }
refactor(entity-form): use metadata in form generation
SpoonX_aurelia-form
train
js
fdc54f2a99617932cd971078772038982d188d70
diff --git a/src/main/java/org/camunda/bpm/model/xml/test/AbstractModelElementInstanceTest.java b/src/main/java/org/camunda/bpm/model/xml/test/AbstractModelElementInstanceTest.java index <HASH>..<HASH> 100644 --- a/src/main/java/org/camunda/bpm/model/xml/test/AbstractModelElementInstanceTest.java +++ b/src/main/java/org/camunda/bpm/model/xml/test/AbstractModelElementInstanceTest.java @@ -146,6 +146,9 @@ public abstract class AbstractModelElementInstanceTest { modelInstance = modelElementTypeRule.getModelInstance(); model = modelElementTypeRule.getModel(); modelElementType = modelElementTypeRule.getModelElementType(); + assertThat(modelInstance).isNotNull(); + assertThat(model).isNotNull(); + assertThat(modelElementType).isNotNull(); } public abstract String getDefaultNamespace();
chore(test): ensure model element instance test was correctly setup
camunda_camunda-xml-model
train
java
64f1588595b1a03e3844fc1ddc458eb45d45f0c0
diff --git a/lib/config/babel.js b/lib/config/babel.js index <HASH>..<HASH> 100644 --- a/lib/config/babel.js +++ b/lib/config/babel.js @@ -6,10 +6,10 @@ module.exports = function (webpackConfig) { let babelConfig = { cacheDirectory: tmpDir, presets: [ + // https://segmentfault.com/a/1190000006930013 // http://leonshi.com/2016/03/16/babel6-es6-inherit-issue-in-ie10/ [require.resolve('babel-preset-es2015'), { - loose: true, - modules: false // tree-shaking优化, http://imweb.io/topic/5868e1abb3ce6d8e3f9f99bb + //modules: false // tree-shaking优化, http://imweb.io/topic/5868e1abb3ce6d8e3f9f99bb }], require.resolve('babel-preset-react'), require.resolve('babel-preset-stage-1')
refactor: improve babel config No longer support ie8
zuzucheFE_guido
train
js
0511cdc1c4096044bb59ec33e8e2fa411630dbc0
diff --git a/test/callback.js b/test/callback.js index <HASH>..<HASH> 100644 --- a/test/callback.js +++ b/test/callback.js @@ -181,7 +181,12 @@ describe('Callback', function () { process.removeAllListeners('uncaughtException') process.once('uncaughtException', function (e) { assert(/ffi/.test(e.message)) - listeners.forEach(process.emit.bind(process, 'uncaughtException')) + + // re-add Mocha's listeners + listeners.forEach(function (fn) { + process.on('uncaughtException', fn) + }) + done() })
test: properly re-add Mocha's uncaught listeners
node-ffi-napi_node-ffi-napi
train
js
7d25c7f3a64fd77127f49dfd3244e5d91c3ed033
diff --git a/src/index.js b/src/index.js index <HASH>..<HASH> 100644 --- a/src/index.js +++ b/src/index.js @@ -8,6 +8,8 @@ const { createCompiledModule, Module } = require("./compiler/compile/module"); const { Memory } = require("./interpreter/runtime/values/memory"); const { Table } = require("./interpreter/runtime/values/table"); const { checkEndianness } = require("./check-endianness"); +const { traverse } = require("./compiler/AST/traverse"); +const t = require("./compiler/AST/index"); const _debug = { parseWATF(content: string, cb: (ast: Program) => void) { @@ -24,7 +26,10 @@ const _debug = { const ast = parseBinary(content); cb(ast); - } + }, + + traverse, + t }; const WebAssembly = {
feat: expose ast types and traverse
xtuc_webassemblyjs
train
js
4b58456e9cb4defb3bd73a33cff93a9b8046cb89
diff --git a/src/OData/Client.php b/src/OData/Client.php index <HASH>..<HASH> 100644 --- a/src/OData/Client.php +++ b/src/OData/Client.php @@ -3,7 +3,7 @@ namespace Kily\Tools1C\OData; use Psr\Http\Message\ResponseInterface; -use GuzzleHttp\Exception\TransferException; +use GuzzleHttp\Exception\BadResponseException; use GuzzleHttp\Exception\ClientException; use GuzzleHttp\Client as Guzzle; @@ -193,8 +193,8 @@ class Client implements \ArrayAccess try { $resp = $this->client->request($method,$request_str,$options); $this->request_ok = true; - } catch(TransferException $e) { - if($e instanceof TransferException) { + } catch(BadResponseException $e) { + if($e instanceof BadResponseException) { if($e->hasResponse() && ($resp = $e->getResponse()) ) { $this->http_code = $resp->getStatusCode(); $this->http_message = $resp->getReasonPhrase();
fix(guzzle): that fixes #<I> issue
kilylabs_odata-1c
train
php
d99641f31e64d63623c7cf58d4355dccea7e80d0
diff --git a/cmd/init.go b/cmd/init.go index <HASH>..<HASH> 100644 --- a/cmd/init.go +++ b/cmd/init.go @@ -40,7 +40,7 @@ func newInitCmd() *initCmd { return err } defer gitignore.Close() - if _, err := gitignore.WriteString("dist/\n"); err != nil { + if _, err := gitignore.WriteString("\ndist/\n"); err != nil { return err } diff --git a/cmd/init_test.go b/cmd/init_test.go index <HASH>..<HASH> 100644 --- a/cmd/init_test.go +++ b/cmd/init_test.go @@ -32,7 +32,7 @@ func TestInitGitIgnoreExists(t *testing.T) { bts, err := os.ReadFile(".gitignore") require.NoError(t, err) - require.Equal(t, "mybinary\ndist/\n", string(bts)) + require.Equal(t, "mybinary\n\ndist/\n", string(bts)) } func TestInitFileExists(t *testing.T) {
fix: gitignore patching needs leading newline (#<I>)
goreleaser_goreleaser
train
go,go
c337f583d0063679b4251573d4d8120717fbd033
diff --git a/src/main/java/com/synopsys/integration/bdio/model/Forge.java b/src/main/java/com/synopsys/integration/bdio/model/Forge.java index <HASH>..<HASH> 100644 --- a/src/main/java/com/synopsys/integration/bdio/model/Forge.java +++ b/src/main/java/com/synopsys/integration/bdio/model/Forge.java @@ -30,10 +30,9 @@ import java.util.List; import java.util.Map; import java.util.stream.Collectors; -import com.synopsys.integration.util.Stringable; import org.apache.commons.lang3.StringUtils; -import org.apache.commons.lang3.builder.EqualsBuilder; -import org.apache.commons.lang3.builder.HashCodeBuilder; + +import com.synopsys.integration.util.Stringable; public class Forge extends Stringable { // forges that use the slash as the separator
refactor(import): Cleaned up unused imports.
blackducksoftware_integration-bdio
train
java
b5cedbaa6a1989d55ec470f15b0ee34d4bf92f7f
diff --git a/src/utils/pluginOptions.js b/src/utils/pluginOptions.js index <HASH>..<HASH> 100644 --- a/src/utils/pluginOptions.js +++ b/src/utils/pluginOptions.js @@ -6,7 +6,7 @@ const defaultSettings = { const defaultMethods = ['debug', 'error', 'exception', 'info', 'log', 'warn']; -// this should deep merge in the furture when we are dealing with more than just flags +// this should deep merge in the future when we are dealing with more than just flags const mergeOptions = options => { const sanitizedOptions = Object.keys(options || {}) .filter(key => Object.keys(defaultSettings).includes(key))
chore(docs): update typo
kwelch_babel-plugin-captains-log
train
js
c7b261b08803b6c4a0b185a9bac26e8725cf3e5d
diff --git a/src/material/semantic.js b/src/material/semantic.js index <HASH>..<HASH> 100644 --- a/src/material/semantic.js +++ b/src/material/semantic.js @@ -176,10 +176,8 @@ const semantic = { if (Number(normalMap.uv) === 1) { return mesh.geometry.tangents1; } - return mesh.geometry.tangents; } - - return undefined; + return mesh.geometry.tangents; } },
fix: Semantic Tangent data should also be returned when there is no normal map
hiloteam_Hilo3d
train
js
44fd9a78f55ece65754b28bde42f2e2669511993
diff --git a/lib/ditty/controllers/component_controller.rb b/lib/ditty/controllers/component_controller.rb index <HASH>..<HASH> 100644 --- a/lib/ditty/controllers/component_controller.rb +++ b/lib/ditty/controllers/component_controller.rb @@ -96,7 +96,7 @@ module Ditty entity = read!(id) authorize entity, :update - flash[:redirect_to] = "#{base_path}/#{entity.display_id}" + flash[:redirect_to] = "#{base_path}/#{entity.display_id}" unless flash.keep(:redirect_to) haml :"#{view_location}/edit", locals: { entity: entity, title: heading(:edit) }, layout: layout
fix: Allow customization of redirect after updating
EagerELK_ditty
train
rb
30eecad512e786b3fcbaa2e235d470a394f4d963
diff --git a/cli/index.js b/cli/index.js index <HASH>..<HASH> 100755 --- a/cli/index.js +++ b/cli/index.js @@ -12,9 +12,6 @@ process.env.VERBOSE = let cmd = process.argv[2] switch(cmd) { - case '.': // Watch current root - watch(process.cwd()) - break case 'start': // Start the daemon let starting = wch.start() if (starting) { @@ -65,6 +62,10 @@ switch(cmd) { v: true, // verbose errors }) + // Watch the current directory. + if (args._ == '.') + return watch(process.cwd()) + if (Array.isArray(args.x) && !args.w) fatal('Cannot use -x without -w')
fix(cli): fail if wch . has any flags
aleclarson_wch
train
js
c67cdfd283212aff8e18f9a486b81e99159b5297
diff --git a/lib/run/index.js b/lib/run/index.js index <HASH>..<HASH> 100644 --- a/lib/run/index.js +++ b/lib/run/index.js @@ -132,10 +132,15 @@ Runner.prototype.initFramework = function() { testProcess.stderr.setEncoding('utf8'); testProcess.stdout.on('data', data => { + if (typeof data === 'string') { + data = data.replace(/\r?\n|\r$/, ''); + } this.emit('data', data); }); - testProcess.stderr.on('data', data => { + if (typeof data === 'string') { + data = data.replace(/\r?\n|\r$/, ''); + } this.emit('data', data); });
fix(logging): fix empty links between test cases (#<I>)
macacajs_macaca-cli
train
js
a78a0af1b2dd5350e990d2609fc5c83425b64c02
diff --git a/lib/module.js b/lib/module.js index <HASH>..<HASH> 100644 --- a/lib/module.js +++ b/lib/module.js @@ -60,10 +60,11 @@ const report = _.curry(function(options, results) { }); function makeLinter(options) { - const parser = options.directories ? pathParsers.fullPathParser : pathParsers.fileNameParser; + const regexp = new RegExp('(' + options.extensionName + ')$'); + const parser = options.extensions ? pathParsers.fileExtensionParser : (options.directories ? pathParsers.fullPathParser : pathParsers.fileNameParser); return new Linter({ pathParser: parser, - matcher: matchers[options.format] + matcher: options.extensions ? matchers.makeRegexStringTest(regexp) : matchers[options.format] }); }
feat(file-extension-parser): added parsing condition
usabilla_fnlint
train
js
f8dd54145392ee015df9a9cb8e5b46520e2f6002
diff --git a/index.js b/index.js index <HASH>..<HASH> 100644 --- a/index.js +++ b/index.js @@ -9,6 +9,7 @@ module.exports = ddescribeIit; function ddescribeIit(opt) { 'use strict'; opt = opt || { allowDisabledTests: true, noColor: false }; + // istanbul ignore next --- To many variables to cover in testing var supports_colors = (function() { if (opt.noColor) return false; if (process.argv.indexOf('--no-color') !== -1) return false; @@ -185,7 +186,7 @@ function ddescribeIit(opt) { } if (len === 1) x = '000' + x; else if (len === 2) x = '00' + x; - else if (len === 3) x = '0' + x; + // TODO(@caitp): Add support for > 8bit codepoints if ever needed return x; }
chore(ddescribe-iit): get that <I>% coverage report
caitp_gulp-ddescribe-iit
train
js
361263cc6d80577d6dffddd50c98099595c523bb
diff --git a/satpy/tests/test_readers.py b/satpy/tests/test_readers.py index <HASH>..<HASH> 100644 --- a/satpy/tests/test_readers.py +++ b/satpy/tests/test_readers.py @@ -691,6 +691,7 @@ class TestYAMLFiles(unittest.TestCase): reader_names = available_readers(yaml_loader=yaml.BaseLoader) self.assertIn('abi_l1b', reader_names) # needs netcdf4 + self.assertIn('viirs_l1b', reader_names) self.assertEqual(len(reader_names), len(list(glob_config('readers/*.yaml'))))
refactor: add another reader name to check
pytroll_satpy
train
py
60d23b2921ec0c1d6abfabd1501ddcf9b9ce174a
diff --git a/src/Leevel/Database/Ddd/Entity.php b/src/Leevel/Database/Ddd/Entity.php index <HASH>..<HASH> 100644 --- a/src/Leevel/Database/Ddd/Entity.php +++ b/src/Leevel/Database/Ddd/Entity.php @@ -786,9 +786,8 @@ abstract class Entity implements IArray, IJson, JsonSerializable, ArrayAccess */ public function withProp(string $prop, $value, bool $force = true, bool $ignoreReadonly = false, bool $ignoreUndefinedProp = false): self { - $prop = static::normalize($prop); - try { + $prop = static::normalize($prop); $this->validate($prop); } catch (InvalidArgumentException $e) { if ($ignoreUndefinedProp) { @@ -1115,7 +1114,7 @@ abstract class Entity implements IArray, IJson, JsonSerializable, ArrayAccess } /** - * 获取主键. + * 获取主键值. * * - 唯一标识符. *
refactor(ddd): code poem
hunzhiwange_framework
train
php
33dad3906ff221d99310242447901e81391fd4fb
diff --git a/packages/@vue/cli-service/lib/config/base.js b/packages/@vue/cli-service/lib/config/base.js index <HASH>..<HASH> 100644 --- a/packages/@vue/cli-service/lib/config/base.js +++ b/packages/@vue/cli-service/lib/config/base.js @@ -33,7 +33,7 @@ module.exports = (api, options) => { .end() .output .path(api.resolve(options.outputDir)) - .filename(isLegacyBundle ? '[name]-legacy.js' : '[name].js') + .filename(isLegacyBundle ? '[name]-legacy.[hash:8].js' : '[name].[hash:8].js') .publicPath(options.baseUrl) webpackConfig.resolve
fix: add hash to filename in development mode (#<I>) to circumvent a Safari caching issue closes #<I>, #<I>
vuejs_vue-cli
train
js
b2335395d133e96c0e784c110efc8ea624d23acc
diff --git a/EventListener/BugsnagListener.php b/EventListener/BugsnagListener.php index <HASH>..<HASH> 100644 --- a/EventListener/BugsnagListener.php +++ b/EventListener/BugsnagListener.php @@ -84,7 +84,8 @@ class BugsnagListener implements EventSubscriberInterface } /** - * Handle a console exception. + * Handle a console exception (used instead of ConsoleErrorEvent before + * Symfony 3.3 and kept for backwards compatibility). * * @param \Symfony\Component\Console\Event\ConsoleExceptionEvent $event * diff --git a/Tests/Listener/BugsnagListenerTest.php b/Tests/Listener/BugsnagListenerTest.php index <HASH>..<HASH> 100644 --- a/Tests/Listener/BugsnagListenerTest.php +++ b/Tests/Listener/BugsnagListenerTest.php @@ -52,9 +52,6 @@ class BugsnagListenerTest extends TestCase $listener->onKernelException($event); } - /** - * @requires class foo - */ public function testOnConsoleError() { if (!class_exists('Symfony\Component\Console\Event\ConsoleErrorEvent')) {
style: phpdoc changes following review
bugsnag_bugsnag-symfony
train
php,php
66abfcf77f586959883e66eaa166bb29c5649770
diff --git a/packages/react/src/components/FileUploader/FileUploader.js b/packages/react/src/components/FileUploader/FileUploader.js index <HASH>..<HASH> 100644 --- a/packages/react/src/components/FileUploader/FileUploader.js +++ b/packages/react/src/components/FileUploader/FileUploader.js @@ -298,6 +298,12 @@ export default class FileUploader extends Component { name: PropTypes.string, /** + * Provide an optional `onChange` hook that is called each time the input is + * changed + */ + onChange: PropTypes.func, + + /** * Provide an optional `onClick` hook that is called each time the button is * clicked */ @@ -347,7 +353,9 @@ export default class FileUploader extends Component { Array.prototype.map.call(evt.target.files, file => file.name) ), }); - this.props.onChange(evt); + if (this.props.onChange) { + this.props.onChange(evt); + } }; handleClick = (evt, index) => {
feat(file-uploader): add support for onChange (#<I>)
carbon-design-system_carbon-components
train
js
84b852c45751930fdf8850c519509bdb2e5a5e38
diff --git a/superset/connectors/sqla/models.py b/superset/connectors/sqla/models.py index <HASH>..<HASH> 100644 --- a/superset/connectors/sqla/models.py +++ b/superset/connectors/sqla/models.py @@ -920,6 +920,7 @@ class SqlaTable(Model, BaseDatasource): # pylint: disable=too-many-public-metho data_["is_sqllab_view"] = self.is_sqllab_view data_["health_check_message"] = self.health_check_message data_["extra"] = self.extra + data_["owners"] = self.owners_data return data_ @property diff --git a/tests/integration_tests/datasource_tests.py b/tests/integration_tests/datasource_tests.py index <HASH>..<HASH> 100644 --- a/tests/integration_tests/datasource_tests.py +++ b/tests/integration_tests/datasource_tests.py @@ -290,6 +290,8 @@ class TestDatasource(SupersetTestCase): self.compare_lists(datasource_post[k], resp[k], "metric_name") elif k == "database": self.assertEqual(resp[k]["id"], datasource_post[k]["id"]) + elif k == "owners": + self.assertEqual([o["id"] for o in resp[k]], datasource_post["owners"]) else: print(k) self.assertEqual(resp[k], datasource_post[k])
fix: properly set `owners` to Sqlatable.owners_data inside payload (#<I>) * properly set owners_data for sqlatabl * fix test
apache_incubator-superset
train
py,py
6f4bc7727de8ab044314536c6ab5b966a90fa6b9
diff --git a/lib/dashboard/public/single_instances.js b/lib/dashboard/public/single_instances.js index <HASH>..<HASH> 100644 --- a/lib/dashboard/public/single_instances.js +++ b/lib/dashboard/public/single_instances.js @@ -19,6 +19,10 @@ document.addEventListener('DOMContentLoaded', () => { continue; } + if (!newVal[url]) { + return; + } + const siEl = document.createElement('ncg-single-instance'); siEl.url = url; instancesList.appendChild(siEl);
fix(single_instance): fix "Kill" buttons always being visible, even if no instance was open
nodecg_nodecg
train
js
95df2bca66bb7f3ecb32f8ad95e39f3cd58b5860
diff --git a/coursera/test/test_credentials.py b/coursera/test/test_credentials.py index <HASH>..<HASH> 100644 --- a/coursera/test/test_credentials.py +++ b/coursera/test/test_credentials.py @@ -46,8 +46,8 @@ def test_get_credentials_with_invalid_netrc_raises_exception(): def test_get_credentials_with_username_and_password_given(): - username, password = credentials.get_credentials( - username='user', password='pass') + username, password = credentials.get_credentials(username='user', + password='pass') assert username == 'user' assert password == 'pass' @@ -57,8 +57,8 @@ def test_get_credentials_with_username_given(use_keyring=False): _getpass = getpass.getpass getpass.getpass = lambda x: 'pass' - username, password = credentials.get_credentials( - username='user', use_keyring=use_keyring) + username, password = credentials.get_credentials(username='user', + use_keyring=use_keyring) assert username == 'user' assert password == 'pass' @@ -76,7 +76,7 @@ def test_get_credentials_with_keyring(): test_get_credentials_with_username_given(True) # Test again, this time without getpass - username, password = credentials.get_credentials( - username='user', use_keyring=True) + username, password = credentials.get_credentials(username='user', + use_keyring=True) assert username == 'user' assert password == 'pass'
test: test_credentials: Use more natural/readable wrapping.
coursera-dl_coursera-dl
train
py
573b434d2fb608978438349e16ed2c245fc046d3
diff --git a/lib/config/massage.js b/lib/config/massage.js index <HASH>..<HASH> 100644 --- a/lib/config/massage.js +++ b/lib/config/massage.js @@ -20,6 +20,15 @@ function massageConfig(config) { massagedConfig[key] = [val]; } else if (isObject(val)) { massagedConfig[key] = massageConfig(val); + } else if (Array.isArray(val)) { + massagedConfig[key] = []; + val.forEach(item => { + if (isObject(item)) { + massagedConfig[key].push(massageConfig(item)); + } else { + massagedConfig[key].push(item); + } + }); } } return massagedConfig;
fix: arrays of objects should be massaged (#<I>)
renovatebot_renovate
train
js
e19693caa899f1aee222f54ace55f4a369c6d2e9
diff --git a/src/runner.js b/src/runner.js index <HASH>..<HASH> 100644 --- a/src/runner.js +++ b/src/runner.js @@ -262,6 +262,7 @@ async function runTests() { } toggleCallsites(true) + const finished = [] try { if (!focused && files.length == 1) { console.log('') @@ -269,6 +270,8 @@ async function runTests() { for (let i = 0; i < files.length; i++) { if (!this.stopped) { const file = files[i] + const running = new RunningFile(file, this) + if (focused || files.length > 1) { const header = file.header || path.relative(process.cwd(), file.path) @@ -277,7 +280,9 @@ async function runTests() { console.log(new Array(header.length).fill('⎼').join('')) console.log(bold(header) + '\n') } - await runGroup(file.group) + + await runGroup(running.group) + finished.push(running) } } } catch(error) { @@ -291,7 +296,7 @@ async function runTests() { this.finished = true let testCount = 0, passCount = 0, failCount = 0 - files.forEach(file => { + finished.forEach(file => { testCount += file.testCount passCount += file.passCount failCount += file.failCount
fix: test results The `testCount`, `passCount`, and `failCount` were evaluating to NaN because File instances were used instead of RunningFile instances.
aleclarson_testpass
train
js
d6c6cf472ce99834c2d255e407c139342a065ae6
diff --git a/src/nodes/entity/switch-controller.js b/src/nodes/entity/switch-controller.js index <HASH>..<HASH> 100644 --- a/src/nodes/entity/switch-controller.js +++ b/src/nodes/entity/switch-controller.js @@ -26,11 +26,10 @@ class Switch extends EntityNode { } onHaEventMessage(evt) { + const stateChanged = + evt.type === 'state_changed' && evt.state !== this.isEnabled; super.onHaEventMessage(evt); - if ( - evt.type === 'state_changed' && - this.nodeConfig.outputOnStateChange - ) { + if (stateChanged && this.nodeConfig.outputOnStateChange) { // fake a HA entity const entity = { state: this.isEnabled,
fix(entity): Only output state change when the state actually changes The entity switch would output anytime the state_changed event was received even when the state didn't change Closes #<I>
zachowj_node-red-contrib-home-assistant-websocket
train
js
347df5d93ac3e9ffa1d21253237d7ca3466b5d8c
diff --git a/packages/cli/src/utils/hosting/hosting.js b/packages/cli/src/utils/hosting/hosting.js index <HASH>..<HASH> 100644 --- a/packages/cli/src/utils/hosting/hosting.js +++ b/packages/cli/src/utils/hosting/hosting.js @@ -280,7 +280,7 @@ class Hosting { } getURL () { - return `https://${this.name}--${session.project.instance}.${this.hostingHost}` + return `https://${this.name}--${session.project.instance}.${session.location}.${this.hostingHost}` } encodePath (pathToEncode) {
fix(cli): proper url for hosting
Syncano_syncano-node
train
js
a860d043002158e117e9797a4ba25620bcde7163
diff --git a/packages/components/bolt-text/__tests__/text.js b/packages/components/bolt-text/__tests__/text.js index <HASH>..<HASH> 100644 --- a/packages/components/bolt-text/__tests__/text.js +++ b/packages/components/bolt-text/__tests__/text.js @@ -71,7 +71,7 @@ describe('<bolt-text> Component', () => { const image = await page.screenshot(); expect(image).toMatchImageSnapshot({ - failureThreshold: '0.01', + failureThreshold: '0.03', failureThresholdType: 'percent', });
test: increase failure threshold to 3%
bolt-design-system_bolt
train
js
090720bbc7e061ef9fa27fd3a5e060f68c0bcb3e
diff --git a/module.flow.js b/module.flow.js index <HASH>..<HASH> 100644 --- a/module.flow.js +++ b/module.flow.js @@ -198,6 +198,10 @@ declare module '@solana/web3.js' { keys: Array<{pubkey: PublicKey, isSigner: boolean, isDebitable: boolean}>; programId: PublicKey; data: Buffer; + + constructor( + opts?: TransactionInstructionCtorFields, + ): TransactionInstruction; } declare type SignaturePubkeyPair = {|
fix: add transaction instruction ctor to flow def (#<I>)
solana-labs_solana-web3.js
train
js
419dd00c2d84509e18270fdf54bcd6681576d4d9
diff --git a/tests/index.js b/tests/index.js index <HASH>..<HASH> 100644 --- a/tests/index.js +++ b/tests/index.js @@ -676,7 +676,8 @@ describe('inputNumber', () => { }); // https://github.com/ant-design/ant-design/issues/5012 - it('controller InputNumber should be able to input number like 1.00*', () => { + // https://github.com/react-component/input-number/issues/64 + it('controller InputNumber should be able to input number like 1.00* and 1.10*', () => { let num; const Demo = createReactClass({ getInitialState() { @@ -706,6 +707,13 @@ describe('inputNumber', () => { Simulate.blur(inputElement); expect(inputElement.value).to.be('6'); expect(num).to.be(6); + Simulate.focus(inputElement); + Simulate.change(inputElement, { target: { value: '6.10' } }); + expect(inputElement.value).to.be('6.10'); + expect(num).to.be('6.10'); + Simulate.blur(inputElement); + expect(inputElement.value).to.be('6.1'); + expect(num).to.be(6.1); }); it('onChange should not be called when input is not changed', () => {
test: add test for #<I>
react-component_input-number
train
js
72a27f4144f9bd0f2f23b461cabfb73bc9d51c66
diff --git a/test/index.js b/test/index.js index <HASH>..<HASH> 100644 --- a/test/index.js +++ b/test/index.js @@ -34,7 +34,7 @@ describe('migrator', function() { fakeHexo.call('migrate', { _: ['rss', 'https://github.com/danmactough/node-feedparser/raw/master/test/feeds/rss2sample.xml'] }, function(err) { if (err) throw err; - fakeHexo.setValues.receivedPosts.length.should.be.gt(0); + fakeHexo.setValues.receivedPosts.length.should.eql(0); should.not.exist(fakeHexo.setValues.receivedPosts[0].alias); done(); }); @@ -46,7 +46,7 @@ describe('migrator', function() { fakeHexo.call('migrate', { _: ['rss', 'https://github.com/danmactough/node-feedparser/raw/master/test/feeds/rss2sample.xml'], alias: true }, function(err) { if (err) throw err; - fakeHexo.setValues.receivedPosts.length.should.be.gt(0); + fakeHexo.setValues.receivedPosts.length.should.eql(0); should.exist(fakeHexo.setValues.receivedPosts[0].alias, 'alias missing'); done(); });
refactor: use should.eql
hexojs_hexo-migrator-rss
train
js
8085a98f642bc32f21230b378a81fa08edebd11b
diff --git a/packages/metascraper/src/get-data.js b/packages/metascraper/src/get-data.js index <HASH>..<HASH> 100644 --- a/packages/metascraper/src/get-data.js +++ b/packages/metascraper/src/get-data.js @@ -11,13 +11,13 @@ const { const xss = require('xss') -const getValue = async ({ htmlDom, jsonLd, url, conditions, meta }) => { +const getValue = async ({ htmlDom, url, conditions, meta }) => { const lastIndex = conditions.length let index = 0 let value while (isEmpty(value) && index < lastIndex) { - value = await conditions[index++]({ htmlDom, jsonLd, url, meta }) + value = await conditions[index++]({ htmlDom, url, meta }) } return value
refactor: removed unreferenced code
microlinkhq_metascraper
train
js
eed319646ab9b5c548e064f3b2ca320084b9a9cf
diff --git a/webapps/ui/cockpit/client/scripts/directives/time-to-live.js b/webapps/ui/cockpit/client/scripts/directives/time-to-live.js index <HASH>..<HASH> 100644 --- a/webapps/ui/cockpit/client/scripts/directives/time-to-live.js +++ b/webapps/ui/cockpit/client/scripts/directives/time-to-live.js @@ -41,8 +41,14 @@ module.exports = ['camAPI', '$window' , 'Notifications', function(camAPI, $windo }; function updateValue(timeToLive) { + var id = ( + $scope.definition.id || + $scope.definition.processDefinitionId || + $scope.definition.caseDefinitionId || + $scope.definition.decisionDefinitionId + ); return resource.updateHistoryTimeToLive( - $scope.definition.id, + id, { historyTimeToLive: timeToLive }
feat(time-to-live): update time-to-live to handle different keys for definitionId Related to CAM-<I>
camunda_camunda-bpm-platform
train
js
a545a53f6e1d03f9b016c8032c05a377a79bfbcc
diff --git a/workflow/cron/operator.go b/workflow/cron/operator.go index <HASH>..<HASH> 100644 --- a/workflow/cron/operator.go +++ b/workflow/cron/operator.go @@ -136,7 +136,7 @@ func (woc *cronWfOperationCtx) persistUpdate() { } var reapplyErr error _, reapplyErr = woc.reapplyUpdate() - if err != nil { + if reapplyErr != nil { woc.log.WithError(reapplyErr).WithField("original error", err).Error("failed to update CronWorkflow after reapply attempt") return }
fix(controller): Check the correct object for Cronworkflow reapply error log (#<I>)
argoproj_argo
train
go
a8d413f0fa2a4701672d2b673c24693df9455160
diff --git a/test/fork-listen2-problem.tap.js b/test/fork-listen2-problem.tap.js index <HASH>..<HASH> 100644 --- a/test/fork-listen2-problem.tap.js +++ b/test/fork-listen2-problem.tap.js @@ -3,12 +3,10 @@ var fork = require('child_process').fork; var test = require('tap').test; -test("parent listener", function (t) { - var server = require('net').createServer(); +var server - this.tearDown(function () { - server.close(); - }); +test("parent listener", function (t) { + server = require('net').createServer(); server.listen(8585, function () { t.ok(server, "parent listening on port 8585"); @@ -20,11 +18,16 @@ test("parent listener", function (t) { if (message === 'shutdown') { t.ok(message, "child handled error properly"); listener.send('shutdown'); - t.end(); } else { t.fail("parent got unexpected message " + message); } + t.end(); }); }); }); + +test("tearDown", function (t) { + server.close(); + t.end(); +})
test: tearDown went away in tap@1
othiym23_async-listener
train
js
867109bb8eb557fce738ea5241572bfb7f4fe6d7
diff --git a/library/Benri/Controller/Abstract.php b/library/Benri/Controller/Abstract.php index <HASH>..<HASH> 100644 --- a/library/Benri/Controller/Abstract.php +++ b/library/Benri/Controller/Abstract.php @@ -66,7 +66,7 @@ abstract class Benri_Controller_Abstract extends Zend_Rest_Controller /** * Disable the view layout. * - * @return Benri_Controller_Action + * @return self */ protected function disableLayout() { @@ -185,7 +185,7 @@ abstract class Benri_Controller_Abstract extends Zend_Rest_Controller * * @param Benri_Db_Table_Row * @param mixed Data to normalize and save into the model - * @return Benri_Controller_Rest + * @return self * @throws Zend_Db_Table_Row_Exception */ protected function _saveModel(Benri_Db_Table_Row &$model, $data = null)
chore: improve some php docblocks
douggr_benri
train
php
9d5e95518e0ec757cd5c4b83f27ff872d217e24e
diff --git a/packages/bonde-styleguide/src/cards/Card/Card.js b/packages/bonde-styleguide/src/cards/Card/Card.js index <HASH>..<HASH> 100644 --- a/packages/bonde-styleguide/src/cards/Card/Card.js +++ b/packages/bonde-styleguide/src/cards/Card/Card.js @@ -33,6 +33,10 @@ const CardTitle = ({ children }) => ( </Text> ) +const NoTitle = styled.div` + height: 46px; +` + /** * The only true card. */ @@ -43,7 +47,10 @@ const Card = styled(({ ...boxProps }) => ( <div className={className}> - {title && (<CardTitle>{title}</CardTitle>)} + {!title ? + <NoTitle /> : + <CardTitle>{title}</CardTitle> + } <CardBox {...boxProps}> {children} </CardBox>
fix(styleguide): keep the space of card title
nossas_bonde-client
train
js
ce7a4bd9473c2e7368836c09ea476cacbba863cb
diff --git a/www/src/components/ComponentApi.js b/www/src/components/ComponentApi.js index <HASH>..<HASH> 100644 --- a/www/src/components/ComponentApi.js +++ b/www/src/components/ComponentApi.js @@ -37,6 +37,7 @@ function ComponentApi({ heading, metadata, exportedBy }) { <ImportApi name={importName} /> {/* use composes here */} + {/* eslint-disable-next-line react/no-danger */} {descHtml && <div dangerouslySetInnerHTML={{ __html: descHtml }} />} <PropTable metadata={metadata} /> </>
fix: added eslint pragma for ignoring dangerouslySetInnerHTML
react-bootstrap_react-bootstrap
train
js
6f0a8b5d1f40b68f37b3ff1ea7651949c137049e
diff --git a/lib/ha-websocket.js b/lib/ha-websocket.js index <HASH>..<HASH> 100644 --- a/lib/ha-websocket.js +++ b/lib/ha-websocket.js @@ -285,6 +285,15 @@ class HaWebsocket extends EventEmitter { this.states[emitEvent.entity_id] = emitEvent.event.new_state; } + // If old_state is null the state_changed was fired due to reloading of yaml files only send to events:all node + if ( + emitEvent.event_type === 'state_changed' && + emitEvent.event.old_state !== null + ) { + this.emit('ha_events:all', emitEvent); + return; + } + // Emit on the event type channel if (emitEvent.event_type) { this.emit(`ha_events:${msg.event_type}`, emitEvent);
fix: ignore state_changed event if old_state is null * reloading of yaml files now triggers state_changed events * only emit these events to the events:all node Fixes #<I>
zachowj_node-red-contrib-home-assistant-websocket
train
js
609efb2c61af1d4c4cd9e200f4d8fa3c84357140
diff --git a/eve_elastic/elastic.py b/eve_elastic/elastic.py index <HASH>..<HASH> 100644 --- a/eve_elastic/elastic.py +++ b/eve_elastic/elastic.py @@ -291,8 +291,8 @@ class Elastic(DataLayer): ids = [] kwargs.update(self._es_args(resource)) for doc in doc_or_docs: - doc.update(self.es.index(body=doc, id=doc.get('_id'), **kwargs)) - ids.append(doc['_id']) + res = self.es.index(body=doc, id=doc.get('_id'), **kwargs) + ids.append(res.get('_id', doc.get('_id'))) get_indices(self.es).refresh(self.index) return ids
fix(insert): don't extend document on insert it should avoid adding elastic internal data to docs like _version, _index, _type
petrjasek_eve-elastic
train
py
c07207f219268010ace0dc6c35b518e990b2865b
diff --git a/src/util/Util.js b/src/util/Util.js index <HASH>..<HASH> 100644 --- a/src/util/Util.js +++ b/src/util/Util.js @@ -483,11 +483,11 @@ class Util extends null { * @returns {Collection} */ static discordSort(collection) { + const isGuildChannel = collection.first() instanceof GuildChannel; return collection.sorted( - (a, b) => - a.rawPosition - b.rawPosition || - parseInt(b.id.slice(0, -10)) - parseInt(a.id.slice(0, -10)) || - parseInt(b.id.slice(10)) - parseInt(a.id.slice(10)), + isGuildChannel + ? (a, b) => a.rawPosition - b.rawPosition || Number(BigInt(a.id) - BigInt(b.id)) + : (a, b) => a.rawPosition - b.rawPosition || Number(BigInt(b.id) - BigInt(a.id)), ); } @@ -616,3 +616,6 @@ class Util extends null { } module.exports = Util; + +// Fixes Circular +const GuildChannel = require('../structures/GuildChannel');
fix(Util): fix sorting for GuildChannels (#<I>)
discordjs_discord.js
train
js