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
a0da0b64e648161ea24f7b72b2b3c29042f125c8
diff --git a/pygreen.py b/pygreen.py index <HASH>..<HASH> 100644 --- a/pygreen.py +++ b/pygreen.py @@ -37,7 +37,7 @@ class PyGreen: collection_size=100, ) # A list of regular expression. Files whose the name match - # one of those regular expressions will not be outputed when generating + # one of those regular expressions will not be outputted when generating # a static version of the web site self.file_exclusion = [r".*\.mako", r".*\.py", r"(^|.*\/)\..*"] def is_public(path): @@ -94,7 +94,7 @@ class PyGreen: def get(self, path): """ - Get the content of a file, indentified by its path relative to the folder configured + Get the content of a file, identified by its path relative to the folder configured in PyGreen. If the file extension is one of the extensions that should be processed through Mako, it will be processed. """
docs: Fix a few typos There are small typos in: - pygreen.py Fixes: - Should read `outputted` rather than `outputed`. - Should read `identified` rather than `indentified`.
nicolas-van_pygreen
train
py
4d26589f6d37d9fe6e7a65eedaf19e4fbf9bcded
diff --git a/src/k8s/statefulSet.js b/src/k8s/statefulSet.js index <HASH>..<HASH> 100644 --- a/src/k8s/statefulSet.js +++ b/src/k8s/statefulSet.js @@ -66,7 +66,7 @@ function checkStatefulSet (client, namespace, name, outcome, resolve, wait) { }, ms) } -function createStatefulSet (client, statefulSet) { +function createStatefulSet (client, deletes, statefulSet) { const namespace = statefulSet.metadata.namespace || 'default' const name = statefulSet.metadata.name let create = (resolve, reject) =>
fix: added deletes param to createStatefulSet
npm-wharf_hikaru
train
js
e3c1c0c86c1d5c3e60588c2fdc2739afd81e0109
diff --git a/src/consumer/runner.js b/src/consumer/runner.js index <HASH>..<HASH> 100644 --- a/src/consumer/runner.js +++ b/src/consumer/runner.js @@ -113,6 +113,18 @@ module.exports = class Runner extends EventEmitter { continue } + if (e.type === 'UNKNOWN_MEMBER_ID') { + this.logger.error('The coordinator is not aware of this member, re-joining the group', { + groupId: this.consumerGroup.groupId, + memberId: this.consumerGroup.memberId, + error: e.message, + }) + + this.consumerGroup.memberId = null + await this.consumerGroup.joinAndSync() + continue + } + this.onCrash(e) break } @@ -401,7 +413,11 @@ module.exports = class Runner extends EventEmitter { return } - if (isRebalancing(e) || e.name === 'KafkaJSNotImplemented') { + if ( + isRebalancing(e) || + e.type === 'UNKNOWN_MEMBER_ID' || + e.name === 'KafkaJSNotImplemented' + ) { return bail(e) }
fix: handle unknown_member_id from offsetCommit
tulios_kafkajs
train
js
487541e1778dd6c57f6fcb0a482a02e1bcd5f25d
diff --git a/conftest.py b/conftest.py index <HASH>..<HASH> 100644 --- a/conftest.py +++ b/conftest.py @@ -25,11 +25,18 @@ def client_token(client): def clean_response(response): """Remove a few info from the response before writing cassettes.""" - if not isinstance(response, dict): - return response - response["headers"].pop("Set-Cookie", None) - response["headers"].pop("Date", None) - response["headers"].pop("P3P", None) + remove_headers = {"Set-Cookie", "Date", "P3P"} + if isinstance(response["headers"], dict): + # Normal client stores headers as dict + for header_name in remove_headers: + response["headers"].pop(header_name, None) + elif isinstance(response["headers"], list): + # Tornado client stores headers as a list of 2-tuples + response["headers"] = [ + (name, value) + for name, value in response["headers"] + if name not in remove_headers + ] return response
test: make clean response work with tornado client
browniebroke_deezer-python
train
py
9f6eb0ef65a57c1d69f9a0917e9587c222e590c7
diff --git a/packer/build.go b/packer/build.go index <HASH>..<HASH> 100644 --- a/packer/build.go +++ b/packer/build.go @@ -312,10 +312,10 @@ PostProcessorRunSeqLoop: } keep := defaultKeep - // When user has not set keep_input_artifuact + // When user has not set keep_input_artifact // corePP.keepInputArtifact is nil. // In this case, use the keepDefault provided by the postprocessor. - // When user _has_ set keep_input_atifact, go with that instead. + // When user _has_ set keep_input_artifact, go with that instead. // Exception: for postprocessors that will fail/become // useless if keep isn't true, heed forceOverride and keep the // input artifact regardless of user preference.
fix: mispelled variables names in packer/build.go (#<I>)
hashicorp_packer
train
go
63a113d56453befd615b3e519723ce8e81f79ea0
diff --git a/src/Multipart/index.js b/src/Multipart/index.js index <HASH>..<HASH> 100644 --- a/src/Multipart/index.js +++ b/src/Multipart/index.js @@ -122,7 +122,7 @@ class Multipart { /** * No one wants to read this file, so simply advance it */ - if (!handler || !handler.callback) { + if (!handler || !handler.callback || !part.filename) { return Promise.resolve() }
fix(multipart): do not process file when filename is empty
adonisjs_adonis-bodyparser
train
js
9a2368427d173d1144e45af405737f149069efea
diff --git a/packages/browser/test/integration/common/init.js b/packages/browser/test/integration/common/init.js index <HASH>..<HASH> 100644 --- a/packages/browser/test/integration/common/init.js +++ b/packages/browser/test/integration/common/init.js @@ -43,7 +43,7 @@ function initSDK() { // One of the tests use manually created breadcrumb without eventId and we want to let it through if ( - breadcrumb.category.indexOf("sentry" === 0) && + breadcrumb.category.indexOf("sentry") === 0 && breadcrumb.event_id && !window.allowSentryBreadcrumbs ) {
fix: Act on allowSentryBreadcrumbs when appropriate (#<I>) The included test, to check for a breadcrumb category starting with "sentry", was improperly written.
getsentry_sentry-javascript
train
js
ec7f0ad2392d898833cf9db1024651f9e67e92d4
diff --git a/src/master/master.js b/src/master/master.js index <HASH>..<HASH> 100644 --- a/src/master/master.js +++ b/src/master/master.js @@ -83,6 +83,18 @@ export const isActionFromAuthenticPlayer = ( }; /** + * Remove player credentials from action payload + */ +const stripCredentialsFromAction = action => { + if ('payload' in action && 'credentials' in action.payload) { + // eslint-disable-next-line no-unused-vars + const { credentials, ...payload } = action.payload; + action = { ...action, payload }; + } + return action; +}; + +/** * Master * * Class that runs the game and maintains the authoritative state. @@ -136,6 +148,8 @@ export class Master { return { error: 'unauthorized action' }; } + action = stripCredentialsFromAction(action); + const key = gameID; let state;
fix(master): Remove credentials from action payloads after use (#<I>) Credentials are only used to check if an action is authorized in the master and should not then be passed on to the reducer etc. This contributes towards #<I>, because now credentials should not leak beyond the `Master.onUpdate` method and won’t end up for example in the game log.
nicolodavis_boardgame.io
train
js
eba7a4d1fafa5693874e6d24030d2a31d11bc22e
diff --git a/src/trumbowyg.js b/src/trumbowyg.js index <HASH>..<HASH> 100644 --- a/src/trumbowyg.js +++ b/src/trumbowyg.js @@ -205,7 +205,6 @@ jQuery.trumbowyg = { '|', 'btnGrp-lists', '|', 'horizontalRule', '|', 'removeformat', - 'fullscreen' ], btnsAdd: [], @@ -299,7 +298,7 @@ jQuery.trumbowyg = { tag: 'right' }, justifyFull: { - tag: 'jusitfy' + tag: 'justify' }, unorderedList: { @@ -800,6 +799,8 @@ jQuery.trumbowyg = { ); } + t.$ed.off('dblclick', 'img'); + t.$box.remove(); t.$c.removeData('trumbowyg'); $('body').removeClass(prefix + 'body-fullscreen');
fix: fix some typos on justify
Alex-D_Trumbowyg
train
js
88b550881495b4c6c5801fa82a638e49e12fc669
diff --git a/lib/graphql/schema/member/build_type.rb b/lib/graphql/schema/member/build_type.rb index <HASH>..<HASH> 100644 --- a/lib/graphql/schema/member/build_type.rb +++ b/lib/graphql/schema/member/build_type.rb @@ -109,8 +109,8 @@ module GraphQL return string unless string.include?("_") camelized = string.split('_').map(&:capitalize).join camelized[0] = camelized[0].downcase - if string.start_with?("__") - camelized = "__#{camelized}" + if (match_data = string.match(/\A(_+)/)) + camelized = "#{match_data[0]}#{camelized}" end camelized end
fix: when camelizing a string that starts with `_`, keep them
rmosolgo_graphql-ruby
train
rb
f5a63a0a8853e76b4ef270bcdddec873d6953ece
diff --git a/mappings/document.js b/mappings/document.js index <HASH>..<HASH> 100644 --- a/mappings/document.js +++ b/mappings/document.js @@ -186,9 +186,6 @@ var schema = { _source: { excludes : ['shape','phrase'] }, - _all: { - enabled: false - }, dynamic: 'strict' }; diff --git a/test/document.js b/test/document.js index <HASH>..<HASH> 100644 --- a/test/document.js +++ b/test/document.js @@ -185,7 +185,7 @@ module.exports.tests.dynamic_templates = function(test, common) { // _all should be disabled module.exports.tests.all_disabled = function(test, common) { test('_all disabled', function(t) { - t.equal(schema._all.enabled, false, '_all disabled'); + t.false(schema._all, '_all undefined'); t.end(); }); }; diff --git a/test/fixtures/expected.json b/test/fixtures/expected.json index <HASH>..<HASH> 100644 --- a/test/fixtures/expected.json +++ b/test/fixtures/expected.json @@ -1149,9 +1149,6 @@ "phrase" ] }, - "_all": { - "enabled": false - }, "dynamic": "strict" } }
feat(es7): remove _all mapping The `_all` field was deprecated in Elasticsearch 6 and completely removed in [Elasticsearch 7](<URL>
pelias_schema
train
js,js,json
359dd29e69d7efdc08bedfff887c5af72542093e
diff --git a/lib/generators/my_zipcode_gem/templates/zipcode_model.rb b/lib/generators/my_zipcode_gem/templates/zipcode_model.rb index <HASH>..<HASH> 100644 --- a/lib/generators/my_zipcode_gem/templates/zipcode_model.rb +++ b/lib/generators/my_zipcode_gem/templates/zipcode_model.rb @@ -13,6 +13,7 @@ class Zipcode < ActiveRecord::Base def find_by_city_state(city, state) includes(county: :state) .where("city like ? AND states.abbr like ?", "#{city}%", "%#{state}%") + .references(:state) .first end end
fix(zipcode): Fix zipcode in Rails 4+ Close #<I>
midwire_my_zipcode_gem
train
rb
2d0ab9e9bf6a63b3cbd251d1e41c8139eaec5ccd
diff --git a/internal/client/github.go b/internal/client/github.go index <HASH>..<HASH> 100644 --- a/internal/client/github.go +++ b/internal/client/github.go @@ -225,7 +225,7 @@ func (c *githubClient) CreateRelease(ctx *context.Context, body string) (string, ctx, ctx.Config.Release.GitHub.Owner, ctx.Config.Release.GitHub.Name, - ctx.Git.CurrentTag, + data.GetTagName(), ) if err != nil { release, _, err = c.client.Repositories.CreateRelease(
fix: ensure same tag on edit this change is just to prevent merge conflicts in goreleaser pro refs #<I>
goreleaser_goreleaser
train
go
05b63af4c9af86b2eb77449e9cbdb48c0b1a19df
diff --git a/scripts/lib/bundle.js b/scripts/lib/bundle.js index <HASH>..<HASH> 100644 --- a/scripts/lib/bundle.js +++ b/scripts/lib/bundle.js @@ -25,6 +25,7 @@ function readPackageDigest() { function computePackageDigest(noWriteFile = false) { const files = globIgnore(join(rootDir, '**'), { + absolute: true, ignore: readFileSync(join(rootDir, '.npmignore')) .toString('utf8') .split(/\n/g)
fix: update call to globIgnore (#<I>) (#<I>) globIgnore now requires the 'absolute' option to be specified.
kulshekhar_ts-jest
train
js
0e26ad501d89bf3f00ca53abf9a77fa04331b495
diff --git a/src/trumbowyg.js b/src/trumbowyg.js index <HASH>..<HASH> 100644 --- a/src/trumbowyg.js +++ b/src/trumbowyg.js @@ -677,7 +677,7 @@ Object.defineProperty(jQuery.trumbowyg, 'defaultOptions', { } }) .on('keyup focus', function () { - if (!t.$ta.val().match(/<.*>/)) { + if (!t.$ta.val().match(/<.*>/) && !t.$ed.html().match(/<.*>/)) { setTimeout(function () { var block = t.isIE ? '<p>' : 'p'; t.doc.execCommand('formatBlock', false, block);
fix(Trumbo): stop p tags from wrapping markup This code adds <p> tags if the Trumbo contains no mark-up. The check is run before a setTimeout and the <p> tags are added after. When using the table plugin the content is empty before the check but contains a table after the timeout executes.
Alex-D_Trumbowyg
train
js
1e26cfc6c7ef3c5afb703ff77b82750fc88f378d
diff --git a/internal/cmd/package.go b/internal/cmd/package.go index <HASH>..<HASH> 100644 --- a/internal/cmd/package.go +++ b/internal/cmd/package.go @@ -23,7 +23,7 @@ func newPackageCmd() *packageCmd { cmd := &cobra.Command{ Use: "package", Aliases: []string{"pkg", "p"}, - Short: "Creates a package based on the given the given config file and flags", + Short: "Creates a package based on the given config file and flags", SilenceUsage: true, SilenceErrors: true, Args: cobra.NoArgs,
fix: typo on 'package' commands --help (#<I>)
goreleaser_nfpm
train
go
fcea21ac3234b0b948e992fc3ca20e50d7c42477
diff --git a/test/tdigest_test.rb b/test/tdigest_test.rb index <HASH>..<HASH> 100644 --- a/test/tdigest_test.rb +++ b/test/tdigest_test.rb @@ -1,6 +1,4 @@ require 'test_helper' -require 'ruby-prof' - class TDigestTest < Minitest::Test extend Minitest::Spec::DSL
fix: remove ruby-prof require from test
castle_tdigest
train
rb
399306adc5c124483c0e6a61319795756a66f3fa
diff --git a/lib/build/webpack-config.js b/lib/build/webpack-config.js index <HASH>..<HASH> 100644 --- a/lib/build/webpack-config.js +++ b/lib/build/webpack-config.js @@ -82,8 +82,8 @@ module.exports = function (cfg) { ], alias: { quasar: appPaths.resolve.app(`node_modules/quasar-framework/dist/quasar.${cfg.ctx.themeName}.esm.js`), - '~': appPaths.srcDir, - '@': appPaths.resolve.src(`components`), + src: appPaths.srcDir, + components: appPaths.resolve.src(`components`), layouts: appPaths.resolve.src(`layouts`), pages: appPaths.resolve.src(`pages`), assets: appPaths.resolve.src(`assets`),
fix: Avoid webpack aliases clashes
quasarframework_quasar-cli
train
js
cf9b8b06f06f0d3cf973fe72befecaff21c8de7f
diff --git a/intranet/apps/users/views.py b/intranet/apps/users/views.py index <HASH>..<HASH> 100644 --- a/intranet/apps/users/views.py +++ b/intranet/apps/users/views.py @@ -117,9 +117,9 @@ def picture_view(request, user_id, year=None): data = None if data is None: - image_buffer = io.BytesIO(data) - else: img = io.open(default_image_path, mode="rb").read() + else: + image_buffer = io.BytesIO(data) response = HttpResponse(content_type="image/jpeg") response["Content-Disposition"] = "filename={}_{}.jpg".format(user_id, year or preferred)
fix(users): fix image data logic
tjcsl_ion
train
py
fb078ce8e48c7564de84a3dc1bcf5651b1c6b44e
diff --git a/xml/node.go b/xml/node.go index <HASH>..<HASH> 100644 --- a/xml/node.go +++ b/xml/node.go @@ -245,8 +245,3 @@ quit: func Parse(r io.Reader) (*Node, error) { return parse(r) } - -// ParseXML returns the parse tree for the XML from the given Reader.Deprecated. -func ParseXML(r io.Reader) (*Node, error) { - return parse(r) -}
refactor: remove ParseXML() method
antchfx_xmlquery
train
go
a5e634be62d1a0de5ecc36af8bb20bfe01f84e34
diff --git a/intranet/apps/bus/serializers.py b/intranet/apps/bus/serializers.py index <HASH>..<HASH> 100644 --- a/intranet/apps/bus/serializers.py +++ b/intranet/apps/bus/serializers.py @@ -1,3 +1,4 @@ +# pylint: disable=abstract-method from rest_framework import serializers from .models import Route diff --git a/intranet/apps/eighth/serializers.py b/intranet/apps/eighth/serializers.py index <HASH>..<HASH> 100644 --- a/intranet/apps/eighth/serializers.py +++ b/intranet/apps/eighth/serializers.py @@ -1,3 +1,4 @@ +# pylint: disable=abstract-method import collections import functools import logging diff --git a/intranet/apps/users/serializers.py b/intranet/apps/users/serializers.py index <HASH>..<HASH> 100644 --- a/intranet/apps/users/serializers.py +++ b/intranet/apps/users/serializers.py @@ -1,3 +1,4 @@ +# pylint: disable=abstract-method from django.contrib.auth import get_user_model from rest_framework import serializers
chore(pylint): disable abstract method checks for serializers
tjcsl_ion
train
py,py,py
113277ede126e52717c1ee54014ed8f91fce5d02
diff --git a/src/pandas_profiling/utils/progress_bar.py b/src/pandas_profiling/utils/progress_bar.py index <HASH>..<HASH> 100644 --- a/src/pandas_profiling/utils/progress_bar.py +++ b/src/pandas_profiling/utils/progress_bar.py @@ -1,6 +1,5 @@ -from collections import Callable from functools import wraps -from typing import Any +from typing import Any, Callable from tqdm import tqdm
refactor: typing progress_bar.py
pandas-profiling_pandas-profiling
train
py
87e2bb881387ff3ac245ab9923347a5a616e197b
diff --git a/semantic_release/cli.py b/semantic_release/cli.py index <HASH>..<HASH> 100644 --- a/semantic_release/cli.py +++ b/semantic_release/cli.py @@ -161,7 +161,8 @@ def changelog(*, unreleased=False, noop=False, post=False, **kwargs): log = generate_changelog(current_version, None) else: log = generate_changelog(previous_version, current_version) - logger.info(markdown_changelog(current_version, log, header=False)) + # print is used to keep the changelog on stdout, separate from log messages + print(markdown_changelog(current_version, log, header=False)) # Post changelog to HVCS if enabled if not noop and post:
fix(changelog): send changelog to stdout Fixes #<I>
relekang_python-semantic-release
train
py
9cc06fda0c641fefc4e7beabadcad76aec18c707
diff --git a/packages/vuetify/src/components/VSelect/VSelect.js b/packages/vuetify/src/components/VSelect/VSelect.js index <HASH>..<HASH> 100644 --- a/packages/vuetify/src/components/VSelect/VSelect.js +++ b/packages/vuetify/src/components/VSelect/VSelect.js @@ -448,10 +448,16 @@ export default { if (onlyBools) { replacement = Object.keys(replacement).join(', ') } else { - replacement = JSON.stringify(replacement, null, multiple ? 2 : 0).replace(/"([^(")"]+)":/g, '$1:').replace(/"/g, '\'') + replacement = JSON.stringify(replacement, null, multiple ? 2 : 0) + .replace(/"([^(")"]+)":/g, '$1:') + .replace(/"/g, '\'') } - consoleWarn(`${props} ${multiple ? 'are' : 'is'} deprecated, use ${separator}:menu-props="${replacement}"${separator} instead`, this) + consoleWarn( + `${props} ${multiple ? 'are' : 'is'} deprecated, use ` + + `${separator}${onlyBools ? '' : ':'}menu-props="${replacement}"${separator} instead`, + this + ) } }
fix(Select): remove colon from menu-props suggestion with booleans only
vuetifyjs_vuetify
train
js
39ebf12b528653f10ecaf48b878f9855d568a92f
diff --git a/api/api.go b/api/api.go index <HASH>..<HASH> 100644 --- a/api/api.go +++ b/api/api.go @@ -20,7 +20,6 @@ import ( "net/http" "net/url" "os" - "regexp" "strings" "sync" "time" @@ -241,7 +240,7 @@ func (a *API) apiRequest(reqMethod string, reqPath string, data []byte) ([]byte, if !a.useExponentialBackoff { break } - if matched, _ := regexp.MatchString("code 403", err.Error()); matched { + if strings.Contains(err.Error(), "code 403") { break } }
fix: simplify check for <I> on api call error
circonus-labs_circonus-gometrics
train
go
6b0fffe17a9f6f0db5e2928879a75bdd9546d2de
diff --git a/v1/tsdb/config.go b/v1/tsdb/config.go index <HASH>..<HASH> 100644 --- a/v1/tsdb/config.go +++ b/v1/tsdb/config.go @@ -14,7 +14,7 @@ const ( DefaultEngine = "tsm1" // DefaultIndex is the default index for new shards - DefaultIndex = InmemIndexName + DefaultIndex = TSI1IndexName // tsdb/engine/wal configuration options
fix: Default to TSI1 index for new shards
influxdata_influxdb
train
go
d0a07fb32811c649185ee99d71373cc7cab8791e
diff --git a/allennlp/modules/elmo.py b/allennlp/modules/elmo.py index <HASH>..<HASH> 100644 --- a/allennlp/modules/elmo.py +++ b/allennlp/modules/elmo.py @@ -440,7 +440,7 @@ class _ElmoCharacterEncoder(torch.nn.Module): # create the layers, and load the weights self._highways = Highway(n_filters, n_highway, activation=torch.nn.functional.relu) for k in range(n_highway): - # The AllenNLP highway is one matrix multplication with concatenation of + # The AllenNLP highway is one matrix multiplication with concatenation of # transform and carry weights. with h5py.File(cached_path(self._weight_file), "r") as fin: # The weights are transposed due to multiplication order assumptions in tf
docs: fix simple typo, multplication -> multiplication (#<I>) There is a small typo in allennlp/modules/elmo.py. Should read `multiplication` rather than `multplication`.
allenai_allennlp
train
py
e609ada804df6e403647affa632e43105d91b85b
diff --git a/vyper/parser/context.py b/vyper/parser/context.py index <HASH>..<HASH> 100644 --- a/vyper/parser/context.py +++ b/vyper/parser/context.py @@ -103,12 +103,13 @@ class Context: def make_blockscope(self, blockscope_id): self.blockscopes.add(blockscope_id) yield + # Remove all variables that have specific blockscope_id attached. - self.vars = { - name: var_record - for name, var_record in self.vars.items() - if blockscope_id not in var_record.blockscopes - } + released = [(k, v) for k, v in self.vars.items() if blockscope_id in v.blockscopes] + for name, var in released: + self.memory_allocator.release_memory(var.pos, var.size * 32) + del self.vars[name] + # Remove block scopes self.blockscopes.remove(blockscope_id)
feat: release memory upon exit of block scope
ethereum_vyper
train
py
7f3900312b8ae255f195d2bdc4d2a1633c118a69
diff --git a/swarm-server/src/Server.js b/swarm-server/src/Server.js index <HASH>..<HASH> 100644 --- a/swarm-server/src/Server.js +++ b/swarm-server/src/Server.js @@ -1,4 +1,5 @@ "use strict"; +var fs = require('fs'); var Replica = require('swarm-replica'); var sync = require('swarm-syncable'); var Host = sync.Host; @@ -9,6 +10,7 @@ require('stream-url-ws'); // Host combo where the Host is mostly used for op log aggregation. // TODO add REST API for state bundles (Replica->Host->REST API) function Server (options) { + options.debug && console.log('swarm server options', options); this.options = options; if (!options.ssn_id) { options.ssn_id = options.user_id || 'swarm'; @@ -20,7 +22,15 @@ function Server (options) { options.listen = 'ws://localhost:8000'; } - this.db = level(options.db_path || '.'); + if (options.db) { + this.db = options.db; + } else { + var db_path = options.db_path || './swarm.db'; + if (!fs.existsSync(db_path)) { + fs.mkdirSync(db_path); + } + this.db = level(db_path); + } // BIG TODO: propagate ssn grant replica->host // use exactly the same clock object!!!
chore(server): put db into a dir
gritzko_swarm
train
js
99cc4be448f22501f7874efeebb208d4914f4412
diff --git a/lnd_test.go b/lnd_test.go index <HASH>..<HASH> 100644 --- a/lnd_test.go +++ b/lnd_test.go @@ -1448,7 +1448,7 @@ func testChannelForceClosure(net *lntest.NetworkHarness, t *harnessTest) { nodes := []*lntest.HarnessNode{net.Alice, carol} err = lntest.WaitPredicate(func() bool { return assertNumActiveHtlcs(nodes, numInvoices) - }, time.Second*5) + }, time.Second*15) if err != nil { t.Fatalf("htlc mismatch: %v", err) } @@ -6089,7 +6089,7 @@ func testMultiHopHtlcLocalChainClaim(net *lntest.NetworkHarness, t *harnessTest) } return true - }, time.Second*5) + }, time.Second*15) if err != nil { t.Fatalf(predErr.Error()) }
test: extend timeouts for WaitPredicate on new integration tests
lightningnetwork_lnd
train
go
0bea0cc5b9fc7734f20e17d51a7f9a966b454dce
diff --git a/pkg/services/alerting/datasources/backends.go b/pkg/services/alerting/datasources/backends.go index <HASH>..<HASH> 100644 --- a/pkg/services/alerting/datasources/backends.go +++ b/pkg/services/alerting/datasources/backends.go @@ -2,9 +2,16 @@ package graphite import ( "fmt" + m "github.com/grafana/grafana/pkg/models" ) +// AlertDatasource is bacon +type AlertDatasource interface { + GetSeries(job *m.AlertJob) (m.TimeSeriesSlice, error) +} + +// GetSeries returns timeseries data from the datasource func GetSeries(job *m.AlertJob) (m.TimeSeriesSlice, error) { if job.Datasource.Type == m.DS_GRAPHITE { return GraphiteClient{}.GetSeries(job)
feat(alerting): add interface for alert backend
grafana_grafana
train
go
3cc865c37cd69c09d4cab382404c646960d7b217
diff --git a/plugins/lineup/LineUp/test/lineup.js b/plugins/lineup/LineUp/test/lineup.js index <HASH>..<HASH> 100644 --- a/plugins/lineup/LineUp/test/lineup.js +++ b/plugins/lineup/LineUp/test/lineup.js @@ -3,15 +3,15 @@ import test from 'tape-catch'; // needed to handle Babel's conversion of for `(x of array)` import 'babel-polyfill'; -import $ from 'jquery'; - import LineUp from '..'; test('LineUp component', t => { - $('body').append($('<div/>').attr({id: 'elem'}).css({width: 800, height: 600})); + const div = document.createElement('div'); + div.setAttribute('style', 'width: 800px; height: 600px'); + t.ok(LineUp, 'LineUp exists'); t.ok(LineUp.options, 'LineUp options exists'); - let lu = new LineUp(document.getElementById('elem'), { + let lu = new LineUp(div, { data: [ {a: 1, b: 2, c: 'a', d: true}, {a: 3, b: 4, c: 'b', d: false},
test: fix test corruption from use of jquery in lineup test
Kitware_candela
train
js
e437f99b421cf9c8e290f60ab975b1e83547fed1
diff --git a/src/website/app/demos/Icon/examples/importSyntax.js b/src/website/app/demos/Icon/examples/importSyntax.js index <HASH>..<HASH> 100644 --- a/src/website/app/demos/Icon/examples/importSyntax.js +++ b/src/website/app/demos/Icon/examples/importSyntax.js @@ -21,7 +21,7 @@ export default { description: `To render a custom icon, use the default export from the \`mineral-ui/Icon\` package. \`\`\` -import Icon from 'mineral-ui-icons/Icon'; +import Icon from 'mineral-ui/Icon'; \`\`\` Import Mineral UI's provided icons directly from the \`mineral-ui-icons\` package.
chore(website): Fix incorrect Icon import syntax
mineral-ui_mineral-ui
train
js
b47391d001c85f5bf934e0e7234e0ab44b604cfb
diff --git a/bootstrap.php b/bootstrap.php index <HASH>..<HASH> 100644 --- a/bootstrap.php +++ b/bootstrap.php @@ -25,6 +25,8 @@ if (file_exists($applicationPath = __DIR__.'/../../../bootstrap/app.php')) { // if ($app instanceof \Illuminate\Contracts\Foundation\Application) { $app->make(\Illuminate\Contracts\Console\Kernel::class)->bootstrap(); +} elseif ($app instanceof \Laravel\Lumen\Application) { + $app->boot(); } $app->make('config')->set('larastan.mixins', require __DIR__.DIRECTORY_SEPARATOR.'config'.DIRECTORY_SEPARATOR.'mixins.php');
fix: some internal errors with the lumen framework
nunomaduro_larastan
train
php
ce2d84d1f89bccff7916a6bde9d1cf6b52a3684b
diff --git a/lib/ios-deploy.js b/lib/ios-deploy.js index <HASH>..<HASH> 100644 --- a/lib/ios-deploy.js +++ b/lib/ios-deploy.js @@ -51,7 +51,7 @@ class IOSDeploy { try { await appInstalledNotification; } catch (e) { - log.warn(`Couldn't get the application installed notification with ${APPLICATION_INSTALLED_NOTIFICATION}ms but we will continue`); + log.warn(`Couldn't get the application installed notification with ${APPLICATION_NOTIFICATION_TIMEOUT}ms but we will continue`); } } finally { installationService.close(); @@ -79,7 +79,7 @@ class IOSDeploy { try { await B.all(promises).timeout(APPLICATION_PUSH_TIMEOUT); } catch (e) { - throw new Error(`Couldn't push all the files within the timeout ${APPLICATION_INSTALLED_NOTIFICATION}ms`); + throw new Error(`Couldn't push all the files within the timeout ${APPLICATION_PUSH_TIMEOUT}ms`); } log.debug(`Pushed the app files successfully after ${new Date() - start}ms`); return bundlePathOnPhone;
fix: print the timeout ms instead of the wrong vars
appium_appium-xcuitest-driver
train
js
83640a26404722f7c3882687ceb6dbadd5a40aa8
diff --git a/src/client/voice/dispatcher/StreamDispatcher.js b/src/client/voice/dispatcher/StreamDispatcher.js index <HASH>..<HASH> 100644 --- a/src/client/voice/dispatcher/StreamDispatcher.js +++ b/src/client/voice/dispatcher/StreamDispatcher.js @@ -199,10 +199,10 @@ class StreamDispatcher extends Writable { const next = FRAME_LENGTH + (this.count * FRAME_LENGTH) - (Date.now() - this.startTime - this.pausedTime); setTimeout(done.bind(this), next); } - if (this._sdata.sequence >= (2 ** 16) - 1) this._sdata.sequence = -1; - if (this._sdata.timestamp >= (2 ** 32) - TIMESTAMP_INC) this._sdata.timestamp = -TIMESTAMP_INC; this._sdata.sequence++; this._sdata.timestamp += TIMESTAMP_INC; + if (this._sdata.sequence >= 2 ** 16) this._sdata.sequence = 0; + if (this._sdata.timestamp >= 2 ** 32) this._sdata.timestamp = 0; this.count++; }
refactor: tidier overflow checking in StreamDispatcher
discordjs_discord.js
train
js
18bacccb043045e089128af1814a6022530762e7
diff --git a/lib/config.js b/lib/config.js index <HASH>..<HASH> 100644 --- a/lib/config.js +++ b/lib/config.js @@ -873,7 +873,9 @@ exports.extend = function (newConf) { }); if (config.headless) { - config.noGlobalPlugins = true; + if (!config.pluginsMode) { + config.noGlobalPlugins = true; + } config.pluginsOnlyMode = true; config.disableWebUI = true; delete config.rulesOnlyMode;
feat: allow global plugins in headless mode
avwo_whistle
train
js
4332ffc7a73d88bce3b9aa1020369b340a543738
diff --git a/src/lib/config.js b/src/lib/config.js index <HASH>..<HASH> 100644 --- a/src/lib/config.js +++ b/src/lib/config.js @@ -91,9 +91,7 @@ class Config { // some weird shell scripts are valid yaml files parsed as string assert.equal(typeof(config), 'object', 'CONFIG: it doesn\'t look like a valid config file'); - assert(self.storage, 'CONFIG: storage path not defined'); - - // sanity check for strategic config properties + // sanity check for strategic config properties strategicConfigProps.forEach(function(x) { if (self[x] == null) self[x] = {}; assert(Utils.isObject(self[x]), `CONFIG: bad "${x}" value (object expected)`); diff --git a/src/lib/local-storage.js b/src/lib/local-storage.js index <HASH>..<HASH> 100644 --- a/src/lib/local-storage.js +++ b/src/lib/local-storage.js @@ -842,6 +842,7 @@ class LocalStorage implements IStorage { const Storage = this._loadStorePlugin(); if (_.isNil(Storage)) { + assert(this.config.storage, 'CONFIG: storage path not defined'); return new LocalDatabase(this.config, logger); } else { return Storage;
fix: allow do not include storage if uses a storage plugin
verdaccio_verdaccio
train
js,js
2a892581ae25ded134913eb9ae1f449230632767
diff --git a/object/assign-deep.js b/object/assign-deep.js index <HASH>..<HASH> 100644 --- a/object/assign-deep.js +++ b/object/assign-deep.js @@ -8,15 +8,24 @@ var includes = require("../array/#/contains") var isArray = Array.isArray, slice = Array.prototype.slice; +var assignObject = function (target, source) { + // eslint-disable-next-line no-use-before-define + objForEach(source, function (value, key) { target[key] = deepAssign(target[key], value); }); +}; + +var assignArray = function (target, source) { + source.forEach(function (item) { if (!includes.call(target, item)) target.push(item); }); +}; + var deepAssign = function (target, source) { if (isPlainObject(target)) { if (!isPlainObject(source)) return source; - objForEach(source, function (value, key) { target[key] = deepAssign(target[key], value); }); + assignObject(target, source); return target; } if (isArray(target)) { if (!isArray(source)) return source; - source.forEach(function (item) { if (!includes.call(target, item)) target.push(item); }); + assignArray(target, source); return target; } return source;
refactor: seclude assign logic
medikoo_es5-ext
train
js
d633dc9cc6ba8e73187da8520c9436835dc1a081
diff --git a/test/distro/distroSpec.js b/test/distro/distroSpec.js index <HASH>..<HASH> 100644 --- a/test/distro/distroSpec.js +++ b/test/distro/distroSpec.js @@ -1,9 +1,10 @@ describe('distro', function() { it('should expose CJS bundle', function() { - const BpmnJSBpmnlint = require('../..'); + const BpmnJSBpmnlint = require('../../dist/index.js'); expect(BpmnJSBpmnlint).to.exist; + expect(BpmnJSBpmnlint.__init__).to.exist; }); @@ -11,6 +12,7 @@ describe('distro', function() { const BpmnJSBpmnlint = require('../../dist/bpmn-js-bpmnlint.umd.js'); expect(BpmnJSBpmnlint).to.exist; + expect(BpmnJSBpmnlint.__init__).to.exist; }); });
test: verify CJS and UMD exports
bpmn-io_bpmn-js-bpmnlint
train
js
2545ddd3dd6cdc46a3aef340cd26cf23460a4708
diff --git a/js/src/files.js b/js/src/files.js index <HASH>..<HASH> 100644 --- a/js/src/files.js +++ b/js/src/files.js @@ -559,7 +559,7 @@ module.exports = (common) => { }) }) - it('exports a chunk of a file', (done) => { + it('exports a chunk of a file', function (done) { if (withGo) { this.skip() } const offset = 1 @@ -589,7 +589,7 @@ module.exports = (common) => { })) }) - it('exports a chunk of a file in a ReadableStream', (done) => { + it('exports a chunk of a file in a ReadableStream', function (done) { if (withGo) { this.skip() } const offset = 1 @@ -625,7 +625,7 @@ module.exports = (common) => { ) }) - it('exports a chunk of a file in a PullStream', (done) => { + it('exports a chunk of a file in a PullStream', function (done) { if (withGo) { this.skip() } const offset = 1
fix: this.skip needs to be under a function declaration
ipfs_interface-js-ipfs-core
train
js
06677708cf0699b0aa375bf2f15e7002b1d4a3b5
diff --git a/command/agent/testagent.go b/command/agent/testagent.go index <HASH>..<HASH> 100644 --- a/command/agent/testagent.go +++ b/command/agent/testagent.go @@ -130,7 +130,7 @@ func (a *TestAgent) Start() *TestAgent { a.Agent = agent a.Agent.LogOutput = a.LogOutput a.Agent.LogWriter = a.LogWriter - retry.Run(&panicFailer{}, func(r *retry.R) { + retry.RunWith(retry.ThreeTimes(), &panicFailer{}, func(r *retry.R) { err := a.Agent.Start() if err == nil { return
test: use less aggressive retry for agent startup
hashicorp_consul
train
go
4740d97b56dd63865ea391f8cda992e714993118
diff --git a/packages/reactstrap-validation-select/AvSelect.js b/packages/reactstrap-validation-select/AvSelect.js index <HASH>..<HASH> 100644 --- a/packages/reactstrap-validation-select/AvSelect.js +++ b/packages/reactstrap-validation-select/AvSelect.js @@ -196,10 +196,7 @@ class AvSelect extends AvBaseInput { let shouldAutofillField = false; if (typeof this.props.autofill === 'object') { - shouldAutofillField = Object.prototype.hasOwnProperty.call( - this.props.autofill, - fieldName - ); + shouldAutofillField = this.props.autofill[fieldName]; } else { shouldAutofillField = Object.prototype.hasOwnProperty.call( rawValue,
fix(reactstrap-validation-select): check autofill key is truthy
Availity_availity-react
train
js
5db2e9fe40ac1b7341cadd60be72c6450c995ed7
diff --git a/Gemfile.lock b/Gemfile.lock index <HASH>..<HASH> 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,7 +1,7 @@ PATH remote: . specs: - with_events (0.1.0) + with_events (0.1.1) activesupport (~> 4.2.7) require_all (~> 1.4.0) sidekiq (~> 3.5.3) diff --git a/lib/with_events/version.rb b/lib/with_events/version.rb index <HASH>..<HASH> 100644 --- a/lib/with_events/version.rb +++ b/lib/with_events/version.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true module WithEvents - VERSION = '0.1.0' + VERSION = '0.1.1' end diff --git a/spec/with_events/version_spec.rb b/spec/with_events/version_spec.rb index <HASH>..<HASH> 100644 --- a/spec/with_events/version_spec.rb +++ b/spec/with_events/version_spec.rb @@ -1,5 +1,5 @@ RSpec.describe WithEvents::VERSION do it 'Should be 0.1.0' do - expect(WithEvents::VERSION).to eq('0.1.0') + expect(WithEvents::VERSION).to eq('0.1.1') end end
chore(version): Update gem version
pandomic_with_events
train
lock,rb,rb
ae0b32cafa937c78e2d27817b46423248961ea59
diff --git a/packages/generator-bolt/generators/component/index.js b/packages/generator-bolt/generators/component/index.js index <HASH>..<HASH> 100644 --- a/packages/generator-bolt/generators/component/index.js +++ b/packages/generator-bolt/generators/component/index.js @@ -258,5 +258,17 @@ module.exports = class extends Generator { addBoltPackage(this.props.packageName); shelljs.exec('yarn'); + + shelljs.exec( + `npx prettier ${this.folders.patternLabFolder}/${ + this.props.name.kebabCase + }/**/*.{js,scss,json} --write`, + ); + + shelljs.exec( + `npx prettier ${this.folders.src}/bolt-${ + this.props.name.kebabCase + }/**/*.{js,scss,json} --write`, + ); } };
fix: update to automatically run generated files through Prettier automatically to prevent any linting issues
bolt-design-system_bolt
train
js
682a1a5cc1deca08b23e0f98f26fe6020254090d
diff --git a/alot/command.py b/alot/command.py index <HASH>..<HASH> 100644 --- a/alot/command.py +++ b/alot/command.py @@ -101,7 +101,7 @@ class SearchCommand(Command): def apply(self, ui): if self.query: - if self.query == '*': + if self.query == '*' and ui.current_buffer: s = 'really search for all threads? This takes a while..' if not ui.choice(s) == 'yes': return
fix: issue with initial searches for * for the searchstring '*' an orly? prompt is hardcoded as these tend to take long. Prompts don't work if the ui is not properly set up.
pazz_alot
train
py
19c474e2e1c11f48659a82f07064f82aa9778369
diff --git a/packages/@vue/cli-plugin-typescript/__tests__/tsPluginESLint.spec.js b/packages/@vue/cli-plugin-typescript/__tests__/tsPluginESLint.spec.js index <HASH>..<HASH> 100644 --- a/packages/@vue/cli-plugin-typescript/__tests__/tsPluginESLint.spec.js +++ b/packages/@vue/cli-plugin-typescript/__tests__/tsPluginESLint.spec.js @@ -1,4 +1,4 @@ -jest.setTimeout(10000) +jest.setTimeout(60000) const create = require('@vue/cli-test-utils/createTestProject')
test: bump timeout, fixes AppVeyor CI
vuejs_vue-cli
train
js
5dd80aa272fb2dd84680c5f6e2daf329fbe9dc9e
diff --git a/lib/features/modeling/cmd/MoveConnectionHandler.js b/lib/features/modeling/cmd/MoveConnectionHandler.js index <HASH>..<HASH> 100644 --- a/lib/features/modeling/cmd/MoveConnectionHandler.js +++ b/lib/features/modeling/cmd/MoveConnectionHandler.js @@ -63,6 +63,8 @@ MoveConnectionHandler.prototype.revert = function(context) { p.original.y -= delta.y; } }); + + return connection; };
fix(modeling): update connection after move undo
bpmn-io_diagram-js
train
js
8093378d76ccf2ea0bffd0abde526574b4743d57
diff --git a/lib/components/form/default-search-form.js b/lib/components/form/default-search-form.js index <HASH>..<HASH> 100644 --- a/lib/components/form/default-search-form.js +++ b/lib/components/form/default-search-form.js @@ -26,7 +26,7 @@ export default class DefaultSearchForm extends Component { render () { const { icons, mobile } = this.props - const actionText = mobile ? 'long press' : 'right-click' + const actionText = mobile ? 'tap' : 'click' return ( <div>
fix(form): Update placeholder language in location field to reflect new mouse/tap interaction Refs conveyal/trimet-mod-otp#<I>
opentripplanner_otp-react-redux
train
js
8b5cb46006b2f28b6bac39802bb25d29f34d9efe
diff --git a/lib/anycable/rails/action_cable_ext/channel.rb b/lib/anycable/rails/action_cable_ext/channel.rb index <HASH>..<HASH> 100644 --- a/lib/anycable/rails/action_cable_ext/channel.rb +++ b/lib/anycable/rails/action_cable_ext/channel.rb @@ -3,13 +3,15 @@ require "action_cable/channel" ActionCable::Channel::Base.prepend(Module.new do - def subscribe_to_channel(force: false) - return if anycabled? && !force - super() + def subscribe_to_channel + super unless anycabled? && !@__anycable_subscribing__ end def handle_subscribe - subscribe_to_channel(force: true) + @__anycable_subscribing__ = true + subscribe_to_channel + ensure + @__anycable_subscribing__ = false end def start_periodic_timers
fix: do not change signatures in the channel patch
anycable_anycable-rails
train
rb
2a642b22722ba1e1cdd35710b63fe6ab53307a74
diff --git a/scripts/npm-release.js b/scripts/npm-release.js index <HASH>..<HASH> 100644 --- a/scripts/npm-release.js +++ b/scripts/npm-release.js @@ -148,7 +148,7 @@ const waitOnTests = async (names, packageInfo) => { console.log(`\nWaiting on the following CI jobs: ${jobs.join(', ')}`) return Promise.all(jobs.map((job) => { - return Promise.resolve(waitForJobToPass(job)) + return waitForJobToPass(job) .timeout(minutes(60)) .then(() => { console.log(`${job} passed`)
chore: adding bluebird promise to release script (#<I>)
cypress-io_cypress
train
js
d63bee8bc345171db74a77782f295e325926f3e3
diff --git a/zone.go b/zone.go index <HASH>..<HASH> 100644 --- a/zone.go +++ b/zone.go @@ -577,8 +577,15 @@ func (api *API) PurgeEverything(zoneID string) (PurgeCacheResponse, error) { // // API reference: https://api.cloudflare.com/#zone-purge-individual-files-by-url-and-cache-tags func (api *API) PurgeCache(zoneID string, pcr PurgeCacheRequest) (PurgeCacheResponse, error) { + return api.PurgeCacheContext(context.TODO(), zoneID, pcr) +} + +// PurgeCacheContext purges the cache using the given PurgeCacheRequest (zone/url/tag). +// +// API reference: https://api.cloudflare.com/#zone-purge-individual-files-by-url-and-cache-tags +func (api *API) PurgeCacheContext(ctx context.Context, zoneID string, pcr PurgeCacheRequest) (PurgeCacheResponse, error) { uri := "/zones/" + zoneID + "/purge_cache" - res, err := api.makeRequest("POST", uri, pcr) + res, err := api.makeRequestContext(ctx, "POST", uri, pcr) if err != nil { return PurgeCacheResponse{}, errors.Wrap(err, errMakeRequestError) }
feat(zones): Add PurgeCacheContext method (#<I>) Support context for purging cache. Adds a *Context method as suggested in #<I>, and used in ListZonesContext.
cloudflare_cloudflare-go
train
go
49596ea0d1b439fb0feb628bf5253ee2206fcacf
diff --git a/test/test_coursera.py b/test/test_coursera.py index <HASH>..<HASH> 100755 --- a/test/test_coursera.py +++ b/test/test_coursera.py @@ -3,9 +3,10 @@ Test functionality of coursera module. """ -import unittest import os import os.path +import unittest + from coursera import coursera_dl TEST_SYLLABUS_FILE = \
test: Sort stdlib imports and separate local import from the former.
coursera-dl_coursera-dl
train
py
407878dc608c5e74f2ac74c8dc308c2800c0b2bb
diff --git a/index.js b/index.js index <HASH>..<HASH> 100644 --- a/index.js +++ b/index.js @@ -42,9 +42,7 @@ function rehype2react(options) { } } - var hast = tableCellStyle(node); - - return toH(h, hast, settings.prefix); + return toH(h, tableCellStyle(node), settings.prefix); } /* Wrap `createElement` to pass components in. */
style(table): Do it in one line
rhysd_rehype-react
train
js
adbdd7034293528273905bd8711bbf5c755386ed
diff --git a/system/Database/BaseBuilder.php b/system/Database/BaseBuilder.php index <HASH>..<HASH> 100644 --- a/system/Database/BaseBuilder.php +++ b/system/Database/BaseBuilder.php @@ -1602,14 +1602,12 @@ class BaseBuilder return false; // @codeCoverageIgnore } - } else { - if (empty($set)) { - if (CI_DEBUG) { - throw new DatabaseException('insertBatch() called with no data'); - } - - return false; // @codeCoverageIgnore + } elseif (empty($set)) { + if (CI_DEBUG) { + throw new DatabaseException('insertBatch() called with no data'); } + + return false; // @codeCoverageIgnore } $hasQBSet = ($set === null); @@ -1690,7 +1688,7 @@ class BaseBuilder $clean = []; - foreach ($row as $k => $rowValue) { + foreach ($row as $rowValue) { $clean[] = $escape ? $this->db->escape($rowValue) : $rowValue; }
refactor: vendor/bin/rector process
codeigniter4_CodeIgniter4
train
php
a1566dcf02688b1dead42ba4ae17a8f0f56643e5
diff --git a/react/Text/Text.js b/react/Text/Text.js index <HASH>..<HASH> 100644 --- a/react/Text/Text.js +++ b/react/Text/Text.js @@ -49,6 +49,8 @@ const Text = ({ </span> ); +Text.displayName = 'Text'; + Text.propTypes = { children: PropTypes.node.isRequired, className: PropTypes.string,
fix(Text): Add display name to Text component (#<I>) Due to decorating while shallow render snapshots are getting DecoratedComponent rendered instead of Text
seek-oss_seek-style-guide
train
js
403bda833422264fa3246973faf7b7e08cdb0650
diff --git a/test/instrumentation/modules/pg/knex.js b/test/instrumentation/modules/pg/knex.js index <HASH>..<HASH> 100644 --- a/test/instrumentation/modules/pg/knex.js +++ b/test/instrumentation/modules/pg/knex.js @@ -13,6 +13,11 @@ var agent = require('../../../..').start({ var knexVersion = require('knex/package').version var semver = require('semver') +if (semver.gte(knexVersion, '0.21.0') && semver.lt(process.version, '10.0.0')) { + // Skip these tests: knex@0.21.x dropped support for node v8. + process.exit(0) +} + var Knex = require('knex') var test = require('tape')
fix(tests): skip testing knex >=<I> with node v8 (#<I>) Fixes #<I>
elastic_apm-agent-nodejs
train
js
e0763b2abfa5095d82a4035ed00cc44b47228858
diff --git a/webpack/test.js b/webpack/test.js index <HASH>..<HASH> 100644 --- a/webpack/test.js +++ b/webpack/test.js @@ -15,7 +15,7 @@ const config = merge.smart(baseConfig, { }, { test: /targets\/.*\.js$/, - loader: 'null', + loader: 'babel?presets[]=es2015', }, ], },
chore(targets): allow es6 for targets code
xodio_xod
train
js
fca1185935ec1454b5374f2b656d8c9f79d55056
diff --git a/lib/operations/collection_ops.js b/lib/operations/collection_ops.js index <HASH>..<HASH> 100644 --- a/lib/operations/collection_ops.js +++ b/lib/operations/collection_ops.js @@ -233,7 +233,7 @@ function countDocuments(coll, query, options, callback) { coll.aggregate(pipeline, options, (err, result) => { if (err) return handleCallback(callback, err); result.toArray((err, docs) => { - if (err) handleCallback(err); + if (err) return handleCallback(err); handleCallback(callback, null, docs.length ? docs[0].n : 0); }); });
fix(count-documents): return callback on error case otherwise the scucess handler is called, which results into further missleading errors (e.g. length is not defined)
mongodb_node-mongodb-native
train
js
fe29964a8862aab20b48a2f7b13e2b92290b627a
diff --git a/lib/__internal/utils.js b/lib/__internal/utils.js index <HASH>..<HASH> 100644 --- a/lib/__internal/utils.js +++ b/lib/__internal/utils.js @@ -165,7 +165,7 @@ const serializeVariable = ({ key, typedValue }) => { } if (type === "date" && value instanceof Date) { - value = value.toISOString().replace(/Z$/, "UTC+00:00"); + value = value.toISOString().replace(/Z$/, "+0000"); } return { ...typedValue, value, type }; diff --git a/lib/__internal/utils.test.js b/lib/__internal/utils.test.js index <HASH>..<HASH> 100644 --- a/lib/__internal/utils.test.js +++ b/lib/__internal/utils.test.js @@ -267,7 +267,7 @@ describe("utils", () => { it("value should be converted to proper formatted string if type is date and value is an instance of date", () => { // given let dateStr = "2013-06-30T21:04:22.000+0200"; - let formattedDate = "2013-06-30T19:04:22.000UTC+00:00"; + let formattedDate = "2013-06-30T19:04:22.000+0000"; let dateObj = new Date(dateStr); let typedValue = { value: dateObj,
fix(serialization): adjust Date format related to CAM-<I>
camunda_camunda-external-task-client-js
train
js,js
e1e38e081bc54cc6f4a675f5af3cd0b71ebdbe05
diff --git a/packages/site/pages/components/badge.js b/packages/site/pages/components/badge.js index <HASH>..<HASH> 100644 --- a/packages/site/pages/components/badge.js +++ b/packages/site/pages/components/badge.js @@ -59,10 +59,8 @@ export default withServerProps(_ => ( <P>In either solid or stroked styles.</P> <Example.React includes={{ Badge }} - codes={[`<Badge>Badge</Badge>`].concat( - Object.keys(Badge.appearances).map( - a => `<Badge appearance={Badge.appearances.${a}}>Badge</Badge>` - ) + codes={Object.keys(Badge.appearances).map( + a => `<Badge appearance={Badge.appearances.${a}}>Badge</Badge>` )} />
fix(site): remove duplicate badge appearance example
pluralsight_design-system
train
js
b27fa518c9ba30cd1eddc5060b4f152eec6c38c8
diff --git a/classes/VideoDownload.php b/classes/VideoDownload.php index <HASH>..<HASH> 100644 --- a/classes/VideoDownload.php +++ b/classes/VideoDownload.php @@ -110,12 +110,13 @@ class VideoDownload $process->run(); if (!$process->isSuccessful()) { $errorOutput = trim($process->getErrorOutput()); + $exitCode = $process->getExitCode(); if ($errorOutput == 'ERROR: This video is protected by a password, use the --video-password option') { - throw new PasswordException($errorOutput); + throw new PasswordException($errorOutput, $exitCode); } elseif (substr($errorOutput, 0, 21) == 'ERROR: Wrong password') { - throw new Exception(_('Wrong password')); + throw new Exception(_('Wrong password'), $exitCode); } else { - throw new Exception($errorOutput); + throw new Exception($errorOutput, $exitCode); } } else { return trim($process->getOutput());
feat: Add youtube-dl exit code to the exceptions
Rudloff_alltube
train
php
94eb8fdc9d4d91aceb4139a4a31e95f8899e20c6
diff --git a/src/inscriptis/html_properties.py b/src/inscriptis/html_properties.py index <HASH>..<HASH> 100644 --- a/src/inscriptis/html_properties.py +++ b/src/inscriptis/html_properties.py @@ -72,4 +72,4 @@ class Line(object): '\n' * self.margin_after)) def __str__(self): - return f"<Line: '{self.get_text().strip()}'>" + return "<Line: '{}'>".format(self.get_text().strip())
fix: python<I> issue.
weblyzard_inscriptis
train
py
58ab1c2cd53b51b57e425e4f4926b9d29de424be
diff --git a/js/tests/unit/carousel.spec.js b/js/tests/unit/carousel.spec.js index <HASH>..<HASH> 100644 --- a/js/tests/unit/carousel.spec.js +++ b/js/tests/unit/carousel.spec.js @@ -905,7 +905,7 @@ describe('Carousel', () => { }) describe('to', () => { - it('should go directement to the provided index', done => { + it('should go directly to the provided index', done => { fixtureEl.innerHTML = [ '<div id="myCarousel" class="carousel slide">', ' <div class="carousel-inner">',
test(carousel): french word in the wild (#<I>)
twbs_bootstrap
train
js
9c6834a605b43b8bb6291036f0ff34a0682c2848
diff --git a/.eslintrc.js b/.eslintrc.js index <HASH>..<HASH> 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -38,6 +38,9 @@ module.exports = { // I don't know how to get this to work with peerDependencies 'import/no-extraneous-dependencies': 0, + // going to try this going forward since I normally want to do export * from "./file" + 'import/prefer-default-export': 0, + // This doesn't play well with hooks and it doesn't mean much with Typescript to me 'consistent-return': 0,
chore(eslint): disabled prefer-default-export rule Going to play with this disabled for a bit since I normally need to do: ```ts export * from "./file"; ``` Right now I have to do multiple exports because of this rule: ```ts export { default as THING } from "./file" export * from "./file" ```
mlaursen_react-md
train
js
98b1c582189faee9ac40d81963008d94801f3837
diff --git a/src/structures/Message.js b/src/structures/Message.js index <HASH>..<HASH> 100644 --- a/src/structures/Message.js +++ b/src/structures/Message.js @@ -386,10 +386,10 @@ class Message extends Base { * @readonly */ get deletable() { - return ( + return Boolean( !this.deleted && - (this.author.id === this.client.user.id || - (this.guild && this.channel.permissionsFor(this.client.user).has(Permissions.FLAGS.MANAGE_MESSAGES, false))) + (this.author.id === this.client.user.id || + this.channel.permissionsFor?.(this.client.user)?.has(Permissions.FLAGS.MANAGE_MESSAGES)), ); }
fix(Message): update getters to take null permissions into account (#<I>) * fix(Message): update message#delete * refactor(Message): message#deletable avoid duplicate call * Update Message.js * fix(message): resolve syntax errors * chore(message): resolve linting issues (death to the gh web panel) * Update Message.js * death to the github web panel * Update src/structures/Message.js
discordjs_discord.js
train
js
e3f0ae6068c06bf06650aa0d460daa28252b89ec
diff --git a/test/renderer/epics/github-publish-spec.js b/test/renderer/epics/github-publish-spec.js index <HASH>..<HASH> 100644 --- a/test/renderer/epics/github-publish-spec.js +++ b/test/renderer/epics/github-publish-spec.js @@ -156,7 +156,7 @@ describe('handleGistError', () => { }); describe('publishEpic', () => { - const input$ = Observable.of(PUBLISH_USER_GIST); + const input$ = Observable.of({ type: PUBLISH_USER_GIST }); const action$ = new ActionsObservable(input$); const store = { getState: function() { return this.state; }, state: { @@ -175,7 +175,7 @@ describe('publishEpic', () => { const responseActions = publishEpic(action$, store); const subscription = responseActions.subscribe( actionBuffer.push, // Every action that goes through should get stuck on an array - (err) => expect.fail(err, null), // It should not error in the stream + (err) => {}, // It should not error in the stream () => { expect(actionBuffer).to.deep.equal([]); // ; },
chore(EpicsTesting): Actually test epic.
nteract_nteract
train
js
e93aa77fb86d9efe0214bfadc36e280d2dd7de7c
diff --git a/src/colorMapper.js b/src/colorMapper.js index <HASH>..<HASH> 100644 --- a/src/colorMapper.js +++ b/src/colorMapper.js @@ -109,19 +109,17 @@ export function differentialColorMapper (d, originalColor) { if (delta === value) { // likely a new frame, color orange - r = 190 + Math.round(65 * vector) - g = 90 + Math.round(65 * vector) + r = Math.round(235 * (1 - vector)) + g = Math.round(135 * (1 - vector)) b = 0 } else if (delta > 0) { // an increase, color red - r = 200 + Math.round(55 * vector) - g = 50 + Math.round(80 * vector) - b = g + b = Math.round(235 * (1 - vector)) + g = b } else if (delta < 0) { // a decrease, color blue - r = 50 + Math.round(80 * vector) + r = Math.round(235 * (1 - vector)) g = r - b = 200 + Math.round(55 * vector) } return 'rgb(' + r + ',' + g + ',' + b + ')'
refactor: differential color mapper improvement
spiermar_d3-flame-graph
train
js
31d374fba400723a52395b75d9e6e6e2cba70abb
diff --git a/src/foremast/utils/find_elb.py b/src/foremast/utils/find_elb.py index <HASH>..<HASH> 100644 --- a/src/foremast/utils/find_elb.py +++ b/src/foremast/utils/find_elb.py @@ -32,4 +32,5 @@ def find_elb(name='', env='', region=''): raise SpinnakerElbNotFound( 'Elb for "{0}" in region {1} not found'.format(name, region)) + LOG.info('Found: %s', elb_dns) return elb_dns
fix: INFO for found ELB See also: PSOBAT-<I>
foremast_foremast
train
py
2b572040645766dc83eaba876ffd0b0fcc055f12
diff --git a/library/src/pivotal-ui-react/tabs/tabs.js b/library/src/pivotal-ui-react/tabs/tabs.js index <HASH>..<HASH> 100644 --- a/library/src/pivotal-ui-react/tabs/tabs.js +++ b/library/src/pivotal-ui-react/tabs/tabs.js @@ -178,7 +178,6 @@ class Tabs extends mixin(React.Component).with(Animation) { actions, children, className, - defaultActiveKey, id = this.state.id, largeScreenClassName, onSelect, @@ -186,7 +185,6 @@ class Tabs extends mixin(React.Component).with(Animation) { position, tabType, tabWidth, - responsiveBreakpoint, ...props} = this.props; const largeScreenClasses = classnames([`tab-${tabType}`, largeScreenClassName, className]);
chore(Tabs): Remove crufty props [#<I>]
pivotal-cf_pivotal-ui
train
js
9967d6023e2e5c4b5cf727e5ec3b5459c9d1ec15
diff --git a/packages/@vue/cli/lib/Migrator.js b/packages/@vue/cli/lib/Migrator.js index <HASH>..<HASH> 100644 --- a/packages/@vue/cli/lib/Migrator.js +++ b/packages/@vue/cli/lib/Migrator.js @@ -1,8 +1,6 @@ const Generator = require('./Generator') const MigratorAPI = require('./MigratorAPI') -const inferRootOptions = require('./util/inferRootOptions') - module.exports = class Migrator extends Generator { constructor (context, { plugin, @@ -19,11 +17,25 @@ module.exports = class Migrator extends Generator { files, invoking }) - this.plugins = [plugin] - const rootOptions = inferRootOptions(pkg) + this.migratorPlugin = plugin + this.invoking = invoking + } + + async generate () { + const plugin = this.migratorPlugin + // apply migrators from plugins - const api = new MigratorAPI(plugin.id, plugin.installed, this, plugin.options, rootOptions) - plugin.apply(api, plugin.options, rootOptions, invoking) + const api = new MigratorAPI( + plugin.id, + plugin.installed, + this, + plugin.options, + this.rootOptions + ) + + await plugin.apply(api, plugin.options, this.rootOptions, this.invoking) + + await super.generate() } }
fix: fix Migrator implementation due to Generator internal change
vuejs_vue-cli
train
js
d292e75b746bc98359e5c0ac5cdec80cbec991be
diff --git a/packages/components/bolt-carousel/__tests__/carousel.js b/packages/components/bolt-carousel/__tests__/carousel.js index <HASH>..<HASH> 100644 --- a/packages/components/bolt-carousel/__tests__/carousel.js +++ b/packages/components/bolt-carousel/__tests__/carousel.js @@ -9,7 +9,7 @@ import { const { readYamlFileSync } = require('@bolt/build-tools/utils/yaml'); const { join } = require('path'); -const timeout = 60000; +const timeout = 120000; const viewportSizes = [ {
test: retest carousel Jest tests with increased timeout
bolt-design-system_bolt
train
js
7027b75b7a0872d6e5a4dcb9df26aeb37953d04c
diff --git a/test/utils.py b/test/utils.py index <HASH>..<HASH> 100644 --- a/test/utils.py +++ b/test/utils.py @@ -547,6 +547,7 @@ class VtGate(object): '-log_dir', environment.vtlogroot, '-srv_topo_cache_ttl', cache_ttl, '-tablet_protocol', protocols_flavor().tabletconn_protocol(), + '-stderrthreshold', get_log_level(), ] if l2vtgates: args.extend([
test: utils.py: Set -stderrthreshold for vtgate. After this change, test runs with -v will show the vtgate Go logs.
vitessio_vitess
train
py
12e91ac381246fef5183150aba7478d5a1825e5d
diff --git a/src/foremast/autoscaling_policy/create_policy.py b/src/foremast/autoscaling_policy/create_policy.py index <HASH>..<HASH> 100644 --- a/src/foremast/autoscaling_policy/create_policy.py +++ b/src/foremast/autoscaling_policy/create_policy.py @@ -161,7 +161,7 @@ class AutoScalingPolicy: "serverGroupName": server_group, "credentials": self.env, "region": self.region, - "provider": "{{ provider }}", + "provider": "aws", "type": "deleteScalingPolicy", "user": "foremast-autoscaling-policy" }]
fix: fixed provider in autoscaling policy
foremast_foremast
train
py
52c75e32cb8519abcd23fcb5f468e0ef714d4fbc
diff --git a/lib/espresso-runner.js b/lib/espresso-runner.js index <HASH>..<HASH> 100644 --- a/lib/espresso-runner.js +++ b/lib/espresso-runner.js @@ -26,7 +26,12 @@ class EspressoRunner { } this[req] = opts[req]; } - this.jwproxy = new JWProxy({server: this.host, port: this.systemPort, base: ''}); + this.jwproxy = new JWProxy({ + server: this.host, + port: this.systemPort, + base: '', + keepAlive: true, + }); this.proxyReqRes = this.jwproxy.proxyReqRes.bind(this.jwproxy); this.modServerPath = path.resolve(this.tmpDir, `${TEST_APK_PKG}_${version}_${this.appPackage}.apk`);
feat: Enable keep-alive mode for server connections (#<I>)
appium_appium-espresso-driver
train
js
ad9c9d96a3f51e157f65ea19f0957eabda0dea87
diff --git a/tangy-form-item.js b/tangy-form-item.js index <HASH>..<HASH> 100644 --- a/tangy-form-item.js +++ b/tangy-form-item.js @@ -720,7 +720,16 @@ export class TangyFormItem extends PolymerElement { this .querySelectorAll('[name]') .forEach(input => inputs.push(input.getModProps && window.useShrinker ? input.getModProps() : input.getProps())) + let score = 0 this.inputs = inputs + const tangyFormItem = this.querySelector('[name]').parentElement; + if(tangyFormItem.hasAttribute('scoring-section')){ + const scoreEl = document.createElement('tangy-input') + scoreEl.name = `${tangyFormItem.getAttribute('id')}_score` + scoreEl.value = score + this.inputs = [...inputs, scoreEl.getModProps && window.useShrinker ? scoreEl.getModProps() : scoreEl.getProps()] + } + const selections = tangyFormItem.getAttribute('scoring-fields') || [] if (window.devtools && window.devtools.open) { console.table(this.inputs.map(input => { return {name: input.name, value: input.value} })) }
feat(scoring-fields): Add Scoring Functionality Part of Tangerine-Community/tangy-form-editor#<I> Refs Tangerine-Community/Tangerine#<I>
Tangerine-Community_tangy-form
train
js
ef374b7be5ab1a556cded83083340edb6a2d28ad
diff --git a/src/view/element-own-attached.js b/src/view/element-own-attached.js index <HASH>..<HASH> 100644 --- a/src/view/element-own-attached.js +++ b/src/view/element-own-attached.js @@ -15,7 +15,7 @@ var NodeType = require('./node-type'); var elementGetTransition = require('./element-get-transition'); var getEventListener = require('./get-event-listener'); var warnEventListenMethod = require('./warn-event-listen-method'); -const handleError = require('../util/handle-error'); +var handleError = require('../util/handle-error'); /** * 双绑输入框CompositionEnd事件监听函数
fix: const handleError to var
baidu_san
train
js
e52b1525fe0db562fae3dec0068f5a3c57753dde
diff --git a/src/oauth.js b/src/oauth.js index <HASH>..<HASH> 100644 --- a/src/oauth.js +++ b/src/oauth.js @@ -190,7 +190,7 @@ async function getTokenEndpoints (wellKnown) { // set cache timeout wellKnownTimeoutId = setTimeout(() => { debug.wellKnown('cache expired') - getTokenEndpoints() + getTokenEndpoints(wellKnown) .catch(err => { debug.wellKnown('unable to refresh well known information') console.error(err.stack)
fix: pass through wellknown url to timeout callback
byu-oit_byu-wabs-oauth
train
js
5a1ccc971b13dcc0f4f96da6031bd3dc228e57f5
diff --git a/test/default.test.js b/test/default.test.js index <HASH>..<HASH> 100644 --- a/test/default.test.js +++ b/test/default.test.js @@ -16,6 +16,11 @@ test('should generate the expected default result', async t => { plugins: [new FaviconsWebpackPlugin({logo})] }); + stats.compilation.children + .filter(child => child.name === 'webapp-webpack-plugin') + .forEach(child => { + t.deepEqual(child.assets, {}); + }); const diff = await compare(dist, path.resolve(expected, 'default')); t.deepEqual(diff, []); diff --git a/test/html.test.js b/test/html.test.js index <HASH>..<HASH> 100644 --- a/test/html.test.js +++ b/test/html.test.js @@ -20,6 +20,12 @@ test('should work together with the html-webpack-plugin', async t => { ], }); + stats.compilation.children + .filter(child => child.name === 'webapp-webpack-plugin') + .forEach(child => { + t.deepEqual(child.assets, {}); + }); + const diff = await compare(dist, path.resolve(expected, 'html')); t.deepEqual(diff, []); });
test: check output stats for the child compiler lists no asset
jantimon_favicons-webpack-plugin
train
js,js
5f79c8474b90bc7261949cf71cee42e3241d152b
diff --git a/packages/core/renderers/bolt-base.js b/packages/core/renderers/bolt-base.js index <HASH>..<HASH> 100644 --- a/packages/core/renderers/bolt-base.js +++ b/packages/core/renderers/bolt-base.js @@ -15,14 +15,6 @@ export function BoltBase(Base = HTMLElement) { if (!this.slots) { this.setupSlots(); } - - // Automatically force a component to render if no props exist BUT props are defined. - if ( - Object.keys(this.props).length !== 0 && - Object.keys(this._props).length === 0 - ) { - this.updated(); - } } setupSlots() {
refactor: remove auto `updated()` call in component's connected callback — fixes issue with components using context not always having data available initially
bolt-design-system_bolt
train
js
16719dbce51e8b01720d722fa0b9ffb7765b58d9
diff --git a/ui/src/components/layout/QDrawer.js b/ui/src/components/layout/QDrawer.js index <HASH>..<HASH> 100644 --- a/ui/src/components/layout/QDrawer.js +++ b/ui/src/components/layout/QDrawer.js @@ -88,7 +88,7 @@ export default Vue.extend({ belowBreakpoint, showing: this.showIfAbove === true && belowBreakpoint === false ? true - : this.value + : this.value === true } }, @@ -537,12 +537,8 @@ export default Vue.extend({ this.$emit('mini-state', this.isMini) const fn = () => { - if (this.showing === true) { - this.__show(false, true) - } - else { - this.__hide(false, true) - } + const action = this.showing === true ? 'show' : 'hide' + this[`__${action}`](false, true) } if (this.layout.width !== 0) {
fix(QDrawer): backdrop not initialized correctly due to faulty "showing" value #<I>
quasarframework_quasar
train
js
c6cb3cd46e8588108b9325027db20a49990c0e27
diff --git a/lib/cli.js b/lib/cli.js index <HASH>..<HASH> 100644 --- a/lib/cli.js +++ b/lib/cli.js @@ -80,7 +80,6 @@ module.exports = function (options) { var slap = new Slap(opts); Promise.all(opts._.map(function (path, i) { - slap.fileBrowser.refresh(path, _.noop); return slap.open(path.toString(), !i); })).done(); diff --git a/lib/ui/Slap.js b/lib/ui/Slap.js index <HASH>..<HASH> 100644 --- a/lib/ui/Slap.js +++ b/lib/ui/Slap.js @@ -11,6 +11,8 @@ var util = require('slap-util'); var BaseWidget = require('base-widget'); var Editor = require('editor-widget'); +var fs = require('fs'); + function Slap (opts) { var self = this; @@ -52,6 +54,10 @@ Slap.prototype.open = Promise.method(function (filePath, current) { var pane = self.paneForPath(filePath); pane = pane || new Pane({parent: self}); + if (fs.lstatSync(filePath).isDirectory()) { // check if filePath is a directory + self.fileBrowser.refresh(filePath, _.noop); // open the directory on the sidebar + return; + } return pane.editor.open(filePath) .then(function () { if (current) pane.setCurrent();
fix(slap): fix bug when given 'path/to/dir', slap opens the given directory instead of throwing an error EISDIR.
slap-editor_slap
train
js,js
f80748ec313abe96d995fb73be297fa3e42914f3
diff --git a/packages/razzle-dev-utils/makeLoaderFinder.js b/packages/razzle-dev-utils/makeLoaderFinder.js index <HASH>..<HASH> 100644 --- a/packages/razzle-dev-utils/makeLoaderFinder.js +++ b/packages/razzle-dev-utils/makeLoaderFinder.js @@ -6,7 +6,7 @@ const makeLoaderFinder = loaderName => rule => { // Checks if there's a loader string in rule.loader matching loaderRegex. const inLoaderString = - typeof rule.loader === 'string' && rule.loader.match(loaderRegex); + typeof rule.loader === 'string' && (rule.loader.match(loaderRegex) || rule.loader === loaderName); // Checks if there is an object inside rule.use with loader matching loaderRegex, OR // Checks another condition, if rule is not an object, but pure string (ex: "style-loader", etc) @@ -15,8 +15,8 @@ const makeLoaderFinder = loaderName => rule => { rule.use.find( loader => (typeof loader.loader === 'string' && - loader.loader.match(loaderRegex)) || - (typeof loader === 'string' && loader.match(loaderRegex)) + (loader.loader.match(loaderRegex)) || rule.loader === loaderName) || + (typeof loader === 'string' && (loader.match(loaderRegex) || loader === loaderName)) ); return inUseArray || inLoaderString;
fix: allow getting string only loaders
jaredpalmer_razzle
train
js
0acfb1f5553d1475bfc8f6078bc7b0e7bb2bec7c
diff --git a/tests/parser/ast_utils/test_ast_dict.py b/tests/parser/ast_utils/test_ast_dict.py index <HASH>..<HASH> 100644 --- a/tests/parser/ast_utils/test_ast_dict.py +++ b/tests/parser/ast_utils/test_ast_dict.py @@ -69,9 +69,7 @@ a: int128 "lineno": 2, "node_id": 2, "src": "1:1:0", - "type": "int128", }, - "type": "int128", "value": None, } diff --git a/vyper/compiler/output.py b/vyper/compiler/output.py index <HASH>..<HASH> 100644 --- a/vyper/compiler/output.py +++ b/vyper/compiler/output.py @@ -18,7 +18,7 @@ from vyper.warnings import ContractSizeLimitWarning def build_ast_dict(compiler_data: CompilerData) -> dict: ast_dict = { "contract_name": compiler_data.contract_name, - "ast": ast_to_dict(compiler_data.vyper_module_unfolded), + "ast": ast_to_dict(compiler_data.vyper_module), } return ast_dict
fix: AST output (#<I>) rollback changes to `-f ast` introduced in 3cbdf<I>bfd until `vyper_module_folded` is stable
ethereum_vyper
train
py,py
11e271535161b3a6b225d74390694236f6a7d9d9
diff --git a/js/src/responsive-nav.jquery.js b/js/src/responsive-nav.jquery.js index <HASH>..<HASH> 100755 --- a/js/src/responsive-nav.jquery.js +++ b/js/src/responsive-nav.jquery.js @@ -32,18 +32,28 @@ module.exports = (function($){ $wrapper = $( options.wrapperSelector ), $menuButton = $( options.menuButtonSelector ); - var closeNav = function() { - if( options.navType === 'dropdown' ){ - $this.slideUp(); - } - else{ - $wrapper.removeClass( options.menuOpenClass ); - } + function _closeNav() { $menuButton.removeClass( options.menuButtonActiveClass ); - menuOpen = false; + } + + function _closeDropdownNav() { + $this.slideUp(); + _closeNav(); + } + + function _closeOffCanvasNav() { + $wrapper.removeClass( options.menuOpenClass ); + _closeNav(); + } + + var closeNavStrategies = { + dropdown: _closeDropdownNav, + offCanvas: _closeOffCanvasNav, }; + var closeNav = closeNavStrategies[options.navType] || _closeOffCanvasNav; + var bodyClickFn = function(evt) { //if not nav container or a decendant of nav container if( !$this.is(evt.target) && $this.has(evt.target).length === 0 ) {
refactor: introduce closeNavStrategies abstraction
sitecrafting_groot
train
js
4f7ad8a6e5723ffcf94a2d6021823ca5b9b96ce4
diff --git a/logger/drain/drain.go b/logger/drain/drain.go index <HASH>..<HASH> 100644 --- a/logger/drain/drain.go +++ b/logger/drain/drain.go @@ -26,7 +26,7 @@ func SendToDrain(m string, drain string) error { func sendToSyslogDrain(m string, drain string) error { conn, err := net.Dial("udp", drain) if err != nil { - log.Fatal(err) + log.Print(err) } defer conn.Close() fmt.Fprintf(conn, m)
fix(logger): reduce severity of log failure Sending a log to an external server should not kill the logger on an error. For example, if the host is down or unavailable, the logger should just log that the error message has been lost, but carry on.
deis_deis
train
go
786b5c7fab4f960d6a24dfc582e7d5bc1a57bc35
diff --git a/lxd/devlxd_test.go b/lxd/devlxd_test.go index <HASH>..<HASH> 100644 --- a/lxd/devlxd_test.go +++ b/lxd/devlxd_test.go @@ -11,6 +11,7 @@ import ( "testing" "github.com/lxc/lxd/lxd/sys" + "github.com/lxc/lxd/lxd/ucred" ) var testDir string @@ -103,13 +104,13 @@ func TestCredsSendRecv(t *testing.T) { } defer conn.Close() - cred, err := getCred(conn) + cred, err := ucred.GetCred(conn) if err != nil { t.Log(err) result <- -1 return } - result <- cred.pid + result <- cred.PID }() conn, err := connect(fmt.Sprintf("%s/test-devlxd-sock", testDir))
test: Updates devlxd tests to use ucred package
lxc_lxd
train
go
3a2f6659a6a06e9b37ae40e04e3a4c9192b69d35
diff --git a/src/diagrams/class/classDb.js b/src/diagrams/class/classDb.js index <HASH>..<HASH> 100644 --- a/src/diagrams/class/classDb.js +++ b/src/diagrams/class/classDb.js @@ -163,7 +163,7 @@ export const cleanupLabel = function (label) { if (label.substring(0, 1) === ':') { return common.sanitizeText(label.substr(1).trim(), configApi.getConfig()); } else { - return label.trim(); + return sanitizeText(label.trim()); } };
fix: one more sanitization
knsv_mermaid
train
js
5c8fae45129c8fa52c942fe822ed2ba4c3a78782
diff --git a/cobra/core/Model.py b/cobra/core/Model.py index <HASH>..<HASH> 100644 --- a/cobra/core/Model.py +++ b/cobra/core/Model.py @@ -207,7 +207,9 @@ class Model(Object): except Exception: # pragma: no cover new._solver = copy(self.solver) # pragma: no cover - new.solution = deepcopy(self.solution) + # No use in copying it, also circular dependencies + new._timestamp_last_optimization = None + new.solution = LazySolution(self) return new def add_metabolites(self, metabolite_list):
feat: do not deepcopy solution object in model.copy() (HT @cdiener)
opencobra_cobrapy
train
py
7d87672a561986825f08104b09b6294b649a3f12
diff --git a/block.go b/block.go index <HASH>..<HASH> 100644 --- a/block.go +++ b/block.go @@ -171,11 +171,13 @@ func (b *block) write(revision uint64, w io.Writer) error { if err := writeString(w, columnType); err != nil { return err } - if err := b.offsetBuffers[i].writeTo(w); err != nil { - return err - } - if err := b.buffers[i].writeTo(w); err != nil { - return err + if len(b.buffers) != 0 { + if err := b.offsetBuffers[i].writeTo(w); err != nil { + return err + } + if err := b.buffers[i].writeTo(w); err != nil { + return err + } } } return nil
fix: index out of renge when close tx without data
kshvakov_clickhouse
train
go
dbb6d548ad7852a83aa7a84fa62df5dccff51e6d
diff --git a/addScript.js b/addScript.js index <HASH>..<HASH> 100644 --- a/addScript.js +++ b/addScript.js @@ -3,15 +3,25 @@ Author Tobias Koppers @sokra */ module.exports = function(src) { + function log(error) { + (typeof console !== "undefined") + && (console.error || console.log)("[Script Loader]", error); + } + + // Check for IE =< 8 + function isIE() { + return typeof attachEvent !== "undefined" && typeof addEventListener === "undefined"; + } + try { - if (typeof eval !== "undefined") { - eval.call(null, src); - } else if (typeof execScript !== "undefined") { + if (typeof execScript !== "undefined" && isIE()) { execScript(src); + } else if (typeof eval !== "undefined") { + eval.call(null, src); } else { - console.error("[Script Loader] EvalError: No eval function available"); + log("EvalError: No eval function available"); } } catch (error) { - console.error("[Script Loader] ", error.message); + log(error); } }
fix: IE =< 8 incompatibility regression (#<I>)
webpack-contrib_script-loader
train
js
15b97a44eae813bd3ce6d49ba6881bf265331c5f
diff --git a/src/timepicker/timepicker.js b/src/timepicker/timepicker.js index <HASH>..<HASH> 100644 --- a/src/timepicker/timepicker.js +++ b/src/timepicker/timepicker.js @@ -27,6 +27,7 @@ export class MdTimePicker { twelvehour: this.twelveHour }; $(this.element).pickatime(options); + this.element.value = this.value; } detached() {
fix(md-timepicker): Set value if assigned before the attach
aurelia-ui-toolkits_aurelia-materialize-bridge
train
js
5b8f52563433594f360e4ea42163717a42514cf3
diff --git a/src/OoGlee/Domain/Providers/LaravelServiceProvider.php b/src/OoGlee/Domain/Providers/LaravelServiceProvider.php index <HASH>..<HASH> 100644 --- a/src/OoGlee/Domain/Providers/LaravelServiceProvider.php +++ b/src/OoGlee/Domain/Providers/LaravelServiceProvider.php @@ -120,14 +120,6 @@ abstract class LaravelServiceProvider extends ServiceProvider { { if (isLaravel5()) { - // Bind the returned class to the namespace packageConfigClass - $this->app->bind($this->packageConfigClass, function($app) - { - $configNameSpace = 'vendor.'.$this->packageVendor.'.'.$this->packageName.'.'; - // Register the corresponding config for package - return new $this->packageConfigClass($app['config'], $configNameSpace); - }); - $this->app->bindShared($this->packageName.'.config', function($app) { $configNameSpace = 'vendor.'.$this->packageVendor.'.'.$this->packageName.'.';
fix: Enable dynamic config class resolution
RowlandOti_ooglee-core
train
php
e160d8e027eadd6c9a2f6b4839eb0b4fe406493d
diff --git a/src/Api/Invoices.php b/src/Api/Invoices.php index <HASH>..<HASH> 100644 --- a/src/Api/Invoices.php +++ b/src/Api/Invoices.php @@ -66,14 +66,17 @@ class Invoices extends Api * * @param string $customerId * @param string $subscriptionId + * @param array $parameters * @return array */ - public function upcomingInvoice($customerId, $subscriptionId = null) + public function upcomingInvoice($customerId, $subscriptionId = null, array $parameters = []) { - return $this->_get('invoices/upcoming', [ + $parameters = array_merge($parameters, [ 'customer' => $customerId, 'subscription' => $subscriptionId, ]); + + return $this->_get('invoices/upcoming', $parameters); } /**
chore: Add extra argument to the upcomingInvoice method.
cartalyst_stripe
train
php
bdcbb083a112d3cc81bb98ee63a26674b5397563
diff --git a/ibis/backends/datafusion/__init__.py b/ibis/backends/datafusion/__init__.py index <HASH>..<HASH> 100644 --- a/ibis/backends/datafusion/__init__.py +++ b/ibis/backends/datafusion/__init__.py @@ -128,13 +128,12 @@ class Backend(BaseBackend): schema An optional schema """ - self._context.register_csv(name, path, schema=schema) + self._context.register_csv(name, str(path), schema=schema) def register_parquet( self, name: str, path: str | Path, - schema: sch.Schema | None = None, ) -> None: """Register a parquet file with with `name` located at `path`. @@ -147,7 +146,7 @@ class Backend(BaseBackend): schema An optional schema """ - self._context.register_parquet(name, path, schema=schema) + self._context.register_parquet(name, str(path)) def execute( self,
fix: remove passing schema into register_parquet
ibis-project_ibis
train
py
b54144b67a9fc456576412afaf11c4642057a259
diff --git a/test/helpers/node.go b/test/helpers/node.go index <HASH>..<HASH> 100644 --- a/test/helpers/node.go +++ b/test/helpers/node.go @@ -251,10 +251,10 @@ func (s *SSHMeta) ExecContext(ctx context.Context, cmd string, options ...ExecOp wg: &wg, } + res.wg.Add(1) go func(res *CmdRes) { - start := time.Now() - res.wg.Add(1) defer res.wg.Done() + start := time.Now() err := s.sshClient.RunCommandContext(ctx, command) if err != nil { exiterr, isExitError := err.(*ssh.ExitError)
test: add WaitGroup delta before goroutine To avoid a WaitGroup.Wait() being executed without the execution of Add(1), the Add(1) should be perform before a go routine initialization.
cilium_cilium
train
go
c2634bac7269bcf07bd103dfe7d66e0fd790d7f2
diff --git a/flask_appbuilder/api/convert.py b/flask_appbuilder/api/convert.py index <HASH>..<HASH> 100644 --- a/flask_appbuilder/api/convert.py +++ b/flask_appbuilder/api/convert.py @@ -96,7 +96,6 @@ class Model2SchemaConverter(BaseModel2SchemaConverter): class Meta: model = _model fields = columns - strict = True load_instance = True sqla_session = self.datamodel.session @@ -105,7 +104,6 @@ class Model2SchemaConverter(BaseModel2SchemaConverter): class MetaSchema(SQLAlchemyAutoSchema, class_mixin): class Meta: model = _model - strict = True load_instance = True sqla_session = self.datamodel.session
refactor: remove unnecessary strict option from schemas (#<I>)
dpgaspar_Flask-AppBuilder
train
py
4aa365b7f13fc1ed814ea9554c97aadf1a202e3a
diff --git a/karma.conf.js b/karma.conf.js index <HASH>..<HASH> 100644 --- a/karma.conf.js +++ b/karma.conf.js @@ -104,24 +104,18 @@ module.exports = function(config) { version: '11', platform: 'Windows 8.1', }, - 'sl-safari-11': { + 'sl-safari-14': { base: 'SauceLabs', browserName: 'safari', - version: '11', - platform: 'macOS 10.13', + version: '14', + platform: 'macOS 11.00', }, - 'sl-safari-10': { + 'sl-safari-13': { base: 'SauceLabs', browserName: 'safari', - version: '10', - platform: 'OS X 10.12', + version: '13', + platform: 'OS X 10.15', }, - // 'sl-safari-9': { - // base: 'SauceLabs', - // browserName: 'safari', - // version: '9', - // platform: 'OS X 10.11', - // }, // 'sl-chrome-41': { // base: 'SauceLabs', // browserName: 'chrome',
chore: bumb safari test versions
material-components_material-components-web-components
train
js
f1c8b2e2a2837e77f188e4e6cbadaae0749d5628
diff --git a/Gruntfile.js b/Gruntfile.js index <HASH>..<HASH> 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -228,7 +228,7 @@ module.exports = function(grunt) { grunt.task.loadTasks('tasks'); grunt.registerTask('bench', ['metrics']); - grunt.registerTask('sauce', process.env.SAUCE_USERNAME ? ['tests', 'connect', 'saucelabs-mocha'] : []); + grunt.registerTask('sauce', [] /* process.env.SAUCE_USERNAME ? ['tests', 'connect', 'saucelabs-mocha'] : [] */); grunt.registerTask('travis', process.env.PUBLISH ? ['default', 'sauce', 'metrics', 'publish:latest'] : ['default']);
chore: disable sauce-labs Related to #<I>
wycats_handlebars.js
train
js
4360f923dba133bc14472ed66ae8e2a61522463b
diff --git a/src/components/MultiSelect/MultiSelect.js b/src/components/MultiSelect/MultiSelect.js index <HASH>..<HASH> 100644 --- a/src/components/MultiSelect/MultiSelect.js +++ b/src/components/MultiSelect/MultiSelect.js @@ -12,6 +12,7 @@ import { defaultItemToString } from './tools/itemToString'; import { defaultSortItems, defaultCompareItems } from './tools/sorting'; const { prefix } = settings; +const noop = () => undefined; export default class MultiSelect extends React.Component { static propTypes = { @@ -203,7 +204,7 @@ export default class MultiSelect extends React.Component { <ListBox.Field {...getButtonProps({ disabled })}> {selectedItem.length > 0 && ( <ListBox.Selection - clearSelection={clearSelection} + clearSelection={!disabled ? clearSelection : noop} selectionCount={selectedItem.length} /> )}
fix(MultiSelect): disabled multiSelect being able to clear its select… (#<I>) * fix(MultiSelect): disabled multiSelect being able to clear its selected items * Update src/components/MultiSelect/MultiSelect.js clearSection returns noop so that when clicked and disabled no function is ran
carbon-design-system_carbon-components-react
train
js